]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: mimic gconf changes
authorAbhishek Lekshmanan <abhishek@suse.com>
Mon, 10 Dec 2018 23:30:46 +0000 (00:30 +0100)
committerAbhishek Lekshmanan <abhishek@suse.com>
Thu, 10 Jan 2019 18:21:59 +0000 (19:21 +0100)
As the largeish change from master g_conf() isn't in mimic yet, use the g_conf
global structure, also make rgw_op use the value from req_info ceph context as
we do for all the requests

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit 01d647310ec2d7d423df1196eb2a7aef685d832e)

src/rgw/rgw_op.cc
src/rgw/rgw_rest.cc

index be78b75c7828567e788b813b210482fe98c8a99b..730de87fa31efc40f2b7107667d7d7316fbe9f14 100644 (file)
@@ -2284,7 +2284,7 @@ int RGWListBucket::parse_max_keys()
   // Some S3 clients explicitly send max-keys=0 to detect if the bucket is
   // empty without listing any items.
   return parse_value_and_bound(max_keys, max, 0,
-                       g_conf().get_val<uint64_t>("rgw_max_listing_results"),
+                       s->cct->_conf->get_val<uint64_t>("rgw_max_listing_results"),
                        default_max);
 }
 
index 841dc2b5827c4a83036987a685f57b397a77fe1c..67de9bb9b068cb7ecb3cced61e43615bb99ead25 100644 (file)
@@ -1660,8 +1660,8 @@ int RGWListMultipart_ObjStore::get_params()
   
   string str = s->info.args.get("max-parts");
   op_ret = parse_value_and_bound(str, max_parts, 0,
-                       g_conf().get_val<uint64_t>("rgw_max_listing_results"),
-                       max_parts);
+                                 g_conf->get_val<uint64_t>("rgw_max_listing_results"),
+                                 max_parts);
 
   return op_ret;
 }
@@ -1672,7 +1672,7 @@ int RGWListBucketMultiparts_ObjStore::get_params()
   prefix = s->info.args.get("prefix");
   string str = s->info.args.get("max-uploads");
   op_ret = parse_value_and_bound(str, max_uploads, 0,
-                       g_conf().get_val<uint64_t>("rgw_max_listing_results"),
+                       g_conf->get_val<uint64_t>("rgw_max_listing_results"),
                        default_max);
   if (op_ret < 0) {
     return op_ret;