Whamcloud - gitweb
LU-12944 mdd: pass correct xattr size to lower layers 89/36689/3
authorSebastien Buisson <sbuisson@ddn.com>
Wed, 6 Nov 2019 17:31:08 +0000 (02:31 +0900)
committerOleg Drokin <green@whamcloud.com>
Sat, 14 Dec 2019 05:56:44 +0000 (05:56 +0000)
commite5e584fd386a2229809bc64d440c3255cf50c1bd
treed8c9313e8610fe3ec91cc8a09d815105321547bc
parente150810faa5b22382b2213225478c3763195438b
LU-12944 mdd: pass correct xattr size to lower layers

In mdd_iterate_xattrs(), struct lu_buf allocated to store xattr value
can be reused for multiple xattrs, because it is only reallocated if
it happens to be too small for one xattr.
As a consequence, lb_len field does not represent actual xattr's size.
It has to be adjusted when passed to lower layers.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I26b54759b4e69fbac17a1032bbc724b796d78108
Reviewed-on: https://review.whamcloud.com/36689
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdd/mdd_dir.c
lustre/tests/sanity.sh