public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: zhangshida <starzhangzsd@gmail.com>
Cc: tytso@mit.edu, adilger.kernel@dilger.ca, jack@suse.com,
	ebiggers@kernel.org, linux-ext4@vger.kernel.org,
	linux-kernel@vger.kernel.org, zhangshida@kylinos.cn,
	Jan Kara <jack@suse.cz>
Subject: Re: [PATCH 1/3] ext4: persist the new uptodate buffers in ext4_journalled_zero_new_buffers
Date: Thu, 29 Aug 2024 11:11:34 +0200	[thread overview]
Message-ID: <20240829091134.rf2fcyqxoxapulbe@quack3> (raw)
In-Reply-To: <20240829085407.3331490-2-zhangshida@kylinos.cn>

On Thu 29-08-24 16:54:05, zhangshida wrote:
> From: Shida Zhang <zhangshida@kylinos.cn>
> 
> For new uptodate buffers we also need to call write_end_fn() to persist the
> uptodate content, similarly as folio_zero_new_buffers() does it.
> 
> Suggested-by: Jan Kara <jack@suse.cz>
> Signed-off-by: Shida Zhang <zhangshida@kylinos.cn>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/ext4/inode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index 941c1c0d5c6e..a0a55cb8db53 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -1389,9 +1389,9 @@ static void ext4_journalled_zero_new_buffers(handle_t *handle,
>  					size = min(to, block_end) - start;
>  
>  					folio_zero_range(folio, start, size);
> -					write_end_fn(handle, inode, bh);
>  				}
>  				clear_buffer_new(bh);
> +				write_end_fn(handle, inode, bh);
>  			}
>  		}
>  		block_start = block_end;
> -- 
> 2.33.0
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2024-08-29  9:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-29  8:54 [PATCH v5 0/3] Fix an error caused by improperly dirtied buffer zhangshida
2024-08-29  8:54 ` [PATCH 1/3] ext4: persist the new uptodate buffers in ext4_journalled_zero_new_buffers zhangshida
2024-08-29  9:11   ` Jan Kara [this message]
2024-08-29  8:54 ` [PATCH 2/3] ext4: hoist ext4_block_write_begin and replace the __block_write_begin zhangshida
2024-08-29  9:12   ` Jan Kara
2024-08-29  9:26     ` Jan Kara
2024-08-29  8:54 ` [PATCH 3/3] ext4: fix a potential assertion failure due to improperly dirtied buffer zhangshida
2024-08-29  9:30   ` Jan Kara
2024-08-30  2:03     ` Stephen Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240829091134.rf2fcyqxoxapulbe@quack3 \
    --to=jack@suse.cz \
    --cc=adilger.kernel@dilger.ca \
    --cc=ebiggers@kernel.org \
    --cc=jack@suse.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=starzhangzsd@gmail.com \
    --cc=tytso@mit.edu \
    --cc=zhangshida@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox