diff options
author | David Chinner <dgc@sgi.com> | 2008-03-05 21:43:42 -0500 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-04-17 21:37:32 -0400 |
commit | a3f74ffb6d1448d9a8f482e593b80ec15f1695d4 (patch) | |
tree | e7a9ea7ba4032340e771605000002da4349719cb /fs/xfs/linux-2.6 | |
parent | 4ae29b4321b99b711bcfde5527c4fbf249eac60f (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/linux-2.6')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 3 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_vnode.h | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index 8831d9518790..cb9ce90d1deb 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -896,7 +896,8 @@ xfs_fs_write_inode( | |||
896 | struct inode *inode, | 896 | struct inode *inode, |
897 | int sync) | 897 | int sync) |
898 | { | 898 | { |
899 | int error = 0, flags = FLUSH_INODE; | 899 | int error = 0; |
900 | int flags = 0; | ||
900 | 901 | ||
901 | xfs_itrace_entry(XFS_I(inode)); | 902 | xfs_itrace_entry(XFS_I(inode)); |
902 | if (sync) { | 903 | if (sync) { |
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h index b5ea418693b1..f200e0244082 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.h +++ b/fs/xfs/linux-2.6/xfs_vnode.h | |||
@@ -73,12 +73,9 @@ typedef enum bhv_vrwlock { | |||
73 | #define IO_INVIS 0x00020 /* don't update inode timestamps */ | 73 | #define IO_INVIS 0x00020 /* don't update inode timestamps */ |
74 | 74 | ||
75 | /* | 75 | /* |
76 | * Flags for vop_iflush call | 76 | * Flags for xfs_inode_flush |
77 | */ | 77 | */ |
78 | #define FLUSH_SYNC 1 /* wait for flush to complete */ | 78 | #define FLUSH_SYNC 1 /* wait for flush to complete */ |
79 | #define FLUSH_INODE 2 /* flush the inode itself */ | ||
80 | #define FLUSH_LOG 4 /* force the last log entry for | ||
81 | * this inode out to disk */ | ||
82 | 79 | ||
83 | /* | 80 | /* |
84 | * Flush/Invalidate options for vop_toss/flush/flushinval_pages. | 81 | * Flush/Invalidate options for vop_toss/flush/flushinval_pages. |