|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 13:25:04 +0200|
|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=10Bcz0MU3YSYjQdlWRiOh8E/BCz0oDJdO4eJU9D/VOs=; b=fVj7Hu27Z3+viwhI0mcMFBpqwNcoQjUxYWf/XAGLb+XxIkCOXOH6NnT3LwR0SnTv9d +SnJyifqwgH/7tBSgHmP968NC+SzgtY0VOzEMM1l6KVpIjJPWpRp+3q/y20+50cTL6ol pMR7sunP26R6S03f47eRsD0fBmmrOX+Oym7Vyngr+YSu3pnMpPWBouqc1ciaaYrm4Uqq t5z/IMEXfDSznzbLmSthEpsr0IC0i5Cc3dm3tR7fmKHnIYZkg6m9whIp/hB0X1f1msbl BQRHXwtl9G+vifx5nDSWf7U/oX57WSmFaecGkV2m4UCfzrMOUy8RwGOGJs/Rpm52ChvL GpYg==|
|References:||<CAPU9cc3rV+E79HBE95=nsjgoC5=s85jBBZgcxL+d8KijVa0LyA@xxxxxxxxxxxxxx> <20131022001218.GH4446@dastard> <CAPU9cc2EsoeNE+mMQSwmLVXyyPoE9jLVhDRcQLJxvWYTNU-33w@xxxxxxxxxxxxxx>|
I was able to resolve the issue. This was indeed related to conversion between FSB to actual data block in image file. I would like to thanks Dave for showing the direction.
So to summarize the extent data (128 bits, format =2) gives absolute block number which is in term of XFS file system block this need to be converted into actual disk block.
I've used two macros for it.
1. #define XFS_FSB_TO_AGNO(mp,fsbno)
First one give the actual AG number and the second one gives the block number in that AG.
Now coming back to my previous example which I posted
My extent data was.
00 00 00 00 00 00 00 00 00 00 00 04 99 80 00 01 (LSB)
After unpacking, absolute block number = 9420 (0x24cc).
Converting to actual data block using above two macros gives me AG No. = 1, AG Block No = 1228. So final block (1*6400 + 1228 = 7628) which is correct.(I was able to get correct file contents)
Please let me know if above computation is correct. It seems correct to me as I'm able to retrieve all the files.
Still I couldn't get two macros.
I couldn't find m_sectbb_log and m_blkbb_log fields. Please someone share more knowledge on above
macros like where they are used and also description of input and output field
Thanks and Regards,
On 22 October 2013 10:08, Pradeep Kumar <praks411@xxxxxxxxx> wrote:
|<Prev in Thread]||Current Thread||[Next in Thread>|
|Previous by Date:||Re: [PATCH] xfs: fix possible NULL dereference, Geyslan GregÃrio Bem|
|Next by Date:||[PATCH] xfstests: tests/generic: added -P option to df, Stanislav Kholmanskikh|
|Previous by Thread:||Re: 128 bits extent bmap for file format 2, Pradeep Kumar|
|Next by Thread:||Re: 128 bits extent bmap for file format 2, Eric Sandeen|
|Indexes:||[Date] [Thread] [Top] [All Lists]|