linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Allow extents equal to max_zeroout to be zero-ed
@ 2016-05-30 18:23 Jun He
  0 siblings, 0 replies; only message in thread
From: Jun He @ 2016-05-30 18:23 UTC (permalink / raw)
  To: linux-ext4; +Cc: tytso, Jun He

Just to be consistent with the rest of the code: if size == max_zeroout,
then allow it to be zero-ed.

Signed-off-by: Jun He <jhe@cs.wisc.edu>
---
 fs/ext4/extents.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 2a2eef9..dc0b04c 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -3609,7 +3609,7 @@ static int ext4_ext_convert_to_initialized(handle_t *handle,
 				goto out;
 			split_map.m_lblk = map->m_lblk;
 			split_map.m_len = allocated;
-		} else if (map->m_lblk - ee_block + map->m_len < max_zeroout) {
+		} else if (map->m_lblk - ee_block + map->m_len <= max_zeroout) {
 			/* case 2 */
 			if (map->m_lblk != ee_block) {
 				zero_ex.ee_block = ex->ee_block;
--
1.9.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-30 18:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-30 18:23 [PATCH] Allow extents equal to max_zeroout to be zero-ed Jun He

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).