[PATCH v6 0/9] bugfix of MD_CLOSING and clean up md_ioctl()

linan666@huaweicloud.com posted 9 patches 2 years ago
There is a newer version of this series
drivers/md/md.c | 190 ++++++++++++++++++++++++------------------------
1 file changed, 94 insertions(+), 96 deletions(-)
[PATCH v6 0/9] bugfix of MD_CLOSING and clean up md_ioctl()
Posted by linan666@huaweicloud.com 2 years ago
From: Li Nan <linan122@huawei.com>

Changes in v6:
 - in patch 2, return directly.
 - in patch 4, return directly in case GET_DISK_INFO and GET_ARRAY_INFO.
 - in patch 7, rewrite commit message.
 - add patch 8, clean up openers check.

Changes in v5:
 - add patches 1-4 to clean up md_ioct(), pathc 4 can help us clean up
   local variable 'clear_md_closing'.
 - in patches 5 and 7, clean up local variable 'clear_md_closing'.

By the way, md_ioctl() is not readable now, I wanna to re-write it later
to make it only have one 'switch' like other drivers.

Li Nan (9):
  md: merge the check of capabilities into md_ioctl_valid()
  md: changed the switch of RAID_VERSION to if
  md: clean up invalid BUG_ON in md_ioctl
  md: return directly before setting did_set_md_closing
  md: Don't clear MD_CLOSING when the raid is about to stop
  md: factor out a helper to sync mddev
  md: sync blockdev before stopping raid or setting readonly
  md: clean up openers check in do_md_stop() and md_set_readonly()
  md: check mddev->pers before calling md_set_readonly()

 drivers/md/md.c | 190 ++++++++++++++++++++++++------------------------
 1 file changed, 94 insertions(+), 96 deletions(-)

-- 
2.39.2
Re: [PATCH v6 0/9] bugfix of MD_CLOSING and clean up md_ioctl()
Posted by Song Liu 1 year, 12 months ago
Hi Li Nan,

On Tue, Feb 6, 2024 at 1:00 AM <linan666@huaweicloud.com> wrote:
>
> From: Li Nan <linan122@huawei.com>
>
> Changes in v6:
>  - in patch 2, return directly.
>  - in patch 4, return directly in case GET_DISK_INFO and GET_ARRAY_INFO.
>  - in patch 7, rewrite commit message.
>  - add patch 8, clean up openers check.
>
> Changes in v5:
>  - add patches 1-4 to clean up md_ioct(), pathc 4 can help us clean up
>    local variable 'clear_md_closing'.
>  - in patches 5 and 7, clean up local variable 'clear_md_closing'.
>
> By the way, md_ioctl() is not readable now, I wanna to re-write it later
> to make it only have one 'switch' like other drivers.

Thanks for the patchset, and sorry for the delay.

The patchset looks good to me. However, it doesn't apply to md-6.9
branch. Could you please resend or let me know the base branch/commit
of the set?

Thanks,
Song
Re: [PATCH v6 0/9] bugfix of MD_CLOSING and clean up md_ioctl()
Posted by Li Nan 1 year, 11 months ago

在 2024/2/13 7:36, Song Liu 写道:
> Hi Li Nan,
> 
> On Tue, Feb 6, 2024 at 1:00 AM <linan666@huaweicloud.com> wrote:
>>
>> From: Li Nan <linan122@huawei.com>
>>
>> Changes in v6:
>>   - in patch 2, return directly.
>>   - in patch 4, return directly in case GET_DISK_INFO and GET_ARRAY_INFO.
>>   - in patch 7, rewrite commit message.
>>   - add patch 8, clean up openers check.
>>
>> Changes in v5:
>>   - add patches 1-4 to clean up md_ioct(), pathc 4 can help us clean up
>>     local variable 'clear_md_closing'.
>>   - in patches 5 and 7, clean up local variable 'clear_md_closing'.
>>
>> By the way, md_ioctl() is not readable now, I wanna to re-write it later
>> to make it only have one 'switch' like other drivers.
> 
> Thanks for the patchset, and sorry for the delay.
> 
> The patchset looks good to me. However, it doesn't apply to md-6.9
> branch. Could you please resend or let me know the base branch/commit
> of the set?
> 
> Thanks,
> Song
> 
> .

Thanks for your review. I will resend it later.

-- 
Thanks,
Nan