xref: /linux/fs/squashfs/squashfs_fs_i.h (revision 58e16d792a6a8c6b750f637a4649967fcac853dc)
1*68252eb5SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */
2ffae2cd7SPhillip Lougher #ifndef SQUASHFS_FS_I
3ffae2cd7SPhillip Lougher #define SQUASHFS_FS_I
4ffae2cd7SPhillip Lougher /*
5ffae2cd7SPhillip Lougher  * Squashfs
6ffae2cd7SPhillip Lougher  *
7ffae2cd7SPhillip Lougher  * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008
8d7f2ff67SPhillip Lougher  * Phillip Lougher <phillip@squashfs.org.uk>
9ffae2cd7SPhillip Lougher  *
10ffae2cd7SPhillip Lougher  * squashfs_fs_i.h
11ffae2cd7SPhillip Lougher  */
12ffae2cd7SPhillip Lougher 
13ffae2cd7SPhillip Lougher struct squashfs_inode_info {
14ffae2cd7SPhillip Lougher 	u64		start;
15ffae2cd7SPhillip Lougher 	int		offset;
16f41d207cSPhillip Lougher 	u64		xattr;
17f41d207cSPhillip Lougher 	unsigned int	xattr_size;
18f41d207cSPhillip Lougher 	int		xattr_count;
19ffae2cd7SPhillip Lougher 	union {
20ffae2cd7SPhillip Lougher 		struct {
21ffae2cd7SPhillip Lougher 			u64		fragment_block;
22ffae2cd7SPhillip Lougher 			int		fragment_size;
23ffae2cd7SPhillip Lougher 			int		fragment_offset;
24ffae2cd7SPhillip Lougher 			u64		block_list_start;
25ffae2cd7SPhillip Lougher 		};
26ffae2cd7SPhillip Lougher 		struct {
27ffae2cd7SPhillip Lougher 			u64		dir_idx_start;
28ffae2cd7SPhillip Lougher 			int		dir_idx_offset;
29ffae2cd7SPhillip Lougher 			int		dir_idx_cnt;
30ffae2cd7SPhillip Lougher 			int		parent;
31ffae2cd7SPhillip Lougher 		};
32ffae2cd7SPhillip Lougher 	};
33ffae2cd7SPhillip Lougher 	struct inode	vfs_inode;
34ffae2cd7SPhillip Lougher };
358fcd9721SPhillip Lougher 
368fcd9721SPhillip Lougher 
squashfs_i(struct inode * inode)378fcd9721SPhillip Lougher static inline struct squashfs_inode_info *squashfs_i(struct inode *inode)
388fcd9721SPhillip Lougher {
39db6172c4SRasmus Villemoes 	return container_of(inode, struct squashfs_inode_info, vfs_inode);
408fcd9721SPhillip Lougher }
41ffae2cd7SPhillip Lougher #endif
42