remove the raw driver
Subsystems (3)
PATCH 1/1 remove the raw driver
The raw driver used to provide direct unbuffered access to block devices before O_DIRECT was invented. It has been obsolete for more than a decade.
--- drivers/char/Kconfig | 21 --- drivers/char/Makefile | 1 - drivers/char/mem.c | 1 - drivers/char/raw.c | 362 --------------------------------------- fs/block_dev.c | 6 +- include/linux/fs.h | 3 - include/uapi/linux/raw.h | 17 -- 7 files changed, 2 insertions(+), 409 deletions(-) delete mode 100644 drivers/char/raw.c delete mode 100644 include/uapi/linux/raw.h
drivers/char/Kconfig +0 -21
@@ -357,27 +357,6 @@ config NVRAM To compile this driver as a module, choose M here: the module will be called nvram. -config RAW_DRIVER - tristate "RAW driver (/dev/raw/rawN)" - depends on BLOCK - help - The raw driver permits block devices to be bound to /dev/raw/rawN. - Once bound, I/O against /dev/raw/rawN uses efficient zero-copy I/O. - See the raw(8) manpage for more details. - - Applications should preferably open the device (eg /dev/hda1) - with the O_DIRECT flag. - -config MAX_RAW_DEVS - int "Maximum number of RAW devices to support (1-65536)" - depends on RAW_DRIVER - range 1 65536 - default "256" - help - The maximum number of RAW devices that are supported. - Default is 256. Increase this number in case you need lots of - raw devices. - config DEVPORT bool "/dev/port character device" depends on ISA || PCI
drivers/char/Makefile +0 -1
@@ -8,7 +8,6 @@ obj-$(CONFIG_TTY_PRINTK) += ttyprintk.o obj-y += misc.o obj-$(CONFIG_ATARI_DSP56K) += dsp56k.o obj-$(CONFIG_VIRTIO_CONSOLE) += virtio_console.o -obj-$(CONFIG_RAW_DRIVER) += raw.o obj-$(CONFIG_MSPEC) += mspec.o obj-$(CONFIG_UV_MMTIMER) += uv_mmtimer.o obj-$(CONFIG_IBM_BSR) += bsr.o
drivers/char/mem.c +0 -1
@@ -16,7 +16,6 @@#include <linux/mman.h> #include <linux/random.h> #include <linux/init.h> -#include <linux/raw.h> #include <linux/tty.h> #include <linux/capability.h> #include <linux/ptrace.h>
drivers/char/raw.c deleted +0 -362
362 lines not on this page · raw message
fs/block_dev.c +2 -4
@@ -1669,7 +1669,7 @@ static long block_ioctl(struct file *file, unsigned cmd, unsigned long arg)* Does not take i_mutex for the write and thus is not for general purpose * use. */ -ssize_t blkdev_write_iter (struct kiocb *iocb,struct iov_iter *from) +static ssize_t blkdev_write_iter (struct kiocb *iocb,struct iov_iter *from) {struct file *file = iocb->ki_filp;struct inode *bd_inode =bdev_file_inode (file);
@@ -1707,9 +1707,8 @@ ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from)blk_finish_plug (&plug);return ret; } -EXPORT_SYMBOL_GPL (blkdev_write_iter); -ssize_t blkdev_read_iter (struct kiocb *iocb,struct iov_iter *to) +static ssize_t blkdev_read_iter (struct kiocb *iocb,struct iov_iter *to) {struct file *file = iocb->ki_filp;struct inode *bd_inode =bdev_file_inode (file);
@@ -1731,7 +1730,6 @@ ssize_t blkdev_read_iter(struct kiocb *iocb, struct iov_iter *to)iov_iter_reexpand (to,iov_iter_count (to) + shorted);return ret; } -EXPORT_SYMBOL_GPL (blkdev_read_iter);/* * Try to release a page associated with block device when the system
include/linux/fs.h +0 -3
@@ -3242,11 +3242,8 @@ ssize_t vfs_iocb_iter_write(struct file *file, struct kiocb *iocb, struct iov_iter *iter);/* fs/block_dev.c */ -extern ssize_t blkdev_read_iter (struct kiocb *iocb,struct iov_iter *to); -extern ssize_t blkdev_write_iter (struct kiocb *iocb,struct iov_iter *from);extern int blkdev_fsync (struct file *filp,loff_t start,loff_t end,int datasync); -extern void block_sync_page (struct page *page);/* fs/splice.c */ extern ssize_t generic_file_splice_read(struct file *, loff_t *,
include/uapi/linux/raw.h deleted +0 -17
@@ -1,17 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef __LINUX_RAW_H -#define __LINUX_RAW_H - -#include <linux/types.h> - -#define RAW_SETBIND _IO( 0xac, 0 ) -#define RAW_GETBIND _IO( 0xac, 1 ) - -struct raw_config_request -{ -int raw_minor; -__u64 block_major; -__u64 block_minor; -}; - -#endif /* __LINUX_RAW_H */
Signature · 1 line
2.30.2
Quoted 3 lines · Christoph Hellwig
The raw driver used to provide direct unbuffered access to block devices before
O_DIRECTwas invented. It has been obsolete for more than a decade.
What? Really? We can finally do this? Yes!
For some reason, I thought there was some IBM userspace tools that relied on this device, if not, then great!
Quoted 1 line
Signed-off-by Christoph Hellwig <[email protected]>
Greg KH
maintainerQuoted 5 lines · Greg KH
Quoted 3 lines · Christoph Hellwig
The raw driver used to provide direct unbuffered access to block devices before
O_DIRECTwas invented. It has been obsolete for more than a decade.
Quoted 9 lines
What? Really? We can finally do this? Yes!
For some reason, I thought there was some IBM userspace tools that relied on this device, if not, then great!
Quoted 1 line
Signed-off-by Christoph Hellwig <[email protected]>
Ah wait, this is in my subsystem :)
I'll queue this up in a few days if no one complains.
thanks,
greg k-h
Quoted 6 lines · Greg KH
Quoted 3 lines · Christoph Hellwig
The raw driver used to provide direct unbuffered access to block devices before
O_DIRECTwas invented. It has been obsolete for more than a decade.
Quoted 8 lines
What? Really? We can finally do this? Yes!
For some reason, I thought there was some IBM userspace tools that relied on this device, if not, then great!
Quoted 1 line
Signed-off-by Christoph Hellwig <[email protected]>
The discussion from 2007 is the last one I could find on lore that has useful information on when and why this was not removed in the past. The driver was scheduled from a 2005 removal in 2004, but not removed because both Red Hat and SuSE relied on the feature in their distros.
From what I could find out, this continued to be the case in Red Hat Enterprise Linux 6 and SUSE Linux Enterprise server 11 that were supported between 2009 and 2020, but the following versions dropped the support.
Arnd
Quoted 24 lines · Arnd Bergmann
Quoted 6 lines · Greg KH
Quoted 3 lines · Christoph Hellwig
The raw driver used to provide direct unbuffered access to block devices before
O_DIRECTwas invented. It has been obsolete for more than a decade.Quoted 8 lines
What? Really? We can finally do this? Yes!
For some reason, I thought there was some IBM userspace tools that relied on this device, if not, then great!
Quoted 1 line
Signed-off-by Christoph Hellwig <[email protected]>Acked-by Arnd Bergmann <[email protected]>The discussion from 2007 is the last one I could find on lore that has useful information on when and why this was not removed in the past. The driver was scheduled from a 2005 removal in 2004, but not removed because both Red Hat and SuSE relied on the feature in their distros.
Quoted 5 lines
From what I could find out, this continued to be the case in Red Hat
Enterprise Linux 6 and SUSE Linux Enterprise server 11 that were supported between 2009 and 2020, but the following versions dropped the support.
Which I can confirm for SUSE.
Cheers,
Hannes
Signature · 4 lines
Dr. Hannes Reinecke Kernel Storage Architect [email protected] +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
Greg KH
maintainerQuoted 25 lines · Hannes Reinecke
Quoted 24 lines · Arnd Bergmann
Quoted 6 lines · Greg KH
Quoted 3 lines · Christoph Hellwig
The raw driver used to provide direct unbuffered access to block devices before
O_DIRECTwas invented. It has been obsolete for more than a decade.Quoted 8 lines
What? Really? We can finally do this? Yes!
For some reason, I thought there was some IBM userspace tools that relied on this device, if not, then great!
Quoted 1 line
Signed-off-by Christoph Hellwig <[email protected]>Acked-by Arnd Bergmann <[email protected]>The discussion from 2007 is the last one I could find on lore that has useful information on when and why this was not removed in the past. The driver was scheduled from a 2005 removal in 2004, but not removed because both Red Hat and SuSE relied on the feature in their distros.
Quoted 6 lines
Quoted 5 lines
From what I could find out, this continued to be the case in Red Hat
Enterprise Linux 6 and SUSE Linux Enterprise server 11 that were supported between 2009 and 2020, but the following versions dropped the support.Which I can confirm for SUSE.
Thanks, I've queued this up now.
greg k-h