Re: [Nbd] [PATCH 2/2] nbd: Disallow ioctls on disconnected block device
- To: Wouter Verhelst <w@...112...>
- Cc: "nbd-general@lists.sourceforge.net" <nbd-general@lists.sourceforge.net>, "linux-kernel@...25..." <linux-kernel@...25...>
- Subject: Re: [Nbd] [PATCH 2/2] nbd: Disallow ioctls on disconnected block device
- From: Pranay Srivastava <pranjas@...17...>
- Date: Sat, 16 Jul 2016 19:01:47 +0530
- Message-id: <CA+aCy1GP2rKE8MFk7XXyj_j1CqFpKZ43ngSWvt7cKsSnPyJRqQ@...18...>
- In-reply-to: <20160716112632.GA7096@...3...>
- References: <CA+aCy1EsbLqR6rOTGwNjaAvL3FPjoH=TV3C_WMU5H1DWMC-sqA@...18...> <1466760574-1916-1-git-send-email-mpa@...1897...> <1466760574-1916-2-git-send-email-mpa@...1897...> <CA+aCy1HczXwRxhMSghXMij1uREWTO_EgK9t0HKKFhh0paSKfeA@...18...> <B7A824DF-5E27-4990-9AC3-E7171651CAC2@...872...> <CA+aCy1H_p-Ery0WurQ2wzB6mvYF4eQpW8=WSYTr3b78FXSVzJQ@...18...> <20160716112632.GA7096@...3...>
On Sat, Jul 16, 2016 at 4:56 PM, Wouter Verhelst <w@...112...> wrote:
> On Sat, Jul 16, 2016 at 03:38:40PM +0530, Pranay Srivastava wrote:
>> Okay. So how about we include some negotiated key which goes in with every
>> request which the server could maintain for clients that can be checked while
>> resetting the connection with the same server?
>
> Wut?
>
>> So am I correct that this situation can
>> indeed happen or the server will throw an error back to client in case
>> the troubled
>> nbd-client is trying to reconnect to the original server but requests
>> are going to
>> another server?
>>
>> If yes to above query then what is the best effort we can do to avoid
>> such scenarios?
>
> Tell userspace not to do stupid things?
>
> This isn't a problem. The kernel assumes that whatever userspace does,
> once the connection is set up again everything's the way it was before.
> If that's not true, then userspace is to blame, not kernel space.
>
> Adding a "key" which we need to pass is going to make things wildly more
> complicated for no benefit.
Okay.
So let things roll for timeout but stop for disconnect.
>
> --
> < 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
--
---P.K.S
Reply to: