summaryrefslogtreecommitdiff
path: root/samples/kprobes
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2018-05-14 09:10:08 +0300
committerDarrick J. Wong <darrick.wong@oracle.com>2018-05-16 04:12:51 +0300
commit8125147288db7008c872a946210028bbf6c0af86 (patch)
tree8c72e7405fb6bd6b22037d2e9d3409d33b820c0f /samples/kprobes
parent83a7f86e39ff5d60ba2ea2e24879e136d8e9a114 (diff)
downloadlinux-8125147288db7008c872a946210028bbf6c0af86.tar.xz
xfs: rework secondary superblock updates in growfs
Right now we wait until we've committed changes to the primary superblock before we initialise any of the new secondary superblocks. This means that if we have any write errors for new secondary superblocks we end up with garbage in place rather than zeros or even an "in progress" superblock to indicate a grow operation is being done. To ensure we can write the secondary superblocks, initialise them earlier in the same loop that initialises the AG headers. We stamp the new secondary superblocks here with the old geometry, but set the "sb_inprogress" field to indicate that updates are being done to the superblock so they cannot be used. This will result in the secondary superblock fields being updated or triggering errors that will abort the grow before we commit any permanent changes. This also means we can change the update mechanism of the secondary superblocks. We know that we are going to wholly overwrite the information in the struct xfs_sb in the buffer, so there's no point reading it from disk. Just allocate an uncached buffer, zero it in memory, stamp the new superblock structure in it and write it out. If we fail to write it out, then we'll leave the existing sb (old or new w/ inprogress) on disk for repair to deal with later. 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>
Diffstat (limited to 'samples/kprobes')
0 files changed, 0 insertions, 0 deletions