linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Filipe Manana <fdmanana@gmail.com>
To: Nikolay Borisov <nborisov@suse.com>
Cc: fstests <fstests@vger.kernel.org>,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] btrfs: Add test for rename exchange behavior between subvolumes
Date: Mon, 30 Aug 2021 12:11:30 +0100	[thread overview]
Message-ID: <CAL3q7H526ckNLV=+S-mv0tbBJNnL3q=m2cTP04feSVPGzfcSrw@mail.gmail.com> (raw)
In-Reply-To: <9f83250b-db93-bdf8-5288-0259afdf725b@suse.com>

On Mon, Aug 30, 2021 at 12:08 PM Nikolay Borisov <nborisov@suse.com> wrote:
>
>
>
> On 30.08.21 г. 13:56, Filipe Manana wrote:
> > On Mon, Aug 30, 2021 at 8:18 AM Nikolay Borisov <nborisov@suse.com> wrote:
> >>
> >>
> >>
> >> <snip>
> >>> Finally, this would also be a good opportunity to test regular renames
> >>> with subvolumes too, as we had bugs and regressions in the past like
> >>> in commit 4871c1588f92c6c13f4713a7009f25f217055807 ("Btrfs: use right
> >>> root when checking for hash collision
> >>> "), and never got any test cases for them.
> >>
> >> What specific tests do you have in mind? Ordinary renames of files
> >> within a subvolume are already tested by merit of generic geneirc/02[345].
> >
> > So besides the case mentioned in that patch's changelog (renaming a
> > subvolume), checking that we can't rename an inode across subvolumes.
> > Something like checking that:
> >
> > rename /mnt/subvol1/file /mnt/subvol2/file
> >
> > fails with -EXDEV.
>
> But this is already checked by merit of using this line:
>
> _rename_tests_source_dest $SCRATCH_MNT/subvol1/src
> $SCRATCH_MNT/subvol2/dst "cross-subvol" "-x"
>
>
> it tests multiple combinations of regular/symbolic/directory/dev/null
> pairs. I.e :
>
> cross-subvol regu/regu -> Invalid cross-device link
>
>
>
> So this is already covered I'd say. Or you mean to test those
> combinations even without rename exchange, which would boil down to
> calling _rename_tests_source_dest without the -x flag.

Yes, without "-x" (that's what I meant by "regular renames").

>
> >
> > Thanks.
> >
> >
> >>
> >> The test in the patch you cited is basically renaming a subvolume within
> >> the same subvolume, that's easy enough.
> >>
> >> <snip>
> >
> >
> >



-- 
Filipe David Manana,

“Whether you think you can, or you think you can't — you're right.”

  reply	other threads:[~2021-08-30 11:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-19 13:14 [PATCH] btrfs: Add test for rename exchange behavior between subvolumes Nikolay Borisov
2021-08-23 15:49 ` Filipe Manana
2021-08-30  7:18   ` Nikolay Borisov
2021-08-30 10:56     ` Filipe Manana
2021-08-30 11:08       ` Nikolay Borisov
2021-08-30 11:11         ` Filipe Manana [this message]
2021-08-29 14:04 ` Eryu Guan
2021-08-30  7:10   ` Nikolay Borisov

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='CAL3q7H526ckNLV=+S-mv0tbBJNnL3q=m2cTP04feSVPGzfcSrw@mail.gmail.com' \
    --to=fdmanana@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nborisov@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).