]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: Handle the client requesting special stripe units, counts and object sizes.
authorGreg Farnum <gregf@hq.newdream.net>
Tue, 1 Sep 2009 23:50:59 +0000 (16:50 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Wed, 2 Sep 2009 22:50:30 +0000 (15:50 -0700)
src/include/ceph_fs.h
src/mds/Server.cc

index 93457463456556395844f025397e380f2490788d..0b545d80d576d421d5d365f09eba9c2fbcc14f8e 100644 (file)
@@ -528,6 +528,10 @@ union ceph_mds_request_args {
        struct {
                __le32 flags;
                __le32 mode;
+               __le32 stripe_unit;
+               __le32 stripe_count;
+               __le32 object_size;
+               __le32 file_replication;
        } __attribute__ ((packed)) open;
        struct {
                __le32 flags;
index 77becf9776105cce7570505ccca9cc723d1aaf69..fe1b59a56cc732026b55119b2ccfeddaa7bdbb6f 100644 (file)
@@ -2101,6 +2101,16 @@ void Server::handle_client_openc(MDRequest *mdr)
   }
   in->inode.rstat.rfiles = 1;
 
+  if (req->head.args.open.stripe_unit != 0xffffffff)
+    in->inode.layout.fl_stripe_unit = req->head.args.open.stripe_unit;
+  if (req->head.args.open.stripe_count != 0xffffffff)
+    in->inode.layout.fl_stripe_count = req->head.args.open.stripe_count;
+  if (req->head.args.open.object_size != 0xffffffff)
+    in->inode.layout.fl_object_size = req->head.args.open.object_size;
+  /*if(req->head.args->open.file_replication != 0xffffffff)
+    in->inode.layout.fl_pg_pool.set_size(req->head.args.open.file_replication);
+  */
+
   dn->first = in->first = follows+1;
   
   // prepare finisher