Whamcloud - gitweb
libext2fs: don't use O_DIRECT for files on tmpfs
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 21 Feb 2020 21:40:56 +0000 (14:40 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 7 Mar 2020 16:14:02 +0000 (11:14 -0500)
commit947315c86645e3ac3e814a49a7e7ab4b3498f64b
tree83aae96bae091c38e7fc687fb4503ac6430dcd0a
parent937650f78e2d0e087048acd2a878139b27df3625
libext2fs: don't use O_DIRECT for files on tmpfs

If a filesystem image is on tmpfs, opening it with O_DIRECT for
reading the MMP will fail.  This is unnecessary, since the image
file can't really be open on another node at this point.  If the
open with O_DIRECT fails, retry without it when plausible.

Remove the special-casing of tmpfs from the mmp test cases.

Change-Id: I41f4b31657b06f62f10be8d6e524d303dd36a321
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/mmp.c
tests/f_mmp/script
tests/f_mmp_garbage/script
tests/m_image_mmp/script
tests/m_mmp/script
tests/m_mmp_bad_csum/script
tests/m_mmp_bad_magic/script
tests/t_mmp_1on/script
tests/t_mmp_2off/script