]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - fs/xfs/xfs_log_recover.c
xfs: refactor redo intent item processing
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 3 Aug 2016 01:23:49 +0000 (11:23 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 3 Aug 2016 01:23:49 +0000 (11:23 +1000)
commitdc42375d5f55d2c48d363957621d7aa913bdc5a1
tree994af1aeb92a29a37d1c066e2a9bbdeee49a282d
parent2c3234d1ef53030ff6a79d55ba1fb291098467c2
xfs: refactor redo intent item processing

Refactor the EFI intent item recovery (and cancellation) functions
into a general function that scans the AIL and an intent item type
specific handler.  Move the function that recovers a single EFI item
into the extent free item code.  We'll want the generalized function
when we start wiring up more redo item types.

Furthermore, ensure that log recovery only replays the redo items
that were in the AIL prior to recovery by checking the item LSN
against the largest LSN seen during log scanning.  As written this
should never happen, but we can be defensive anyway.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_extfree_item.c
fs/xfs/xfs_extfree_item.h
fs/xfs/xfs_log_recover.c