Re: [PATCH blktests] dm/002: repeat dmsetup remove command on failure with EBUSY

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

 



On Tue, Jul 9, 2024 at 8:44 AM Shin'ichiro Kawasaki
<shinichiro.kawasaki@xxxxxxx> wrote:
>
> The test case dm/002 rarely fails with the message below:
>
> dm/002 => nvme0n1 (dm-dust general functionality test)       [failed]
>     runtime  0.204s  ...  0.174s
>     --- tests/dm/002.out        2024-06-14 14:37:40.480794693 +0900
>     +++ /home/shin/Blktests/blktests/results/nvme0n1/dm/002.out.bad     2024-06-14 21:38:18.588976499 +0900
>     @@ -7,4 +7,6 @@
>      countbadblocks: 0 badblock(s) found
>      countbadblocks: 3 badblock(s) found
>      countbadblocks: 0 badblock(s) found
>     +device-mapper: remove ioctl on dust1  failed: Device or resource busy
>     +Command failed.
>      Test complete
> modprobe: FATAL: Module dm_dust is in use.
>
> This failure happens at "dmsetup remove" command, when the previous
> operation on the dm device is still ongoing. In this case,
> dm_open_count() is non-zero, then IOCTL for device remove fails and
> EBUSY is returned.
>
> To avoid the failure, retry the "dmsetup remove" command when it fails
> with EBUSY. Introduce the helper function _dm_remove for this purpose.
>
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>

I think this looks good, and I tested it on my system:

Reviewed-by: Bryan Gurney <bgurney@xxxxxxxxxx>


I want to cc dm-devel and the device-mapper maintainers, in case there
are any questions on this test.  (It's probably a good idea to cc
dm-devel for any "dm" blktests.)


Thanks,

Bryan






[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux