* [PATCH] ext4: using matching invalidatepage in ext4_writepage
@ 2020-02-26 4:10 yangerkun
2020-02-26 10:19 ` Ritesh Harjani
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: yangerkun @ 2020-02-26 4:10 UTC (permalink / raw)
To: tytso, jack; +Cc: linux-ext4, yangerkun
Run generic/388 with journal data mode sometimes may trigger the warning
in ext4_invalidatepage. Actually, we should use the matching invalidatepage
in ext4_writepage.
Signed-off-by: yangerkun <yangerkun@huawei.com>
---
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 fa0ff78dc033..78e805d42ada 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1974,7 +1974,7 @@ static int ext4_writepage(struct page *page,
bool keep_towrite = false;
if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb)))) {
- ext4_invalidatepage(page, 0, PAGE_SIZE);
+ inode->i_mapping->a_ops->invalidatepage(page, 0, PAGE_SIZE);
unlock_page(page);
return -EIO;
}
--
2.23.0.rc2.8.gff66981f45
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ext4: using matching invalidatepage in ext4_writepage
2020-02-26 4:10 [PATCH] ext4: using matching invalidatepage in ext4_writepage yangerkun
@ 2020-02-26 10:19 ` Ritesh Harjani
2020-02-26 12:03 ` Jan Kara
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Ritesh Harjani @ 2020-02-26 10:19 UTC (permalink / raw)
To: yangerkun, tytso, jack; +Cc: linux-ext4
On 2/26/20 9:40 AM, yangerkun wrote:
> Run generic/388 with journal data mode sometimes may trigger the warning
> in ext4_invalidatepage. Actually, we should use the matching invalidatepage
> in ext4_writepage.
>
> Signed-off-by: yangerkun <yangerkun@huawei.com>
generic/388 still fails, but the patch makes sense to me and also avoids
kernel warning.
Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com>
> ---
> 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 fa0ff78dc033..78e805d42ada 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -1974,7 +1974,7 @@ static int ext4_writepage(struct page *page,
> bool keep_towrite = false;
>
> if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb)))) {
> - ext4_invalidatepage(page, 0, PAGE_SIZE);
> + inode->i_mapping->a_ops->invalidatepage(page, 0, PAGE_SIZE);
> unlock_page(page);
> return -EIO;
> }
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ext4: using matching invalidatepage in ext4_writepage
2020-02-26 4:10 [PATCH] ext4: using matching invalidatepage in ext4_writepage yangerkun
2020-02-26 10:19 ` Ritesh Harjani
@ 2020-02-26 12:03 ` Jan Kara
2020-03-16 10:44 ` yangerkun
2020-04-10 3:17 ` Theodore Y. Ts'o
3 siblings, 0 replies; 5+ messages in thread
From: Jan Kara @ 2020-02-26 12:03 UTC (permalink / raw)
To: yangerkun; +Cc: tytso, jack, linux-ext4
On Wed 26-02-20 12:10:02, yangerkun wrote:
> Run generic/388 with journal data mode sometimes may trigger the warning
> in ext4_invalidatepage. Actually, we should use the matching invalidatepage
> in ext4_writepage.
>
> Signed-off-by: yangerkun <yangerkun@huawei.com>
Thanks for the patch! It looks good to me. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index fa0ff78dc033..78e805d42ada 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -1974,7 +1974,7 @@ static int ext4_writepage(struct page *page,
> bool keep_towrite = false;
>
> if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb)))) {
> - ext4_invalidatepage(page, 0, PAGE_SIZE);
> + inode->i_mapping->a_ops->invalidatepage(page, 0, PAGE_SIZE);
> unlock_page(page);
> return -EIO;
> }
> --
> 2.23.0.rc2.8.gff66981f45
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ext4: using matching invalidatepage in ext4_writepage
2020-02-26 4:10 [PATCH] ext4: using matching invalidatepage in ext4_writepage yangerkun
2020-02-26 10:19 ` Ritesh Harjani
2020-02-26 12:03 ` Jan Kara
@ 2020-03-16 10:44 ` yangerkun
2020-04-10 3:17 ` Theodore Y. Ts'o
3 siblings, 0 replies; 5+ messages in thread
From: yangerkun @ 2020-03-16 10:44 UTC (permalink / raw)
To: tytso, jack; +Cc: linux-ext4
Hi, Ted, can you consider to apply this patch.
On 2020/2/26 12:10, yangerkun wrote:
> Run generic/388 with journal data mode sometimes may trigger the warning
> in ext4_invalidatepage. Actually, we should use the matching invalidatepage
> in ext4_writepage.
>
> Signed-off-by: yangerkun <yangerkun@huawei.com>
> ---
> 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 fa0ff78dc033..78e805d42ada 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -1974,7 +1974,7 @@ static int ext4_writepage(struct page *page,
> bool keep_towrite = false;
>
> if (unlikely(ext4_forced_shutdown(EXT4_SB(inode->i_sb)))) {
> - ext4_invalidatepage(page, 0, PAGE_SIZE);
> + inode->i_mapping->a_ops->invalidatepage(page, 0, PAGE_SIZE);
> unlock_page(page);
> return -EIO;
> }
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ext4: using matching invalidatepage in ext4_writepage
2020-02-26 4:10 [PATCH] ext4: using matching invalidatepage in ext4_writepage yangerkun
` (2 preceding siblings ...)
2020-03-16 10:44 ` yangerkun
@ 2020-04-10 3:17 ` Theodore Y. Ts'o
3 siblings, 0 replies; 5+ messages in thread
From: Theodore Y. Ts'o @ 2020-04-10 3:17 UTC (permalink / raw)
To: yangerkun; +Cc: jack, linux-ext4
On Wed, Feb 26, 2020 at 12:10:02PM +0800, yangerkun wrote:
> Run generic/388 with journal data mode sometimes may trigger the warning
> in ext4_invalidatepage. Actually, we should use the matching invalidatepage
> in ext4_writepage.
>
> Signed-off-by: yangerkun <yangerkun@huawei.com>
Applied, thanks. Apologies for overlooking this patch earlier.
- Ted
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-04-10 3:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-26 4:10 [PATCH] ext4: using matching invalidatepage in ext4_writepage yangerkun
2020-02-26 10:19 ` Ritesh Harjani
2020-02-26 12:03 ` Jan Kara
2020-03-16 10:44 ` yangerkun
2020-04-10 3:17 ` Theodore Y. Ts'o
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).