Skip to contentSkip to conversation

fat-fallback-to-buffered-write-in-case-of-fallocatded-region-on-direct-io.patch removed from -mm tree

to-be-updated [email protected] 1 participant 1 message Nov 18, 2013 VFAT/FAT/msdos filesystem

lore
Share & tools
lore
#0 lore raw

Subject: [to-be-updated] fat-fallback-to-buffered-write-in-case-of-fallocatded-region-on-direct-io.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Mon, 18 Nov 2013 15:19:24 -0800

The patch titled
Subject: fat: fallback to buffered write in case of fallocatded region on direct IO
has been removed from the -mm tree. Its filename was
fat-fallback-to-buffered-write-in-case-of-fallocatded-region-on-direct-io.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
From: Namjae Jeon <[email protected]>
Subject: fat: fallback to buffered write in case of fallocatded region on direct IO

For normal cases of direct IO write, trying to seek to location greater than file size, makes it fall back to buffered write to fill that region. Similarly, in case for write in Fallocated region, make it fall to buffered write.

---

 fs/fat/inode.c |    8 ++++++++
 1 file changed, 8 insertions(+)
fs/fat/inode.c renamed from fs/fat/inode.c~fat-fallback-to-buffered-write-in-case-of-fallocatded-region-on-direct-io +8 -0
diff -puN fs/fat/inode.c~fat-fallback-to-buffered-write-in-case-of-fallocatded-region-on-direct-io fs/fat/inode.c
@@ -218,6 +218,14 @@ static ssize_t fat_direct_IO(int rw, str
 		loff_t size = offset + iov_length(iov, nr_segs);
 		if (MSDOS_I(inode)->mmu_private < size)
 			return 0;
+
+		/*
+		 * In case of writing in fallocated region, return 0 and
+		 * fallback to buffered write.
+		 */
+		if (MSDOS_I(inode)->i_disksize >
+		    round_up(i_size_read(inode), inode->i_sb->s_blocksize))
+			return 0;
 	}
 
 	/*

_

Patches currently in -mm which might be from [email protected] are

fat-permit-to-return-phy-block-number-by-fibmap-in-fallocated-region.patch