[LU-6027] Issues with EAs of orphan files and EAs with empty values Created: 15/Dec/14  Updated: 15/Jul/15  Resolved: 08/Jan/15

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.7.0, Lustre 2.5.4
Fix Version/s: Lustre 2.7.0, Lustre 2.5.4

Type: Bug Priority: Minor
Reporter: Li Wei (Inactive) Assignee: Li Wei (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-6073 lustre/tests/*.c should use sys/xattr... Resolved
is related to LU-6184 Interop 2.6.0<->2.7 sanity test_102q:... Resolved
Severity: 3
Rank (Obsolete): 16803

 Description   

Current b2_5 and master have the following issues with EAs:

  • Setting a new EA with an empty value, which is permitted according to attr(5), succeeds without actually storing the EA to the OSD. A subsequent getxattr() call will return ENODATA.
  • Calling fgetxattr() on an orphan file may get ENOENT, if it causes an EA cache refill.


 Comments   
Comment by Li Wei (Inactive) [ 15/Dec/14 ]

master

http://review.whamcloud.com/12880
http://review.whamcloud.com/12884
http://review.whamcloud.com/12900

b2_5

http://review.whamcloud.com/12944
http://review.whamcloud.com/12945
http://review.whamcloud.com/12946

Comment by Gerrit Updater [ 26/Dec/14 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12880/
Subject: LU-6027 osd-zfs: Preserve lu_buf when listing EAs
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 75f0f0675d0eadc634c098d664b7af78547999c9

Comment by Gerrit Updater [ 26/Dec/14 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12884/
Subject: LU-6027 mdd: Don't list "trusted.link" for orphans
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 4991f179f6794d9d64d69fbb39338e738522881a

Comment by Blake Caldwell [ 29/Dec/14 ]

The tests for this issue require attr/xattr.h, part of libattr-dev. Should they simply be added to the dependencies for the default build (with tests enabled)? Here is a proposed change for autoconf to return an error if attr/xattr.h is not present.

diff --git a/config/lustre-build.m4 b/config/lustre-build.m4
index da197ba..5fc614e 100644
--- a/config/lustre-build.m4
+++ b/config/lustre-build.m4
@@ -267,6 +267,13 @@ AC_ARG_ENABLE([tests],
                [disable building of Lustre tests]),
        [], [enable_tests="yes"])
 AC_MSG_RESULT([$enable_tests])
+AS_IF([test "x$enable_tests" = xyes],[
+       AC_CHECK_HEADER([attr/xattr.h],[],[
+       AC_MSG_ERROR([\
+lattr is needed for tests, install libattr-devel (RHEL) or \
+libattr1-dev (Debian)])
+])
+])
 ]) # LB_CONFIG_TESTS
 
 #

Also libattr-dev should be added to lustre.spec.in and libattr-dev1 to debian/control{,.main}. There's really no option besides installing libattr1-dev for Ubuntu, since --disable-tests isn't properly implemented in debian/rules.

Comment by James A Simmons [ 29/Dec/14 ]

Does <sys/xattr.h> alone work for these test or is libattr required.. A patch was created for xattr.h issues at LU-6027.

Comment by Blake Caldwell [ 30/Dec/14 ]

Yes, patch http://review.whamcloud.com/13197 fixes the issue.

Comment by Jodi Levi (Inactive) [ 08/Jan/15 ]

Patch landed to Master.

Comment by Gerrit Updater [ 19/Jan/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12900/
Subject: LU-6027 mdt: Allow user EAs with empty values
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 165f65a7aa07d55d284d419cdaa04eed2d96ade3

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