Skip to content
Snippets Groups Projects
Commit 55b0b31c authored by Yan, Zheng's avatar Yan, Zheng Committed by Ilya Dryomov
Browse files

ceph: get inode size for each append write


Signed-off-by: default avatarYan, Zheng <zyan@redhat.com>
parent d15f9d69
No related branches found
No related tags found
No related merge requests found
...@@ -952,6 +952,12 @@ static ssize_t ceph_write_iter(struct kiocb *iocb, struct iov_iter *from) ...@@ -952,6 +952,12 @@ static ssize_t ceph_write_iter(struct kiocb *iocb, struct iov_iter *from)
/* We can write back this queue in page reclaim */ /* We can write back this queue in page reclaim */
current->backing_dev_info = inode_to_bdi(inode); current->backing_dev_info = inode_to_bdi(inode);
if (iocb->ki_flags & IOCB_APPEND) {
err = ceph_do_getattr(inode, CEPH_STAT_CAP_SIZE, false);
if (err < 0)
goto out;
}
err = generic_write_checks(iocb, from); err = generic_write_checks(iocb, from);
if (err <= 0) if (err <= 0)
goto out; goto out;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment