linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] Btrfs: change ioctl number of BTRFS_IOC_START_SYNC to 21
@ 2013-11-06  9:01 Liu Bo
  2013-11-06  9:42 ` Stefan Behrens
  0 siblings, 1 reply; 4+ messages in thread
From: Liu Bo @ 2013-11-06  9:01 UTC (permalink / raw)
  To: linux-btrfs

24 has been assigned to both BTRFS_IOC_START_SYNC and BTRFS_IOC_SUBVOL_CREATE_V2,
and BTRFS_IOC_SUBVOL_CREATE_V2 is at least used in btrfs-progs
while BTRFS_IOC_START_SYNC is not.

21 is free according to link[1], and seems safe to be assigned to BTRFS_IOC_START_SYNC.

[1]:
https://btrfs.wiki.kernel.org/index.php/Project_ideas

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
---
 include/uapi/linux/btrfs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h
index 45e6189..0f5a1af 100644
--- a/include/uapi/linux/btrfs.h
+++ b/include/uapi/linux/btrfs.h
@@ -552,7 +552,7 @@ static inline char *btrfs_err_str(enum btrfs_err_code err_code)
 #define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, __u64)
 #define BTRFS_IOC_SPACE_INFO _IOWR(BTRFS_IOCTL_MAGIC, 20, \
 				    struct btrfs_ioctl_space_args)
-#define BTRFS_IOC_START_SYNC _IOR(BTRFS_IOCTL_MAGIC, 24, __u64)
+#define BTRFS_IOC_START_SYNC _IOR(BTRFS_IOCTL_MAGIC, 21, __u64)
 #define BTRFS_IOC_WAIT_SYNC  _IOW(BTRFS_IOCTL_MAGIC, 22, __u64)
 #define BTRFS_IOC_SNAP_CREATE_V2 _IOW(BTRFS_IOCTL_MAGIC, 23, \
 				   struct btrfs_ioctl_vol_args_v2)
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH] Btrfs: change ioctl number of BTRFS_IOC_START_SYNC to 21
  2013-11-06  9:01 [RFC PATCH] Btrfs: change ioctl number of BTRFS_IOC_START_SYNC to 21 Liu Bo
@ 2013-11-06  9:42 ` Stefan Behrens
  2013-11-06 13:24   ` David Sterba
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Behrens @ 2013-11-06  9:42 UTC (permalink / raw)
  To: Liu Bo, linux-btrfs

On Wed,  6 Nov 2013 17:01:19 +0800, Liu Bo wrote:
> 24 has been assigned to both BTRFS_IOC_START_SYNC and BTRFS_IOC_SUBVOL_CREATE_V2,
> and BTRFS_IOC_SUBVOL_CREATE_V2 is at least used in btrfs-progs
> while BTRFS_IOC_START_SYNC is not.
> 
> 21 is free according to link[1], and seems safe to be assigned to BTRFS_IOC_START_SYNC.
> 
> [1]:
> https://btrfs.wiki.kernel.org/index.php/Project_ideas
> 
> Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
> ---
>  include/uapi/linux/btrfs.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h
> index 45e6189..0f5a1af 100644
> --- a/include/uapi/linux/btrfs.h
> +++ b/include/uapi/linux/btrfs.h
> @@ -552,7 +552,7 @@ static inline char *btrfs_err_str(enum btrfs_err_code err_code)
>  #define BTRFS_IOC_DEFAULT_SUBVOL _IOW(BTRFS_IOCTL_MAGIC, 19, __u64)
>  #define BTRFS_IOC_SPACE_INFO _IOWR(BTRFS_IOCTL_MAGIC, 20, \
>  				    struct btrfs_ioctl_space_args)
> -#define BTRFS_IOC_START_SYNC _IOR(BTRFS_IOCTL_MAGIC, 24, __u64)
> +#define BTRFS_IOC_START_SYNC _IOR(BTRFS_IOCTL_MAGIC, 21, __u64)
>  #define BTRFS_IOC_WAIT_SYNC  _IOW(BTRFS_IOCTL_MAGIC, 22, __u64)
>  #define BTRFS_IOC_SNAP_CREATE_V2 _IOW(BTRFS_IOCTL_MAGIC, 23, \
>  				   struct btrfs_ioctl_vol_args_v2)
> 

You don't _have to_ eliminate the duplicated use of the value 24, the
directions are different and the parameter sizes are different,
therefore these ioctls can be distinguished.

Sharing the ioctl value seems to have happened by mistake and is
uncommon, but IMHO now it's too late to change this interface just for
esthetical reasons.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH] Btrfs: change ioctl number of BTRFS_IOC_START_SYNC to 21
  2013-11-06  9:42 ` Stefan Behrens
@ 2013-11-06 13:24   ` David Sterba
  2013-11-07 13:45     ` Liu Bo
  0 siblings, 1 reply; 4+ messages in thread
From: David Sterba @ 2013-11-06 13:24 UTC (permalink / raw)
  To: Stefan Behrens; +Cc: Liu Bo, linux-btrfs

On Wed, Nov 06, 2013 at 10:42:35AM +0100, Stefan Behrens wrote:
> Sharing the ioctl value seems to have happened by mistake and is
> uncommon, but IMHO now it's too late to change this interface just for
> esthetical reasons.

Agreed, it's part of ABI, ioctl.h is "append only".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC PATCH] Btrfs: change ioctl number of BTRFS_IOC_START_SYNC to 21
  2013-11-06 13:24   ` David Sterba
@ 2013-11-07 13:45     ` Liu Bo
  0 siblings, 0 replies; 4+ messages in thread
From: Liu Bo @ 2013-11-07 13:45 UTC (permalink / raw)
  To: dsterba, Stefan Behrens; +Cc: linux-btrfs

On Wed, Nov 06, 2013 at 02:24:25PM +0100, David Sterba wrote:
> On Wed, Nov 06, 2013 at 10:42:35AM +0100, Stefan Behrens wrote:
> > Sharing the ioctl value seems to have happened by mistake and is
> > uncommon, but IMHO now it's too late to change this interface just for
> > esthetical reasons.
> 
> Agreed, it's part of ABI, ioctl.h is "append only".

Ok, I think that's why I tagged it as 'RFC' :-)

-liubo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-07 13:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-06  9:01 [RFC PATCH] Btrfs: change ioctl number of BTRFS_IOC_START_SYNC to 21 Liu Bo
2013-11-06  9:42 ` Stefan Behrens
2013-11-06 13:24   ` David Sterba
2013-11-07 13:45     ` Liu Bo

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).