Whamcloud - gitweb
libext2fs: add threading support to the I/O manager abstraction
authorTheodore Ts'o <tytso@mit.edu>
Thu, 14 Jan 2021 00:27:20 +0000 (16:27 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 21 Jan 2021 15:50:40 +0000 (10:50 -0500)
commitf20627cc639ab656e3709d08514121c740a57db7
tree4513f8e2baeef75b5985b910ae07d21ec8873a85
parentbdcd5f22203fcb5347082ad555a711dbbb2541da
libext2fs: add threading support to the I/O manager abstraction

Add initial implementation support for the unix_io manager.
Applications which want to use threading should pass in
IO_FLAG_THREADS when opening the channel.  Channels which support
threading (which as of this commit is unix_io and test_io if the
backing io_manager supports threading) will set the
CHANNEL_FLAGS_THREADS bit in io->flags.  Library code or applications
can test if threading is enabled by checking this flag.

Applications using libext2fs can pass in EXT2_FLAG_THREADS to
ext2fs_open() or ext2fs_open2() to request threading support.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/ext2_io.h
lib/ext2fs/ext2fs.h
lib/ext2fs/openfs.c
lib/ext2fs/test_io.c
lib/ext2fs/undo_io.c
lib/ext2fs/unix_io.c