linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Efficient handling of sparse files
@ 2005-02-28 17:41 Matthew Wilcox
  2005-02-28 17:44 ` Jeremy Allison
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Matthew Wilcox @ 2005-02-28 17:41 UTC (permalink / raw)
  To: linux-fsdevel


This problem came up with the systemimager program which uses rsync to
install files from a master server to many clients.  Red Hat has a system
user with uid 2^32-1 which causes lastlog to grow to 1.2GB in size.
rsync does understand the concept of sparse files (with the -S flag), but
it has to read every block to discover that it is indeed empty.  This sucks.

I was wondering if we could introduce a new system call (or ioctl?) that,
given an fd would find the next block with data in it.  We could use the
->bmap method ... except that has dire warnings about adding new callers
and viro may soon be in testicle-gouging range.

One system interface hack would be to introduce lseek(fd, 0, SEEK_DATA)
... but without permission to reuse ->bmap for this purpose, it's
pointless to discuss user interfaces.

Suggestions?

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-03-01 18:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-28 17:41 Efficient handling of sparse files Matthew Wilcox
2005-02-28 17:44 ` Jeremy Allison
2005-02-28 20:13   ` Bryan Henderson
2005-02-28 21:49     ` Jamie Lokier
2005-03-01 18:37       ` Bryan Henderson
2005-02-28 18:57 ` Szakacsits Szabolcs
2005-02-28 19:55 ` Zach Brown
2005-02-28 20:40 ` Anton Altaparmakov
2005-02-28 20:53   ` Zach Brown
2005-03-01  7:50     ` Anton Altaparmakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).