[PATCH 02/10] nvme/rc: clear allowed_hosts subdirectory
Hannes Reinecke
hare at suse.de
Sun Jun 19 23:53:56 PDT 2022
On 6/14/22 06:12, Shinichiro Kawasaki wrote:
> On Jun 10, 2022 / 13:33, Hannes Reinecke wrote:
>> When removing a subsystem we need to clear out the allowed_hosts
>> subdirectory, otherwise removal will fail.
>>
>> Signed-off-by: Hannes Reinecke <hare at suse.de>
>> Reviewed-by: Sagi Grimberg <sagi at grimberg.me>
>> ---
>> tests/nvme/rc | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/tests/nvme/rc b/tests/nvme/rc
>> index ad4324f..454609a 100644
>> --- a/tests/nvme/rc
>> +++ b/tests/nvme/rc
>> @@ -264,6 +264,7 @@ _remove_nvmet_subsystem() {
>> local subsys_path="${NVMET_CFS}/subsystems/${nvmet_subsystem}"
>>
>> _remove_nvmet_ns "${nvmet_subsystem}" "1"
>> + rm "${subsys_path}"/allowed_hosts/*
>
> When the allowed_hosts directory is empty, the rm command reports an error,
> and it makes nvme/003 fail:
>
> nvme/003 (test if we're sending keep-alives to a discovery controller) [failed]
> runtime 10.481s ... 10.481s
> --- tests/nvme/003.out 2022-06-02 10:18:53.539739780 +0900
> +++ /home/shin/kts/kernel-test-suite/src/blktests/results/nodev/nvme/003.out.bad 2022-06-14 13:10:22.804354624 +0900
> @@ -1,3 +1,4 @@
> Running nvme/003
> NQN:nqn.2014-08.org.nvmexpress.discovery disconnected 1 controller(s)
> +rm: cannot remove '/sys/kernel/config/nvmet//subsystems/blktests-subsystem-1/allowed_hosts/*': No such file or directory
> Test complete
>
> How about to add -f option to the rm?
>
Yes, good point.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman
More information about the Linux-nvme
mailing list