Re: dd hangs when reading large partitions

2019-01-19 Thread Christoph Hellwig
On Fri, Jan 18, 2019 at 10:48:15AM -0700, Jens Axboe wrote: > It's UFS that totally buggy, if you look at its queuecommand, it does: > > if (!down_read_trylock(&hba->clk_scaling_lock)) > > return SCSI_MLQUEUE_HOST_BUSY; > > UFS either needs to get

Re: [PATCH 1/2] RDMA/srp: Avoid calling mutex_lock() from inside scsi_queue_rq()

2019-01-19 Thread Christoph Hellwig
On Wed, Jan 16, 2019 at 04:27:16PM -0800, Bart Van Assche wrote: > In scsi-mq mode it is not allowed to sleep inside srp_queuecommand() > since the flag BLK_MQ_F_BLOCKING has not been set. Since setting the > request queue flag BLK_MQ_F_BLOCKING would slow down the hot path, make > srp_queuecommand

Re: [PATCH 2/2] RDMA/srp: Rework SCSI device reset handling

2019-01-19 Thread Christoph Hellwig
> + /* Check whether all requests have finished. */ > + blk_freeze_queue_start(q); > + time_left = blk_mq_freeze_queue_wait_timeout(q, 1 * HZ); > + blk_mq_unfreeze_queue(q); > > + return time_left > 0 ? SUCCESS : FAILED; This is entirely generic SCSI/block evel functionality.

Re: dd hangs when reading large partitions

2019-01-19 Thread Jens Axboe
On 1/19/19 2:56 AM, Christoph Hellwig wrote: > On Fri, Jan 18, 2019 at 10:48:15AM -0700, Jens Axboe wrote: >> It's UFS that totally buggy, if you look at its queuecommand, it does: >> >> if (!down_read_trylock(&hba->clk_scaling_lock)) >> >> return S

Re: dd hangs when reading large partitions

2019-01-19 Thread Bart Van Assche
On 1/19/19 1:56 AM, Christoph Hellwig wrote: On Fri, Jan 18, 2019 at 10:48:15AM -0700, Jens Axboe wrote: It's UFS that totally buggy, if you look at its queuecommand, it does: if (!down_read_trylock(&hba->clk_scaling_lock)) return SCSI_MLQUEUE_HOST_BUSY; UFS either ne

Re: [PATCH v2] target: fix a missing check of match_int

2019-01-19 Thread Mike Christie
On 01/11/2019 11:31 PM, Kangjie Lu wrote: > When match_int fails, "arg" is left uninitialized and may contain random > value, thus should not be used. > The fix checks if match_int fails, and if so, returns its error code. > > Signed-off-by: Kangjie Lu > --- > drivers/target/target_core_rd.c | 1

Re: dd hangs when reading large partitions

2019-01-19 Thread Marc Gonzalez
On 19/01/2019 10:56, Christoph Hellwig wrote: > On Jan 18, 2019 at 10:48:15AM -0700, Jens Axboe wrote: > >> It's UFS that totally buggy, if you look at its queuecommand, it does: >> >> if (!down_read_trylock(&hba->clk_scaling_lock)) >> >> return SC

Re: dd hangs when reading large partitions

2019-01-19 Thread Marc Gonzalez
On 19/01/2019 20:47, Marc Gonzalez wrote: > On 19/01/2019 10:56, Christoph Hellwig wrote: > >> On Jan 18, 2019 at 10:48:15AM -0700, Jens Axboe wrote: >> >>> It's UFS that totally buggy, if you look at its queuecommand, it does: >>> >>> if (!down_read_trylock(&hba->clk_scaling_lock))