Age | Commit message (Collapse) | Author |
|
Forward everything scrub whines about to dmesg.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
When we're scrubbing the realtime metadata, cross-reference
the rtrmapt.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
When we're checking the realtime rmapbt, cross-reference the entries
with the realtime bitmap too.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Check the realtime reverse mapping btree against the rtbitmap, and
modify the rtbitmap scrub to check against the rtrmapbt.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Connect the getfsmap ioctl to the realtime rmapbt.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
If the administrator asks us to add a realtime volume to an existing
rmap filesystem, we must allocate and attach the rtrmapbt inode to the
system prior to enabling the rt volume.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Create a library routine to allocate and initialize an empty realtime
rmapbt inode. We'll use this for growfs, mkfs, and repair.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Connect the map and unmap reverse-mapping operations to the realtime
rmapbt via the deferred operation callbacks. This enables us to
perform rmap operations against the correct btree.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Plumb in the pieces we need to embed the root of the realtime rmap
btree in an inode's data fork, complete with new fork type and
on-disk interpretation functions.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Add a metadir path to select the realtime rmap btree inode and load
it at mount time. The rtrmapbt inode will have a unique extent format
code, which means that we also have to update the inode validation and
flush routines to look for it.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Identify rtrmapbt blocks in the log correctly so that we can
validate them during log recovery.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Extend the rmap update (RUI) log items with a new realtime flag that
indicates that the updates apply against the realtime rmapbt. We'll
wire up the actual rmap code later.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Prepare the high-level rmap functions to deal with the new realtime
rmapbt and its slightly different conventions. Provide the ability
to talk to either rmapbt or rtrmapbt formats from the same high
level code.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Implement the generic btree operations needed to manipulate rtrmap
btree blocks. This is different from the regular rmapbt in that we
allocate space from the filesystem at large, and are neither
constrained to the free space nor any particular AG.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Make sure that there's enough log reservation to handle mapping
and unmapping realtime extents. We have to reserve enough space
to handle a split in the rtrmapbt to add the record and a second
split in the regular rmapbt to record the rtrmapbt split.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Start filling out the rtrmap btree implementation. Start with the
on-disk btree format; add everything needed to read, write and
manipulate rmap btree blocks. This prepares the way for connecting the
btree operations implementation.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Add new realtime rmap btree definitions. The realtime rmap btree will
be rooted from a hidden inode, but has its own shape and therefore
needs to have most of its own separate types.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Change the startblock and blockcount fields of xfs_rmap_irec to be 64
bits wide. This enables us to use the same high level rmap code for
either tree. We'll also collect all the resulting breakage fixes here.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Make it so that we can actually store btree records in the inode
core (i.e. enable bb_level == 0) so that the rtrmapbt can do this.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
For btrees that are rooted in the inode core, we have to have a
function to resize the root. This is fairly specific to each
btree type, so make xfs_iroot_realloc a per-btree function.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Enable the metadata inode directory feature.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Ideally, we'd put all the metadata inodes in one place if we could, so
that the metadata all stay reasonably close together instead of
spreading out over the disk. Furthermore, if the log is internal we'd
probably prefer to keep the metadata near the log. Therefore, disable
AGI rotoring for metadata inode allocations.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Since xfs_imeta_create can create new metadata files arbitrarily deep in
the metadata directory tree, we must supply a function that can ensure
that all directories in a path exist, and call it before the quota
functions create the quota inodes.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Plumb in the bits we need to look up metadata inode numbers from the
metadata inode directory and save them back.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Add checks for the metadata inode flag so that we don't ever leak
metadata inodes out to userspace, and we don't ever try to read a
regular inode as metadata.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Convert the magic metadata inode lookup keys to use actual strings
for paths.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Load the metadata directory inode into memory at mount time and release
it at unmount time. We also make sure that the obsolete inode pointers
in the superblock are not logged or read from the superblock.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Define the on-disk layout and feature flags for the metadata inode
directory feature.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Create a xfs_iget_meta function for metadata inodes to ensure that we
always check that the inobt thinks a metadata inode is in use.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Convert all open-coded sb metadata inode pointer logging to use
xfs_imeta_log.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Refactor the group and project quota inode pointer switcheroo that
happens only on v4 filesystems into a separate function prior to
enhancing the xfs_qm_qino_alloc function.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Create transaction reservation types and block reservation helpers to
help us calculate transaction requirements.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Create some helper routines to get and set metadata inode numbers
instead of open-coding them throughout xfs.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Get rid of the largely pointless xfs_cross_rename now that we've
refactored its parent.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Create a new libxfs function to rename two directory entries. The
upcoming metadata directory feature will need this to replace a metadata
inode directory entry.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Create a new libxfs function to exchange two directory entries.
The upcoming metadata directory feature will need this to replace a
metadata inode directory entry.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Create a new libxfs function to remove a (name, inode) entry from a
directory. The upcoming metadata directory feature will need this to
create a metadata directory tree.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Create a libxfs helper function that marks an inode free on disk.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Create a new libxfs function to link an existing inode into a directory.
The upcoming metadata directory feature will need this to create a
metadata directory tree.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Create a new libxfs function to link a newly created inode into a
directory. The upcoming metadata directory feature will need this to
create a metadata directory tree.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Move xfs_bumplink and xfs_droplink to libxfs.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Move xfs_iunlink and xfs_iunlink_remove to libxfs.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Move xfs_dir_ialloc to libxfs, and make xfs_ialloc static since we only
needed it to be non-static temporarily.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
In xfs_dir_ialloc, we roll the transaction if we had to allocate a new
inode chunk and before we actually initialize the inode. In the kernel
this requires us to detach the transaction's quota charge information
from the ichunk allocation transaction and to attach it the ialloc
transaction because we don't charge quota for inode chunks. This
doesn't exist in the userspace side of things, so pop it out into a
separately called function.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Move the initialization of the xfs_ialloc_args structure out of
xfs_dir_ialloc into its callers' callers so that we can set the new
inode's parameters in one place and pass it through instead of open
coding the new uid/gid/prid all over the code. This also prepares us
for moving xfs_dir_ialloc and xfs_create to libxfs.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Move the inode allocation function into libxfs.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Create a post-allocation iget helper so that the upcoming libxfs hoist
doesn't have to determine the xfs_iget interface.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Split new inode allocation and initialization into separate helpers.
Eventually we'll supply a force-reinitialization function so that
xfs_repair can use libxfs to reset the root directory and friends.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
Use xfs_trans_ichgtime to set the inode times when allocating an inode,
instead of open-coding them here.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|