Re: [PATCH 2/8] md: add is_force parameter for some funcs

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

 





On 11/8/19 11:38 PM, Song Liu wrote:
On Wed, Nov 6, 2019 at 2:04 AM Guoqing Jiang
<guoqing.jiang@xxxxxxxxxxxxxxx> wrote:

[...]

-static void mddev_destroy_serial_pool(struct mddev *mddev, struct md_rdev *rdev)
+static void mddev_destroy_serial_pool(struct mddev *mddev, struct md_rdev *rdev,
+                                     bool is_force)
I guess mddev_destroy_serial_pool() doesn't need an extra argument. We
can just to clear_bit, etc.. no?
Let me explain a little bit, the function are used in below cases:

1. write-behind mode is enabled and write-mostly device has multi queues,
the pool should be destroyed if the last device flagged with CollisionCheck
is removed from array, or the write-mostly flag will be cleared from the
last
device.

2. if we want to enable/disable serialization for normal raid1 in later
patch,
which means the pool could be created/destroyed whether bitmap is existed
or not, and all member device should be flagged with CollisionCheck.

The new argument is introduced to distinguish the two cases.
I understand the difference here. And I agree that we need a new argument
for mddev_create_serial_pool(). The question is, it is possible NOT to add the
extra argument to mddev_destory_serial_pool().

I'd prefer to add it, so both create pool and destroy pool have the same argument.

Though I can check rdev is NULL or not to differentiate where the two functions
are called, but it is a little weird and not intuitive.

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