[PATCH v4 4/9] xfsrestore: mmap dirent names for faster lookups
Christoph Hellwig
hch at infradead.org
Tue Nov 23 07:48:18 CST 2010
On Fri, Nov 19, 2010 at 12:38:37PM -0600, Bill Kendall wrote:
> Pathname resolution in xfsrestore is about 4x faster if the file
> containing dirent names ("namreg") is memory mapped. If xfsrestore is
> unable to map the file (e.g., due to virtual memory constraints)
> fallback to the existing seek-and-read approach.
>
> The file is mapped after all directory entries have been written to
> the "namreg" file. If the caller tries to add additional entries after
> the file has been mapped, it will be unmapped and restore will resort
> back to seek-and-read lookups.
This looks much simpler indeed. Is it intentional that the namreg file
is never unmapped any more?
More information about the xfs
mailing list