Whamcloud - gitweb
libext2fs: refactor Direct I/O alignment requirement calculations
authorTheodore Ts'o <tytso@mit.edu>
Mon, 7 May 2012 17:25:44 +0000 (13:25 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 7 May 2012 17:25:44 +0000 (13:25 -0400)
commitdd0a2679ddd0a9bf53e32efc0f67a7e7a5ea5f00
tree015dbd2e1d3578e2ac35260be4eb721e3a5290fe
parent0a05b90330d8b505469c72143964b954776be232
libext2fs: refactor Direct I/O alignment requirement calculations

Create a new function, ext2fs_get_dio_alignment(), which returns the
alignment requirements for direct I/O.  This way we can factor out the
code from MMP and the Unix I/O manager.  The two modules weren't
consistently calculating the alignment factors, and in particular MMP
would sometimes use a larger alignment factor than was strictly
necessary.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/ext2fs.h
lib/ext2fs/getsectsize.c
lib/ext2fs/mmp.c
lib/ext2fs/unix_io.c