xfs
[Top] [All Lists]

Re: Cyclic Code?

To: Adil Mujeeb <mujeeb.adil@xxxxxxxxx>
Subject: Re: Cyclic Code?
From: Amit Sahrawat <amit.sahrawat83@xxxxxxxxx>
Date: Mon, 9 Jan 2012 23:10:30 +0530
Cc: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=QCr3lDES4m79sZ0np2wv4VZIcb+yz3AXPEZbVV/ecrU=; b=D0zo2P04+LcZkILb3LdyW1RxtVq3KjBwWTARx+KX9owV2qO0d12i60AI6SVGtHT2OH 6uQxRpQ+WffIv2azKhcSrW3I4BtiCMfWgVC8ORiU85xZiHBcjaLy8rajpwJv+Nho1RE0 I0Qtkfgo8Eip0ikfUgUMsgK+sZDPfZAHS3lAo=
In-reply-to: <CANBXnM=Ec4zp-5AR3JY00taUR+W-G6+ZKJKhDj94uhpeVsp2tw@xxxxxxxxxxxxxx>
References: <CANBXnM=Ec4zp-5AR3JY00taUR+W-G6+ZKJKhDj94uhpeVsp2tw@xxxxxxxxxxxxxx>
On Mon, Jan 9, 2012 at 12:22 PM, Adil Mujeeb <mujeeb.adil@xxxxxxxxx> wrote:
> Hi list,
>
> i am new to XFS.
>
> I was going through XFS code (2.4 based) for study purpose. Its old but
> assuming its bit simple as compare to latest one. Moreover the XFS code /
> design structure documents available on the internet is 2.4 based.
May be if you switch to a version around 2.6.20 nearabout - it will
make it easier to understand the code. Prior to that the complete XFS
source code seemed like traversing through a lot of macros... I
started with 2.6.18 and it was really hard to understand from that
version...
>
> The following code snippet is not clear to me (seems cyclic):
>
> ---------
> ...
> ...
> #define XFS_IFORK_NEXTENTS(ip,w)        xfs_ifork_nextents(ip,w)
> ...
> xfs_ifork_nextents(xfs_inode_t *ip, int w)
> {
>         return XFS_IFORK_NEXTENTS(ip, w);
> }
I guess you missed something while reading the code.... I tried to
look at the repositry.. this is how the code looks...
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IFORK_NEXTENTS)      
 int xfs_ifork_nextents(xfs_inode_t *ip, int w);        
 #define XFS_IFORK_NEXTENTS(ip,w)        xfs_ifork_nextents(ip,w)       
 #else  
 #define XFS_IFORK_NEXTENTS(ip,w)        XFS_CFORK_NEXTENTS(&ip->i_d, w)        
 #endif
....
#define XFS_CFORK_NEXTENTS(dcp,w) \
        ((w) == XFS_DATA_FORK ? (dcp)->di_nextents : (dcp)->di_anextents)

Regards,
Amit Sahrawat
> ...
> ...
> #define XFS_IFORK_NEXTENTS(ip,w)        XFS_CFORK_NEXTENTS(&ip->i_d, w)
> ...
> #define XFS_CFORK_NEXTENTS(dcp,w)            xfs_cfork_nextents(dcp,w)
> ...
> int
> xfs_cfork_nextents(xfs_dinode_core_t *dcp, int w)
> {
>         return XFS_CFORK_NEXTENTS(dcp, w);
> }
> ----
>
> Am i missing something?
> Thanks,
> Adil
>
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs
>

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