Re: [Nbd] TRIM stuff
- To: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] TRIM stuff
- From: Wouter Verhelst <w@...112...>
- Date: Fri, 16 Sep 2011 10:36:27 +0200
- Message-id: <20110916083627.GC19601@...3...>
- In-reply-to: <20110916082609.GA19601@...3...>
- References: <20110916082609.GA19601@...3...>
On Fri, Sep 16, 2011 at 10:26:09AM +0200, Wouter Verhelst wrote:
> Hi,
>
> So yesterday I implemented the fallocate(FALLOC_FL_PUNCH_HOLE) stuff for
> NBD_CMD_TRIM. It's compile-tested, but not yet functionally tested. To
> be honest, I'm not entirely sure how to test whether a file is sparse in
> a particular region; anyone?
>
> Anyway, reviews on that short piece of code are obviously welcome.
After looking at it myself, I already find two issues:
- Need to deal with copy-on-write
- Need to have better error handling. Scratch that, make that "need to
have error handling", period.
--
The volume of a pizza of thickness a and radius z can be described by
the following formula:
pi zz a
Reply to: