lkml.org 
[lkml]   [2001]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Editing-in-place of a large file
Date
On September 3, 2001 02:59 am, Larry McVoy wrote:
> > 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)

sys_clear :-)

> 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.

He could insert blank video frames to pad to the edges of blocks. Very
theoretical since we are ages away from having fzero/sys_clear. Ask Al Viro
if you want to hear the whole ugly story. (Executive summary: it's hard
enough handling remove/create races with just one boundary per file, now try
it with an unbounded number.)

--
Daniel
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:17    [W:0.284 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site