From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f181.google.com ([209.85.220.181]:36102 "EHLO mail-qk0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754145AbbIWN5t (ORCPT ); Wed, 23 Sep 2015 09:57:49 -0400 Received: by qkcf65 with SMTP id f65so17309835qkc.3 for ; Wed, 23 Sep 2015 06:57:48 -0700 (PDT) Subject: Re: [PATCH] btrfs: Fix no space bug caused by removing bg To: dsterba@suse.cz, Hugo Mills , =?UTF-8?Q?Holger_Hoffst=c3=a4tte?= , linux-btrfs@vger.kernel.org References: <15fc8f8d002e4ffcdb46e769736f240ae7ace20b.1442839332.git.zhaolei@cn.fujitsu.com> <560150CD.6070301@suse.com> <5601596B.1020607@googlemail.com> <20150922134131.GH5918@carfax.org.uk> <20150922142333.GH12815@twin.jikos.cz> <20150922143602.GI5918@carfax.org.uk> <56016BB5.6060101@gmail.com> <20150922153930.GK5918@carfax.org.uk> <20150923132829.GB12815@twin.jikos.cz> From: Austin S Hemmelgarn Message-ID: <5602AFDB.6030002@gmail.com> Date: Wed, 23 Sep 2015 09:57:47 -0400 MIME-Version: 1.0 In-Reply-To: <20150923132829.GB12815@twin.jikos.cz> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-512; boundary="------------ms000502010300030207050505" Sender: linux-btrfs-owner@vger.kernel.org List-ID: This is a cryptographically signed message in MIME format. --------------ms000502010300030207050505 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable On 2015-09-23 09:28, David Sterba wrote: > On Tue, Sep 22, 2015 at 03:39:30PM +0000, Hugo Mills wrote: >>> The way I would expect things to work is that a new subvolume >>> inherits it's properties from it's parent (if it's a snapshot), >> >> Definitely this. >> >>> or >>> from the next higher subvolume it's nested in. >> >> I don't think I like this. I'm not quite sure why, though, at the >> moment. > > I don't like inheritance from other than the parent subvolume because > this makes things less obvious. Possibly, but that depends on how you view things. Internally,=20 subvolumes are independent of each other, but to a regular user (or=20 anything that just uses the VFS layer), they look hierarchical, and as=20 such without knowing the internals of the FS (which no regular user=20 should need to know) I would expect the profile to propagate down from=20 the (apparently) next higher subvolume. It's worth noting that I mean that it should just copy the properties=20 from the next higher subvolume at creation, and if the next higher=20 subvolume doesn't have the properties set, then just use the filesystem=20 defaults (and don't try to walk back up more than one level). >> It definitely makes the process at the start of allocating a new >> block group much more complex: you have to walk back up through an >> arbitrary depth of nested subvols to find the one that's actually got >> a replication policy record in it. (Because after this feature is >> brought in, there will be lots of filesystems without per-subvol >> replication policies in them, and we have to have some way of dealing >> with those as well). >> >> With an FS default policy, you only need check the current subvol,= >> and then fall back to the FS default if that's not found. > > That looks reasonable to me. > >> These things are, I think, likely to be lightly used: I would be >> reasonably surprised to find more than two or possibly three storage >> policies in use on any given system with a sane sysadmin. > > Agreed. At the moment I'm thinking about all the configuration > possibilites we want to give to the users. Eg. the inheritance can be > configurable on the property level. > > The usecase: the toplevel has compression enabled but I don't want any > new subvolume share this property automatically. > > (The blockgroup type is probably a bad example for configurable > inheritance as it would not work for shared extents if the type is > different.) Ideal situation in my opinion WRT block-group profile inheritance would=20 be that when an extent becomes shared, it get's re-striped at the=20 highest raid profile (prioritizing 3-copy or higher replication over=20 raid56) of any of the files that share the extent. This would result in = some more I/O than the usual clone operation in some cases, but any=20 other method has the potential to silently reduce the degree of data=20 safety for a given file. --------------ms000502010300030207050505 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0BBwEAAKCC Brgwgga0MIIEnKADAgECAgMRLfgwDQYJKoZIhvcNAQENBQAweTEQMA4GA1UEChMHUm9vdCBD QTEeMBwGA1UECxMVaHR0cDovL3d3dy5jYWNlcnQub3JnMSIwIAYDVQQDExlDQSBDZXJ0IFNp Z25pbm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