Skip to content

Commit 55b0b31

Browse files
ukernelidryomov
authored andcommitted
ceph: get inode size for each append write
Signed-off-by: Yan, Zheng <zyan@redhat.com>
1 parent d15f9d6 commit 55b0b31

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

fs/ceph/file.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,12 @@ static ssize_t ceph_write_iter(struct kiocb *iocb, struct iov_iter *from)
952952
/* We can write back this queue in page reclaim */
953953
current->backing_dev_info = inode_to_bdi(inode);
954954

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+
955961
err = generic_write_checks(iocb, from);
956962
if (err <= 0)
957963
goto out;

0 commit comments

Comments
 (0)