]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fat: additions to support fat_fallocate
authorNamjae Jeon <namjae.jeon@samsung.com>
Thu, 18 Jul 2013 23:56:52 +0000 (09:56 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 18 Jul 2013 23:56:52 +0000 (09:56 +1000)
commita8a066148d1623a7a97eeba2033d30da763b29b3
tree0282bc2126941889d6bfa0e49aa64f382b5eccf7
parentee4f761a8a717cd261df099c52d03d59fd6470d7
fat: additions to support fat_fallocate

Implement preallocation via the fallocate syscall on VFAT partitions.

With FALLOC_FL_KEEP_SIZE, there is no way to distinguish if the mismatch
between i_size and no.  of clusters allocated is a consequence of
fallocate or just plain corruption.  When a non fallocate aware (old)
linux fat driver tries to write to such a file, it throws an error.Also,
fsck detects this as inconsistency and truncates the prealloc'd blocks.

To avoid this, as suggested by OGAWA, remove changes that make fallocate
persistent across mounts and restrict lifetime of blocks from fallocate(2)
to file release.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Ravishankar N <ravi.n1@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/fat/file.c
fs/fat/inode.c