Whamcloud - gitweb
LU-2786 llite: allow setting pool name via fsetxattr()
authorNed Bass <bass6@llnl.gov>
Fri, 8 Feb 2013 22:09:09 +0000 (14:09 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 20 Feb 2013 02:59:35 +0000 (21:59 -0500)
commitbc5d8ddb32aad8eb382f00a058a59c1ec8de0d20
treeddf72d40d3fff01837d2aaa600c0805a4767d1bd
parentcc5ef6ae5412c3e94061d949ef684036eb003f27
LU-2786 llite: allow setting pool name via fsetxattr()

Setting the pool name in the striping data of a file fails when the
fsetxattr() interface is used to store the lustre extended attributes,
while using ioctl() works as expected.  This is because ll_setxattr()
assumes the size of the lustre user metadata structure to be that of
the older v1 format which doesn't include a pool name field.  Fix this
by using the magic number to detect the format version and setting
the size accordingly when passing the user data down the stack.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: I6f6969dfaf2149f268d52272f538fee05459697b
Reviewed-on: http://review.whamcloud.com/5313
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/llite/xattr.c