Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754615AbbL3MA1 (ORCPT ); Wed, 30 Dec 2015 07:00:27 -0500 Received: from mout.gmx.net ([212.227.17.22]:58076 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754253AbbL3MAW (ORCPT ); Wed, 30 Dec 2015 07:00:22 -0500 Subject: Re: [PATCH] BTRFS: Adds an option to select RAID Stripe size To: Sanidhya Solanki , David Sterba , calestyo@scientia.net References: <1451305451-31222-1-git-send-email-jpage.lkml@gmail.com> <20151229133907.GA4227@suse.cz> <20151229061512.79a41f31@gmail.com> <20151229170611.GB4227@suse.cz> <20151230013946.7c1f0e12@gmail.com> Cc: clm@fb.com, jbacik@fb.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org From: Qu Wenruo Message-ID: <5683C714.4040705@gmx.com> Date: Wed, 30 Dec 2015 19:59:16 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20151230013946.7c1f0e12@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:IQpnOl63A0RS41EYR9iCRUNOLs+XJF1wYdPjrCH4QBnWXjMjdjL NWjNPBMd2D7gFxRq6PRY8qvOGMr2zAO8wpigEtjc78ReenkKkxUnBpkIHVGPeSuQeh1Cnkm Re/HcTb0X90PbFh3xRLkKexZuFvldIHs75ToPFuXYyJUnQ/42nLxfEvp0KlWdt1TffbEdyA OPTKCHsmscL0m8mJ+JUTg== X-UI-Out-Filterresults: notjunk:1;V01:K0:mxY6rG1O1Bg=:le64otjr76tnkm6j3TwR8j 9rqXMFXSgfwu0O5fVZKy4VahmfobyN7qe3rcGUBScG2EZwQmkLWUsOWtTk8BWwHNavYn//jO+ 8GNeQ+InaGJW6MkjyYZGQCdChH8N6wHrIOP8ElViDkqqLpjFb+8s1+Ni3C8P+3WsC/ZJxlkR1 R3IyGXkDha0s0JxIu0tuM97G4qoTD7RRU7AwsNCChfp5JUaGIdnwCcgQKITkZ9TO1z/u4Qgfj P7nVcnVKNefiWNgzf9331Qu898hnjzA7wjC+WOkpDO2Ig7DZ3ekvyQRMENXwFdMUtYQR8RRK4 d3tFRuRJVE2Y7zli45yexV32WPfFLpkw4o9n5jKJHb8RNhUwJn3W7+k+ABTdymL3caj/2wlhq x8ltoXg1pLuepSC6dyI6c90f1vnpJraUXwIcnC/fB4zVoE3pZUxvdjMBoIWofbAvqz3kNqASb aYABIftsFsvn/FS4N7g2s03BeLU/WzBcooCSypH4thdA4P5w6NliepjNsi5lAGmPs3lZyokzT pCyjQNgnWOHvYc4KPi03X8w8QAbqjKYrNXDdQoEg3o59Z3IewLHBBvkJ3Q9LFykbx0/paueMa y1ehsMklk7RUpRJ3kGdrzgFEiJsOKMRMgAhnc5G+AM1SOExKR38bOAGT/8ve/x1KA9ltP7G7i ZW5s1DoeLDPAjuzETJ9ZGGq/m69OiuXJTgos2ElMJToLovJYXewnExnMBkWPk7eWYqYLdPMgD OF7/ykAaYTUjJ8BxORQoMqjaZPaKEP6FWG5bo2SF+xwTLa4YCTkiYGJgnYajuleav8AQTumUh R+Zs+bl Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2750 Lines: 80 On 12/30/2015 02:39 PM, Sanidhya Solanki wrote: > On Tue, 29 Dec 2015 18:06:11 +0100 > David Sterba wrote: > >> So you want to make the stripe size configurable?... > > As I see it there are 3 ways to do it: > -Make it a compile time option that only configures it for a single > system with any devices that are added to the RAID. > -Make it a runtime option that can change based on how the > administrator configures it. > -A non-user facing option that is configurable by someone like a > distribution maintainer for all systems using the Binary Distribution. Not really sure about the difference between 2 and 3. When you mention runtime option, did you mean ioctl/mount/balance convert option? And what's the third one? Default mkfs time option? If you can make it mkfs time option, it won't be really hard to make it configurable. > > As I see it, DS would like something like the third option, but CAM > (ostensibly a SysAdmin) wants the second option. I didn't consider David means something that. As far as I read, he means balance convert option along with mkfs option. > > On the other hand, I implemented the first option. At least from what I have learned in recent btrfs development, either we provide a good enough interfaces (normally, balance convert ioctl with mkfs time option) to configure some on-disk fields. Or we just leave it to fixed value(normally 0, just like for encryption of EXTENT_DATA, and that's the case for current stripe_size). So fixed kernel value is not a really good idea, and should at least be replace by mkfs time option. > > The first and third option can co-exit, the second is an orthogonal > target that needs to be setup separately. > > Or we can make all options co-exist, but make it more complicated. No need. Just refer to how btrfs kernel handle chunk profile. It can be specified at mkfs time (by -d and -m options), and can also be converted later by balance ioctl. (by btrfs balance convert filter). The only tricky thing I am a little considered about is, how do we keep the default chunk stripe size for a fs. Thanks, Qu > > Please let me know which implementation is preferable, and, if you just > want me to expand the description (as DS' mail asked for) or redo the > entire setup. > > Thanks > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/