[dm-devel] [PATCH] multipathd: fix compilation issue with liburcu < 0.8

2021-05-12 Thread mwilck
From: Martin Wilck To avoid race conditions with pending RCU callbacks on exit, it's necessary to call rcu_barrier() in cleanup_rcu() (see https://lists.lttng.org/pipermail/lttng-dev/2021-May/029958.html and follow-ups). rcu_barrier() is only available in User-space RCU v0.8 and newer. Fix it

Re: [dm-devel] [PATCH 3/5] multipathd: make ev_remove_path return success on path removal

2021-05-12 Thread Martin Wilck
On Wed, 2021-05-12 at 14:53 -0500, Benjamin Marzinski wrote: > On Wed, May 12, 2021 at 11:38:08AM +, Martin Wilck wrote: > > On Tue, 2021-05-11 at 18:22 -0500, Benjamin Marzinski wrote: > > > When ev_remove_path() returns success, callers assume that the > > > path > > > (and > > > possibly

Re: [dm-devel] [PATCH 3/5] multipathd: make ev_remove_path return success on path removal

2021-05-12 Thread Benjamin Marzinski
On Wed, May 12, 2021 at 08:36:49PM +, Martin Wilck wrote: > On Wed, 2021-05-12 at 14:53 -0500, Benjamin Marzinski wrote: > > On Wed, May 12, 2021 at 11:38:08AM +, Martin Wilck wrote: > > > On Tue, 2021-05-11 at 18:22 -0500, Benjamin Marzinski wrote: > > So AFAICS, the only way for a path

Re: [dm-devel] [PATCH 4/5] multipath: free vectors in configure

2021-05-12 Thread Benjamin Marzinski
On Wed, May 12, 2021 at 12:36:42PM +, Martin Wilck wrote: > On Tue, 2021-05-11 at 18:22 -0500, Benjamin Marzinski wrote: > > configure() can retry multiple times, each time reallocing a maps and > > paths vector, and leaking the previous ones. Fix this by always > > freeing > > the vectors

Re: [dm-devel] [PATCH 3/5] multipathd: make ev_remove_path return success on path removal

2021-05-12 Thread Benjamin Marzinski
On Wed, May 12, 2021 at 11:38:08AM +, Martin Wilck wrote: > On Tue, 2021-05-11 at 18:22 -0500, Benjamin Marzinski wrote: > > When ev_remove_path() returns success, callers assume that the path > > (and > > possibly the map) has been removed.  When ev_remove_path() returns > > failure, callers

Re: [dm-devel] [PATCH 5/5] kpartx: Don't leak memory when getblock returns NULL

2021-05-12 Thread Martin Wilck
On Tue, 2021-05-11 at 18:22 -0500, Benjamin Marzinski wrote: > If a new block was allocated, but couldn't be filled, getblock will > discard it. When it does so, it needs to free the block to avoid > leaking > memory. Found by coverity. > > Signed-off-by: Benjamin Marzinski Reviewed-by: Martin

Re: [dm-devel] [PATCH 4/5] multipath: free vectors in configure

2021-05-12 Thread Martin Wilck
On Tue, 2021-05-11 at 18:22 -0500, Benjamin Marzinski wrote: > configure() can retry multiple times, each time reallocing a maps and > paths vector, and leaking the previous ones. Fix this by always > freeing > the vectors before configure() exits. Found by coverity. > > Signed-off-by: Benjamin

Re: [dm-devel] [PATCH 3/5] multipathd: make ev_remove_path return success on path removal

2021-05-12 Thread Martin Wilck
On Tue, 2021-05-11 at 18:22 -0500, Benjamin Marzinski wrote: > When ev_remove_path() returns success, callers assume that the path > (and > possibly the map) has been removed.  When ev_remove_path() returns > failure, callers assume that the path has not been removed. However, > the > path could

Re: [dm-devel] [LSF/MM/BFP ATTEND] [LSF/MM/BFP TOPIC] Storage: Copy Offload

2021-05-12 Thread Hannes Reinecke
On 5/11/21 2:15 AM, Chaitanya Kulkarni wrote: Hi, * Background :- --- Copy offload is a feature that allows file-systems or storage devices to be instructed to copy files/logical blocks without requiring involvement of the

Re: [dm-devel] [PATCH 1/5] multipathd: don't fail to remove path once the map is removed

2021-05-12 Thread Benjamin Marzinski
On Wed, May 12, 2021 at 09:11:01AM +, Martin Wilck wrote: > On Tue, 2021-05-11 at 18:22 -0500, Benjamin Marzinski wrote: > > In ev_remove_path(), if update_mpp_paths() fails, we delete the > > entire > > map. However, since update_mpp_paths() happens before we call > > set_path_removed(),

Re: [dm-devel] [PATCH 2/5] multipathd: remove duplicate orphan_paths in flush_map

2021-05-12 Thread Martin Wilck
On Tue, 2021-05-11 at 18:22 -0500, Benjamin Marzinski wrote: > remove_map_and_stop_waiter() already calls orphan_paths() so > flush_map() > doesn't need to call orphan_paths() before calling > remove_map_and_stop_waiter(). > > Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck > --- >

Re: [dm-devel] [PATCH 1/5] multipathd: don't fail to remove path once the map is removed

2021-05-12 Thread Martin Wilck
On Tue, 2021-05-11 at 18:22 -0500, Benjamin Marzinski wrote: > In ev_remove_path(), if update_mpp_paths() fails, we delete the > entire > map. However, since update_mpp_paths() happens before we call > set_path_removed(), pp->initialized isn't set to INIT_REMOVED, so > remove_map_and_stop_waiter()

Re: [dm-devel] [PATCH] dm-integrity: revert the discard patch

2021-05-12 Thread Milan Broz
On 12/05/2021 14:28, Mikulas Patocka wrote: > Revert the commit 7a5b96b4784454ba258e83dc7469ddbacd3aaac3 ("dm integrity: > use discard support when recalculating"). > > There's a bug that when we write some data beyond the current recalculate > boundary, the checksum will be rewritten with the

[dm-devel] [PATCH] dm-integrity: revert the discard patch

2021-05-12 Thread Mikulas Patocka
Revert the commit 7a5b96b4784454ba258e83dc7469ddbacd3aaac3 ("dm integrity: use discard support when recalculating"). There's a bug that when we write some data beyond the current recalculate boundary, the checksum will be rewritten with the discard filler later. And the data will no longer have

Re: [dm-devel] [LSF/MM/BFP ATTEND] [LSF/MM/BFP TOPIC] Storage: Copy Offload

2021-05-12 Thread Knight, Frederick
I'd love to participate in this discussion. You mention the 2 different models (single command vs. multi-command). Just as a reminder, there are specific reasons for those 2 different models. Some applications know both the source and the destination, so can use the single command model (the

Re: [dm-devel] [LSF/MM/BFP ATTEND] [LSF/MM/BFP TOPIC] Storage: Copy Offload

2021-05-12 Thread Erwin van Londen
On Tue, 2021-05-11 at 00:15 +, Chaitanya Kulkarni wrote: > Hi, > > * Background :- > - > -- > > Copy offload is a feature that allows file-systems or storage devices > to be instructed to copy files/logical blocks without

Re: [dm-devel] [LSF/MM/BFP ATTEND] [LSF/MM/BFP TOPIC] Storage: Copy Offload

2021-05-12 Thread Johannes Thumshirn
On 11/05/2021 02:15, Chaitanya Kulkarni wrote: > Hi, > > * Background :- > --- > > Copy offload is a feature that allows file-systems or storage devices > to be instructed to copy files/logical blocks without requiring >