xfs
[Top] [All Lists]

Re: Review: factor extracting extent size hints from the inode

To: David Chinner <dgc@xxxxxxx>
Subject: Re: Review: factor extracting extent size hints from the inode
From: Vlad Apostolov <vapo@xxxxxxx>
Date: Tue, 12 Jun 2007 15:13:26 +1000
Cc: xfs-dev <xfs-dev@xxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <20070604052333.GR85884050@xxxxxxx>
References: <20070604052333.GR85884050@xxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Thunderbird 1.5.0.10 (X11/20070221)
David Chinner wrote:
Replace frequently repeated, open coded extraction of the
extent size hint from the xfs_inode with a single helper
function.

Cheers,

Dave.
Dave,

I think XFS_DIFLAG_REALTIME and XFS_DIFLAG_EXTSIZE flags are
mutually exclusive.
XFS_DIFLAG_REALTIME and di_extsize have been introduced and used
on Irix and Linux before XFS_DIFLAG_EXTSIZE.
This code:

+       if (unlikely(ip->i_d.di_flags & XFS_DIFLAG_REALTIME)) {
+               extsz = (ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE)
+                               ? ip->i_d.di_extsize
+                               : ip->i_mount->m_sb.sb_rextsize;
+               ASSERT(extsz);
+       } else {

shouldn't test for XFS_DIFLAG_EXTSIZE but use di_extsize if non zero.


Regards,
Vlad


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