xfs
[Top] [All Lists]

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

To: Bill Kendall <wkendall@xxxxxxx>
Subject: Re: [PATCH v4 4/9] xfsrestore: mmap dirent names for faster lookups
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Tue, 23 Nov 2010 08:48:18 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20101119183837.GA9505@xxxxxxx>
References: <20101119183837.GA9505@xxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
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?

<Prev in Thread] Current Thread [Next in Thread>