[PATCH 2/3] xfs_logprint: report realtime EFIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Darrick J. Wong <djwong@xxxxxxxxxx>

Decode the EFI format just enough to report if an EFI targets the
realtime device or not.

Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
---
 logprint/log_redo.c |   20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)


diff --git a/logprint/log_redo.c b/logprint/log_redo.c
index 770485df75d..8fbc19a60e9 100644
--- a/logprint/log_redo.c
+++ b/logprint/log_redo.c
@@ -113,8 +113,14 @@ xlog_print_trans_efi(
 
 	ex = f->efi_extents;
 	for (i=0; i < f->efi_nextents; i++) {
-		printf("(s: 0x%llx, l: %d) ",
-			(unsigned long long)ex->ext_start, ex->ext_len);
+		unsigned int	len;
+		int		rt;
+
+		rt = !!(ex->ext_len & XFS_EFI_EXTLEN_REALTIME_EXT);
+		len = ex->ext_len & ~XFS_EFI_EXTLEN_REALTIME_EXT;
+
+		printf("(s: 0x%llx, l: %u, rt? %d) ",
+			(unsigned long long)ex->ext_start, len, rt);
 		if (i % 4 == 3) printf("\n");
 		ex++;
 	}
@@ -160,8 +166,14 @@ xlog_recover_print_efi(
 	ex = f->efi_extents;
 	printf("	");
 	for (i=0; i< f->efi_nextents; i++) {
-		printf("(s: 0x%llx, l: %d) ",
-			(unsigned long long)ex->ext_start, ex->ext_len);
+		unsigned int	len;
+		int		rt;
+
+		rt = !!(ex->ext_len & XFS_EFI_EXTLEN_REALTIME_EXT);
+		len = ex->ext_len & ~XFS_EFI_EXTLEN_REALTIME_EXT;
+
+		printf("(s: 0x%llx, l: %u, rt? %d) ",
+			(unsigned long long)ex->ext_start, len, rt);
 		if (i % 4 == 3)
 			printf("\n");
 		ex++;




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux