Re: [Nbd] TRIM stuff
- To: Wouter Verhelst <w@...112...>, nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] TRIM stuff
- From: Alex Bligh <alex@...872...>
- Date: Fri, 16 Sep 2011 11:17:51 +0100
- Message-id: <3A9057DA015271C58F344E4E@...873...>
- Reply-to: Alex Bligh <alex@...872...>
- In-reply-to: <20110916083627.GC19601@...3...>
- References: <20110916082609.GA19601@...3...> <20110916083627.GC19601@...3...>
--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: