Re: [PATCH 1/8] md: rename wb stuffs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 11/5/19 10:38 PM, Song Liu wrote:
On Fri, Nov 1, 2019 at 7:23 AM <jgq516@xxxxxxxxx> wrote:
From: Guoqing Jiang <guoqing.jiang@xxxxxxxxxxxxxxx>

Previously, wb_info_pool and wb_list stuffs are introduced
to address potential data inconsistence issue for write
behind device.

Now rename them to serial related name, since the same
mechanism will be used to address reorder overlap write
issue for raid1.

Signed-off-by: Guoqing Jiang <guoqing.jiang@xxxxxxxxxxxxxxx>
---
  drivers/md/md-bitmap.c | 20 ++++++-------
  drivers/md/md.c        | 68 ++++++++++++++++++++++--------------------
  drivers/md/md.h        | 22 +++++++-------
  drivers/md/raid1.c     | 43 +++++++++++++-------------
  4 files changed, 78 insertions(+), 75 deletions(-)

diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
index b092c7b5282f..5058716918ef 100644
--- a/drivers/md/md-bitmap.c
+++ b/drivers/md/md-bitmap.c
@@ -1790,8 +1790,8 @@ void md_bitmap_destroy(struct mddev *mddev)
                 return;

         md_bitmap_wait_behind_writes(mddev);
Maybe also rename md_bitmap_wait_behind_writes()?

Perhaps it is a little confusing, but write behind is another thing,
which belongs to bitmap scope.

If write-behind mode is enabled, the above function is called
whether "write-mostly" device has single queue or multi queue,
we only need to consider the potential data inconsistency issue
for the multi queue device, and this patch only renames stuffs
which are used for handle the issue, but we do not want to change
all write behind related things, right?


-       mempool_destroy(mddev->wb_info_pool);
-       mddev->wb_info_pool = NULL;
+       mempool_destroy(mddev->serial_info_pool);
+       mddev->serial_info_pool = NULL;

         mutex_lock(&mddev->bitmap_info.mutex);
         spin_lock(&mddev->lock);
@@ -1908,7 +1908,7 @@ int md_bitmap_load(struct mddev *mddev)
                 goto out;

         rdev_for_each(rdev, mddev)
-               mddev_create_wb_pool(mddev, rdev, true);
+               mddev_create_serial_pool(mddev, rdev, true);

         if (mddev_is_clustered(mddev))
                 md_cluster_ops->load_bitmaps(mddev, mddev->bitmap_info.nodes);
@@ -2475,16 +2475,16 @@ backlog_store(struct mddev *mddev, const char *buf, size_t len)
         if (backlog > COUNTER_MAX)
                 return -EINVAL;
         mddev->bitmap_info.max_write_behind = backlog;
Maybe also max_write_behind?

We should not touch it too.

Thanks,
Guoqing



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux