From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:56333 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753475AbdF2Pbq (ORCPT ); Thu, 29 Jun 2017 11:31:46 -0400 Subject: Re: raid0 vs. mkfs To: Avi Kivity , Shaohua Li Cc: NeilBrown , linux-raid@vger.kernel.org, linux-block@vger.kernel.org References: <56c83c4e-d451-07e5-88e2-40b085d8681c@scylladb.com> <87oa108a1x.fsf@notabene.neil.brown.name> <286a5fc1-eda3-0421-a88e-b03c09403259@scylladb.com> <87inr880au.fsf@notabene.neil.brown.name> <87d1he7zv9.fsf@notabene.neil.brown.name> <33bb250a-4dfd-0acc-9958-30fdac10918c@scylladb.com> <20161207165933.isq64dbkxye772nz@kernel.org> From: Coly Li Message-ID: <9a46c760-904a-8318-b06c-0cf19e0651dc@suse.de> Date: Thu, 29 Jun 2017 23:31:38 +0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Sender: linux-block-owner@vger.kernel.org List-Id: linux-block@vger.kernel.org On 2017/6/29 下午11:15, Avi Kivity wrote: > > > On 12/08/2016 06:44 PM, Coly Li wrote: >> On 2016/12/8 上午12:59, Shaohua Li wrote: >>> On Wed, Dec 07, 2016 at 07:50:33PM +0800, Coly Li wrote: >> [snip] >>> Thanks for doing this, Coly! For raid0, this totally makes sense. The >>> raid0 >>> zones make things a little complicated though. I just had a brief >>> look of your >>> proposed patch, which looks really complicated. I'd suggest something >>> like >>> this: >>> 1. split the bio according to zone boundary. >>> 2. handle the splitted bio. since the bio is within zone range, >>> calculating >>> the start and end sector for each rdev should be easy. >>> >> Hi Shaohua, >> >> Thanks for your suggestion! I try to modify the code by your suggestion, >> it is even more hard to make the code that way ... >> >> Because even split bios for each zone, all the corner cases still exist >> and should be taken care in every zoon. The code will be more >> complicated. >> > > Hi Coly, > > Did you manage to complete this patch? We are seeing its effect, not > only with mkfs, but also with fstrim(8). Hi Avi, Shaohua makes another much better patch, which is merged into mainline kernel in v4.12-rc2. The commit is '29efc390b946 ("md/md0: optimize raid0 discard handling")'. Hope this is informative. Coly