]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mds: acquire inode snaplock in open
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 18 Jul 2023 00:52:13 +0000 (20:52 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 18 Jul 2023 12:44:07 +0000 (08:44 -0400)
commitc04ab6f0868a7385e695c85486cf3e7bbdfa9ab5
tree333ed39e86a61385b45b40812dd4caccfb81acc5
parent82ddbb6cd1fbf3c9f827fcc4c5470c8412b813c0
mds: acquire inode snaplock in open

It doesn't make sense that

   open("file", O_CREAT|...)

will acquire a readlock on the file's snaplock when the file already
exists, but:

   open("file", ...)

will not.

Fixes: https://tracker.ceph.com/issues/62058
Fixes: c1d7f93d7bd06d773b8035359548c0c9216398e3
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/Server.cc