public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Su Yue <l@damenly.org>
To: Yang Xu <xuyang2018.jy@fujitsu.com>
Cc: fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] t_snapshot_deleted_subvolume: change the position of macro definition
Date: Wed, 31 Jan 2024 12:39:52 +0800	[thread overview]
Message-ID: <a5omglk6.fsf@damenly.org> (raw)
In-Reply-To: <20240126080423.138713-1-xuyang2018.jy@fujitsu.com>


On Fri 26 Jan 2024 at 03:04, Yang Xu <xuyang2018.jy@fujitsu.com> 
wrote:

Cc linux-btrfs

> On some platform, struct btrfs_ioctl_vol_args_v2 is defined, but 
> the
>
Would you mention what are these platforms?

--
Su
> macros BTRFS_IOC_SNAP_DESTROY_V2, BTRFS_IOC_SNAP_CREATE_V2 and
> BTRFS_IOC_SUBVOL_CREATE_V2 are not defined. This will cause 
> compile
> error. We should always check these macros and manually define 
> them
> if necessary.
>
> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
> ---
>  src/t_snapshot_deleted_subvolume.c | 30 
>  +++++++++++++++---------------
>  1 file changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/src/t_snapshot_deleted_subvolume.c 
> b/src/t_snapshot_deleted_subvolume.c
> index c3adb1c4..d84ba35a 100644
> --- a/src/t_snapshot_deleted_subvolume.c
> +++ b/src/t_snapshot_deleted_subvolume.c
> @@ -20,21 +20,6 @@
>  #define BTRFS_IOCTL_MAGIC 0x94
>  #endif
>
> -#ifndef BTRFS_IOC_SNAP_DESTROY_V2
> -#define BTRFS_IOC_SNAP_DESTROY_V2 \
> -	_IOW(BTRFS_IOCTL_MAGIC, 63, struct btrfs_ioctl_vol_args_v2)
> -#endif
> -
> -#ifndef BTRFS_IOC_SNAP_CREATE_V2
> -#define BTRFS_IOC_SNAP_CREATE_V2 \
> -	_IOW(BTRFS_IOCTL_MAGIC, 23, struct btrfs_ioctl_vol_args_v2)
> -#endif
> -
> -#ifndef BTRFS_IOC_SUBVOL_CREATE_V2
> -#define BTRFS_IOC_SUBVOL_CREATE_V2 \
> -	_IOW(BTRFS_IOCTL_MAGIC, 24, struct btrfs_ioctl_vol_args_v2)
> -#endif
> -
>  #ifndef BTRFS_SUBVOL_NAME_MAX
>  #define BTRFS_SUBVOL_NAME_MAX 4039
>  #endif
> @@ -58,6 +43,21 @@ struct btrfs_ioctl_vol_args_v2 {
>  };
>  #endif
>
> +#ifndef BTRFS_IOC_SNAP_DESTROY_V2
> +#define BTRFS_IOC_SNAP_DESTROY_V2 \
> +	_IOW(BTRFS_IOCTL_MAGIC, 63, struct btrfs_ioctl_vol_args_v2)
> +#endif
> +
> +#ifndef BTRFS_IOC_SNAP_CREATE_V2
> +#define BTRFS_IOC_SNAP_CREATE_V2 \
> +	_IOW(BTRFS_IOCTL_MAGIC, 23, struct btrfs_ioctl_vol_args_v2)
> +#endif
> +
> +#ifndef BTRFS_IOC_SUBVOL_CREATE_V2
> +#define BTRFS_IOC_SUBVOL_CREATE_V2 \
> +	_IOW(BTRFS_IOCTL_MAGIC, 24, struct btrfs_ioctl_vol_args_v2)
> +#endif
> +
>  int main(int argc, char **argv)
>  {
>  	if (argc != 2) {

       reply	other threads:[~2024-01-31  4:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240126080423.138713-1-xuyang2018.jy@fujitsu.com>
2024-01-31  4:39 ` Su Yue [this message]
2024-01-31  9:54   ` [PATCH] t_snapshot_deleted_subvolume: change the position of macro definition Yang Xu (Fujitsu)

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=a5omglk6.fsf@damenly.org \
    --to=l@damenly.org \
    --cc=fstests@vger.kernel.org \
    --cc=xuyang2018.jy@fujitsu.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