aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.h
diff options
context:
space:
mode:
authorDavid Chinner <dgc@sgi.com>2008-03-05 21:43:42 -0500
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-04-17 21:37:32 -0400
commita3f74ffb6d1448d9a8f482e593b80ec15f1695d4 (patch)
treee7a9ea7ba4032340e771605000002da4349719cb /fs/xfs/xfs_inode.h
parent4ae29b4321b99b711bcfde5527c4fbf249eac60f (diff)
[XFS] Don't block pdflush when writing back inodes
When pdflush is writing back inodes, it can get stuck on inode cluster buffers that are currently under I/O. This occurs when we write data to multiple inodes in the same inode cluster at the same time. Effectively, delayed allocation marks the inode dirty during the data writeback. Hence if the inode cluster was flushed during the writeback of the first inode, the writeback of the second inode will block waiting for the inode cluster write to complete before writing it again for the newly dirtied inode. Basically, we want to avoid this from happening so we don't block pdflush and slow down all of writeback. Hence we introduce a non-blocking async inode flush flag that pdflush uses. If this flag is set, we use non-blocking operations (e.g. try locks) whereever we can to avoid blocking or extra I/O being issued. SGI-PV: 970925 SGI-Modid: xfs-linux-melb:xfs-kern:30501a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_inode.h')
-rw-r--r--fs/xfs/xfs_inode.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h
index eaa01895ff93..c3bfffca9214 100644
--- a/fs/xfs/xfs_inode.h
+++ b/fs/xfs/xfs_inode.h
@@ -457,6 +457,7 @@ xfs_iflags_test_and_clear(xfs_inode_t *ip, unsigned short flags)
457#define XFS_IFLUSH_SYNC 3 457#define XFS_IFLUSH_SYNC 3
458#define XFS_IFLUSH_ASYNC 4 458#define XFS_IFLUSH_ASYNC 4
459#define XFS_IFLUSH_DELWRI 5 459#define XFS_IFLUSH_DELWRI 5
460#define XFS_IFLUSH_ASYNC_NOBLOCK 6
460 461
461/* 462/*
462 * Flags for xfs_itruncate_start(). 463 * Flags for xfs_itruncate_start().
@@ -511,7 +512,7 @@ int xfs_finish_reclaim_all(struct xfs_mount *, int);
511 */ 512 */
512int xfs_itobp(struct xfs_mount *, struct xfs_trans *, 513int xfs_itobp(struct xfs_mount *, struct xfs_trans *,
513 xfs_inode_t *, struct xfs_dinode **, struct xfs_buf **, 514 xfs_inode_t *, struct xfs_dinode **, struct xfs_buf **,
514 xfs_daddr_t, uint); 515 xfs_daddr_t, uint, uint);
515int xfs_iread(struct xfs_mount *, struct xfs_trans *, xfs_ino_t, 516int xfs_iread(struct xfs_mount *, struct xfs_trans *, xfs_ino_t,
516 xfs_inode_t **, xfs_daddr_t, uint); 517 xfs_inode_t **, xfs_daddr_t, uint);
517int xfs_iread_extents(struct xfs_trans *, xfs_inode_t *, int); 518int xfs_iread_extents(struct xfs_trans *, xfs_inode_t *, int);