Skip to content

Commit a18f877

Browse files
committed
Merge tag 'for-5.3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull btrfs updates from David Sterba: "Highlights: - chunks that have been trimmed and unchanged since last mount are tracked and skipped on repeated trims - use hw assissed crc32c on more arches, speedups if native instructions or optimized implementation is available - the RAID56 incompat bit is automatically removed when the last block group of that type is removed Fixes: - fsync fix for reflink on NODATACOW files that could lead to ENOSPC - fix data loss after inode eviction, renaming it, and fsync it - fix fsync not persisting dentry deletions due to inode evictions - update ctime/mtime/iversion after hole punching - fix compression type validation (reported by KASAN) - send won't be allowed to start when relocation is in progress, this can cause spurious errors or produce incorrect send stream Core: - new tracepoints for space update - tree-checker: better check for end of extents for some tree items - preparatory work for more checksum algorithms - run delayed iput at unlink time and don't push the work to cleaner thread where it's not properly throttled - wrap block mapping to structures and helpers, base for further refactoring - split large files, part 1: - space info handling - block group reservations - delayed refs - delayed allocation - other cleanups and refactoring" * tag 'for-5.3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (103 commits) btrfs: fix memory leak of path on error return path btrfs: move the subvolume reservation stuff out of extent-tree.c btrfs: migrate the delalloc space stuff to it's own home btrfs: migrate btrfs_trans_release_chunk_metadata btrfs: migrate the delayed refs rsv code btrfs: Evaluate io_tree in find_lock_delalloc_range() btrfs: migrate the global_block_rsv helpers to block-rsv.c btrfs: migrate the block-rsv code to block-rsv.c btrfs: stop using block_rsv_release_bytes everywhere btrfs: cleanup the target logic in __btrfs_block_rsv_release btrfs: export __btrfs_block_rsv_release btrfs: export btrfs_block_rsv_add_bytes btrfs: move btrfs_block_rsv definitions into it's own header btrfs: Simplify update of space_info in __reserve_metadata_bytes() btrfs: unexport can_overcommit btrfs: move reserve_metadata_bytes and supporting code to space-info.c btrfs: move dump_space_info to space-info.c btrfs: export block_rsv_use_bytes btrfs: move btrfs_space_info_add_*_bytes to space-info.c btrfs: move the space info update macro to space-info.h ...
2 parents 3eb5148 + e02d48e commit a18f877

52 files changed

Lines changed: 3954 additions & 3250 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎fs/btrfs/Kconfig‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
config BTRFS_FS
44
tristate "Btrfs filesystem support"
5-
select LIBCRC32C
5+
select CRYPTO
6+
select CRYPTO_CRC32C
67
select ZLIB_INFLATE
78
select ZLIB_DEFLATE
89
select LZO_COMPRESS

‎fs/btrfs/Makefile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ btrfs-y += super.o ctree.o extent-tree.o print-tree.o root-tree.o dir-item.o \
1010
export.o tree-log.o free-space-cache.o zlib.o lzo.o zstd.o \
1111
compression.o delayed-ref.o relocation.o delayed-inode.o scrub.o \
1212
reada.o backref.o ulist.o qgroup.o send.o dev-replace.o raid56.o \
13-
uuid-tree.o props.o free-space-tree.o tree-checker.o
13+
uuid-tree.o props.o free-space-tree.o tree-checker.o space-info.o \
14+
block-rsv.o delalloc-space.o
1415

1516
btrfs-$(CONFIG_BTRFS_FS_POSIX_ACL) += acl.o
1617
btrfs-$(CONFIG_BTRFS_FS_CHECK_INTEGRITY) += check-integrity.o

‎fs/btrfs/backref.c‎

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,12 +1465,11 @@ int btrfs_find_all_roots(struct btrfs_trans_handle *trans,
14651465
*
14661466
* Return: 0 if extent is not shared, 1 if it is shared, < 0 on error.
14671467
*/
1468-
int btrfs_check_shared(struct btrfs_root *root, u64 inum, u64 bytenr)
1468+
int btrfs_check_shared(struct btrfs_root *root, u64 inum, u64 bytenr,
1469+
struct ulist *roots, struct ulist *tmp)
14691470
{
14701471
struct btrfs_fs_info *fs_info = root->fs_info;
14711472
struct btrfs_trans_handle *trans;
1472-
struct ulist *tmp = NULL;
1473-
struct ulist *roots = NULL;
14741473
struct ulist_iterator uiter;
14751474
struct ulist_node *node;
14761475
struct seq_list elem = SEQ_LIST_INIT(elem);
@@ -1481,12 +1480,8 @@ int btrfs_check_shared(struct btrfs_root *root, u64 inum, u64 bytenr)
14811480
.share_count = 0,
14821481
};
14831482

1484-
tmp = ulist_alloc(GFP_NOFS);
1485-
roots = ulist_alloc(GFP_NOFS);
1486-
if (!tmp || !roots) {
1487-
ret = -ENOMEM;
1488-
goto out;
1489-
}
1483+
ulist_init(roots);
1484+
ulist_init(tmp);
14901485

14911486
trans = btrfs_attach_transaction(root);
14921487
if (IS_ERR(trans)) {
@@ -1527,8 +1522,8 @@ int btrfs_check_shared(struct btrfs_root *root, u64 inum, u64 bytenr)
15271522
up_read(&fs_info->commit_root_sem);
15281523
}
15291524
out:
1530-
ulist_free(tmp);
1531-
ulist_free(roots);
1525+
ulist_release(roots);
1526+
ulist_release(tmp);
15321527
return ret;
15331528
}
15341529

‎fs/btrfs/backref.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ int btrfs_find_one_extref(struct btrfs_root *root, u64 inode_objectid,
5757
u64 start_off, struct btrfs_path *path,
5858
struct btrfs_inode_extref **ret_extref,
5959
u64 *found_off);
60-
int btrfs_check_shared(struct btrfs_root *root, u64 inum, u64 bytenr);
60+
int btrfs_check_shared(struct btrfs_root *root, u64 inum, u64 bytenr,
61+
struct ulist *roots, struct ulist *tmp_ulist);
6162

6263
int __init btrfs_prelim_ref_init(void);
6364
void __cold btrfs_prelim_ref_exit(void);

0 commit comments

Comments
 (0)