fuse: Trust kernel i_size only
authorPavel Emelyanov <xemul@openvz.org>
Thu, 10 Oct 2013 13:10:46 +0000 (17:10 +0400)
committerMiklos Szeredi <mszeredi@suse.cz>
Wed, 2 Apr 2014 13:38:48 +0000 (15:38 +0200)
Make fuse think that when writeback is on the inode's i_size is always
up-to-date and not update it with the value received from the userspace.
This is done because the page cache code may update i_size without letting
the FS know.

This assumption implies fixing the previously introduced short-read helper --
when a short read occurs the 'hole' is filled with zeroes.

fuse_file_fallocate() is also fixed because now we should keep i_size up to
date, so it must be updated if FUSE_FALLOCATE request succeeded.

Signed-off-by: Maxim V. Patlasov <MPatlasov@parallels.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
fs/fuse/dir.c
fs/fuse/file.c
fs/fuse/inode.c

diff --cc fs/fuse/dir.c
Simple merge
diff --cc fs/fuse/file.c
Simple merge
diff --cc fs/fuse/inode.c
Simple merge