summaryrefslogtreecommitdiff
path: root/fs/ceph/addr.c
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2017-07-11 17:34:46 +0800
committerIlya Dryomov <idryomov@gmail.com>2017-09-06 19:56:41 +0200
commit95cca2b44e54b00a3ed6ed7dc869717cd6807e81 (patch)
tree944f555f63a1b9641f2598703a562777437b0456 /fs/ceph/addr.c
parentaa187926b739fb391f153335c7552c7a10d60e82 (diff)
downloadlinux-95cca2b44e54b00a3ed6ed7dc869717cd6807e81.tar.gz
ceph: limit osd write size
OSD has a configurable limitation of max write size. OSD return error if write request size is larger than the limitation. For now, set max write size to CEPH_MSG_MAX_DATA_LEN. It should be small enough. Signed-off-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.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 63ca1732570b..149b10063be8 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -779,10 +779,8 @@ static int ceph_writepages_start(struct address_space *mapping,
mapping_set_error(mapping, -EIO);
return -EIO; /* we're in a forced umount, don't write! */
}
- if (fsc->mount_options->wsize && fsc->mount_options->wsize < wsize)
+ if (fsc->mount_options->wsize < wsize)
wsize = fsc->mount_options->wsize;
- if (wsize < PAGE_SIZE)
- wsize = PAGE_SIZE;
max_pages_ever = wsize >> PAGE_SHIFT;
pagevec_init(&pvec, 0);