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