]> git.karo-electronics.de Git - karo-tx-linux.git/commit
fat: additions to support fat_fallocate
authorNamjae Jeon <namjae.jeon@samsung.com>
Wed, 19 Jun 2013 00:08:11 +0000 (10:08 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:27:36 +0000 (17:27 +1000)
commitf00c94c0f3c68192169045b4b0769e7f6ee30099
treef90cb4696eb1570a860aba57a8057b54838e0201
parent5fa0502bb521c5f35d84083f3fec60b152fe801b
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