]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fat: additions to support fat_fallocate
authorNamjae Jeon <namjae.jeon@samsung.com>
Thu, 9 May 2013 23:57:48 +0000 (09:57 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 21 May 2013 04:17:59 +0000 (14:17 +1000)
commit112dc05e1f47a7a8f77df04107ace8e49e7c8a05
treee9ad3814f19e13bd71b3afd518c388be3f54271f
parent0c66900e94ac81940b4d2200e6031fb5904b35fa
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