]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
btrfs: move large data folios out of experimental features
authorQu Wenruo <wqu@suse.com>
Fri, 24 Apr 2026 00:50:25 +0000 (10:20 +0930)
committerDavid Sterba <dsterba@suse.com>
Mon, 8 Jun 2026 13:53:31 +0000 (15:53 +0200)
This feature was introduced in v6.17 under experimental, and we had
several small bugs related to or exposed by that:

  e9e3b22ddfa7 ("btrfs: fix beyond-EOF write handling")
  18de34daa7c6 ("btrfs: truncate ordered extent when skipping writeback past i_size")

Otherwise, the feature has been frequently tested by btrfs developers.

The latest fix only arrived in v6.19. After three releases, I think it's
time to move this feature out of experimental.

And since we're here, also remove the comment about the bitmap size
limit, which is no longer relevant in the context. It will soon be
outdated for the incoming huge folio support.

Reviewed-by: Neal Gompa <neal@gompa.dev>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/Kconfig
fs/btrfs/btrfs_inode.h
fs/btrfs/defrag.c

index 5d785d01097189b4a73fe0ddd572a6c1ce835cf5..b9acea91cbe1fc9326f22306d6f9818d891d73cf 100644 (file)
@@ -106,7 +106,7 @@ config BTRFS_EXPERIMENTAL
 
          - extent tree v2 - complex rework of extent tracking
 
-         - large folio and block size (> page size) support
+         - block size > page size support
 
          - asynchronous checksum generation for data writes
 
index beb027351c7e2f2a8512a84a90a23fa814fa8086..d5d81f9546c379f556734c5e44497928daae8d16 100644 (file)
@@ -500,12 +500,9 @@ static inline void btrfs_set_inode_mapping_order(struct btrfs_inode *inode)
        /* Metadata inode should not reach here. */
        ASSERT(is_data_inode(inode));
 
-       /* We only allow BITS_PER_LONGS blocks for each bitmap. */
-#ifdef CONFIG_BTRFS_EXPERIMENTAL
        mapping_set_folio_order_range(inode->vfs_inode.i_mapping,
                                      inode->root->fs_info->block_min_order,
                                      inode->root->fs_info->block_max_order);
-#endif
 }
 
 void btrfs_calculate_block_csum_folio(struct btrfs_fs_info *fs_info,
index af40ad62009a4e2b8967bd3dda8d83171a4735be..f0c6758b7055d3c59619225830674dc9de81ad06 100644 (file)
@@ -859,23 +859,6 @@ again:
        if (IS_ERR(folio))
                return folio;
 
-       /*
-        * Since we can defragment files opened read-only, we can encounter
-        * transparent huge pages here (see CONFIG_READ_ONLY_THP_FOR_FS).
-        *
-        * The IO for such large folios is not fully tested, thus return
-        * an error to reject such folios unless it's an experimental build.
-        *
-        * Filesystem transparent huge pages are typically only used for
-        * executables that explicitly enable them, so this isn't very
-        * restrictive.
-        */
-       if (!IS_ENABLED(CONFIG_BTRFS_EXPERIMENTAL) && folio_test_large(folio)) {
-               folio_unlock(folio);
-               folio_put(folio);
-               return ERR_PTR(-ETXTBSY);
-       }
-
        ret = set_folio_extent_mapped(folio);
        if (ret < 0) {
                folio_unlock(folio);