summaryrefslogtreecommitdiffstats
path: root/fs/ceph/file.c
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2017-07-11 05:34:46 -0400
committerIlya Dryomov <idryomov@gmail.com>2017-09-06 13:56:41 -0400
commit95cca2b44e54b00a3ed6ed7dc869717cd6807e81 (patch)
tree944f555f63a1b9641f2598703a562777437b0456 /fs/ceph/file.c
parentaa187926b739fb391f153335c7552c7a10d60e82 (diff)
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/file.c')
-rw-r--r--fs/ceph/file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 85f0dba394a2..a39ff54cb372 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -887,7 +887,9 @@ ceph_direct_read_write(struct kiocb *iocb, struct iov_iter *iter,
887 break; 887 break;
888 } 888 }
889 889
890 if (!write) 890 if (write)
891 size = min_t(u64, size, fsc->mount_options->wsize);
892 else
891 size = min_t(u64, size, fsc->mount_options->rsize); 893 size = min_t(u64, size, fsc->mount_options->rsize);
892 894
893 len = size; 895 len = size;