[LU-11109] zero length xattrs handled incorrectly when xattr cache disabled or bypassed Created: 29/Jun/18  Updated: 07/Jan/19  Resolved: 09/Aug/18

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.12.0

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: John Hammond
Resolution: Fixed Votes: 0
Labels: xattr

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

When xattr caching is disabled or bypassed extended attributes with zero length values are not handled correctly:

o:~# cd /mnt/lustre
o:lustre# lctl set_param llite.*.xattr_cache=1
llite.lustre-ffff8c4ac8a60000.xattr_cache=1
o:lustre# rm -f f0
o:lustre# touch f0
o:lustre# setfattr -n user.blah f0
o:lustre# getfattr -d -m- f0
# file: f0
lustre.lov=0s0AvRCwEAAAADAAAAAAAAAAEEAAACAAAAAAAQAAEAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
trusted.link=0s3/HqEQEAAAAsAAAAAAAAAAAAAAAAAAAAABQAAAACAAAABwAAAAEAAAAAZjA=
trusted.lma=0sAAAAAAAAAAABBAAAAgAAAAMAAAAAAAAA
trusted.lov=0s0AvRCwEAAAADAAAAAAAAAAEEAAACAAAAAAAQAAEAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
trusted.version=0sDAAAAAEAAAA=
user.blah

o:lustre# lctl set_param llite.*.xattr_cache=0
llite.lustre-ffff8c4ac8a60000.xattr_cache=0
o:lustre# getfattr -d -m- f0
# file: f0
lustre.lov=0s0AvRCwEAAAADAAAAAAAAAAEEAAACAAAAAAAQAAEAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
trusted.link=0s3/HqEQEAAAAsAAAAAAAAAAAAAAAAAAAAABQAAAACAAAABwAAAAEAAAAAZjA=
trusted.lma=0sAAAAAAAAAAABBAAAAgAAAAMAAAAAAAAA
trusted.lov=0s0AvRCwEAAAADAAAAAAAAAAEEAAACAAAAAAAQAAEAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
trusted.version=0sDAAAAAEAAAA=
f0: user.blah: No such attribute

I noticed this while looking at LU-11074 but this is not the underlying cause of that bug.



 Comments   
Comment by Gerrit Updater [ 02/Jul/18 ]

John L. Hammond (jhammond@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/32755
Subject: LU-11109 mdt: handle zero length xattr values correctly
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: c4a00691479e245a2134dc03574448c652e38f13

Comment by James A Simmons [ 10/Jul/18 ]

John are the patches a series or independent?

Comment by John Hammond [ 10/Jul/18 ]

The first change is logically independent of the others but they should be used together for LU-11074.

Comment by Gerrit Updater [ 09/Aug/18 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/32755/
Subject: LU-11109 mdt: handle zero length xattr values correctly
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 1e4164a1254d7fb75e49af73994d2e53864536ab

Comment by Peter Jones [ 09/Aug/18 ]

Landed for 2.12

Generated at Sat Feb 10 02:41:01 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.