linux-stable/fs/btrfs
Filipe Manana 27f0d9c98d btrfs: refactor mergable_maps() for more readability
At mergable_maps() instead of having a single if statement with many
ORed and ANDed conditions, refactor it with multiple if statements that
check a single condition and return immediately once a requirement fails.
This makes it easier to read.

Also change the return type from int to bool, make the arguments const
and rename the function from mergable_maps() to mergeable_maps().

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-12-15 22:59:02 +01:00
..
tests btrfs: unexport add_extent_mapping() 2023-12-15 22:59:01 +01:00
accessors.c
accessors.h btrfs: qgroup: check generation when recording simple quota delta 2023-10-12 16:44:11 +02:00
acl.c
acl.h
async-thread.c btrfs: merge ordered work callbacks in btrfs_work into one 2023-10-12 16:44:10 +02:00
async-thread.h btrfs: merge ordered work callbacks in btrfs_work into one 2023-10-12 16:44:10 +02:00
backref.c for-6.7-tag 2023-10-30 10:42:06 -10:00
backref.h for-6.7-tag 2023-10-30 10:42:06 -10:00
bio.c btrfs: merge ordered work callbacks in btrfs_work into one 2023-10-12 16:44:10 +02:00
bio.h btrfs: add an ordered_extent pointer to struct btrfs_bio 2023-06-19 13:59:36 +02:00
block-group.c btrfs: remove stripe size local variable from insert_dev_extents() 2023-12-15 20:27:02 +01:00
block-group.h btrfs: use a dedicated data structure for chunk maps 2023-12-15 20:27:02 +01:00
block-rsv.c btrfs: read raid stripe tree from disk 2023-10-12 16:44:09 +02:00
block-rsv.h
btrfs_inode.h btrfs: allocate btrfs_inode::file_extent_tree only without NO_HOLES 2023-12-15 22:59:01 +01:00
compression.c btrfs: use shrinker for compression page pool 2023-12-15 20:27:01 +01:00
compression.h btrfs: use page alloc/free wrappers for compression pages 2023-12-15 20:27:01 +01:00
ctree.c btrfs: make the logic from btrfs_block_can_be_shared() easier to read 2023-12-15 20:27:00 +01:00
ctree.h btrfs: remove unused btrfs_root::type 2023-12-15 20:27:01 +01:00
defrag.c btrfs: remove no longer used EXTENT_MAP_DELALLOC block start value 2023-12-15 20:27:03 +01:00
defrag.h btrfs: move btrfs_defrag_root() to defrag.{c,h} 2023-10-12 16:44:13 +02:00
delalloc-space.c btrfs: fix qgroup_free_reserved_data int overflow 2023-12-06 22:32:46 +01:00
delalloc-space.h
delayed-inode.c btrfs: do not utilize goto to implement delayed inode ref deletion 2023-12-15 20:27:00 +01:00
delayed-inode.h btrfs: remove redundant root argument from btrfs_delayed_update_inode() 2023-10-12 16:44:12 +02:00
delayed-ref.c btrfs: fix qgroup record leaks when using simple quotas 2023-11-09 14:01:59 +01:00
delayed-ref.h btrfs: stop reserving excessive space for block group item insertions 2023-10-12 16:44:16 +02:00
dev-replace.c btrfs: use a dedicated data structure for chunk maps 2023-12-15 20:27:02 +01:00
dev-replace.h
dir-item.c btrfs: abort transaction on generation mismatch when marking eb as dirty 2023-10-12 16:44:07 +02:00
dir-item.h btrfs: add fscrypt related dependencies to respective headers 2023-10-12 16:44:02 +02:00
discard.c
discard.h
disk-io.c btrfs: set clear_cache if we use usebackuproot 2023-12-15 20:27:05 +01:00
disk-io.h btrfs: move one shot mount option clearing to super.c 2023-12-15 20:27:04 +01:00
export.c
export.h
extent-io-tree.c btrfs: allocate btrfs_inode::file_extent_tree only without NO_HOLES 2023-12-15 22:59:01 +01:00
extent-io-tree.h btrfs: always set extent_io_tree::inode and drop fs_info 2023-12-15 20:27:02 +01:00
extent-tree.c btrfs: reflow btrfs_free_tree_block 2023-12-15 20:27:03 +01:00
extent-tree.h btrfs: get correct owning_root when dropping snapshot 2023-11-03 16:39:06 +01:00
extent_io.c btrfs: allow extent buffer helpers to skip cross-page handling 2023-12-15 20:27:03 +01:00
extent_io.h btrfs: allow extent buffer helpers to skip cross-page handling 2023-12-15 20:27:03 +01:00
extent_map.c btrfs: refactor mergable_maps() for more readability 2023-12-15 22:59:02 +01:00
extent_map.h btrfs: make extent_map_end() argument const 2023-12-15 22:59:02 +01:00
file-item.c btrfs: allocate btrfs_inode::file_extent_tree only without NO_HOLES 2023-12-15 22:59:01 +01:00
file-item.h btrfs: scrub: avoid unnecessary csum tree search preparing stripes 2023-08-21 14:54:48 +02:00
file.c btrfs: migrate to use folio private instead of page private 2023-12-15 20:27:01 +01:00
file.h
free-space-cache.c btrfs: remove redundant root argument from btrfs_update_inode() 2023-10-12 16:44:12 +02:00
free-space-cache.h
free-space-tree.c btrfs: abort transaction on generation mismatch when marking eb as dirty 2023-10-12 16:44:07 +02:00
free-space-tree.h
fs.c
fs.h btrfs: remove old mount API code 2023-12-15 20:27:04 +01:00
inode-item.c btrfs: track owning root in btrfs_ref 2023-10-12 16:44:11 +02:00
inode-item.h btrfs: add fscrypt related dependencies to respective headers 2023-10-12 16:44:02 +02:00
inode.c btrfs: log messages at unpin_extent_range() during unexpected cases 2023-12-15 22:59:01 +01:00
ioctl.c for-6.7-rc3-tag 2023-11-28 11:16:04 -08:00
ioctl.h
Kconfig btrfs: check-integrity: remove CONFIG_BTRFS_FS_CHECK_INTEGRITY option 2023-10-12 16:44:05 +02:00
locking.c btrfs: add raid stripe tree definitions 2023-10-12 16:44:09 +02:00
locking.h btrfs: do not block starts waiting on previous transaction commit 2023-09-08 14:10:49 +02:00
lru_cache.c
lru_cache.h
lzo.c btrfs: use page alloc/free wrappers for compression pages 2023-12-15 20:27:01 +01:00
Makefile btrfs: add support for inserting raid stripe extents 2023-10-12 16:44:09 +02:00
messages.c btrfs: constify fs_info parameter in __btrfs_panic() 2023-12-15 20:27:02 +01:00
messages.h btrfs: constify fs_info parameter in __btrfs_panic() 2023-12-15 20:27:02 +01:00
misc.h minmax: add in_range() macro 2023-08-24 16:20:18 -07:00
ordered-data.c btrfs: fix qgroup_free_reserved_data int overflow 2023-12-06 22:32:46 +01:00
ordered-data.h btrfs: remove unused btrfs_ordered_extent::outstanding_isize 2023-12-15 20:27:01 +01:00
orphan.c
orphan.h
print-tree.c btrfs: new inline ref storing owning subvol of data extents 2023-10-12 16:44:11 +02:00
print-tree.h
props.c btrfs: move btrfs_name_hash to dir-item.h 2023-10-12 16:44:02 +02:00
props.h
qgroup.c btrfs: ensure releasing squota reserve on head refs 2023-12-06 22:32:57 +01:00
qgroup.h btrfs: ensure releasing squota reserve on head refs 2023-12-06 22:32:57 +01:00
raid-stripe-tree.c btrfs: directly return 0 on no error code in btrfs_insert_raid_extent() 2023-11-03 16:38:51 +01:00
raid-stripe-tree.h btrfs: zoned: support RAID0/1/10 on top of raid stripe tree 2023-10-12 16:44:09 +02:00
raid56.c btrfs: raid56: remove unused btrfs_plug_cb::work 2023-12-15 20:27:01 +01:00
raid56.h btrfs: use a dedicated data structure for chunk maps 2023-12-15 20:27:02 +01:00
rcu-string.h
ref-verify.c btrfs: ref-verify: fix memory leaks in btrfs_ref_tree_mod() 2023-11-23 22:27:34 +01:00
ref-verify.h
reflink.c for-6.7-tag 2023-10-30 10:42:06 -10:00
reflink.h
relocation.c for-6.7-tag 2023-10-30 10:42:06 -10:00
relocation.h btrfs: relocation: constify parameters where possible 2023-10-12 16:44:13 +02:00
root-tree.c btrfs: qgroup: add new quota mode for simple quotas 2023-10-12 16:44:10 +02:00
root-tree.h btrfs: drop __must_check annotations 2023-10-12 16:44:04 +02:00
scrub.c btrfs: use a dedicated data structure for chunk maps 2023-12-15 20:27:02 +01:00
scrub.h
send.c btrfs: send: ensure send_fd is writable 2023-11-24 18:50:53 +01:00
send.h
space-info.c btrfs: adjust overcommit logic when very close to full 2023-10-12 16:44:16 +02:00
space-info.h btrfs: pass a space_info argument to btrfs_reserve_metadata_bytes() 2023-10-12 16:44:05 +02:00
subpage.c btrfs: migrate to use folio private instead of page private 2023-12-15 20:27:01 +01:00
subpage.h btrfs: stop setting PageError in the data I/O path 2023-06-19 13:59:35 +02:00
super.c btrfs: remove code for inode_cache and recovery mount options 2023-12-15 20:27:05 +01:00
super.h btrfs: remove old mount API code 2023-12-15 20:27:04 +01:00
sysfs.c btrfs: sysfs: show temp_fsid feature 2023-10-12 16:44:18 +02:00
sysfs.h
transaction.c for-6.7-rc5-tag 2023-12-14 11:53:00 -08:00
transaction.h btrfs: free qgroup pertrans reserve on transaction abort 2023-12-06 22:32:49 +01:00
tree-checker.c btrfs: tree-checker: add type and sequence check for inline backrefs 2023-11-15 17:08:09 +01:00
tree-checker.h
tree-log.c btrfs: remove now unneeded btrfs_redirty_list_add 2023-12-15 20:27:03 +01:00
tree-log.h
tree-mod-log.c btrfs: avoid tree mod log ENOMEM failures when we don't need to log 2023-06-19 13:59:38 +02:00
tree-mod-log.h
ulist.c btrfs: reformat remaining kdoc style comments 2023-10-12 16:44:04 +02:00
ulist.h
uuid-tree.c btrfs: abort transaction on generation mismatch when marking eb as dirty 2023-10-12 16:44:07 +02:00
uuid-tree.h
verity.c btrfs: remove redundant root argument from btrfs_update_inode() 2023-10-12 16:44:12 +02:00
verity.h
volumes.c btrfs: use a dedicated data structure for chunk maps 2023-12-15 20:27:02 +01:00
volumes.h btrfs: use a dedicated data structure for chunk maps 2023-12-15 20:27:02 +01:00
xattr.c btrfs: cache that we don't have security.capability set 2023-12-15 20:27:05 +01:00
xattr.h btrfs: move btrfs_xattr_handlers to .rodata 2023-10-09 16:24:17 +02:00
zlib.c btrfs: use page alloc/free wrappers for compression pages 2023-12-15 20:27:01 +01:00
zoned.c btrfs: add reconfigure callback for fs_context 2023-12-15 20:27:04 +01:00
zoned.h btrfs: add reconfigure callback for fs_context 2023-12-15 20:27:04 +01:00
zstd.c btrfs: use page alloc/free wrappers for compression pages 2023-12-15 20:27:01 +01:00