diff options
author | Dave Chinner <david@fromorbit.com> | 2010-01-11 06:49:57 -0500 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-01-15 16:31:51 -0500 |
commit | f0a7695380efa31cd281730917f7e907a724d5cb (patch) | |
tree | 78cc743d1c507a7ba6a676dff576c79aef6592ab /fs/xfs/xfs_log_recover.h | |
parent | 5d77c0dc0c05c2c65aee16149fae06831a118730 (diff) |
xfs: Use list_heads for log recovery item lists
Remove the roll-your-own linked list operations.
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_log_recover.h')
-rw-r--r-- | fs/xfs/xfs_log_recover.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/fs/xfs/xfs_log_recover.h b/fs/xfs/xfs_log_recover.h index b22545555301..75d749207258 100644 --- a/fs/xfs/xfs_log_recover.h +++ b/fs/xfs/xfs_log_recover.h | |||
@@ -35,22 +35,21 @@ | |||
35 | * item headers are in ri_buf[0]. Additional buffers follow. | 35 | * item headers are in ri_buf[0]. Additional buffers follow. |
36 | */ | 36 | */ |
37 | typedef struct xlog_recover_item { | 37 | typedef struct xlog_recover_item { |
38 | struct xlog_recover_item *ri_next; | 38 | struct list_head ri_list; |
39 | struct xlog_recover_item *ri_prev; | 39 | int ri_type; |
40 | int ri_type; | 40 | int ri_cnt; /* count of regions found */ |
41 | int ri_cnt; /* count of regions found */ | 41 | int ri_total; /* total regions */ |
42 | int ri_total; /* total regions */ | 42 | xfs_log_iovec_t *ri_buf; /* ptr to regions buffer */ |
43 | xfs_log_iovec_t *ri_buf; /* ptr to regions buffer */ | ||
44 | } xlog_recover_item_t; | 43 | } xlog_recover_item_t; |
45 | 44 | ||
46 | struct xlog_tid; | 45 | struct xlog_tid; |
47 | typedef struct xlog_recover { | 46 | typedef struct xlog_recover { |
48 | struct xlog_recover *r_next; | 47 | struct hlist_node r_list; |
49 | xlog_tid_t r_log_tid; /* log's transaction id */ | 48 | xlog_tid_t r_log_tid; /* log's transaction id */ |
50 | xfs_trans_header_t r_theader; /* trans header for partial */ | 49 | xfs_trans_header_t r_theader; /* trans header for partial */ |
51 | int r_state; /* not needed */ | 50 | int r_state; /* not needed */ |
52 | xfs_lsn_t r_lsn; /* xact lsn */ | 51 | xfs_lsn_t r_lsn; /* xact lsn */ |
53 | xlog_recover_item_t *r_itemq; /* q for items */ | 52 | struct list_head r_itemq; /* q for items */ |
54 | } xlog_recover_t; | 53 | } xlog_recover_t; |
55 | 54 | ||
56 | #define ITEM_TYPE(i) (*(ushort *)(i)->ri_buf[0].i_addr) | 55 | #define ITEM_TYPE(i) (*(ushort *)(i)->ri_buf[0].i_addr) |