Whamcloud - gitweb
LU-14980 mdd: unlock object before changelog 28/44828/24
authorAlex Zhuravlev <bzzz@whamcloud.com>
Thu, 2 Sep 2021 18:24:04 +0000 (21:24 +0300)
committerOleg Drokin <green@whamcloud.com>
Mon, 13 Mar 2023 06:09:50 +0000 (06:09 +0000)
we can't hold the object (osd) lock over transaction start
due to the locking rules. and we don't need the object
to be locked as only the fid is used at that point.

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Iaeb4645bfc9271d21d3644398c4c83f8e9b7aa04
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/44828
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/mdd/mdd_object.c

index 24d9291..982c300 100644 (file)
@@ -3362,12 +3362,18 @@ find:
                }
        }
 
+       /* we can't hold object lock over transaction start
+        * and we don't actually need the object to be locked */
+       mdd_write_unlock(env, mdd_obj);
+
        /* FYI, only the bottom 32 bits of open_flags are recorded */
        mdd_changelog(env, type, open_flags, md_dev, mdd_object_fid(mdd_obj));
 
-       EXIT;
+       GOTO(unlocked, rc);
+
 out:
        mdd_write_unlock(env, mdd_obj);
+unlocked:
        return rc;
 }