Linux Audio

Check our new training course

Loading...
v3.15
 1#ifndef _UDF_I_H
 2#define _UDF_I_H
 3
 4struct extent_position {
 5	struct buffer_head *bh;
 6	uint32_t offset;
 7	struct kernel_lb_addr block;
 8};
 9
10struct udf_ext_cache {
11	/* Extent position */
12	struct extent_position epos;
13	/* Start logical offset in bytes */
14	loff_t lstart;
15};
16
17/*
18 * The i_data_sem and i_mutex serve for protection of allocation information
19 * of a regular files and symlinks. This includes all extents belonging to
20 * the file/symlink, a fact whether data are in-inode or in external data
21 * blocks, preallocation, goal block information... When extents are read,
22 * i_mutex or i_data_sem must be held (for reading is enough in case of
23 * i_data_sem). When extents are changed, i_data_sem must be held for writing
24 * and also i_mutex must be held.
25 *
26 * For directories i_mutex is used for all the necessary protection.
27 */
28
29struct udf_inode_info {
30	struct timespec		i_crtime;
31	/* Physical address of inode */
32	struct kernel_lb_addr		i_location;
33	__u64			i_unique;
34	__u32			i_lenEAttr;
35	__u32			i_lenAlloc;
36	__u64			i_lenExtents;
37	__u32			i_next_alloc_block;
38	__u32			i_next_alloc_goal;
39	__u32			i_checkpoint;
40	unsigned		i_alloc_type : 3;
41	unsigned		i_efe : 1;	/* extendedFileEntry */
42	unsigned		i_use : 1;	/* unallocSpaceEntry */
43	unsigned		i_strat4096 : 1;
44	unsigned		reserved : 26;
45	union {
46		struct short_ad	*i_sad;
47		struct long_ad		*i_lad;
48		__u8		*i_data;
49	} i_ext;
50	struct rw_semaphore	i_data_sem;
51	struct udf_ext_cache cached_extent;
52	/* Spinlock for protecting extent cache */
53	spinlock_t i_extent_cache_lock;
54	struct inode vfs_inode;
55};
56
57static inline struct udf_inode_info *UDF_I(struct inode *inode)
58{
59	return list_entry(inode, struct udf_inode_info, vfs_inode);
60}
61
62#endif /* _UDF_I_H) */
v3.1
 1#ifndef _UDF_I_H
 2#define _UDF_I_H
 3
 
 
 
 
 
 
 
 
 
 
 
 
 
 4/*
 5 * The i_data_sem and i_mutex serve for protection of allocation information
 6 * of a regular files and symlinks. This includes all extents belonging to
 7 * the file/symlink, a fact whether data are in-inode or in external data
 8 * blocks, preallocation, goal block information... When extents are read,
 9 * i_mutex or i_data_sem must be held (for reading is enough in case of
10 * i_data_sem). When extents are changed, i_data_sem must be held for writing
11 * and also i_mutex must be held.
12 *
13 * For directories i_mutex is used for all the necessary protection.
14 */
15
16struct udf_inode_info {
17	struct timespec		i_crtime;
18	/* Physical address of inode */
19	struct kernel_lb_addr		i_location;
20	__u64			i_unique;
21	__u32			i_lenEAttr;
22	__u32			i_lenAlloc;
23	__u64			i_lenExtents;
24	__u32			i_next_alloc_block;
25	__u32			i_next_alloc_goal;
 
26	unsigned		i_alloc_type : 3;
27	unsigned		i_efe : 1;	/* extendedFileEntry */
28	unsigned		i_use : 1;	/* unallocSpaceEntry */
29	unsigned		i_strat4096 : 1;
30	unsigned		reserved : 26;
31	union {
32		struct short_ad	*i_sad;
33		struct long_ad		*i_lad;
34		__u8		*i_data;
35	} i_ext;
36	struct rw_semaphore	i_data_sem;
 
 
 
37	struct inode vfs_inode;
38};
39
40static inline struct udf_inode_info *UDF_I(struct inode *inode)
41{
42	return list_entry(inode, struct udf_inode_info, vfs_inode);
43}
44
45#endif /* _UDF_I_H) */