From: Brian Foster <bfoster@redhat.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfs_copy: fix copy of hard 4k devices
Date: Fri, 19 Jun 2015 09:19:46 -0400 [thread overview]
Message-ID: <20150619131945.GB12833@bfoster.bfoster> (raw)
In-Reply-To: <5581C962.7020200@redhat.com>
On Wed, Jun 17, 2015 at 02:24:18PM -0500, Eric Sandeen wrote:
> If we have a pure 4k device with no 512 emulation, xfs_copy
> fails straightaway because it tries to do a 512-byte direct
> IO read of the superblock.
>
> Do like we do in xfs_db, and read in the max possible sector size,
> because we don't yet know what the filesystem's sector size is.
>
> This fixes a failure in xfs/032 on a hard 4k device.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
Reviewed-by: Brian Foster <bfoster@redhat.com>
>
> diff --git a/copy/xfs_copy.c b/copy/xfs_copy.c
> index 279527c..b39c84d 100644
> --- a/copy/xfs_copy.c
> +++ b/copy/xfs_copy.c
> @@ -654,8 +654,9 @@ main(int argc, char **argv)
>
> memset(&mbuf, 0, sizeof(xfs_mount_t));
> libxfs_buftarg_init(&mbuf, xargs.ddev, xargs.logdev, xargs.rtdev);
> - sbp = libxfs_readbuf(mbuf.m_ddev_targp, XFS_SB_DADDR, 1, 0,
> - &xfs_sb_buf_ops);
> + sbp = libxfs_readbuf(mbuf.m_ddev_targp, XFS_SB_DADDR,
> + 1 << (XFS_MAX_SECTORSIZE_LOG - BBSHIFT),
> + 0, &xfs_sb_buf_ops);
> sb = &mbuf.m_sb;
> libxfs_sb_from_disk(sb, XFS_BUF_TO_SBP(sbp));
>
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2015-06-19 13:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-17 19:24 [PATCH] xfs_copy: fix copy of hard 4k devices Eric Sandeen
2015-06-19 13:19 ` Brian Foster [this message]
2015-06-19 15:07 ` Christoph Hellwig
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=20150619131945.GB12833@bfoster.bfoster \
--to=bfoster@redhat.com \
--cc=sandeen@redhat.com \
--cc=xfs@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox