How re-entrant is libext2fs?

Tom Scholl
  • Tom Scholl

    Tom Scholl - 2007-03-15

    Hi ext2 people!
    I'm making a steganographic filesystem, as well as a fuse ext2 fs (
    The stego fs is (hopefully) going to have several "layers" of filesystems, each with their own thread...

    I'm already using locks so that only one thread will be making libext2fs calls at once per ext2_filsys object.
    However, as I plan to be accessing several filesystems at once, I'd like to know whether I can interrupt one libext2fs call on ext2_filsys object A and make a call on ext2_filsys object B from a different thread...
    Preferably without buggering things up ;)

    Cheers for any light you can shed on this one,

    • Theodore Ts'o

      Theodore Ts'o - 2008-01-02

      As long as each thread uses a separate ext2_filsys object, you should be fine.   There might be some race conditions if two threads simultaneously try to open a filesystem via test_io or inode_io, but if you're using the standard unix_io module, you'll be perfectly safe.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks