Diff for /xfs-linux/xfs_log_priv.h between versions 1.124 and 1.125

version 1.124, 2007/10/02 06:14:55 version 1.125, 2007/10/02 06:15:48
Line 63  static inline xfs_lsn_t xlog_assign_lsn( Line 63  static inline xfs_lsn_t xlog_assign_lsn(
   
 static inline uint xlog_get_cycle(char *ptr)  static inline uint xlog_get_cycle(char *ptr)
 {  {
         if (INT_GET(*(uint *)ptr, ARCH_CONVERT) == XLOG_HEADER_MAGIC_NUM)          if (be32_to_cpu(*(__be32 *)ptr) == XLOG_HEADER_MAGIC_NUM)
                 return INT_GET(*((uint *)ptr + 1), ARCH_CONVERT);                  return be32_to_cpu(*((__be32 *)ptr + 1));
         else          else
                 return INT_GET(*(uint *)ptr, ARCH_CONVERT);                  return be32_to_cpu(*(__be32 *)ptr);
 }  }
   
 #define BLK_AVG(blk1, blk2)     ((blk1+blk2) >> 1)  #define BLK_AVG(blk1, blk2)     ((blk1+blk2) >> 1)
Line 85  static inline uint xlog_get_cycle(char * Line 85  static inline uint xlog_get_cycle(char *
  *   *
  * this has endian issues, of course.   * this has endian issues, of course.
  */   */
 static inline uint xlog_get_client_id(uint i)  static inline uint xlog_get_client_id(__be32 i)
 {  {
         return INT_GET(i, ARCH_CONVERT) >> 24;          return be32_to_cpu(i) >> 24;
 }  }
   
 #define xlog_panic(args...)     cmn_err(CE_PANIC, ## args)  #define xlog_panic(args...)     cmn_err(CE_PANIC, ## args)
Line 287  typedef struct xlog_op_header { Line 287  typedef struct xlog_op_header {
 #endif  #endif
   
 typedef struct xlog_rec_header {  typedef struct xlog_rec_header {
         uint      h_magicno;    /* log record (LR) identifier           :  4 */          __be32    h_magicno;    /* log record (LR) identifier           :  4 */
         uint      h_cycle;      /* write cycle of log                   :  4 */          __be32    h_cycle;      /* write cycle of log                   :  4 */
         int       h_version;    /* LR version                           :  4 */          __be32    h_version;    /* LR version                           :  4 */
         int       h_len;        /* len in bytes; should be 64-bit aligned: 4 */          __be32    h_len;        /* len in bytes; should be 64-bit aligned: 4 */
         xfs_lsn_t h_lsn;        /* lsn of this LR                       :  8 */          __be64    h_lsn;        /* lsn of this LR                       :  8 */
         xfs_lsn_t h_tail_lsn;   /* lsn of 1st LR w/ buffers not committed: 8 */          __be64    h_tail_lsn;   /* lsn of 1st LR w/ buffers not committed: 8 */
         uint      h_chksum;     /* may not be used; non-zero if used    :  4 */          __be32    h_chksum;     /* may not be used; non-zero if used    :  4 */
         int       h_prev_block; /* block number to previous LR          :  4 */          __be32    h_prev_block; /* block number to previous LR          :  4 */
         int       h_num_logops; /* number of log operations in this LR  :  4 */          __be32    h_num_logops; /* number of log operations in this LR  :  4 */
         uint      h_cycle_data[XLOG_HEADER_CYCLE_SIZE / BBSIZE];          __be32    h_cycle_data[XLOG_HEADER_CYCLE_SIZE / BBSIZE];
         /* new fields */          /* new fields */
         int       h_fmt;        /* format of log record                 :  4 */          __be32    h_fmt;        /* format of log record                 :  4 */
         uuid_t    h_fs_uuid;    /* uuid of FS                           : 16 */          uuid_t    h_fs_uuid;    /* uuid of FS                           : 16 */
         int       h_size;       /* iclog size                           :  4 */          __be32    h_size;       /* iclog size                           :  4 */
 } xlog_rec_header_t;  } xlog_rec_header_t;
   
 typedef struct xlog_rec_ext_header {  typedef struct xlog_rec_ext_header {
         uint      xh_cycle;     /* write cycle of log                   : 4 */          __be32    xh_cycle;     /* write cycle of log                   : 4 */
         uint      xh_cycle_data[XLOG_HEADER_CYCLE_SIZE / BBSIZE]; /*    : 256 */          __be32    xh_cycle_data[XLOG_HEADER_CYCLE_SIZE / BBSIZE]; /*    : 256 */
 } xlog_rec_ext_header_t;  } xlog_rec_ext_header_t;
   
 #ifdef __KERNEL__  #ifdef __KERNEL__

Removed from v.1.124  
changed lines
  Added in v.1.125


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>