Re: vfat BKL/lock_super regression in v2.6.26-rc3-g8f59342





On Tue, 19 Aug 2008, Linus Torvalds wrote:

But I don't know exactly what the timeout should be, though (although I
suspect that it should involve _ignoring_ non-data writes like the atime
updates, and trigger a timeout on data writes so that when you actually
write a file, you'll know that the sync will happen within five seconds of
you having finished the write or whatever).

.. and by "finished the write" I mean "closed the file", not "end of
write() system call". Ie it's one of those things where it really doesn't
mostly make much sense to try to give any kinds of flush guarantees until
the user has basically shown that he's all done with writing.

If you have something like removable media, and you actually remove it
while you have a "cp -R" in progress, it damn well won't matter whether we
were synchronous or not. But if you remove it after the "cp" has actually
finished, it's a lot more understandable if somebody expects it to be on
disk.

So one thing we could perhaps consider is to make FAT in particular
consider "sync" mounts to be about open/close consistency, not about
per-write-system-call consistency. So the "close()" wouldn't return until
the file is on disk, but we wouldn't force a synchronous rewrite the inode
or the file allocation table thousands of times just because the file was
big.

FAT really is kind of different. I suspect we could just change what
"sync" means for it. But it would probably be good to have a VFS-level
notion of open-close consistency. It is, after all, what NFS is already
supposed to give you, so there is precedence for that being a useful IO
serialization model.

Al, what do you think?

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



Relevant Pages

  • Re: [PATCH] ftrace: add an fsync tracer
    ... The syscall tracer will also have told you about that open. ... do_fsyncdoesn't catch all sync actions (although I suspect it ... And then there are things like sync and umount that do syncs too. ... generates barriers, not specifically fsync. ...
    (Linux-Kernel)
  • Re: replication.synchronize hangs
    ... The repl Sync should timeout. ... |> Sync will try over and over to re-sync for ~2 minutes, ... |> enterrupting the sync process. ...
    (microsoft.public.sqlserver.ce)
  • Re: WriteFile()
    ... You can setup a serial write timeout to have a sync WriteFile() call to ... However, if we are strickly thinking sync and all write timeouts are zero, ... Unless you prepare the device to behave in async or with timeout parameters, ... if possible for the specific device type, then yes, it is safe to assume a ...
    (microsoft.public.win32.programmer.kernel)
  • [PATCH 3/5] page allocator: Wait on both sync and async congestion after direct reclaim
    ... congestion changes were very far away from high-order atomic allocations. ... SYNC list is what was truely congested and with the revert processes were ... This patch aims to fix the congestion_waitbehaviour for SYNC and ASYNC ... and then the SYNC queue if the timeout has not been reached. ...
    (Linux-Kernel)
  • Against 2.6.31.4 [PATCH 5/5] Revert 373c0a7e, 8aa7e847: Fix congestion_wait() sync/async vs read/wri
    ... goto survive; ... -long congestion_wait(int sync, long timeout); ... A queue has just entered congestion. ... * @sync: SYNC or ASYNC IO ...
    (Linux-Kernel)