xfs
[Top] [All Lists]

Conversion Routine Help

To: xfs@xxxxxxxxxxx
Subject: Conversion Routine Help
From: Vijay Chauhan <kernel.vijay@xxxxxxxxx>
Date: Thu, 29 Dec 2011 19:42:31 +0530
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=nV6M0B4mCdUndWkfhm3EN8ZtDfJUKDPqNQfg5j6WYRk=; b=T/O+RUpwgb3Z+9S9f4U2hYUESpkrHvYH1TVFKPUSI1NIIVg9OlsN1Z/X4WKcFJO7fu 1xM1+t45I0B/o2uWdWWJm2DoNTNlnsMAZK4e4YBrDOTrOSP9Jj9clZ9iEmJtNv4Bj8t4 Wh6aN/ObsYKPrf57WaHIQfSO7M/mTkMfGa/zk=
Hi list,

Can anyone please provide me links about the basic explanations of XFS
basic blocks and filesystem logical block mapping and conversion
routines?

I tried to understand from code but its not clear to me:
#define XFS_FSB_TO_BB(mp,fsbno) ((fsbno) << (mp)->m_blkbb_log)
#define XFS_BB_TO_FSB(mp,bb)    \
       (((bb) + (XFS_FSB_TO_BB(mp,1) - 1)) >> (mp)->m_blkbb_log)
#define XFS_BB_TO_FSBT(mp,bb)   ((bb) >> (mp)->m_blkbb_log)
#define XFS_BB_FSB_OFFSET(mp,bb) ((bb) & ((mp)->m_bsize - 1))

lets consider the last one:
#define XFS_BB_FSB_OFFSET(mp,bb) ((bb) & ((mp)->m_bsize - 1))

if basic block (512 byte size) number is 7 and m_bsize is 12
(considering FS block size 4096), then this will return 3 [e.g. ( 7 &
11) ]. then what does 3 means here? what offset value it is denoting?

Thanks in advance.

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