linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH] f2fs: avoid m_flags overlay when allocating more data blocks
@ 2017-02-23 11:55 Kinglong Mee
  2017-02-24 11:16 ` Chao Yu
  0 siblings, 1 reply; 2+ messages in thread
From: Kinglong Mee @ 2017-02-23 11:55 UTC (permalink / raw)
  To: Jaegeuk Kim; +Cc: linux-f2fs-devel

When more than one data blocks are allocated, the F2FS_MAP_UNWRITTEN/MAPPED
flags will be overlapped by F2FS_MAP_NEW at the later times.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
---
 fs/f2fs/data.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 5f3bc98..5618ae8 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -867,7 +867,7 @@ int f2fs_map_blocks(struct inode *inode, struct f2fs_map_blocks *map,
 			}
 			if (err)
 				goto sync_out;
-			map->m_flags = F2FS_MAP_NEW;
+			map->m_flags |= F2FS_MAP_NEW;
 			blkaddr = dn.data_blkaddr;
 		} else {
 			if (flag == F2FS_GET_BLOCK_BMAP) {
-- 
2.9.3


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] f2fs: avoid m_flags overlay when allocating more data blocks
  2017-02-23 11:55 [PATCH] f2fs: avoid m_flags overlay when allocating more data blocks Kinglong Mee
@ 2017-02-24 11:16 ` Chao Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2017-02-24 11:16 UTC (permalink / raw)
  To: Kinglong Mee, Jaegeuk Kim; +Cc: linux-f2fs-devel

On 2017/2/23 19:55, Kinglong Mee wrote:
> When more than one data blocks are allocated, the F2FS_MAP_UNWRITTEN/MAPPED
> flags will be overlapped by F2FS_MAP_NEW at the later times.
> 
> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>

Reviewed-by: Chao Yu <yuchao0@huawei.com>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-24 11:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-23 11:55 [PATCH] f2fs: avoid m_flags overlay when allocating more data blocks Kinglong Mee
2017-02-24 11:16 ` Chao Yu

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).