Skip to contentSkip to conversation

f2fs: allocate node blocks for atomic write block replacement

PATCH Applied Daeho Jeong 3 participants 3 messages Apr 24, 2023 F2FS file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 f2fs: allocate node blocks for atomic write block replacement

From: Daeho Jeong <[email protected]>

When a node block is missing for atomic write block replacement, we need to allocate it in advance of the replacement.

Fixes 3db1de0e582c ("f2fs: change the current atomic write way")
---
 fs/f2fs/segment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/segment.c +1 -1
index c35476b3c075..0e1e29800934 100644
@@ -217,7 +217,7 @@ static int __replace_atomic_write_block(struct inode *inode, pgoff_t index,
 
 retry:
 	set_new_dnode(&dn, inode, NULL, NULL, 0);
-	err = f2fs_get_dnode_of_data(&dn, index, LOOKUP_NODE_RA);
+	err = f2fs_get_dnode_of_data(&dn, index, ALLOC_NODE);
 	if (err) {
 		if (err == -ENOMEM) {
 			f2fs_io_schedule_timeout(DEFAULT_IO_TIMEOUT);
Signature · 8 lines
2.40.0.634.g4ca3ef3211-goog



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Daeho Jeong

From: Daeho Jeong <[email protected]>

When a node block is missing for atomic write block replacement, we need to allocate it in advance of the replacement.

Fixes 3db1de0e582c ("f2fs: change the current atomic write way")

Thanks,

_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

#2 lore raw
In reply to Daeho Jeong
This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <[email protected]>:

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <[email protected]>:

Quoted 9 lines · On Mon, 24 Apr 2023 08:44:40 -0700 you wrote:

From: Daeho Jeong <[email protected]>

When a node block is missing for atomic write block replacement, we need to allocate it in advance of the replacement.

Fixes 3db1de0e582c ("f2fs: change the current atomic write way")

[...]

Here is the summary with links:
- [f2fs-dev] f2fs: allocate node blocks for atomic write block replacement

    https://git.kernel.org/jaegeuk/f2fs/c/994b442b66a4

You are awesome, thank you!

Signature · 10 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html




_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel