On Thu, May 25, 2023 at 05:28:55PM -0700, Darrick J. Wong wrote: > Hi all, > > In general, online repair of an indexed record set walks the filesystem > looking for records. These records are sorted and bulk-loaded into a > new btree. To make this happen without pinning gigabytes of metadata in > memory, first create an abstraction ('xfile') of memfd files so that > kernel code can access paged memory, and then an array abstraction > ('xfarray') based on xfiles so that online repair can create an array of > new records without pinning memory. > > These two data storage abstractions are critical for repair of space > metadata -- the memory used is pageable, which helps us avoid pinning > kernel memory and driving OOM problems; and they are byte-accessible > enough that we can use them like (very slow and programmatic) memory > buffers. > > Later patchsets will build on this functionality to provide blob storage > and btrees. Apart from the need for a struct xfs-mount just for the xfile name at creation time, this all looks OK. Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> Is there any specific test harness for this infrastructure, or is it just validated by having other functions built on top of it "work correctly"? -Dave. -- Dave Chinner david@xxxxxxxxxxxxx