diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2009-08-25 16:44:04 +0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2009-08-25 16:44:04 +0400 |
commit | b6ed2e03df1e2c6ee41cf0e2e2699f2410671916 (patch) | |
tree | 9b9f4c5670f620f88aba9668b7fee9bd07eb8642 /include | |
parent | d34843d0c4a20872f3f3bfb510328bd043b939ff (diff) | |
download | linux-b6ed2e03df1e2c6ee41cf0e2e2699f2410671916.tar.xz |
GFS2: Add explanation of extended attr on-disk format
Some useful info regarding the on-disk representation of
GFS2 extended attributes.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/gfs2_ondisk.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/gfs2_ondisk.h b/include/linux/gfs2_ondisk.h index c56b4bce56d0..b80c88dedbbb 100644 --- a/include/linux/gfs2_ondisk.h +++ b/include/linux/gfs2_ondisk.h @@ -333,6 +333,28 @@ struct gfs2_leaf { /* * Extended attribute header format + * + * This works in a similar way to dirents. There is a fixed size header + * followed by a variable length section made up of the name and the + * associated data. In the case of a "stuffed" entry, the value is + * inline directly after the name, the ea_num_ptrs entry will be + * zero in that case. For non-"stuffed" entries, there will be + * a set of pointers (aligned to 8 byte boundary) to the block(s) + * containing the value. + * + * The blocks containing the values and the blocks containing the + * extended attribute headers themselves all start with the common + * metadata header. Each inode, if it has extended attributes, will + * have either a single block containing the extended attribute headers + * or a single indirect block pointing to blocks containing the + * extended attribure headers. + * + * The maximim size of the data part of an extended attribute is 64k + * so the number of blocks required depends upon block size. Since the + * block size also determines the number of pointers in an indirect + * block, its a fairly complicated calculation to work out the maximum + * number of blocks that an inode may have relating to extended attributes. + * */ #define GFS2_EA_MAX_NAME_LEN 255 |