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

Re: [Nbd] another?



On Fri, Sep 16, 2011 at 10:07:28AM +0200, Folkert van Heusden wrote:
> >> Would it be interesting to have a command which asks the server how
> >> much space is really used? E.g. with the new discard which can be used
> >> by the server as a punch hole command.
> >>
> >> Also: iirc i saw that the nbd-client sends multiple commands to the
> >> server and then starts to wait for their replies. Shouldn't we somehow
> >> let the client know what the queue-depth of the server is so that the
> >> client knows how many commands it can send in advance? On the other
> >> hand: with the new fua/flush barrier-like commands this might not be
> >> neccessary.
> >
> > Why would the client need / want to know either of these things?
> 
> disk space: not sure

There's nothing the client can do about it if there's not enough
diskspace anyway, since two clock cycles after checking for diskspace
another client might disconnect and lose its copy-on-write file, freeing
up 4G of diskspace (or something).

> queue depth: to adapt the number of outstanding requests to what the
> other end is capable of.

TCP is perfectly capable of delaying data being sent if the window of
outstanding requests is too big already; there's no need to do that
again in NBD.

Of course, relying on TCP to do this does make it possible that both
the client and the server are writing to the socket at the same time
when one of them needs to do a read first before things can go on,
thereby deadlocking the connection. This is what happens with the
integrityhuge test on some platforms, which is why I've disabled it for
now. Once my scatgat branch is ready for prime time, however, this
problem will be dealt with. Then again, the only two tests it fails
currently /are/ the integrity and integrityhuge tests, so it looks like
I'm messing things up considerably currently. Oh well.

N.B.: You do have a few... wild ideas, but that's okay; sometimes the
best of features are implemented as a result of some wild idea. I'm not
promising I'll implement any of your wild ideas, but do keep 'em
coming!

-- 
The volume of a pizza of thickness a and radius z can be described by
the following formula:

pi zz a



Reply to: