diff options
author | Yan, Zheng <zyan@redhat.com> | 2017-07-11 12:34:46 +0300 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2017-09-06 20:56:41 +0300 |
commit | 95cca2b44e54b00a3ed6ed7dc869717cd6807e81 (patch) | |
tree | 944f555f63a1b9641f2598703a562777437b0456 /fs/ceph/addr.c | |
parent | aa187926b739fb391f153335c7552c7a10d60e82 (diff) | |
download | linux-95cca2b44e54b00a3ed6ed7dc869717cd6807e81.tar.xz |
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.c | 4 |
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); |