xref: /openbmc/linux/fs/btrfs/btrfs_inode.h (revision 6cbd55707802b98843f953d1ae6d8f5bcd9a76c0)
1*6cbd5570SChris Mason /*
2*6cbd5570SChris Mason  * Copyright (C) 2007 Oracle.  All rights reserved.
3*6cbd5570SChris Mason  *
4*6cbd5570SChris Mason  * This program is free software; you can redistribute it and/or
5*6cbd5570SChris Mason  * modify it under the terms of the GNU General Public
6*6cbd5570SChris Mason  * License v2 as published by the Free Software Foundation.
7*6cbd5570SChris Mason  *
8*6cbd5570SChris Mason  * This program is distributed in the hope that it will be useful,
9*6cbd5570SChris Mason  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10*6cbd5570SChris Mason  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11*6cbd5570SChris Mason  * General Public License for more details.
12*6cbd5570SChris Mason  *
13*6cbd5570SChris Mason  * You should have received a copy of the GNU General Public
14*6cbd5570SChris Mason  * License along with this program; if not, write to the
15*6cbd5570SChris Mason  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16*6cbd5570SChris Mason  * Boston, MA 021110-1307, USA.
17*6cbd5570SChris Mason  */
18*6cbd5570SChris Mason 
192c90e5d6SChris Mason #ifndef __BTRFS_I__
202c90e5d6SChris Mason #define __BTRFS_I__
212c90e5d6SChris Mason 
222c90e5d6SChris Mason struct btrfs_inode {
23d6e4a428SChris Mason 	struct btrfs_root *root;
2431f3c99bSChris Mason 	struct btrfs_block_group_cache *block_group;
25d6e4a428SChris Mason 	struct btrfs_key location;
262c90e5d6SChris Mason 	struct inode vfs_inode;
272c90e5d6SChris Mason };
282c90e5d6SChris Mason static inline struct btrfs_inode *BTRFS_I(struct inode *inode)
292c90e5d6SChris Mason {
302c90e5d6SChris Mason 	return container_of(inode, struct btrfs_inode, vfs_inode);
312c90e5d6SChris Mason }
322c90e5d6SChris Mason 
332c90e5d6SChris Mason #endif
34