Skip to content

Error handling patchset v6

Jeff Mahoney linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest99 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/99btrfs: Add btrfs_panic()fs/btrfs/ctree.h fs/btrfs/super.c+61 -15 replies
2/99btrfs: Catch locking failures in {set,clear,convert}_extent_bitfs/btrfs/extent_io.c+30 -110 replies
3/99btrfs: Panic on bad rbtree operationsfs/btrfs/ordered-data.c fs/btrfs/relocation.c+39 -92 replies
4/99btrfs: Simplify btrfs_insert_rootfs/btrfs/root-tree.c+3 -60 replies
5/99btrfs: Remove set bits return from clear_extent_bitfs/btrfs/extent_io.c+5 -70 replies
6/99btrfs: Add extent_state alloc/free tracingfs/btrfs/extent_io.c include/trace/events/btrfs.h+46 -00 replies
7/99btrfs: Use mempools for extent_state structuresfs/btrfs/extent_io.c+51 -204 replies
8/99btrfs: clear_extent_bit should return void with __GFP_WAIT setfs/btrfs/extent_io.c fs/btrfs/extent_io.h+88 -660 replies
9/99btrfs: unlock_extent can return voidfs/btrfs/extent_io.c fs/btrfs/extent_io.h+3 -40 replies
10/99btrfs: Split unlock_extent_cached into sleeping and atomic versionsfs/btrfs/extent_io.c fs/btrfs/extent_io.h+20 -70 replies
11/99btrfs: unlock_extent can drop gfp_t argumentfs/btrfs/compression.c fs/btrfs/disk-io.c fs/btrfs/extent_io.c +6 more+57 -640 replies
12/99btrfs: clear_extent_dirty can drop gfp_t argumentfs/btrfs/disk-io.c fs/btrfs/extent-tree.c fs/btrfs/extent_io.c +1 more+5 -70 replies
13/99btrfs: clear_extent_uptodate can drop gfp_t argumetnfs/btrfs/extent_io.c+4 -52 replies
14/99btrfs: clear_extent_bits can drop gfp_t argumetnfs/btrfs/disk-io.c fs/btrfs/extent-tree.c fs/btrfs/extent_io.c +6 more+13 -150 replies
15/99btrfs: try_lock_extent can drop gfp_t argumetnfs/btrfs/extent_io.c fs/btrfs/extent_io.h fs/btrfs/relocation.c+9 -200 replies
16/99btrfs: clear_extent_bit can drop gfp_t argumentfs/btrfs/extent_io.c fs/btrfs/extent_io.h fs/btrfs/file.c +3 more+16 -210 replies
17/99btrfs: set_extent_bit: split exclusive mode outfs/btrfs/extent_io.c fs/btrfs/extent_io.h fs/btrfs/inode.c+32 -140 replies
18/99btrfs: set_extent_bit should return void with __GFP_WAIT setfs/btrfs/ctree.h fs/btrfs/disk-io.c fs/btrfs/disk-io.h +5 more+89 -1010 replies
19/99btrfs: lock_extent can drop gfp_t argumentfs/btrfs/compression.c fs/btrfs/disk-io.c fs/btrfs/extent_io.c +6 more+36 -420 replies
20/99btrfs: set_extent_dirty can drop gfp_t argumentfs/btrfs/extent-tree.c fs/btrfs/extent_io.c fs/btrfs/extent_io.h+7 -100 replies
21/99btrfs: set_extent_bits can drop gfp_t argumentfs/btrfs/extent-tree.c fs/btrfs/extent_io.c fs/btrfs/extent_io.h +3 more+11 -120 replies
22/99btrfs: set_extent_delalloc can drop gfp_t argumentfs/btrfs/extent_io.c fs/btrfs/extent_io.h fs/btrfs/inode.c+4 -40 replies
23/99btrfs: set_extent_new can drop gfp_t argumentfs/btrfs/extent-tree.c fs/btrfs/extent_io.c fs/btrfs/extent_io.h+4 -60 replies
24/99btrfs: set_extent_uptodate can drop gfp_t argumentfs/btrfs/extent_io.c fs/btrfs/extent_io.h fs/btrfs/inode.c+11 -120 replies
25/99btrfs: set_extent_bit can drop gfp_t argumentfs/btrfs/extent_io.c fs/btrfs/extent_io.h fs/btrfs/inode.c+19 -270 replies
26/99btrfs: set_extent_buffer_uptodate should return voidfs/btrfs/extent_io.c fs/btrfs/extent_io.h+3 -40 replies
27/99btrfs: set_extent_bit should return -ENOMEM on GFP_ATOMIC failuresfs/btrfs/extent_io.c+22 -40 replies
28/99btrfs: clear_extent_bit error push-upfs/btrfs/extent_io.c+10 -40 replies
29/99btrfs: convert_extent_bit should return void with __GFP_WAIT setfs/btrfs/extent_io.c fs/btrfs/extent_io.h+16 -60 replies
30/99btrfs: pin_down_extent should return voidfs/btrfs/extent-tree.c+3 -30 replies
31/99btrfs: btrfs_pin_extent error push-upfs/btrfs/ctree.h fs/btrfs/extent-tree.c fs/btrfs/tree-log.c+29 -130 replies
32/99btrfs: btrfs_drop_snapshot should return intfs/btrfs/ctree.h fs/btrfs/extent-tree.c fs/btrfs/relocation.c +1 more+13 -80 replies
33/99btrfs: btrfs_start_transaction non-looped error push-upfs/btrfs/extent-tree.c fs/btrfs/relocation.c fs/btrfs/tree-log.c +1 more+15 -50 replies
34/99btrfs: find_and_setup_root error push-upfs/btrfs/disk-io.c+6 -50 replies
35/99btrfs: btrfs_update_root error push-upfs/btrfs/ctree.h fs/btrfs/root-tree.c+7 -40 replies
36/99btrfs: set_range_writeback should return voidfs/btrfs/extent_io.c+5 -30 replies
37/99btrfs: wait_on_state should return voidfs/btrfs/extent_io.c+0 -00 replies
38/99btrfs: wait_extent_bit should return voidfs/btrfs/extent_io.c fs/btrfs/extent_io.h+2 -30 replies
39/99btrfs: __unlock_for_delalloc should return voidfs/btrfs/extent_io.c+4 -50 replies
40/99btrfs: check_page_uptodate should return voidfs/btrfs/extent_io.c+1 -30 replies
41/99btrfs: check_page_locked should return voidfs/btrfs/extent_io.c+1 -30 replies
42/99btrfs: check_page_writeback should return voidfs/btrfs/extent_io.c+2 -30 replies
43/99btrfs: clear_extent_buffer_dirty should return voidfs/btrfs/extent_io.c fs/btrfs/extent_io.h+2 -30 replies
44/99btrfs: btrfs_cleanup_fs_uuids should return voidfs/btrfs/volumes.c fs/btrfs/volumes.h+2 -30 replies
45/99btrfs: run_scheduled_bios should return voidfs/btrfs/volumes.c+1 -20 replies
46/99btrfs: btrfs_close_extra_devices should return voidfs/btrfs/volumes.c fs/btrfs/volumes.h+2 -30 replies
47/99btrfs: schedule_bio should return voidfs/btrfs/volumes.c+1 -30 replies
48/99btrfs: fill_device_from_item should return voidfs/btrfs/volumes.c+1 -30 replies
49/99btrfs: btrfs_queue_worker should return voidfs/btrfs/async-thread.c fs/btrfs/async-thread.h+5 -110 replies
50/99btrfs: run_ordered_completions should return voidfs/btrfs/async-thread.c+2 -30 replies
51/99btrfs: btrfs_stop_workers should return voidfs/btrfs/async-thread.c fs/btrfs/async-thread.h+2 -30 replies
52/99btrfs: btrfs_requeue_work should return voidfs/btrfs/async-thread.c fs/btrfs/async-thread.h+3 -60 replies
53/99btrfs: btrfs_end_log_trans should return voidfs/btrfs/tree-log.c fs/btrfs/tree-log.h+2 -30 replies
54/99btrfs: wait_for_writer should return voidfs/btrfs/tree-log.c+2 -30 replies
55/99btrfs: btrfs_init_compress should return voidfs/btrfs/compression.c fs/btrfs/compression.h fs/btrfs/super.c+3 -70 replies
56/99btrfs: btrfs_invalidate_inodes should return voidfs/btrfs/ctree.h fs/btrfs/inode.c+2 -30 replies
57/99btrfs: __setup_root should return voidfs/btrfs/disk-io.c+4 -40 replies
58/99btrfs: btrfs_destroy_delalloc_inodes should return voidfs/btrfs/disk-io.c+2 -40 replies
59/99btrfs: btrfs_prepare_extent_commit should return voidfs/btrfs/ctree.h fs/btrfs/extent-tree.c+1 -20 replies
60/99btrfs: btrfs_set_block_group_rw should return voidfs/btrfs/ctree.h fs/btrfs/extent-tree.c+1 -20 replies
61/99btrfs: setup_inline_extent_backref should return voidfs/btrfs/extent-tree.c+11 -120 replies
62/99btrfs: btrfs_run_defrag_inodes should return voidfs/btrfs/ctree.h fs/btrfs/file.c+2 -30 replies
63/99btrfs: Simplify btrfs_submit_bio_hookfs/btrfs/inode.c+4 -30 replies
64/99btrfs: Factor out tree->ops->merge_bio_hook callfs/btrfs/extent_io.c fs/btrfs/inode.c+17 -50 replies
65/99btrfs: ->submit_bio_hook error push-upfs/btrfs/disk-io.c fs/btrfs/extent_io.c fs/btrfs/inode.c+28 -142 replies
66/99btrfs: __add_reloc_root error push-upfs/btrfs/relocation.c+16 -60 replies
67/99btrfs: fixup_low_keys should return voidfs/btrfs/ctree.c+11 -280 replies
68/99btrfs: setup_items_for_insert should return voidfs/btrfs/ctree.c fs/btrfs/ctree.h fs/btrfs/delayed-inode.c+16 -240 replies
69/99btrfs: del_ptr should return voidfs/btrfs/ctree.c+13 -260 replies
70/99btrfs: insert_ptr should return voidfs/btrfs/ctree.c+14 -340 replies
71/99btrfs: add_delayed_ref_head should return voidfs/btrfs/delayed-ref.c+10 -190 replies
72/99btrfs: add_delayed_tree_ref should return voidfs/btrfs/delayed-ref.c+6 -90 replies
73/99btrfs: add_delayed_data_ref should return voidfs/btrfs/delayed-ref.c+7 -100 replies
74/99btrfs: Fix kfree of member instead of structurefs/btrfs/delayed-ref.c+3 -30 replies
75/99btrfs: Use mempools for delayed refsfs/btrfs/delayed-ref.c fs/btrfs/delayed-ref.h fs/btrfs/super.c+107 -270 replies
76/99btrfs: Delayed ref mempool functions should return voidfs/btrfs/ctree.h fs/btrfs/delayed-ref.c fs/btrfs/delayed-ref.h +2 more+63 -800 replies
77/99btrfs: btrfs_inc_extent_ref void return prepfs/btrfs/file.c fs/btrfs/ioctl.c fs/btrfs/relocation.c +1 more+22 -310 replies
78/99btrfs: btrfs_free_extent void return prepfs/btrfs/extent-tree.c fs/btrfs/file.c fs/btrfs/inode.c +1 more+25 -380 replies
79/99btrfs: __btrfs_mod_refs process_func should return voidfs/btrfs/ctree.h fs/btrfs/extent-tree.c+18 -290 replies
80/99btrfs: __btrfs_mod_ref should return voidfs/btrfs/ctree.c fs/btrfs/ctree.h fs/btrfs/extent-tree.c+29 -430 replies
81/99btrfs: clean_tree_block should return voidfs/btrfs/disk-io.c fs/btrfs/disk-io.h+2 -30 replies
82/99btrfs: btrfs_truncate_item should return voidfs/btrfs/ctree.c fs/btrfs/ctree.h fs/btrfs/dir-item.c +4 more+17 -200 replies
83/99btrfs: btrfs_extend_item should return voidfs/btrfs/ctree.c fs/btrfs/ctree.h fs/btrfs/dir-item.c +4 more+16 -190 replies
84/99btrfs: end_compressed_writeback should return voidfs/btrfs/compression.c+2 -30 replies
85/99btrfs: copy_for_split should return voidfs/btrfs/ctree.c+8 -110 replies
86/99btrfs: update_inline_extent_backref should return voidfs/btrfs/extent-tree.c+11 -120 replies
87/99btrfs: btrfs_put_ordered_extent should return voidfs/btrfs/ordered-data.c fs/btrfs/ordered-data.h+2 -30 replies
88/99btrfs: __btrfs_remove_ordered_extent should return voidfs/btrfs/ordered-data.c fs/btrfs/ordered-data.h+6 -110 replies
89/99btrfs: btrfs_wait_ordered_extents should return voidfs/btrfs/ordered-data.c fs/btrfs/ordered-data.h fs/btrfs/transaction.c+5 -70 replies
90/99btrfs: btrfs_wait_ordered_range should return voidfs/btrfs/ordered-data.c fs/btrfs/ordered-data.h+2 -30 replies
91/99btrfs: btrfs_run_ordered_operations should return voidfs/btrfs/ordered-data.c fs/btrfs/ordered-data.h+2 -40 replies
92/99btrfs: btrfs_add_ordered_operation should return voidfs/btrfs/ordered-data.c fs/btrfs/ordered-data.h+7 -100 replies
93/99btrfs: btrfs_add_ordered_sum should return voidfs/btrfs/ordered-data.c fs/btrfs/ordered-data.h+6 -70 replies
94/99btrfs: btrfs_free_fs_root should return voidfs/btrfs/disk-io.c fs/btrfs/disk-io.h+2 -30 replies
95/99btrfs: del_fs_roots should return voidfs/btrfs/disk-io.c+1 -20 replies
96/99btrfs: btrfs_destroy_ordered_operations should return voidfs/btrfs/disk-io.c+2 -40 replies
97/99btrfs: btrfs_destroy_ordered_extents should return voidfs/btrfs/disk-io.c+2 -40 replies
98/99btrfs: btrfs_destroy_pending_snapshots should return voidfs/btrfs/disk-io.c+2 -40 replies
99/99btrfs: add_excluded_extent should return voidfs/btrfs/extent-tree.c+6 -130 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 00/99] Error handling patchset v6

Here's my current error handling patchset, against Chris's current for-linus branch.

As before, it's almost all in preparation for actual error handling. After a chat with Chris last week about some of the bits I thought might be contentious, I went ahead with the next step and converted struct extent_state allocations to use a mempool in front of the slab cache it was using already. This means that non-atomic callers can't catch an -ENOMEM and that means that non-atomic version of {set,clear,convert}_extent_bit can return void. This changes the previous patch set quite a bit since the {set,clear,convert}_extent_bit error push-up patches are now entirely obsolete.

The run down:
- extent_state allocations -> mempool
- delayed_ref allocations -> mempool
- a ton of int -> void changes
- add btrfs_panic
- a few cleanups where I ran into them

-Jeff