Re: o_sync in vfat driver

From: Andrew Morton
Date: Sun Feb 26 2006 - 19:49:03 EST


col-pepper@xxxxxxxxxxx wrote:
>
> There is nothing in the spec of vfat that suggests the FAT will be written
> 10.000 during the writing of one large file. Indeed it is hard to imagine
> that any other implementation on any other OS or any previous linux kernel
> behaves like that.

We sync the file metadata once per write() syscall. If your app writes a
large file in lots of little bits, it'll do a lot of syncs. Other
implementations of fatfs will (must) do the same thing.

> It would seem that the first step could be to revert to the 2.6.11
> behaviour which was more appropriate and probably safer even from the data
> point of view.

fatfs used to be buggy - it didn't implement `-o sync'. Now it does, and
what we're seeing is the fallout from the late fixing of that bug.

You're right - people need to understand what they're doing, make their own
decision, then remove the `-o sync' option. There aren't any easy
solutions.

-
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/