summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_fsmap.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2020-02-19 17:01:42 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2020-06-24 18:12:18 -0700
commit2cef455df8dbd243c38655723954a781480d995d (patch)
tree350489362f4f9c5f158b57d0013b412475131d33 /fs/xfs/xfs_fsmap.c
parentc43342596290ac9bcff9de6f0a3b63cfa42ddcd8 (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/xfs_fsmap.c')
0 files changed, 0 insertions, 0 deletions