diff mbox series

[f2fs-dev] f2fs: allocate node blocks for atomic write block replacement

Message ID 20230418174201.3274634-1-daeho43@gmail.com (mailing list archive)
State Superseded
Headers show
Series [f2fs-dev] f2fs: allocate node blocks for atomic write block replacement | expand

Commit Message

Daeho Jeong April 18, 2023, 5:42 p.m. UTC
From: Daeho Jeong <daehojeong@google.com>

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

Signed-off-by: Daeho Jeong <daehojeong@google.com>
---
 fs/f2fs/segment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chao Yu April 21, 2023, 2:25 a.m. UTC | #1
On 2023/4/19 1:42, Daeho Jeong wrote:
> From: Daeho Jeong <daehojeong@google.com>
> 
> When a node block is missing for atomic write block replacement, we need
> to allocate it in advance of the replacement.

Miss a fixes line?

Otherwise it looks good to me.

Thanks,

> 
> Signed-off-by: Daeho Jeong <daehojeong@google.com>
> ---
>   fs/f2fs/segment.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index c35476b3c075..0e1e29800934 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -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);
diff mbox series

Patch

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index c35476b3c075..0e1e29800934 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -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);