[dm-devel] [PATCH V3 2/5] multipathd: use daemon_status_msg to construct sd notify msg in do_sd_notify func

Zhiqiang Liu liuzhiqiang26 at huawei.com
Mon Aug 31 11:03:56 UTC 2020



On 2020/8/31 17:55, Martin Wilck wrote:
> Hello Zhiqiang,
> 
> On Sat, 2020-08-29 at 11:03 +0800, Zhiqiang Liu wrote:
>> sd_notify_status() is very similar with daemon_status(), except
>> DAEMON_IDLE and DAEMON_RUNNING state. As suggested by Martin,
>> we can create the sd notification string in a dynamic buffer,
>> and treat DAEMON_IDLE and DAEMON_RUNNING cases first. Then,
>> we can use daemon_status_msg[state] for other cases.
>>
>> V2->V3:
>> - set MSG_SIZE to 32 and use safe_sprintf as suggested by Martin.
>>
>> Signed-off-by: Zhiqiang Liu <liuzhiqiang26 at huawei.com>
>> Signed-off-by: lixiaokeng <lixiaokeng at huawei.com>
>> ---
>>  multipathd/main.c | 34 ++++++++++++----------------------
>>  1 file changed, 12 insertions(+), 22 deletions(-)
> 
> Thanks again. I'd like to modify the patch slightly as attached. 
> I'm sorry that I didn't mention these minor issues in my previous
> reviews. I'm sending you the fixup patch in order to short-circuit 
> the procedure a bit and save both of us some work.
> 
> Would this be ok for you?
> If yes, please resubmit this as v4.
> 
> Regards,
> Martin
> 

Thanks for your suggestion.
I will send the v4 patch as your suggestion.

Regards,
Zhiqiang Liu




More information about the dm-devel mailing list