xfs: refactor log recovery item sorting into a generic dispatch structure
Create a generic dispatch structure to delegate recovery of different log item types into various code modules. This will enable us to move code specific to a particular log item type out of xfs_log_recover.c and into the log item source. The first operation we virtualize is the log item sorting. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "xfs_log.h"
|
||||
#include "xfs_refcount.h"
|
||||
#include "xfs_error.h"
|
||||
#include "xfs_log_recover.h"
|
||||
|
||||
kmem_zone_t *xfs_cui_zone;
|
||||
kmem_zone_t *xfs_cud_zone;
|
||||
@@ -570,3 +571,11 @@ abort_error:
|
||||
xfs_trans_cancel(tp);
|
||||
return error;
|
||||
}
|
||||
|
||||
const struct xlog_recover_item_ops xlog_cui_item_ops = {
|
||||
.item_type = XFS_LI_CUI,
|
||||
};
|
||||
|
||||
const struct xlog_recover_item_ops xlog_cud_item_ops = {
|
||||
.item_type = XFS_LI_CUD,
|
||||
};
|
||||
|
Reference in New Issue
Block a user