* [PATCH] btrfs: correct the assert for subpage case
@ 2025-05-12 13:28 Daniel Vacek
2025-05-12 17:53 ` Boris Burkov
2025-05-12 22:40 ` Qu Wenruo
0 siblings, 2 replies; 4+ messages in thread
From: Daniel Vacek @ 2025-05-12 13:28 UTC (permalink / raw)
To: Chris Mason, Josef Bacik, David Sterba
Cc: Daniel Vacek, linux-btrfs, linux-kernel
The assert is only true in !subpage case. We can either fix it this way
or completely remove it.
This fixes and should be folded into:
btrfs: fix broken drop_caches on extent buffer folios
Signed-off-by: Daniel Vacek <neelx@suse.com>
---
fs/btrfs/extent_io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 80a8563a25add..3b3f73894ffe2 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3411,7 +3411,7 @@ struct extent_buffer *alloc_extent_buffer(struct btrfs_fs_info *fs_info,
continue;
}
- ASSERT(!folio_test_private(folio));
+ ASSERT(!btrfs_meta_is_subpage(fs_info) && !folio_test_private(folio));
folio_put(folio);
eb->folios[i] = NULL;
}
--
2.47.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] btrfs: correct the assert for subpage case
2025-05-12 13:28 [PATCH] btrfs: correct the assert for subpage case Daniel Vacek
@ 2025-05-12 17:53 ` Boris Burkov
2025-05-13 7:50 ` Daniel Vacek
2025-05-12 22:40 ` Qu Wenruo
1 sibling, 1 reply; 4+ messages in thread
From: Boris Burkov @ 2025-05-12 17:53 UTC (permalink / raw)
To: Daniel Vacek
Cc: Chris Mason, Josef Bacik, David Sterba, linux-btrfs, linux-kernel
On Mon, May 12, 2025 at 03:28:50PM +0200, Daniel Vacek wrote:
> The assert is only true in !subpage case. We can either fix it this way
> or completely remove it.
>
> This fixes and should be folded into:
> btrfs: fix broken drop_caches on extent buffer folios
>
> Signed-off-by: Daniel Vacek <neelx@suse.com>
I would lean towards removing it, personally. But LGTM, thanks.
Reviewed-by: Boris Burkov <boris@bur.io>
> ---
> fs/btrfs/extent_io.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
> index 80a8563a25add..3b3f73894ffe2 100644
> --- a/fs/btrfs/extent_io.c
> +++ b/fs/btrfs/extent_io.c
> @@ -3411,7 +3411,7 @@ struct extent_buffer *alloc_extent_buffer(struct btrfs_fs_info *fs_info,
> continue;
> }
>
> - ASSERT(!folio_test_private(folio));
> + ASSERT(!btrfs_meta_is_subpage(fs_info) && !folio_test_private(folio));
> folio_put(folio);
> eb->folios[i] = NULL;
> }
> --
> 2.47.2
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] btrfs: correct the assert for subpage case
2025-05-12 17:53 ` Boris Burkov
@ 2025-05-13 7:50 ` Daniel Vacek
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vacek @ 2025-05-13 7:50 UTC (permalink / raw)
To: Boris Burkov
Cc: Chris Mason, Josef Bacik, David Sterba, linux-btrfs, linux-kernel
On Mon, 12 May 2025 at 19:53, Boris Burkov <boris@bur.io> wrote:
>
> On Mon, May 12, 2025 at 03:28:50PM +0200, Daniel Vacek wrote:
> > The assert is only true in !subpage case. We can either fix it this way
> > or completely remove it.
> >
> > This fixes and should be folded into:
> > btrfs: fix broken drop_caches on extent buffer folios
> >
> > Signed-off-by: Daniel Vacek <neelx@suse.com>
>
> I would lean towards removing it, personally. But LGTM, thanks.
Good. Let's remove it then. Will you amend your patch?
> Reviewed-by: Boris Burkov <boris@bur.io>
>
> > ---
> > fs/btrfs/extent_io.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
> > index 80a8563a25add..3b3f73894ffe2 100644
> > --- a/fs/btrfs/extent_io.c
> > +++ b/fs/btrfs/extent_io.c
> > @@ -3411,7 +3411,7 @@ struct extent_buffer *alloc_extent_buffer(struct btrfs_fs_info *fs_info,
> > continue;
> > }
> >
> > - ASSERT(!folio_test_private(folio));
> > + ASSERT(!btrfs_meta_is_subpage(fs_info) && !folio_test_private(folio));
> > folio_put(folio);
> > eb->folios[i] = NULL;
> > }
> > --
> > 2.47.2
> >
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] btrfs: correct the assert for subpage case
2025-05-12 13:28 [PATCH] btrfs: correct the assert for subpage case Daniel Vacek
2025-05-12 17:53 ` Boris Burkov
@ 2025-05-12 22:40 ` Qu Wenruo
1 sibling, 0 replies; 4+ messages in thread
From: Qu Wenruo @ 2025-05-12 22:40 UTC (permalink / raw)
To: Daniel Vacek, Chris Mason, Josef Bacik, David Sterba
Cc: linux-btrfs, linux-kernel
在 2025/5/12 22:58, Daniel Vacek 写道:
> The assert is only true in !subpage case. We can either fix it this way
> or completely remove it.
>
> This fixes and should be folded into:
> btrfs: fix broken drop_caches on extent buffer folios
>
> Signed-off-by: Daniel Vacek <neelx@suse.com>
Looks good to me.
Although I agree with Boris, it's better to remove the ASSERT().
Subpage is no longer a corner/minor usage anymore, we shouldn't treat
subpage and normal cases differently when possible.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Thanks,
Qu
> ---
> fs/btrfs/extent_io.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
> index 80a8563a25add..3b3f73894ffe2 100644
> --- a/fs/btrfs/extent_io.c
> +++ b/fs/btrfs/extent_io.c
> @@ -3411,7 +3411,7 @@ struct extent_buffer *alloc_extent_buffer(struct btrfs_fs_info *fs_info,
> continue;
> }
>
> - ASSERT(!folio_test_private(folio));
> + ASSERT(!btrfs_meta_is_subpage(fs_info) && !folio_test_private(folio));
> folio_put(folio);
> eb->folios[i] = NULL;
> }
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-05-13 7:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-12 13:28 [PATCH] btrfs: correct the assert for subpage case Daniel Vacek
2025-05-12 17:53 ` Boris Burkov
2025-05-13 7:50 ` Daniel Vacek
2025-05-12 22:40 ` Qu Wenruo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox