All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Gao Xiang <hsiangkao@redhat.com>, linux-xfs@vger.kernel.org
Cc: "Darrick J. Wong" <darrick.wong@oracle.com>,
	Eric Sandeen <sandeen@redhat.com>
Subject: Re: [PATCH v2 1/2] xfsdump: Revert "xfsdump: handle bind mount targets"
Date: Thu, 3 Jun 2021 15:29:53 -0500	[thread overview]
Message-ID: <04428916-1fdc-0958-2ead-8d10fca7f82c@sandeen.net> (raw)
In-Reply-To: <20201103023315.786103-1-hsiangkao@redhat.com>

On 11/2/20 8:33 PM, Gao Xiang wrote:
> Bind mount mntpnts will be forbided in the next commits
> instead since it's not the real rootdir.
> 
> This cannot be reverted cleanly due to several cleanup
> patches, but the logic is reverted equivalently.
> 
> This reverts commit 25195ebf107dc81b1b7cea1476764950e1d6cc9d.
> 
> Fixes: 25195ebf107d ("xfsdump: handle bind mount targets")
> Cc: Eric Sandeen <sandeen@redhat.com>
> Signed-off-by: Gao Xiang <hsiangkao@redhat.com>

Sorry this is so ridiculously late:

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  dump/content.c | 21 ++-------------------
>  1 file changed, 2 insertions(+), 19 deletions(-)
> 
> diff --git a/dump/content.c b/dump/content.c
> index 30232d4..c11d9b4 100644
> --- a/dump/content.c
> +++ b/dump/content.c
> @@ -1382,17 +1382,10 @@ baseuuidbypass:
>  	}
>  
>  	/* figure out the ino for the root directory of the fs
> -	 * and get its struct xfs_bstat for inomap_build().  This could
> -	 * be a bind mount; don't ask for the mount point inode,
> -	 * find the actual lowest inode number in the filesystem.
> +	 * and get its xfs_bstat_t for inomap_build()
>  	 */
>  	{
>  		stat64_t rootstat;
> -		xfs_ino_t lastino = 0;
> -		int ocount = 0;
> -		struct xfs_fsop_bulkreq bulkreq;
> -
> -		/* Get the inode of the mount point */
>  		rval = fstat64(sc_fsfd, &rootstat);
>  		if (rval) {
>  			mlog(MLOG_NORMAL, _(
> @@ -1404,21 +1397,11 @@ baseuuidbypass:
>  			(struct xfs_bstat *)calloc(1, sizeof(struct xfs_bstat));
>  		assert(sc_rootxfsstatp);
>  
> -		/* Get the first valid (i.e. root) inode in this fs */
> -		bulkreq.lastip = (__u64 *)&lastino;
> -		bulkreq.icount = 1;
> -		bulkreq.ubuffer = sc_rootxfsstatp;
> -		bulkreq.ocount = &ocount;
> -		if (ioctl(sc_fsfd, XFS_IOC_FSBULKSTAT, &bulkreq) < 0) {
> +		if (bigstat_one(sc_fsfd, rootstat.st_ino, sc_rootxfsstatp) < 0) {
>  			mlog(MLOG_ERROR,
>  			      _("failed to get bulkstat information for root inode\n"));
>  			return BOOL_FALSE;
>  		}
> -
> -		if (sc_rootxfsstatp->bs_ino != rootstat.st_ino)
> -			mlog (MLOG_NORMAL | MLOG_NOTE,
> -			       _("root ino %lld differs from mount dir ino %lld, bind mount?\n"),
> -			         sc_rootxfsstatp->bs_ino, rootstat.st_ino);
>  	}
>  
>  	/* alloc a file system handle, to be used with the jdm_open()
> 

  parent reply	other threads:[~2021-06-03 20:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03  2:33 [PATCH v2 1/2] xfsdump: Revert "xfsdump: handle bind mount targets" Gao Xiang
2020-11-03  2:33 ` [PATCH v2 2/2] xfsdump: intercept bind mount targets Gao Xiang
2020-11-03 15:03   ` Eric Sandeen
2020-11-03 15:18     ` Gao Xiang
2020-11-03 15:33   ` [PATCH v3 " Gao Xiang
2021-06-03 20:53     ` Eric Sandeen
2021-09-27 15:07     ` Bill O'Donnell
2021-12-20 16:01     ` Masayoshi Mizuma
2021-12-20 19:58       ` Eric Sandeen
2021-06-03 20:29 ` Eric Sandeen [this message]
2021-09-27 15:05 ` [PATCH v2 1/2] xfsdump: Revert "xfsdump: handle bind mount targets" Bill O'Donnell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=04428916-1fdc-0958-2ead-8d10fca7f82c@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=darrick.wong@oracle.com \
    --cc=hsiangkao@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.