From e5eec257c4daf9e2f538f13c7f7ff121acbc0195 Mon Sep 17 00:00:00 2001 From: "John L. Hammond" Date: Thu, 27 Apr 2017 11:12:37 -0500 Subject: [PATCH] LU-9385 mdt: remove XATTR locking from mdt_add_dirty_flag() Clients use the MDS_HSM_STATE_{GET,SET} RPCs to get and set the HSM state of a file rather than accessing the HSM xattr directly. So remove the use of MDS_INODELOCK_XATTR around the setting of HSM attributes in mdt_add_dirty_flag(). Signed-off-by: John L. Hammond Change-Id: I4374671ac5d4828480060de56c95ff7e1601fe59 Reviewed-on: https://review.whamcloud.com/26870 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Henri Doreau Reviewed-by: Quentin Bouget Reviewed-by: Oleg Drokin --- lustre/mdt/mdt_reint.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lustre/mdt/mdt_reint.c b/lustre/mdt/mdt_reint.c index 32158e7..2c7297e 100644 --- a/lustre/mdt/mdt_reint.c +++ b/lustre/mdt/mdt_reint.c @@ -692,20 +692,12 @@ int mdt_add_dirty_flag(struct mdt_thread_info *info, struct mdt_object *mo, /* If an up2date copy exists in the backend, add dirty flag */ if ((ma->ma_valid & MA_HSM) && (ma->ma_hsm.mh_flags & HS_EXISTS) && !(ma->ma_hsm.mh_flags & (HS_DIRTY|HS_RELEASED))) { - struct mdt_lock_handle *lh = &info->mti_lh[MDT_LH_CHILD]; - ma->ma_hsm.mh_flags |= HS_DIRTY; - mdt_lock_reg_init(lh, LCK_PW); - rc = mdt_object_lock(info, mo, lh, MDS_INODELOCK_XATTR); - if (rc != 0) - RETURN(rc); - rc = mdt_hsm_attr_set(info, mo, &ma->ma_hsm); if (rc) CERROR("file attribute change error for "DFID": %d\n", PFID(mdt_object_fid(mo)), rc); - mdt_object_unlock(info, mo, lh, rc); } RETURN(rc); -- 1.8.3.1