lkml.org 
[lkml]   [2001]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Q: sparse file creation in existing data?
Date
On Friday 29 June 2001 14:55, Ph. Marek wrote:
> Hmmm, on second thought ... But I'd like it better to have a fcntl for
> hole-making :-)
> Maybe I'll implement this myself.

A far superior interface would be:

ssize_t sys_clear(unsigned int fd, size_t count)

A stub implementation would just write zeroes. You would need a generic way
of determining whether holes are supported for a particular file - this is
where an fcntl would be appropriate. It would also be nice to know this
before opening/creating a file, perhaps by fcntling the directory.

But don't expect to have a real, hole-creating implementation any time soon.
Taming the truncate races is hard enough as it is with a single boundary at
the end of a file. Taking care of multiple boundaries inside the file is
far, far harder. Talk to Al Viro or the Ext3 team if you want the whole ugly
story.

--
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 12:55    [W:0.064 / U:1.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site