Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1544743 > unrolled thread

[PATCH v3 3/5] fs: Wire up SED/Opal to ioctl

Started byScott Bauer <scott.bauer@intel.com>
First post2016-12-19 20:50 +0100
Last post2016-12-20 07:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v3 3/5] fs: Wire up SED/Opal to ioctl Scott Bauer <scott.bauer@intel.com> - 2016-12-19 20:50 +0100
    Re: [PATCH v3 3/5] fs: Wire up SED/Opal to ioctl Christoph Hellwig <hch@infradead.org> - 2016-12-20 07:30 +0100

#1544743 — [PATCH v3 3/5] fs: Wire up SED/Opal to ioctl

FromScott Bauer <scott.bauer@intel.com>
Date2016-12-19 20:50 +0100
Subject[PATCH v3 3/5] fs: Wire up SED/Opal to ioctl
Message-ID<sQc6B-3He-1@gated-at.bofh.it>
Adds a new sed_context pointer to file struct, for char devs who wish
to suppor SED.
Adds ioctl handling code.

Signed-off-by: Scott Bauer <scott.bauer@intel.com>
Signed-off-by: Rafael Antognolli <Rafael.Antognolli@intel.com>
---
 fs/ioctl.c         | 3 +++
 include/linux/fs.h | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/fs/ioctl.c b/fs/ioctl.c
index cb9b029..77def42 100644
--- a/fs/ioctl.c
+++ b/fs/ioctl.c
@@ -15,6 +15,7 @@
 #include <linux/writeback.h>
 #include <linux/buffer_head.h>
 #include <linux/falloc.h>
+#include <linux/sed.h>
 #include "internal.h"
 
 #include <asm/ioctls.h>
@@ -679,6 +680,8 @@ int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd,
 	default:
 		if (S_ISREG(inode->i_mode))
 			error = file_ioctl(filp, cmd, arg);
+		else if (is_sed_ioctl(cmd))
+			error = fdev_sed_ioctl(filp, cmd, arg);
 		else
 			error = vfs_ioctl(filp, cmd, arg);
 		break;
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 2ba0743..75a99e5 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -55,6 +55,7 @@ struct workqueue_struct;
 struct iov_iter;
 struct fscrypt_info;
 struct fscrypt_operations;
+struct sed_context;
 
 extern void __init inode_init(void);
 extern void __init inode_init_early(void);
@@ -853,6 +854,7 @@ struct file {
 #ifdef CONFIG_SECURITY
 	void			*f_security;
 #endif
+	struct sed_context      *f_sedctx;
 	/* needed for tty driver, and maybe others */
 	void			*private_data;
 
-- 
2.7.4

[toc] | [next] | [standalone]


#1544935

FromChristoph Hellwig <hch@infradead.org>
Date2016-12-20 07:30 +0100
Message-ID<sQm5X-1Si-15@gated-at.bofh.it>
In reply to#1544743
> @@ -853,6 +854,7 @@ struct file {
>  #ifdef CONFIG_SECURITY
>  	void			*f_security;
>  #endif
> +	struct sed_context      *f_sedctx;

Adding a new field to the global struct file for a block driver
feature is not acceptable.  And I don't really see why it would
be nessecary anyway.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web