- 08 8月, 2010 40 次提交
-
-
由 Stephen Hemminger 提交于
The struct cont_t is just a set of virtual function pointers. Signed-off-by: NStephen Hemminger <shemminger@vyatta.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Julia Lawall 提交于
Use memdup_user when user data is immediately copied into the allocated region. Some checkpatch cleanups in nearby code. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression from,to,size,flag; position p; identifier l1,l2; @@ - to = \(kmalloc@p\|kzalloc@p\)(size,flag); + to = memdup_user(from,size); if ( - to==NULL + IS_ERR(to) || ...) { <+... when != goto l1; - -ENOMEM + PTR_ERR(to) ...+> } - if (copy_from_user(to, from, size) != 0) { - <+... when != goto l2; - -EFAULT - ...+> - } // </smpl> Signed-off-by: NJulia Lawall <julia@diku.dk> Cc: Chirag Kantharia <chirag.kantharia@hp.com> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 FUJITA Tomonori 提交于
Jens, any reason why this isn't included in your for-2.6.36 yet? = From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Subject: [PATCH resend] scsi: convert discard to REQ_TYPE_FS from REQ_TYPE_BLOCK_PC The block layer (file systems) sends discard requests as REQ_TYPE_FS (the role of REQ_TYPE_FS is that setting up commands and interpreting the results). But SCSI-ml treats discard requests as REQ_TYPE_BLOCK_PC. scsi-ml can handle discard requests as REQ_TYPE_FS easily. scsi_setup_discard_cmnd() sets up struct request and the bio nicely. Only remaining issue is that discard requests can't be completed partially so we need to modify sd_done. This conversion also fixes the problem that discard requests aren't retried when possible (e.g. UNIT ATTENTION). Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: cleanup interrupt_not_for_us In the case of MSI/MSIX interrutps, we don't need to check if the interrupt is for us, and in the case of the intx interrupt handler, when checking if the interrupt is for us, we don't need to check if we're using MSI/MSIX, we know we're not. Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: change printks to dev_warn, etc. Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: separate cmd_alloc() and cmd_special_alloc() cmd_alloc() took a parameter which caused it to either allocate from a pre-allocated pool, or allocate using pci_alloc_consistent. This parameter is always known at compile time, so this would be better handled by breaking the function into two functions and differentiating the cases by function names. Same goes for cmd_free(). Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: use consistent variable names "h", for the hba structure and "c" for the command structures. and get rid of trivial CCISS_LOCK macro. Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: forbid hard reset of 640x boards The 6402/6404 are two PCI devices -- two Smart Array controllers -- that fit into one slot. It is possible to reset them independently, however, they share a battery backed cache module. One of the pair controls the cache and the 2nd one access the cache through the first one. If you reset the one controlling the cache, the other one will not be a happy camper. So we just forbid resetting this conjoined mess. Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: sanitize max commands Some controllers might try to tell us they support 0 commands in performant mode. This is a lie told by buggy firmware. We have to be wary of this lest we try to allocate a negative number of command blocks, which will be treated as unsigned, and get an out of memory condition. Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: Fix hard reset code. Smart Array controllers newer than the P600 do not honor the PCI power state method of resetting the controllers. Instead, in these cases we can get them to reset via the "doorbell" register. This escaped notice until we began using "performant" mode because the fact that the controllers did not reset did not normally impede subsequent operation, and so things generally appeared to "work". Once the performant mode code was added, if the controller does not reset, it remains in performant mode. The code immediately after the reset presumes the controller is in "simple" mode (which previously, it had remained in simple mode the whole time). If the controller remains in performant mode any code which presumes it is in simple mode will not work. So the reset needs to be fixed. Unfortunately there are some controllers which cannot be reset by either method. (eg. p800). We detect these cases by noticing that the controller seems to remain in performant mode even after a reset has been attempted. In those cases we ignore the controller, as any commands outstanding on it will result in stale completions. To sum up, we try to do a better job of resetting the controller if "reset_devices" is set, and if it doesn't work, we ignore that controller. Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: factor out cciss_reset_devices() Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
Rationale for this is that I will also need to use this code in fixing kdump host reset code prior to having the hba structure. Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: factor out cciss_enter_performant_mode Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: factor out cciss_wait_for_mode_change_ack() Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: make cciss_put_controller_into_performant_mode as __devinit Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: cleanup some debug ifdefs Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: factor out cciss_p600_dma_prefetch_quirk() Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: factor out cciss_enable_scsi_prefetch() Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: factor out CISS_signature_present() Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: factor out cciss_find_board_params Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: fix leak of ioremapped memory in cciss_pci_init error path. Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: factor out cciss_find_cfgtables Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: factor out cciss_wait_for_board_ready() Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: factor out cciss_find_memory_BAR() Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: remove board_id parameter from cciss_interrupt_mode() Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: factor out cciss_board_disabled Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: factor out cciss_lookup_board_id Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: save pdev pointer in per hba structure early to avoid passing it around so much. Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Stephen M. Cameron 提交于
cciss: Set the performant mode bit in the scsi half of the driver In a couple of places, the performant mode bit wasn't being set in the scsi half of the driver, causing commands to seem to hang. Use enqueue_cmd_and_start_io() where appropriate. This fixes a bug that echo engage scsi > /proc/driver/cciss/cciss0 would hang. Signed-off-by: NStephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Daniel Stodden 提交于
Signed-off-by: NDaniel Stodden <daniel.stodden@citrix.com> Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Daniel Stodden 提交于
This is just bd_openers, protected by the bd_mutex. Signed-off-by: NDaniel Stodden <daniel.stodden@citrix.com> Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Daniel Stodden 提交于
This is just bd_openers, protected by the bd_mutex. Signed-off-by: NDaniel Stodden <daniel.stodden@citrix.com> Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Daniel Stodden 提交于
Same approach as blkfront_closing: * Grab the bdev safely, holding the info mutex. * Zap xbdev safely, holding the info mutex. * Try bdev removal safely, holding bd_mutex. Signed-off-by: NDaniel Stodden <daniel.stodden@citrix.com> Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
-
由 Daniel Stodden 提交于
We cannot read backend state within bdev operations, because it risks grabbing the state change before xenbus gets to do it. Fixed by tracking deferral with a frontend switch to Closing. State exposure isn't strictly necessary, but the backends won't mind. For a 'clean' deferral this seems actually a more decent protocol than raising errors. Signed-off-by: NDaniel Stodden <daniel.stodden@citrix.com> Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Daniel Stodden 提交于
We need not mind if users grab a late handle on a closing disk. We probably even should not. But we have to make sure it's not a dead one already Let the bdev deal with a gendisk deleted under its feet. Takes the info mutex to decide a race against backend closing. Signed-off-by: NDaniel Stodden <daniel.stodden@citrix.com> Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Daniel Stodden 提交于
The bdev .open/.release fops race against backend switches to Closing, handled by the XenBus thread. The original code attempted to serialize block device holders and xenbus only via bd_mutex. This is insufficient, the info->bd pointer may already be stale (or null) while xenbus tries to bump up the refcount. Protect blkfront_info with a dedicated mutex. Signed-off-by: NDaniel Stodden <daniel.stodden@citrix.com> Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
-
由 Daniel Stodden 提交于
* Current blkfront_closing is rather a xlvbd_release_gendisk. Renamed in preparation of later patches (need the name again). * Removed the misleading comment -- this only applied to the backend switch handler, and the queue is already flushed btw. * Break out the xenbus call, callers know better when to switch frontend state. Signed-off-by: NDaniel Stodden <daniel.stodden@citrix.com> Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Daniel Stodden 提交于
Signed-off-by: NDaniel Stodden <daniel.stodden@citrix.com> Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
-
由 Daniel Stodden 提交于
The call to del_gendisk follows an non-refcounted gd->queue pointer. We release the last ref in blk_cleanup_queue. Fixed by reordering releases accordingly. Signed-off-by: NDaniel Stodden <daniel.stodden@citrix.com> Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
-
由 Daniel Stodden 提交于
According to the comments, this was how it's been done years ago, but apparently took an xbt pointer from elsewhere back then. The code was removed because of consistency issues: cancellation wont't roll back the saved xbdev->state. Still, unsolicited writes to the state field remain an issue, especially if device shutdown takes thread synchronization, and subtle races cause accidental recreation of the device node. Fixed by reintroducing the transaction. An internal one is sufficient, so the xbdev->state value remains consistent. Also fixes the original hack to prevent infinite recursion. Instead of bailing out on the first attempt to switch to Closing, checks call depth now. Signed-off-by: NDaniel Stodden <daniel.stodden@citrix.com> Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
-