xfs
[Top] [All Lists]

Re: [PATCH][RFC] xfs_copy: don't use DIRECT IO to copy 4k sector device

To: Zirong Lang <zlang@xxxxxxxxxx>
Subject: Re: [PATCH][RFC] xfs_copy: don't use DIRECT IO to copy 4k sector device
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Thu, 13 Aug 2015 11:54:27 -0500
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <510394920.8151266.1439484022770.JavaMail.zimbra@xxxxxxxxxx>
References: <1439478465-14072-1-git-send-email-zlang@xxxxxxxxxx> <55CCC47A.5030706@xxxxxxxxxxx> <510394920.8151266.1439484022770.JavaMail.zimbra@xxxxxxxxxx>
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

<Prev in Thread] Current Thread [Next in Thread>