From: Greg Farnum Date: Tue, 1 Sep 2009 23:50:59 +0000 (-0700) Subject: mds: Handle the client requesting special stripe units, counts and object sizes. X-Git-Tag: v0.14~52^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0e812e6e4146a851179962c0a64d3b2f7212d6be;p=ceph.git mds: Handle the client requesting special stripe units, counts and object sizes. --- diff --git a/src/include/ceph_fs.h b/src/include/ceph_fs.h index 93457463456..0b545d80d57 100644 --- a/src/include/ceph_fs.h +++ b/src/include/ceph_fs.h @@ -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; diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 77becf97761..fe1b59a56cc 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -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