summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2009-08-17 21:24:39 +0200
committerJoel Becker <joel.becker@oracle.com>2010-02-27 00:41:10 +0100
commit69a3e539d083ac09aec92b8705b8ff2c2e5c810c (patch)
tree9b3193da2f261e7198c50acfce4fd7593a4b98df /scripts
parentocfs2: Wrap calculation of name+value pair size. (diff)
downloadlinux-69a3e539d083ac09aec92b8705b8ff2c2e5c810c.tar.xz
linux-69a3e539d083ac09aec92b8705b8ff2c2e5c810c.zip
ocfs2: Set the xattr name+value pair in one place
We create two new functions on ocfs2_xa_loc, ocfs2_xa_prepare_entry() and ocfs2_xa_store_inline_value(). ocfs2_xa_prepare_entry() makes sure that the xl_entry field of ocfs2_xa_loc is ready to receive an xattr. The entry will point to an appropriately sized name+value region in storage. If an existing entry can be reused, it will be. If no entry already exists, it will be allocated. If there isn't space to allocate it, -ENOSPC will be returned. ocfs2_xa_store_inline_value() stores the data that goes into the 'value' part of the name+value pair. For values that don't fit directly, this stores the value tree root. A number of operations are added to ocfs2_xa_loc_operations to support these functions. This reflects the disparate behaviors of xattr blocks and buckets. With these functions, the overlapping ocfs2_xattr_set_entry_local() and ocfs2_xattr_set_entry_normal() can be replaced with a single call scheme. Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions