Blame SOURCES/0001-xfsdump-Revert-xfsdump-handle-bind-mount-targets.patch

f39c93
From 3b71c7f1f5a1dd45712d7de1139290d0a8cf03c4 Mon Sep 17 00:00:00 2001
f39c93
From: Gao Xiang <hsiangkao@redhat.com>
f39c93
Date: Thu, 3 Feb 2022 12:42:30 -0500
f39c93
Subject: [PATCH 1/2] xfsdump: Revert "xfsdump: handle bind mount targets"
f39c93
f39c93
Bind mount mntpnts will be forbided in the next commits
f39c93
instead since it's not the real rootdir.
f39c93
f39c93
This cannot be reverted cleanly due to several cleanup
f39c93
patches, but the logic is reverted equivalently.
f39c93
f39c93
This reverts commit 25195ebf107dc81b1b7cea1476764950e1d6cc9d.
f39c93
f39c93
Fixes: 25195ebf107d ("xfsdump: handle bind mount targets")
f39c93
Cc: Eric Sandeen <sandeen@redhat.com>
f39c93
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
f39c93
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
f39c93
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
f39c93
---
f39c93
f39c93
Index: xfsdump-3.1.8/dump/content.c
f39c93
===================================================================
f39c93
--- xfsdump-3.1.8.orig/dump/content.c
f39c93
+++ xfsdump-3.1.8/dump/content.c
f39c93
@@ -1382,17 +1382,11 @@ baseuuidbypass:
f39c93
 	}
f39c93
 
f39c93
 	/* figure out the ino for the root directory of the fs
f39c93
-	 * and get its xfs_bstat_t for inomap_build().  This could
f39c93
-	 * be a bind mount; don't ask for the mount point inode,
f39c93
-	 * find the actual lowest inode number in the filesystem.
f39c93
+	 * and get its xfs_bstat_t for inomap_build()
f39c93
 	 */
f39c93
 	{
f39c93
 		stat64_t rootstat;
f39c93
-		xfs_ino_t lastino = 0;
f39c93
-		int ocount = 0;
f39c93
-		xfs_fsop_bulkreq_t bulkreq;
f39c93
 
f39c93
-		/* Get the inode of the mount point */
f39c93
 		rval = fstat64( sc_fsfd, &rootstat );
f39c93
 		if ( rval ) {
f39c93
 			mlog( MLOG_NORMAL, _(
f39c93
@@ -1404,21 +1398,11 @@ baseuuidbypass:
f39c93
 			( xfs_bstat_t * )calloc( 1, sizeof( xfs_bstat_t ));
f39c93
 		assert( sc_rootxfsstatp );
f39c93
 
f39c93
-		/* Get the first valid (i.e. root) inode in this fs */
f39c93
-		bulkreq.lastip = (__u64 *)&lastino;
f39c93
-		bulkreq.icount = 1;
f39c93
-		bulkreq.ubuffer = sc_rootxfsstatp;
f39c93
-		bulkreq.ocount = &ocount;
f39c93
-		if (ioctl(sc_fsfd, XFS_IOC_FSBULKSTAT, &bulkreq) < 0) {
f39c93
+		if (bigstat_one(sc_fsfd, rootstat.st_ino, sc_rootxfsstatp) < 0) {
f39c93
 			mlog( MLOG_ERROR,
f39c93
 			      _("failed to get bulkstat information for root inode\n"));
f39c93
 			return BOOL_FALSE;
f39c93
 		}
f39c93
-
f39c93
-		if (sc_rootxfsstatp->bs_ino != rootstat.st_ino)
f39c93
-			mlog ( MLOG_NORMAL | MLOG_NOTE,
f39c93
-			       _("root ino %lld differs from mount dir ino %lld, bind mount?\n"),
f39c93
-			         sc_rootxfsstatp->bs_ino, rootstat.st_ino);
f39c93
 	}
f39c93
 	
f39c93
 	/* alloc a file system handle, to be used with the jdm_open()