13 Mar, 2009

1 commit


21 Oct, 2008

1 commit


09 Oct, 2008

1 commit

  • Move disk->holder_dir to part0->holder_dir. Kill now mostly
    superflous bdev_get_holder().

    While at it, kill superflous kobject_get/put() around holder_dir,
    slave_dir and cmd_filter creation and collapse
    disk_sysfs_add_subdirs() into register_disk(). These serve no purpose
    but obfuscating the code.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jens Axboe

    Tejun Heo
     

11 Sep, 2008

1 commit


29 Aug, 2008

1 commit

  • This patch remove blk_register_filter and blk_unregister_filter in
    gendisk, and adds them to sd.c, sr.c. and ide-cd.c

    The commit abf5439370491dd6fbb4fe1a7939680d2a9bc9d4 moved cmdfilter
    from gendisk to request_queue. It turned out that in some subsystems
    multiple gendisks share a single request_queue. So we get:

    Using physmap partition information
    Creating 3 MTD partitions on "physmap-flash":
    0x00000000-0x01c00000 : "User FS"
    0x01c00000-0x01c40000 : "booter"
    kobject (8511c410): tried to init an initialized object, something is seriously wrong.
    Call Trace:
    [] dump_stack+0x8/0x34
    [] kobject_init+0x50/0xcc
    [] kobject_init_and_add+0x24/0x58
    [] blk_register_filter+0x4c/0x64
    [] add_disk+0x78/0xe0
    [] add_mtd_blktrans_dev+0x254/0x278
    [] blktrans_notify_add+0x40/0x78
    [] add_mtd_device+0xd0/0x150
    [] add_mtd_partitions+0x568/0x5d8
    [] physmap_flash_probe+0x2ac/0x334
    [] driver_probe_device+0x12c/0x244
    [] __driver_attach+0x4c/0x84
    [] bus_for_each_dev+0x58/0xac
    [] bus_add_driver+0xc4/0x24c
    [] driver_register+0xcc/0x184
    [] _stext+0x60/0x1bc

    In the long term, we need to fix such subsystems but we need a quick
    fix now. This patch add the command filter support to only sd and sr
    though it might be useful for other SG_IO users (such as cciss).

    Signed-off-by: FUJITA Tomonori
    Reported-by: Manuel Lauss
    Signed-off-by: Jens Axboe

    FUJITA Tomonori
     

27 Aug, 2008

3 commits

  • This patch changes the interface of the cmd filter to use a +/-
    notation like:

    echo -- +0x02 +0x03 -0x08

    If neither + or - is given it defaults to + (allow command).

    Note: The interface was added in 2.6.17-rc1 and is unused and
    undocumented so far so it's safe to change it.

    Reviewed-by: Matthew Wilcox
    Reviewed-by: FUJITA Tomonori
    Cc: jens.axboe@oracle.com
    Cc: James.Bottomley@hansenpartnership.com
    Cc: dan.j.williams@intel.com
    Cc: pjones@redhat.com
    Cc: viro@zeniv.linux.org.uk
    Cc: dougg@torque.net
    Signed-off-by: Adel Gadllah
    Signed-off-by: Jens Axboe

    Adel Gadllah
     
  • Technically, the cmd_filter would be applied to other protocols though
    it's unlikely to happen. Putting SCSI stuff to request_queue is kinda
    layer violation. So let's rename it.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Jens Axboe

    FUJITA Tomonori
     
  • 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
    Signed-off-by: Jens Axboe

    FUJITA Tomonori
     

03 Jul, 2008

2 commits