[PATCH v6 4/9] block: Make q_usage_counter also track legacy requests

2017-10-04 Thread Bart Van Assche
From: Ming Lei This patch makes it possible to pause request allocation for the legacy block layer by calling blk_mq_freeze_queue() and blk_mq_unfreeze_queue(). Signed-off-by: Ming Lei [ bvanassche: Combined two patches into one, edited a comment and

[PATCH v6 5/9] block: Introduce blk_get_request_flags()

2017-10-04 Thread Bart Van Assche
A side effect of this patch is that the GFP mask that is passed to several allocation functions in the legacy block layer is changed from GFP_KERNEL into __GFP_DIRECT_RECLAIM. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Ming Lei

Re: [PATCH v6 7/9] ide, scsi: Tell the block layer at request allocation time about preempt requests

2017-10-04 Thread David Miller
From: Bart Van Assche Date: Wed, 4 Oct 2017 17:01:08 -0700 > Convert blk_get_request(q, op, __GFP_RECLAIM) into blk_get_request(q, > op, BLK_MQ_PREEMPT). This patch does not change any functionality. > > Signed-off-by: Bart Van Assche > Cc:

Re: [PATCH 4/5] bcache: writeback: collapse contiguous IO better

2017-10-04 Thread Michael Lyle
Coly--- Thanks for running these tests. The change is expected to improve performance when the application writes to many adjacent blocks, out of order. Many database workloads are like this. My VM provisioning / installation / cleanup workloads have a lot of this, too. I believe that it

[PATCH v6 3/9] md: Neither resync nor reshape while the system is frozen

2017-10-04 Thread Bart Van Assche
Some people use the md driver on laptops and use the suspend and resume functionality. Since it is essential that submitting of new I/O requests stops before a hibernation image is created, interrupt the md resync and reshape actions if the system is being frozen. Note: the resync and reshape will

[PATCH v6 9/9] block, scsi: Make SCSI device suspend and resume work reliably

2017-10-04 Thread Bart Van Assche
It is essential during suspend and resume that neither the filesystem state nor the filesystem metadata in RAM changes. This is why while the hibernation image is being written or restored that SCSI devices are quiesced. The SCSI core quiesces devices through scsi_device_quiesce() and

[PATCH v6 0/9] block, scsi, md: Improve suspend and resume

2017-10-04 Thread Bart Van Assche
Hello Jens, It is known that during the resume following a hibernate, especially when using an md RAID1 array created on top of SCSI devices, sometimes the system hangs instead of coming up properly. This patch series fixes this problem. This patch series is an alternative for Ming Lei's

[PATCH v6 6/9] block: Introduce BLK_MQ_REQ_PREEMPT

2017-10-04 Thread Bart Van Assche
Set RQF_PREEMPT if BLK_MQ_REQ_PREEMPT is passed to blk_get_request_flags(). Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Cc: Johannes Thumshirn ---

[PATCH v6 8/9] block: Add the QUEUE_FLAG_PREEMPT_ONLY request queue flag

2017-10-04 Thread Bart Van Assche
This flag will be used in the next patch to let the block layer core know whether or not a SCSI request queue has been quiesced. A quiesced SCSI queue namely only processes RQF_PREEMPT requests. Signed-off-by: Bart Van Assche Cc: Ming Lei Cc:

[PATCH v6 2/9] md: Introduce md_stop_all_writes()

2017-10-04 Thread Bart Van Assche
Introduce md_stop_all_writes() because the next patch will add a second caller for this function. This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Shaohua Li Cc: linux-r...@vger.kernel.org Cc: Ming Lei

[PATCH v6 7/9] ide, scsi: Tell the block layer at request allocation time about preempt requests

2017-10-04 Thread Bart Van Assche
Convert blk_get_request(q, op, __GFP_RECLAIM) into blk_get_request(q, op, BLK_MQ_PREEMPT). This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Martin K. Petersen Cc: David S. Miller Cc: Ming

[PATCH v6 1/9] md: Rename md_notifier into md_reboot_notifier

2017-10-04 Thread Bart Van Assche
This avoids confusion with the pm notifier that will be added through a later patch. Signed-off-by: Bart Van Assche Cc: Shaohua Li Cc: linux-r...@vger.kernel.org Cc: Ming Lei Cc: Christoph Hellwig Cc: Hannes Reinecke

Re: [PATCH v5 0/8] block, scsi, md: Improve suspend and resume

2017-10-04 Thread Christoph Hellwig
Bart, Ming: can you guys please work a little better together? We've now got two patchsets that are getting very similar. Bart, please at least CC Ming when you send out the patches. Ming - instead of sending a separate series right after Bart a differential series would be nice. This also

Re: [PATCH v5 6/8] scsi: Reduce suspend latency

2017-10-04 Thread Christoph Hellwig
> + /* > + * Do not attempt to freeze the queue of an already quiesced device > + * because that could result in a deadlock. > + */ > + freeze = sdev->sdev_state == SDEV_RUNNING; > + if (freeze) > + blk_mq_freeze_queue(q); > err =

Re: [RFC 5/5] pm: remove kernel thread freezing

2017-10-04 Thread Hannes Reinecke
On 10/03/2017 08:53 PM, Luis R. Rodriguez wrote: > Now that all filesystems which used to rely on kthread > freezing have been converted to filesystem freeze/thawing > we can remove the kernel kthread freezer. > > Signed-off-by: Luis R. Rodriguez > --- >

Re: [PATCH 6/9] bsg-lib: introduce a timeout field in struct bsg_job

2017-10-04 Thread Hannes Reinecke
On 10/03/2017 12:48 PM, Christoph Hellwig wrote: > The zfcp driver wants to know the timeout for a bsg job, so add a field > to struct bsg_job for it in preparation of not exposing the request > to the bsg-lib users. > > Signed-off-by: Christoph Hellwig > --- > block/bsg-lib.c

Re: [PATCH 7/9] bsg-lib: remove bsg_job.req

2017-10-04 Thread Hannes Reinecke
On 10/03/2017 12:48 PM, Christoph Hellwig wrote: > Users of the bsg-lib interface should only use the bsg_job data structure > and not know about implementation details of it. > > Signed-off-by: Christoph Hellwig > --- > block/bsg-lib.c | 14 ++ >

Re: [PATCH v5 7/8] scsi: Set QUEUE_FLAG_PREEMPT_ONLY while quiesced

2017-10-04 Thread Christoph Hellwig
> + /* > + * Ensure that the effect of blk_set_preempt_only() is globally > + * visible before unfreezing the queue. > + */ > + if (err == 0) > + synchronize_rcu(); I don't understand why we'd need this. The flag is set both under a spinlock and a mutex that

Re: [PATCH 1/9] bsg-lib: fix use-after-free under memory-pressure

2017-10-04 Thread Johannes Thumshirn
Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB

Re: [PATCH 9/9] bsg: split handling of SCSI CDBs vs transport requeues

2017-10-04 Thread Hannes Reinecke
On 10/03/2017 12:48 PM, Christoph Hellwig wrote: > The current BSG design tries to shoe-horn the transport-specific passthrough > commands into the overall framework for SCSI passthrough requests. This > has a couple problems: > > - each passthrough queue has to set the

Re: [PATCH v5 5/8] block: Add the QUEUE_FLAG_PREEMPT_ONLY request queue flag

2017-10-04 Thread Christoph Hellwig
> +EXPORT_SYMBOL(blk_set_preempt_only); EXPORT_SYMBOL_GPL please. Except for that this looks fine: Reviewed-by: Christoph Hellwig

Re: [PATCH] block: drop "sending ioctl to a partition" message

2017-10-04 Thread Christoph Hellwig
On Tue, Oct 03, 2017 at 06:22:23PM +0200, Paolo Bonzini wrote: > On 21/09/2017 16:49, Paolo Bonzini wrote: > > After the first few months, the message has not led to many bug reports. > > It's been almost five years now, and in practice the main source of > > it seems to be MTIOCGET that someone

Re: [PATCH v5 4/8] block: Convert RQF_PREEMPT into REQ_PREEMPT

2017-10-04 Thread Christoph Hellwig
So as pointed out in the last run (after changing my mind deeper into the series) I think we should instead use a BLK_MQ_REQ_PREEMPT flag. The preempt only makes sense at the request level, not for file system requests. For the legacy case we can add blk_get_request_flags that takes the

Re: [PATCH 4/9] qla2xxx: don't break the bsg-lib abstractions

2017-10-04 Thread Hannes Reinecke
On 10/03/2017 12:48 PM, Christoph Hellwig wrote: > Always use bsg_job->reply instead of scsi_req(bsg_job->req)->sense), as > they always point to the same memory. > > Never set scsi_req(bsg_job->req)->result and we'll set that value through > bsg_job_done. > > Signed-off-by: Christoph Hellwig

Re: [PATCH 9/9] bsg: split handling of SCSI CDBs vs transport requeues

2017-10-04 Thread Johannes Thumshirn
Christoph Hellwig writes: [...] > @@ -965,7 +932,8 @@ void bsg_unregister_queue(struct request_queue *q) > EXPORT_SYMBOL_GPL(bsg_unregister_queue); > > int bsg_register_queue(struct request_queue *q, struct device *parent, > -const char *name, void

Re: [PATCH v5 0/8] block, scsi, md: Improve suspend and resume

2017-10-04 Thread Ming Lei
On Wed, Oct 04, 2017 at 08:56:08AM +0200, Christoph Hellwig wrote: > Bart, Ming: > > can you guys please work a little better together? We've now got two > patchsets that are getting very similar. > > Bart, please at least CC Ming when you send out the patches. > > Ming - instead of sending a

Re: [PATCH v5 0/8] block, scsi, md: Improve suspend and resume

2017-10-04 Thread Ming Lei
On Wed, Oct 04, 2017 at 03:53:28PM +0800, Ming Lei wrote: > On Wed, Oct 04, 2017 at 08:56:08AM +0200, Christoph Hellwig wrote: > > Bart, Ming: > > > > can you guys please work a little better together? We've now got two > > patchsets that are getting very similar. > > > > Bart, please at least

Re: [PATCH V9 13/15] mmc: block: Add CQE and blk-mq support

2017-10-04 Thread Ulf Hansson
[...] >> MQ code that doesn't perform and therefore we cannot switch seamlessly >> to MQ. > > I think that switching seamlessly to blk-mq in short/medium-term > is not possible (SCSI tried and failed to do so). The changes to > the old path are very complex and besides affecting performance >

Re: [RFC 4/5] ext4: add fs freezing support on suspend/hibernation

2017-10-04 Thread Dave Chinner
On Tue, Oct 03, 2017 at 09:42:04PM -0400, Theodore Ts'o wrote: > On Tue, Oct 03, 2017 at 10:13:21PM +0200, Luis R. Rodriguez wrote: > > > After we remove add the NEEDS_RECOVERY flag, we need to make sure > > > recovery flag is pushed out to disk before any other changes are > > > allowed to be

Re: [PATCH 9/9] bsg: split handling of SCSI CDBs vs transport requeues

2017-10-04 Thread Johannes Thumshirn
On Wed, Oct 04, 2017 at 09:20:59AM +0200, Christoph Hellwig wrote: > It's a different level of callback - ops are the type of request > passed through (scsi vs transport) and ->release is s whacky > implementation detail of the SAS passthrough. If at all ->release > should go away eventually by

Re: [PATCH 8/9] block: pass full fmode_t to blk_verify_command

2017-10-04 Thread Johannes Thumshirn
Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB

Re: [PATCH 6/9] bsg-lib: introduce a timeout field in struct bsg_job

2017-10-04 Thread Johannes Thumshirn
Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB

Re: [PATCH 7/9] bsg-lib: remove bsg_job.req

2017-10-04 Thread Johannes Thumshirn
Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB

Re: [PATCH V9 13/15] mmc: block: Add CQE and blk-mq support

2017-10-04 Thread Bartlomiej Zolnierkiewicz
Hi, On Wednesday, October 04, 2017 09:39:45 AM Linus Walleij wrote: > On Fri, Sep 22, 2017 at 2:37 PM, Adrian Hunter > wrote: > > > Add CQE support to the block driver, including: > > - optionally using DCMD for flush requests > > - "manually" issuing discard

Re: [PATCH 1/9] bsg-lib: fix use-after-free under memory-pressure

2017-10-04 Thread Hannes Reinecke
On 10/03/2017 12:48 PM, Christoph Hellwig wrote: > From: Benjamin Block > > When under memory-pressure it is possible that the mempool which backs > the 'struct request_queue' will make use of up to BLKDEV_MIN_RQ count > emergency buffers - in case it can't get a

Re: [PATCH 9/9] bsg: split handling of SCSI CDBs vs transport requeues

2017-10-04 Thread Christoph Hellwig
On Wed, Oct 04, 2017 at 09:18:11AM +0200, Johannes Thumshirn wrote: > Wouldn't it make sense to put the ->release() method into bsg_ops as > well? The current prototype of bsg_register_queue isn't exactly what I > would call a sane API. It's a different level of callback - ops are the type of

Re: [PATCH 5/9] scsi_transport_sas: check reply payload length instead of bidi request

2017-10-04 Thread Hannes Reinecke
On 10/03/2017 12:48 PM, Christoph Hellwig wrote: > As a user of bsg-lib the SAS transport should not poke into request > internals but use the bsg_job fields instead. > > Signed-off-by: Christoph Hellwig > --- > drivers/scsi/scsi_transport_sas.c | 2 +- > 1 file changed, 1

Re: [RFC 5/5] pm: remove kernel thread freezing

2017-10-04 Thread Dave Chinner
On Wed, Oct 04, 2017 at 02:47:56AM +0200, Luis R. Rodriguez wrote: > On Tue, Oct 03, 2017 at 11:15:07PM +0200, Rafael J. Wysocki wrote: > > On Tuesday, October 3, 2017 8:59:00 PM CEST Rafael J. Wysocki wrote: > > > On Tuesday, October 3, 2017 8:53:13 PM CEST Luis R. Rodriguez wrote: > > > > Now

Re: [PATCH 9/9] bsg: split handling of SCSI CDBs vs transport requeues

2017-10-04 Thread Johannes Thumshirn
Christoph Hellwig writes: [...] > @@ -965,7 +932,8 @@ void bsg_unregister_queue(struct request_queue *q) > EXPORT_SYMBOL_GPL(bsg_unregister_queue); > > int bsg_register_queue(struct request_queue *q, struct device *parent, > -const char *name, void

Re: [PATCH V9 13/15] mmc: block: Add CQE and blk-mq support

2017-10-04 Thread Linus Walleij
On Fri, Sep 22, 2017 at 2:37 PM, Adrian Hunter wrote: > Add CQE support to the block driver, including: > - optionally using DCMD for flush requests > - "manually" issuing discard requests > - issuing read / write requests to the CQE > - supporting

Re: [PATCH 1/2] block: genhd: add device_add_disk_with_groups

2017-10-04 Thread Martin Wilck
On Sun, 2017-10-01 at 10:00 +0200, Christoph Hellwig wrote: > While this looks okay-ish to me I really don't want people confused > with three variants of add_disk, we really need to consolidate > our helpers there a bit.. > Can you give me a hint what you'd like to see? Martin -- Dr. Martin

[PATCH 7/9] dm: Add nowait support to raid1

2017-10-04 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues If the I/O would block because the devices are syncing, bail. Signed-off-by: Goldwyn Rodrigues --- drivers/md/dm-raid1.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/md/dm-raid1.c

[PATCH 6/9] dm: add nowait support

2017-10-04 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues Add support for bio based dm devices, which exclusively sets a make_request_fn(). Request based devices are supported by default. Signed-off-by: Goldwyn Rodrigues --- drivers/md/dm.c | 28 +++- 1 file

[PATCH 9/9] dm-mpath: Add nowait support

2017-10-04 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues If there are no queues, bail if REQ_NOWAIT is set instead of queueing up I/O. Signed-off-by: Goldwyn Rodrigues --- drivers/md/dm-mpath.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/md/dm-mpath.c

[PATCH 4/9] md: raid10 nowait support

2017-10-04 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues Bail and status to EAGAIN if raid10 is going to wait for: + barriers + reshape operation + Too many queued requests Signed-off-by: Goldwyn Rodrigues --- drivers/md/raid10.c | 67

[PATCH 5/9] md: raid5 nowait support

2017-10-04 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues Return EAGAIN in case RAID5 would block because of waiting due to reshaping. Signed-off-by: Goldwyn Rodrigues --- drivers/md/raid5.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c

[PATCH 3/9] md: raid1 nowait support

2017-10-04 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues The RAID1 driver would bail with EAGAIN in case of: + I/O has to wait for a barrier + array is frozen + Area is suspended + There are too many pending I/O that it will be queued. To facilitate error for wait barriers, wait_barrier() is returning

[PATCH 2/9] md: Add nowait support to md

2017-10-04 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues Set queue flags to QUEUE_FLAG_NOWAIT to indicate REQ_NOWAIT will be handled. If any of the underlying devices do not support NOWAIT feature, we do not set the flag. If the device is suspended, it returns -EWOULDBLOCK. Signed-off-by: Goldwyn Rodrigues

[PATCH 1/9] QUEUE_FLAG_NOWAIT to indicate device supports nowait

2017-10-04 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues Nowait is a feature of direct AIO, where users can request to return immediately if the I/O is going to block. This translates to REQ_NOWAIT in bio.bi_opf flags. While request based devices don't wait, stacked devices such as md/dm will. In order to

[PATCH 8/9] dm: Add nowait support to dm-delay

2017-10-04 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues I/O should bail out if any value for delay is set. Signed-off-by: Goldwyn Rodrigues --- drivers/md/dm-delay.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/md/dm-delay.c b/drivers/md/dm-delay.c index

[PATCH v2 0/9] Nowait support for stacked block devices

2017-10-04 Thread Goldwyn Rodrigues
This is a continuation of the nowait support which was incorporated a while back. We introduced REQ_NOWAIT which would return immediately if the call would block at the block layer. Request based-devices do not wait. However, bio based devices (the ones which exclusively call make_request_fn) need

Re: [PATCH v5 2/8] md: Neither resync nor reshape while the system is frozen

2017-10-04 Thread Ming Lei
On Mon, Oct 02, 2017 at 03:52:12PM -0700, Bart Van Assche wrote: > Some people use the md driver on laptops and use the suspend and > resume functionality. Since it is essential that submitting of > new I/O requests stops before a hibernation image is created, > interrupt the md resync and reshape

Re: [PATCH 2/6] lightnvm: pblk: protect line bitmap while submitting meta io

2017-10-04 Thread Javier González
> On 21 Sep 2017, at 13.26, Rakesh Pandit wrote: > > It seems pblk_dealloc_page would race against pblk_alloc_pages for > line bitmap for sector allocation. The chances are very low but might > as well protect the bitmap properly. It's not even in fast path. > >

Re: [PATCH 1/2] block: genhd: add device_add_disk_with_groups

2017-10-04 Thread Martin Wilck
On Fri, 2017-09-29 at 16:59 -0600, Keith Busch wrote: > On Thu, Sep 28, 2017 at 09:36:36PM +0200, Martin Wilck wrote: > > In the NVME subsystem, we're seeing a race condition with udev > > where > > device_add_disk() is called (which triggers an "add" uevent), and a > > sysfs attribute group is

Re: [PATCH V9 13/15] mmc: block: Add CQE and blk-mq support

2017-10-04 Thread Adrian Hunter
On 04/10/17 10:39, Linus Walleij wrote: > On Fri, Sep 22, 2017 at 2:37 PM, Adrian Hunter > wrote: > >> Add CQE support to the block driver, including: >> - optionally using DCMD for flush requests >> - "manually" issuing discard requests >> - issuing read /

[PATCH V3 2/3] block/loop: use FALLOC_FL_ZERO_RANGE for REQ_OP_WRITE_ZEROES

2017-10-04 Thread Shaohua Li
From: Shaohua Li REQ_OP_WRITE_ZEROES really means zero the data. And in blkdev_fallocate, FALLOC_FL_ZERO_RANGE will retry but FALLOC_FL_PUNCH_HOLE not, even loop request doesn't have BLKDEV_ZERO_NOFALLBACK set. Signed-off-by: Shaohua Li Reviewed-by: Ming Lei

[PATCH V3 0/3] block/loop: handle discard/zeroout error

2017-10-04 Thread Shaohua Li
From: Shaohua Li Fix some problems when setting up loop device with a block device as back file and create/mount ext4 in the loop device. Thanks, Shaohua Shaohua Li (3): block/loop: don't hijack error number block/loop: use FALLOC_FL_ZERO_RANGE for REQ_OP_WRITE_ZEROES block:

[PATCH V3 3/3] block: don't print message for discard error

2017-10-04 Thread Shaohua Li
From: Shaohua Li discard error isn't fatal, don't flood discard error messages. Suggested-by: Ming Lei Signed-off-by: Shaohua Li --- block/blk-core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/blk-core.c b/block/blk-core.c

[PATCH V3 1/3] block/loop: don't hijack error number

2017-10-04 Thread Shaohua Li
From: Shaohua Li If the bio returns -EOPNOTSUPP, we shouldn't hijack it and return -EIO Signed-off-by: Shaohua Li Reviewed-by: Ming Lei --- drivers/block/loop.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH v2 0/2] block: cope with WRITE ZEROES failing in blkdev_issue_zeroout()

2017-10-04 Thread Ilya Dryomov
Hi Christoph, Martin, blkdev_issue_zeroout() now checks for any error. This required a minor refactor, so I dropped the stable tag, Jens can add it back if needed. v1 -> v2: - changed code flow in blkdev_issue_zeroout() according to Christoph's suggestion - this required adding additional

[PATCH v2 2/2] block: cope with WRITE ZEROES failing in blkdev_issue_zeroout()

2017-10-04 Thread Ilya Dryomov
sd_config_write_same() ignores ->max_ws_blocks == 0 and resets it to permit trying WRITE SAME on older SCSI devices, unless ->no_write_same is set. Because REQ_OP_WRITE_ZEROES is implemented in terms of WRITE SAME, blkdev_issue_zeroout() may fail with -EREMOTEIO: $ fallocate -zn -l 1k /dev/sdg

[PATCH v2 1/2] block: factor out __blkdev_issue_zero_pages()

2017-10-04 Thread Ilya Dryomov
blkdev_issue_zeroout() will use this in !BLKDEV_ZERO_NOFALLBACK case. Signed-off-by: Ilya Dryomov --- block/blk-lib.c | 63 + 1 file changed, 37 insertions(+), 26 deletions(-) diff --git a/block/blk-lib.c

Re: [PATCH 2/2] block: cope with WRITE ZEROES failing in blkdev_issue_zeroout()

2017-10-04 Thread Ilya Dryomov
On Tue, Oct 3, 2017 at 10:04 AM, Christoph Hellwig wrote: > On Thu, Sep 21, 2017 at 07:12:52PM +0200, Ilya Dryomov wrote: >> sd_config_write_same() ignores ->max_ws_blocks == 0 and resets it to >> permit trying WRITE SAME on older SCSI devices, unless ->no_write_same >> is

Re: [PATCH v5 0/8] block, scsi, md: Improve suspend and resume

2017-10-04 Thread Bart Van Assche
On Wed, 2017-10-04 at 15:53 +0800, Ming Lei wrote: > I have commented on Bart's patchset before, but my comments > never gets addressed: > > 1) no MD changes required on this issue I did not address that comment because you have another view on how suspend and resume should work than the rest of

Re: [PATCH v5 6/8] scsi: Reduce suspend latency

2017-10-04 Thread Bart Van Assche
On Wed, 2017-10-04 at 09:04 +0200, Christoph Hellwig wrote: > > + /* > > +* Do not attempt to freeze the queue of an already quiesced device > > +* because that could result in a deadlock. > > +*/ > > + freeze = sdev->sdev_state == SDEV_RUNNING; > > + if (freeze) > > +

Re: [PATCH v5 0/8] block, scsi, md: Improve suspend and resume

2017-10-04 Thread Bart Van Assche
On Wed, 2017-10-04 at 08:56 +0200, Christoph Hellwig wrote: > can you guys please work a little better together? We've now got two > patchsets that are getting very similar. > > Bart, please at least CC Ming when you send out the patches. Hello Christoph, Sorry for the low level of

Re: [RFC 4/5] ext4: add fs freezing support on suspend/hibernation

2017-10-04 Thread Bart Van Assche
On Wed, 2017-10-04 at 18:05 +1100, Dave Chinner wrote: > Basically, before thawing filesystems the rest of the kernel > infrastructure needs to have been restarted. i.e. the order > needs to be: > > freeze userspace > freeze filesystems > freeze kernel threads > freeze workqueues > > thaw

Re: [PATCH v5 7/8] scsi: Set QUEUE_FLAG_PREEMPT_ONLY while quiesced

2017-10-04 Thread Bart Van Assche
On Wed, 2017-10-04 at 09:06 +0200, Christoph Hellwig wrote: > > + /* > > +* Ensure that the effect of blk_set_preempt_only() is globally > > +* visible before unfreezing the queue. > > +*/ > > + if (err == 0) > > + synchronize_rcu(); > > I don't understand why we'd need

Re: [PATCH v5 0/8] block, scsi, md: Improve suspend and resume

2017-10-04 Thread Ming Lei
On Wed, Oct 04, 2017 at 03:18:45PM +, Bart Van Assche wrote: > On Wed, 2017-10-04 at 15:53 +0800, Ming Lei wrote: > > I have commented on Bart's patchset before, but my comments > > never gets addressed: > > > > 1) no MD changes required on this issue > > I did not address that comment

Re: [PATCH v5 8/8] block: Make SCSI device suspend and resume work reliably

2017-10-04 Thread Bart Van Assche
On Wed, 2017-10-04 at 09:06 +0200, Christoph Hellwig wrote: > As mentioned before - if you pass BLK_MQ_REQ_* to blk_queue_enter > this should become a bit nicer without the need for two magic bool > parameters. Hello Christoph, I will make that change. Sorry that I missed it in v5 of this patch

Re: [PATCH 2/9] bfa: don't reset max_segments for every bsg request

2017-10-04 Thread Hannes Reinecke
On 10/03/2017 12:48 PM, Christoph Hellwig wrote: > We already support 256 or more segments as long as the architecture > supports SG chaining (all the ones that matter do), so removed the > weird playing with limits from the job handler. > > Signed-off-by: Christoph Hellwig > --- >

Re: [PATCH 3/9] libfc: don't assign resid_len in fc_lport_bsg_request

2017-10-04 Thread Hannes Reinecke
On 10/03/2017 12:48 PM, Christoph Hellwig wrote: > bsg_job_done takes care of updating the scsi_request structure fields. > > Signed-off-by: Christoph Hellwig > --- > drivers/scsi/libfc/fc_lport.c | 3 --- > 1 file changed, 3 deletions(-) > Reviewed-by: Hannes Reinecke

Re: [PATCH 5/9] scsi_transport_sas: check reply payload length instead of bidi request

2017-10-04 Thread Johannes Thumshirn
Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB

Re: [PATCH 4/9] qla2xxx: don't break the bsg-lib abstractions

2017-10-04 Thread Johannes Thumshirn
Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB

Re: [PATCH 3/9] libfc: don't assign resid_len in fc_lport_bsg_request

2017-10-04 Thread Johannes Thumshirn
Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB

Re: [PATCH 2/9] bfa: don't reset max_segments for every bsg request

2017-10-04 Thread Johannes Thumshirn
Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB

Re: [PATCH v5 2/8] md: Neither resync nor reshape while the system is frozen

2017-10-04 Thread Bart Van Assche
On Wed, 2017-10-04 at 03:16 +0200, Luis R. Rodriguez wrote: > On Mon, Oct 02, 2017 at 03:52:12PM -0700, Bart Van Assche wrote: > > diff --git a/drivers/md/md.c b/drivers/md/md.c > > index 3f7426120a3b..a2cf2a93b0cb 100644 > > --- a/drivers/md/md.c > > +++ b/drivers/md/md.c > > @@ -8961,6 +8963,37

Re: [RFC 4/5] ext4: add fs freezing support on suspend/hibernation

2017-10-04 Thread Theodore Ts'o
On Wed, Oct 04, 2017 at 06:05:23PM +1100, Dave Chinner wrote: > Basically, before thawing filesystems the rest of the kernel > infrastructure needs to have been restarted. i.e. the order > needs to be: > > freeze userspace > freeze filesystems > freeze kernel threads > freeze workqueues > > thaw

[RFC 1/2] block: record blkcss in request

2017-10-04 Thread Shaohua Li
From: Shaohua Li Currently we record block css info in bio but not in request. Normally we can get a request's css from its bio, but in some situations, we can't access request's bio, for example, after blk_update_request. Add the css to request, so we can access css through the

[RFC 0/2] block: export latency info for cgroups

2017-10-04 Thread Shaohua Li
From: Shaohua Li Hi, latency info is a good sign to determine if IO is healthy. The patches export such info to cgroup io.stat. Thanks, Shaohua Shaohua Li (2): block: record blkcss in request blockcg: export latency info for each cgroup block/blk-cgroup.c | 29

Re: [RFC 1/2] block: record blkcss in request

2017-10-04 Thread Tejun Heo
Hello, Shaohua. On Wed, Oct 04, 2017 at 10:41:19AM -0700, Shaohua Li wrote: > From: Shaohua Li > > Currently we record block css info in bio but not in request. Normally > we can get a request's css from its bio, but in some situations, we > can't access request's bio, for example,

Re: [RFC 1/2] block: record blkcss in request

2017-10-04 Thread Shaohua Li
On Wed, Oct 04, 2017 at 10:51:49AM -0700, Tejun Heo wrote: > Hello, Shaohua. > > On Wed, Oct 04, 2017 at 10:41:19AM -0700, Shaohua Li wrote: > > From: Shaohua Li > > > > Currently we record block css info in bio but not in request. Normally > > we can get a request's css from its

Re: [RFC 2/2] blockcg: export latency info for each cgroup

2017-10-04 Thread Tejun Heo
Hello, On Wed, Oct 04, 2017 at 10:41:20AM -0700, Shaohua Li wrote: > Export the latency info to user. The latency is a good sign to indicate > if IO is congested or not. User can use the info to make decisions like > adjust cgroup settings. Nice, yeah, this can be really useful. > Existing

Re: [RFC 1/2] block: record blkcss in request

2017-10-04 Thread Tejun Heo
On Wed, Oct 04, 2017 at 11:02:46AM -0700, Shaohua Li wrote: > > Each request comes from cgroup specific request_list, so given a > > request, its blkcg membership can is accessible through > > > > request->rl->blkg->blkcg > > Nice. Seems only used for legacy queue though. Ah, you're right.

Re: [PATCH 4/5] bcache: writeback: collapse contiguous IO better

2017-10-04 Thread Coly Li
On 2017/10/2 上午1:34, Michael Lyle wrote: > On Sun, Oct 1, 2017 at 10:23 AM, Coly Li wrote: >> Hi Mike, >> >> Your data set is too small. Normally bcache users I talk with, they use >> bcache for distributed storage cluster or commercial data base, their >> catch device is large and

Re: [RFC] bsg-lib interface cleanup

2017-10-04 Thread Jens Axboe
On 10/03/2017 04:48 AM, Christoph Hellwig wrote: > Hi all, > > this series cleans up various abuses of the bsg interfaces, and then > splits bsg for SCSI passthrough from bsg for arbitrary transport > passthrough. This removes the scsi_request abuse in bsg-lib that is > very confusing, and also

Re: [PATCH v5 2/8] md: Neither resync nor reshape while the system is frozen

2017-10-04 Thread Bart Van Assche
On Wed, 2017-10-04 at 19:30 +0800, Ming Lei wrote: > Last time, I asked which issue is fixed by this patch, but > never get answered, so again, what is issue fixed by > this patch? That's not correct. I did answer your question. See e.g. https://marc.info/?l=linux-block=150695879309606. > Given

Re: [RFC 0/5] fs: replace kthread freezing with filesystem freeze/thaw

2017-10-04 Thread Ming Lei
On Tue, Oct 03, 2017 at 10:05:11PM +0200, Luis R. Rodriguez wrote: > On Wed, Oct 04, 2017 at 03:33:01AM +0800, Ming Lei wrote: > > On Tue, Oct 03, 2017 at 11:53:08AM -0700, Luis R. Rodriguez wrote: > > > INFO: task kworker/u8:8:1320 blocked for more than 10 seconds. > > > Tainted: G

Re: [RFC 4/5] ext4: add fs freezing support on suspend/hibernation

2017-10-04 Thread Dave Chinner
On Wed, Oct 04, 2017 at 12:48:39PM -0400, Theodore Ts'o wrote: > On Wed, Oct 04, 2017 at 06:05:23PM +1100, Dave Chinner wrote: > > Basically, before thawing filesystems the rest of the kernel > > infrastructure needs to have been restarted. i.e. the order > > needs to be: > > > > freeze userspace

RE: [PATCH V9 13/15] mmc: block: Add CQE and blk-mq support

2017-10-04 Thread Hunter, Adrian
> -Original Message- > From: Bartlomiej Zolnierkiewicz [mailto:b.zolnier...@samsung.com] > Sent: Wednesday, October 4, 2017 12:40 PM > To: Linus Walleij > Cc: Hunter, Adrian ; Ulf Hansson > ; linux-mmc

Re: [PATCH v5 0/8] block, scsi, md: Improve suspend and resume

2017-10-04 Thread Bart Van Assche
On Wed, 2017-10-04 at 23:31 +0800, Ming Lei wrote: > On Wed, Oct 04, 2017 at 03:18:45PM +, Bart Van Assche wrote: > > On Wed, 2017-10-04 at 15:53 +0800, Ming Lei wrote: > > > 2) RCU read lock is missed in fast path > > > > Did you really post this as a review comment on my patch series?