summaryrefslogtreecommitdiffstats
path: root/fs/ceph/addr.c
diff options
context:
space:
mode:
authorYanhu Cao <gmayyyha@gmail.com>2017-07-21 17:20:10 +0800
committerIlya Dryomov <idryomov@gmail.com>2017-09-06 19:56:43 +0200
commit3fb99d483e614bc3834784c7a686572c7970bb92 (patch)
tree3af3534e44d405434087abf096d73b227e2adba2 /fs/ceph/addr.c
parent37f13252579389a659ae3ceec8c60f15bdf70f0c (diff)
downloadlinux-stable-3fb99d483e614bc3834784c7a686572c7970bb92.tar.gz
linux-stable-3fb99d483e614bc3834784c7a686572c7970bb92.tar.bz2
linux-stable-3fb99d483e614bc3834784c7a686572c7970bb92.zip
ceph: nuke startsync op
startsync is a no-op, has been for years. Remove it. Link: http://tracker.ceph.com/issues/20604 Signed-off-by: Yanhu Cao <gmayyyha@gmail.com> Reviewed-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/addr.c')
-rw-r--r--fs/ceph/addr.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 149b10063be8..825931516623 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -752,21 +752,11 @@ static int ceph_writepages_start(struct address_space *mapping,
int rc = 0;
unsigned int wsize = i_blocksize(inode);
struct ceph_osd_request *req = NULL;
- int do_sync = 0;
loff_t snap_size, i_size;
u64 truncate_size;
u32 truncate_seq;
- /*
- * Include a 'sync' in the OSD request if this is a data
- * integrity write (e.g., O_SYNC write or fsync()), or if our
- * cap is being revoked.
- */
- if ((wbc->sync_mode == WB_SYNC_ALL) ||
- ceph_caps_revoking(ci, CEPH_CAP_FILE_BUFFER))
- do_sync = 1;
- dout("writepages_start %p dosync=%d (mode=%s)\n",
- inode, do_sync,
+ dout("writepages_start %p (mode=%s)\n", inode,
wbc->sync_mode == WB_SYNC_NONE ? "NONE" :
(wbc->sync_mode == WB_SYNC_ALL ? "ALL" : "HOLD"));
@@ -936,7 +926,7 @@ get_more_pages:
break;
}
- num_ops = 1 + do_sync;
+ num_ops = 1;
strip_unit_end = page->index +
((len - 1) >> PAGE_SHIFT);
@@ -1042,7 +1032,7 @@ new_request:
for (i = 0; i < locked_pages; i++) {
u64 cur_offset = page_offset(pages[i]);
if (offset + len != cur_offset) {
- if (op_idx + do_sync + 1 == req->r_num_ops)
+ if (op_idx + 1 == req->r_num_ops)
break;
osd_req_op_extent_dup_last(req, op_idx,
cur_offset - offset);
@@ -1079,17 +1069,12 @@ new_request:
0, !!pool, false);
osd_req_op_extent_update(req, op_idx, len);
- if (do_sync) {
- op_idx++;
- osd_req_op_init(req, op_idx, CEPH_OSD_OP_STARTSYNC, 0);
- }
BUG_ON(op_idx + 1 != req->r_num_ops);
pool = NULL;
if (i < locked_pages) {
BUG_ON(num_ops <= req->r_num_ops);
num_ops -= req->r_num_ops;
- num_ops += do_sync;
locked_pages -= i;
/* allocate new pages array for next request */