lkml.org 
[lkml]   [2005]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: filesystem transactions API
    John Stoffel wrote:
    > >>>>> "Jamie" == Jamie Lokier <jamie@shareable.org> writes:
    >
    > Jamie> No. A transaction means that _all_ processes will see the
    > Jamie> whole transaction or not.
    >
    > This is really hard. How do you handle the case where process X
    > starts a transaction modifies files a, b & c, but process Y has file b
    > open for writing, and never lets it go? Or the file gets unlinked?

    Then it starts to depend on what kind of transactions you want to
    implement.

    You can say that a transaction isn't allowed when a process has one of
    the files opened for writing. Or you can say a transaction is
    equivalent to calling all of the I/O system calls at once. You can
    also decide if you want the reads and directory lookups performed in
    the transactions to become prerequisites for the transaction
    completing (so it's aborted if another process writes to those file
    regions or changes the directory structure in a way which breaks a
    prerequisite), or if you want those to lock the things which are read
    for the duration of the transaction, or even just ignore reads for
    transaction purposes. Or, you can say that transactions are limited
    to just directory structure, and not file contents (that's good enough
    for package management), or you can say they're limited to just file
    contents (that's good enough for databases and text file edits).

    Etc, etc, quite a lot of semantic choices.

    > What about programs that are already open and running?
    >
    > It might be doable in some sense, but I can see that details are
    > really hard to get right. Esp without breaking existing Unix
    > semantics.

    It's even harder without kernel support! :)

    -- Jamie
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-04-26 17:30    [W:4.062 / U:0.236 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site