On Thu, Sep 20, 2012 at 01:59:14PM +1000, NeilBrown wrote: > On Thu, 20 Sep 2012 10:27:17 +0800 Shaohua Li <shli@xxxxxxxxxx> 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 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html