[PATCH 3/3] XFS: Print error when there are no free AGs.

raghu.prabhu13 at gmail.com raghu.prabhu13 at gmail.com
Sun Jun 3 06:12:49 CDT 2012


From: Raghavendra D Prabhu <rprabhu at wnohang.net>

After looping through all the AGs and failing to find any with free inodes,
printk once about lack of AGs with free inodes.

Signed-off-by: Raghavendra D Prabhu <rprabhu at wnohang.net>
---
 fs/xfs/xfs_ialloc.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c
index 343d7a8..b24ffa3 100644
--- a/fs/xfs/xfs_ialloc.c
+++ b/fs/xfs/xfs_ialloc.c
@@ -776,7 +776,11 @@ nextag:
 			tagno = 0;
 		if (tagno == agno) {
 			*inop = NULLFSINO;
-			return noroom ? ENOSPC : 0;
+			if (noroom) {
+				pr_err_once("XFS (%s): Out of AGs with free inodes: Required %d, Current %llu, Maximum %llu",
+						mp->m_fsname, XFS_IALLOC_INODES(mp), mp->m_sb.sb_icount, mp->m_maxicount);
+				return 0;
+			}
 		}
 		pag = xfs_perag_get(mp, tagno);
 		if (pag->pagi_inodeok == 0) {
-- 
1.7.10.3



More information about the xfs mailing list