Re: Editing-in-place of a large file

From: Larry McVoy (lm@bitmover.com)
Date: Sun Sep 02 2001 - 19:59:38 EST


> What's needed is a generalisation of sparse files and truncate().
> They both handle similar problems.

how about

        fzero(int fd, off_t off, size_t len)

which zeros the blocks and if it can creates a holey file?

However, that's not what Bob wants, he wants to remove commercials from
recorded TV. So what he wants is

        fdelete(int fd, off_t off, size_t len)

which has the semantics of shifting the rest of the file backwards to "off".

The main problem with this is if the off/len are not block aligned. If they
are, then this is just block twiddling, if they aren't, then this is a file
rewrite anyway.

-- 
---
Larry McVoy            	 lm at bitmover.com           http://www.bitmover.com/lm 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Sep 07 2001 - 21:00:16 EST