From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Kleikamp Subject: Re: File perforation. Date: Wed, 8 Jan 2003 16:45:10 -0600 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <200301081645.10075.shaggy@austin.ibm.com> References: <21551.1042063560@passion.cambridge.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Return-path: To: David Woodhouse , linux-fsdevel@vger.kernel.org In-Reply-To: <21551.1042063560@passion.cambridge.redhat.com> List-Id: linux-fsdevel.vger.kernel.org On Wednesday 08 January 2003 16:06, David Woodhouse wrote: > I've been resisting these requests because I really don't want to do > it with an ioctl on the file. Only if we can have a generic > sys_perforate() would I really want to do it. I have heard requests for the same thing. I would not be opposed to the new system call. > Apparently it's hard to implement on block-based file systems. I > don't really care about that though -- just falling back to writing > zeroes to the offending range (or indeed returning -EINVAL) would be > perfectly sufficient until/unless it gets implemented for other file > systems. All I want is an interface that doesn't make me feel dirty > :) I don't think that it would be terribly hard to implement for block-based fs's. It's basically a more general form of truncate. Of course, I'm not saying it would be trivial. Experience says that anything dealing with truncate is full of gotchas and corner cases. > Comments? -- David Kleikamp IBM Linux Technology Center