]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: remove preferred from ceph_file_layout
authorSage Weil <sage.weil@dreamhost.com>
Fri, 20 Apr 2012 04:51:26 +0000 (21:51 -0700)
committerSage Weil <sage@newdream.net>
Mon, 23 Apr 2012 21:48:02 +0000 (14:48 -0700)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/client/Client.cc
src/common/config.cc
src/include/ceph_fs.h
src/mds/Dumper.cc
src/mds/MDCache.cc
src/mds/Server.cc

index 2f11812d34d4e5b6eb56452b365ede262df4324c..243a7de16312c7c4b32dedf6baeb830d9dbf79f5 100644 (file)
@@ -6195,7 +6195,6 @@ int Client::_create(Inode *dir, const char *name, int flags, mode_t mode, Inode
   req->head.args.open.stripe_count = file_stripe_count;
   req->head.args.open.object_size = object_size;
   req->head.args.open.file_replication = file_replication;
-  req->head.args.open.preferred = -1;
   req->dentry_drop = CEPH_CAP_FILE_SHARED;
   req->dentry_unless = CEPH_CAP_FILE_EXCL;
 
index fe664254a77f1200cb74e31956d3831f9dab19f0..3c3b01893b2f5feabca91788f819b375a47aa623 100644 (file)
@@ -62,7 +62,7 @@ struct ceph_file_layout g_default_file_layout = {
  fl_object_size: init_le32(1<<22),
  fl_cas_hash: init_le32(0),
  fl_object_stripe_unit: init_le32(0),
- fl_pg_preferred : init_le32(-1),
+ fl_unused: init_le32(-1),
  fl_pg_pool : init_le32(-1),
 };
 
index 032f458f5e818a72bbdf6048cf9fbfd0ca6eac73..5eb6d5ea515f1af6c42c5394b00bb0273d3b4d2c 100644 (file)
@@ -48,7 +48,7 @@ struct ceph_file_layout {
        __le32 fl_object_stripe_unit;  /* UNUSED.  for per-object parity, if any */
 
        /* object -> pg layout */
-       __le32 fl_pg_preferred; /* preferred primary for pg (-1 for none) */
+       __le32 fl_unused;       /* unused; used to be preferred primary for pg (-1 for none) */
        __le32 fl_pg_pool;      /* namespace, crush ruleset, rep level */
 } __attribute__ ((packed));
 
@@ -382,7 +382,7 @@ union ceph_mds_request_args {
                __le32 stripe_count;         /* ... */
                __le32 object_size;
                __le32 file_replication;
-               __le32 preferred;
+               __le32 unused;               /* used to be preferred */
                __le64 old_size;             /* if O_TRUNC */
        } __attribute__ ((packed)) open;
        struct {
index d963c9d567c346795a8e6aea487333eaedb2c1b6..d68df50f0e34906aff1474d133cf4d1d8a5b50c3 100644 (file)
@@ -189,7 +189,6 @@ void Dumper::undump(const char *dump_file)
   h.magic = CEPH_FS_ONDISK_MAGIC;
 
   h.layout = g_default_file_layout;
-  h.layout.fl_pg_preferred = -1;
   h.layout.fl_pg_pool = pg_pool;
   
   bufferlist hbl;
index d6c1822cc310bd804b231b0ea2b55a336a90c9cb..143facaf7b1d4c17081ede4eef295c29824bbfe1 100644 (file)
@@ -264,11 +264,9 @@ void MDCache::remove_inode(CInode *o)
 void MDCache::init_layouts()
 {
   default_file_layout = g_default_file_layout;
-  default_file_layout.fl_pg_preferred = -1;
   default_file_layout.fl_pg_pool = mds->mdsmap->get_data_pg_pool();
 
   default_log_layout = g_default_file_layout;
-  default_log_layout.fl_pg_preferred = -1;
   default_log_layout.fl_pg_pool = mds->mdsmap->get_metadata_pg_pool();
 }
 
index 8c9d152040c11ca9b6944ea4182490ad1bf640a7..1e55e6b74615dd1d3605fae84a6ee2009f01dfdd 100644 (file)
@@ -2571,7 +2571,6 @@ void Server::handle_client_openc(MDRequest *mdr)
     layout.fl_stripe_count = req->head.args.open.stripe_count;
   if (req->head.args.open.object_size)
     layout.fl_object_size = req->head.args.open.object_size;
-  layout.fl_pg_preferred = req->head.args.open.preferred;
 
   if (!ceph_file_layout_is_valid(&layout)) {
     dout(10) << " invalid initial file layout" << dendl;
@@ -3237,8 +3236,6 @@ void Server::handle_client_setlayout(MDRequest *mdr)
     layout.fl_cas_hash = req->head.args.setlayout.layout.fl_cas_hash;
   if (req->head.args.setlayout.layout.fl_object_stripe_unit > 0)
     layout.fl_object_stripe_unit = req->head.args.setlayout.layout.fl_object_stripe_unit;
-  if (req->head.args.setlayout.layout.fl_pg_preferred != (__le32)-1)
-    layout.fl_pg_preferred = req->head.args.setlayout.layout.fl_pg_preferred;
   if (req->head.args.setlayout.layout.fl_pg_pool > 0)
     layout.fl_pg_pool = req->head.args.setlayout.layout.fl_pg_pool;
   if (!ceph_file_layout_is_valid(&layout)) {
@@ -3309,8 +3306,6 @@ void Server::handle_client_setdirlayout(MDRequest *mdr)
     layout->layout.fl_cas_hash = req->head.args.setlayout.layout.fl_cas_hash;
   if (req->head.args.setlayout.layout.fl_object_stripe_unit > 0)
     layout->layout.fl_object_stripe_unit = req->head.args.setlayout.layout.fl_object_stripe_unit;
-  if (req->head.args.setlayout.layout.fl_pg_preferred != (__le32)-1)
-    layout->layout.fl_pg_preferred = req->head.args.setlayout.layout.fl_pg_preferred;
   if (req->head.args.setlayout.layout.fl_pg_pool > 0)
     layout->layout.fl_pg_pool = req->head.args.setlayout.layout.fl_pg_pool;
   if (!ceph_file_layout_is_valid(&layout->layout)) {