linux-bl808/fs/btrfs
Nikolay Borisov 217f5004fe btrfs: rework error detection in init_tree_roots
To avoid duplicating 3 lines of code the error detection logic in
init_tree_roots is somewhat quirky. It first checks for the presence of
any error condition, then checks for the specific condition to perform
any specific actions. That's spurious because directly checking for
each respective error condition and doing the necessary steps is more
obvious. While at it change the -EUCLEAN to -EIO in case the extent
buffer is not read correctly, this is in line with other sites which
return -EIO when the eb couldn't be read.

Additionally it results in smaller code and the code reads
more linearly:

add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-95 (-95)
Function                                     old     new   delta
open_ctree                                 17243   17148     -95
Total: Before=113104, After=113009, chg -0.08%

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-10-07 12:12:14 +02:00
..
tests
acl.c
async-thread.c
async-thread.h
backref.c btrfs: remove unnecessarily shadowed variables 2020-10-07 12:06:55 +02:00
backref.h
block-group.c btrfs: make read_block_group_item return void 2020-10-07 12:06:56 +02:00
block-group.h
block-rsv.c
block-rsv.h
btrfs_inode.h btrfs: make fast fsyncs wait only for writeback 2020-10-07 12:06:56 +02:00
check-integrity.c
check-integrity.h
compression.c btrfs: compression: move declarations to header 2020-10-07 12:06:55 +02:00
compression.h btrfs: compression: move declarations to header 2020-10-07 12:06:55 +02:00
ctree.c btrfs: delete duplicated words + other fixes in comments 2020-10-07 12:06:50 +02:00
ctree.h btrfs: qgroup: fix qgroup meta rsv leak for subvolume operations 2020-10-07 12:12:13 +02:00
delalloc-space.c btrfs: add btrfs_reserve_data_bytes and use it 2020-10-07 12:06:52 +02:00
delalloc-space.h
delayed-inode.c btrfs: qgroup: fix wrong qgroup metadata reserve for delayed inode 2020-10-07 12:12:13 +02:00
delayed-inode.h
delayed-ref.c
delayed-ref.h
dev-replace.c btrfs: change nr to u64 in btrfs_start_delalloc_roots 2020-10-07 12:06:50 +02:00
dev-replace.h
dir-item.c
discard.c
discard.h
disk-io.c btrfs: rework error detection in init_tree_roots 2020-10-07 12:12:14 +02:00
disk-io.h
export.c
export.h
extent-io-tree.h btrfs: add owner and fs_info to alloc_state io_tree 2020-10-07 12:06:56 +02:00
extent-tree.c btrfs: call btrfs_try_granting_tickets when unpinning anything 2020-10-07 12:06:51 +02:00
extent_io.c btrfs: delete duplicated words + other fixes in comments 2020-10-07 12:06:50 +02:00
extent_io.h
extent_map.c
extent_map.h
file-item.c
file.c btrfs: dio iomap DSYNC workaround 2020-10-07 12:06:57 +02:00
free-space-cache.c btrfs: delete duplicated words + other fixes in comments 2020-10-07 12:06:50 +02:00
free-space-cache.h
free-space-tree.c
free-space-tree.h
inode-item.c
inode-map.c
inode-map.h
inode.c btrfs: qgroup: fix qgroup meta rsv leak for subvolume operations 2020-10-07 12:12:13 +02:00
ioctl.c btrfs: qgroup: fix qgroup meta rsv leak for subvolume operations 2020-10-07 12:12:13 +02:00
Kconfig btrfs: switch to iomap for direct IO 2020-10-07 12:06:57 +02:00
locking.c
locking.h
lzo.c
Makefile
misc.h
ordered-data.c btrfs: make fast fsyncs wait only for writeback 2020-10-07 12:06:56 +02:00
ordered-data.h btrfs: make fast fsyncs wait only for writeback 2020-10-07 12:06:56 +02:00
orphan.c
print-tree.c
print-tree.h
props.c
props.h
qgroup.c btrfs: delete duplicated words + other fixes in comments 2020-10-07 12:06:50 +02:00
qgroup.h
raid56.c
raid56.h
rcu-string.h
reada.c btrfs: switch seed device to list api 2020-10-07 12:06:58 +02:00
ref-verify.c
ref-verify.h
reflink.c
reflink.h
relocation.c
root-tree.c btrfs: qgroup: fix qgroup meta rsv leak for subvolume operations 2020-10-07 12:12:13 +02:00
scrub.c btrfs: scrub: rename ratelimit state varaible to avoid shadowing 2020-10-07 12:06:55 +02:00
send.c btrfs: send: remove indirect callback parameter for changed_cb 2020-10-07 12:06:55 +02:00
send.h
space-info.c btrfs: fix possible infinite loop in data async reclaim 2020-10-07 12:06:54 +02:00
space-info.h btrfs: add btrfs_reserve_data_bytes and use it 2020-10-07 12:06:52 +02:00
struct-funcs.c
super.c btrfs: do async reclaim for data reservations 2020-10-07 12:06:54 +02:00
sysfs.c btrfs: simplify setting/clearing fs_info to btrfs_fs_devices 2020-10-07 12:06:58 +02:00
sysfs.h btrfs: remove const from btrfs_feature_set_name 2020-10-07 12:06:55 +02:00
transaction.c btrfs: make fast fsyncs wait only for writeback 2020-10-07 12:06:56 +02:00
transaction.h btrfs: dio iomap DSYNC workaround 2020-10-07 12:06:57 +02:00
tree-checker.c
tree-checker.h
tree-defrag.c
tree-log.c btrfs: make fast fsyncs wait only for writeback 2020-10-07 12:06:56 +02:00
tree-log.h btrfs: make fast fsyncs wait only for writeback 2020-10-07 12:06:56 +02:00
ulist.c
ulist.h
uuid-tree.c
volumes.c btrfs: do not hold device_list_mutex when closing devices 2020-10-07 12:12:13 +02:00
volumes.h btrfs: switch seed device to list api 2020-10-07 12:06:58 +02:00
xattr.c
xattr.h
zlib.c
zstd.c