summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/common.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2019-08-30 15:44:48 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2019-11-22 21:35:01 -0800
commita1e689fa6cfab8013be2a45eb20712c8ba63dcf0 (patch)
tree8975af776f38d785c066e2cac1184642b817f834 /fs/xfs/scrub/common.c
parent7c43ad1ee686f5a1d947dbcfa7d7eabdc6a2b80c (diff)
xfs: create a big array data structure
Create a simple 'big array' data structure for storage of fixed-size metadata records that will be used to reconstruct a btree index. For repair operations, the most important operations are append, iterate, and sort. Earlier implementations of the big array used linked lists and suffered from severe problems -- pinning all records in kernel memory was not a good idea and frequently lead to OOM situations; random access was very inefficient; and record overhead for the lists was unacceptably high at 40-60%. Therefore, the big memory array relies on the 'xfile' abstraction, which creates a memfd file and stores the records in page cache pages. Since the memfd is created in tmpfs, the memory pages can be pushed out to disk if necessary and we have a built-in usage limit of 50% of physical memory. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/scrub/common.c')
0 files changed, 0 insertions, 0 deletions