[LU-5016] clean up use of la_attr for non-attribute flags Created: 06/May/14  Updated: 26/Feb/15  Resolved: 08/May/14

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

Type: Bug Priority: Minor
Reporter: Andreas Dilger Assignee: WC Triage
Resolution: Fixed Votes: 0
Labels: dne2

Issue Links:
Related
is related to LU-4690 sanity test_4: Expect error removing ... Resolved
is related to LU-5017 "lfs mv" loses file attributes during... Resolved
Severity: 3
Rank (Obsolete): 13883

 Description   

It seems that lu_attr->la_flags is being mis-used in the OSP and OUT code to pass the "directory in use" state from OUT to OSP:

static int out_attr_get(struct tgt_session_info *tsi)
{
        /*      
         * If it is a directory, we will also check whether the
         * directory is empty.
         * la_flags = 0 : Empty.
         *          = 1 : Not empty.
         */     
        la->la_flags = 0;
        if (S_ISDIR(la->la_mode)) {
                :
                :
                if (result == 0)
                        la->la_flags = 1;

However, this breaks the ability to return the actual attributes from a remote directory (e.g. LUSTRE_IMMUTABLE_FL, LUSTRE_APPEND_FL, LUSTRE_NOATIME_FL, LUSTRE_DIRSYNC_FL, etc) that are returned in la_flags from osd_attr_get() using the OUT interface.



 Comments   
Comment by Alex Zhuravlev [ 06/May/14 ]

AFAIU, Di has developed index iteration which should replace this special flag (and solve yet another issue where that flag isn't protected with LDLM).

Comment by Di Wang [ 06/May/14 ]

yes, this should be removed after 9511 is landed, I will post a patch.

Comment by Di Wang [ 08/May/14 ]

the patch(9511) has been landed to master

Comment by Andreas Dilger [ 26/Feb/15 ]

This issue was fixed under LU-4690 patch http://review.whamcloud.com/9511

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