diff options
author | Yan, Zheng <zyan@redhat.com> | 2017-07-11 11:34:46 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2017-09-06 19:56:41 +0200 |
commit | 95cca2b44e54b00a3ed6ed7dc869717cd6807e81 (patch) | |
tree | 944f555f63a1b9641f2598703a562777437b0456 /fs/ceph/addr.c | |
parent | ceph: limit osd read size to CEPH_MSG_MAX_DATA_LEN (diff) | |
download | linux-95cca2b44e54b00a3ed6ed7dc869717cd6807e81.tar.xz linux-95cca2b44e54b00a3ed6ed7dc869717cd6807e81.zip |
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); |