xfs
[Top] [All Lists]

Re: bad calc for flagging pagf_metadata

To: Roger Willcocks <willcor@xxxxxxxxx>
Subject: Re: bad calc for flagging pagf_metadata
From: Eric Sandeen <sandeen@xxxxxxx>
Date: Wed, 26 Oct 2005 11:19:15 -0500
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <cfac95650510260554i6d4f5695ja1b659dabbf6baa@xxxxxxxxxxxxxx>
References: <cfac95650510260554i6d4f5695ja1b659dabbf6baa@xxxxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)
Roger Willcocks wrote:
When XFS_MOUNT_32BITINODES is true and imaxpct is set, the calculation
for max_metadata in xfs_initialize_perag is incorrect, yielding a
value that's tens of thousands of times too large. This results in the
entire area of the disk that's available for inodes being flagged as
preferred for metadata. The allocator won't touch that area until all
the other ag's are full. Patch-like fix below. Since this only sets a
runtime ag preference flag, it's safe for existing file systems.

--
Roger

xfs_mount.c / xfs_initialize_perag:
                        icount = sbp->sb_dblocks * sbp->sb_imax_pct;
                        do_div(icount, 100);
                        icount += sbp->sb_agblocks - 1;
-                       do_div(icount, mp->m_ialloc_blks);
+                      do_div(icount, sbp->sb_agblocks);
                        max_metadata = icount;



You are right, and in fact Irix does this correctly - looks like something was missed in the translation. :( We'll get that fixed.

Thanks!
-Eric


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