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

Re: [Nbd] TRIM stuff





--On 16 September 2011 10:36:27 +0200 Wouter Verhelst <w@...112...> wrote:

Scratch that, make that "need to
  have error handling", period.

If PUNCH_HOLE fails, can't you just translate it to a write of zeros
over the area, and use the normal error handling for that? If we
can't TRIM (which might be for reasons quite opaque to the client),
I think we ought to do the right thing (ensure a read will read zeroes)
and return success. The client can't know (for instance) the underlying
block sizes. On a 4KB block size SSD (assuming such a beast existed),
sending 1KB trim requests would fail, but sending a large one might
work in part.

--
Alex Bligh



Reply to: