Skip to content

Commit

Permalink
ceph: get inode size for each append write
Browse files Browse the repository at this point in the history
Signed-off-by: Yan, Zheng <zyan@redhat.com>
  • Loading branch information
Yan, Zheng authored and Ilya Dryomov committed Sep 9, 2015
1 parent d15f9d6 commit 55b0b31
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fs/ceph/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
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);
if (err <= 0)
goto out;
Expand Down

0 comments on commit 55b0b31

Please sign in to comment.