qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V2 2/2] block/nfs: add support for nfs_umount


From: Peter Lieven
Subject: Re: [Qemu-devel] [PATCH V2 2/2] block/nfs: add support for nfs_umount
Date: Wed, 11 Sep 2019 14:22:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

Am 11.09.19 um 09:48 schrieb Max Reitz:
> On 10.09.19 17:41, Peter Lieven wrote:
>> libnfs recently added support for unmounting. Add support
>> in Qemu too.
>>
>> Signed-off-by: Peter Lieven <address@hidden>
>> ---
>>  block/nfs.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/block/nfs.c b/block/nfs.c
>> index 2c98508275..f39acfdb28 100644
>> --- a/block/nfs.c
>> +++ b/block/nfs.c
>> @@ -398,6 +398,9 @@ static void nfs_client_close(NFSClient *client)
>>              nfs_close(client->context, client->fh);
>>              client->fh = NULL;
>>          }
>> +#ifdef LIBNFS_FEATURE_UMOUNT
>> +        nfs_umount(client->context);
>> +#endif
>>          nfs_destroy_context(client->context);
>>          client->context = NULL;
>>      }
> I don’t understand what unmounting means in this context.  Is it just
> generic clean-up for NFSv3 (it appears that it’s a no-op for NFSv4)?


Its a call to the mount daemon on the NFSv3 server. It will effectively

cause that the connection is no longer listed when showmounts -a is issued on 
the server.


> Why isn’t that done by nfs_destroy_context()?


That would have been the right place, but libnfs added support for this call 
only recently. I think with version 4.0.0


Peter






reply via email to

[Prev in Thread] Current Thread [Next in Thread]