Re: How should e2fsck clear s_errno/j_errno on an ro mount?

From
Eric Sandeen <hidden>
Date
2012-07-23 20:21:49
Reply to
Theodore Ts'o, 2012-07-23
On 7/23/12 2:14 PM, Theodore Ts'o wrote:
quoted
nWell, I tested e2fsprogs from git and saw the same trouble.  Let me
look more closely at that commit.
Hmm, would it be possible to send me /tmp/loop3.qcow.bz2 after running:

     e2image -Q /dev/loop3 /tmp/loop3.qcow
     bzip2 /tmp/loop3.qcow

Regardless of what the problem ends up being, this looks like
something for our regression test suite....

					- Ted
Sure I can do that, will do it offline.

FWIW, the commit you mentioned changes e2fsck_check_ext3_journal, and
we only get there from main() like this:

        if ((ctx->mount_flags & EXT2_MF_MOUNTED) &&
            !(sb->s_feature_incompat & EXT3_FEATURE_INCOMPAT_RECOVER))
                goto skip_journal;

        retval = e2fsck_check_ext3_journal(ctx);

In my case I am mounted ro and recovery is done, so
EXT3_FEATURE_INCOMPAT_RECOVER is not, set, and so we skip over it with
the goto.

or else from here:

        if (sb->s_feature_incompat & EXT3_FEATURE_INCOMPAT_RECOVER) {
                if (ctx->options & E2F_OPT_READONLY) {
			...
                } else {
			...
                        retval = e2fsck_run_ext3_journal(ctx);

And again, I've already done recovery and am mounted RO so we won't go that way.

If make the first test above a little later:


diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index 94260bd..73aa028 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -1424,10 +1424,6 @@ failure:
 		fprintf(ctx->logf, "Filesystem UUID: %s\n",
 			e2p_uuid2str(sb->s_uuid));
 
-	if ((ctx->mount_flags & EXT2_MF_MOUNTED) &&
-	    !(sb->s_feature_incompat & EXT3_FEATURE_INCOMPAT_RECOVER))
-		goto skip_journal;
Thread (9 messages) 9 messages, 2 authors, last reply 2012-07-29
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help