[PATCHv2 blktests] nvme/058: detach loop device after test finish

Hannes Reinecke hare at suse.de
Fri Jan 24 00:28:32 PST 2025


On 1/24/25 08:47, Nilay Shroff wrote:
> The nvme/058 creates three (temp file backed) namespaces and
> attach each namespace to a loop device while starting the test.
> However it never detach those namespaces from the loop device
> once test finishes. Ideally, we should detach loop device from
> namespace so that the associated loop device is later destroyed
> and its resources are released. This patch helps detach each
> namespace from its associated loop device after test finishes.
> 
> Signed-off-by: Nilay Shroff <nilay at linux.ibm.com>
> ---
> Changes from v1:
>      - keep blkdevs, which are used for setting up ns, in an array
>        and then later access the array to free/detach each blkdev
>        (Shinichiro Kawasaki)
>      - use longer option name instead of short name for readability
>        (Shinichiro Kawasaki)
> ---
>   tests/nvme/058 | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
Reviewed-by: Hannes Reinecke <hare at suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare at suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich



More information about the Linux-nvme mailing list