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(). Thanks, Song