All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Omar Sandoval <osandov@osandov.com>
Cc: Chris Mason <clm@fb.com>, Josef Bacik <jbacik@fb.com>,
	David Sterba <dsterba@suse.cz>,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	Qu Wenruo <quwenruo@cn.fujitsu.com>
Subject: Re: [PATCH v2 5/6] Btrfs: unify subvol= and subvolid= mounting
Date: Mon, 11 May 2015 17:37:24 +0200	[thread overview]
Message-ID: <20150511153724.GO23255@twin.jikos.cz> (raw)
In-Reply-To: <074cb88847c0034aa1fc28f78f69c3dd1d5bd938.1428614837.git.osandov@osandov.com>

On Thu, Apr 09, 2015 at 02:34:55PM -0700, Omar Sandoval wrote:
> @@ -1321,7 +1438,7 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
>  		return ERR_PTR(error);
>  	}
>  
> -	if (subvol_name) {
> +	if (subvol_name || subvol_objectid != BTRFS_FS_TREE_OBJECTID) {
>  		/* mount_subvol() will free subvol_name. */
>  		return mount_subvol(subvol_name, subvol_objectid, flags,
>  				    device_name, data);

The story is that I've used this patchset as a base for my per-subvolume
mount flags because it made the mount path cleaner, so it's possible that
the issue I saw was related to my changes.

The modified 'if' above did not catch subvol_objectid == 0. I'm not sure
now how it got there, btrfs_parse_early_options recognizes 0 and
switches it to 5.

My testing script is quite simple and does only

  mount -o compress-force=lzo,subvol=/subv1 $dev mnt
  mount -o compress-force=zlib,subvol=/subv2 $dev mnt2

after mkfs. The first pass would resolve the path to the subvol root and
replace the options with subvolid=0, calls mount_subvol, vfs_kern_mount
than in turn goes back to btrfs_mount. Unless I'm missing something,
this should also work, because parse_early_options is called again and
does subvolid=0 -> subvol_objectid=5 . Oh well, more debugging needed,
not a blocker for this patchset.

  reply	other threads:[~2015-05-11 15:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09 21:34 [PATCH v2 0/6] Btrfs: show subvolume name and ID in /proc/mounts Omar Sandoval
2015-04-09 21:34 ` [PATCH v2 1/6] Btrfs: lock superblock before remounting for rw subvol Omar Sandoval
2015-05-11 16:07   ` David Sterba
2015-04-09 21:34 ` [PATCH v2 2/6] Btrfs: remove all subvol options before mounting top-level Omar Sandoval
2015-05-11 16:08   ` David Sterba
2015-04-09 21:34 ` [PATCH v2 3/6] Btrfs: clean up error handling in mount_subvol() Omar Sandoval
2015-05-11 16:08   ` David Sterba
2015-04-09 21:34 ` [PATCH v2 4/6] Btrfs: fail on mismatched subvol and subvolid mount options Omar Sandoval
2015-04-10  0:39   ` Qu Wenruo
2015-04-14 15:07     ` David Sterba
2015-05-11 16:09   ` David Sterba
2015-04-09 21:34 ` [PATCH v2 5/6] Btrfs: unify subvol= and subvolid= mounting Omar Sandoval
2015-05-11 15:37   ` David Sterba [this message]
2015-05-11 21:15     ` Omar Sandoval
2015-05-11 16:10   ` David Sterba
2015-04-09 21:34 ` [PATCH v2 6/6] Btrfs: show subvol= and subvolid= in /proc/mounts Omar Sandoval
2015-05-11 16:10   ` David Sterba
2015-05-11  9:42 ` [PATCH v2 0/6] Btrfs: show subvolume name and ID " Omar Sandoval
2015-05-11 14:51   ` David Sterba
2015-05-11 21:20     ` Omar Sandoval
2015-05-12  0:46   ` Qu Wenruo

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=20150511153724.GO23255@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=clm@fb.com \
    --cc=jbacik@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=osandov@osandov.com \
    --cc=quwenruo@cn.fujitsu.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.