linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@dilger.ca>
To: Shehbaz Jaffer <shehbazjaffer007@gmail.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: question about jbd2 checksum v2 and v3 flag
Date: Sun, 25 Aug 2019 21:05:36 -0600	[thread overview]
Message-ID: <FF31C738-6B87-434B-9736-76286ED0F8E3@dilger.ca> (raw)
In-Reply-To: <CAPLK-i8xE4n8BJ-Beu0f80PC2W6b-A30nwcz+V_bCb_iAyB++Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1308 bytes --]

On Aug 16, 2019, at 5:55 PM, Shehbaz Jaffer <shehbazjaffer007@gmail.com> wrote:
> 
> Hello,
> 
> I am trying to understand jbd2 checksumming procedure. I reboot ext4
> in the middle of a metadata intensive operation using echo b>
> /proc/sysrq-trigger. I see that the journal gets replayed on next
> mount using prinks in jbd2/recovery.c: do_one_pass() function.
> 
> I then corrupt intermediate metadata logged on jbd2 and I still see
> the journal being replayed without multiple error messages which
> should ideally get printed when one of the two following flags -
> JBD2_FEATURE_INCOMPAT_CSUM_V2 or JBD2_FEATURE_INCOMPAT_CSUM_V3 are
> set.
> 
> I have 2 questions:
> 
> 1. Are the two flags: JBD2_FEATURE_INCOMPAT_CSUM_V2 and
> JBD2_FEATURE_INCOMPAT_CSUM_V3 set by default? If not, how do we set
> them so that the journal will detect and respond to injected
> corruptions?

See set_journal_csum_feature_set() for details on how these flags are set.

> 2. this is very naive question, but what do compat and incompat
> options mean? If flag X in incompat is set, does this mean the feature
> does not exist?

See description of the compat/incompat/ro_compat fields at:

https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout#The_Super_Block

Cheers, Andreas






[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 873 bytes --]

  reply	other threads:[~2019-08-26  3:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-16 23:55 question about jbd2 checksum v2 and v3 flag Shehbaz Jaffer
2019-08-26  3:05 ` Andreas Dilger [this message]
2019-08-26 16:51   ` Theodore Y. Ts'o
2019-08-26 18:31     ` Darrick J. Wong
2019-08-26 18:56       ` Theodore Y. Ts'o
2019-08-27 20:06       ` Andreas Dilger

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=FF31C738-6B87-434B-9736-76286ED0F8E3@dilger.ca \
    --to=adilger@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=shehbazjaffer007@gmail.com \
    /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).