Thread (10 messages) 10 messages, 2 authors, 2024-01-24

Re: [PATCH v2 2/3] md: factor out a helper mddev_sync_blockdev() to sync mddev

From: Li Nan <hidden>
Date: 2024-01-22 02:15:17
Also in: lkml


在 2024/1/18 16:08, Mariusz Tkaczyk 写道:
On Wed, 17 Jan 2024 17:37:06 +0800
linan666@huaweicloud.com wrote:
quoted
From: Li Nan <redacted>

There are no functional changes, prepare to sync mddev in
array_state_store().

Signed-off-by: Li Nan <redacted>
---
  drivers/md/md.c | 31 +++++++++++++++++++------------
  1 file changed, 19 insertions(+), 12 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 4bf821b89415..2c793992a604 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -529,6 +529,23 @@ void mddev_resume(struct mddev *mddev)
  }
  EXPORT_SYMBOL_GPL(mddev_resume);
  
+/* sync bdev before setting device to readonly or stopping raid*/
+static int mddev_sync_blockdev(struct mddev *mddev) {
Please add something about MD_CLOSING to the function name. Comment is good but
you need open function to get it. Something like:
mddev_set_closing_and_sync_blockdev() is more reader friendly.
I agree. Let me improve this.
Anyway, LGTM.
Acked-by: Mariusz Tkaczyk <redacted>

Thanks,
Mariusz

.
-- 
Thanks,
Nan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help