Re: [PATCH v4 4/9] xfsrestore: mmap dirent names for faster lookups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/23/2010 07:48 AM, Christoph Hellwig wrote:
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?

There are several modules in xfsrestore which map files. None of them
currently contain a destructor/cleanup function for unmapping the files.
It would be a good change to make though.

Bill

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux