[XFS] write barrier support Issue all log sync operations as ordered
writes. In addition flush the disk cache on fsync if the sync cached operation didn't sync the log to disk (this requires some additional bookeping in the transaction and log code). If the device doesn't claim to support barriers, the filesystem has an extern log volume or the trial superblock write with barriers enabled failed we disable barriers and print a warning. We should probably fail the mount completely, but that could lead to nasty boot failures for the root filesystem. Not enabled by default yet, needs more destructive testing first. SGI-PV: 912426 SGI-Modid: xfs-linux:xfs-kern:198723a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
This commit is contained in:

committed by
Nathan Scott

parent
739cafd316
commit
f538d4da8d
@@ -74,7 +74,7 @@ typedef enum page_buf_flags_e { /* pb_flags values */
|
||||
PBF_DELWRI = (1 << 6), /* buffer has dirty pages */
|
||||
PBF_STALE = (1 << 7), /* buffer has been staled, do not find it */
|
||||
PBF_FS_MANAGED = (1 << 8), /* filesystem controls freeing memory */
|
||||
PBF_FLUSH = (1 << 11), /* flush disk write cache */
|
||||
PBF_ORDERED = (1 << 11), /* use ordered writes */
|
||||
PBF_READ_AHEAD = (1 << 12), /* asynchronous read-ahead */
|
||||
|
||||
/* flags used only as arguments to access routines */
|
||||
@@ -383,9 +383,9 @@ extern void pagebuf_trace(
|
||||
#define XFS_BUF_UNASYNC(x) ((x)->pb_flags &= ~PBF_ASYNC)
|
||||
#define XFS_BUF_ISASYNC(x) ((x)->pb_flags & PBF_ASYNC)
|
||||
|
||||
#define XFS_BUF_FLUSH(x) ((x)->pb_flags |= PBF_FLUSH)
|
||||
#define XFS_BUF_UNFLUSH(x) ((x)->pb_flags &= ~PBF_FLUSH)
|
||||
#define XFS_BUF_ISFLUSH(x) ((x)->pb_flags & PBF_FLUSH)
|
||||
#define XFS_BUF_ORDERED(x) ((x)->pb_flags |= PBF_ORDERED)
|
||||
#define XFS_BUF_UNORDERED(x) ((x)->pb_flags &= ~PBF_ORDERED)
|
||||
#define XFS_BUF_ISORDERED(x) ((x)->pb_flags & PBF_ORDERED)
|
||||
|
||||
#define XFS_BUF_SHUT(x) printk("XFS_BUF_SHUT not implemented yet\n")
|
||||
#define XFS_BUF_UNSHUT(x) printk("XFS_BUF_UNSHUT not implemented yet\n")
|
||||
|
Reference in New Issue
Block a user