[dm-devel] [PATCH v2 3/3] libmultipath: allow force reload with no active paths

2020-03-25 Thread Benjamin Marzinski
If the partition information has changed on multipath devices (say, because it was updated on another node that has access to the same storage), users expect that running "multipathd reconfigure" will update that. However, if the checkers for the multipath device are pending for too long when the

[dm-devel] [PATCH v2 2/3] libmutipath: don't close fd on dm_lib_release

2020-03-25 Thread Benjamin Marzinski
If dm_hold_control_open() isn't set, when dm_lib_release() is called, it will close the control fd. The control fd will get re-opened on the next dm_task_run() call, but if there is a dm_task_run() call already in progress in another thread, it can fail. Since many of the device-mapper callouts

[dm-devel] [PATCH v2 1/3] libmultipath: assign variable to make gcc happy

2020-03-25 Thread Benjamin Marzinski
There is nothing wrong with is_queueing not being set at the start of __set_no_path_retry(), it will always get set before it is accessed, but gcc 8.2.1 is failing with structs_vec.c: In function ‘__set_no_path_retry’: structs_vec.c:339:7: error: ‘is_queueing’ may be used uninitialized in this

Re: [dm-devel] [PATCH 2/3] libmutipath: don't close fd on dm_lib_release

2020-03-25 Thread Martin Wilck
On Wed, 2020-03-25 at 17:00 -0500, Benjamin Marzinski wrote: > On Wed, Mar 25, 2020 at 03:52:55PM -0500, Benjamin Marzinski wrote: > > On Wed, Mar 25, 2020 at 03:16:50PM +, Martin Wilck wrote: > > > On Tue, 2020-03-24 at 16:03 -0500, Benjamin Marzinski wrote: > > > > > > AFAICS, this function

Re: [dm-devel] [PATCH 2/3] libmutipath: don't close fd on dm_lib_release

2020-03-25 Thread Benjamin Marzinski
On Wed, Mar 25, 2020 at 03:52:55PM -0500, Benjamin Marzinski wrote: > On Wed, Mar 25, 2020 at 03:16:50PM +, Martin Wilck wrote: > > On Tue, 2020-03-24 at 16:03 -0500, Benjamin Marzinski wrote: > > > > AFAICS, this function has been in libdm since 1.02.111. We support > > 1.02.89 (if all

Re: [dm-devel] [PATCH 2/3] libmutipath: don't close fd on dm_lib_release

2020-03-25 Thread Benjamin Marzinski
On Wed, Mar 25, 2020 at 03:16:50PM +, Martin Wilck wrote: > On Tue, 2020-03-24 at 16:03 -0500, Benjamin Marzinski wrote: > > If dm_hold_control_open() isn't set, when dm_lib_release() is called, > > it > > will close the control fd. The control fd will get re-opened on the > > next > >

Re: [dm-devel] [PATCH v7 0/6] block: Introduce REQ_ALLOCATE flag for REQ_OP_WRITE_ZEROES

2020-03-25 Thread Martin K. Petersen
Christoph, > I am very much against that for the following reason: > > - the current REQ_OP_DISCARD is purely a hint, and implementations can >(and do) choose to ignore it > > - REQ_OP_WRITE_ZEROES is an actual data integrity operation with >everything that entails If you want to

Re: [dm-devel] [PATCH v7 0/6] block: Introduce REQ_ALLOCATE flag for REQ_OP_WRITE_ZEROES

2020-03-25 Thread Darrick J. Wong
On Thu, Mar 19, 2020 at 09:03:40AM -0400, Martin K. Petersen wrote: > > Christoph, > > >> Some comments? Some requests for reworking? Some personal reasons to > >> ignore my patches? > > > > I'm still completely opposed to the magic overloading using a flag. > > That is just a bad design waiting

Re: [dm-devel] [PATCH 3/3] libmultipath: allow force reload with no active paths

2020-03-25 Thread Martin Wilck
On Tue, 2020-03-24 at 16:03 -0500, Benjamin Marzinski wrote: > If the partition information has changed on multipath devices (say, > because it was updated on another node that has access to the same > storage), users expect that running "multipathd reconfigure" will > update > that. However, if

Re: [dm-devel] [PATCH 2/3] libmutipath: don't close fd on dm_lib_release

2020-03-25 Thread Martin Wilck
On Tue, 2020-03-24 at 16:03 -0500, Benjamin Marzinski wrote: > If dm_hold_control_open() isn't set, when dm_lib_release() is called, > it > will close the control fd. The control fd will get re-opened on the > next > dm_task_run() call, but if there is a dm_task_run() call already > in progress in

Re: [dm-devel] [RFC PATCH v2 3/3] dm zoned: add regular device info to metadata

2020-03-25 Thread Damien Le Moal
On 2020/03/25 19:00, Hannes Reinecke wrote: > On 3/25/20 10:10 AM, Damien Le Moal wrote: >> On 2020/03/25 17:52, Hannes Reinecke wrote: >>> On 3/25/20 9:02 AM, Damien Le Moal wrote: On 2020/03/25 15:47, Hannes Reinecke wrote: > On 3/25/20 7:29 AM, Damien Le Moal wrote: >> On

Re: [dm-devel] [RFC PATCH v2 3/3] dm zoned: add regular device info to metadata

2020-03-25 Thread Hannes Reinecke
On 3/25/20 10:10 AM, Damien Le Moal wrote: On 2020/03/25 17:52, Hannes Reinecke wrote: On 3/25/20 9:02 AM, Damien Le Moal wrote: On 2020/03/25 15:47, Hannes Reinecke wrote: On 3/25/20 7:29 AM, Damien Le Moal wrote: On 2020/03/24 20:04, Bob Liu wrote: This patch implemented metadata support

Re: [dm-devel] [RFC PATCH v2 3/3] dm zoned: add regular device info to metadata

2020-03-25 Thread Damien Le Moal
On 2020/03/25 17:52, Hannes Reinecke wrote: > On 3/25/20 9:02 AM, Damien Le Moal wrote: >> On 2020/03/25 15:47, Hannes Reinecke wrote: >>> On 3/25/20 7:29 AM, Damien Le Moal wrote: On 2020/03/24 20:04, Bob Liu wrote: > This patch implemented metadata support for regular device by: >

Re: [dm-devel] [RFC PATCH v2 3/3] dm zoned: add regular device info to metadata

2020-03-25 Thread Hannes Reinecke
On 3/25/20 9:02 AM, Damien Le Moal wrote: On 2020/03/25 15:47, Hannes Reinecke wrote: On 3/25/20 7:29 AM, Damien Le Moal wrote: On 2020/03/24 20:04, Bob Liu wrote: This patch implemented metadata support for regular device by: - Emulated zone information for regular device. - Store

Re: [dm-devel] [RFC PATCH v2 3/3] dm zoned: add regular device info to metadata

2020-03-25 Thread Hannes Reinecke
On 3/25/20 8:29 AM, Bob Liu wrote: On 3/25/20 2:47 PM, Hannes Reinecke wrote: On 3/25/20 7:29 AM, Damien Le Moal wrote: On 2020/03/24 20:04, Bob Liu wrote: This patch implemented metadata support for regular device by:   - Emulated zone information for regular device.   - Store metadata at

Re: [dm-devel] [PATCH resend] dm zoned: remove duplicated nr_rnd_zones increasement

2020-03-25 Thread Sasha Levin
Hi [This is an automated email] This commit has been processed because it contains a "Fixes:" tag fixing commit: 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target"). The bot has tested the following trees: v5.5.11, v5.4.27, v4.19.112, v4.14.174. v5.5.11: Build OK! v5.4.27:

Re: [dm-devel] [RFC PATCH v2 1/3] dm zoned: rename dev name to zoned_dev

2020-03-25 Thread Bob Liu
Hi Damien, On 3/25/20 2:29 PM, Damien Le Moal wrote: > On 2020/03/24 20:03, Bob Liu wrote: >> This is a prepare patch, no function change. >> Since will introduce regular device, rename dev name to zoned_dev to >> make things clear. > > zdev would be shorter and as explicit I think. > Thank

Re: [dm-devel] [RFC PATCH v2 3/3] dm zoned: add regular device info to metadata

2020-03-25 Thread Bob Liu
On 3/25/20 2:47 PM, Hannes Reinecke wrote: > On 3/25/20 7:29 AM, Damien Le Moal wrote: >> On 2020/03/24 20:04, Bob Liu wrote: >>> This patch implemented metadata support for regular device by: >>>   - Emulated zone information for regular device. >>>   - Store metadata at the beginning of regular

Re: [dm-devel] [RFC PATCH v2 0/3] dm zoned: extend the way of exposing zoned block device

2020-03-25 Thread Bob Liu
On 3/24/20 7:52 PM, Hannes Reinecke wrote: > On 3/24/20 12:02 PM, Bob Liu wrote: >> Motivation: >> dm-zoned exposes a zoned block device(ZBC) as a regular block device by >> storing >> metadata and buffering random writes in its conventional zones. >> This way is not flexible, there must be

[dm-devel] [RFC PATCH v2 2/3] dm zoned: introduce regular device to dm-zoned-target

2020-03-25 Thread Bob Liu
Introduce a regular device for storing metadata and buffer write, zoned device is used by default if no regular device was set by dmsetup. The corresponding dmsetup cmd is: echo "0 $size zoned $regular_device $zoned_device" | dmsetup create $dm-zoned-name Signed-off-by: Bob Liu ---

[dm-devel] [RFC PATCH v2 0/3] dm zoned: extend the way of exposing zoned block device

2020-03-25 Thread Bob Liu
Motivation: dm-zoned exposes a zoned block device(ZBC) as a regular block device by storing metadata and buffering random writes in its conventional zones. This way is not flexible, there must be enough conventional zones and the performance may be constrained. This patchset split the metadata

[dm-devel] [RFC PATCH v2 1/3] dm zoned: rename dev name to zoned_dev

2020-03-25 Thread Bob Liu
This is a prepare patch, no function change. Since will introduce regular device, rename dev name to zoned_dev to make things clear. Signed-off-by: Bob Liu --- drivers/md/dm-zoned-metadata.c | 112 - drivers/md/dm-zoned-target.c | 62

[dm-devel] [RFC PATCH v2 3/3] dm zoned: add regular device info to metadata

2020-03-25 Thread Bob Liu
This patch implemented metadata support for regular device by: - Emulated zone information for regular device. - Store metadata at the beginning of regular device. | --- zoned device --- | -- regular device || ^ ^ | |Metadata zone 0

Re: [dm-devel] [PATCH v2] dm-integrity: Prevent RMW for full metadata buffer writes

2020-03-25 Thread Lukas Straub
On Tue, 24 Mar 2020 13:18:22 -0400 Mike Snitzer wrote: > On Thu, Feb 27 2020 at 8:26am -0500, > Lukas Straub wrote: > > > If a full metadata buffer is being written, don't read it first. This > > prevents a read-modify-write cycle and increases performance on HDDs > > considerably. > > > >

[dm-devel] [PATCH resend] dm zoned: remove duplicated nr_rnd_zones increasement

2020-03-25 Thread Bob Liu
zmd->nr_rnd_zones was increased twice by mistake. The other place: 1131 zmd->nr_useable_zones++; 1132 if (dmz_is_rnd(zone)) { 1133 zmd->nr_rnd_zones++; ^^^ Cc: sta...@vger.kernel.org Fixes:

Re: [dm-devel] [RFC PATCH v2 3/3] dm zoned: add regular device info to metadata

2020-03-25 Thread Damien Le Moal
On 2020/03/25 15:47, Hannes Reinecke wrote: > On 3/25/20 7:29 AM, Damien Le Moal wrote: >> On 2020/03/24 20:04, Bob Liu wrote: >>> This patch implemented metadata support for regular device by: >>> - Emulated zone information for regular device. >>> - Store metadata at the beginning of regular

Re: [dm-devel] [RFC PATCH v2 3/3] dm zoned: add regular device info to metadata

2020-03-25 Thread Hannes Reinecke
On 3/25/20 7:29 AM, Damien Le Moal wrote: On 2020/03/24 20:04, Bob Liu wrote: This patch implemented metadata support for regular device by: - Emulated zone information for regular device. - Store metadata at the beginning of regular device. | --- zoned device --- | -- regular device

Re: [dm-devel] [RFC PATCH v2 1/3] dm zoned: rename dev name to zoned_dev

2020-03-25 Thread Damien Le Moal
On 2020/03/24 20:03, Bob Liu wrote: > This is a prepare patch, no function change. > Since will introduce regular device, rename dev name to zoned_dev to > make things clear. zdev would be shorter and as explicit I think. > > Signed-off-by: Bob Liu > --- > drivers/md/dm-zoned-metadata.c | 112

Re: [dm-devel] [RFC PATCH v2 3/3] dm zoned: add regular device info to metadata

2020-03-25 Thread Damien Le Moal
On 2020/03/24 20:04, Bob Liu wrote: > This patch implemented metadata support for regular device by: > - Emulated zone information for regular device. > - Store metadata at the beginning of regular device. > > | --- zoned device --- | -- regular device || > ^ ^ >