On Sat, Mar 25, 2023 at 01:46:28AM +0500, Roman Mamedov wrote: > On Fri, 24 Mar 2023 16:13:19 -0400 > Josef Bacik <josef@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx> > > --- > > 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? Same question, due to from what I tested[1], current options "-aR" don't follow the symbolic. Is there any different on your system, or your fs? Can you show more details about the issue you hit? Thanks, Zorro [1] $ mkdir testdir $ cd testdir $ ln -s ../xfstests link-dir $ ln -s ../img link-file $ cd .. $ cp -aR testdir/ copydir $ ls -l copydir/ total 0 lrwxrwxrwx. 1 zorro zorro 11 Mar 25 12:29 link-dir -> ../xfstests lrwxrwxrwx. 1 zorro zorro 6 Mar 25 12:29 link-file -> ../img > > "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 >