lkml.org 
[lkml]   [2001]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectdevice ordered files (for backups etc)
Date
While reading the "getting fs access events" thread I remembered
something which I've been meaning to look at for ages.

[some history]
I don't trust programs which dump file systems by reading the data
directly from the block device (I'm never sure that they get things
right). I prefer to do backups through the standard fs interfaces (so
logically we do 2 steps, make a list of files and then archive them).

However, this does mean that the order of real block reads may not be
very good (since files may accessed in an order which doesn't minimise
seeks). Ignoring the problem of files with blocks spread far apart,
it seems clear that mapping the file to a rough index into the device
and ordering the reading of the files by this index ought to reduce
the seeks.

Now most systems provide no interface for this (pity), though Linux
does through the FIBMAP ioctl() (for fs which support bmap at least).
However to use this we need to open() all the files get the block
index, sort them and then reopen the files in the right order.

There is also the problem that we are (indirectly) reading the
directories to do the readdir()/lstat() etc in some arbitrary order,
so causing more seeks.

Is there some trick I'm missing or is there really no way to avoid
these seek penalty and go through the standard fs interfaces?

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