1. 25 1月, 2008 3 次提交
    • S
      [SCSI] aacraid: fib context lock for management ioctls · a119ee8e
      Salyzyn, Mark 提交于
      Alan noticed the lack of locking surrounding the driver's dealings
      with the fib context managed by the trio of ioctls that are used by
      the RAID management applications to retrieve Adapter Initiated FIBs. I
      merely expanded the fib lock to include the fib context. There have
      been no field reports of any issues generally because the applications
      are relatively static and do not come and go often enough to stress
      this area. I bloated this patch a little with some space junk.
      Signed-off-by: NMark Salyzyn <aacraid@adaptec.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      a119ee8e
    • F
      [SCSI] ch: remove forward declarations · 5aa22af3
      FUJITA Tomonori 提交于
      This moves ch_template and changer_fops structs to the end of file and
      removes forward declarations.
      
      This also removes some trailing whitespace.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      5aa22af3
    • F
      [SCSI] ch: fix device minor number management bug · da707c54
      FUJITA Tomonori 提交于
      ch_probe uses the total number of ch devices as minor.
      
      ch_probe:
      	ch->minor = ch_devcount;
      ...
      	ch_devcount++;
      
      Then ch_remove decreases ch_devcount:
      
      ch_remove:
      	ch_devcount--;
      
      If you have two ch devices, sch0 and sch1, and remove sch0,
      ch_devcount is 1. Then if you add another ch device, ch_probe tries to
      create sch1. So you get a warning and fail to create sch1:
      
      Jan 24 16:01:05 nice kernel: sysfs: duplicate filename 'sch1' can not be created
      Jan 24 16:01:05 nice kernel: WARNING: at fs/sysfs/dir.c:424 sysfs_add_one()
      Jan 24 16:01:05 nice kernel: Pid: 2571, comm: iscsid Not tainted 2.6.24-rc7-ga3d2c2e8-dirty #1
      Jan 24 16:01:05 nice kernel:
      Jan 24 16:01:05 nice kernel: Call Trace:
      Jan 24 16:01:05 nice kernel:  [<ffffffff802a22b8>] sysfs_add_one+0x54/0xbd
      Jan 24 16:01:05 nice kernel:  [<ffffffff802a283c>] create_dir+0x4f/0x87
      Jan 24 16:01:05 nice kernel:  [<ffffffff802a28a9>] sysfs_create_dir+0x35/0x4a
      Jan 24 16:01:05 nice kernel:  [<ffffffff803069a1>] kobject_get+0x12/0x17
      Jan 24 16:01:05 nice kernel:  [<ffffffff80306ece>] kobject_add+0xf3/0x1a6
      Jan 24 16:01:05 nice kernel:  [<ffffffff8034252b>] class_device_add+0xaa/0x39d
      Jan 24 16:01:05 nice kernel:  [<ffffffff803428fb>] class_device_create+0xcb/0xfa
      Jan 24 16:01:05 nice kernel:  [<ffffffff80229e09>] printk+0x4e/0x56
      Jan 24 16:01:05 nice kernel:  [<ffffffff802a2054>] sysfs_ilookup_test+0x0/0xf
      Jan 24 16:01:05 nice kernel:  [<ffffffff88022580>] :ch:ch_probe+0xbe/0x61a
      
      (snip)
      
      This patch converts ch to use a standard minor number management way,
      idr like sg and bsg.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      da707c54
  2. 24 1月, 2008 37 次提交