Files
kernel_xiaomi_sm8250/include/linux
FUJITA Tomonori abf5439370 block: move cmdfilter from gendisk to request_queue
cmd_filter works only for the block layer SG_IO with SCSI block
devices. It breaks scsi/sg.c, bsg, and the block layer SG_IO with SCSI
character devices (such as st). We hit a kernel crash with them.

The problem is that cmd_filter code accesses to gendisk (having struct
blk_scsi_cmd_filter) via inode->i_bdev->bd_disk. It works for only
SCSI block device files. With character device files, inode->i_bdev
leads you to struct cdev. inode->i_bdev->bd_disk->blk_scsi_cmd_filter
isn't safe.

SCSI ULDs don't expose gendisk; they keep it private. bsg needs to be
independent on any protocols. We shouldn't change ULDs to expose their
gendisk.

This patch moves struct blk_scsi_cmd_filter from gendisk to
request_queue, a common object, which eveyone can access to.

The user interface doesn't change; users can change the filters via
/sys/block/. gendisk has a pointer to request_queue so the cmd_filter
code accesses to struct blk_scsi_cmd_filter.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-08-27 09:50:19 +02:00
..
2008-07-25 10:53:30 -07:00
2008-08-10 23:32:07 +02:00
2008-07-27 01:26:17 +02:00
2008-08-05 14:33:46 -07:00
2008-08-12 10:13:38 +10:00
2008-08-18 21:40:05 +02:00
2008-08-04 21:56:09 -07:00
2008-07-25 10:53:33 -07:00
2008-08-20 13:19:51 -07:00
2008-08-12 16:07:31 -07:00
2008-07-26 20:53:20 -04:00
2008-07-25 10:53:48 -07:00
2008-07-25 10:53:30 -07:00
2008-08-08 15:13:27 +01:00
2008-08-05 18:17:01 +02:00
2008-07-25 10:53:42 -07:00
2008-08-02 18:36:10 +01:00
2008-07-25 10:53:39 -07:00
2008-07-30 09:41:43 -07:00
2008-07-30 09:41:45 -07:00
2008-08-25 17:28:25 +03:00
2008-08-08 16:17:16 -07:00
2008-08-11 15:25:07 +02:00
2008-07-27 01:56:38 +02:00
2008-07-27 01:54:58 +02:00
2008-08-02 16:28:50 +02:00
2008-08-16 16:45:56 -07:00
2008-08-16 16:45:56 -07:00
2008-07-28 16:30:21 -07:00
2008-07-25 10:53:34 -07:00
2008-08-26 10:37:20 -07:00
2008-08-04 23:04:08 -07:00
2008-08-04 21:31:34 -07:00
2008-08-04 21:31:34 -07:00
2008-07-26 12:00:03 -07:00
2008-08-07 15:33:36 -07:00
2008-08-05 14:33:50 -07:00
2008-07-26 20:53:12 -04:00
2008-08-07 17:18:47 -07:00
2008-07-25 10:53:29 -07:00
2008-08-11 09:30:24 +02:00
2008-07-25 10:53:29 -07:00
2008-08-20 15:40:32 -07:00
2008-07-25 21:45:49 -07:00
2008-08-17 22:47:30 +10:00
2008-07-25 10:53:42 -07:00
2008-08-15 19:52:30 -07:00
2008-08-05 09:28:47 +03:00
2008-07-25 10:53:30 -07:00
2008-07-27 01:47:00 +02:00
2008-08-11 09:30:24 +02:00
2008-07-26 12:00:12 -07:00
2008-07-26 20:53:12 -04:00
2008-08-07 17:18:47 -07:00
2008-08-15 10:34:07 -07:00
2008-08-16 16:45:56 -07:00
2008-07-25 10:53:40 -07:00