* [PATCH] btrfs: ioctls would need unique id
@ 2013-12-19 4:06 Anand Jain
2013-12-19 8:19 ` Hugo Mills
0 siblings, 1 reply; 3+ messages in thread
From: Anand Jain @ 2013-12-19 4:06 UTC (permalink / raw)
To: linux-btrfs
BTRFS_IOC_SET_FEATURES and BTRFS_IOC_GET_SUPPORTED_FEATURES
conflicts with BTRFS_IOC_GET_FEATURES
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
include/uapi/linux/btrfs.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h
index 7d7f776..0fe736e 100644
--- a/include/uapi/linux/btrfs.h
+++ b/include/uapi/linux/btrfs.h
@@ -634,9 +634,9 @@ struct btrfs_ioctl_fslist_args {
struct btrfs_ioctl_fslist_args)
#define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
struct btrfs_ioctl_feature_flags)
-#define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \
+#define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 58, \
struct btrfs_ioctl_feature_flags[2])
-#define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
+#define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 59, \
struct btrfs_ioctl_feature_flags[3])
#endif /* _UAPI_LINUX_BTRFS_H */
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] btrfs: ioctls would need unique id
2013-12-19 4:06 [PATCH] btrfs: ioctls would need unique id Anand Jain
@ 2013-12-19 8:19 ` Hugo Mills
2013-12-19 16:53 ` David Sterba
0 siblings, 1 reply; 3+ messages in thread
From: Hugo Mills @ 2013-12-19 8:19 UTC (permalink / raw)
To: Anand Jain; +Cc: linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 1536 bytes --]
On Thu, Dec 19, 2013 at 12:06:32PM +0800, Anand Jain wrote:
> BTRFS_IOC_SET_FEATURES and BTRFS_IOC_GET_SUPPORTED_FEATURES
> conflicts with BTRFS_IOC_GET_FEATURES
>
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
> include/uapi/linux/btrfs.h | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h
> index 7d7f776..0fe736e 100644
> --- a/include/uapi/linux/btrfs.h
> +++ b/include/uapi/linux/btrfs.h
> @@ -634,9 +634,9 @@ struct btrfs_ioctl_fslist_args {
> struct btrfs_ioctl_fslist_args)
> #define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
> struct btrfs_ioctl_feature_flags)
> -#define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \
> +#define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 58, \
> struct btrfs_ioctl_feature_flags[2])
> -#define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
> +#define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 59, \
> struct btrfs_ioctl_feature_flags[3])
The ioctls are distinct as tehy are, as they have different-sized
parameters. Changing these numbers is changing the public interface,
which is a big no-no.
Hugo.
--
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
--- I think that everything darkling says is actually a joke. ---
It's just that we haven't worked out most of them yet.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] btrfs: ioctls would need unique id
2013-12-19 8:19 ` Hugo Mills
@ 2013-12-19 16:53 ` David Sterba
0 siblings, 0 replies; 3+ messages in thread
From: David Sterba @ 2013-12-19 16:53 UTC (permalink / raw)
To: Hugo Mills, Anand Jain, linux-btrfs
On Thu, Dec 19, 2013 at 08:19:08AM +0000, Hugo Mills wrote:
> On Thu, Dec 19, 2013 at 12:06:32PM +0800, Anand Jain wrote:
> > BTRFS_IOC_SET_FEATURES and BTRFS_IOC_GET_SUPPORTED_FEATURES
> > conflicts with BTRFS_IOC_GET_FEATURES
> >
> > Signed-off-by: Anand Jain <anand.jain@oracle.com>
> > ---
> > include/uapi/linux/btrfs.h | 4 ++--
> > 1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h
> > index 7d7f776..0fe736e 100644
> > --- a/include/uapi/linux/btrfs.h
> > +++ b/include/uapi/linux/btrfs.h
> > @@ -634,9 +634,9 @@ struct btrfs_ioctl_fslist_args {
> > struct btrfs_ioctl_fslist_args)
> > #define BTRFS_IOC_GET_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
> > struct btrfs_ioctl_feature_flags)
> > -#define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 57, \
> > +#define BTRFS_IOC_SET_FEATURES _IOW(BTRFS_IOCTL_MAGIC, 58, \
> > struct btrfs_ioctl_feature_flags[2])
> > -#define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 57, \
> > +#define BTRFS_IOC_GET_SUPPORTED_FEATURES _IOR(BTRFS_IOCTL_MAGIC, 59, \
> > struct btrfs_ioctl_feature_flags[3])
>
> The ioctls are distinct as tehy are, as they have different-sized
> parameters.
We're already using the trick to distinguish the ioctls by argument
size, so it's not strictly necessary to make the main numbers different.
> Changing these numbers is changing the public interface,
> which is a big no-no.
The related feature hasn't been merged yet so it's still time to change
them.
I'd say to keep it as it is now.
david
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-19 16:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-19 4:06 [PATCH] btrfs: ioctls would need unique id Anand Jain
2013-12-19 8:19 ` Hugo Mills
2013-12-19 16:53 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox