|
@@ -20,23 +20,6 @@
|
|
|
|
|
|
extern kmem_zone_t *xfs_buf_item_zone;
|
|
|
|
|
|
-/*
|
|
|
- * This is the structure used to lay out a buf log item in the
|
|
|
- * log. The data map describes which 128 byte chunks of the buffer
|
|
|
- * have been logged.
|
|
|
- * For 6.2 and beyond, this is XFS_LI_BUF. We use this to log everything.
|
|
|
- */
|
|
|
-typedef struct xfs_buf_log_format {
|
|
|
- unsigned short blf_type; /* buf log item type indicator */
|
|
|
- unsigned short blf_size; /* size of this item */
|
|
|
- ushort blf_flags; /* misc state */
|
|
|
- ushort blf_len; /* number of blocks in this buf */
|
|
|
- __int64_t blf_blkno; /* starting blkno of this buf */
|
|
|
- unsigned int blf_map_size; /* size of data bitmap in words */
|
|
|
- unsigned int blf_data_map[1];/* variable size bitmap of */
|
|
|
- /* regions of buffer in this item */
|
|
|
-} xfs_buf_log_format_t;
|
|
|
-
|
|
|
/*
|
|
|
* This flag indicates that the buffer contains on disk inodes
|
|
|
* and requires special recovery handling.
|
|
@@ -60,6 +43,23 @@ typedef struct xfs_buf_log_format {
|
|
|
#define BIT_TO_WORD_SHIFT 5
|
|
|
#define NBWORD (NBBY * sizeof(unsigned int))
|
|
|
|
|
|
+/*
|
|
|
+ * This is the structure used to lay out a buf log item in the
|
|
|
+ * log. The data map describes which 128 byte chunks of the buffer
|
|
|
+ * have been logged.
|
|
|
+ */
|
|
|
+#define XFS_BLF_DATAMAP_SIZE ((XFS_MAX_BLOCKSIZE / XFS_BLF_CHUNK) / NBWORD)
|
|
|
+
|
|
|
+typedef struct xfs_buf_log_format {
|
|
|
+ unsigned short blf_type; /* buf log item type indicator */
|
|
|
+ unsigned short blf_size; /* size of this item */
|
|
|
+ ushort blf_flags; /* misc state */
|
|
|
+ ushort blf_len; /* number of blocks in this buf */
|
|
|
+ __int64_t blf_blkno; /* starting blkno of this buf */
|
|
|
+ unsigned int blf_map_size; /* used size of data bitmap in words */
|
|
|
+ unsigned int blf_data_map[XFS_BLF_DATAMAP_SIZE]; /* dirty bitmap */
|
|
|
+} xfs_buf_log_format_t;
|
|
|
+
|
|
|
/*
|
|
|
* buf log item flags
|
|
|
*/
|
|
@@ -102,7 +102,7 @@ typedef struct xfs_buf_log_item {
|
|
|
char *bli_orig; /* original buffer copy */
|
|
|
char *bli_logged; /* bytes logged (bitmap) */
|
|
|
#endif
|
|
|
- xfs_buf_log_format_t bli_format; /* in-log header */
|
|
|
+ struct xfs_buf_log_format bli_format; /* embedded in-log header */
|
|
|
} xfs_buf_log_item_t;
|
|
|
|
|
|
void xfs_buf_item_init(struct xfs_buf *, struct xfs_mount *);
|