Re: [PATCH v5 00/17] fs: introduce new writeback error reporting and convert ext2 and ext4 to use it

2017-06-01 Thread Ross Zwisler
On Wed, May 31, 2017 at 08:45:23AM -0400, Jeff Layton wrote: > v5: don't retrofit old API over the new infrastructure > add fstype flag to indicate how wb errors are tracked within that fs > add more function variants that take a errseq_t "since" value > add second errseq_t to struct

Re: [PATCH v3 3/4] blk-mq-debugfs: Show busy requests

2017-06-01 Thread Ming Lei
On Thu, Jun 01, 2017 at 08:55:12AM -0700, Bart Van Assche wrote: > Requests that got stuck in a block driver are neither on > blk_mq_ctx.rq_list nor on any hw dispatch queue. Make these > visible in debugfs through the "busy" attribute. > > Signed-off-by: Bart Van Assche

Re: [PATCH v3 5/9] blk-mq: fix blk_mq_quiesce_queue

2017-06-01 Thread Ming Lei
On Thu, Jun 01, 2017 at 11:19:11PM +, Bart Van Assche wrote: > On Thu, 2017-06-01 at 10:21 +0800, Ming Lei wrote: > > On Wed, May 31, 2017 at 03:37:30PM +, Bart Van Assche wrote: > > > On Wed, 2017-05-31 at 20:37 +0800, Ming Lei wrote: > > > > > > > > + /* wait until queue is

Re: [PATCH v3 3/9] blk-mq: use the introduced blk_mq_unquiesce_queue()

2017-06-01 Thread Ming Lei
On Thu, Jun 01, 2017 at 11:09:00PM +, Bart Van Assche wrote: > On Thu, 2017-06-01 at 08:54 +0800, Ming Lei wrote: > > On Wed, May 31, 2017 at 03:21:41PM +, Bart Van Assche wrote: > > > On Wed, 2017-05-31 at 20:37 +0800, Ming Lei wrote: > > > > diff --git a/drivers/scsi/scsi_lib.c

Re: [PATCH v3 5/9] blk-mq: fix blk_mq_quiesce_queue

2017-06-01 Thread Bart Van Assche
On Thu, 2017-06-01 at 10:21 +0800, Ming Lei wrote: > On Wed, May 31, 2017 at 03:37:30PM +, Bart Van Assche wrote: > > On Wed, 2017-05-31 at 20:37 +0800, Ming Lei wrote: > > > > > > + /* wait until queue is unquiesced */ > > > + wait_event_cmd(q->quiesce_wq, !blk_queue_quiesced(q), > > > +

Re: [PATCH v3 3/9] blk-mq: use the introduced blk_mq_unquiesce_queue()

2017-06-01 Thread Bart Van Assche
On Thu, 2017-06-01 at 08:54 +0800, Ming Lei wrote: > On Wed, May 31, 2017 at 03:21:41PM +, Bart Van Assche wrote: > > On Wed, 2017-05-31 at 20:37 +0800, Ming Lei wrote: > > > diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c > > > index 99e16ac479e3..ffcf05765e2b 100644 > > > ---

Re: [PATCH v2 12/12] block: Rename blk_mq_rq_{to,from}_pdu()

2017-06-01 Thread Jens Axboe
On 06/01/2017 12:17 PM, Bart Van Assche wrote: > On Thu, 2017-06-01 at 12:06 -0700, Jens Axboe wrote: >> On 06/01/2017 06:11 AM, Bart Van Assche wrote: >>> On Thu, 2017-06-01 at 08:08 +0200, Christoph Hellwig wrote: On Wed, May 31, 2017 at 03:52:46PM -0700, Bart Van Assche wrote: > Commit

Re: [PATCH v2 12/12] block: Rename blk_mq_rq_{to,from}_pdu()

2017-06-01 Thread Bart Van Assche
On Thu, 2017-06-01 at 12:06 -0700, Jens Axboe wrote: > On 06/01/2017 06:11 AM, Bart Van Assche wrote: > > On Thu, 2017-06-01 at 08:08 +0200, Christoph Hellwig wrote: > > > On Wed, May 31, 2017 at 03:52:46PM -0700, Bart Van Assche wrote: > > > > Commit 6d247d7f71d1 ("block: allow specifying size

Re: blk-mq: free callback if error occurs in blk_mq_init_allocated_queue

2017-06-01 Thread Omar Sandoval
On Thu, Jun 01, 2017 at 01:02:40PM +0800, Joseph Qi wrote: > From: Joseph Qi > > If error occurs, we have to free the allocated callback in > blk_mq_init_allocated_queue to avoid memory leaking. Nak. If blk_mq_init_allocated_queue() fails, we call blk_cleanup_queue()

Re: [PATCH v2 0/6] Split scsi passthrough fields out of struct request sequel

2017-06-01 Thread Jens Axboe
On 05/31/2017 02:43 PM, Bart Van Assche wrote: > Hello Jens, > > The patches in this series are a sequel of Christoph's "Split scsi passthrough > fields out of struct request" patch series. The changes compared to v1 of this > patch series are: > - Renamed QUEUE_FLAG_SCSI_PDU into

Re: [PATCH v2 1/6] block: Avoid that blk_exit_rl() triggers a use-after-free

2017-06-01 Thread Jens Axboe
On 05/31/2017 02:43 PM, Bart Van Assche wrote: > Since the introduction of .init_rq_fn() and .exit_rq_fn() it is > essential that the memory allocated for struct request_queue > stays around until all blk_exit_rl() calls have finished. Hence > make blk_init_rl() take a reference on struct

Re: [PATCH v2 12/12] block: Rename blk_mq_rq_{to,from}_pdu()

2017-06-01 Thread Jens Axboe
On 06/01/2017 06:11 AM, Bart Van Assche wrote: > On Thu, 2017-06-01 at 08:08 +0200, Christoph Hellwig wrote: >> On Wed, May 31, 2017 at 03:52:46PM -0700, Bart Van Assche wrote: >>> Commit 6d247d7f71d1 ("block: allow specifying size for extra command >>> data") added support for .cmd_size to

Re: [PATCH v2 12/12] block: Rename blk_mq_rq_{to,from}_pdu()

2017-06-01 Thread Jens Axboe
On 05/31/2017 11:08 PM, Christoph Hellwig wrote: > On Wed, May 31, 2017 at 03:52:46PM -0700, Bart Van Assche wrote: >> Commit 6d247d7f71d1 ("block: allow specifying size for extra command >> data") added support for .cmd_size to blk-sq. Due to that patch the >> blk_mq_rq_{to,from}_pdu() functions

Re: [PATCH v3 0/4] Extend blk-mq-debugfs functionality further

2017-06-01 Thread Jens Axboe
On 06/01/2017 08:55 AM, Bart Van Assche wrote: > Hello Jens, > > This series contains four patches that add new features to the blk-mq-debugfs > code. Please consider these patches for kernel v4.13. > > Thanks, > > Bart. > > Changes between v2 and v3: > - Renamed a function in the patch that

Re: [PATCH v3 0/4] Extend blk-mq-debugfs functionality further

2017-06-01 Thread Eduardo Valentin
On Thu, Jun 01, 2017 at 08:55:09AM -0700, Bart Van Assche wrote: > Hello Jens, > > This series contains four patches that add new features to the blk-mq-debugfs > code. Please consider these patches for kernel v4.13. > > Thanks, > > Bart. > > Changes between v2 and v3: > - Renamed a function

[PATCH v3 1/4] blk-mq-debugfs: Show atomic request flags

2017-06-01 Thread Bart Van Assche
When analyzing e.g. queue lockups it is important to know whether or not a request has already been started. Hence also show the atomic request flags. Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Reviewed-by: Ming Lei

[PATCH v3 3/4] blk-mq-debugfs: Show busy requests

2017-06-01 Thread Bart Van Assche
Requests that got stuck in a block driver are neither on blk_mq_ctx.rq_list nor on any hw dispatch queue. Make these visible in debugfs through the "busy" attribute. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke

[PATCH v3 0/4] Extend blk-mq-debugfs functionality further

2017-06-01 Thread Bart Van Assche
Hello Jens, This series contains four patches that add new features to the blk-mq-debugfs code. Please consider these patches for kernel v4.13. Thanks, Bart. Changes between v2 and v3: - Renamed a function in the patch that shows busy requests. In the same patch, added a comment as requested

[PATCH v3 4/4] blk-mq-debugfs: Add 'kick' operation

2017-06-01 Thread Bart Van Assche
Running a queue causes the block layer to examine the per-CPU and hw queues but not the requeue list. Hence add a 'kick' operation that also examines the requeue list. Signed-off-by: Bart Van Assche Reviewed-by: Ming Lei Cc: Christoph Hellwig

[PATCH v3 2/4] blk-mq-debugfs: Show requeue list

2017-06-01 Thread Bart Van Assche
When verifying whether or not a blk-mq driver forgot to kick the requeue list after having requeued a request it is important to be able to verify the contents of the requeue list. Hence export that list through debugfs. Signed-off-by: Bart Van Assche Reviewed-by:

Re: [PATCH 00/31] SCSI patches for kernel v4.13.

2017-06-01 Thread Christoph Hellwig
On Thu, Jun 01, 2017 at 02:08:04PM +, Bart Van Assche wrote: > The first eight patches in this series do not depend on any block layer > changes. > Do you want me to repost this patches or can you perhaps queue these without a > repost? It would be great if you could repost them, also for

Re: [PATCH 00/31] SCSI patches for kernel v4.13.

2017-06-01 Thread Bart Van Assche
On Wed, 2017-05-24 at 22:04 -0400, Martin K. Petersen wrote: > > This patch series consists of the bug fixes I came up with during the > > past two months. Please consider these patches for kernel v4.13. > > No major objections from me. Although you may have to slice and dice the > series

Re: [PATCH v2 6/6] nfsd: Check queue type before submitting a SCSI request

2017-06-01 Thread J . Bruce Fields
Feel free to add Acked-by: J. Bruce Fields if you need it.--b. On Wed, May 31, 2017 at 02:43:50PM -0700, Bart Van Assche wrote: > Since using scsi_req() is only allowed against request queues for > which struct scsi_request is the first member of their private >

Re: [PATCH v2 12/12] block: Rename blk_mq_rq_{to,from}_pdu()

2017-06-01 Thread Bart Van Assche
On Thu, 2017-06-01 at 08:08 +0200, Christoph Hellwig wrote: > On Wed, May 31, 2017 at 03:52:46PM -0700, Bart Van Assche wrote: > > Commit 6d247d7f71d1 ("block: allow specifying size for extra command > > data") added support for .cmd_size to blk-sq. Due to that patch the > >

Re: [PATCH 2/8] target: remove iblock WRITE_SAME passthrough support

2017-06-01 Thread Christoph Hellwig
On Wed, May 31, 2017 at 11:27:01PM -0700, Nicholas A. Bellinger wrote: > Hey HCH & Jens, > > Is this already queued up for v4.13 to address the missing LBPRZ feature > bit..? > > If not, I'll happy to take it via target-pending along with the > following to re-enable it via

Re: [PATCH 2/8] target: remove iblock WRITE_SAME passthrough support

2017-06-01 Thread Nicholas A. Bellinger
Hey HCH & Jens, Is this already queued up for v4.13 to address the missing LBPRZ feature bit..? If not, I'll happy to take it via target-pending along with the following to re-enable it via max_write_zeroes_sectors. diff --git a/drivers/target/target_core_device.c

Re: [PATCH v2 11/12] blk-mq: Warn when attempting to run a hardware queue that is not mapped

2017-06-01 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH v2 09/12] blk-mq: Document locking assumptions

2017-06-01 Thread Christoph Hellwig
On Wed, May 31, 2017 at 03:52:43PM -0700, Bart Van Assche wrote: > Document the locking assumptions in functions that modify > blk_mq_ctx.rq_list to make it easier for humans to verify > this code. > > Signed-off-by: Bart Van Assche Looks good, Reviewed-by:

Re: [PATCH v2 08/12] block: Document what queue type each function is intended for

2017-06-01 Thread Christoph Hellwig
On Wed, May 31, 2017 at 03:52:42PM -0700, Bart Van Assche wrote: > Some functions in block/blk-core.c must only be used on blk-sq queues > while others are safe to use against any queue type. Document which > functions are intended for blk-sq queues and issue a warning if the > blk-sq API is

Re: [PATCH v2 05/12] blk-mq: Initialize a request before assigning a tag

2017-06-01 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig Btw, blk_mq_rq_ctx_init should be marked static, but I'll send a separate patch for that.

Re: [PATCH v2 07/12] block: Check locking assumptions at runtime

2017-06-01 Thread Christoph Hellwig
On Wed, May 31, 2017 at 03:52:41PM -0700, Bart Van Assche wrote: > Instead of documenting the locking assumptions of most block layer > functions as a comment, use lockdep_assert_held() to verify locking > assumptions at runtime. Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v2 03/12] block: Make most scsi_req_init() calls implicit

2017-06-01 Thread Christoph Hellwig
On Wed, May 31, 2017 at 03:52:37PM -0700, Bart Van Assche wrote: > Instead of explicitly calling scsi_req_init() after blk_get_request(), > call that function from inside blk_get_request(). Add an > .initialize_rq_fn() callback function to the block drivers that need > it. Merge the IDE

Re: [PATCH v2 12/12] block: Rename blk_mq_rq_{to,from}_pdu()

2017-06-01 Thread Christoph Hellwig
On Wed, May 31, 2017 at 03:52:46PM -0700, Bart Van Assche wrote: > Commit 6d247d7f71d1 ("block: allow specifying size for extra command > data") added support for .cmd_size to blk-sq. Due to that patch the > blk_mq_rq_{to,from}_pdu() functions are also useful for single-queue > block drivers.

Re: [PATCH v2 02/12] block: Introduce request_queue.initialize_rq_fn()

2017-06-01 Thread Christoph Hellwig
On Wed, May 31, 2017 at 03:52:36PM -0700, Bart Van Assche wrote: > Several block drivers need to initialize the driver-private data > after having called blk_get_request() and before .prep_rq_fn() is > called, e.g. when submitting a REQ_OP_SCSI_* request. Avoid that > that initialization code has

Re: [PATCH v2 0/6] Split scsi passthrough fields out of struct request sequel

2017-06-01 Thread Christoph Hellwig
On Wed, May 31, 2017 at 02:43:44PM -0700, Bart Van Assche wrote: > Hello Jens, > > The patches in this series are a sequel of Christoph's "Split scsi passthrough > fields out of struct request" patch series. The changes compared to v1 of this > patch series are: > - Renamed QUEUE_FLAG_SCSI_PDU

Re: [PATCH v2 5/6] cdrom: Check SCSI passthrough support before reading audio

2017-06-01 Thread Christoph Hellwig
On Wed, May 31, 2017 at 02:43:49PM -0700, Bart Van Assche wrote: > The CDROMREADAUDIO ioctl uses SCSI passthrough when the .disk > pointer has been set in struct cdrom_device_info. Hence check > whether SCSI passthrough is supported before submitting a SCSI > command. Note: both the ide-cd and sr