diff options
author | Yan, Zheng <zyan@redhat.com> | 2015-09-06 23:35:01 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2015-09-09 02:52:29 -0400 |
commit | 55b0b31cbc09f80db384671e22cdc94b2aa26b29 (patch) | |
tree | 1b15fd898205a978902a9637ce84c57e1e931636 | |
parent | d15f9d694b77fe5e4ea12b3031ecaa13b5aa2b10 (diff) |
ceph: get inode size for each append write
Signed-off-by: Yan, Zheng <zyan@redhat.com>
-rw-r--r-- | fs/ceph/file.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 90ec110b8400..0c62868b5c56 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c | |||
@@ -952,6 +952,12 @@ static ssize_t ceph_write_iter(struct kiocb *iocb, struct iov_iter *from) | |||
952 | /* We can write back this queue in page reclaim */ | 952 | /* We can write back this queue in page reclaim */ |
953 | current->backing_dev_info = inode_to_bdi(inode); | 953 | current->backing_dev_info = inode_to_bdi(inode); |
954 | 954 | ||
955 | if (iocb->ki_flags & IOCB_APPEND) { | ||
956 | err = ceph_do_getattr(inode, CEPH_STAT_CAP_SIZE, false); | ||
957 | if (err < 0) | ||
958 | goto out; | ||
959 | } | ||
960 | |||
955 | err = generic_write_checks(iocb, from); | 961 | err = generic_write_checks(iocb, from); |
956 | if (err <= 0) | 962 | if (err <= 0) |
957 | goto out; | 963 | goto out; |