linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Daeho Jeong" <daeho.jeong@samsung.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: "tytso@mit.edu" <tytso@mit.edu>,
	"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
	"yeongjin gil" <youngjin.gil@samsung.com>
Subject: Re: [PATCH] ext4: avoid modifying checksum fields directly during checksum verification
Date: Thu, 16 Jun 2016 00:08:46 +0000	[thread overview]
Message-ID: <1254354083.481464.1466035726062.JavaMail.weblogic@ep1ml102b> (raw)
In-Reply-To: CGME20160615215745epcas1p311ceb996b59406165c213da4de9196c4@epcas1p3.samsung.com

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

Hi Darrick,

 
> Is something verifying the block at the same time the journal is
> writing the same block out via replay?  Or even just a regular commit?
> If that's the case, then yes, you're right, we can't touch a single
> bit on a metadata block without a transaction protecting it.  Oops.


As far as I know, if you want to modify a metadata block, you have to
get write access for a metadata block in advance in order to notify
your intention to jbd2 journaling module so that jbd2 can control all
the modifications to the metadata block and it can make a copied
version of the metadata block with copying out the original metadata
block if necessary.

However, if we touch a metadata block without jbd2's approval, jbd2 doesn't
know about what we are doing and it cannot do anything for us. So, we can
modify the content of the metadata block even being written back.

  parent reply	other threads:[~2016-06-16  0:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-15  6:12 [PATCH] ext4: avoid modifying checksum fields directly during checksum verification Daeho Jeong
2016-06-15 21:57 ` Darrick J. Wong
     [not found] ` <CGME20160615215745epcas1p311ceb996b59406165c213da4de9196c4@epcas1p3.samsung.com>
2016-06-16  0:08   ` Daeho Jeong [this message]
2016-07-03 22:05 ` Theodore Ts'o

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=1254354083.481464.1466035726062.JavaMail.weblogic@ep1ml102b \
    --to=daeho.jeong@samsung.com \
    --cc=darrick.wong@oracle.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=youngjin.gil@samsung.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).