From: David Sterba <dsterba@suse.cz>
To: Chris Mason <clm@fb.com>
Cc: Jeff Mahoney <jeffm@suse.com>,
linux-btrfs <linux-btrfs@vger.kernel.org>,
Arvin Schnell <aschnell@suse.de>
Subject: Re: [PATCH] btrfs: extend BTRFS_IOC_SNAP_CREATE_V2 to snapshot by subvolid
Date: Wed, 23 Jul 2014 14:41:35 +0200 [thread overview]
Message-ID: <20140723124135.GM1553@suse.cz> (raw)
In-Reply-To: <537366D2.3080808@fb.com>
On Wed, May 14, 2014 at 08:51:30AM -0400, Chris Mason wrote:
> On 03/24/2014 07:58 PM, Jeff Mahoney wrote:
> > The BTRFS_IOC_SNAP_CREATE_V2 ioctl is limited by requiring that a file
> > descriptor be passed in order to create the snapshot. This means that
> > snapshots may only be created of trees that are available in the mounted
> > namespace. We have a need to create snapshots from subvolumes outside
> > of the namespace. This is already possible by mounting the numbered
> > subvolume by ID on a separate mount point, creating the snapshot, and
> > unmounting it. That's a tedious and unnecessary process since the ioctl
> > can be extended so easily.
> >
> > This patch adds a new BTRFS_SUBVOL_CREATE_SUBVOLID flag that instructs
> > the ioctl to use the fd argument (which is now a union) as a subvolume
> > id instead. The subvolume ID is used to look up the root and instantiate
> > the inode so proper permission checking takes place.
>
> Can you please make this root only? The file handle makes sure the
> admin hasn't intentionally hidden the subvol from the user, and this
> bypasses those permission checks.
I'll take care of this and send an updated patch.
prev parent reply other threads:[~2014-07-23 12:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-24 23:58 [PATCH] btrfs: extend BTRFS_IOC_SNAP_CREATE_V2 to snapshot by subvolid Jeff Mahoney
2014-05-14 12:51 ` Chris Mason
2014-07-23 12:41 ` David Sterba [this message]
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=20140723124135.GM1553@suse.cz \
--to=dsterba@suse.cz \
--cc=aschnell@suse.de \
--cc=clm@fb.com \
--cc=jeffm@suse.com \
--cc=linux-btrfs@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox