On Mon, May 15, 2006 at 08:12:06PM -0700, Peter Broadwell wrote:
> David Chinner wrote:
> >>In looking around I did see a ioctl, XFS_IOC_FSBULKSTAT, that seemed
> >>like it might give a different approach to doing this, but looked like it
> >>was read only (and lots of work to get anything going with it...)
> >>Is this a worthwhile avenue to look at more deeply?
> >
> >Read only, and does not follow any directory structure - it just reads
> >the inodes off disk in ascending block order....
>
> Well, *if* I had to do this often I would think a write version of this
> ioctl might reduce by at least 1/3 the number of disk writes, no?
If you wanted to change every inode in the filesystem, then yes, it
could be done this way (e.g. an inode cluster at a time). And the
difference in I/Os would be more like an order of magnitude.
However, a write version is not quite that simple because you still
have to log all the changes you make.....
> It also seems funny that I could copy the whole disk in less time that
> it took me to chown files that are filling up less than 1/2 of it...
Yep, that's the difference between doing large sequential I/Os
for the disk copy and small, random I/Os for the chown...
> Fortunately I don't expect to have to do this again, and if I do,
> I'll know it will be a long running process.
>
> Thanks again for your help in understanding what is probably happening.
np.
Cheers,
Dave.
--
Dave Chinner
R&D Software Enginner
SGI Australian Software Group
|