- 08 8月, 2010 40 次提交
-
-
由 Minchan Kim 提交于
83ba7b07 cleans up the writeback. So we don't use wb any more in get_next_work_item. Let's remove unnecessary argument. CC: Christoph Hellwig <hch@lst.de> Signed-off-by: NMinchan Kim <minchan.kim@gmail.com> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Miklos Szeredi 提交于
SPLICE_F_NONBLOCK is clearly documented to only affect blocking on the pipe. In __generic_file_splice_read(), however, it causes an EAGAIN if the page is currently being read. This makes it impossible to write an application that only wants failure if the pipe is full. For example if the same process is handling both ends of a pipe and isn't otherwise able to determine whether a splice to the pipe will fill it or not. We could make the read non-blocking on O_NONBLOCK or some other splice flag, but for now this is the simplest fix. Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz> CC: stable@kernel.org Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 Jeremy Fitzhardinge 提交于
If there's no feature-barrier key in xenstore, then it means its a fairly old backend which does uncached in-order writes, which means ORDERED_DRAIN is appropriate. Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
-
由 Jeremy Fitzhardinge 提交于
When barriers are supported, then use QUEUE_ORDERED_TAG to tell the block subsystem that it doesn't need to do anything else with the barriers. Previously we used ORDERED_DRAIN which caused the block subsystem to drain all pending IO before submitting the barrier, which would be very expensive. Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
-
由 FUJITA Tomonori 提交于
scsi-ml uses REQ_TYPE_BLOCK_PC for flush requests from file systems. The definition of REQ_TYPE_BLOCK_PC is that we don't retry requests even when we can (e.g. UNIT ATTENTION) and we send the response to the callers (then the callers can decide what they want). We need a workaround such as the commit 77a42297 to retry BLOCK_PC flush requests. We will need the similar workaround for discard requests too since SCSI-ml handle them as BLOCK_PC internally. This uses REQ_TYPE_FS for flush requests from file systems instead of REQ_TYPE_BLOCK_PC. scsi-ml retries only REQ_TYPE_FS requests that have data to transfer when we can retry them (e.g. UNIT_ATTENTION). However, we also need to retry REQ_TYPE_FS requests without data because the callers don't. This also changes scsi_check_sense() to retry all the REQ_TYPE_FS requests when appropriate. Thanks to scsi_noretry_cmd(), REQ_TYPE_BLOCK_PC requests don't be retried as before. Note that basically, this reverts the commit 77a42297 since now we use REQ_TYPE_FS for flush requests. Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 FUJITA Tomonori 提交于
q->bar_rq.rq_disk is NULL. Use the rq_disk of the original request instead. Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 FUJITA Tomonori 提交于
the block layer doesn't set rq->cmd_type on flush requests. By definition, it should be REQ_TYPE_FS (the lower layers build a command and interpret the result of it, that is, the block layer doesn't know the details). Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
-
由 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>
-