On 8/13/15 11:40 AM, Zirong Lang wrote: > > > ----- 原始邮件 ----- >> 发件人: "Eric Sandeen" <sandeen@xxxxxxxxxxx> >> 收件人: "Zorro Lang" <zlang@xxxxxxxxxx>, xfs@xxxxxxxxxxx >> 发送时间: 星期五, 2015年 8 月 14日 上午 12:23:22 >> 主题: Re: [PATCH][RFC] xfs_copy: don't use DIRECT IO to copy 4k sector device >> >> On 8/13/15 10:07 AM, Zorro Lang wrote: >>> When I run xfstests xfs/032 in ppc64le, I hit a failure: >>> >>> xfs_copy: read failed: Invalid argument >>> xfs_copy: size check failed >>> xfs_copy: /dev/sda5 filesystem failed to initialize >>> xfs_copy: Aborting. >>> Copy failed for Sector size 4096 Block size 4096 >>> >>> I try to use gdb trace xfs_copy. I find it try to open the >>> source device with DIRECT flag, then read the device with >>> ((1<<BBSHIFT))=512 bytes length. If the source device is >>> 4k sector, directly read 512 bytes will be failed. >>> >>> xfs_copy '-b' option only work for target file/device, to >>> sure it will open the target without DIRECT flag. But useless >>> for source device open. >>> >>> So I make DIRECT flag only be enabled when source device >>> sector size equal BBSIZE. >> >> Which version of xfsprogs did you test? This is recently upstream: > > Sorry I didn't notice that you have fix this problem. I test on the > newest version from git://oss.sgi.com/xfs/cmds/xfsprogs, it haven't > fix this problem. I test this patch on it at first. Then I find > there is another version in git://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git > > I don't know they are too different, so I didn't check if this xfsprogs-dev has > fixed it, and just did this patch on it and send out. > > Sorry for this mistake, and your patch is really better:) No problem, thanks for looking into it! I'm not sure why the sgi git tree is a bit behind right now. -Eric _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs