Re: [dm-devel] dm integrity: reinitialize __bi_remaining when reusing bio

2020-02-25 Thread Mike Snitzer
On Tue, Feb 25 2020 at 5:02pm -0500, Christoph Hellwig wrote: > On Tue, Feb 25, 2020 at 08:54:07PM +0100, Daniel Glöckner wrote: > > bio_reset will reset too many fields. As you can see in the context of > > the diff, dm-integrity expects f.ex. the values modified by bio_advance > > to stay inta

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-25 Thread Dan Williams
On Tue, Feb 25, 2020 at 12:08 PM Vivek Goyal wrote: > > On Tue, Feb 25, 2020 at 08:25:27AM -0800, Dan Williams wrote: > > On Tue, Feb 25, 2020 at 5:37 AM Vivek Goyal wrote: > > > > > > On Mon, Feb 24, 2020 at 01:32:58PM -0800, Dan Williams wrote: > > > > > > [..] > > > > > > > Ok, how about if I

Re: [dm-devel] [PATCH] dm integrity: reinitialize __bi_remaining when reusing bio

2020-02-25 Thread Christoph Hellwig
On Tue, Feb 25, 2020 at 08:54:07PM +0100, Daniel Glöckner wrote: > bio_reset will reset too many fields. As you can see in the context of > the diff, dm-integrity expects f.ex. the values modified by bio_advance > to stay intact and the transfer should of course use the same disk and > operation. >

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-25 Thread Dan Williams
On Tue, Feb 25, 2020 at 12:33 PM Jeff Moyer wrote: > > Dan Williams writes: > > > On Mon, Feb 24, 2020 at 1:53 PM Jeff Moyer wrote: > >> > >> Dan Williams writes: > >> > >> >> Let's just focus on reporting errors when we know we have them. > >> > > >> > That's the problem in my eyes. If softwar

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-25 Thread Jeff Moyer
Dan Williams writes: > On Mon, Feb 24, 2020 at 1:53 PM Jeff Moyer wrote: >> >> Dan Williams writes: >> >> >> Let's just focus on reporting errors when we know we have them. >> > >> > That's the problem in my eyes. If software needs to contend with >> > latent error reporting then it should alwa

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-25 Thread Vivek Goyal
On Tue, Feb 25, 2020 at 08:25:27AM -0800, Dan Williams wrote: > On Tue, Feb 25, 2020 at 5:37 AM Vivek Goyal wrote: > > > > On Mon, Feb 24, 2020 at 01:32:58PM -0800, Dan Williams wrote: > > > > [..] > > > > > > Ok, how about if I add one more patch to the series which will check > > > > > > if unwr

Re: [dm-devel] [PATCH] dm integrity: reinitialize __bi_remaining when reusing bio

2020-02-25 Thread Daniel Glöckner
Hello Christoph, Am 02/25/20 um 20:12 schrieb Christoph Hellwig: > On Tue, Feb 25, 2020 at 06:07:44PM +0100, Daniel Glöckner wrote: >> In cases where dec_in_flight has to requeue the integrity_bio_wait work >> to transfer the rest of the data, the __bi_remaining field of the bio >> might already h

Re: [dm-devel] [PATCH] dm integrity: reinitialize __bi_remaining when reusing bio

2020-02-25 Thread Christoph Hellwig
On Tue, Feb 25, 2020 at 06:07:44PM +0100, Daniel Glöckner wrote: > In cases where dec_in_flight has to requeue the integrity_bio_wait work > to transfer the rest of the data, the __bi_remaining field of the bio > might already have been decremented to zero. Reusing the bio without > reinitializing

Re: [dm-devel] RFC: multipath-tools: NVMe native multipath and default setting for "enable_foreign"

2020-02-25 Thread Benjamin Marzinski
On Wed, Feb 19, 2020 at 05:17:48PM +0100, Martin Wilck wrote: > multipath-tools has support for "foreign" libraries in multipath-tools > since 0.8.0, and support for enabling/disabling them at runtime since > 0.8.3. > > The only foreign library that exists is "nvme" (for native NVMe > multipath),

[dm-devel] [PATCH] dm integrity: reinitialize __bi_remaining when reusing bio

2020-02-25 Thread Daniel Glöckner
In cases where dec_in_flight has to requeue the integrity_bio_wait work to transfer the rest of the data, the __bi_remaining field of the bio might already have been decremented to zero. Reusing the bio without reinitializing that counter to 1 can then result in integrity_end_io being called too ea

Re: [dm-devel] [PATCH] dm-integrity: Prevent RMW for full tag area writes

2020-02-25 Thread Mikulas Patocka
On Thu, 20 Feb 2020, Lukas Straub wrote: > If a full tag area is being written, don't read it first. This prevents a > read-modify-write cycle and increases performance on HDDs considerably. > > To do this we now calculate the checksums for all sectors in the bio in one > go in integrity_metad

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-25 Thread Dan Williams
On Tue, Feb 25, 2020 at 5:37 AM Vivek Goyal wrote: > > On Mon, Feb 24, 2020 at 01:32:58PM -0800, Dan Williams wrote: > > [..] > > > > > Ok, how about if I add one more patch to the series which will check > > > > > if unwritten portion of the page has known poison. If it has, then > > > > > -EIO i

Re: [dm-devel] [PATCH v5 2/8] drivers/pmem: Allow pmem_clear_poison() to accept arbitrary offset and len

2020-02-25 Thread Vivek Goyal
On Mon, Feb 24, 2020 at 01:32:58PM -0800, Dan Williams wrote: [..] > > > > Ok, how about if I add one more patch to the series which will check > > > > if unwritten portion of the page has known poison. If it has, then > > > > -EIO is returned. > > > > > > > > > > > > Subject: pmem: zero page rang