This repository has been archived on 2026-03-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
ubports_kernel_google_msm/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-08-10 23:32:07 +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-20 13:19:51 -07:00
2008-08-12 16:07:31 -07:00
2008-08-08 15:13:27 +01:00
2008-08-05 18:17:01 +02: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-08-16 16:45:56 -07:00
2008-08-16 16:45:56 -07:00
2008-08-26 10:37:20 -07:00
2008-08-07 15:33:36 -07:00
2008-08-05 14:33:50 -07:00
2008-08-07 17:18:47 -07:00
2008-08-11 09:30:24 +02:00
2008-08-20 15:40:32 -07:00
2008-08-17 22:47:30 +10:00
2008-08-15 19:52:30 -07:00
2008-08-11 09:30:24 +02: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