qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Lieven <pl@kamp.de>
To: Max Reitz <mreitz@redhat.com>, qemu-block@nongnu.org
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, ronniesahlberg@gmail.com
Subject: Re: [Qemu-devel] [PATCH V2 2/2] block/nfs: add support for nfs_umount
Date: Wed, 11 Sep 2019 14:22:36 +0200	[thread overview]
Message-ID: <660efadc-760f-dda7-892d-1de9d92f202b@kamp.de> (raw)
In-Reply-To: <e2b37e13-ef22-4a16-38e5-3866e7d5409a@redhat.com>

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 <pl@kamp.de>
>> ---
>>  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	other threads:[~2019-09-11 12:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-10 15:41 [Qemu-devel] [PATCH V2 0/2] add support for nfs_umount Peter Lieven
2019-09-10 15:41 ` [Qemu-devel] [PATCH V2 1/2] block/nfs: tear down aio before nfs_close Peter Lieven
2019-09-13  9:51   ` Max Reitz
2019-09-13 10:15     ` Peter Lieven
2019-09-13 10:21     ` Kevin Wolf
2019-09-10 15:41 ` [Qemu-devel] [PATCH V2 2/2] block/nfs: add support for nfs_umount Peter Lieven
2019-09-11  7:48   ` Max Reitz
2019-09-11 12:22     ` Peter Lieven [this message]
2019-09-13 10:09     ` ronnie sahlberg
2019-09-13 11:13       ` Max Reitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=660efadc-760f-dda7-892d-1de9d92f202b@kamp.de \
    --to=pl@kamp.de \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=ronniesahlberg@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).