ceph: register MDS request with dir inode from the start
authorJeff Layton <jlayton@kernel.org>
Thu, 4 Apr 2019 12:05:38 +0000 (08:05 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 30 Mar 2020 10:42:39 +0000 (12:42 +0200)
commit3db0a2fc5668c6dc60218e0f55d2443bcd726aa0
treed36fa7875cb10b3884ad68aaff43f68b0fc95f06
parent7111951b8d4973bda27ff663f2cf18b663d15b48
ceph: register MDS request with dir inode from the start

When the unsafe reply to a request comes in, the request is put on the
r_unsafe_dir inode's list. In future patches, we're going to need to
wait on requests that may not have gotten an unsafe reply yet.

Change __register_request to put the entry on the dir inode's list when
the pointer is set in the request, and don't check the
CEPH_MDS_R_GOT_UNSAFE flag when unregistering it.

The only place that uses this list today is fsync codepath, and with
the coming changes, we'll want to wait on all operations whether it has
gotten an unsafe reply or not.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c