Re: [Nbd] Proposal to merge WRITE_ZEROES extension into master
- To: Eric Blake <eblake@...696...>
- Cc: "nbd-general@lists.sourceforge.net" <nbd-general@lists.sourceforge.net>
- Subject: Re: [Nbd] Proposal to merge WRITE_ZEROES extension into master
- From: Wouter Verhelst <w@...112...>
- Date: Tue, 20 Dec 2016 09:25:18 +0100
- Message-id: <20161220082518.v27kqq63csmqhv4m@...3...>
- In-reply-to: <c085204a-0db4-fa6a-4c39-cbb98ab3a0d9@...696...>
- References: <BC48D5D1-550F-4EE3-BC84-623AE864FB3A@...872...> <20161214181434.ko22eeq6vnwpakh2@...3...> <75E8140C-3000-4500-89A4-71A26040ADE4@...872...> <0132c6df-dbcf-b55a-6b56-f3279c825f1a@...696...> <4888CDE5-8CAD-4F0F-ABBC-6C904EC96ED0@...872...> <71fc32d7-2e5b-28c8-ec45-893daf5710d7@...696...> <FE824089-E29F-4894-B9CC-6A3CBC421CD6@...872...> <20161215110942.6xepfmak53kgr4wc@...3...> <20161219214143.jhgno7krc7fpgmjy@...3...> <c085204a-0db4-fa6a-4c39-cbb98ab3a0d9@...696...>
On Mon, Dec 19, 2016 at 03:54:04PM -0600, Eric Blake wrote:
> On 12/19/2016 03:41 PM, Wouter Verhelst wrote:
> > On Thu, Dec 15, 2016 at 12:09:42PM +0100, Wouter Verhelst wrote:
> >> Eric's patch makes -d work again, but disables maxconnections in that
> >> case. I'll need to fix it up; hopefully that'll happen sometime next
> >> week, because otherwise I'll be too late to make the Debian freeze for
> >> stretch, and I'd really like STARTTLS to be in there.
> >
> > I'm an idiot :-)
> >
> > When we say "don't fork", that means we cannot handle more than one
> > connection, because we can't fork, and we do fork-per-child.
> >
> > I'll apply Eric's patch, it's the correct thing to do.
>
> I'm not sure if I broke the ACL handling in my patch, though, so you'll
> want to double-check that aspect of it (I basically hardcoded -d to mean
> that the ACL check would always succeed).
Like I said, that's the right thing to do :-)
I had some trouble picking a good variable name when I called that
"acl". It isn't really an acl, but it looks like it a bit. It's only
used for maxconnections, and I don't think it'll be used for something
else in the near future (if that does ever change, we'll have to fix
this then, but that's a problem for that moment).
This, however, is *not* the right thing to do:
diff --git a/nbd-server.c b/nbd-server.c
index cbe7e57..45cb591 100644
--- a/nbd-server.c
+++ b/nbd-server.c
@@ -2025,7 +2025,7 @@ static void handle_write_zeroes(CLIENT* client, struct nbd_request* req) {
// TODO: handle this far more efficiently with reference to the
// actual backing driver
pthread_mutex_lock(&(client->lock));
- writeit(client->net, &rep, sizeof rep);
+ socket_write(client, &rep, sizeof rep);
pthread_mutex_unlock(&(client->lock));
}
I'm going to have to do a 3.15.1 for that, otherwise WRITE_ZEROES
handling will be broken with TLS enabled.
--
< 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
Reply to: