Re: [dm-devel] [PATCH 2/2] dm-zoned: fix a few typos

2019-08-02 Thread Damien Le Moal
On 2019/08/03 7:02, Dmitry Fomichev wrote: > Signed-off-by: Dmitry Fomichev > --- > drivers/md/dm-zoned-metadata.c | 8 > drivers/md/dm-zoned-reclaim.c | 2 +- > 2 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metad

Re: [dm-devel] [PATCH 1/2] dm-zoned: add SPDX license identifiers

2019-08-02 Thread Damien Le Moal
On 2019/08/03 7:02, Dmitry Fomichev wrote: > Signed-off-by: Dmitry Fomichev > --- > drivers/md/dm-zoned-metadata.c | 1 + > drivers/md/dm-zoned-reclaim.c | 1 + > drivers/md/dm-zoned-target.c | 1 + > drivers/md/dm-zoned.h | 1 + > 4 files changed, 4 insertions(+) > > diff --git a/dr

Re: [dm-devel] [git pull] device mapper fixes for 5.3-rc3

2019-08-02 Thread pr-tracker-bot
The pull request you sent on Fri, 2 Aug 2019 11:18:25 -0400: > git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git > tags/for-5.3/dm-fixes-1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/b2c742373d19b356b112d9f3ca4e9377c6f9708d Thank you! -- D

[dm-devel] [PATCH 0/2] dm-zoned: add SPDX identifiers

2019-08-02 Thread Dmitry Fomichev
The first patch adds SPDX IDs to all dm-zoned source files. The second patch fixes a few typos. No functional change. Dmitry Fomichev (2): dm-zoned: add SPDX license identifiers dm-zoned: fix a few typos drivers/md/dm-zoned-metadata.c | 9 + drivers/md/dm-zoned-reclaim.c | 3 ++-

[dm-devel] [PATCH 2/2] dm-zoned: fix a few typos

2019-08-02 Thread Dmitry Fomichev
Signed-off-by: Dmitry Fomichev --- drivers/md/dm-zoned-metadata.c | 8 drivers/md/dm-zoned-reclaim.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c index 23e9a6d9350b..ded4984d18c9 100644 --- a/drive

[dm-devel] [PATCH 1/2] dm-zoned: add SPDX license identifiers

2019-08-02 Thread Dmitry Fomichev
Signed-off-by: Dmitry Fomichev --- drivers/md/dm-zoned-metadata.c | 1 + drivers/md/dm-zoned-reclaim.c | 1 + drivers/md/dm-zoned-target.c | 1 + drivers/md/dm-zoned.h | 1 + 4 files changed, 4 insertions(+) diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c

[dm-devel] [PATCH 15/16] multipathd: use marginal_pathgroups

2019-08-02 Thread Benjamin Marzinski
This commit makes the marginal_pathgroups option work with the existing methods for determining marginal paths. It also merges the code for the marginal_path and sand_path_err methods. This has the side effect of making the marginal_path code set a marginal path's state to "delayed" instead of "sh

[dm-devel] [PATCH 12/16] tests: add tests for grouping marginal paths.

2019-08-02 Thread Benjamin Marzinski
Signed-off-by: Benjamin Marzinski --- tests/pgpolicy.c | 337 +-- 1 file changed, 295 insertions(+), 42 deletions(-) diff --git a/tests/pgpolicy.c b/tests/pgpolicy.c index 04a77c4c..ab09f91c 100644 --- a/tests/pgpolicy.c +++ b/tests/pgpolicy.c @@ -40,6

[dm-devel] [PATCH 11/16] libmultipath: make group_paths handle marginal paths

2019-08-02 Thread Benjamin Marzinski
group_paths() will now create seperate path groups for marginal and normal paths, and place all of the marginal path groups after the normal ones, in order by priority. Signed-off-by: Benjamin Marzinski --- libmultipath/pgpolicies.c | 83 +- libmultipath/swit

[dm-devel] [PATCH 08/16] libmultipath: consolidate group_by_* functions

2019-08-02 Thread Benjamin Marzinski
group_by_node_name() and group_by_serial() are exactly the same except for how the paths are compared. group_by_prio() is different but its pathvec solves the same issue as the bitmap from the other two functions, and since we are always running sort_pathgroups() after calling pgpriorityfn, there i

[dm-devel] [PATCH 09/16] tests: update pgpolicy tests to work with group_paths()

2019-08-02 Thread Benjamin Marzinski
The pgpolicy unit tests now work again, using group_paths(). test_one_group0(), which was skipped with the old path grouping code because it failed, is now working correctly. Signed-off-by: Benjamin Marzinski --- tests/pgpolicy.c | 125 +++ 1 file chan

[dm-devel] [PATCH 06/16] libmultipath: remove store_pathgroup

2019-08-02 Thread Benjamin Marzinski
store_pathgroup() is only called by add_pathgroup(), and doesn't need to exist as a seperate function. Signed-off-by: Benjamin Marzinski --- libmultipath/structs.c | 16 +++- libmultipath/structs.h | 1 - 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/libmultipath/s

[dm-devel] [PATCH 03/16] tests: add path grouping policy unit tests.

2019-08-02 Thread Benjamin Marzinski
In preparation for changing the path grouping code, add some unit tests to verify that it works correctly. The only test that currently fails (and so it being skipped) is using MULTIBUS when mp->paths is empty. All the other path grouping policies free mp->paths, even if it is empty. one_group() sh

[dm-devel] [PATCH 13/16] libmultipath: add marginal_pathgroups config option

2019-08-02 Thread Benjamin Marzinski
group_paths now gets passed this to determine whether to enable marginal pathgroups. The unit tests have also been updated. Signed-off-by: Benjamin Marzinski --- libmultipath/config.h | 1 + libmultipath/configure.c | 5 +- libmultipath/dict.c | 3 + libmultipath/pgpolicies.c |

[dm-devel] [PATCH 16/16] multipath: update man pages

2019-08-02 Thread Benjamin Marzinski
Add documentation for the marginal_pathgroups option and the (un)setmarginal commands. Signed-off-by: Benjamin Marzinski --- multipath/multipath.conf.5 | 34 ++ multipathd/multipathd.8| 19 +++ 2 files changed, 49 insertions(+), 4 deletions(-)

[dm-devel] [PATCH 02/16] libmultipath: add marginal paths and groups infrastructure

2019-08-02 Thread Benjamin Marzinski
This commit adds a marginal variable ot the paths and pathgroups structs. The marginal paths variable can be set by multipathd path setmarginal and cleared by multipathd path unsetmarginal All of the marginal paths on a multipath device can be cleared by multipathd map unsetmarginal Curren

[dm-devel] [PATCH 14/16] libmutipath: deprecate delay_*_checks

2019-08-02 Thread Benjamin Marzinski
The delay_checks shaky paths detection method works the same way as the san_path_err method, but not as well, with less configurability, and with the code spread all over check_path(). The only real difference is that marks the path as marginal for a certain number of path checks instead of for a s

[dm-devel] [PATCH 01/16] libmultipath: make vector_foreach_slot_backwards work as expected

2019-08-02 Thread Benjamin Marzinski
All of the code that uses vector_foreach_slot_backwards() treats "i" as the index of the entry "p", but the way it was coded, that wasn't the case. "i" was the number of the entry counting from 1, not 0. Signed-off-by: Benjamin Marzinski --- libmultipath/vector.h | 2 +- 1 file changed, 1 insert

[dm-devel] [PATCH 10/16] libmultipath: make pgpolicyfn take a paths vector

2019-08-02 Thread Benjamin Marzinski
To enable future changes, mp->pgpolicyfn() now takes a vector of paths instead of always using mp->paths. Signed-off-by: Benjamin Marzinski --- libmultipath/pgpolicies.c | 38 +++--- libmultipath/pgpolicies.h | 10 +- libmultipath/structs.h| 2 +- 3 f

[dm-devel] [PATCH 07/16] libmultipath: make one_group allocate a new vector

2019-08-02 Thread Benjamin Marzinski
All the pgpolicy functions besides one_group() allocate a new vector for the pathgroups. If one_group() works the same, it is easier to factor out the common code. Signed-off-by: Benjamin Marzinski --- libmultipath/pgpolicies.c | 22 +++--- 1 file changed, 11 insertions(+), 11 de

[dm-devel] [PATCH 00/16] multipath marginal pathgroups

2019-08-02 Thread Benjamin Marzinski
The first patch in this series is simply a resend of my previous patch to fix vector_foreach_slot_backwards(). The rest of the patches are related to adding support for an alternative way to deal with marginal paths. Instead of delaying their reinstatement, which can cause problems if multipath isn

[dm-devel] [PATCH 05/16] libmultipath: fix double free in pgpolicyfn error paths

2019-08-02 Thread Benjamin Marzinski
In the pgpolicy functions, if an error is encountered after alloc_pathgroup() is called, but before the path group is added to a multipath device with add_pathgroup(), the pathgroup needs to be cleaned up by calling free_pathgroup(). However, after the pathgroup has been added to the multipath devi

[dm-devel] [PATCH 04/16] libmultipath: add wrapper function around pgpolicyfn

2019-08-02 Thread Benjamin Marzinski
group_paths() is a wrapper around the pgpolicy functions, that pulls out the common code from the beginning and the end. However since one_group() didn't free the mp->paths vector, it has to set it to NULL, to avoid having the wrapper code do that. Also, the pathgroups in group_by_prio are now need

[dm-devel] [git pull] device mapper fixes for 5.3-rc3

2019-08-02 Thread Mike Snitzer
Hi Linus, The following changes since commit 609488bc979f99f805f34e9a32c1e3b71179d10b: Linux 5.3-rc2 (2019-07-28 12:47:02 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git tags/for-5.3/dm-fixes-1 for you to fetch change

Re: [dm-devel] [PATCH] md/raid0: Fail BIOs if their underlying block device is gone

2019-08-02 Thread Song Liu
> On Aug 1, 2019, at 1:28 PM, Guilherme G. Piccoli > wrote: > > > > On 31/07/2019 16:56, Song Liu wrote: >> On Wed, Jul 31, 2019 at 12:54 PM Song Liu wrote: >>> >>> On Tue, Jul 30, 2019 at 5:31 AM Guilherme G. Piccoli >>> wrote: On 29/07/2019 21:08, NeilBrown wrote: > [...

Re: [dm-devel] [PATCH 1/2] md/raid0: Introduce new array state 'broken' for raid0

2019-08-02 Thread Guilherme G. Piccoli
On 31/07/2019 16:43, Song Liu wrote: >[...] >> @@ -4315,6 +4329,7 @@ array_state_store(struct mddev *mddev, const char >> *buf, size_t len) >> break; >> case write_pending: >> case active_idle: >> + case broken: >> /* these cannot be set */ >>

Re: [dm-devel] [PATCH 1/2] md/raid0: Introduce new array state 'broken' for raid0

2019-08-02 Thread Song Liu
On Wed, Jul 31, 2019 at 6:05 AM Guilherme G. Piccoli wrote: > > On 30/07/2019 21:28, NeilBrown wrote: > > On Tue, Jul 30 2019, Bob Liu wrote: > >> > >> > >> Curious why only raid0 has this issue? > > > > Actually, it isn't only raid0. 'linear' has the same issue. > > Probably the fix for raid0 sh

Re: [dm-devel] [PATCH] md/raid0: Fail BIOs if their underlying block device is gone

2019-08-02 Thread Song Liu
On Wed, Jul 31, 2019 at 12:54 PM Song Liu wrote: > > On Tue, Jul 30, 2019 at 5:31 AM Guilherme G. Piccoli > wrote: > > > > On 29/07/2019 21:08, NeilBrown wrote: > > >[...] > > >> +if (unlikely(test_bit(MD_BROKEN, &mddev->flags))) { > > >> +bio_io_error(bio); > > >> +re

Re: [dm-devel] [RFC PATCH 0/3] md: export internal stats through debugfs

2019-08-02 Thread Song Liu
On Fri, Jul 26, 2019 at 10:48 PM Hou Tao wrote: > > Hi, > [...] > > > > Hi, > > > > Sorry for the late reply. > > > > I think these information are really debug information that we should not > > show in /sys. Once we expose them in /sys, we need to support them > > because some use space may star

Re: [dm-devel] [PATCH] md/raid0: Fail BIOs if their underlying block device is gone

2019-08-02 Thread Song Liu
On Tue, Jul 30, 2019 at 5:31 AM Guilherme G. Piccoli wrote: > > On 29/07/2019 21:08, NeilBrown wrote: > >[...] > >> +if (unlikely(test_bit(MD_BROKEN, &mddev->flags))) { > >> +bio_io_error(bio); > >> +return BLK_QC_T_NONE; > >> +} > > > > I think this should only fai

Re: [dm-devel] [PATCH] md/raid0: Fail BIOs if their underlying block device is gone

2019-08-02 Thread Guilherme G. Piccoli
On 31/07/2019 16:56, Song Liu wrote: > On Wed, Jul 31, 2019 at 12:54 PM Song Liu wrote: >> >> On Tue, Jul 30, 2019 at 5:31 AM Guilherme G. Piccoli >> wrote: >>> >>> On 29/07/2019 21:08, NeilBrown wrote: [...] > +if (unlikely(test_bit(MD_BROKEN, &mddev->flags))) { > +

Re: [dm-devel] [PATCH 1/2] md/raid0: Introduce new array state 'broken' for raid0

2019-08-02 Thread Guilherme G. Piccoli
On 30/07/2019 21:28, NeilBrown wrote: > On Tue, Jul 30 2019, Bob Liu wrote: >> >> >> Curious why only raid0 has this issue? > > Actually, it isn't only raid0. 'linear' has the same issue. > Probably the fix for raid0 should be applied to linear too. > > NeilBrown > Thanks Neil, it makes sense

Re: [dm-devel] [PATCH 1/2] md/raid0: Introduce new array state 'broken' for raid0

2019-08-02 Thread Song Liu
On Mon, Jul 29, 2019 at 1:33 PM Guilherme G. Piccoli wrote: > > Currently if a md/raid0 array gets one or more members removed while > being mounted, kernel keeps showing state 'clean' in the 'array_state' > sysfs attribute. Despite udev signaling the member device is gone, 'mdadm' > cannot issue