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

Re: [Nbd] [PATCH] Further tidy-up on block status



On Wed, Dec 14, 2016 at 06:18:58PM +0000, Alex Bligh wrote:
> 
> > On 14 Dec 2016, at 18:13, Wouter Verhelst <w@...112...> wrote:
> > 
> > Instead, I would suggest that the spec leave it up to the namespace spec
> > to define what gets listed when. The namespace should still give some
> > indication that a particular *type* of context is available, though;
> > e.g., _LIST_ could return 'backup:snapshot-diff{*}' as well as a list of
> > 'backup:snapshot{snapshot-X}' contexts, where the latter are all
> > available snapshots, and the 'snapshot-diff' bit implies that the whole
> > cartesian product of all possible diffs between snapshots is possible in
> > a format of 'backup:snapshot-diff{snapshot-X:snapshot-Y}', or some such
> > (you get the idea).
> > 
> > The spec currently says that a server SHOULD allow choosing exports by
> > simply naming them, but doesn't make that a MUST; and it also says that
> > the query format is defined by the namespace. If we simply clarify that
> > the output of _LIST_ doesn't necessarily need to be a full list of all
> > that's available (that it may be symbolic in the case of namespaces that
> > allow things to be dynamically defined), we should be good.
> 
> Let me have a go at a change.
> 
> However, note that Vladimir was answering a slightly different question.

Actually not :)

> I was asking about listing ALL contexts (previously an empty query
> string, now a zero length list of queries), not a 'backup:*' type
> thing.

What I was trying to say is that I think the result to _LIST_ with no
queries should return all information the client needs to theoretically
build the list of all possible contexts, even if that list may be
so large as to be unfeasible for it to be built (e.g., in case of a
cartesian product between all possible other contexts). I gave one
example, but there may be more.

My point is that if the query includes a namespace, the result should
not be defined by our spec. If the query does not include a namespace,
the result should be "complete" by whatever definition, but not
unreasonable (i.e., don't just write a cartesian product to a client).

This could allow an interactive client to present a user with a list of
possible contexts before performing analysis on the block device, say.

-- 
< 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: