From 53dfb74d421c360e8870417af359562f08c88cbb Mon Sep 17 00:00:00 2001 From: Gui Hecheng Date: Thu, 29 Jun 2017 14:39:55 +0800 Subject: [PATCH] rgw_file: skip object policy read for ListBucket operations We don't need to read read object policy for a ListBucket operation (RGWReaddir, RGWRMdirCheck, RGWStatLeaf). Also, there are "virtual" directories that do not have a corresponding object, read object policy on them results in ENOENT for RGWStatLeaf. Signed-off-by: Gui Hecheng --- src/rgw/rgw_file.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rgw/rgw_file.h b/src/rgw/rgw_file.h index b93b5928409..01c883865e7 100644 --- a/src/rgw/rgw_file.h +++ b/src/rgw/rgw_file.h @@ -1313,7 +1313,7 @@ public: op = this; } - bool only_bucket() override { return false; } + bool only_bucket() override { return true; } int op_init() override { // assign store, s, and dialect_handler @@ -1476,7 +1476,7 @@ public: op = this; } - bool only_bucket() override { return false; } + bool only_bucket() override { return true; } int op_init() override { // assign store, s, and dialect_handler @@ -2092,7 +2092,7 @@ public: op = this; } - bool only_bucket() override { return false; } + bool only_bucket() override { return true; } int op_init() override { // assign store, s, and dialect_handler -- 2.47.3