Convert /proc/device-tree/ to seq_file
[safe/jmp/linux-2.6] / fs / xfs / xfs_log_priv.h
index 7dcf11e..679c7c4 100644 (file)
@@ -245,6 +245,7 @@ typedef struct xlog_ticket {
        struct xlog_ticket *t_next;      /*                              :4|8 */
        struct xlog_ticket *t_prev;      /*                              :4|8 */
        xlog_tid_t         t_tid;        /* transaction identifier       : 4  */
+       atomic_t           t_ref;        /* ticket reference count       : 4  */
        int                t_curr_res;   /* current reservation in bytes : 4  */
        int                t_unit_res;   /* unit reservation in bytes    : 4  */
        char               t_ocnt;       /* original count               : 1  */
@@ -309,6 +310,16 @@ typedef struct xlog_rec_ext_header {
 } xlog_rec_ext_header_t;
 
 #ifdef __KERNEL__
+
+/*
+ * Quite misnamed, because this union lays out the actual on-disk log buffer.
+ */
+typedef union xlog_in_core2 {
+       xlog_rec_header_t       hic_header;
+       xlog_rec_ext_header_t   hic_xheader;
+       char                    hic_sector[XLOG_HEADER_SIZE];
+} xlog_in_core_2_t;
+
 /*
  * - A log record header is 512 bytes.  There is plenty of room to grow the
  *     xlog_rec_header_t into the reserved space.
@@ -338,7 +349,7 @@ typedef struct xlog_rec_ext_header {
  * We'll put all the read-only and l_icloglock fields in the first cacheline,
  * and move everything else out to subsequent cachelines.
  */
-typedef struct xlog_iclog_fields {
+typedef struct xlog_in_core {
        sv_t                    ic_force_wait;
        sv_t                    ic_write_wait;
        struct xlog_in_core     *ic_next;
@@ -348,7 +359,7 @@ typedef struct xlog_iclog_fields {
        int                     ic_size;
        int                     ic_offset;
        int                     ic_bwritecnt;
-       ushort_t                ic_state;
+       unsigned short          ic_state;
        char                    *ic_datap;      /* pointer to iclog data */
 #ifdef XFS_LOG_TRACE
        struct ktrace           *ic_trace;
@@ -361,41 +372,11 @@ typedef struct xlog_iclog_fields {
 
        /* reference counts need their own cacheline */
        atomic_t                ic_refcnt ____cacheline_aligned_in_smp;
-} xlog_iclog_fields_t;
-
-typedef union xlog_in_core2 {
-       xlog_rec_header_t       hic_header;
-       xlog_rec_ext_header_t   hic_xheader;
-       char                    hic_sector[XLOG_HEADER_SIZE];
-} xlog_in_core_2_t;
-
-typedef struct xlog_in_core {
-       xlog_iclog_fields_t     hic_fields;
-       xlog_in_core_2_t        *hic_data;
+       xlog_in_core_2_t        *ic_data;
+#define ic_header      ic_data->hic_header
 } xlog_in_core_t;
 
 /*
- * Defines to save our code from this glop.
- */
-#define        ic_force_wait   hic_fields.ic_force_wait
-#define ic_write_wait  hic_fields.ic_write_wait
-#define        ic_next         hic_fields.ic_next
-#define        ic_prev         hic_fields.ic_prev
-#define        ic_bp           hic_fields.ic_bp
-#define        ic_log          hic_fields.ic_log
-#define        ic_callback     hic_fields.ic_callback
-#define        ic_callback_lock hic_fields.ic_callback_lock
-#define        ic_callback_tail hic_fields.ic_callback_tail
-#define        ic_trace        hic_fields.ic_trace
-#define        ic_size         hic_fields.ic_size
-#define        ic_offset       hic_fields.ic_offset
-#define        ic_refcnt       hic_fields.ic_refcnt
-#define        ic_bwritecnt    hic_fields.ic_bwritecnt
-#define        ic_state        hic_fields.ic_state
-#define ic_datap       hic_fields.ic_datap
-#define ic_header      hic_data->hic_header
-
-/*
  * The reservation head lsn is not made up of a cycle number and block number.
  * Instead, it uses a cycle number and byte number.  Logs don't expect to
  * overflow 31 bits worth of byte offset, so using a byte number will mean
@@ -404,6 +385,7 @@ typedef struct xlog_in_core {
 typedef struct log {
        /* The following fields don't need locking */
        struct xfs_mount        *l_mp;          /* mount point */
+       struct xfs_ail          *l_ailp;        /* AIL log is working with */
        struct xfs_buf          *l_xbuf;        /* extra buffer for log
                                                 * wrapping */
        struct xfs_buftarg      *l_targ;        /* buftarg of log */
@@ -448,7 +430,6 @@ typedef struct log {
        int                     l_grant_write_bytes;
 
 #ifdef XFS_LOG_TRACE
-       struct ktrace           *l_trace;
        struct ktrace           *l_grant_trace;
 #endif
 
@@ -468,13 +449,10 @@ extern int         xlog_find_tail(xlog_t  *log,
                                xfs_daddr_t *head_blk,
                                xfs_daddr_t *tail_blk);
 extern int      xlog_recover(xlog_t *log);
-extern int      xlog_recover_finish(xlog_t *log, int mfsi_flags);
+extern int      xlog_recover_finish(xlog_t *log);
 extern void     xlog_pack_data(xlog_t *log, xlog_in_core_t *iclog, int);
-extern void     xlog_recover_process_iunlinks(xlog_t *log);
-
 extern struct xfs_buf *xlog_get_bp(xlog_t *, int);
 extern void     xlog_put_bp(struct xfs_buf *);
-extern int      xlog_bread(xlog_t *, xfs_daddr_t, int, struct xfs_buf *);
 
 extern kmem_zone_t     *xfs_log_ticket_zone;