Re: [PATCH v2] fat: editions to support fat_fallocate()

From: OGAWA Hirofumi
Date: Sun Oct 14 2012 - 12:20:11 EST


Namjae Jeon <linkinjeon@xxxxxxxxx> writes:

> Implement preallocation via the fallocate syscall on VFAT partitions.
> This patch is based on an earlier patch of the same name which had some
> issues detailed below and did not get accepted. Refer
> https://lkml.org/lkml/2007/12/22/130.
>
> a)The preallocated space was not persistent across remounts when the
> FALLOC_FL_KEEP_SIZE flag was set. Also, writes to the file allocated new
> clusters instead of using the preallocated area.
>
> Consider the scenario:
> mount-->preallocate space for a file --> unmount.
> In the old patch,the preallocated space was not reflected for that
> file (verified using the 'du' command).
>
> This is now fixed with modifications to fat_fill_inode().

What is real usage pattern of persistent across remounts on FAT? If once
device was unmounted, we can't know the state of FS anymore, there are
many implementations of FAT. And preallocation is not in the spec.

I worry to break something. And I guess the freeing preallocation on
last close may fix the issue for usage.
--
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/