Small O_SYNC writes are no longer NFS_DATA_SYNC
diff mbox

Message ID 20110216171555.6642c630@notabene.brown
State Superseded, archived
Delegated to: Trond Myklebust
Headers show

Commit Message

NeilBrown Feb. 16, 2011, 6:15 a.m. UTC
None

Patch
diff mbox

diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 10d648e..392bfa8 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -178,6 +178,9 @@  static int wb_priority(struct writeback_control *wbc)
 		return FLUSH_HIGHPRI | FLUSH_STABLE;
 	if (wbc->for_kupdate || wbc->for_background)
 		return FLUSH_LOWPRI;
+	if (wbc->sync_mode == WB_SYNC_ALL &&
+	    (wbc->range_end - wbc->range_start) < PAGE_SIZE)
+		return FLUSH_STABLE;
 	return 0;
 }