Whamcloud - gitweb
libext2fs: factor out I/O buffer allocation
authorTheodore Ts'o <tytso@mit.edu>
Mon, 7 May 2012 18:41:49 +0000 (14:41 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 7 May 2012 18:41:49 +0000 (14:41 -0400)
commitfd1c5a0622a9578b86f695d2f60df7d4f8b21875
treea10fcc8c682038a203e59c511fe09752e9284dad
parent07d120848d143c40feb55be31f0f0bb1ad1ec6f9
libext2fs: factor out I/O buffer allocation

Create a new function, io_channel_alloc_buf() which allocates I/O
buffers with appropriate alignment if we are using direct I/O.  The
original code was sometimes using a larger alignment factor than
necessary, and would always request an aligned memory buffer even when
it was not necessary since the block device was not opened with
O_DIRECT.

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