23 Nov, 2009
1 commit
-
On driver unload, only free up the extra scatter gather data if they were
allocated in the first place (the controller supports it) and don't forget
to free up the sg_cmd_list array of pointers.Signed-off-by: Don Brace
Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe
13 Nov, 2009
10 commits
-
cciss: Fix weird usage of ENXIO in cciss_scsi.c
Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
cciss: Add enhanced scatter-gather support. For controllers which
supported, more than 512 scatter-gather elements per command may
be used, and the max transfer size can be increased to 8192 blocks.Signed-off-by: Don Brace
Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
cciss: Do not automatically rescan on UNIT ATTENTION/LUN DATA CHANGED
There are problems with doing this. If, say, several logical drives
are deleted at once, several such UNIT ATTENTIONS will be encountered,
often during the rescan triggered by the first such UNIT ATTENTION.
The block layer may be in the midst of trying to add logical drives
which were just deleted (resulting in the subsequent UNIT ATTENTION(s).)
Making the rescan code robust enough to tolerate this kind of thing
is too complicated for the moment. So, for now, we just don't do it.
Note: This UNIT ATTENTION/LUN DATA CHANGED situation only occurs on
the MSA2012.Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
cciss: Remove unnecessary check in scan_thread
Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
cciss: remove sendcmd() as it is no longer used.
Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
cciss: clean up code in cciss_shutdown. Send the flush cache
command down with interrupts still enabled, and do not do DMA
from the stack.Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
cciss: Remove the "withirq" parameter from various functions where possible
Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
cciss: Retry driver initiated cmds with unit attention condition
Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
cciss: Fix problem with remove_from_scan_list that on driver unload
it doesn't remove the controller from the scan list correctly if
the controller is currently being scanned for new devices.Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
cciss: Make device attributes static
Cc: Stephen M. Cameron
Signed-off-by: Alex Chiang
Acked-by: Stephen M. Cameron
Signed-off-by: Jens Axboe
13 Oct, 2009
2 commits
-
Add cciss_allow_hpsa module parameter. This parameter causes
the cciss driver to ignore any Smart Array devices known to be
supported by the hpsa driver.Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
Fix multiple calls to pci_release_regions. If cciss_pci_init
fails, it already does any necessary call to pci_release_regions,
so this does not need to be done again in cciss_init_one in that
case.Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe
05 Oct, 2009
1 commit
-
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: (41 commits)
Revert "Seperate read and write statistics of in_flight requests"
cfq-iosched: don't delay async queue if it hasn't dispatched at all
block: Topology ioctls
cfq-iosched: use assigned slice sync value, not default
cfq-iosched: rename 'desktop' sysfs entry to 'low_latency'
cfq-iosched: implement slower async initiate and queue ramp up
cfq-iosched: delay async IO dispatch, if sync IO was just done
cfq-iosched: add a knob for desktop interactiveness
Add a tracepoint for block request remapping
block: allow large discard requests
block: use normal I/O path for discard requests
swapfile: avoid NULL pointer dereference in swapon when s_bdev is NULL
fs/bio.c: move EXPORT* macros to line after function
Add missing blk_trace_remove_sysfs to be in pair with blk_trace_init_sysfs
cciss: fix build when !PROC_FS
block: Do not clamp max_hw_sectors for stacking devices
block: Set max_sectors correctly for stacking devices
cciss: cciss_host_attr_groups should be const
cciss: Dynamically allocate the drive_info_struct for each logical drive.
cciss: Add usage_count attribute to each logical drive in /sys
...
02 Oct, 2009
24 commits
-
[akpm@linux-foundation.org: fix KVM]
Signed-off-by: Alexey Dobriyan
Acked-by: Mike Frysinger
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Fix these build errors when CONFIG_PROC_FS is not set:
drivers/block/cciss.c: In function 'cciss_show_raid_level':
drivers/block/cciss.c:623: error: 'RAID_UNKNOWN' undeclared (first use in this function)
drivers/block/cciss.c:626: error: 'raid_label' undeclared (first use in this function)
drivers/block/cciss.c: In function 'cciss_geometry_inquiry':
drivers/block/cciss.c:2696: error: 'RAID_UNKNOWN' undeclared (first use in this function)Signed-off-by: Alexander Beregalov
Signed-off-by: Jens Axboe -
Signed-off-by: Jens Axboe
-
cciss: Dynamically allocate the drive_info_struct for each logical drive.
This reduces the size of the per-hba ctlr_info structure from 106936
bytes to 8132 bytes. That's on 32-bit systems. On 64-bit systems, the
improvement is even bigger. Without this, the ctlr_info struct is so big
that the driver won't even load on a 64 bit system if CISS_MAX_LUN was
at it's current setting of 1024 logical drives.Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
Add usage_count attribute to each logical drive at
/sys/devices//ccissX/cXdY/usage_count for controller X,
logical drive Y. The usage count is the number of times
the device has currently been opened.Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
and change get rid of some magic numbers in raid lavel decoding.
Add raid_level attribute to each logical drive at
/sys/devices//ccissX/cXdY/raid_level for controller X,
logical drive YSigned-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
cciss: fix some magic numbers in the raid-level decoding
Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
Add lunid attribute to each logical drive at
/sys/devices//ccissX/cXdY/lunid for controller X,
logical drive YSigned-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
Don't check h->busy_initializing in cciss_open(). Open won't be
called before things are ready, but h->busy_initializing won't be
unset until after the initial rebuild_lun_table is finished. But,
to read the partitions, cciss_open will be called for each logical
drive during rebuild_lun_table. If cciss_open checks h->busy_initializing,
then the reading of the partition information during the initial
rebuild_lun_table will fail, which is especially bad news if it
happens to be your boot device.Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
Preserve all 8 bytes of the LunID field returned
by CCISS_REPORT_LOGICAL instead of only saving 4 bytes.
This fixes a bug with logical volume addressing encountered on
an MSA2012.Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
Silence noisy per-disk messages output by cciss_read_capacity
Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
Fix bug that free_hba was calling put_disk for all gendisk[]
pointers -- all 1024 of them -- regardless of whether the were
used or not (NULL). This bug could cause rmmod to oops if logical
drives had been deleted during the driver's lifetime.Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
When rebuild_lun_table is reached via sysfs, the usage count that
is checked prior to messing with c0d0 has different constraints
(must be zero) than if rebuild_lun_table is reached via ioctl
(must be one.) Fix rebuild_lun_table to take that into account.Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
When removing a logical drive, clear all the information that is
now exposed by sysfs (e.g. vendor, model, serial number.)Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
For c0dx where x is not 0, we handle deletion and addition simply,
but for c0d0, there is the special case that even when there's no
disk, the device node exists so that the controller may be accessed.
So, for c0d0, we only create the sysfs entries once, when a controller
is added, and only remove them once, when a controller is being
taken down.Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
Handle cases when cciss_add_disk fails.
Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
Handle failure of blk_init_queue gracefully in cciss_add_disk.
Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
Rearrange logical drive sysfs code to make the "changing a disk" path work.
Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
Dynamically allocate struct device for each logical drive as needed
instead of allocating the maximum we would ever need at driver init time.Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
Remove some unused code in rebuild_lun_table()
Signed-off-by: Stephen M. Cameron
Signed-off-by: Jens Axboe -
Added /sys/bus/pci/devices//ccissX/rescan sysfs entry used
to kick off a rescan that discovers logical drive topology changes.Signed-off-by: Andrew Patterson
Signed-off-by: Stephen M. Cameron
Acked-by: Mike Miller
Signed-off-by: Jens Axboe -
Replace the use of one scan kthread per controller with one per driver.
Use a queue to hold a list of controllers that need to be rescanned with
routines to add and remove controllers from the queue.Fix locking and completion handling to prevent a hang during rmmod.
Signed-off-by: Andrew Patterson
Signed-off-by: Stephen M. Cameron
Acked-by: Mike Miller
Signed-off-by: Jens Axboe -
Sysfs entries for logical drives need to be removed when a drive is
deleted during driver cleanup.Signed-off-by: Andrew Patterson
Signed-off-by: Stephen M. Cameron
Acked-by: Mike Miller
Signed-off-by: Jens Axboe -
Change schedule_timeout() parameter to not be specific to HZ=1000.
Signed-off-by: Randy Dunlap
Acked-by: Mike Miller
Cc: Marcin Slusarz
Cc: "Cameron, Steve"
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe
23 Sep, 2009
1 commit
-
Make all seq_operations structs const, to help mitigate against
revectoring user-triggerable function pointers.This is derived from the grsecurity patch, although generated from scratch
because it's simpler than extracting the changes from there.Signed-off-by: James Morris
Acked-by: Serge Hallyn
Acked-by: Casey Schaufler
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
22 Sep, 2009
1 commit
-
Signed-off-by: Alexey Dobriyan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds