diff options
Diffstat (limited to 'fs/xfs/linux-2.6')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 14 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_vfs.h | 1 |
2 files changed, 12 insertions, 3 deletions
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index dab5d3802374..003e5f29d684 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -659,9 +659,17 @@ xfs_fs_sync_super( | |||
659 | int error; | 659 | int error; |
660 | int flags; | 660 | int flags; |
661 | 661 | ||
662 | if (unlikely(sb->s_frozen == SB_FREEZE_WRITE)) | 662 | if (unlikely(sb->s_frozen == SB_FREEZE_WRITE)) { |
663 | flags = SYNC_QUIESCE; | 663 | /* |
664 | else | 664 | * First stage of freeze - no more writers will make progress |
665 | * now we are here, so we flush delwri and delalloc buffers | ||
666 | * here, then wait for all I/O to complete. Data is frozen at | ||
667 | * that point. Metadata is not frozen, transactions can still | ||
668 | * occur here so don't bother flushing the buftarg (i.e | ||
669 | * SYNC_QUIESCE) because it'll just get dirty again. | ||
670 | */ | ||
671 | flags = SYNC_FSDATA | SYNC_DELWRI | SYNC_WAIT | SYNC_DIO_WAIT; | ||
672 | } else | ||
665 | flags = SYNC_FSDATA | (wait ? SYNC_WAIT : 0); | 673 | flags = SYNC_FSDATA | (wait ? SYNC_WAIT : 0); |
666 | 674 | ||
667 | error = bhv_vfs_sync(vfsp, flags, NULL); | 675 | error = bhv_vfs_sync(vfsp, flags, NULL); |
diff --git a/fs/xfs/linux-2.6/xfs_vfs.h b/fs/xfs/linux-2.6/xfs_vfs.h index da255bdf5260..558823a83065 100644 --- a/fs/xfs/linux-2.6/xfs_vfs.h +++ b/fs/xfs/linux-2.6/xfs_vfs.h | |||
@@ -92,6 +92,7 @@ typedef enum { | |||
92 | #define SYNC_REFCACHE 0x0040 /* prune some of the nfs ref cache */ | 92 | #define SYNC_REFCACHE 0x0040 /* prune some of the nfs ref cache */ |
93 | #define SYNC_REMOUNT 0x0080 /* remount readonly, no dummy LRs */ | 93 | #define SYNC_REMOUNT 0x0080 /* remount readonly, no dummy LRs */ |
94 | #define SYNC_QUIESCE 0x0100 /* quiesce fileystem for a snapshot */ | 94 | #define SYNC_QUIESCE 0x0100 /* quiesce fileystem for a snapshot */ |
95 | #define SYNC_DIO_WAIT 0x0200 /* wait for direct I/O to complete */ | ||
95 | 96 | ||
96 | #define SHUTDOWN_META_IO_ERROR 0x0001 /* write attempt to metadata failed */ | 97 | #define SHUTDOWN_META_IO_ERROR 0x0001 /* write attempt to metadata failed */ |
97 | #define SHUTDOWN_LOG_IO_ERROR 0x0002 /* write attempt to the log failed */ | 98 | #define SHUTDOWN_LOG_IO_ERROR 0x0002 /* write attempt to the log failed */ |