All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: "Austin S Hemmelgarn" <ahferroin7@gmail.com>,
	dsterba@suse.cz, "Hugo Mills" <hugo@carfax.org.uk>,
	"Holger Hoffstätte" <holger.hoffstaette@googlemail.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: Fix no space bug caused by removing bg
Date: Wed, 23 Sep 2015 19:28:10 +0200	[thread overview]
Message-ID: <20150923172810.GD12815@twin.jikos.cz> (raw)
In-Reply-To: <5602B06C.8020600@gmx.com>

On Wed, Sep 23, 2015 at 10:00:12PM +0800, Qu Wenruo wrote:
> As it's already planned, and I think it will need new incompact flag 
> anyway, or old kernel can easily remove/convert desired profile.

The usecase with the old kernel is colser to the rescue scenario than
regular use. We do have support for read-only compatibility (grep for
COMPAT_RO), so all of this might be covered by such an incompat flag.

> So what about adding new ROOT_ITEM members to record data/meta profile?

The profile is not the only property we'd like to add. It is be possible
to add it to btrfs_root_item in a safe way, like the new send related
items.

> I'm not a big fan to use xattr and it's quite easy to modify from user 
> space, and not completely confident with the possible concurrency about 
> xattr modification with chunk allocation.

The point is to be able to modify it from the userspace, but it's done
in a safe way. The xattrs are in their own namespace and have handlers
taht propagate the changes anywhere it's needed. The idea is to cache
the values along the in-memory structures and only update them via the
handlers.

> And from the logical level, xattr is at the same level as inode, but 
> subvolume is definitely at a higher level, even it's normally treated as 
> directory.
> So for me, I'd like to record it into root_item, not as sub xattr, even 
> it may need an extra ioctl to handle it.

The xattrs give us extensibility that does not require changes in the
size of root_item structure. Basically, the unknown and unsupported
xattrs (properties) are invisible in the b-tree.

> Anyway, I'm just a new comer for this feature, it's completely OK to 
> ignore my stupid ideas.

No worries. We had similar discussions in the past, I proposed special
ioctls first but then the xattrs were found more suitable. So we're
letting you know the status but there's still some chance that we missed
something and you can point it out.

  reply	other threads:[~2015-09-23 17:29 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-21 12:59 [PATCH] btrfs: Fix no space bug caused by removing bg Zhao Lei
2015-09-21 13:27 ` Filipe David Manana
2015-09-21 13:37   ` Filipe David Manana
2015-09-22 10:06   ` Zhao Lei
2015-09-22 10:22     ` Filipe David Manana
2015-09-22 11:24       ` Zhao Lei
2015-09-22 12:45         ` Filipe David Manana
2015-09-23  1:59           ` Zhao Lei
2015-09-22 10:22     ` Zhao Lei
2015-09-22 12:59 ` Jeff Mahoney
2015-09-22 13:28   ` Hugo Mills
2015-09-22 13:36   ` Holger Hoffstätte
2015-09-22 13:41     ` Hugo Mills
2015-09-22 14:23       ` David Sterba
2015-09-22 14:36         ` Hugo Mills
2015-09-22 14:54           ` Austin S Hemmelgarn
2015-09-22 15:39             ` Hugo Mills
2015-09-22 17:32               ` Austin S Hemmelgarn
2015-09-22 17:37                 ` Austin S Hemmelgarn
2015-09-23  4:49                 ` Duncan
2015-09-23 13:28               ` David Sterba
2015-09-23 13:57                 ` Austin S Hemmelgarn
2015-09-23 14:05                 ` Hugo Mills
2015-09-23 13:12           ` David Sterba
2015-09-23 13:19             ` Qu Wenruo
2015-09-23 13:32               ` Austin S Hemmelgarn
2015-09-23 14:00                 ` Qu Wenruo
2015-09-23 17:28                   ` David Sterba [this message]
2015-09-23 13:37               ` David Sterba
2015-09-23 13:45               ` Hugo Mills
2015-09-23 13:28             ` Hugo Mills
2015-09-22 16:23     ` Jeff Mahoney
2015-09-23  2:14   ` Zhao Lei

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=20150923172810.GD12815@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=ahferroin7@gmail.com \
    --cc=holger.hoffstaette@googlemail.com \
    --cc=hugo@carfax.org.uk \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.com \
    /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.