Re: [PATCH 13/14] nvme: use the changed namespaces list log to clear ns data changed AENs

2018-06-04 Thread Christoph Hellwig
On Mon, Jun 04, 2018 at 01:59:09PM -0600, Keith Busch wrote: > > Per section 5.2 we need to issue the corresponding log page to clear an > > AEN, so for a namespace data changed AEN we need to read the changed > > namespace list log. And once we read that log anyway we might as well > > use it to

Re: [PATCH 3/3] block: use bio_add_page in bio_iov_iter_get_pages

2018-06-04 Thread Ming Lei
On Tue, Jun 05, 2018 at 11:41:19AM +0800, Ming Lei wrote: > On Mon, Jun 04, 2018 at 03:58:53PM +0200, Christoph Hellwig wrote: > > Replace a nasty hack with a different nasty hack to prepare for multipage > > bio_vecs. By moving the temporary page array as far up as possible in > > the space

Re: [PATCH 3/3] block: use bio_add_page in bio_iov_iter_get_pages

2018-06-04 Thread Ming Lei
On Mon, Jun 04, 2018 at 03:58:53PM +0200, Christoph Hellwig wrote: > Replace a nasty hack with a different nasty hack to prepare for multipage > bio_vecs. By moving the temporary page array as far up as possible in > the space allocated for the bio_vec array we can iterate forward over it > and

Re: [PATCH 2/3] block: bio_set_pages_dirty can't see NULL bv_page in a valid bio_vec

2018-06-04 Thread Ming Lei
On Mon, Jun 04, 2018 at 03:58:52PM +0200, Christoph Hellwig wrote: > So don't bother handling it. > > Signed-off-by: Christoph Hellwig > --- > block/bio.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/block/bio.c b/block/bio.c > index 50941c1c9118..d95fab72acb5

Re: [PATCH 1/3] block: simplify bio_check_pages_dirty

2018-06-04 Thread Ming Lei
On Mon, Jun 04, 2018 at 03:58:51PM +0200, Christoph Hellwig wrote: > bio_check_pages_dirty currently inviolates the invariant that bv_page of > a bio_vec inside bi_vcnt shouldn't be zero, and that is going to become > really annoying with multpath biovecs. Fortunately there isn't any > all that

Re: [GIT PULL] Block changes for 4.18-rc

2018-06-04 Thread Linus Torvalds
On Mon, Jun 4, 2018 at 5:56 PM Kent Overstreet wrote: > > I like your patch for a less invasive version, but I did finish and test my > version, which deletes more code :) I certainly won't object to that. Your patch looks fine, and looks like the right thing in the long run anyway. Plus, it's

Re: [GIT PULL] Block changes for 4.18-rc

2018-06-04 Thread Kent Overstreet
On Mon, Jun 04, 2018 at 05:42:04PM -0700, Linus Torvalds wrote: > On Mon, Jun 4, 2018 at 12:04 PM Kent Overstreet > wrote: > > > > However, that's not correct as is because mddev_delayed_put() calls > > kobject_put(), and the kobject isn't initialized when the mddev is first > > allocated, it's

Re: [GIT PULL] Block changes for 4.18-rc

2018-06-04 Thread Linus Torvalds
On Mon, Jun 4, 2018 at 5:42 PM Linus Torvalds wrote: > > How about just the attached? Note: it probably goes without saying that the patch was entirely untested, but it does build, and it does get rid of the insane stack use. Linus

Re: [GIT PULL] Block changes for 4.18-rc

2018-06-04 Thread Linus Torvalds
On Mon, Jun 4, 2018 at 12:04 PM Kent Overstreet wrote: > > However, that's not correct as is because mddev_delayed_put() calls > kobject_put(), and the kobject isn't initialized when the mddev is first > allocated, it's initialized when the gendisk is allocated... that isn't hard > to > fix but

Re: [GIT PULL] Block changes for 4.18-rc

2018-06-04 Thread Kent Overstreet
On Tue, Jun 05, 2018 at 08:52:32AM +1000, NeilBrown wrote: > On Mon, Jun 04 2018, Kent Overstreet wrote: > > > On Tue, Jun 05, 2018 at 07:16:51AM +1000, NeilBrown wrote: > >> I really should get back to BIOSET_NEED_RESCUER and see if I can discard > >> it completely. > >> Kent - the only

Re: [blktests PATCHv2] Fix block/011 to not use sysfs for device disabling

2018-06-04 Thread Omar Sandoval
On Mon, Jun 04, 2018 at 04:51:41PM -0600, Keith Busch wrote: > The PCI sysfs interface may not be a dependable method for toggling the > PCI device state to trigger the timeouts. This patch goes directly to > the config space to make device failure occur. > > Signed-off-by: Keith Busch > --- >

Re: [blktests PATCHv2] Fix block/011 to not use sysfs for device disabling

2018-06-04 Thread Jens Axboe
On 6/4/18 4:51 PM, Keith Busch wrote: > The PCI sysfs interface may not be a dependable method for toggling the > PCI device state to trigger the timeouts. This patch goes directly to > the config space to make device failure occur. Reviewed-by: Jens Axboe -- Jens Axboe

Re: [GIT PULL] Block changes for 4.18-rc

2018-06-04 Thread NeilBrown
On Mon, Jun 04 2018, Kent Overstreet wrote: > On Tue, Jun 05, 2018 at 07:16:51AM +1000, NeilBrown wrote: >> I really should get back to BIOSET_NEED_RESCUER and see if I can discard >> it completely. >> Kent - the only remaining user is bcache, and the main reason I haven't >> removed it is that I

[blktests PATCHv2] Fix block/011 to not use sysfs for device disabling

2018-06-04 Thread Keith Busch
The PCI sysfs interface may not be a dependable method for toggling the PCI device state to trigger the timeouts. This patch goes directly to the config space to make device failure occur. Signed-off-by: Keith Busch --- v1 -> v2: Toggling only PCI Command Register BME bit, rather than

Re: [PATCH] Revert "block: Add warning for bi_next not NULL in bio_endio()"

2018-06-04 Thread Kent Overstreet
On Mon, Jun 04, 2018 at 08:59:39AM +, Bart Van Assche wrote: > On Tue, 2018-05-22 at 22:16 -0400, Kent Overstreet wrote: > > May 22 22:13:46 moria-kvm-kvm-kvm-kvm multipathd[387]: sda: fail to get > > serial > > May 22 22:13:46 moria-kvm-kvm-kvm-kvm multipathd[387]: sda: using deprecated > >

Re: [GIT PULL] Block changes for 4.18-rc

2018-06-04 Thread Kent Overstreet
On Tue, Jun 05, 2018 at 07:16:51AM +1000, NeilBrown wrote: > I really should get back to BIOSET_NEED_RESCUER and see if I can discard > it completely. > Kent - the only remaining user is bcache, and the main reason I haven't > removed it is that I cannot follow the code (or at least, I couldn't >

Re: [GIT PULL] Block changes for 4.18-rc

2018-06-04 Thread NeilBrown
On Mon, Jun 04 2018, Jens Axboe wrote: > On 6/4/18 9:51 AM, Linus Torvalds wrote: >> On Sun, Jun 3, 2018 at 5:42 PM Jens Axboe wrote: >>> >>> drivers/md/md.c | 61 +-- >>> drivers/md/md.h | 4 +- >> >> So I've pulled this, but I

Re: [PATCH 13/14] nvme: use the changed namespaces list log to clear ns data changed AENs

2018-06-04 Thread Keith Busch
On Sat, May 26, 2018 at 12:27:34PM +0200, Christoph Hellwig wrote: > Per section 5.2 we need to issue the corresponding log page to clear an > AEN, so for a namespace data changed AEN we need to read the changed > namespace list log. And once we read that log anyway we might as well > use it to

Re: [PATCH blktests] Fix block/011 to not use sysfs for device disabling

2018-06-04 Thread Keith Busch
On Tue, May 29, 2018 at 12:54:28PM -0700, Omar Sandoval wrote: > What's the plan for this test? Do you have a v2 coming? Sorry for the delay. I've been out on holiday, but I'm catching up quickly and will send a v2 shortly. Thanks, Keith

Re: [GIT PULL] Block changes for 4.18-rc

2018-06-04 Thread Kent Overstreet
On Mon, Jun 04, 2018 at 12:25:54PM -0600, Jens Axboe wrote: > On 6/4/18 12:22 PM, Linus Torvalds wrote: > > On Mon, Jun 4, 2018 at 11:20 AM Tejun Heo wrote: > >> > >> > >> Looking at the code, the fundamental problem seems to be that it's > >> weaving different parts of sync and async paths. I

Re: [GIT PULL] Block changes for 4.18-rc

2018-06-04 Thread Jens Axboe
On 6/4/18 12:22 PM, Linus Torvalds wrote: > On Mon, Jun 4, 2018 at 11:20 AM Tejun Heo wrote: >> >> >> Looking at the code, the fundamental problem seems to be that it's >> weaving different parts of sync and async paths. I don't understand >> why it'd punt the destructin of mddev but destroy

Re: [GIT PULL] Block changes for 4.18-rc

2018-06-04 Thread Linus Torvalds
On Mon, Jun 4, 2018 at 11:20 AM Tejun Heo wrote: > > > Looking at the code, the fundamental problem seems to be that it's > weaving different parts of sync and async paths. I don't understand > why it'd punt the destructin of mddev but destroy biosets > synchronously. Can't it do sth like the

Re: [GIT PULL] Block changes for 4.18-rc

2018-06-04 Thread Tejun Heo
Hey, Linus. On Mon, Jun 04, 2018 at 09:24:28AM -0700, Linus Torvalds wrote: > Tejun, the code in question is mddev_put() in drivers/md/md.c, and it > basically does > > INIT_WORK(>del_work, mddev_delayed_delete); > queue_work(md_misc_wq, >del_work); > > inside a

[PATCH] nbd: Consistently use request pointer in debug messages.

2018-06-04 Thread kvigor
From: Kevin Vigor Existing dev_dbg messages sometimes identify request using request pointer, sometimes using nbd_cmd pointer. This makes it hard to follow request flow. Consistently use request pointer instead. --- drivers/block/nbd.c | 10 +- 1 file changed, 5 insertions(+), 5

Re: [GIT PULL] Block changes for 4.18-rc

2018-06-04 Thread Linus Torvalds
On Mon, Jun 4, 2018 at 8:54 AM Jens Axboe wrote: > > On 6/4/18 9:51 AM, Linus Torvalds wrote: > > > > Why the hell doesn't it just do bioset_exit() on the originals instead, > > before freeing the mddev? > > CC'ing Neil to get his input on how best to clean that up, I'd > be much more comfortable

Re: [GIT PULL] Block changes for 4.18-rc

2018-06-04 Thread Jens Axboe
On 6/4/18 9:51 AM, Linus Torvalds wrote: > On Sun, Jun 3, 2018 at 5:42 PM Jens Axboe wrote: >> >> drivers/md/md.c | 61 +-- >> drivers/md/md.h | 4 +- > > So I've pulled this, but I get a new warning: > > drivers/md/md.c: In

Re: [GIT PULL] Block changes for 4.18-rc

2018-06-04 Thread Linus Torvalds
On Sun, Jun 3, 2018 at 5:42 PM Jens Axboe wrote: > > drivers/md/md.c | 61 +-- > drivers/md/md.h | 4 +- So I've pulled this, but I get a new warning: drivers/md/md.c: In function ‘mddev_put’: drivers/md/md.c:543:1: warning:

[PATCH 3/3] block: use bio_add_page in bio_iov_iter_get_pages

2018-06-04 Thread Christoph Hellwig
Replace a nasty hack with a different nasty hack to prepare for multipage bio_vecs. By moving the temporary page array as far up as possible in the space allocated for the bio_vec array we can iterate forward over it and thus use bio_add_page. Using bio_add_page means we'll be able to merge

[PATCH 2/3] block: bio_set_pages_dirty can't see NULL bv_page in a valid bio_vec

2018-06-04 Thread Christoph Hellwig
So don't bother handling it. Signed-off-by: Christoph Hellwig --- block/bio.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/block/bio.c b/block/bio.c index 50941c1c9118..d95fab72acb5 100644 --- a/block/bio.c +++ b/block/bio.c @@ -1578,10 +1578,8 @@ void

a few cleanups to prepare for multipage bio_vecs

2018-06-04 Thread Christoph Hellwig
Clean up some bio_vec abuses to prepare for saner handling of multipage bio_vecs.

[PATCH 1/3] block: simplify bio_check_pages_dirty

2018-06-04 Thread Christoph Hellwig
bio_check_pages_dirty currently inviolates the invariant that bv_page of a bio_vec inside bi_vcnt shouldn't be zero, and that is going to become really annoying with multpath biovecs. Fortunately there isn't any all that good reason for it - once we decide to defer freeing the bio to a workqueue

Re: [PATCH 00/24] InfiniBand Transport (IBTRS) and Network Block Device (IBNBD)

2018-06-04 Thread Danil Kipnis
Hi Doug, thanks for the feedback. You read the cover letter correctly: our transport library implements multipath (load balancing and failover) on top of RDMA API. Its name "IBTRS" is slightly misleading in that regard: it can sit on top of ROCE as well. The library allows for "bundling" multiple

Re: [PATCH] Revert "block: Add warning for bi_next not NULL in bio_endio()"

2018-06-04 Thread Bart Van Assche
On Tue, 2018-05-22 at 22:16 -0400, Kent Overstreet wrote: > May 22 22:13:46 moria-kvm-kvm-kvm-kvm multipathd[387]: sda: fail to get serial > May 22 22:13:46 moria-kvm-kvm-kvm-kvm multipathd[387]: sda: using deprecated > getuid callout > May 22 22:13:46 moria-kvm-kvm-kvm-kvm multipathd[387]: >

Re: [PATCH 12/12] nvme: limit warnings from nvme_identify_ns

2018-06-04 Thread Hannes Reinecke
On Wed, 30 May 2018 18:46:00 +0200 Christoph Hellwig wrote: > When rescanning namespaces after an AEN we will issue Identify > Namespace comands to namespaces that have gone away, so don't warn > for this specific case. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Johannes Thumshirn >

Re: [PATCH 10/12] nvme: mark nvme_queue_scan static

2018-06-04 Thread Hannes Reinecke
On Wed, 30 May 2018 18:45:58 +0200 Christoph Hellwig wrote: > And move it toward the top of the file to avoid a forward declaration. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Johannes Thumshirn > --- > drivers/nvme/host/core.c | 19 +-- > drivers/nvme/host/nvme.h |

Re: [PATCH 11/12] nvme: use the changed namespaces list log to clear ns data changed AENs

2018-06-04 Thread Hannes Reinecke
On Wed, 30 May 2018 18:45:59 +0200 Christoph Hellwig wrote: > Per section 5.2 we need to issue the corresponding log page to clear > an AEN, so for a namespace data changed AEN we need to read the > changed namespace list log. And once we read that log anyway we > might as well use it to

Re: [PATCH 08/12] nvmet: mask pending AERs

2018-06-04 Thread Hannes Reinecke
On Wed, 30 May 2018 18:45:56 +0200 Christoph Hellwig wrote: > Per section 5.2 of the NVMe 1.3 spec: > > "When the controller posts a completion queue entry for an > outstanding Asynchronous Event Request command and thus reports an > asynchronous event, subsequent events of that event type

Re: [PATCH 06/12] nvmet: implement the changed namespaces log

2018-06-04 Thread Hannes Reinecke
On Wed, 30 May 2018 18:45:54 +0200 Christoph Hellwig wrote: > Just keep a per-controller buffer of changed namespaces and copy it > out in the get log page implementation. > > Signed-off-by: Christoph Hellwig > --- > drivers/nvme/target/admin-cmd.c | 26 + >

Re: [PATCH 05/12] nvmet: split log page implementation

2018-06-04 Thread Hannes Reinecke
On Wed, 30 May 2018 18:45:53 +0200 Christoph Hellwig wrote: > Remove the common code to allocate a buffer and copy it into the SGL. > Instead the two no-op implementations just zero the SGL directly, and > the smart log allocates a buffer on its own. This prepares for the > more elaborate ANA

Re: [PATCH 04/12] nvmet: add a new nvmet_zero_sgl helper

2018-06-04 Thread Hannes Reinecke
On Wed, 30 May 2018 18:45:52 +0200 Christoph Hellwig wrote: > Zeroes the SGL in the payload. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Johannes Thumshirn > --- > drivers/nvme/target/core.c | 7 +++ > drivers/nvme/target/nvmet.h | 1 + > 2 files changed, 8 insertions(+) >

Re: [PATCH 01/12] nvme.h: untangle AEN notice definitions

2018-06-04 Thread Hannes Reinecke
On Wed, 30 May 2018 18:45:49 +0200 Christoph Hellwig wrote: > Stop including the event type in the definitions for the notice type. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Johannes Thumshirn > --- > drivers/nvme/host/core.c | 30 ++ >

Re: [PATCH 01/12] nvme.h: untangle AEN notice definitions

2018-06-04 Thread Hannes Reinecke
On Wed, 30 May 2018 18:45:49 +0200 Christoph Hellwig wrote: > Stop including the event type in the definitions for the notice type. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Johannes Thumshirn > --- > drivers/nvme/host/core.c | 30 ++ >

Re: [PATCH 02/12] nvme.h: add the changed namespace list log

2018-06-04 Thread Hannes Reinecke
On Wed, 30 May 2018 18:45:50 +0200 Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > Reviewed-by: Johannes Thumshirn > --- > include/linux/nvme.h | 3 +++ > 1 file changed, 3 insertions(+) > Reviewed-by: Hannes Reinecke Cheers, Hannes