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
|