From: Eric Sandeen <sandeen@redhat.com>
To: Filipe David Borba Manana <fdmanana@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH RFC] Btrfs: add support for persistent mount options
Date: Tue, 06 Aug 2013 22:04:34 -0500 [thread overview]
Message-ID: <5201B942.7050605@redhat.com> (raw)
In-Reply-To: <1375813640-14063-1-git-send-email-fdmanana@gmail.com>
On 8/6/13 1:27 PM, Filipe David Borba Manana wrote:
> This change allows for most mount options to be persisted in
> the filesystem, and be applied when the filesystem is mounted.
> If the same options are specified at mount time, the persisted
> values for those options are ignored.
I thought the plan was to make commandline mount options
override persistent ones, but that doesn't seem to be the case,
at least in this example:
# ./btrfstune -o compress,discard,ssd /dev/sdb1
New persistent options: compress,discard,ssd
# mount -o nossd /dev/sdb1 /mnt/test
# dmesg | tail
[ 995.657233] btrfs: use ssd allocation scheme
[ 995.661501] btrfs: disk space caching is enabled
and /proc/mounts is similarly confused, showing both options:
# grep sdb1 /proc/mounts
/dev/sdb1 /mnt/test btrfs rw,seclabel,relatime,compress=zlib,nossd,ssd,discard,space_cache 0 0
(This is the trail of woe I was talking about from ext4-land) ;)
> The only options not supported are: subvol, subvolid, subvolrootid,
> device and thread_pool. This limitation is due to how this feature
> is implemented: basically there's an optional value (of type
> struct btrfs_dir_item) in the tree of tree roots used to store the
> list of options in the same format as they are passed to btrfs_mount().
> This means any mount option that takes effect before the tree of tree
> roots is setup is not supported.
Just FWIW, vfs-level mount options are also not supported; i.e. "noatime"
or "ro" won't work either, because the code is already past the VFS
option parsing:
# ./btrfstune -o compress,discard,ro /dev/sdb1
Current persistent options: compress,discard
New persistent options: compress,discard,ro
# mount /dev/sdb1 /mnt/test
mount: wrong fs type, bad option, bad superblock on /dev/sdb1, ...
# dmesg | tail
[ 817.681417] btrfs: unrecognized mount option 'ro'
[ 817.694689] btrfs: open_ctree failed
> To set these options, the user space tool btrfstune was modified
> to persist the list of options into an unmounted filesystem's
> tree of tree roots.
If this goes forward, you'd want an easy way to display
them, not just set them, I suppose.
Thanks,
-Eric
> NOTE: Like the corresponding btrfs-progs patch, this is a WIP with
> the goal o gathering feedback.
>
> Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
next prev parent reply other threads:[~2013-08-07 3:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-06 18:27 [PATCH RFC] Btrfs: add support for persistent mount options Filipe David Borba Manana
2013-08-06 20:37 ` Eric Sandeen
2013-08-06 20:45 ` Filipe David Manana
2013-08-06 21:05 ` Eric Sandeen
2013-08-07 3:12 ` Filipe David Manana
2013-08-07 10:48 ` David Sterba
2013-08-07 11:36 ` Filipe David Manana
2013-08-07 13:46 ` Martin Steigerwald
2013-08-08 22:21 ` David Sterba
[not found] ` <52015E8A .9000300@redhat.com>
2013-08-07 1:20 ` Duncan
2013-08-07 1:37 ` Eric Sandeen
2013-08-07 3:04 ` Eric Sandeen [this message]
2013-08-07 3:16 ` Filipe David Manana
2013-08-07 10:40 ` David Sterba
2013-08-07 11:33 ` Filipe David Manana
2013-08-09 0:01 ` David Sterba
2013-08-09 13:17 ` Filipe David Manana
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=5201B942.7050605@redhat.com \
--to=sandeen@redhat.com \
--cc=fdmanana@gmail.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 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.