Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188638
b: refs/heads/master
c: 33d4909
h: refs/heads/master
v: v3
  • Loading branch information
Sage Weil committed Dec 3, 2009
1 parent 14c40ed commit bf118b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1d1de9160e0d8aff0d67a21137b62e63ffd6f184
refs/heads/master: 33d4909ccc094b8262667bccdd52e01458bee0df
5 changes: 4 additions & 1 deletion trunk/fs/ceph/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ static long ceph_ioctl_get_layout(struct file *file, void __user *arg)
l.stripe_count = ceph_file_layout_stripe_count(ci->i_layout);
l.object_size = ceph_file_layout_object_size(ci->i_layout);
l.data_pool = le32_to_cpu(ci->i_layout.fl_pg_pool);
l.preferred_osd =
(s32)le32_to_cpu(ci->i_layout.fl_pg_preferred);
if (copy_to_user(arg, &l, sizeof(l)))
return -EFAULT;
}
Expand Down Expand Up @@ -79,7 +81,8 @@ static long ceph_ioctl_set_layout(struct file *file, void __user *arg)
req->r_args.setlayout.layout.fl_object_size =
cpu_to_le32(l.object_size);
req->r_args.setlayout.layout.fl_pg_pool = cpu_to_le32(l.data_pool);
req->r_args.setlayout.layout.fl_pg_preferred = cpu_to_le32((s32)-1);
req->r_args.setlayout.layout.fl_pg_preferred =
cpu_to_le32(l.preferred_osd);

err = ceph_mdsc_do_request(mdsc, parent_inode, req);
ceph_mdsc_put_request(req);
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/ceph/ioctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
struct ceph_ioctl_layout {
__u64 stripe_unit, stripe_count, object_size;
__u64 data_pool;
__s64 preferred_osd;
};

#define CEPH_IOC_GET_LAYOUT _IOR(CEPH_IOCTL_MAGIC, 1, \
Expand Down

0 comments on commit bf118b6

Please sign in to comment.