btrfs: correct the assert for subpage case
PATCH 1/1 btrfs: correct the assert for subpage case
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
--- fs/btrfs/extent_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/extent_io.c +1 -1
@@ -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 ; }
Signature · 1 line
2.47.2
Quoted 7 lines · 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 brokendrop_cacheson extent buffer foliosSigned-off-by Daniel Vacek <[email protected]>
I would lean towards removing it, personally. But LGTM, thanks.
Quoted 20 lines
--- fs/btrfs/extent_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/btrfs/extent_io.c +1
-1@@ -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 ; }Signature · 1 line
2.47.2
Quoted 11 lines · Boris Burkov
Quoted 7 lines · 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 brokendrop_cacheson extent buffer foliosSigned-off-by Daniel Vacek <[email protected]>I would lean towards removing it, personally. But LGTM, thanks.
Good. Let's remove it then. Will you amend your patch?
Quoted 22 lines
Reviewed-by Boris Burkov <[email protected]>Quoted 20 lines
--- fs/btrfs/extent_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/btrfs/extent_io.c +1
-2@@ -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
Quoted 7 lines · 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 brokendrop_cacheson extent buffer foliosSigned-off-by Daniel Vacek <[email protected]>
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.
Thanks,
Qu
Quoted 17 lines
--- fs/btrfs/extent_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/btrfs/extent_io.c +1
-1@@ -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 ; }