All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Becker <Joel.Becker@oracle.com>
To: Theodore Tso <tytso@mit.edu>
Cc: ocfs2-devel@oss.oracle.com, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] [RFC] jbd2: Add buffer triggers
Date: Mon, 6 Oct 2008 14:42:52 -0700	[thread overview]
Message-ID: <20081006214251.GB26632@mail.oracle.com> (raw)
In-Reply-To: <20081006213754.GA26632@mail.oracle.com>

On Mon, Oct 06, 2008 at 02:37:54PM -0700, Joel Becker wrote:
> On Fri, Oct 03, 2008 at 08:03:36PM -0400, Theodore Tso wrote:
> 	Now, I'm sure this is the buffer that's going to the journal, I
> think you're saying that this buffer may not be what gets checkpointed.
> So the correct checksum hits the journal, but then an invalid one gets
> to the real location on disk.  Is that right?  If so, I need to figure
> out where to calculate the checksum somewhere higher, as you say.

	Ok, looking at your first email again, you're saying to move up
to the "Check for escaping" section.  There we might checksum b_data
before it's copied out.  This is, indeed, safe against the problem you
mentioned.  I also think it's safe to checksum b_frozen_data if already
set there, as that's a frozen for commit buffer.  Can I trust that
checksumming b_data there will not be overwritten by another process
doing journal_dirty_metadata() before we write out our buffer?  Can I
trust that the b_frozen_data, if already copied, will be the buffer
committed and checkpointed?  If so, I think that change works.

Joel

-- 

"What no boss of a programmer can ever understand is that a programmer
 is working when he's staring out of the window"
	- With apologies to Burton Rascoe

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127

WARNING: multiple messages have this Message-ID (diff)
From: Joel Becker <Joel.Becker@oracle.com>
To: Theodore Tso <tytso@mit.edu>
Cc: ocfs2-devel@oss.oracle.com, linux-ext4@vger.kernel.org
Subject: [Ocfs2-devel] [PATCH] [RFC] jbd2: Add buffer triggers
Date: Mon, 6 Oct 2008 14:42:52 -0700	[thread overview]
Message-ID: <20081006214251.GB26632@mail.oracle.com> (raw)
In-Reply-To: <20081006213754.GA26632@mail.oracle.com>

On Mon, Oct 06, 2008 at 02:37:54PM -0700, Joel Becker wrote:
> On Fri, Oct 03, 2008 at 08:03:36PM -0400, Theodore Tso wrote:
> 	Now, I'm sure this is the buffer that's going to the journal, I
> think you're saying that this buffer may not be what gets checkpointed.
> So the correct checksum hits the journal, but then an invalid one gets
> to the real location on disk.  Is that right?  If so, I need to figure
> out where to calculate the checksum somewhere higher, as you say.

	Ok, looking at your first email again, you're saying to move up
to the "Check for escaping" section.  There we might checksum b_data
before it's copied out.  This is, indeed, safe against the problem you
mentioned.  I also think it's safe to checksum b_frozen_data if already
set there, as that's a frozen for commit buffer.  Can I trust that
checksumming b_data there will not be overwritten by another process
doing journal_dirty_metadata() before we write out our buffer?  Can I
trust that the b_frozen_data, if already copied, will be the buffer
committed and checkpointed?  If so, I think that change works.

Joel

-- 

"What no boss of a programmer can ever understand is that a programmer
 is working when he's staring out of the window"
	- With apologies to Burton Rascoe

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127

  reply	other threads:[~2008-10-06 21:43 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-17 23:26 [PATCH] [RFC] jbd2: Add buffer triggers Joel Becker
2008-09-17 23:26 ` [Ocfs2-devel] " Joel Becker
2008-09-17 23:27 ` [PATCH] ocfs2: Use the new jbd_journal_set_triggers() to printk Joel Becker
2008-09-17 23:27   ` [Ocfs2-devel] " Joel Becker
2008-09-19 21:46 ` [PATCH] [RFC] jbd2: Add buffer triggers Andreas Dilger
2008-09-19 21:46   ` [Ocfs2-devel] " Andreas Dilger
2008-09-20  3:36   ` Joel Becker
2008-09-20  3:36     ` Joel Becker
2008-09-29  1:25 ` Theodore Tso
2008-09-29  1:25   ` [Ocfs2-devel] " Theodore Tso
2008-10-04  0:03   ` Theodore Tso
2008-10-04  0:03     ` [Ocfs2-devel] " Theodore Tso
2008-10-06 21:37     ` Joel Becker
2008-10-06 21:37       ` [Ocfs2-devel] " Joel Becker
2008-10-06 21:42       ` Joel Becker [this message]
2008-10-06 21:42         ` Joel Becker
2008-10-06 23:32         ` Theodore Tso
2008-10-06 23:32           ` [Ocfs2-devel] " Theodore Tso
2008-10-07  1:01           ` Joel Becker
2008-10-07  1:01             ` Joel Becker
2008-10-08 23:17             ` Joel Becker
2008-10-08 23:17               ` Joel Becker
2008-10-16 17:42               ` Theodore Tso
2008-10-16 17:42                 ` Theodore Tso
2008-10-16 19:40                 ` Joel Becker
2008-10-16 19:40                   ` Joel Becker
2008-10-16 19:44                   ` Joel Becker
2008-10-16 19:44                     ` [Ocfs2-devel] " Joel Becker
2008-10-17 12:28                   ` Theodore Tso
2008-10-17 12:28                     ` Theodore Tso
2008-10-17 17:11                     ` Mark Fasheh
2008-10-17 17:11                       ` Mark Fasheh
2008-10-07  1:04           ` Joel Becker
2008-10-07  1:04             ` Joel Becker

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=20081006214251.GB26632@mail.oracle.com \
    --to=joel.becker@oracle.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=ocfs2-devel@oss.oracle.com \
    --cc=tytso@mit.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.