diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2016-04-28 16:07:24 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-05-26 00:36:28 +0200 |
commit | fe5da05e979830b43b115d8a18ead521d507c783 (patch) | |
tree | 6afb8cacfd090d9d3b46a0a9976930957bb2e6cf /fs/ceph/addr.c | |
parent | libceph: drop msg argument from ceph_osdc_callback_t (diff) | |
download | linux-fe5da05e979830b43b115d8a18ead521d507c783.tar.xz linux-fe5da05e979830b43b115d8a18ead521d507c783.zip |
libceph: redo callbacks and factor out MOSDOpReply decoding
If you specify ACK | ONDISK and set ->r_unsafe_callback, both
->r_callback and ->r_unsafe_callback(true) are called on ack. This is
very confusing. Redo this so that only one of them is called:
->r_unsafe_callback(true), on ack
->r_unsafe_callback(false), on commit
or
->r_callback, on ack|commit
Decode everything in decode_MOSDOpReply() to reduce clutter.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/addr.c')
-rw-r--r-- | fs/ceph/addr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index a11756a39471..f47418477629 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -1765,8 +1765,7 @@ static int __ceph_pool_perm_get(struct ceph_inode_info *ci, u32 pool) goto out_unlock; } - wr_req->r_flags = CEPH_OSD_FLAG_WRITE | - CEPH_OSD_FLAG_ACK | CEPH_OSD_FLAG_ONDISK; + wr_req->r_flags = CEPH_OSD_FLAG_WRITE | CEPH_OSD_FLAG_ACK; osd_req_op_init(wr_req, 0, CEPH_OSD_OP_CREATE, CEPH_OSD_OP_FLAG_EXCL); ceph_oloc_copy(&wr_req->r_base_oloc, &rd_req->r_base_oloc); ceph_oid_copy(&wr_req->r_base_oid, &rd_req->r_base_oid); |