Re: [PATCH 1/6] md: Revert "md: Don't register sync_thread for reshape directly"

2024-02-29 Thread Xiao Ni
On Fri, Mar 1, 2024 at 10:38 AM Yu Kuai wrote: > > Hi, > > 在 2024/02/29 23:49, Xiao Ni 写道: > > This reverts commit ad39c08186f8a0f221337985036ba86731d6aafe. > > > > Function stop_sync_thread only wakes up sync task. It also needs to > > wake up sync thread. This problem will be fixed in the follow

[PATCH 07/10] dm vdo permassert: audit all of ASSERT to test for VDO_SUCCESS

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Also rename ASSERT to VDO_ASSERT and ASSERT_LOG_ONLY to VDO_ASSERT_LOG_ONLY. But re-introduce ASSERT and ASSERT_LOG_ONLY as a placeholder for the benefit of dm-vdo/indexer. Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/action-manager.c |

[PATCH 03/10] dm vdo: check for VDO_SUCCESS return value from memory-alloc functions

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer VDO_SUCCESS and UDS_SUCCESS were used interchangably, update all callers of VDO's memory-alloc functions to consistently check for VDO_SUCCESS. Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/block-map.c | 6 +++--- drivers/m

[PATCH 08/10] dm vdo encodings: update some stale comments

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/encodings.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/md/dm-vdo/encodings.c b/drivers/md/dm-vdo/encodings.c index e24c31bc3524..ebb0a4edd109 100644 --- a/drive

[PATCH 02/10] dm vdo memory-alloc: return VDO_SUCCESS on success

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/memory-alloc.c | 24 drivers/md/dm-vdo/memory-alloc.h | 8 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/md/dm-vdo/memory-alloc.c b/dr

[PATCH 09/10] dm vdo indexer: update ASSERT and ASSERT_LOG_ONLY usage

2024-02-29 Thread Matthew Sakai
Update indexer uses of ASSERT and ASSERT_LOG_ONLY to VDO_ASSERT and VDO_ASSERT_LOG_ONLY, respectively. Remove ASSERT and ASSERT_LOG_ONLY. Also rename uds_assertion_failed to vdo_assertion_failed. Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/indexer/chapter-index.c | 16 ++-- drivers/md/dm-

[PATCH 10/10] dm vdo target: eliminate inappropriate uses of UDS_SUCCESS

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Most should be VDO_SUCCESS. But comparing the return from kstrtouint() with UDS_SUCCESS (happens to be 0) makes no sense. Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/dm-vdo-target.c | 14 +++--- 1 file changed, 7 insertions(+), 7

[PATCH 01/10] dm vdo errors: remove unused error codes

2024-02-29 Thread Matthew Sakai
Also define VDO_SUCCESS in a more central location, and rename error block constants for clarity. Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/errors.c | 4 drivers/md/dm-vdo/errors.h | 13 +++-- drivers/md/dm-vdo/status-codes.c | 10 -- drivers/md/dm-vdo/

[PATCH 06/10] dm-vdo funnel-workqueue: return VDO_SUCCESS from make_simple_work_queue

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/funnel-workqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-vdo/funnel-workqueue.c b/drivers/md/dm-vdo/funnel-workqueue.c index a88f5c93eae5..a923432f0a37

[PATCH 05/10] dm vdo thread-utils: return VDO_SUCCESS on vdo_create_thread success

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Update all callers to check for VDO_SUCCESS. Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/indexer/funnel-requestqueue.c | 2 +- drivers/md/dm-vdo/indexer/index.c | 2 +- drivers/md/dm-vdo/indexer/volume.c | 2 +-

[PATCH 04/10] dm vdo int-map: return VDO_SUCCESS on success

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Update all callers to check for VDO_SUCCESS (most already did). Also fix whitespace for update_mapping() parameters. Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/block-map.c| 4 ++-- drivers/md/dm-vdo/int-map.c | 20 --

[PATCH 00/10] dm vdo: standardize on VDO_SUCCESS

2024-02-29 Thread Matthew Sakai
Clean up code to consistently return and check for appropriate return values, usually VDO_SUCCESS. Matthew Sakai (2): dm vdo errors: remove unused error codes dm vdo indexer: update ASSERT and ASSERT_LOG_ONLY usage Mike Snitzer (8): dm vdo memory-alloc: return VDO_SUCCESS on success dm vd

[PATCH 1/2] dm vdo memory-alloc: change from uds_ to vdo_ namespace

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/action-manager.c| 2 +- drivers/md/dm-vdo/admin-state.c | 2 +- drivers/md/dm-vdo/block-map.c | 60 ++-- drivers/md/dm-vdo/data-vio.c

[PATCH 2/2] dm vdo memory-alloc: rename vdo_do_allocation to __vdo_do_allocation

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer __vdo_do_allocation shouldn't be used outside of memory-alloc.h, so add hidden prefix. Also, tabify the vdo_allocate_extended macro. Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/memory-alloc.h | 30 +++--- 1 file ch

[PATCH 0/2] dm vdo memory-alloc: rename functions

2024-02-29 Thread Matthew Sakai
Mike Snitzer (2): dm vdo memory-alloc: change from uds_ to vdo_ namespace dm vdo memory-alloc: rename vdo_do_allocation to __vdo_do_allocation drivers/md/dm-vdo/action-manager.c| 2 +- drivers/md/dm-vdo/admin-state.c | 2 +- drivers/md/dm-vdo/block-map.c

[PATCH] dm-vdo: change unnamed enums to defines

2024-02-29 Thread Matthew Sakai
From: Bruce Johnston Signed-off-by: Bruce Johnston Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/block-map.c | 6 ++-- drivers/md/dm-vdo/data-vio.c | 8 ++--- drivers/md/dm-vdo/dedupe.c | 20 --- drivers/md/dm-vdo/dm-vdo-target.c

[PATCH 11/11] dm vdo: remove outdated pointer_map reference

2024-02-29 Thread Matthew Sakai
Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/vdo.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/md/dm-vdo/vdo.c b/drivers/md/dm-vdo/vdo.c index c161dffeb91a..d1640451 100644 --- a/drivers/md/dm-vdo/vdo.c +++ b/drivers/md/dm-vdo/vdo.c @@ -67,10 +67,7 @@

[PATCH 08/11] dm vdo: Modify mismatched function name

2024-02-29 Thread Matthew Sakai
From: Jiapeng Chong No functional modification involved. src/c++/vdo/base/admin-state.c:310: warning: expecting prototype for vdo_drain_operation(). Prototype was for assert_vdo_drain_operation() instead. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Matthew Sakai ---

[PATCH 02/11] dm vdo slab-depot: Modify mismatched function name

2024-02-29 Thread Matthew Sakai
From: Jiapeng Chong No functional modification involved. src/c++/vdo/base/slab-depot.c:2042: warning: expecting prototype for vdo_find_free_block(). Prototype was for find_free_block() instead. src/c++/vdo/base/slab-depot.c:5036: warning: expecting prototype for get_depot_slab_journal_statisti

[PATCH 09/11] dm vdo indexer delta-index: fix typos in comments

2024-02-29 Thread Matthew Sakai
Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/indexer/delta-index.c | 2 +- drivers/md/dm-vdo/indexer/delta-index.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/dm-vdo/indexer/delta-index.c b/drivers/md/dm-vdo/indexer/delta-index.c index 4aace707545a..6a

[PATCH 05/11] dm vdo: Modify mismatched function name

2024-02-29 Thread Matthew Sakai
From: Jiapeng Chong No functional modification involved. src/c++/vdo/base/encodings.c:1178: warning: expecting prototype for vdo_decode_component(). Prototype was for decode_vdo_component() instead. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Matthew Sakai --- driv

[PATCH 00/11] dm vdo: fix minor comment issues

2024-02-29 Thread Matthew Sakai
Jiapeng Chong (8): dm vdo: Modify mismatched function name dm vdo slab-depot: Modify mismatched function name dm vdo: Modify mismatched function name dm vdo: Modify mismatched function name dm vdo: Modify mismatched function name dm vdo: Modify mismatched function name dm vdo dedupe:

[PATCH 07/11] dm vdo dedupe: Modify mismatched function name

2024-02-29 Thread Matthew Sakai
From: Jiapeng Chong No functional modification involved. src/c++/vdo/base/dedupe.c:2792: warning: expecting prototype for vdo_dump_hash_zone(). Prototype was for dump_hash_zone() instead. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Matthew Sakai --- drivers/md/dm-v

[PATCH 10/11] dm vdo: update module comments

2024-02-29 Thread Matthew Sakai
Update outdated comments referring to separate VDO and UDS modules. Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/dm-vdo-target.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/md/dm-vdo/dm-vdo-target.c b/drivers/md/dm-vdo/dm-vdo-target.c index 0114

[PATCH 03/11] dm vdo: Modify mismatched function name

2024-02-29 Thread Matthew Sakai
From: Jiapeng Chong No functional modification involved. src/c++/vdo/base/physical-zone.c:268: warning: expecting prototype for vdo_free_pbn_lock_pool(). Prototype was for free_pbn_lock_pool() instead. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Matthew Sakai --- d

[PATCH 06/11] dm vdo: Modify mismatched function name

2024-02-29 Thread Matthew Sakai
From: Jiapeng Chong No functional modification involved. src/c++/vdo/base/flush.c:97: warning: expecting prototype for waiter_as_flush(). Prototype was for vdo_waiter_as_flush() instead. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Matthew Sakai --- drivers/md/dm-vd

[PATCH 01/11] dm vdo: Modify mismatched function name

2024-02-29 Thread Matthew Sakai
From: Jiapeng Chong No functional modification involved. src/c++/vdo/base/vdo.c:276: warning: expecting prototype for vdo_read_geometry_block(). Prototype was for read_geometry_block() instead. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Matthew Sakai --- drivers/m

[PATCH 04/11] dm vdo: Modify mismatched function name

2024-02-29 Thread Matthew Sakai
From: Jiapeng Chong No functional modification involved. src/c++/vdo/base/logical-zone.c:303: warning: expecting prototype for void attempt_generation_complete_notification()(). Prototype was for attempt_generation_complete_notification() instead. Reported-by: Abaci Robot Signed-off-by: Jiap

Re: [PATCH 4/6] dm-raid/md: Clear MD_RECOVERY_WAIT when stopping dmraid

2024-02-29 Thread Xiao Ni
On Fri, Mar 1, 2024 at 10:45 AM Yu Kuai wrote: > > Hi, > > 在 2024/02/29 23:49, Xiao Ni 写道: > > MD_RECOVERY_WAIT is used by dmraid to delay reshape process by patch > > commit 644e2537fdc7 ("dm raid: fix stripe adding reshape deadlock"). > > Before patch commit f52f5c71f3d4b ("md: fix stopping sync

Re: [PATCH RFC 1/4] dm-raid/md: Clear MD_RECOVERY_WAIT when stopping dmraid

2024-02-29 Thread Xiao Ni
在 2024/2/26 下午5:36, Yu Kuai 写道: Hi, 在 2024/02/26 13:12, Xiao Ni 写道: On Mon, Feb 26, 2024 at 9:31 AM Yu Kuai wrote: Hi, 在 2024/02/23 21:20, Xiao Ni 写道: On Fri, Feb 23, 2024 at 11:32 AM Yu Kuai wrote: Hi, 在 2024/02/20 23:30, Xiao Ni 写道: MD_RECOVERY_WAIT is used by dmraid to delay resh

[PATCH 2/2] dm vdo: move indexer files into sub-directory

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer The goal is to assist high-level understanding of which code is conceptually specific to VDO's indexer. Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/Makefile| 34 ++- drivers/md/dm-vdo/data-vio.h

[PATCH 0/2] dm vdo: move indexer to sub-directory

2024-02-29 Thread Matthew Sakai
Matthew Sakai (1): dm vdo: remove unnecessary indexer.h includes Mike Snitzer (1): dm vdo: move indexer files into sub-directory drivers/md/dm-vdo/Makefile| 34 ++- drivers/md/dm-vdo/data-vio.h | 3 +- drivers/md/dm-vdo/dedupe.c

[PATCH 1/2] dm vdo: remove unnecessary indexer.h includes

2024-02-29 Thread Matthew Sakai
Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/encodings.h | 1 - drivers/md/dm-vdo/vdo.h | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/md/dm-vdo/encodings.h b/drivers/md/dm-vdo/encodings.h index 18794fd59b0b..e5ff2b0aaa79 100644 --- a/drivers/md/dm-vdo/encodings.h +++ b/

[PATCH 5/5] dm vdo: clean up scnprintf usage

2024-02-29 Thread Matthew Sakai
From: Chung Chung Ignore scnprintf return status since it is not necessary. Change write_* functions type from int to void since we no longer return any result. Also, clean up any code that checks or uses any scnprintf return results. Check uds_allocate return code which was previous ignored, ret

[PATCH 1/5] dm vdo slab-depot: delete unnecessary check in allocate_components

2024-02-29 Thread Matthew Sakai
From: Dan Carpenter This is a duplicate check so it can't be true. Delete it. Signed-off-by: Dan Carpenter Signed-off-by: Mike Snitzer Signed-off-by: Susan LeGendre-McGhee Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/slab-depot.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/

[PATCH 2/5] dm vdo flush: initialize return to NULL in allocate_flush

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Otherwise, error path could result in allocate_flush's subsequent check for flush being non-NULL leading to false positive. Reported-by: Dan Carpenter Signed-off-by: Mike Snitzer Signed-off-by: Susan LeGendre-McGhee Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/flush

[PATCH 4/5] dm vdo: include to resolve current being undeclared

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Reported when building on loongarch. Reported-by: Randy Dunlap Signed-off-by: Mike Snitzer Signed-off-by: Bruce Johnston Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/logger.c | 1 + drivers/md/dm-vdo/thread-registry.c | 1 + drivers/md/dm-vdo/thread-utils.c

[PATCH 0/5] dm vdo: fix various minor issues

2024-02-29 Thread Matthew Sakai
Fix several issues reported by upstream contributors. Chung Chung (1): dm vdo: clean up scnprintf usage Dan Carpenter (1): dm vdo slab-depot: delete unnecessary check in allocate_components Mike Snitzer (3): dm vdo flush: initialize return to NULL in allocate_flush dm vdo indexer-volume:

[PATCH 3/5] dm vdo indexer-volume: fix missing mutex_lock in process_entry

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Must mutex_lock after dm_bufio_read, before dm_bufio_read error handling, otherwise process_entry error path will return without volume->read_threads_mutex held. This fixes potential double mutex_unlock. Reported-by: Dan Carpenter Signed-off-by: Mike Snitzer Signed-off-by: S

[PATCH] dm vdo memory-alloc: simplify allocations_allowed()

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Signed-off-by: Mike Snitzer Signed-off-by: Susan LeGendre-McGhee Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/memory-alloc.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/md/dm-vdo/memory-alloc.c b/drivers/md/dm-vdo/memory-alloc.c i

[PATCH 2/2] dm vdo: remove internal ticket references from vdo

2024-02-29 Thread Matthew Sakai
From: Susan LeGendre-McGhee Signed-off-by: Susan LeGendre-McGhee Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/block-map.c | 8 drivers/md/dm-vdo/data-vio.c | 9 + drivers/md/dm-vdo/dm-vdo-target.c | 12 +--- drivers/md/dm-vdo/packer.c| 16 +

[PATCH 1/2] dm vdo: remove internal ticket references from indexer

2024-02-29 Thread Matthew Sakai
From: Susan LeGendre-McGhee Signed-off-by: Susan LeGendre-McGhee Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/memory-alloc.c | 8 drivers/md/dm-vdo/sparse-cache.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/md/dm-vdo/memory-alloc.c b/drivers/md

[PATCH 0/2] dm vdo: remove internal ticket references

2024-02-29 Thread Matthew Sakai
Susan LeGendre-McGhee (2): dm vdo: remove internal ticket references from indexer dm vdo: remove internal ticket references from vdo drivers/md/dm-vdo/block-map.c | 8 drivers/md/dm-vdo/data-vio.c | 9 + drivers/md/dm-vdo/dm-vdo-target.c | 12 +--- drivers/

[PATCH 06/13] dm vdo indexer: rename uds.h to indexer.h

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Also remove unnecessary include from funnel-queue.c. Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/chapter-index.c | 2 +- drivers/md/dm-vdo/config.h | 2 +- drivers/md/dm-vdo/data-vio.h| 2 +- drivers/md/dm-vd

[PATCH 05/13] dm vdo: rename uds-threads.[ch] to thread-utils.[ch]

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/Makefile | 2 +- drivers/md/dm-vdo/config.c | 2 +- drivers/md/dm-vdo/funnel-requestqueue.c | 2 +- drivers/md/dm-vdo/index-page-map.c

[PATCH 03/13] dm vdo uds-threads: push 'barrier' down to sparse-cache

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer The sparse-cache is the only user of the 'barrier' data structure, so just move it private to it. Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/sparse-cache.c | 69 +++- drivers/md/dm-vdo/uds-threads.c | 56 -

[PATCH 13/13] dm vdo thread-device: rename all methods to reflect vdo-only use

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Also moved vdo_init()'s call to vdo_initialize_thread_device_registry next to other registry initialization. Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/dm-vdo-target.c | 30 +++--- drivers/md/dm-vdo/logger.c

[PATCH 01/13] dm vdo: make uds_*_semaphore interface private to uds-threads.c

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/uds-threads.c | 39 + drivers/md/dm-vdo/uds-threads.h | 37 --- 2 files changed, 39 insertions(+), 37 deletions(-) diff --git a/drivers

[PATCH 12/13] dm vdo thread-registry: rename all methods to reflect vdo-only use

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Otherwise, uds_ prefix is misleading (vdo_ is the new catch-all for code that is used by vdo-only or _both_ vdo and the indexer code). Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/memory-alloc.c| 12 ++-- drivers/md/dm-vdo/threa

[PATCH 02/13] dm vdo uds-threads: eliminate uds_*_semaphore interfaces

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer The implementation of thread 'barrier' data structure does not require overdone private semaphore wrappers. Also rename the barrier structure's 'mutex' member (a semaphore) to 'lock'. Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/uds-thread

[PATCH 09/13] dm vdo thread-utils: remove all uds_*_mutex wrappers

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Just use mutex_init, mutex_lock and mutex_unlock. Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/index-session.c | 110 +- drivers/md/dm-vdo/index.c | 42 +--- drivers/md/dm-vdo/thread-utils.h |

[PATCH 11/13] dm vdo thread-utils: cleanup included headers

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/logger.c | 1 + drivers/md/dm-vdo/thread-utils.c | 4 ++-- drivers/md/dm-vdo/thread-utils.h | 6 -- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/md/dm-vdo/logge

[PATCH 04/13] dm vdo indexer sparse-cache: cleanup threads_barrier code

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Rename 'barrier' to 'threads_barrier', remove useless uds_destroy_barrier(), return void from remaining methods and clean up uds_make_sparse_cache() accordingly. Also remove uds_ prefix from the 2 remaining threads_barrier functions. Signed-off-by: Mike Snitzer Signed-off-by

[PATCH 07/13] dm vdo: fold thread-cond-var.c into thread-utils

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Further cleanup is needed for thread-utils interfaces given many functions should return void or be removed entirely because they amount to obfuscation via wrappers. Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/Makefile | 1 - dri

[PATCH 08/13] dm vdo thread-utils: push uds_*_cond interface down to indexer

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Only used by indexer components. Also return void from uds_init_cond(), remove uds_destroy_cond(), and fix up all callers. Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/index-session.c | 32 +-- drivers/md/dm-vdo/

[PATCH 00/13] dm vdo: clean up and simplify thread utilities

2024-02-29 Thread Matthew Sakai
Rename uds-threads to thread-utils, and simplify thread and synchronization utilities. Move some utilities closer to their only users. Mike Snitzer (13): dm vdo: make uds_*_semaphore interface private to uds-threads.c dm vdo uds-threads: eliminate uds_*_semaphore interfaces dm vdo uds-thread

[PATCH 10/13] dm vdo thread-utils: further cleanup of thread functions

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Change thread function prefix from "uds_" to "vdo_" and fix vdo_join_threads() to return void. Signed-off-by: Mike Snitzer Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/funnel-requestqueue.c | 8 ++-- drivers/md/dm-vdo/index.c | 4 ++-- drivers/md/dm-

[PATCH] dm vdo block-map: rename page state name from "UDS_FREE" to "FREE"

2024-02-29 Thread Matthew Sakai
From: Mike Snitzer Only used for log message, but no need for "UDS_" prefix. Signed-off-by: Mike Snitzer Signed-off-by: Susan LeGendre-McGhee Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/block-map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-vdo/b

[PATCH] dm vdo volume-index: fix an assert statement in start_restoring_volume_sub_index()

2024-02-29 Thread Matthew Sakai
From: Harshit Mogalapalli Use "==" instead of "=" in ASSERT() statement. Fixes: ef074a31e88e ("dm vdo: implement the volume index") Signed-off-by: Harshit Mogalapalli Signed-off-by: Mike Snitzer Signed-off-by: Susan LeGendre-McGhee Signed-off-by: Matthew Sakai --- drivers/md/dm-vdo/volume-i

Re: [PATCH 4/6] dm-raid/md: Clear MD_RECOVERY_WAIT when stopping dmraid

2024-02-29 Thread Yu Kuai
Hi, 在 2024/02/29 23:49, Xiao Ni 写道: MD_RECOVERY_WAIT is used by dmraid to delay reshape process by patch commit 644e2537fdc7 ("dm raid: fix stripe adding reshape deadlock"). Before patch commit f52f5c71f3d4b ("md: fix stopping sync thread") dmraid stopped sync thread directy by calling md_reap_s

Re: [PATCH 1/6] md: Revert "md: Don't register sync_thread for reshape directly"

2024-02-29 Thread Yu Kuai
Hi, 在 2024/02/29 23:49, Xiao Ni 写道: This reverts commit ad39c08186f8a0f221337985036ba86731d6aafe. Function stop_sync_thread only wakes up sync task. It also needs to wake up sync thread. This problem will be fixed in the following patch. I don't think so, unlike mddev->thread, sync_thread wil

Re: [PATCH 0/6] Fix dmraid regression bugs

2024-02-29 Thread Xiao Ni
On Fri, Mar 1, 2024 at 10:12 AM Yu Kuai wrote: > > Hi, > > 在 2024/02/29 23:49, Xiao Ni 写道: > > Hi all > > > > This patch set tries to fix dmraid regression problems when we recently. > > After talking with Kuai who also sent a patch set which is used to fix > > dmraid regression problems, we decid

Re: [PATCH 0/6] Fix dmraid regression bugs

2024-02-29 Thread Yu Kuai
Hi, 在 2024/02/29 23:49, Xiao Ni 写道: Hi all This patch set tries to fix dmraid regression problems when we recently. After talking with Kuai who also sent a patch set which is used to fix dmraid regression problems, we decide to use a small patch set to fix these regression problems. This patch

Re: [PATCH 2/6] md: Revert "md: Make sure md_do_sync() will set MD_RECOVERY_DONE"

2024-02-29 Thread Song Liu
On Thu, Feb 29, 2024 at 4:49 PM Xiao Ni wrote: > > On Fri, Mar 1, 2024 at 7:46 AM Song Liu wrote: > > > > On Thu, Feb 29, 2024 at 2:53 PM Song Liu wrote: > > > > > > On Thu, Feb 29, 2024 at 7:50 AM Xiao Ni wrote: > > > > > > > > This reverts commit 82ec0ae59d02e89164b24c0cc8e4e50de78b5fd6. > >

Re: [PATCH 2/6] md: Revert "md: Make sure md_do_sync() will set MD_RECOVERY_DONE"

2024-02-29 Thread Xiao Ni
On Fri, Mar 1, 2024 at 7:46 AM Song Liu wrote: > > On Thu, Feb 29, 2024 at 2:53 PM Song Liu wrote: > > > > On Thu, Feb 29, 2024 at 7:50 AM Xiao Ni wrote: > > > > > > This reverts commit 82ec0ae59d02e89164b24c0cc8e4e50de78b5fd6. > > > > > > The root cause is that MD_RECOVERY_WAIT isn't cleared wh

Re: [PATCH 2/6] md: Revert "md: Make sure md_do_sync() will set MD_RECOVERY_DONE"

2024-02-29 Thread Song Liu
On Thu, Feb 29, 2024 at 2:53 PM Song Liu wrote: > > On Thu, Feb 29, 2024 at 7:50 AM Xiao Ni wrote: > > > > This reverts commit 82ec0ae59d02e89164b24c0cc8e4e50de78b5fd6. > > > > The root cause is that MD_RECOVERY_WAIT isn't cleared when stopping raid. > > The following patch 'Clear MD_RECOVERY_WAI

Re: [PATCH 2/6] md: Revert "md: Make sure md_do_sync() will set MD_RECOVERY_DONE"

2024-02-29 Thread Song Liu
On Thu, Feb 29, 2024 at 7:50 AM Xiao Ni wrote: > > This reverts commit 82ec0ae59d02e89164b24c0cc8e4e50de78b5fd6. > > The root cause is that MD_RECOVERY_WAIT isn't cleared when stopping raid. > The following patch 'Clear MD_RECOVERY_WAIT when stopping dmraid' fixes > this problem. > > Signed-off-by

Re: [REGRESSION] LVM-on-LVM: error while submitting device barriers

2024-02-29 Thread Goffredo Baroncelli
On 29/02/2024 21.22, Patrick Plenefisch wrote: On Thu, Feb 29, 2024 at 2:56 PM Goffredo Baroncelli wrote: Your understanding is correct. The only thing that comes to my mind to cause the problem is asymmetry of the SATA devices. I have one 8TB device, plus a 1.5TB, 3TB, and 3TB drives. Doing

Re: [PATCH for-6.9] workqueue: Drain BH work items on hot-unplugged CPUs

2024-02-29 Thread Boqun Feng
On Thu, Feb 29, 2024 at 10:37:28AM -1000, Tejun Heo wrote: > On Mon, Feb 26, 2024 at 03:38:55PM -1000, Tejun Heo wrote: > > Boqun pointed out that workqueues aren't handling BH work items on offlined > > CPUs. Unlike tasklet which transfers out the pending tasks from > > CPUHP_SOFTIRQ_DEAD, BH work

[PATCH AUTOSEL 4.19 4/4] dm-verity, dm-crypt: align "struct bvec_iter" correctly

2024-02-29 Thread Sasha Levin
From: Mikulas Patocka [ Upstream commit 787f1b2800464aa277236a66eb3c279535edd460 ] "struct bvec_iter" is defined with the __packed attribute, so it is aligned on a single byte. On X86 (and on other architectures that support unaligned addresses in hardware), "struct bvec_iter" is accessed using

[PATCH AUTOSEL 5.4 6/6] dm-verity, dm-crypt: align "struct bvec_iter" correctly

2024-02-29 Thread Sasha Levin
From: Mikulas Patocka [ Upstream commit 787f1b2800464aa277236a66eb3c279535edd460 ] "struct bvec_iter" is defined with the __packed attribute, so it is aligned on a single byte. On X86 (and on other architectures that support unaligned addresses in hardware), "struct bvec_iter" is accessed using

[PATCH AUTOSEL 5.10 8/8] dm-verity, dm-crypt: align "struct bvec_iter" correctly

2024-02-29 Thread Sasha Levin
From: Mikulas Patocka [ Upstream commit 787f1b2800464aa277236a66eb3c279535edd460 ] "struct bvec_iter" is defined with the __packed attribute, so it is aligned on a single byte. On X86 (and on other architectures that support unaligned addresses in hardware), "struct bvec_iter" is accessed using

[PATCH AUTOSEL 5.15 9/9] dm-verity, dm-crypt: align "struct bvec_iter" correctly

2024-02-29 Thread Sasha Levin
From: Mikulas Patocka [ Upstream commit 787f1b2800464aa277236a66eb3c279535edd460 ] "struct bvec_iter" is defined with the __packed attribute, so it is aligned on a single byte. On X86 (and on other architectures that support unaligned addresses in hardware), "struct bvec_iter" is accessed using

[PATCH AUTOSEL 6.1 11/12] dm-verity, dm-crypt: align "struct bvec_iter" correctly

2024-02-29 Thread Sasha Levin
From: Mikulas Patocka [ Upstream commit 787f1b2800464aa277236a66eb3c279535edd460 ] "struct bvec_iter" is defined with the __packed attribute, so it is aligned on a single byte. On X86 (and on other architectures that support unaligned addresses in hardware), "struct bvec_iter" is accessed using

[PATCH AUTOSEL 6.6 17/22] dm-verity, dm-crypt: align "struct bvec_iter" correctly

2024-02-29 Thread Sasha Levin
From: Mikulas Patocka [ Upstream commit 787f1b2800464aa277236a66eb3c279535edd460 ] "struct bvec_iter" is defined with the __packed attribute, so it is aligned on a single byte. On X86 (and on other architectures that support unaligned addresses in hardware), "struct bvec_iter" is accessed using

[PATCH AUTOSEL 6.7 18/24] dm-verity, dm-crypt: align "struct bvec_iter" correctly

2024-02-29 Thread Sasha Levin
From: Mikulas Patocka [ Upstream commit 787f1b2800464aa277236a66eb3c279535edd460 ] "struct bvec_iter" is defined with the __packed attribute, so it is aligned on a single byte. On X86 (and on other architectures that support unaligned addresses in hardware), "struct bvec_iter" is accessed using

Re: [PATCH for-6.9] workqueue: Drain BH work items on hot-unplugged CPUs

2024-02-29 Thread Tejun Heo
On Mon, Feb 26, 2024 at 03:38:55PM -1000, Tejun Heo wrote: > Boqun pointed out that workqueues aren't handling BH work items on offlined > CPUs. Unlike tasklet which transfers out the pending tasks from > CPUHP_SOFTIRQ_DEAD, BH workqueue would just leave them pending which is > problematic. Note th

Re: [REGRESSION] LVM-on-LVM: error while submitting device barriers

2024-02-29 Thread Patrick Plenefisch
On Thu, Feb 29, 2024 at 2:56 PM Goffredo Baroncelli wrote: > > > Your understanding is correct. The only thing that comes to my mind to > > cause the problem is asymmetry of the SATA devices. I have one 8TB > > device, plus a 1.5TB, 3TB, and 3TB drives. Doing math on the actual > > extents, lowerV

Re: [REGRESSION] LVM-on-LVM: error while submitting device barriers

2024-02-29 Thread Goffredo Baroncelli
On 28/02/2024 20.37, Patrick Plenefisch wrote: On Wed, Feb 28, 2024 at 2:19 PM Goffredo Baroncelli wrote: On 28/02/2024 18.25, Patrick Plenefisch wrote: I'm unsure if this is just an LVM bug, or a BTRFS+LVM interaction bug, but LVM is definitely involved somehow. Upgrading from 5.10 to 6.1, I

Re: [PATCH 0/6] Fix dmraid regression bugs

2024-02-29 Thread Song Liu
On Thu, Feb 29, 2024 at 11:39 AM Christoph Hellwig wrote: > > If I rund this on the md/md-6.9-for-hch branch all the hangs I was > previously seeing in the lvm2 test suite are gone. Still a bunchof > failures, though: > > ### 427 tests: 284 passed, 127 skipped, 0 timed out, 3 warned, 13 failed Y

Re: atomic queue limit updates for stackable devices v3

2024-02-29 Thread Christoph Hellwig
On Wed, Feb 28, 2024 at 02:56:39PM -0800, Christoph Hellwig wrote: > I've run the mdadm testsuite, and it has the same (rather large) number > of failures as the baseline, and the lvm2 test suite goes as far as > the baseline before handing in __md_stop_writes. When I pull in all the pending fixes

Re: [PATCH 0/6] Fix dmraid regression bugs

2024-02-29 Thread Christoph Hellwig
If I rund this on the md/md-6.9-for-hch branch all the hangs I was previously seeing in the lvm2 test suite are gone. Still a bunchof failures, though: ### 427 tests: 284 passed, 127 skipped, 0 timed out, 3 warned, 13 failed

Re: [PATCH 0/2] Add sched_prio config option

2024-02-29 Thread Martin Wilck
On Wed, 2024-02-28 at 20:58 -0500, Benjamin Marzinski wrote: > This patchset is based on discussions at: > https://github.com/opensvc/multipath-tools/issues/82 > > The first patch fixes a condlog logging level, and the second patch > adds > the new config option, so that users can change multipath

[PATCH 6/6] md/raid5: Don't check crossing reshape when reshape hasn't started

2024-02-29 Thread Xiao Ni
stripe_ahead_of_reshape is used to check if a stripe region cross the reshape position. So first, change the function name to stripe_across_reshape to describe the usage of this function. For reshape backwards, it starts reshape from the end of array and conf-> reshape_progress is init to raid5_si

[PATCH 5/6] md: Set MD_RECOVERY_FROZEN before stop sync thread

2024-02-29 Thread Xiao Ni
After patch commit f52f5c71f3d4b ("md: fix stopping sync thread"), dmraid stops sync thread asynchronously. The calling process is: dev_remove->dm_destroy->__dm_destroy->raid_postsuspend->raid_dtr raid_postsuspend does two jobs. First, it stops sync thread. Then it suspend array. Now it can stop s

[PATCH 4/6] dm-raid/md: Clear MD_RECOVERY_WAIT when stopping dmraid

2024-02-29 Thread Xiao Ni
MD_RECOVERY_WAIT is used by dmraid to delay reshape process by patch commit 644e2537fdc7 ("dm raid: fix stripe adding reshape deadlock"). Before patch commit f52f5c71f3d4b ("md: fix stopping sync thread") dmraid stopped sync thread directy by calling md_reap_sync_thread. After this patch dmraid sto

[PATCH 3/6] md: Revert "md: Don't ignore suspended array in md_check_recovery()"

2024-02-29 Thread Xiao Ni
This reverts commit 1baae052cccd08daf9a9d64c3f959d8cdb689757. For dmraid, it doesn't allow any io including sync io when array is suspended. Although it's a simple change in this patch, it still needs more work to support it. Now we're trying to fix regression problems. So let's keep as small chan

[PATCH 2/6] md: Revert "md: Make sure md_do_sync() will set MD_RECOVERY_DONE"

2024-02-29 Thread Xiao Ni
This reverts commit 82ec0ae59d02e89164b24c0cc8e4e50de78b5fd6. The root cause is that MD_RECOVERY_WAIT isn't cleared when stopping raid. The following patch 'Clear MD_RECOVERY_WAIT when stopping dmraid' fixes this problem. Signed-off-by: Xiao Ni --- drivers/md/md.c | 12 1 file chan

[PATCH 1/6] md: Revert "md: Don't register sync_thread for reshape directly"

2024-02-29 Thread Xiao Ni
This reverts commit ad39c08186f8a0f221337985036ba86731d6aafe. Function stop_sync_thread only wakes up sync task. It also needs to wake up sync thread. This problem will be fixed in the following patch. Signed-off-by: Xiao Ni --- drivers/md/md.c | 5 + drivers/md/raid10.c | 16 +

[PATCH 0/6] Fix dmraid regression bugs

2024-02-29 Thread Xiao Ni
Hi all This patch set tries to fix dmraid regression problems when we recently. After talking with Kuai who also sent a patch set which is used to fix dmraid regression problems, we decide to use a small patch set to fix these regression problems. This patch is based on song's md-6.8 branch. Thi

Re: atomic queue limit updates for stackable devices

2024-02-29 Thread Christoph Hellwig
On Wed, Feb 28, 2024 at 06:02:33PM -0800, Song Liu wrote: > md-6.9 branch doesn't have all the fixes, as some recent fixes > are routed via the md-6.8 branch. You can try on this branch, which > should provide a better base line. The set applies cleanly on this > branch. > > https://git.kernel.org