Re: [PATCH 08/10] Change update to enum in update_super and update_subarray

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

 



On 14/09/2022 17:03, Coly Li wrote:
> 
> 
>> 2022年8月18日 22:56,Mateusz Kusiak <mateusz.kusiak@xxxxxxxxx> 写道:
>>
>> Use already existing enum, change update_super and update_subarray
>> update to enum globally.
>> Refactor function references also.
>> Remove code specific options from update_options.
>>
>> Signed-off-by: Mateusz Kusiak <mateusz.kusiak@xxxxxxxxx>
>> ---
>> Assemble.c    | 14 +++++++++-----
>> Examine.c     |  2 +-
>> Grow.c        |  9 +++++----
>> Manage.c      | 14 ++++++++------
>> maps.c        | 21 ---------------------
>> mdadm.h       | 12 +++++++++---
>> super-intel.c | 16 ++++++++--------
>> super0.c      |  9 ++++-----
>> super1.c      | 17 ++++++++---------
>> 9 files changed, 52 insertions(+), 62 deletions(-)
>>
>>
> 
> [snipped]
> 
>> diff --git a/mdadm.h b/mdadm.h
>> index 7bc31b16..afc2e2a8 100644
>> --- a/mdadm.h
>> +++ b/mdadm.h
>> @@ -1010,7 +1010,7 @@ extern struct superswitch {
>> 	 *                    it will resume going in the opposite direction.
>> 	 */
>> 	int (*update_super)(struct supertype *st, struct mdinfo *info,
>> -			    char *update,
>> +			    enum update_opt update,
>> 			    char *devname, int verbose,
>> 			    int uuid_set, char *homehost);
>>
>> @@ -1136,9 +1136,15 @@ extern struct superswitch {
>> 	/* Permit subarray's to be deleted from inactive containers */
>> 	int (*kill_subarray)(struct supertype *st,
>> 			     char *subarray_id); /* optional */
>> -	/* Permit subarray's to be modified */
>> +	/**
>> +	 * update_subarray() - Permit subarray to be modified.
>> +	 * @st: Supertype.
>> +	 * @subarray: Subarray name.
>> +	 * @update: Update option.
>> +	 * @ident: Optional identifiers.
>> +	 */
> 
> Maybe we should follow existing comment code style like,
> 
> /* Commet start here,
>  * and second line.
>  */
> 
I am not concerned, IMO the comment (function description) follows kerel
standards.
There already are functions with this type of description inside the
file like signal_s() or close_fd().

> This patch doesn’t apply on latest mdadm upstream, in the mdadm-CI tree, I rebased the patch and push it into remotes/origin/20220903-testing.
> Could you please to check the rebased patch?
> 
I checked the branch and it looks good to me.
However, since there are allready fixes to be made, I'll rebase the
whole patchset anyway, on top of the master, when sending v2.
I'm planing to resend whole patchset to avoid complications.
I'm looking forward your response regarding the rest of the questions,
and I will resend patchset when everything is clear.

Thanks,
Mateusz

> Thanks.
> 
> Coly Li



[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