]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_log_priv.h
[XFS] Kill off xfs_statvfs.
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_log_priv.h
index 9bd3cdf11a87068db1b773b5afabb2ea0a5bc913..07da6a72628a4ecca8405485dbab5ca7dd49edac 100644 (file)
@@ -30,17 +30,16 @@ struct xfs_mount;
  */
 
 #define XLOG_MIN_ICLOGS                2
-#define XLOG_MED_ICLOGS                4
 #define XLOG_MAX_ICLOGS                8
 #define XLOG_HEADER_MAGIC_NUM  0xFEEDbabe      /* Invalid cycle number */
 #define XLOG_VERSION_1         1
 #define XLOG_VERSION_2         2               /* Large IClogs, Log sunit */
 #define XLOG_VERSION_OKBITS    (XLOG_VERSION_1 | XLOG_VERSION_2)
-#define XLOG_RECORD_BSIZE      (16*1024)       /* eventually 32k */
+#define XLOG_MIN_RECORD_BSIZE  (16*1024)       /* eventually 32k */
 #define XLOG_BIG_RECORD_BSIZE  (32*1024)       /* 32k buffers */
 #define XLOG_MAX_RECORD_BSIZE  (256*1024)
 #define XLOG_HEADER_CYCLE_SIZE (32*1024)       /* cycle data in header */
-#define XLOG_RECORD_BSHIFT     14              /* 16384 == 1 << 14 */
+#define XLOG_MIN_RECORD_BSHIFT 14              /* 16384 == 1 << 14 */
 #define XLOG_BIG_RECORD_BSHIFT 15              /* 32k == 1 << 15 */
 #define XLOG_MAX_RECORD_BSHIFT 18              /* 256k == 1 << 18 */
 #define XLOG_BTOLSUNIT(log, b)  (((b)+(log)->l_mp->m_sb.sb_logsunit-1) / \
@@ -106,11 +105,6 @@ struct xfs_mount;
     ((i) >> 24)
 #endif
 
-#define GRANT_LOCK(log)                mutex_spinlock(&(log)->l_grant_lock)
-#define GRANT_UNLOCK(log, s)   mutex_spinunlock(&(log)->l_grant_lock, s)
-#define LOG_LOCK(log)          mutex_spinlock(&(log)->l_icloglock)
-#define LOG_UNLOCK(log, s)     mutex_spinunlock(&(log)->l_icloglock, s)
-
 #define xlog_panic(args...)    cmn_err(CE_PANIC, ## args)
 #define xlog_exit(args...)     cmn_err(CE_PANIC, ## args)
 #define xlog_warn(args...)     cmn_err(CE_WARN, ## args)
@@ -250,22 +244,6 @@ typedef __uint32_t xlog_tid_t;
 
 /* Ticket reservation region accounting */ 
 #define XLOG_TIC_LEN_MAX       15
-#define XLOG_TIC_RESET_RES(t) ((t)->t_res_num = \
-                               (t)->t_res_arr_sum = (t)->t_res_num_ophdrs = 0)
-#define XLOG_TIC_ADD_OPHDR(t) ((t)->t_res_num_ophdrs++)
-#define XLOG_TIC_ADD_REGION(t, len, type)                              \
-       do {                                                            \
-               if ((t)->t_res_num == XLOG_TIC_LEN_MAX) {               \
-                       /* add to overflow and start again */           \
-                       (t)->t_res_o_flow += (t)->t_res_arr_sum;        \
-                       (t)->t_res_num = 0;                             \
-                       (t)->t_res_arr_sum = 0;                         \
-               }                                                       \
-               (t)->t_res_arr[(t)->t_res_num].r_len = (len);           \
-               (t)->t_res_arr[(t)->t_res_num].r_type = (type);         \
-               (t)->t_res_arr_sum += (len);                            \
-               (t)->t_res_num++;                                       \
-       } while (0)
 
 /*
  * Reservation region
@@ -432,7 +410,7 @@ typedef struct log {
        xlog_ticket_t           *l_unmount_free;/* kmem_free these addresses */
        xlog_ticket_t           *l_tail;        /* free list of tickets */
        xlog_in_core_t          *l_iclog;       /* head log queue       */
-       lock_t                  l_icloglock;    /* grab to change iclog state */
+       spinlock_t              l_icloglock;    /* grab to change iclog state */
        xfs_lsn_t               l_tail_lsn;     /* lsn of 1st LR with unflushed
                                                 * buffers */
        xfs_lsn_t               l_last_sync_lsn;/* lsn of last LR on disk */
@@ -456,7 +434,7 @@ typedef struct log {
        char                    *l_iclog_bak[XLOG_MAX_ICLOGS];
 
        /* The following block of fields are changed while holding grant_lock */
-       lock_t                  l_grant_lock;
+       spinlock_t              l_grant_lock;
        xlog_ticket_t           *l_reserve_headq;
        xlog_ticket_t           *l_write_headq;
        int                     l_grant_reserve_cycle;