xfs
[Top] [All Lists]

[RFC PATCH] xfs: fix calculation of freed inode cluster blocks

To: xfs@xxxxxxxxxxx
Subject: [RFC PATCH] xfs: fix calculation of freed inode cluster blocks
From: Ben Myers <bpm@xxxxxxx>
Date: Tue, 3 Dec 2013 15:00:54 -0600
Delivered-to: xfs@xxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
rec.ir_startino is an agino rather than an ino.  Use the correct macro
when dealing with it in xfs_difree.

---

This is very lightly tested so it's RFC.  Looks like using "ino to
agbno" is actually harmless when you pass in an agino, so there
shouldn't have been any trouble caused by this one.

-Ben

 fs/xfs/xfs_ialloc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/fs/xfs/xfs_ialloc.c
===================================================================
--- a/fs/xfs/xfs_ialloc.c       2013-12-03 12:07:24.485185962 -0600
+++ b/fs/xfs/xfs_ialloc.c       2013-12-03 12:07:40.994563706 -0600
@@ -1229,7 +1229,7 @@ xfs_difree(
                }
 
                xfs_bmap_add_free(XFS_AGB_TO_FSB(mp,
-                               agno, XFS_INO_TO_AGBNO(mp,rec.ir_startino)),
+                               agno, XFS_AGINO_TO_AGBNO(mp, rec.ir_startino)),
                                XFS_IALLOC_BLOCKS(mp), flist, mp);
        } else {
                *delete = 0;

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