]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: track which map batch_op is in-use in MDRequest
authorYan, Zheng <zyan@redhat.com>
Fri, 27 Mar 2020 09:13:38 +0000 (17:13 +0800)
committerVicente Cheng <freeze.bilsted@gmail.com>
Mon, 7 Sep 2020 09:56:48 +0000 (09:56 +0000)
commit2331e566c059b4d8e67f66310bdd83385b60d442
tree8d93fc83a441252580cf89f2db2d1700c6590909
parent65d8836383deeacfc8343f8d6563548a4c44c835
mds: track which map batch_op is in-use in MDRequest

batch_op is in either CInode::batch_ops or CDentry::batch_ops. Current
code gets the map by dereferencing mdr->in[0] or mdr->dn[0].back().
The problem is that MDCache::path_traverse() may clear mdr->in[0] and
mdr->dn[0]. batch_op leaks when mds kills a request whose mdr->in[0] or
mdr->dn[0] were cleared.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 7768d2c07d66ac015b2e235d38b7ac3616c47c43)

Conflicts:
src/mds/Mutation.h
  - octopus does not use the specific ns, use the original one
src/mds/MDCache.cc
src/mds/Mutation.cc
src/mds/Mutation.h
src/mds/Server.cc
src/mds/Server.h