[LU-7091] refresh link after update linkea in mdd_migration_update_name() Created: 02/Sep/15  Updated: 28/Oct/15  Resolved: 03/Oct/15

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

Type: Bug Priority: Critical
Reporter: Di Wang Assignee: Di Wang
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-6831 The ticket for tracking all DNE2 bugs Reopened
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

In mdd_migrate_update_name()

        if (ldata->ld_buf != NULL) {
                rc = mdd_update_linkea(env, mdd_pobj, mdd_sobj, mdd_tobj,
                                       handle, lname, ldata);
                if (rc != 0)
                        GOTO(stop_trans, rc);
                          --------------> Since mdd_update_linkea might change the link of source file, we should re_get attr, otherwise the following DELETE lovEA might check with wrong nlink.  
        }

        if (S_ISREG(so_attr->la_mode)) {
                if (so_attr->la_nlink == 1) {
                        rc = mdo_xattr_del(env, mdd_sobj, XATTR_NAME_LOV,
                                           handle);
                        if (rc != 0 && rc != -ENODATA)
                                GOTO(stop_trans, rc);

                        rc = mdo_xattr_set(env, mdd_tobj, NULL,
                                           XATTR_NAME_FID,
                                           LU_XATTR_REPLACE, handle);
                        if (rc < 0)
                                GOTO(stop_trans, rc);
                }
        }



 Comments   
Comment by Gerrit Updater [ 04/Sep/15 ]

wangdi (di.wang@intel.com) uploaded a new patch: http://review.whamcloud.com/16236
Subject: LU-7091 mdd: refresh nlink after update linkea
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 8457cb8d651d20753f60f75ba141cc0b529ddede

Comment by Gerrit Updater [ 11/Sep/15 ]

wangdi (di.wang@intel.com) uploaded a new patch: http://review.whamcloud.com/16372
Subject: LU-7091 mdt: release cross-MDT lock immediately
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 9c01e688c14370c1080f3ef10c318592fd7a5d74

Comment by Gerrit Updater [ 02/Oct/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16372/
Subject: LU-7091 mdt: release cross-MDT lock immediately
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: d146596a15008ea137045a58da24263a28f327b9

Comment by Peter Jones [ 03/Oct/15 ]

Landed for 2.8

Comment by Gerrit Updater [ 28/Oct/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16236/
Subject: LU-7091 mdd: refresh nlink after update linkea
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 14ff7815a4658d3c626d5fbdb975659966b5aee4

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