aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log_format.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_log_format.h')
-rw-r--r--fs/xfs/xfs_log_format.h83
1 files changed, 83 insertions, 0 deletions
diff --git a/fs/xfs/xfs_log_format.h b/fs/xfs/xfs_log_format.h
index 77a6024d1180..d1e93d38bd39 100644
--- a/fs/xfs/xfs_log_format.h
+++ b/fs/xfs/xfs_log_format.h
@@ -461,4 +461,87 @@ xfs_blft_from_flags(struct xfs_buf_log_format *blf)
461 return (blf->blf_flags & XFS_BLFT_MASK) >> XFS_BLFT_SHIFT; 461 return (blf->blf_flags & XFS_BLFT_MASK) >> XFS_BLFT_SHIFT;
462} 462}
463 463
464/*
465 * EFI/EFD log format definitions
466 */
467typedef struct xfs_extent {
468 xfs_dfsbno_t ext_start;
469 xfs_extlen_t ext_len;
470} xfs_extent_t;
471
472/*
473 * Since an xfs_extent_t has types (start:64, len: 32)
474 * there are different alignments on 32 bit and 64 bit kernels.
475 * So we provide the different variants for use by a
476 * conversion routine.
477 */
478typedef struct xfs_extent_32 {
479 __uint64_t ext_start;
480 __uint32_t ext_len;
481} __attribute__((packed)) xfs_extent_32_t;
482
483typedef struct xfs_extent_64 {
484 __uint64_t ext_start;
485 __uint32_t ext_len;
486 __uint32_t ext_pad;
487} xfs_extent_64_t;
488
489/*
490 * This is the structure used to lay out an efi log item in the
491 * log. The efi_extents field is a variable size array whose
492 * size is given by efi_nextents.
493 */
494typedef struct xfs_efi_log_format {
495 __uint16_t efi_type; /* efi log item type */
496 __uint16_t efi_size; /* size of this item */
497 __uint32_t efi_nextents; /* # extents to free */
498 __uint64_t efi_id; /* efi identifier */
499 xfs_extent_t efi_extents[1]; /* array of extents to free */
500} xfs_efi_log_format_t;
501
502typedef struct xfs_efi_log_format_32 {
503 __uint16_t efi_type; /* efi log item type */
504 __uint16_t efi_size; /* size of this item */
505 __uint32_t efi_nextents; /* # extents to free */
506 __uint64_t efi_id; /* efi identifier */
507 xfs_extent_32_t efi_extents[1]; /* array of extents to free */
508} __attribute__((packed)) xfs_efi_log_format_32_t;
509
510typedef struct xfs_efi_log_format_64 {
511 __uint16_t efi_type; /* efi log item type */
512 __uint16_t efi_size; /* size of this item */
513 __uint32_t efi_nextents; /* # extents to free */
514 __uint64_t efi_id; /* efi identifier */
515 xfs_extent_64_t efi_extents[1]; /* array of extents to free */
516} xfs_efi_log_format_64_t;
517
518/*
519 * This is the structure used to lay out an efd log item in the
520 * log. The efd_extents array is a variable size array whose
521 * size is given by efd_nextents;
522 */
523typedef struct xfs_efd_log_format {
524 __uint16_t efd_type; /* efd log item type */
525 __uint16_t efd_size; /* size of this item */
526 __uint32_t efd_nextents; /* # of extents freed */
527 __uint64_t efd_efi_id; /* id of corresponding efi */
528 xfs_extent_t efd_extents[1]; /* array of extents freed */
529} xfs_efd_log_format_t;
530
531typedef struct xfs_efd_log_format_32 {
532 __uint16_t efd_type; /* efd log item type */
533 __uint16_t efd_size; /* size of this item */
534 __uint32_t efd_nextents; /* # of extents freed */
535 __uint64_t efd_efi_id; /* id of corresponding efi */
536 xfs_extent_32_t efd_extents[1]; /* array of extents freed */
537} __attribute__((packed)) xfs_efd_log_format_32_t;
538
539typedef struct xfs_efd_log_format_64 {
540 __uint16_t efd_type; /* efd log item type */
541 __uint16_t efd_size; /* size of this item */
542 __uint32_t efd_nextents; /* # of extents freed */
543 __uint64_t efd_efi_id; /* id of corresponding efi */
544 xfs_extent_64_t efd_extents[1]; /* array of extents freed */
545} xfs_efd_log_format_64_t;
546
464#endif /* __XFS_LOG_FORMAT_H__ */ 547#endif /* __XFS_LOG_FORMAT_H__ */