linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ted Ts'o <tytso@mit.edu>
To: Andreas Dilger <adilger@dilger.ca>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>,
	"Darrick J. Wong" <djwong@us.ibm.com>,
	Amir Goldstein <amir73il@gmail.com>
Subject: Re: [PATCH 1/2] libext2fs: add metadata checksum and snapshot feature flags
Date: Thu, 15 Sep 2011 19:41:31 -0400	[thread overview]
Message-ID: <20110915234131.GL28181@thunk.org> (raw)
In-Reply-To: <14955E98-C987-40D6-A881-5D40077C2FB2@dilger.ca>

On Thu, Sep 15, 2011 at 05:34:41PM -0600, Andreas Dilger wrote:
> 
> Darrick and I discussed zeroing the checksum fields, but then there is a
> race with other threads accessing the same structure.

What race are you worried about?  The moment you modify some part of
the data structure, the checksum is going to be wrong.  This is true
whether you zero out the checksum field before you do the calculations
or not.

> If we went to a crc32c LSB for filesystems with RO_COMPAT_CSUM it would
> be possible to change how it is computed.  Since we have freedom to move
> the checksum field now, why have the added complexity to do zeroing of
> the field or two chunks?

Why is zero'ing out the field complex?  It's a single line of code....
It's certainly easier than doing it in two chunks, and there will be
some data structures (the block group descriptors at the very least)
where zero'ing the checksum is definitely going to be the easier way
to go.

   	      	       	      	     	    - Ted

  reply	other threads:[~2011-09-15 23:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-15 22:50 [PATCH 0/2] On disk format changes - V3 Theodore Ts'o
2011-09-15 22:50 ` [PATCH 1/2] libext2fs: add metadata checksum and snapshot feature flags Theodore Ts'o
2011-09-15 23:09   ` Andreas Dilger
2011-09-15 23:11     ` Ted Ts'o
2011-09-15 23:34       ` Andreas Dilger
2011-09-15 23:41         ` Ted Ts'o [this message]
2011-09-16  0:09           ` Andreas Dilger
2011-09-16  0:56             ` Darrick J. Wong
2011-09-16  4:03               ` Andreas Dilger
2011-09-16  1:06             ` Ted Ts'o
2011-09-16  3:57               ` Andreas Dilger
2011-09-16 14:28                 ` Ted Ts'o
2011-09-19 18:58   ` Darrick J. Wong
2011-09-20 18:56   ` Darrick J. Wong
2011-09-21  8:03     ` Amir Goldstein
2011-09-21 20:40       ` Darrick J. Wong
2011-09-22  2:12         ` Amir Goldstein
2011-09-22 19:18           ` Darrick J. Wong
2011-09-23  5:57             ` Amir Goldstein
2011-09-15 22:50 ` [PATCH 2/2] debugfs: add 64-bit support to the set_field commands 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=20110915234131.GL28181@thunk.org \
    --to=tytso@mit.edu \
    --cc=adilger@dilger.ca \
    --cc=amir73il@gmail.com \
    --cc=djwong@us.ibm.com \
    --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).