From: Roman Mamedov <rm@romanrm.net>
To: Josef Bacik <josef@toxicpanda.com>
Cc: linux-btrfs@vger.kernel.org, fstests@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH] fstests: btrfs/012 don't follow symlinks for populating $SCRATCH_MNT
Date: Sat, 25 Mar 2023 01:46:28 +0500 [thread overview]
Message-ID: <20230325014628.0b18621b@nvm> (raw)
In-Reply-To: <8d1ac146d94eec8c77f08a6d04cd8d5248dc8dc8.1679688780.git.josef@toxicpanda.com>
On Fri, 24 Mar 2023 16:13:19 -0400
Josef Bacik <josef@toxicpanda.com> wrote:
> /lib/modules/$(uname -r)/ can have symlinks to the source tree where the
> kernel was built from, which can have all sorts of stuff, which will
> make the runtime for this test exceedingly long. We're just trying to
> copy some data into our tree to test with, we don't need the entire
> devel tree of whatever we're doing, so use -P to not follow symlinks
> when copying.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> ---
> tests/btrfs/012 | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/btrfs/012 b/tests/btrfs/012
> index d9faf81c..1b6e8a6b 100755
> --- a/tests/btrfs/012
> +++ b/tests/btrfs/012
> @@ -43,7 +43,7 @@ mount -t ext4 $SCRATCH_DEV $SCRATCH_MNT
>
> _require_fs_space $SCRATCH_MNT $(du -s /lib/modules/`uname -r` | ${AWK_PROG} '{print $1}')
>
> -cp -aR /lib/modules/`uname -r`/ $SCRATCH_MNT
> +cp -aPR /lib/modules/`uname -r`/ $SCRATCH_MNT
But did you face the described problem in actual operation?
"man cp" says
-a, --archive
same as -dR --preserve=all
...
-d same as --no-dereference --preserve=links
...
-P, --no-dereference
never follow symbolic links in SOURCE
So -a includes -d, which already includes -P that is now being added.
Moreover, even -R is redundant in the original line and could be removed.
--
With respect,
Roman
next prev parent reply other threads:[~2023-03-24 20:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-24 20:13 [PATCH] fstests: btrfs/012 don't follow symlinks for populating $SCRATCH_MNT Josef Bacik
2023-03-24 20:46 ` Roman Mamedov [this message]
2023-03-25 4:36 ` Zorro Lang
2023-03-25 8:18 ` Christoph Hellwig
2023-03-25 17:06 ` Darrick J. Wong
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=20230325014628.0b18621b@nvm \
--to=rm@romanrm.net \
--cc=fstests@vger.kernel.org \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.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.