From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: linux-btrfs@vger.kernel.org
Cc: dsterba@suse.cz
Subject: [PATCH v2 7/7] btrfs-progs: Doc/mkfs: Add extra condition for rootdir option
Date: Mon, 11 Sep 2017 15:36:12 +0900 [thread overview]
Message-ID: <20170911063612.32114-8-quwenruo.btrfs@gmx.com> (raw)
In-Reply-To: <20170911063612.32114-1-quwenruo.btrfs@gmx.com>
Add extra limitation explained for --rootdir option, including:
1) Size limitation
Now I decide to follow "mkfs.ext4 -d" behavior, so we user is
responsible to make sure the block device/file is large enough.
2) Read permission
If user can't read the content, mkfs will just fail.
So user is also responsible to make sure to have enough privilege.
3) Extra warning about the behavior change
Since we we don't shrink fs the create file image, add such warning
in documentation.
Signed-off-by: Qu Wenruo <quwenruo.btrfs@gmx.com>
---
Documentation/mkfs.btrfs.asciidoc | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/Documentation/mkfs.btrfs.asciidoc b/Documentation/mkfs.btrfs.asciidoc
index d53d9e26..843e25cd 100644
--- a/Documentation/mkfs.btrfs.asciidoc
+++ b/Documentation/mkfs.btrfs.asciidoc
@@ -106,6 +106,17 @@ Please see the mount option 'discard' for that in `btrfs`(5).
*-r|--rootdir <rootdir>*::
Populate the toplevel subvolume with files from 'rootdir'. This does not
require root permissions and does not mount the filesystem.
++
+With this option, only one device can be specified.
++
+NOTE: User should make sure the block device/file has large enough space to
+contain the source directory and has enough previllege to read source directory.
+Or mkfs will just fail.
++
+WARNING: Before v4.14 btrfs-progs, *--rootdir* will shrink the filesystem,
+prevent user to make use of the remaining space.
+In v4.14 btrfs-progs, this behavior is changed, and will not shrink the fs.
+The result should be the same as `mkfs`, `mount` and then `cp -r`.
*-O|--features <feature1>[,<feature2>...]*::
A list of filesystem features turned on at mkfs time. Not all features are
--
2.14.1
next prev parent reply other threads:[~2017-09-11 6:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-11 6:36 [PATCH v2 0/7] Mkfs: Rework --rootdir to a more generic behavior Qu Wenruo
2017-09-11 6:36 ` [PATCH v2 1/7] btrfs-progs: Refactor find_next_chunk() to get rid of parameter root and objectid Qu Wenruo
2017-09-11 6:36 ` [PATCH v2 2/7] btrfs-progs: Fix one-byte overlap bug in free_block_group_cache Qu Wenruo
2017-09-11 6:36 ` [PATCH v2 3/7] btrfs-progs: mkfs: Rework rootdir option to avoid custom chunk layout Qu Wenruo
2017-09-11 6:36 ` [PATCH v2 4/7] btrfs-progs: mkfs: Update allocation info before verbose output Qu Wenruo
2017-09-11 6:36 ` [PATCH v2 5/7] btrfs-progs: Avoid BUG_ON for chunk allocation when ENOSPC happens Qu Wenruo
2017-09-11 6:36 ` [PATCH v2 6/7] btrfs-progs: mkfs: Workaround BUG_ON caused by rootdir option Qu Wenruo
2017-09-11 6:36 ` Qu Wenruo [this message]
2017-09-12 17:03 ` [PATCH v2 7/7] btrfs-progs: Doc/mkfs: Add extra condition for " David Sterba
2017-09-12 17:50 ` Goffredo Baroncelli
2017-09-12 18:07 ` David Sterba
2017-09-13 0:32 ` Qu Wenruo
2017-09-15 12:56 ` David Sterba
2017-09-15 13:24 ` Qu Wenruo
2017-09-15 15:48 ` David Sterba
2017-09-16 1:15 ` 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=20170911063612.32114-8-quwenruo.btrfs@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=dsterba@suse.cz \
--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.