From 418a8e69852cbf0ed0c3de5acfa9c8a1c55100d5 Mon Sep 17 00:00:00 2001 From: xiaogang Date: Tue, 28 May 2013 15:38:17 +0800 Subject: [PATCH] fs: vfat: reduce the worst case latencies When a block partition is mounted with FAT file system and MS_DIRSYNC option is used, some file system operations like create, rename shall sleep in caller's context until all the metadata have been committed to the non-volatile memory. Since this operation is blocking call for user context, the WRITE_SYNC option must be used instead of WRITE (async operation) which incur inherent latencies while flushing the meta-data corresponding to directory entries Change-Id: I41c514889873a39d564271db0a421e6c66e5ae33 Signed-off-by: xiaogang --- fs/fat/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fat/misc.c b/fs/fat/misc.c index a1d192dd662..063966665e9 100644 --- a/fs/fat/misc.c +++ b/fs/fat/misc.c @@ -271,7 +271,7 @@ int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs) int i, err = 0; for (i = 0; i < nr_bhs; i++) - write_dirty_buffer(bhs[i], WRITE); + write_dirty_buffer(bhs[i], WRITE_SYNC); for (i = 0; i < nr_bhs; i++) { wait_on_buffer(bhs[i]);