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

Re: [Nbd] [PATCH] Add "temporary" option, and ability to create files.



Wouter,

(replying to myself)

--On 9 June 2011 16:19:02 +0100 Alex Bligh <alex@...872...> wrote:

I think the answer here is because there is no way from prerun
or postrun to feed back the name of the temporary file created. Just
to be clear, what it's doing is creating a temporary file based on
the pathname specified in the export session, and using that. So multiple
clients can say "I want a 50Gig disk that will go away after I use
it". Pre-run could create one, with a fixed filename, but I see
no way to avoid overwriting the files of existing clients.

Oh, there were a couple of other reasons.

Firstly I want to introduce a negotiated option (partly to test whether
option negotiation can work - I was just going to write some code
and see what people thought) where the client can ask for a disk
size. That's not fantastically useful in nbd-server without the
temporary file option, though it would be with it (with the
configured size acting as a maximum). I thought I'd get the
temporary file stuff in first as it is reasonably non-destructive.

Secondly, it will simplify the test suite a bit (no need
for that dd, a trap() to delete the file, etc.).

--
Alex Bligh



Reply to: