- drop the global
- do not memset!
- encode with features
- field names are different
- use get_period() method where appropriate
- fix is layout empty checks
@@ -1024,7+1024,7 @@ extern "C" int ceph_get_path_pool_name(struct ceph_mount_info *cmount, const cha
r = cmount->get_client()->describe_layout(path, &l);
if (r < 0)
return r;
- string name = cmount->get_client()->get_pool_name(l.fl_pg_pool);
+ string name = cmount->get_client()->get_pool_name(l.pool_id);
if (len == 0)
return name.length();
if (name.length() > len)
@@ -1035,7+1035,7 @@ extern "C" int ceph_get_path_pool_name(struct ceph_mount_info *cmount, const cha
extern "C" int ceph_get_file_layout(struct ceph_mount_info *cmount, int fh, int *stripe_unit, int *stripe_count, int *object_size, int *pg_pool)
{
- struct ceph_file_layout l;
+ file_layout_t l;
int r;
if (!cmount->is_mounted())
@@ -1044,19+1044,19 @@ extern "C" int ceph_get_file_layout(struct ceph_mount_info *cmount, int fh, int
if (r < 0)
return r;
if (stripe_unit)
- *stripe_unit = l.fl_stripe_unit;
+ *stripe_unit = l.stripe_unit;
if (stripe_count)
- *stripe_count = l.fl_stripe_count;
+ *stripe_count = l.stripe_count;
if (object_size)
- *object_size = l.fl_object_size;
+ *object_size = l.object_size;
if (pg_pool)
- *pg_pool = l.fl_pg_pool;
+ *pg_pool = l.pool_id;
return 0;
}
extern "C" int ceph_get_path_layout(struct ceph_mount_info *cmount, const char *path, int *stripe_unit, int *stripe_count, int *object_size, int *pg_pool)