]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_file: skip object policy read for ListBucket operations 16034/head
authorGui Hecheng <guihecheng@cmss.chinamobile.com>
Thu, 29 Jun 2017 06:39:55 +0000 (14:39 +0800)
committerGui Hecheng <guihecheng@cmss.chinamobile.com>
Thu, 29 Jun 2017 08:30:24 +0000 (16:30 +0800)
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 <guihecheng@cmss.chinamobile.com>
src/rgw/rgw_file.h

index b93b592840930771d518461fa5bff4c013b0c04e..01c883865e74d4e57470c7b836b92fd4830981be 100644 (file)
@@ -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