summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_log.h
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2015-08-19 09:52:21 +1000
committerDave Chinner <david@fromorbit.com>2015-08-19 09:52:21 +1000
commite32a1d1fbf6eb2bdc24aa0502e827ff4d2234604 (patch)
tree86f8a2fc5ac53c1db1a499d0ffe7213a09f9fd49 /fs/xfs/xfs_log.h
parent6bc43af3d5f507254b8de2058ea51f6ec998ae52 (diff)
xfs: use EFI refcount consistently in log recovery
The EFI is initialized with a reference count of 2. One for the EFI to ensure the item makes it to the AIL and one for the subsequently created EFD to release the EFI once the EFD is committed. Log recovery uses the EFI in a similar manner, but implements a hack to remove both references in one call once the EFD is handled. Update log recovery to use EFI reference counting in a manner consistent with the log. When an EFI is encountered during recovery, an EFI item is allocated and inserted to the AIL directly. Since the EFI reference is typically dropped when the EFI is unpinned and this is analogous with AIL insertion, drop the EFI reference at this point. When a corresponding EFD is encountered in the log, this indicates that the extents were freed, no processing is required and the EFI can be dropped. Update xlog_recover_efd_pass2() to simply drop the EFD reference at this point rather than open code the AIL removal and EFI free. Remaining EFIs (i.e., with no corresponding EFD) are processed in xlog_recover_finish(). An EFD transaction is allocated and the extents are freed, which transfers ownership of the EFI reference to the EFD item in the log. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_log.h')
0 files changed, 0 insertions, 0 deletions