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

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