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 > _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs