kernel-ark/fs/xfs/linux-2.6
David Chinner 8c38ab0320 [XFS] Prevent looping in xfs_sync_inodes_ag
If the last block of the AG has inodes in it and the AG is an exactly
power-of-2 size then the last inode in the AG points to the last block in
the AG. If we try to find the next inode in the AG by adding one to the
inode number, we increment the inode number past the size of the AG. The
result is that the macro XFS_INO_TO_AGINO() will strip the AG portion of
the inode number and return an inode number of zero.

That is, instead of terminating the lookup loop because we hit the inode
number went outside the valid range for the AG, the search index returns
to zero and we start traversing the radix tree from the start again. This
results in an endless loop in xfs_sync_inodes_ag().

Fix it be detecting if the new search index decreases as a result of
incrementing the current inode number. That indicate an overflow and hence
that we have finished processing the AG so we can terminate the loop.

SGI-PV: 988142

SGI-Modid: xfs-linux-melb:xfs-kern:32335a

Signed-off-by: David Chinner <david@fromorbit.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
2008-10-30 17:38:00 +11:00
..
kmem.c [XFS] kmem_free and kmem_realloc to use const void * 2008-07-28 16:58:43 +10:00
kmem.h [XFS] kmem_free and kmem_realloc to use const void * 2008-07-28 16:58:43 +10:00
mrlock.h
mutex.h
sv.h
time.h
xfs_aops.c [XFS] Never call mark_inode_dirty_sync() directly 2008-10-30 17:21:30 +11:00
xfs_aops.h
xfs_buf.c Fix barrier fail detection in XFS 2008-10-10 11:08:07 -07:00
xfs_buf.h Fix barrier fail detection in XFS 2008-10-10 11:08:07 -07:00
xfs_cred.h
xfs_dmapi_priv.h
xfs_export.c [PATCH] switch all filesystems over to d_obtain_alias 2008-10-23 05:13:01 -04:00
xfs_export.h
xfs_file.c [PATCH] Remove XFS buffered readdir hack 2008-10-23 05:13:06 -04:00
xfs_fs_subr.c [XFS] Avoid directly referencing the VFS inode. 2008-08-13 15:45:15 +10:00
xfs_fs_subr.h
xfs_globals.c
xfs_globals.h
xfs_ioctl32.c
xfs_ioctl32.h
xfs_ioctl.c [PATCH] switch all filesystems over to d_obtain_alias 2008-10-23 05:13:01 -04:00
xfs_iops.c [XFS] Combine the XFS and Linux inodes 2008-10-30 17:36:14 +11:00
xfs_iops.h [XFS] stop using file_update_time 2008-08-13 16:48:12 +10:00
xfs_linux.h CRED: Introduce credential access wrappers 2008-08-14 09:35:23 +10:00
xfs_lrw.c [XFS] stop using file_update_time 2008-08-13 16:48:12 +10:00
xfs_lrw.h
xfs_stats.c [XFS] add new btree statistics 2008-10-30 16:55:03 +11:00
xfs_stats.h [XFS] add new btree statistics 2008-10-30 16:55:03 +11:00
xfs_super.c [XFS] kill deleted inodes list 2008-10-30 17:37:49 +11:00
xfs_super.h [XFS] move xfssyncd code to xfs_sync.c 2008-10-30 17:06:18 +11:00
xfs_sync.c [XFS] Prevent looping in xfs_sync_inodes_ag 2008-10-30 17:38:00 +11:00
xfs_sync.h [XFS] mark inodes for reclaim via a tag in the inode radix tree 2008-10-30 17:37:26 +11:00
xfs_sysctl.c [XFS] streamline init/exit path 2008-07-28 16:59:25 +10:00
xfs_sysctl.h [XFS] streamline init/exit path 2008-07-28 16:59:25 +10:00
xfs_version.h
xfs_vfs.h [XFS] move xfssyncd code to xfs_sync.c 2008-10-30 17:06:18 +11:00
xfs_vnode.c [XFS] Combine the XFS and Linux inodes 2008-10-30 17:36:14 +11:00
xfs_vnode.h [XFS] Use struct inodes instead of vnodes to kill vn_grab 2008-10-30 17:15:03 +11:00
xfs_xattr.c [XFS] Remove vn_revalidate calls in xfs. 2008-07-28 16:59:39 +10:00