All of lore.kernel.org
 help / color / mirror / Atom feed
From: Omar Sandoval <osandov@osandov.com>
To: Nikolay Borisov <nborisov@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: Remove support for BTRFS_SUBVOL_CREATE_ASYNC
Date: Fri, 13 Mar 2020 11:36:53 -0700	[thread overview]
Message-ID: <20200313183653.GB26442@vader> (raw)
In-Reply-To: <20200313153143.23613-1-nborisov@suse.com>

On Fri, Mar 13, 2020 at 05:31:43PM +0200, Nikolay Borisov wrote:
> Kernel has removed support for this feature in 5.7 so let's remove
> support from progs as well.
> 
> Signed-off-by: Nikolay Borisov <nborisov@suse.com>
> ---
>  ioctl.h                  | 4 +---
>  libbtrfsutil/btrfs.h     | 4 +---
>  libbtrfsutil/subvolume.c | 4 ----
>  3 files changed, 2 insertions(+), 10 deletions(-)

We should also update the docs in libbtrfsutil/btrfsutil.h and
libbtrfsutil/python/module.c to note that async_transid/async_ is now
ignored, remove the mentions of asynchronous creation from
libbtrfsutil/README.md, and remove the async_ tests in
libbtrfsutil/python/tests/test_subvolume.py.

> diff --git a/ioctl.h b/ioctl.h
> index d3dfd6375de1..93a19a5789b6 100644
> --- a/ioctl.h
> +++ b/ioctl.h
> @@ -49,14 +49,12 @@ BUILD_ASSERT(sizeof(struct btrfs_ioctl_vol_args) == 4096);
>  
>  #define BTRFS_DEVICE_PATH_NAME_MAX 1024
>  
> -#define BTRFS_SUBVOL_CREATE_ASYNC	(1ULL << 0)
>  #define BTRFS_SUBVOL_RDONLY		(1ULL << 1)
>  #define BTRFS_SUBVOL_QGROUP_INHERIT	(1ULL << 2)
>  #define BTRFS_DEVICE_SPEC_BY_ID		(1ULL << 3)
>  
>  #define BTRFS_VOL_ARG_V2_FLAGS_SUPPORTED		\
> -			(BTRFS_SUBVOL_CREATE_ASYNC |	\
> -			BTRFS_SUBVOL_RDONLY |		\
> +			(BTRFS_SUBVOL_RDONLY |		\
>  			BTRFS_SUBVOL_QGROUP_INHERIT |	\
>  			BTRFS_DEVICE_SPEC_BY_ID)
>  
> diff --git a/libbtrfsutil/btrfs.h b/libbtrfsutil/btrfs.h
> index 944d50132456..03ac58372104 100644
> --- a/libbtrfsutil/btrfs.h
> +++ b/libbtrfsutil/btrfs.h
> @@ -38,8 +38,7 @@ struct btrfs_ioctl_vol_args {
>  #define BTRFS_DEVICE_SPEC_BY_ID		(1ULL << 3)
>  
>  #define BTRFS_VOL_ARG_V2_FLAGS_SUPPORTED		\
> -			(BTRFS_SUBVOL_CREATE_ASYNC |	\
> -			BTRFS_SUBVOL_RDONLY |		\
> +			(BTRFS_SUBVOL_RDONLY |		\
>  			BTRFS_SUBVOL_QGROUP_INHERIT |	\
>  			BTRFS_DEVICE_SPEC_BY_ID)
>  
> @@ -101,7 +100,6 @@ struct btrfs_ioctl_qgroup_limit_args {
>   * - BTRFS_IOC_SUBVOL_GETFLAGS
>   * - BTRFS_IOC_SUBVOL_SETFLAGS
>   */
> -#define BTRFS_SUBVOL_CREATE_ASYNC	(1ULL << 0)
>  #define BTRFS_SUBVOL_RDONLY		(1ULL << 1)
>  #define BTRFS_SUBVOL_QGROUP_INHERIT	(1ULL << 2)
>  
> diff --git a/libbtrfsutil/subvolume.c b/libbtrfsutil/subvolume.c
> index 3f8343a245e9..27a6bb8130ed 100644
> --- a/libbtrfsutil/subvolume.c
> +++ b/libbtrfsutil/subvolume.c
> @@ -716,8 +716,6 @@ PUBLIC enum btrfs_util_error btrfs_util_create_subvolume_fd(int parent_fd,
>  		return BTRFS_UTIL_ERROR_INVALID_ARGUMENT;
>  	}
>  
> -	if (async_transid)
> -		args.flags |= BTRFS_SUBVOL_CREATE_ASYNC;
>  	if (qgroup_inherit) {
>  		args.flags |= BTRFS_SUBVOL_QGROUP_INHERIT;
>  		args.qgroup_inherit = (struct btrfs_qgroup_inherit *)qgroup_inherit;
> @@ -1153,8 +1151,6 @@ PUBLIC enum btrfs_util_error btrfs_util_create_snapshot_fd2(int fd,
>  
>  	if (flags & BTRFS_UTIL_CREATE_SNAPSHOT_READ_ONLY)
>  		args.flags |= BTRFS_SUBVOL_RDONLY;
> -	if (async_transid)
> -		args.flags |= BTRFS_SUBVOL_CREATE_ASYNC;
>  	if (qgroup_inherit) {
>  		args.flags |= BTRFS_SUBVOL_QGROUP_INHERIT;
>  		args.qgroup_inherit = (struct btrfs_qgroup_inherit *)qgroup_inherit;

Please remove all of the handling for async_transid from this file.

  reply	other threads:[~2020-03-13 18:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-13 15:31 [PATCH] btrfs-progs: Remove support for BTRFS_SUBVOL_CREATE_ASYNC Nikolay Borisov
2020-03-13 18:36 ` Omar Sandoval [this message]
2021-09-23 12:41 Nikolay Borisov
2021-09-23 19:17 ` David Sterba
2021-09-24  9:25 ` David Sterba

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=20200313183653.GB26442@vader \
    --to=osandov@osandov.com \
    --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 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.