All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shaohua Li <shli@kernel.org>
To: NeilBrown <neilb@suse.de>
Cc: linux-raid@vger.kernel.org
Subject: Re: [patch 1/2]MD: raid5 trim support
Date: Thu, 20 Sep 2012 12:25:41 +0800	[thread overview]
Message-ID: <20120920042541.GA12704@kernel.org> (raw)
In-Reply-To: <20120920135914.63bf9ff4@notabene.brown>

On Thu, Sep 20, 2012 at 01:59:14PM +1000, NeilBrown wrote:
> On Thu, 20 Sep 2012 10:27:17 +0800 Shaohua Li <shli@kernel.org> wrote:
> 
> in which wrong sectors were trimmed....
> > 
> > Ok, just confirmed, delete raid5_compute_sector is ok if I adjust
> > logical_sector calculation. Here is the new patch.
> > 
> 
> Thanks.  That looks better.  I've applied it with some minor formatting
> changes.
> 
> I then went to look at the follow-up page and .....
> I count 11 separate places where you test the new flag and possibly memset a
> page to zero.  This doesn't seem like an improvement to me.

We do the zero page just before the stripe is hit in cache, which is rare case.
 
> Why don't we just mark the page as not up-to-date when we discard it?  That
> would avoid storing inconsistent data, and would avoid needing to zero pages.

We need re-read the strip if it's hit in cache, but it's rare case, we don't
care. So when we clear the up-to-date flag? I saw a lot of places checking
up-to-date flag in the write path. Need close look to check if there is race.

Thanks,
Shaohua

  reply	other threads:[~2012-09-20  4:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-18  8:25 [patch 1/2]MD: raid5 trim support Shaohua Li
2012-09-20  1:15 ` NeilBrown
2012-09-20  1:36   ` Shaohua Li
2012-09-20  1:47     ` NeilBrown
2012-09-20  2:06       ` Shaohua Li
2012-09-20  2:27       ` Shaohua Li
2012-09-20  3:59         ` NeilBrown
2012-09-20  4:25           ` Shaohua Li [this message]
2012-09-20 10:31             ` Shaohua Li
2012-09-25  7:00               ` NeilBrown

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=20120920042541.GA12704@kernel.org \
    --to=shli@kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    /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.