diff options
Diffstat (limited to 'fs/xfs/libxfs/xfs_log_format.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_log_format.h | 63 |
1 files changed, 61 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_log_format.h b/fs/xfs/libxfs/xfs_log_format.h index e8f49c029ff0..a6eed43fa7cd 100644 --- a/fs/xfs/libxfs/xfs_log_format.h +++ b/fs/xfs/libxfs/xfs_log_format.h | |||
@@ -110,7 +110,9 @@ static inline uint xlog_get_cycle(char *ptr) | |||
110 | #define XLOG_REG_TYPE_COMMIT 18 | 110 | #define XLOG_REG_TYPE_COMMIT 18 |
111 | #define XLOG_REG_TYPE_TRANSHDR 19 | 111 | #define XLOG_REG_TYPE_TRANSHDR 19 |
112 | #define XLOG_REG_TYPE_ICREATE 20 | 112 | #define XLOG_REG_TYPE_ICREATE 20 |
113 | #define XLOG_REG_TYPE_MAX 20 | 113 | #define XLOG_REG_TYPE_RUI_FORMAT 21 |
114 | #define XLOG_REG_TYPE_RUD_FORMAT 22 | ||
115 | #define XLOG_REG_TYPE_MAX 22 | ||
114 | 116 | ||
115 | /* | 117 | /* |
116 | * Flags to log operation header | 118 | * Flags to log operation header |
@@ -227,6 +229,8 @@ typedef struct xfs_trans_header { | |||
227 | #define XFS_LI_DQUOT 0x123d | 229 | #define XFS_LI_DQUOT 0x123d |
228 | #define XFS_LI_QUOTAOFF 0x123e | 230 | #define XFS_LI_QUOTAOFF 0x123e |
229 | #define XFS_LI_ICREATE 0x123f | 231 | #define XFS_LI_ICREATE 0x123f |
232 | #define XFS_LI_RUI 0x1240 /* rmap update intent */ | ||
233 | #define XFS_LI_RUD 0x1241 | ||
230 | 234 | ||
231 | #define XFS_LI_TYPE_DESC \ | 235 | #define XFS_LI_TYPE_DESC \ |
232 | { XFS_LI_EFI, "XFS_LI_EFI" }, \ | 236 | { XFS_LI_EFI, "XFS_LI_EFI" }, \ |
@@ -236,7 +240,9 @@ typedef struct xfs_trans_header { | |||
236 | { XFS_LI_BUF, "XFS_LI_BUF" }, \ | 240 | { XFS_LI_BUF, "XFS_LI_BUF" }, \ |
237 | { XFS_LI_DQUOT, "XFS_LI_DQUOT" }, \ | 241 | { XFS_LI_DQUOT, "XFS_LI_DQUOT" }, \ |
238 | { XFS_LI_QUOTAOFF, "XFS_LI_QUOTAOFF" }, \ | 242 | { XFS_LI_QUOTAOFF, "XFS_LI_QUOTAOFF" }, \ |
239 | { XFS_LI_ICREATE, "XFS_LI_ICREATE" } | 243 | { XFS_LI_ICREATE, "XFS_LI_ICREATE" }, \ |
244 | { XFS_LI_RUI, "XFS_LI_RUI" }, \ | ||
245 | { XFS_LI_RUD, "XFS_LI_RUD" } | ||
240 | 246 | ||
241 | /* | 247 | /* |
242 | * Inode Log Item Format definitions. | 248 | * Inode Log Item Format definitions. |
@@ -604,6 +610,59 @@ typedef struct xfs_efd_log_format_64 { | |||
604 | } xfs_efd_log_format_64_t; | 610 | } xfs_efd_log_format_64_t; |
605 | 611 | ||
606 | /* | 612 | /* |
613 | * RUI/RUD (reverse mapping) log format definitions | ||
614 | */ | ||
615 | struct xfs_map_extent { | ||
616 | __uint64_t me_owner; | ||
617 | __uint64_t me_startblock; | ||
618 | __uint64_t me_startoff; | ||
619 | __uint32_t me_len; | ||
620 | __uint32_t me_flags; | ||
621 | }; | ||
622 | |||
623 | /* rmap me_flags: upper bits are flags, lower byte is type code */ | ||
624 | #define XFS_RMAP_EXTENT_MAP 1 | ||
625 | #define XFS_RMAP_EXTENT_UNMAP 3 | ||
626 | #define XFS_RMAP_EXTENT_CONVERT 5 | ||
627 | #define XFS_RMAP_EXTENT_ALLOC 7 | ||
628 | #define XFS_RMAP_EXTENT_FREE 8 | ||
629 | #define XFS_RMAP_EXTENT_TYPE_MASK 0xFF | ||
630 | |||
631 | #define XFS_RMAP_EXTENT_ATTR_FORK (1U << 31) | ||
632 | #define XFS_RMAP_EXTENT_BMBT_BLOCK (1U << 30) | ||
633 | #define XFS_RMAP_EXTENT_UNWRITTEN (1U << 29) | ||
634 | |||
635 | #define XFS_RMAP_EXTENT_FLAGS (XFS_RMAP_EXTENT_TYPE_MASK | \ | ||
636 | XFS_RMAP_EXTENT_ATTR_FORK | \ | ||
637 | XFS_RMAP_EXTENT_BMBT_BLOCK | \ | ||
638 | XFS_RMAP_EXTENT_UNWRITTEN) | ||
639 | |||
640 | /* | ||
641 | * This is the structure used to lay out an rui log item in the | ||
642 | * log. The rui_extents field is a variable size array whose | ||
643 | * size is given by rui_nextents. | ||
644 | */ | ||
645 | struct xfs_rui_log_format { | ||
646 | __uint16_t rui_type; /* rui log item type */ | ||
647 | __uint16_t rui_size; /* size of this item */ | ||
648 | __uint32_t rui_nextents; /* # extents to free */ | ||
649 | __uint64_t rui_id; /* rui identifier */ | ||
650 | struct xfs_map_extent rui_extents[1]; /* array of extents to rmap */ | ||
651 | }; | ||
652 | |||
653 | /* | ||
654 | * This is the structure used to lay out an rud log item in the | ||
655 | * log. The rud_extents array is a variable size array whose | ||
656 | * size is given by rud_nextents; | ||
657 | */ | ||
658 | struct xfs_rud_log_format { | ||
659 | __uint16_t rud_type; /* rud log item type */ | ||
660 | __uint16_t rud_size; /* size of this item */ | ||
661 | __uint32_t __pad; | ||
662 | __uint64_t rud_rui_id; /* id of corresponding rui */ | ||
663 | }; | ||
664 | |||
665 | /* | ||
607 | * Dquot Log format definitions. | 666 | * Dquot Log format definitions. |
608 | * | 667 | * |
609 | * The first two fields must be the type and size fitting into | 668 | * The first two fields must be the type and size fitting into |