linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 211971] Incorrect fix by e2fsck for blocks_count corruption
Date: Wed, 03 Mar 2021 17:14:27 +0000	[thread overview]
Message-ID: <bug-211971-13602-NudUPEa3VT@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-211971-13602@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=211971

--- Comment #3 from tmahmud@iastate.edu ---
Hello Ted,

Thank you very much for the detailed clarification! It mostly makes sense to
me. But I still have two questions regarding the debugfs/e2fsck behavior.


(1)
> > > debugfs -w image
> > > debugfs:  ssv blocks_count 4000
> > > debugfs:  q
> 
> This will update the blocks_count in the primary and all secondary
> backups.  

This is different from what I observed. In my experiment, “debugfs: ssv
blocks_count 4000” only updated the blocks_count (and the checksum) in the
primary superblock. All secondary backups were not updated (neither the
blocks_count nor the checksum). Does this imply that there is a potential bug
in debugfs (because it didn’t update all backups as you suggested)?  I’m
attaching two images before and after “debugfs: ssv blocks_count 4000” for
reference (“image1_before”, “image1_after”). I have verified backups are not
updated by dumping the backup superblocks information with dumpe2fs.


(2)
> The problem is that e2fsck can't really determine that the blocks
> count field has been corrupted.  

In my experiment, I observed that e2fsck was able to fix the debugfs-modified
primary superblock using secondary superblocks when the secondary superblocks
are located in default locations (ex. 8193rd block). However, in an image where
secondary superblocks are not in their default locations (ex:513rd block), I
found that e2fsck cannot fix the primary superblock using secondary
superblocks. So e2fsck’s behavior is inconsistent depending on the location of
the secondary superblocks. Could you please comment on this?

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

  parent reply	other threads:[~2021-03-04  0:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-26 21:39 [Bug 211971] New: Incorrect fix by e2fsck for blocks_count corruption bugzilla-daemon
2021-02-27  0:58 ` Amy Parker
2021-02-27  1:29   ` Theodore Ts'o
2021-02-27  0:58 ` [Bug 211971] " bugzilla-daemon
2021-02-27  1:29 ` bugzilla-daemon
2021-03-03 17:14 ` bugzilla-daemon [this message]
2021-03-03 17:18 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-211971-13602-NudUPEa3VT@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).