Re: precise characterization of ext3 atomicity

From: Andreas Dilger (adilger_at_clusterfs.com)
Date: 09/04/03

  • Next message: Alan Cox: "RE: [UPDATED PATCH] EFI support for ia32 kernels"
    Date:	Thu, 4 Sep 2003 13:28:04 -0600
    To: Hans Reiser <reiser@namesys.com>
    
    

    On Sep 04, 2003 22:37 +0400, Hans Reiser wrote:
    > Mike Fedyk wrote:
    > >And how does reiser4 do this [export atomic ops to userspace]
    > >without changing the userspace apps?
    >
    > We don't. We just make the hovercraft, we don't force you to go over
    > the water.....

    It is possible to do the same with ext3, namely exporting journal_start()
    and journal_stop() (or some interface to them) to userspace so the application
    can start a transaction for multiple operations. We had discussed this in
    the past, but decided not to do so because user applications can screw up in
    so many ways, and if an application uses these interfaces it is possible to
    deadlock the entire filesystem if the application isn't well behaved.

    If the app doesn't eventually say "end the transaction", the filesystem might
    wait indefinitely. You could start adding more plumbing like "if the file
    is closed (maybe because the process crashed), cancel the transaction",
    and "if the process doesn't complete the transaction in time, cancel the
    transaction", etc. How do you guarantee in advance that the application
    will be able to complete all of the operations it needs (i.e. if it runs
    out of space in the filesystem or something)?

    I suppose at worst, the application doesn't get its multi-op atomicity
    guarantee, but I'm guessing that apps which use this interface depend on
    it working properly or they wouldn't be using it.

    Cheers, Andreas

    --
    Andreas Dilger
    http://sourceforge.net/projects/ext2resize/
    http://www-mddsp.enel.ucalgary.ca/People/adilger/
    -
    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/
    

  • Next message: Alan Cox: "RE: [UPDATED PATCH] EFI support for ia32 kernels"

    Relevant Pages

    • Re: eternal lock?
      ... Restarting the apps doesn't solve the problem, ... To wit, if a query times out, and there is a transaction in progress, ... query batch, or started within the query batch that timed out. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
      (comp.databases.ms-sqlserver)
    • Re: SQLEXEC(liHandle, "BEGIN TRANSACTION") makes my apps hang.
      ... BEGIN TRANSACTION should never block. ... should tell you if the app connection is blocked behind some other ... the apps would go hang. ... > tried to trace the SQL Server, but the log entry is like French to me. ...
      (microsoft.public.fox.programmer.exchange)
    • SQLEXEC(liHandle, "BEGIN TRANSACTION") makes my apps hang.
      ... the apps would go hang. ... TRANSACTION") before all the deletion began. ... TRANSACTION command, ... Anybody care to give an insight-behind-the-scene story? ...
      (microsoft.public.fox.programmer.exchange)