Commit 3c0dc77b42cee99c71e913765073888620d442fa
Committed by
Tim Shimmin
1 parent
f7c99b6fc7
Exists in
master
and in
7 other branches
[XFS] Make freeze code a little cleaner.
Fixes a few small issues (mostly cosmetic) that were picked up during the review cycle for the last set of freeze path changes. SGI-PV: 959267 SGI-Modid: xfs-linux-melb:xfs-kern:28035a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Tim Shimmin <tes@sgi.com>
Showing 3 changed files with 11 additions and 11 deletions Side-by-side Diff
fs/xfs/linux-2.6/xfs_super.c
... | ... | @@ -667,7 +667,7 @@ |
667 | 667 | * occur here so don't bother flushing the buftarg (i.e |
668 | 668 | * SYNC_QUIESCE) because it'll just get dirty again. |
669 | 669 | */ |
670 | - flags = SYNC_FSDATA | SYNC_DELWRI | SYNC_WAIT | SYNC_DIO_WAIT; | |
670 | + flags = SYNC_FSDATA | SYNC_DELWRI | SYNC_WAIT | SYNC_IOWAIT; | |
671 | 671 | } else |
672 | 672 | flags = SYNC_FSDATA | (wait ? SYNC_WAIT : 0); |
673 | 673 |
fs/xfs/linux-2.6/xfs_vfs.h
... | ... | @@ -91,8 +91,7 @@ |
91 | 91 | #define SYNC_FSDATA 0x0020 /* flush fs data (e.g. superblocks) */ |
92 | 92 | #define SYNC_REFCACHE 0x0040 /* prune some of the nfs ref cache */ |
93 | 93 | #define SYNC_REMOUNT 0x0080 /* remount readonly, no dummy LRs */ |
94 | -#define SYNC_QUIESCE 0x0100 /* quiesce fileystem for a snapshot */ | |
95 | -#define SYNC_DIO_WAIT 0x0200 /* wait for direct I/O to complete */ | |
94 | +#define SYNC_IOWAIT 0x0100 /* wait for all I/O to complete */ | |
96 | 95 | |
97 | 96 | #define SHUTDOWN_META_IO_ERROR 0x0001 /* write attempt to metadata failed */ |
98 | 97 | #define SHUTDOWN_LOG_IO_ERROR 0x0002 /* write attempt to the log failed */ |
fs/xfs/xfs_vfsops.c
... | ... | @@ -872,10 +872,10 @@ |
872 | 872 | * this by simply making sure the log gets flushed |
873 | 873 | * if SYNC_BDFLUSH is set, and by actually writing it |
874 | 874 | * out otherwise. |
875 | - * SYNC_DIO_WAIT - The caller wants us to wait for all direct I/Os | |
876 | - * as well to ensure all data I/O completes before we | |
877 | - * return. Forms the drain side of the write barrier needed | |
878 | - * to safely quiesce the filesystem. | |
875 | + * SYNC_IOWAIT - The caller wants us to wait for all data I/O to complete | |
876 | + * before we return (including direct I/O). Forms the drain | |
877 | + * side of the write barrier needed to safely quiesce the | |
878 | + * filesystem. | |
879 | 879 | * |
880 | 880 | */ |
881 | 881 | /*ARGSUSED*/ |
882 | 882 | |
... | ... | @@ -1174,10 +1174,11 @@ |
1174 | 1174 | |
1175 | 1175 | } |
1176 | 1176 | /* |
1177 | - * When freezing, we need to wait ensure direct I/O is complete | |
1178 | - * as well to ensure all data modification is complete here | |
1177 | + * When freezing, we need to wait ensure all I/O (including direct | |
1178 | + * I/O) is complete to ensure no further data modification can take | |
1179 | + * place after this point | |
1179 | 1180 | */ |
1180 | - if (flags & SYNC_DIO_WAIT) | |
1181 | + if (flags & SYNC_IOWAIT) | |
1181 | 1182 | vn_iowait(vp); |
1182 | 1183 | |
1183 | 1184 | if (flags & SYNC_BDFLUSH) { |
... | ... | @@ -1975,7 +1976,7 @@ |
1975 | 1976 | /* flush inodes and push all remaining buffers out to disk */ |
1976 | 1977 | xfs_quiesce_fs(mp); |
1977 | 1978 | |
1978 | - BUG_ON(atomic_read(&mp->m_active_trans) > 0); | |
1979 | + ASSERT_ALWAYS(atomic_read(&mp->m_active_trans) == 0); | |
1979 | 1980 | |
1980 | 1981 | /* Push the superblock and write an unmount record */ |
1981 | 1982 | xfs_log_unmount_write(mp); |