third_party_f2fs-tools/lib
Chao Yu 64750e90d6 fsck.f2fs: allow --dry-run to check readonly mounted fs
As Ondřej Jirman <megi@xff.cz> reported:

I was trying to run: fsck.f2fs --dry-run /dev/mmcblk0p2 on a RO mounted device,
and fsck refuses to run. Strace shows that it tries to open the block device
with O_EXCL even in RO mode, which will always fail if the block device
is mounted.

fsck.f2fs --dry-run /dev/mmcblk0p2
Info: Dry run
Info: Mounted device!
Info: Check FS only on RO mounted device
	Error: Failed to open the device!

I suggest not using O_EXCL for --dry-run check.

Let's change to allow --dry-run to check readonly mounted fs.

Reported-by: Ondřej Jirman <megi@xff.cz>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2020-02-24 14:01:53 -08:00
..
libf2fs_io.c libf2fs_io: Add user-space cache 2020-01-14 07:42:02 -08:00
libf2fs_zoned.c f2fs-tools: handle /sys is not mounted 2020-01-14 07:42:02 -08:00
libf2fs.c fsck.f2fs: allow --dry-run to check readonly mounted fs 2020-02-24 14:01:53 -08:00
Makefile.am f2fs-tools: Add support for Casefolding 2019-08-27 14:51:05 -07:00
nls_utf8.c f2fs-tools: Add support for Casefolding 2019-08-27 14:51:05 -07:00
utf8data.h f2fs-tools: Add support for Casefolding 2019-08-27 14:51:05 -07:00