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;
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),
};
__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));
__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 {
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;
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();
}
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;
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)) {
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)) {