From: Wouter Verhelst <w@uter.be>
To: Markus Pargmann <mpa@pengutronix.de>
Cc: Pranay Srivastava <pranjas@gmail.com>,
nbd-general@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [Nbd] [PATCH v2 4/5]nbd: make nbd device wait for its users.
Date: Wed, 15 Jun 2016 09:00:22 +0200 [thread overview]
Message-ID: <20160615070022.GA3787@grep.be> (raw)
In-Reply-To: <11733279.HlKjcK63G4@adelgunde>
On Wed, Jun 15, 2016 at 08:30:45AM +0200, Markus Pargmann wrote:
> Thanks for the explanations. I think my understanding was off by one ;)..
> I didn't realize that the DO_IT thread from the userspace has the block
> device open as well.
Obviously, otherwise it couldn't do an ioctl() to it :-)
> I thought a bit about this, does it make sense to delay the essential
> cleanup steps until really all open file handles were closed? So that
> even if the DO_IT thread exits, the block device is still there. Only if
> the file is closed everything is cleaned up. Maybe this makes the code
> simpler and we can directly use krefs without any strange constructs.
> What do you think?
>
> This would also allow the client to setup a new socket as long as it
> does not close the nbd file handle.
That sounds like the behaviour that I described earlier about possible
retries for userspace...
> Could this behavior be potentially problematic for any client
> implementation?
I don't think it could, but I'm not sure I understand all the details.
What would happen if:
- nbd is connected from pid X, pid Y does NBD_DISCONNECT, pid X hangs
and doesn't exit?
- nbd is connected from pid X, server disconnects while pid Y is trying
to access the device, pid X tries to reconnect but it takes a while?
> Does it solve our other issue with setting up a new sockets for an
> existing nbd blockdevice?
It could, depending.
--
< ron> I mean, the main *practical* problem with C++, is there's like a dozen
people in the world who think they really understand all of its rules,
and pretty much all of them are just lying to themselves too.
-- #debian-devel, OFTC, 2016-02-12
next prev parent reply other threads:[~2016-06-15 7:00 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-24 11:26 [PATCH 0/4]nbd: fixes for nbd Pranay Kr. Srivastava
2016-05-24 11:26 ` [PATCH 1/4] fix might_sleep warning on socket shutdown Pranay Kr. Srivastava
2016-05-30 12:06 ` Markus Pargmann
2016-05-24 11:26 ` [PATCH 2/4] fix various coding standard warnings Pranay Kr. Srivastava
2016-05-24 11:26 ` [PATCH 3/4] make nbd device wait for its users Pranay Kr. Srivastava
2016-05-30 10:44 ` Markus Pargmann
2016-05-24 11:26 ` [PATCH 4/4] use device_attr macros for sysfs attribute Pranay Kr. Srivastava
2016-05-30 3:35 ` [PATCH 0/4]nbd: fixes for nbd Pranay Srivastava
2016-05-30 12:27 ` Markus Pargmann
2016-06-02 10:24 ` [PATCH v2 0/5] nbd: " Pranay Kr. Srivastava
2016-06-02 10:24 ` [PATCH v2 1/5] nbd: fix might_sleep warning on socket shutdown Pranay Kr. Srivastava
2016-06-09 10:03 ` Pranay Srivastava
2016-06-14 5:13 ` Pranay Srivastava
2016-06-14 8:52 ` Markus Pargmann
2016-06-14 9:50 ` Pranay Srivastava
2016-06-24 10:09 ` [PATCH v3 0/3] nbd: resolve bugs and limitations Pranay Kr. Srivastava
2016-06-24 10:09 ` [PATCH v3 1/3]nbd: fix might_sleep warning on socket shutdown Pranay Kr. Srivastava
2016-06-28 5:42 ` Pranay Srivastava
2016-06-29 7:18 ` Markus Pargmann
2016-06-24 10:09 ` [PATCH v3 2/3]nbd: cleanup nbd_set_socket Pranay Kr. Srivastava
2016-06-24 10:09 ` [PATCH 3/3]nbd: make nbd device wait for its users Pranay Kr. Srivastava
2016-06-24 13:42 ` [Nbd] " Eric Blake
2016-06-25 17:56 ` Pranay Srivastava
2016-06-25 18:01 ` Pranay Srivastava
2016-06-29 7:06 ` Markus Pargmann
2016-06-29 7:15 ` Pranay Srivastava
2016-06-02 10:24 ` [PATCH v2 2/5]nbd: cleanup nbd_set_socket Pranay Kr. Srivastava
2016-06-02 10:24 ` [PATCH v2 3/5]nbd: fix various coding standard warnings Pranay Kr. Srivastava
2016-06-02 10:25 ` [PATCH v2 4/5]nbd: make nbd device wait for its users Pranay Kr. Srivastava
2016-06-14 8:59 ` Markus Pargmann
2016-06-14 9:33 ` Pranay Srivastava
2016-06-15 6:30 ` Markus Pargmann
2016-06-15 7:00 ` Wouter Verhelst [this message]
2016-06-15 9:18 ` [Nbd] " Pranay Srivastava
2016-06-15 9:17 ` Pranay Srivastava
2016-06-24 9:29 ` [PATCH 1/2] nbd: " Markus Pargmann
2016-06-24 9:29 ` [PATCH 2/2] nbd: Disallow ioctls on disconnected block device Markus Pargmann
2016-07-16 7:42 ` Pranay Srivastava
2016-07-16 9:32 ` [Nbd] " Alex Bligh
2016-07-16 10:08 ` Pranay Srivastava
2016-07-16 11:26 ` Wouter Verhelst
2016-07-16 13:31 ` Pranay Srivastava
2016-06-24 9:39 ` [PATCH 1/2] nbd: make nbd device wait for its users Pranay Srivastava
2016-06-24 13:40 ` [Nbd] " Eric Blake
2016-06-25 17:52 ` Pranay Srivastava
2016-06-29 6:57 ` Markus Pargmann
2016-06-02 10:25 ` [PATCH v2 5/5]nbd: use device_attr macros for sysfs attribute Pranay Kr. Srivastava
[not found] ` <CA+aCy1E0S4ofa04xcO9qxQmuipaF5wdnrv3ubSvETn-rBYYisA@mail.gmail.com>
2016-06-06 11:07 ` [PATCH 0/4]nbd: fixes for nbd Pranay Srivastava
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=20160615070022.GA3787@grep.be \
--to=w@uter.be \
--cc=linux-kernel@vger.kernel.org \
--cc=mpa@pengutronix.de \
--cc=nbd-general@lists.sourceforge.net \
--cc=pranjas@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).