xfs
[Top] [All Lists]

Re: 128 bits extent bmap for file format 2

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: 128 bits extent bmap for file format 2
From: Pradeep Kumar <praks411@xxxxxxxxx>
Date: Tue, 22 Oct 2013 10:08:09 +0200
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=OdN9FENFOetc2vpVaSitjOmq9TApL/6SB1rSkvQVXFo=; b=PpeOOUzIPz3RSn0BNeSpPT7aK3+7w2wVBtwCJpa3xmradt2LKI4GpcQwLp6DdygVgo VwhwC0TYuqPxnxfpB2KWBQZtsvJx2BK+EurwTL+9QUUgUqZWNsrmxSaLbSoepQJIq0DI UGuih9lpyQc8KrCREsFrLCUaQimD5lpWjBhUyKcES8hfb3F2UE1OiPtSC1S+plWqxhId kWRA4fcj3AOiFEDhq4E3jb7d4rAQWMYVebs9ZYThdRFcnbSA+fHkghukOWlpmm5yt9Jw hIGPDxA4nQcgzenNz3tYIE7bB72b7xvOQl1/tP/u/qIMds3mRdCEpUz/FM4CewpLOyCa 4T2Q==
In-reply-to: <20131022001218.GH4446@dastard>
References: <CAPU9cc3rV+E79HBE95=nsjgoC5=s85jBBZgcxL+d8KijVa0LyA@xxxxxxxxxxxxxx> <20131022001218.GH4446@dastard>
Hi Dave,

Thanks for the reply. I think I may get my solution. Can you explain the difference between the two?
I've created sample xfs file using mkfs.xfs with mostly default parameter 
1. Sector Size = 512
2. Block size = 4096
3. AG Number = 2
4. Number of blocks per AG = 6400.

So when I get absolute block 9420 from file extent data  I'm going to (6400 + 3020) , 3020 block of second AG which is wrong. The file start from 7628 absolute block or (6400 + 1228), 1228 block of second AG. 
Please describe in some detail above the conversion which you are talking about.

Thanks and Regards,
Pradeep



On 22 October 2013 02:12, Dave Chinner <david@xxxxxxxxxxxxx> wrote:
On Tue, Oct 22, 2013 at 01:32:22AM +0200, Pradeep Kumar wrote:
> Hi,
>
> I'm writing a small utility to parse XFS fs image on windows.
> I'm able to fetch the files in the first AG (0).
> However when it comes to the files which are in different AG I'm facing
> some problem in parsing extent bmap 128bits data of file inode (format ==
> 2).

Extents use filesystem block encodings, not disk addresses. Look up
the macros XFS_DADDR_TO_FSB and XFS_FSB_TO_DADDR.

Cheers,

Dave.
--
Dave Chinner
david@xxxxxxxxxxxxx

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