Re: [PATCH] mdadm: Expose Kill() return codes to user

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

 



Terribly sorry Jes, got pulled away and did not get back.
Unfortunately this patch is incorrect.  Please revert.
It causes the return value of even a successful wipe to be 2.
If I can figure out why, I will re-submit.  Apologies again.

On Wed, Feb 7, 2018 at 2:51 PM, Jes Sorensen <jes.sorensen@xxxxxxxxx> wrote:
> On 02/02/2018 11:06 AM, John Pittman wrote:
>> In misc_list(), case KillOpt, the return values from the Kill()
>> function are saved, but soon after cleared with a bitwise OR
>> assignment.  Expose these return values to the user, indicating
>> success of the zeroing operation or an error value to accompany
>> the error message printed to the console.
>>
>> Before:
>>
>>    # mdadm -C /dev/md0 -l 1 -n 2 -e 1.2 /dev/sda /dev/sdb
>>    mdadm: array /dev/md0 started.
>>    # mdadm --zero-superblock /dev/sdb
>>    mdadm: Couldn't open /dev/sdb for write - not zeroing
>>    # echo $?
>>    0
>>
>> After:
>>
>>    # mdadm -C /dev/md0 -l 1 -n 2 -e 1.2 /dev/sda /dev/sdb
>>    mdadm: array /dev/md0 started.
>>    # mdadm --zero-superblock /dev/sdb
>>    mdadm: Couldn't open /dev/sdb for write - not zeroing
>>    # echo $?
>>    2
>>
>> Signed-off-by: John Pittman <jpittman@xxxxxxxxxx>
>
> Seems reasonable to me!
>
> Applied!
>
> Thanks,
> Jes
>
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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