#
42b394a9 |
| 12-Jul-2018 |
Brian Foster <bfoster@redhat.com> |
xfs: remove xfs_btree_cur bmbt dfops field
All assignments of xfs_btree_cur.bc_private.b.dfops originate from ->t_dfops. Replace accesses of the former with the latter and remove the unnecessary fie
xfs: remove xfs_btree_cur bmbt dfops field
All assignments of xfs_btree_cur.bc_private.b.dfops originate from ->t_dfops. Replace accesses of the former with the latter and remove the unnecessary field. This patch does not change behavior.
Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
show more ...
|
Revision tags: v4.17.6, v4.17.5, v4.17.4, v4.17.3, v4.17.2, v4.17.1 |
|
#
0b61f8a4 |
| 05-Jun-2018 |
Dave Chinner <dchinner@redhat.com> |
xfs: convert to SPDX license tags
Remove the verbose license text from XFS files and replace them with SPDX tags. This does not change the license of any of the code, merely refers to the common, up
xfs: convert to SPDX license tags
Remove the verbose license text from XFS files and replace them with SPDX tags. This does not change the license of any of the code, merely refers to the common, up-to-date license files in LICENSES/
This change was mostly scripted. fs/xfs/Makefile and fs/xfs/libxfs/xfs_fs.h were modified by hand, the rest were detected and modified by the following command:
for f in `git grep -l "GNU General" fs/xfs/` ; do echo $f cat $f | awk -f hdr.awk > $f.new mv -f $f.new $f done
And the hdr.awk script that did the modification (including detecting the difference between GPL-2.0 and GPL-2.0+ licenses) is as follows:
$ cat hdr.awk BEGIN { hdr = 1.0 tag = "GPL-2.0" str = "" }
/^ \* This program is free software/ { hdr = 2.0; next }
/any later version./ { tag = "GPL-2.0+" next }
/^ \*\// { if (hdr > 0.0) { print "// SPDX-License-Identifier: " tag print str print $0 str="" hdr = 0.0 next } print $0 next }
/^ \* / { if (hdr > 1.0) next if (hdr > 0.0) { if (str != "") str = str "\n" str = str $0 next } print $0 next }
/^ \*/ { if (hdr > 0.0) next print $0 next }
// { if (hdr > 0.0) { if (str != "") str = str "\n" str = str $0 next } print $0 }
END { } $
Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
show more ...
|
Revision tags: v4.17 |
|
#
08daa3cc |
| 09-May-2018 |
Darrick J. Wong <darrick.wong@oracle.com> |
xfs: add repair helpers for the reference count btree
Add a couple of functions to the refcount btree and generic btree code that will be used to repair the refcountbt.
Signed-off-by: Darrick J. Wo
xfs: add repair helpers for the reference count btree
Add a couple of functions to the refcount btree and generic btree code that will be used to repair the refcountbt.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
show more ...
|
#
14861c47 |
| 09-May-2018 |
Darrick J. Wong <darrick.wong@oracle.com> |
xfs: add helpers to calculate btree size
Add a bunch of helper functions that calculate the sizes of various btrees. These will be used to repair btrees and btree headers.
Signed-off-by: Darrick J
xfs: add helpers to calculate btree size
Add a bunch of helper functions that calculate the sizes of various btrees. These will be used to repair btrees and btree headers.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
show more ...
|
#
a1f69417 |
| 06-Apr-2018 |
Eric Sandeen <sandeen@sandeen.net> |
xfs: non-scrub - remove unused function parameters
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.won
xfs: non-scrub - remove unused function parameters
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
show more ...
|
Revision tags: v4.16 |
|
#
e157ebdc |
| 06-Mar-2018 |
Carlos Maiolino <cmaiolino@redhat.com> |
Cleanup old XFS_BTREE_* traces
Remove unused legacy btree traces from IRIX era.
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-o
Cleanup old XFS_BTREE_* traces
Remove unused legacy btree traces from IRIX era.
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
show more ...
|
Revision tags: v4.15 |
|
#
ce1d802e |
| 16-Jan-2018 |
Darrick J. Wong <darrick.wong@oracle.com> |
xfs: add scrub cross-referencing helpers for the free space btrees
Add a couple of functions to the free space btrees that will be used to cross-reference metadata against the bnobt/cntbt, and a gen
xfs: add scrub cross-referencing helpers for the free space btrees
Add a couple of functions to the free space btrees that will be used to cross-reference metadata against the bnobt/cntbt, and a generic btree function that provides the real implementation.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
show more ...
|
#
a6a781a5 |
| 08-Jan-2018 |
Darrick J. Wong <darrick.wong@oracle.com> |
xfs: have buffer verifier functions report failing address
Modify each function that checks the contents of a metadata buffer to return the instruction address of the failing test so that we can rep
xfs: have buffer verifier functions report failing address
Modify each function that checks the contents of a metadata buffer to return the instruction address of the failing test so that we can report more precise failure errors to the log.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
show more ...
|
#
8368a601 |
| 08-Jan-2018 |
Darrick J. Wong <darrick.wong@oracle.com> |
xfs: refactor long-format btree header verification routines
Create two helper functions to verify the headers of a long format btree block. We'll use this later for the realtime rmapbt.
Signed-of
xfs: refactor long-format btree header verification routines
Create two helper functions to verify the headers of a long format btree block. We'll use this later for the realtime rmapbt.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
show more ...
|
#
59f6fec3 |
| 08-Jan-2018 |
Darrick J. Wong <darrick.wong@oracle.com> |
xfs: remove XFS_FSB_SANITY_CHECK
We already have a function to verify fsb pointers, so get rid of the last users of the (less robust) macro.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
xfs: remove XFS_FSB_SANITY_CHECK
We already have a function to verify fsb pointers, so get rid of the last users of the (less robust) macro.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
show more ...
|
Revision tags: v4.13.16, v4.14 |
|
#
2fdbec5c |
| 25-Oct-2017 |
Darrick J. Wong <darrick.wong@oracle.com> |
xfs: compare btree block keys to parent block's keys during scrub
When we're done checking all the records/keys in a btree block, compute the low and high key of the block and compare them to the as
xfs: compare btree block keys to parent block's keys during scrub
When we're done checking all the records/keys in a btree block, compute the low and high key of the block and compare them to the associated key in the parent btree block.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
show more ...
|
#
cc3e0948 |
| 17-Oct-2017 |
Darrick J. Wong <darrick.wong@oracle.com> |
xfs: scrub the shape of a metadata btree
Create a function that can check the shape of a btree -- each block passes basic inspection and all the pointers look ok. In the next patch we'll add the ab
xfs: scrub the shape of a metadata btree
Create a function that can check the shape of a btree -- each block passes basic inspection and all the pointers look ok. In the next patch we'll add the ability to check the actual keys and records stored within the btree. Add some helper functions so that we report detailed scrub errors in a uniform manner in dmesg. These are helper functions for subsequent patches.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
show more ...
|
#
52c732ee |
| 17-Oct-2017 |
Darrick J. Wong <darrick.wong@oracle.com> |
xfs: refactor btree block header checking functions
Refactor the btree block header checks to have an internal function that returns the address of the failing check without logging errors. The scr
xfs: refactor btree block header checking functions
Refactor the btree block header checks to have an internal function that returns the address of the failing check without logging errors. The scrubber will call the internal function, while the external version will maintain the current logging behavior.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
show more ...
|
#
f135761a |
| 17-Oct-2017 |
Darrick J. Wong <darrick.wong@oracle.com> |
xfs: refactor btree pointer checks
Refactor the btree pointer checks so that we can call them from the scrub code without logging errors to dmesg. Preserve the existing error reporting for regular
xfs: refactor btree pointer checks
Refactor the btree pointer checks so that we can call them from the scrub code without logging errors to dmesg. Preserve the existing error reporting for regular operations.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
show more ...
|
Revision tags: v4.13.5, v4.13 |
|
#
99c794c6 |
| 29-Aug-2017 |
Brian Foster <bfoster@redhat.com> |
xfs: skip bmbt block ino validation during owner change
Extent swap uses xfs_btree_visit_blocks() to fix up bmbt block owners on v5 (!rmapbt) filesystems. The bmbt scan uses xfs_btree_lookup_get_blo
xfs: skip bmbt block ino validation during owner change
Extent swap uses xfs_btree_visit_blocks() to fix up bmbt block owners on v5 (!rmapbt) filesystems. The bmbt scan uses xfs_btree_lookup_get_block() to read bmbt blocks which verifies the current owner of the block against the parent inode of the bmbt. This works during extent swap because the bmbt owners are updated to the opposite inode number before the inode extent forks are swapped.
The modified bmbt blocks are marked as ordered buffers which allows everything to commit in a single transaction. If the transaction commits to the log and the system crashes such that recovery of the extent swap is required, log recovery restarts the bmbt scan to fix up any bmbt blocks that may have not been written back before the crash. The log recovery bmbt scan occurs after the inode forks have been swapped, however. This causes the bmbt block owner verification to fail, leads to log recovery failure and requires xfs_repair to zap the log to recover.
Define a new invalid inode owner flag to inform the btree block lookup mechanism that the current inode may be invalid with respect to the current owner of the bmbt block. Set this flag on the cursor used for change owner scans to allow this operation to work at runtime and during log recovery.
Signed-off-by: Brian Foster <bfoster@redhat.com> Fixes: bb3be7e7c ("xfs: check for bogus values in btree block headers") Cc: stable@vger.kernel.org Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
show more ...
|
Revision tags: v4.12 |
|
#
26788097 |
| 16-Jun-2017 |
Darrick J. Wong <darrick.wong@oracle.com> |
xfs: export various function for the online scrubber
Export various internal functions so that the online scrubber can use them to check the state of metadata.
Signed-off-by: Darrick J. Wong <darri
xfs: export various function for the online scrubber
Export various internal functions so that the online scrubber can use them to check the state of metadata.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
show more ...
|
#
38dee376 |
| 16-Jun-2017 |
Darrick J. Wong <darrick.wong@oracle.com> |
xfs: always compile the btree inorder check functions
The btree record and key inorder check functions will be used by the btree scrubber code, so make sure they're always built.
Signed-off-by: Dar
xfs: always compile the btree inorder check functions
The btree record and key inorder check functions will be used by the btree scrubber code, so make sure they're always built.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
show more ...
|
#
c8ce540d |
| 16-Jun-2017 |
Darrick J. Wong <darrick.wong@oracle.com> |
xfs: remove double-underscore integer types
This is a purely mechanical patch that removes the private __{u,}int{8,16,32,64}_t typedefs in favor of using the system {u,}int{8,16,32,64}_t typedefs.
xfs: remove double-underscore integer types
This is a purely mechanical patch that removes the private __{u,}int{8,16,32,64}_t typedefs in favor of using the system {u,}int{8,16,32,64}_t typedefs. This is the sed script used to perform the transformation and fix the resulting whitespace and indentation errors:
s/typedef\t__uint8_t/typedef __uint8_t\t/g s/typedef\t__uint/typedef __uint/g s/typedef\t__int\([0-9]*\)_t/typedef int\1_t\t/g s/__uint8_t\t/__uint8_t\t\t/g s/__uint/uint/g s/__int\([0-9]*\)_t\t/__int\1_t\t\t/g s/__int/int/g /^typedef.*int[0-9]*_t;$/d
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
show more ...
|
Revision tags: v4.10.17, v4.10.16, v4.10.15, v4.10.14, v4.10.13, v4.10.12, v4.10.11, v4.10.10, v4.10.9, v4.10.8, v4.10.7 |
|
#
e9a2599a |
| 28-Mar-2017 |
Darrick J. Wong <darrick.wong@oracle.com> |
xfs: create a function to query all records in a btree
Create a helper function that will query all records in a btree. This will be used by the online repair functions to examine every record in a
xfs: create a function to query all records in a btree
Create a helper function that will query all records in a btree. This will be used by the online repair functions to examine every record in a btree to rebuild a second btree.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
show more ...
|
Revision tags: v4.10.6, v4.10.5, v4.10.4, v4.10.3, v4.10.2, v4.10.1, v4.10 |
|
#
d5a91bae |
| 02-Feb-2017 |
Darrick J. Wong <darrick.wong@oracle.com> |
xfs: filter out obviously bad btree pointers
Don't let anybody load an obviously bad btree pointer. Since the values come from disk, we must return an error, not just ASSERT.
Signed-off-by: Darric
xfs: filter out obviously bad btree pointers
Don't let anybody load an obviously bad btree pointer. Since the values come from disk, we must return an error, not just ASSERT.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
show more ...
|
#
b6f41e44 |
| 28-Jan-2017 |
Eric Sandeen <sandeen@sandeen.net> |
xfs: remove boilerplate around xfs_btree_init_block
Now that xfs_btree_init_block_int is able to determine crc status from the passed-in mp, we can determine the proper magic as well if we are given
xfs: remove boilerplate around xfs_btree_init_block
Now that xfs_btree_init_block_int is able to determine crc status from the passed-in mp, we can determine the proper magic as well if we are given a btree number, rather than an explicit magic value.
Change xfs_btree_init_block[_int] callers to pass in the btree number, and let xfs_btree_init_block_int use the xfs_magics array via the xfs_btree_magic macro to determine which magic value is needed. This makes all of the if (crc) / else stanzas identical, and the if/else can be removed, leading to a single, common init_block call.
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
show more ...
|
#
af7d20fd |
| 28-Jan-2017 |
Eric Sandeen <sandeen@sandeen.net> |
xfs: make xfs_btree_magic more generic
Right now the xfs_btree_magic() define takes only a cursor; change this to take crc and btnum args to make it more generically useful, and move to a function.
xfs: make xfs_btree_magic more generic
Right now the xfs_btree_magic() define takes only a cursor; change this to take crc and btnum args to make it more generically useful, and move to a function.
This will allow xfs_btree_init_block_int callers which don't have a cursor to make use of the xfs_magics array, which will happen in the next patch.
Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
show more ...
|
Revision tags: v4.9 |
|
#
11ef38af |
| 04-Dec-2016 |
Dave Chinner <dchinner@redhat.com> |
xfs: make xfs btree stats less huge
Embedding a switch statement in every btree stats inc/add adds a lot of code overhead to the core btree infrastructure paths. Stats are supposed to be small and l
xfs: make xfs btree stats less huge
Embedding a switch statement in every btree stats inc/add adds a lot of code overhead to the core btree infrastructure paths. Stats are supposed to be small and lightweight, but the btree stats have become big and bloated as we've added more btrees. It needs fixing because the reflink code will just add more overhead again.
Convert the v2 btree stats to arrays instead of independent variables, and instead use the type to index the specific btree array via an enum. This allows us to use array based indexing to update the stats, rather than having to derefence variables specific to the btree type.
If we then wrap the xfsstats structure in a union and place uint32_t array beside it, and calculate the correct btree stats array base array index when creating a btree cursor, we can easily access entries in the stats structure without having to switch names based on the btree type.
We then replace with the switch statement with a simple set of stats wrapper macros, resulting in a significant simplification of the btree stats code, and:
text data bss dec hex filename 48905 144 8 49057 bfa1 fs/xfs/libxfs/xfs_btree.o.old 36793 144 8 36945 9051 fs/xfs/libxfs/xfs_btree.o
it reduces the core btree infrastructure code size by close to 25%!
Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
show more ...
|
Revision tags: openbmc-4.4-20161121-1, v4.4.33, v4.4.32, v4.4.31, v4.4.30, v4.4.29, v4.4.28, v4.4.27, v4.7.10, openbmc-4.4-20161021-1, v4.7.9, v4.4.26, v4.7.8, v4.4.25, v4.4.24, v4.7.7 |
|
#
1946b91c |
| 03-Oct-2016 |
Darrick J. Wong <darrick.wong@oracle.com> |
xfs: define the on-disk refcount btree format
Start constructing the refcount btree implementation by establishing the on-disk format and everything needed to read, write, and manipulate the refcoun
xfs: define the on-disk refcount btree format
Start constructing the refcount btree implementation by establishing the on-disk format and everything needed to read, write, and manipulate the refcount btree blocks.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Christoph Hellwig <hch@lst.de>
show more ...
|
#
46eeb521 |
| 03-Oct-2016 |
Darrick J. Wong <darrick.wong@oracle.com> |
xfs: introduce refcount btree definitions
Add new per-AG refcount btree definitions to the per-AG structures.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Christoph Hellw
xfs: introduce refcount btree definitions
Add new per-AG refcount btree definitions to the per-AG structures.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Christoph Hellwig <hch@lst.de>
show more ...
|