From 75663826b1c1b1078541590244a898b5359bc00f Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Mon, 19 Apr 2021 10:34:02 +0800 Subject: [PATCH] mds: make the lost+found dir accessible from clients Inode number 0x4 is reserved for the lost+found dir, and the apps or recovery apps need to access it. At the same time the 0x3 is reserved for the global snaprealm, which will also be lookup by the clients when looking up the snaprealm inodes. Here will make all the inode less than 100 accessible by clients. Fixes: https://tracker.ceph.com/issues/50216 Signed-off-by: Xiubo Li (cherry picked from commit 841071b3602aa2b8bcca57b95cdf671d48036a34) Conflicts: src/mds/Server.cc - most of the master commit was already backported via c5362b8464bdafbea7556acdee9e877b71ed4f8d This backports just one small part that was missed in that commit. --- src/mds/Server.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 0583e3c28f83..9a245fa29cd7 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -3871,7 +3871,7 @@ void Server::handle_client_lookup_ino(MDRequestRef& mdr, * * [1] https://tracker.ceph.com/issues/49922 */ - if (_ino < MDS_INO_SYSTEM_BASE && _ino != CEPH_INO_ROOT) { + if (MDS_IS_PRIVATE_INO(_ino)) { respond_to_request(mdr, -ESTALE); return; } -- 2.47.3