linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 00/66] [pull] Error handling patchset v5
@ 2011-10-25  1:02 Jeff Mahoney
  2011-10-25  1:02 ` [patch 01/66] btrfs: Add btrfs_panic() Jeff Mahoney
                   ` (65 more replies)
  0 siblings, 66 replies; 77+ messages in thread
From: Jeff Mahoney @ 2011-10-25  1:02 UTC (permalink / raw)
  To: Chris Mason, David Sterba; +Cc: Linux Btrfs

Hi all -

Here's my current error handling patchset, against David's integration
branch. Almost all of this patchset is preparing for actual error
handling.  Before we start in on that work, I'm trying to reduce the
surface we need to worry about. It turns out that there is a ton of code
that returns an error code but never actually reports an error.

The patchset has grown to 66 patches. 46 of them change functions that
currently return int to return void. Many of them didn't even have the
error codes checked in the caller to begin with. 11 of the patches push
error codes up into the caller.

The remaining 9 patches do:
- Add a btrfs_panic facility, with a mount option to select BUG or panic
- Catch tree operation failures
- Simplify/add some wrapper functions

The biggest change, which will probably merit some discussion, is the
introduction of slab-backed mempools in the delayed ref code. I expect
to use this technique in other areas of the code to deal with deep
failures that are impossible to recover gracefully from. Rather than
returning -ENOMEM, we keep a page's worth of objects around for each
node type. That allows the callers to be drastically simplified. There's
no reason in particular to start with the delayed ref code, it's just
where I happened to do it.

Changes since v3 in order of impact:
- Fixed an issue in ("btrfs: clear_extent_bit error push-up") where a
  positive error code returned by clear_extent_bit was being passed to
  callers of btrfs_direct_IO. The callers intepreted it as an error and
  xfstests reported corruption in test 130.
- Push-up patches have added __must_check to their prototypes so that
  new callers are forced to properly handle the error conditions, even if
  it's also with BUG_ON. Some callers weren't checking error codes at
  all and this will prevent those types of issues from being
  re-introduced.
- Added error push-up and tree locking check for convert_extent_bit.
- Moved btrfs_drop_snapshot checks into the patch that changed it to
  return int.

This is also available in my git repository at:
git://git.jeffreymahoney.com/linux/btrfs-unstable for-david-v5

It depends on git://repo.or.cz/linux-2.6/btrfs-unstable.git, starting
with commit f2ab07c6 ("Btrfs: fix the amount of space reserved for unlink").

I can rebase if necessary.

-Jeff


^ permalink raw reply	[flat|nested] 77+ messages in thread

end of thread, other threads:[~2011-10-31 15:41 UTC | newest]

Thread overview: 77+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-25  1:02 [patch 00/66] [pull] Error handling patchset v5 Jeff Mahoney
2011-10-25  1:02 ` [patch 01/66] btrfs: Add btrfs_panic() Jeff Mahoney
2011-10-25  1:02 ` [patch 02/66] btrfs: Catch locking failures in {set,clear,convert}_extent_bit Jeff Mahoney
2011-10-25  1:02 ` [patch 03/66] btrfs: Panic on bad rbtree operations Jeff Mahoney
2011-10-25  1:02 ` [patch 04/66] btrfs: Simplify btrfs_insert_root Jeff Mahoney
2011-10-25  1:02 ` [patch 05/66] btrfs: set_extent_bit error push-up Jeff Mahoney
2011-10-25  1:02 ` [patch 06/66] btrfs: lock_extent " Jeff Mahoney
2011-10-25  1:02 ` [patch 07/66] btrfs: clear_extent_bit " Jeff Mahoney
2011-10-26 15:10   ` David Sterba
2011-10-26 15:18     ` Jeff Mahoney
2011-10-26 16:09       ` David Sterba
2011-10-26 16:13         ` Jeff Mahoney
2011-10-31 12:30           ` Ilya Dryomov
2011-10-31 13:00             ` Chris Mason
2011-10-31 13:34               ` Jeff Mahoney
2011-10-27 12:00       ` David Sterba
2011-10-31 15:07         ` David Sterba
2011-10-31 15:41           ` [patch 07/66] btrfs: clear_extent_bit error push-up [other BUG hit] David Sterba
2011-10-25  1:02 ` [patch 08/66] btrfs: convert_extent_bit error push-up Jeff Mahoney
2011-10-25  1:02 ` [patch 09/66] btrfs: unlock_extent " Jeff Mahoney
2011-10-25  1:02 ` [patch 10/66] btrfs: pin_down_extent should return void Jeff Mahoney
2011-10-25  1:02 ` [patch 11/66] btrfs: btrfs_pin_extent error push-up Jeff Mahoney
2011-10-25  1:02 ` [patch 12/66] btrfs: btrfs_drop_snapshot should return int Jeff Mahoney
2011-10-25  1:02 ` [patch 13/66] btrfs: btrfs_start_transaction non-looped error push-up Jeff Mahoney
2011-10-25  1:02 ` [patch 14/66] btrfs: find_and_setup_root " Jeff Mahoney
2011-10-25  1:02 ` [patch 15/66] btrfs: btrfs_update_root " Jeff Mahoney
2011-10-25  1:02 ` [patch 16/66] btrfs: set_range_writeback should return void Jeff Mahoney
2011-10-25  1:02 ` [patch 17/66] btrfs: wait_on_state " Jeff Mahoney
2011-10-25  1:02 ` [patch 18/66] btrfs: wait_extent_bit " Jeff Mahoney
2011-10-25  1:02 ` [patch 19/66] btrfs: __unlock_for_delalloc " Jeff Mahoney
2011-10-25  1:02 ` [patch 20/66] btrfs: check_page_uptodate " Jeff Mahoney
2011-10-25  1:02 ` [patch 21/66] btrfs: check_page_locked " Jeff Mahoney
2011-10-25  1:02 ` [patch 22/66] btrfs: check_page_writeback " Jeff Mahoney
2011-10-25  1:02 ` [patch 23/66] btrfs: clear_extent_buffer_dirty " Jeff Mahoney
2011-10-25  1:03 ` [patch 24/66] btrfs: btrfs_cleanup_fs_uuids " Jeff Mahoney
2011-10-25  1:03 ` [patch 25/66] btrfs: run_scheduled_bios " Jeff Mahoney
2011-10-25  1:03 ` [patch 26/66] btrfs: btrfs_close_extra_devices " Jeff Mahoney
2011-10-25  1:03 ` [patch 27/66] btrfs: schedule_bio " Jeff Mahoney
2011-10-25  1:03 ` [patch 28/66] btrfs: fill_device_from_item " Jeff Mahoney
2011-10-25  1:03 ` [patch 29/66] btrfs: btrfs_queue_worker " Jeff Mahoney
2011-10-25  1:03 ` [patch 30/66] btrfs: run_ordered_completions " Jeff Mahoney
2011-10-25  1:03 ` [patch 31/66] btrfs: btrfs_stop_workers " Jeff Mahoney
2011-10-25  1:03 ` [patch 32/66] btrfs: btrfs_requeue_work " Jeff Mahoney
2011-10-25  1:03 ` [patch 33/66] btrfs: tree-log: btrfs_end_log_trans " Jeff Mahoney
2011-10-25  1:03 ` [patch 34/66] btrfs: tree-log: wait_for_writer " Jeff Mahoney
2011-10-25  1:03 ` [patch 35/66] btrfs: btrfs_init_compress " Jeff Mahoney
2011-10-25  1:03 ` [patch 36/66] btrfs: btrfs_invalidate_inodes " Jeff Mahoney
2011-10-25  1:03 ` [patch 37/66] btrfs: __setup_root " Jeff Mahoney
2011-10-25  1:03 ` [patch 38/66] btrfs: btrfs_destroy_delalloc_inodes " Jeff Mahoney
2011-10-25  1:03 ` [patch 39/66] btrfs: btrfs_prepare_extent_commit " Jeff Mahoney
2011-10-25  1:03 ` [patch 40/66] btrfs: btrfs_set_block_group_rw " Jeff Mahoney
2011-10-25  1:03 ` [patch 41/66] btrfs: setup_inline_extent_backref " Jeff Mahoney
2011-10-25  1:03 ` [patch 42/66] btrfs: btrfs_run_defrag_inodes " Jeff Mahoney
2011-10-25  1:03 ` [patch 43/66] btrfs: Simplify btrfs_submit_bio_hook Jeff Mahoney
2011-10-25  1:03 ` [patch 44/66] btrfs: Factor out tree->ops->merge_bio_hook call Jeff Mahoney
2011-10-25  1:03 ` [patch 45/66] btrfs: ->submit_bio_hook error push-up Jeff Mahoney
2011-10-25  1:03 ` [patch 46/66] btrfs: __add_reloc_root " Jeff Mahoney
2011-10-25  1:03 ` [patch 47/66] btrfs: fixup_low_keys should return void Jeff Mahoney
2011-10-25  1:03 ` [patch 48/66] btrfs: setup_items_for_insert " Jeff Mahoney
2011-10-25  1:03 ` [patch 49/66] btrfs: del_ptr " Jeff Mahoney
2011-10-25  1:03 ` [patch 50/66] btrfs: insert_ptr " Jeff Mahoney
2011-10-25  1:03 ` [patch 51/66] btrfs: add_delayed_ref_head " Jeff Mahoney
2011-10-25  1:03 ` [patch 52/66] btrfs: add_delayed_tree_ref " Jeff Mahoney
2011-10-25  1:03 ` [patch 53/66] btrfs: add_delayed_data_ref " Jeff Mahoney
2011-10-25  1:03 ` [patch 54/66] btrfs: Fix kfree of member instead of structure Jeff Mahoney
2011-10-25  1:03 ` [patch 55/66] btrfs: Use mempools for delayed refs Jeff Mahoney
2011-10-25  1:03 ` [patch 56/66] btrfs: Delayed ref mempool functions should return void Jeff Mahoney
2011-10-25  1:03 ` [patch 57/66] btrfs: btrfs_inc_extent_ref void return prep Jeff Mahoney
2011-10-25  1:03 ` [patch 58/66] btrfs: btrfs_free_extent " Jeff Mahoney
2011-10-25  1:03 ` [patch 59/66] btrfs: __btrfs_mod_refs process_func should return void Jeff Mahoney
2011-10-25  1:03 ` [patch 60/66] btrfs: __btrfs_mod_ref " Jeff Mahoney
2011-10-25  1:03 ` [patch 61/66] btrfs: clean_tree_block " Jeff Mahoney
2011-10-25  1:03 ` [patch 62/66] btrfs: btrfs_truncate_item " Jeff Mahoney
2011-10-25  1:03 ` [patch 63/66] btrfs: btrfs_extend_item " Jeff Mahoney
2011-10-25  1:03 ` [patch 64/66] btrfs: end_compressed_writeback " Jeff Mahoney
2011-10-25  1:03 ` [patch 65/66] btrfs: copy_for_split " Jeff Mahoney
2011-10-25  1:03 ` [patch 66/66] btrfs: update_inline_extent_backref " Jeff Mahoney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).