trinity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ioctls/vfs.c: add more ioctls from linux/fs.h
@ 2017-06-21 18:33 Tommi Rantala
  2017-06-21 18:33 ` [PATCH 2/2] ioctls/vfs.c: FS_IOC_GETFSMAP Tommi Rantala
  0 siblings, 1 reply; 2+ messages in thread
From: Tommi Rantala @ 2017-06-21 18:33 UTC (permalink / raw)
  To: davej; +Cc: trinity, Tommi Rantala

Note that BLKTRACESETUP needs struct blk_user_trace_setup from
<linux/blktrace_api.h>:

  #define BLKTRACESETUP _IOWR(0x12,115,struct blk_user_trace_setup)
---
 ioctls/vfs.c | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 127 insertions(+)

diff --git a/ioctls/vfs.c b/ioctls/vfs.c
index 0e31cc88..0bad6f56 100644
--- a/ioctls/vfs.c
+++ b/ioctls/vfs.c
@@ -1,6 +1,7 @@
 #include <stdio.h>
 #include <linux/fiemap.h>
 #include <linux/fs.h>
+#include <linux/blktrace_api.h>
 #include <linux/ioctl.h>
 #include <asm/ioctls.h>
 #include "ioctls.h"
@@ -114,6 +115,132 @@ static const struct ioctl vfs_ioctls[] = {
 	{ .name = "FIONREAD", .request = FIONREAD, },
 	{ .name = "FS_IOC_RESVSP", .request = FS_IOC_RESVSP, },
 	{ .name = "FS_IOC_RESVSP64", .request = FS_IOC_RESVSP64, },
+#ifdef BLKROSET
+	{ .name = "BLKROSET", .request = BLKROSET, },
+#endif
+#ifdef BLKROGET
+	{ .name = "BLKROGET", .request = BLKROGET, },
+#endif
+#ifdef BLKRRPART
+	{ .name = "BLKRRPART", .request = BLKRRPART, },
+#endif
+#ifdef BLKGETSIZE
+	{ .name = "BLKGETSIZE", .request = BLKGETSIZE, },
+#endif
+#ifdef BLKFLSBUF
+	{ .name = "BLKFLSBUF", .request = BLKFLSBUF, },
+#endif
+#ifdef BLKRASET
+	{ .name = "BLKRASET", .request = BLKRASET, },
+#endif
+#ifdef BLKRAGET
+	{ .name = "BLKRAGET", .request = BLKRAGET, },
+#endif
+#ifdef BLKFRASET
+	{ .name = "BLKFRASET", .request = BLKFRASET, },
+#endif
+#ifdef BLKFRAGET
+	{ .name = "BLKFRAGET", .request = BLKFRAGET, },
+#endif
+#ifdef BLKSECTSET
+	{ .name = "BLKSECTSET", .request = BLKSECTSET, },
+#endif
+#ifdef BLKSECTGET
+	{ .name = "BLKSECTGET", .request = BLKSECTGET, },
+#endif
+#ifdef BLKSSZGET
+	{ .name = "BLKSSZGET", .request = BLKSSZGET, },
+#endif
+#ifdef BLKBSZGET
+	{ .name = "BLKBSZGET", .request = BLKBSZGET, },
+#endif
+#ifdef BLKBSZSET
+	{ .name = "BLKBSZSET", .request = BLKBSZSET, },
+#endif
+#ifdef BLKGETSIZE64
+	{ .name = "BLKGETSIZE64", .request = BLKGETSIZE64, },
+#endif
+#ifdef BLKTRACESETUP
+	{ .name = "BLKTRACESETUP", .request = BLKTRACESETUP, },
+#endif
+#ifdef BLKTRACESTART
+	{ .name = "BLKTRACESTART", .request = BLKTRACESTART, },
+#endif
+#ifdef BLKTRACESTOP
+	{ .name = "BLKTRACESTOP", .request = BLKTRACESTOP, },
+#endif
+#ifdef BLKTRACETEARDOWN
+	{ .name = "BLKTRACETEARDOWN", .request = BLKTRACETEARDOWN, },
+#endif
+#ifdef BLKDISCARD
+	{ .name = "BLKDISCARD", .request = BLKDISCARD, },
+#endif
+#ifdef BLKIOMIN
+	{ .name = "BLKIOMIN", .request = BLKIOMIN, },
+#endif
+#ifdef BLKIOOPT
+	{ .name = "BLKIOOPT", .request = BLKIOOPT, },
+#endif
+#ifdef BLKALIGNOFF
+	{ .name = "BLKALIGNOFF", .request = BLKALIGNOFF, },
+#endif
+#ifdef BLKPBSZGET
+	{ .name = "BLKPBSZGET", .request = BLKPBSZGET, },
+#endif
+#ifdef BLKDISCARDZEROES
+	{ .name = "BLKDISCARDZEROES", .request = BLKDISCARDZEROES, },
+#endif
+#ifdef BLKSECDISCARD
+	{ .name = "BLKSECDISCARD", .request = BLKSECDISCARD, },
+#endif
+#ifdef BLKROTATIONAL
+	{ .name = "BLKROTATIONAL", .request = BLKROTATIONAL, },
+#endif
+#ifdef BLKZEROOUT
+	{ .name = "BLKZEROOUT", .request = BLKZEROOUT, },
+#endif
+#ifdef FITRIM
+	{ .name = "FITRIM", .request = FITRIM, },
+#endif
+#ifdef FS_IOC_GETFLAGS
+	{ .name = "FS_IOC_GETFLAGS", .request = FS_IOC_GETFLAGS, },
+#endif
+#ifdef FS_IOC_SETFLAGS
+	{ .name = "FS_IOC_SETFLAGS", .request = FS_IOC_SETFLAGS, },
+#endif
+#ifdef FS_IOC_GETVERSION
+	{ .name = "FS_IOC_GETVERSION", .request = FS_IOC_GETVERSION, },
+#endif
+#ifdef FS_IOC_SETVERSION
+	{ .name = "FS_IOC_SETVERSION", .request = FS_IOC_SETVERSION, },
+#endif
+#ifdef FS_IOC32_GETFLAGS
+	{ .name = "FS_IOC32_GETFLAGS", .request = FS_IOC32_GETFLAGS, },
+#endif
+#ifdef FS_IOC32_SETFLAGS
+	{ .name = "FS_IOC32_SETFLAGS", .request = FS_IOC32_SETFLAGS, },
+#endif
+#ifdef FS_IOC32_GETVERSION
+	{ .name = "FS_IOC32_GETVERSION", .request = FS_IOC32_GETVERSION, },
+#endif
+#ifdef FS_IOC32_SETVERSION
+	{ .name = "FS_IOC32_SETVERSION", .request = FS_IOC32_SETVERSION, },
+#endif
+#ifdef FS_IOC_FSGETXATTR
+	{ .name = "FS_IOC_FSGETXATTR", .request = FS_IOC_FSGETXATTR, },
+#endif
+#ifdef FS_IOC_FSSETXATTR
+	{ .name = "FS_IOC_FSSETXATTR", .request = FS_IOC_FSSETXATTR, },
+#endif
+#ifdef FS_IOC_SET_ENCRYPTION_POLICY
+	{ .name = "FS_IOC_SET_ENCRYPTION_POLICY", .request = FS_IOC_SET_ENCRYPTION_POLICY, },
+#endif
+#ifdef FS_IOC_GET_ENCRYPTION_PWSALT
+	{ .name = "FS_IOC_GET_ENCRYPTION_PWSALT", .request = FS_IOC_GET_ENCRYPTION_PWSALT, },
+#endif
+#ifdef FS_IOC_GET_ENCRYPTION_POLICY
+	{ .name = "FS_IOC_GET_ENCRYPTION_POLICY", .request = FS_IOC_GET_ENCRYPTION_POLICY, },
+#endif
 };
 
 static const struct ioctl_group vfs_grp = {
-- 
2.13.0

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

* [PATCH 2/2] ioctls/vfs.c: FS_IOC_GETFSMAP
  2017-06-21 18:33 [PATCH 1/2] ioctls/vfs.c: add more ioctls from linux/fs.h Tommi Rantala
@ 2017-06-21 18:33 ` Tommi Rantala
  0 siblings, 0 replies; 2+ messages in thread
From: Tommi Rantala @ 2017-06-21 18:33 UTC (permalink / raw)
  To: davej; +Cc: trinity, Tommi Rantala

---
 configure    | 1 +
 ioctls/vfs.c | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/configure b/configure
index 8639a38e..450c94ad 100755
--- a/configure
+++ b/configure
@@ -291,6 +291,7 @@ fi
 #############################################################################################
 
 check_header linux/caif/caif_socket.h USE_CAIF
+check_header linux/fsmap.h USE_FSMAP
 check_header linux/if_alg.h USE_IF_ALG
 check_header linux/rds.h USE_RDS
 check_header linux/vfio.h USE_VFIO
diff --git a/ioctls/vfs.c b/ioctls/vfs.c
index 0bad6f56..1f60da45 100644
--- a/ioctls/vfs.c
+++ b/ioctls/vfs.c
@@ -2,6 +2,9 @@
 #include <linux/fiemap.h>
 #include <linux/fs.h>
 #include <linux/blktrace_api.h>
+#ifdef USE_FSMAP
+#include <linux/fsmap.h>
+#endif
 #include <linux/ioctl.h>
 #include <asm/ioctls.h>
 #include "ioctls.h"
@@ -241,6 +244,9 @@ static const struct ioctl vfs_ioctls[] = {
 #ifdef FS_IOC_GET_ENCRYPTION_POLICY
 	{ .name = "FS_IOC_GET_ENCRYPTION_POLICY", .request = FS_IOC_GET_ENCRYPTION_POLICY, },
 #endif
+#ifdef FS_IOC_GETFSMAP
+	{ .name = "FS_IOC_GETFSMAP", .request = FS_IOC_GETFSMAP, },
+#endif
 };
 
 static const struct ioctl_group vfs_grp = {
-- 
2.13.0

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

end of thread, other threads:[~2017-06-21 18:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-21 18:33 [PATCH 1/2] ioctls/vfs.c: add more ioctls from linux/fs.h Tommi Rantala
2017-06-21 18:33 ` [PATCH 2/2] ioctls/vfs.c: FS_IOC_GETFSMAP Tommi Rantala

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