Whamcloud - gitweb
AOSP: e2fsck: allow read-only testing if -E unshare_blocks will succeed
authorDavid Anderson <dvander@google.com>
Fri, 27 Apr 2018 23:10:29 +0000 (16:10 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 21 Jun 2018 14:11:40 +0000 (10:11 -0400)
commitd90c7666170a9a10b67d5649eb1d3f6cf0a00ff1
tree91740a741ae24b3ab44b8deb975ddf3e082a57b4
parent32272a37d7ab987f2b8b62047e7807fd45263c30
AOSP: e2fsck: allow read-only testing if -E unshare_blocks will succeed

If -E unshare_blocks is used with -n, it will normally fail since the
filesystem is read-only. For Android's "adb remount" it is more useful
to report whether or not the unshare operation would succeed, were the
filesystem writable. We do that here by ignoring certain write
operations if -E unshare_blocks is specified with -n. It is not perfect,
since the actual unshare operation could still fail (for example if
new extents need to consume additional blocks).

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Google-Bug-Id: 64109868
Test: e2fsck -f -n -E unshare_blocks on deduplicated image
Change-Id: Ia50ceb7b3745fdf8766cff06c697818f07411635
From AOSP commit: 9e76dc0f65d8a8dec27f57b9020e81cbbbe12faf
e2fsck/e2fsck.8.in
e2fsck/pass1b.c
e2fsck/unix.c