diff options
author | Yan, Zheng <zyan@redhat.com> | 2017-07-11 09:56:09 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2017-09-06 19:56:03 +0200 |
commit | aa187926b739fb391f153335c7552c7a10d60e82 (patch) | |
tree | 0954de9620a7afe747bdbf3fcca503f11afd630c /fs/ceph/addr.c | |
parent | ceph: remove unused cap_release_safety mount option (diff) | |
download | linux-aa187926b739fb391f153335c7552c7a10d60e82.tar.xz linux-aa187926b739fb391f153335c7552c7a10d60e82.zip |
ceph: limit osd read size to CEPH_MSG_MAX_DATA_LEN
libceph returns -EIO when read size > CEPH_MSG_MAX_DATA_LEN.
Link: http://tracker.ceph.com/issues/20528
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 | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 1bc709fe330a..63ca1732570b 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -455,13 +455,9 @@ static int ceph_readpages(struct file *file, struct address_space *mapping, if (rc == 0) goto out; - if (fsc->mount_options->rsize >= PAGE_SIZE) - max = (fsc->mount_options->rsize + PAGE_SIZE - 1) - >> PAGE_SHIFT; - - dout("readpages %p file %p nr_pages %d max %d\n", inode, - file, nr_pages, - max); + max = fsc->mount_options->rsize >> PAGE_SHIFT; + dout("readpages %p file %p nr_pages %d max %d\n", + inode, file, nr_pages, max); while (!list_empty(page_list)) { rc = start_read(inode, page_list, max); if (rc < 0) |