summaryrefslogtreecommitdiffstats
path: root/drivers/dio
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2009-08-15 04:04:15 +0200
committerJoel Becker <joel.becker@oracle.com>2010-02-27 00:41:10 +0100
commit199799a3609f6d5bb231a75c2e702afaac805431 (patch)
treee9addab09c0c86a06dd97251888035cc0ccab202 /drivers/dio
parentocfs2: Add a name_len field to ocfs2_xattr_info. (diff)
downloadlinux-199799a3609f6d5bb231a75c2e702afaac805431.tar.xz
linux-199799a3609f6d5bb231a75c2e702afaac805431.zip
ocfs2: Wrap calculation of name+value pair size.
An ocfs2 xattr entry stores the text name and value as a pair in the storage area. Obviously names and values can be variable-sized. If a value is too large for the entry storage, a tree root is stored instead. The name+value pair is also padded. Because of this, there are a million places in the code that do: if (needs_external_tree(value_size) namevalue_size = pad(name_size) + tree_root_size; else namevalue_size = pad(name_size) + pad(value_size); Let's create some convenience functions to make the code more readable. There are three forms. The first takes the raw sizes. The second takes an ocfs2_xattr_info structure. The third takes an existing ocfs2_xattr_entry. Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'drivers/dio')
0 files changed, 0 insertions, 0 deletions