Re: Snapshot rollback

2011-10-24 Thread dima
Fajar A. Nugraha list at fajar.net writes: A problem with that, though, if you decide to put /boot on btrfs as well. Grub uses the default subvolume to determine paths (for kernel, initrd, etc). A workaround is to manually create and manage your grub.cfg (or create and use a manual-managed

Re: Subvolume level allocation policy

2011-10-24 Thread Jan Schmidt
On 23.10.2011 20:50, Phillip Susi wrote: Is it ( yet? ) possible to manipulate the allocation policy on a subvolume level instead of the fs level? For example, to make / use raid1, and /home use raid0? Or to have / allocated from an ssd and /home allocated from the giant 2tb hd. At least

Re: Kernel BUG unable to handle kernel NULL pointer dereference

2011-10-24 Thread David Sterba
On Sun, Oct 23, 2011 at 07:24:42PM +0100, Leonidas Spyropoulos wrote: On Sun, Oct 23, 2011 at 4:37 PM, Mitch Harder mitch.har...@sabayonlinux.org wrote: A patch was submitted by Sergei Trofimovich to address the issue with handling a NULL pointer in btrfs_print_leaf.

Re: Kernel BUG unable to handle kernel NULL pointer dereference

2011-10-24 Thread Leonidas Spyropoulos
On Mon, Oct 24, 2011 at 12:22 PM, David Sterba dste...@suse.cz wrote: On Sun, Oct 23, 2011 at 07:24:42PM +0100, Leonidas Spyropoulos wrote: On Sun, Oct 23, 2011 at 4:37 PM, Mitch Harder mitch.har...@sabayonlinux.org wrote: A patch was submitted by Sergei Trofimovich to address the issue with

Re: kernel BUG at fs/btrfs/inode.c:1163

2011-10-24 Thread David Sterba
On Wed, Oct 19, 2011 at 02:59:45PM +0200, Martin Mailand wrote: Am 19.10.2011 11:49, schrieb David Sterba: It would be interesting what's the value of 'extent_type' at the time of crash, if it's eg -1 that could point to a real bug, some unhandled corner case in truncate, for example. How

Re: Kernel BUG unable to handle kernel NULL pointer dereference

2011-10-24 Thread David Sterba
On Mon, Oct 24, 2011 at 12:33:05PM +0100, Leonidas Spyropoulos wrote: Here is it, it's big and contains usless information.. http://paste.pocoo.org/show/497299/ not all that useless ... I saw another BUG earlier than the one you've reported: [31653.267742] [ cut here

Re: Kernel BUG unable to handle kernel NULL pointer dereference

2011-10-24 Thread Leonidas Spyropoulos
On Mon, Oct 24, 2011 at 12:51 PM, David Sterba dste...@suse.cz wrote: On Mon, Oct 24, 2011 at 12:33:05PM +0100, Leonidas Spyropoulos wrote: Here is it, it's big and contains usless information.. http://paste.pocoo.org/show/497299/ not all that useless ... I saw another BUG earlier than the

Re: Snapshot rollback

2011-10-24 Thread Fajar A. Nugraha
On Mon, Oct 24, 2011 at 3:24 PM, dima dole...@parallels.com wrote: Fajar A. Nugraha list at fajar.net writes: A problem with that, though, if you decide to put /boot on btrfs as well. Grub uses the default subvolume to determine paths (for kernel, initrd, etc). A workaround is to manually

Re: how stable are snapshots at the block level?

2011-10-24 Thread Stephane CHAZELAS
2011-10-23, 17:19(+02), Mathijs Kwik: [...] For this case (my laptop) I can stick to file-based rsync, but I think some guarantees should exist at the block level. Many virtual machines and cloud hosting services (like ec2) provide block-level snapshots. With xfs, I can freeze the filesystem

RE: how stable are snapshots at the block level?

2011-10-24 Thread Edward Ned Harvey
From: Mathijs Kwik [mailto:math...@bluescreen303.nl] Sent: Sunday, October 23, 2011 11:20 AM Also if you're rsyncing the block level device, you're running underneath btrfs and losing any checksumming benefit that btrfs was giving you, so you're possibly introducing risk for silent data

Re: system hangs after deleting bad file

2011-10-24 Thread Helmut Hullen
Hallo, dima, Du meintest am 24.10.11: [system hangs] I had a similar problem. Some files (2-3) got corrupted in my /home subvolume for no apparent reason. Trying to access the files gives kernel oops. Sometimes it freezes the machine, sometimes I am back to my console without any

Re: how stable are snapshots at the block level?

2011-10-24 Thread Stephane CHAZELAS
2011-10-24, 09:59(-04), Edward Ned Harvey: [...] If you are reading the raw device underneath btrfs, you are not getting the benefit of the filesystem checksumming. If you encounter an undetected read/write error, it will silently pass. Your data will be corrupted, you'll never know about it

Re: Chrome brings whole system down

2011-10-24 Thread Chester
Just yesterday I can reproduce this reliably. There was no way to turn the system off other than to use the 'ol REISUB sysrq tricks. I decided to give it a try today, and it works somehow.. -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to

ceph on btrfs [was Re: ceph on non-btrfs file systems]

2011-10-24 Thread Sage Weil
[adding linux-btrfs to cc] Josef, Chris, any ideas on the below issues? On Mon, 24 Oct 2011, Christian Brunner wrote: Thanks for explaining this. I don't have any objections against btrfs as a osd filesystem. Even the fact that there is no btrfs-fsck doesn't scare me, since I can use the ceph

Re: ceph on btrfs [was Re: ceph on non-btrfs file systems]

2011-10-24 Thread Josef Bacik
On Mon, Oct 24, 2011 at 10:06:49AM -0700, Sage Weil wrote: [adding linux-btrfs to cc] Josef, Chris, any ideas on the below issues? On Mon, 24 Oct 2011, Christian Brunner wrote: Thanks for explaining this. I don't have any objections against btrfs as a osd filesystem. Even the fact that

Re: ceph on btrfs [was Re: ceph on non-btrfs file systems]

2011-10-24 Thread Chris Mason
On Mon, Oct 24, 2011 at 03:51:47PM -0400, Josef Bacik wrote: On Mon, Oct 24, 2011 at 10:06:49AM -0700, Sage Weil wrote: [adding linux-btrfs to cc] Josef, Chris, any ideas on the below issues? On Mon, 24 Oct 2011, Christian Brunner wrote: Thanks for explaining this. I don't have any

subvolume delete freezes

2011-10-24 Thread Jim
Good afternoon Btrfs list. I was working with snapshots and created one of a small filetree as /btrfs/snaps/.101411. Several days late, not having written to the snapshot, but having written to the original files, I tried to delete the snapshot. btrfs subvolume delete /snaps/.101411

Re: ceph on btrfs [was Re: ceph on non-btrfs file systems]

2011-10-24 Thread Christian Brunner
2011/10/24 Chris Mason chris.ma...@oracle.com: On Mon, Oct 24, 2011 at 03:51:47PM -0400, Josef Bacik wrote: On Mon, Oct 24, 2011 at 10:06:49AM -0700, Sage Weil wrote: [adding linux-btrfs to cc] Josef, Chris, any ideas on the below issues? On Mon, 24 Oct 2011, Christian Brunner wrote:

Re: ceph on btrfs [was Re: ceph on non-btrfs file systems]

2011-10-24 Thread Arne Jansen
On 24.10.2011 23:34, Christian Brunner wrote: 2011/10/24 Chris Masonchris.ma...@oracle.com: On Mon, Oct 24, 2011 at 03:51:47PM -0400, Josef Bacik wrote: On Mon, Oct 24, 2011 at 10:06:49AM -0700, Sage Weil wrote: [adding linux-btrfs to cc] Josef, Chris, any ideas on the below issues? On Mon,

[PULL] Btrfs error handling v4

2011-10-24 Thread Jeff Mahoney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi David - Please pull from git://git.jeffreymahoney.com/linux/btrfs-unstable for-david. It contains the previously integrated v3 error handling patch with an updated (btrfs: clear_extent_bit error push-up) commit that resets the return value in

Re: [PULL] Btrfs error handling v4

2011-10-24 Thread Jeff Mahoney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/24/2011 05:51 PM, Jeff Mahoney wrote: Hi David - Please pull from git://git.jeffreymahoney.com/linux/btrfs-unstable for-david. It contains the previously integrated v3 error handling patch with an updated (btrfs: clear_extent_bit error

Re: Snapshot rollback

2011-10-24 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/24/2011 01:45 AM, dima wrote: Hello Phillip, It is hard to judge without seeing your fstab and bootloader config. Maybe your / was directly in subvolid=0 without creating a separate subvolume for it (like __active in Goffredo's reply)?

Re: Snapshot rollback

2011-10-24 Thread dima
Fajar A. Nugraha list at fajar.net writes: AFAIK you have three possible ways to use /boot on btrfs: (1) put /boot on subvolid=0, don't change the default subvolume. That works, but all your snapshot/subvols will be visible under /boot. Some people might not want that for estetic reason.

Re: Snapshot rollback

2011-10-24 Thread Arand Nash
On 25/10/11 02:45, Phillip Susi wrote: (...) On 10/24/2011 01:45 AM, dima wrote: Hello Phillip, It is hard to judge without seeing your fstab and bootloader config. Maybe your / was directly in subvolid=0 without creating a separate subvolume for it (like __active in Goffredo's reply)? In my

[patch 04/66] btrfs: Simplify btrfs_insert_root

2011-10-24 Thread Jeff Mahoney
btrfs_insert_root is just a wrapper for btrfs_insert_item. Just return the error directly. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/root-tree.c |9 +++-- 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c index

[patch 00/66] [pull] Error handling patchset v5

2011-10-24 Thread Jeff Mahoney
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

[patch 07/66] btrfs: clear_extent_bit error push-up

2011-10-24 Thread Jeff Mahoney
clear_extent_bit can fail with -ENOMEM for a specific case but will BUG on other memory allocation failures. This patch returns -ENOMEM for memory allocation failures and handles them with BUG_ON in callers which don't handle it already. Signed-off-by: Jeff Mahoney je...@suse.com ---

[patch 13/66] btrfs: btrfs_start_transaction non-looped error push-up

2011-10-24 Thread Jeff Mahoney
This patch handles btrfs_start_transaction failures that don't occur in a loop and are obvious to simply push up. In all cases except the mark_garbage_root case, the error is already handled by BUG_ON in the caller. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/extent-tree.c |6

[patch 52/66] btrfs: add_delayed_tree_ref should return void

2011-10-24 Thread Jeff Mahoney
add_delayed_tree_ref has no error conditions and should return void. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/delayed-ref.c | 15 ++- 1 files changed, 6 insertions(+), 9 deletions(-) diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c index

[patch 53/66] btrfs: add_delayed_data_ref should return void

2011-10-24 Thread Jeff Mahoney
add_delayed_data_ref has no error conditions and should return void. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/delayed-ref.c | 17 +++-- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c index

[patch 48/66] btrfs: setup_items_for_insert should return void

2011-10-24 Thread Jeff Mahoney
setup_items_for_insert now has no error conditions and should return void. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.c | 26 ++ fs/btrfs/ctree.h |8 fs/btrfs/delayed-inode.c |6 ++ 3 files changed, 16

[patch 51/66] btrfs: add_delayed_ref_head should return void

2011-10-24 Thread Jeff Mahoney
add_delayed_ref_head has no error conditions and should return void. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/delayed-ref.c | 29 ++--- 1 files changed, 10 insertions(+), 19 deletions(-) diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c index

[patch 66/66] btrfs: update_inline_extent_backref should return void

2011-10-24 Thread Jeff Mahoney
Now that btrfs_truncate_item returns void, there are no more error conditions in update_inline_extent_backref and it should return void. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/extent-tree.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) ---

[patch 63/66] btrfs: btrfs_extend_item should return void

2011-10-24 Thread Jeff Mahoney
btrfs_extend_item has no error conditions and should return void. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.c |7 +++ fs/btrfs/ctree.h |5 +++-- fs/btrfs/dir-item.c|5 ++--- fs/btrfs/extent-tree.c |5 ++--- fs/btrfs/file-item.c |2 +-

[patch 60/66] btrfs: __btrfs_mod_ref should return void

2011-10-24 Thread Jeff Mahoney
Now that process_func can't return an error, __btrfs_mod_ref has no more error conditions and should return void. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.c | 30 ++ fs/btrfs/ctree.h |8 fs/btrfs/extent-tree.c | 34

[patch 65/66] btrfs: copy_for_split should return void

2011-10-24 Thread Jeff Mahoney
copy_for_split has no error conditions and should return void. We return 0 from split_leaf instead of ret since ret would have been set using the return value from copy_for_split which would have been 0. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.c | 19

[patch 64/66] btrfs: end_compressed_writeback should return void

2011-10-24 Thread Jeff Mahoney
end_compressed_writeback has no error conditions and should return void. Its callers already ignore the error code anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/compression.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/compression.c

[patch 57/66] btrfs: btrfs_inc_extent_ref void return prep

2011-10-24 Thread Jeff Mahoney
btrfs_inc_extent_ref has no error conditions, but is used via process_func in __btrfs_mod_ref which requires it to return an int. This patch cleans up the callers to eliminate error handling that will never be used. A later patch in this series makes both btrfs_inc_extent_ref and the other

[patch 56/66] btrfs: Delayed ref mempool functions should return void

2011-10-24 Thread Jeff Mahoney
Now that the delayed ref code uses mempools, allocations can't fail, and there are no more error conditions to report. This patch makes the following functions return void: - btrfs_alloc_reserved_file_extent - btrfs_add_delayed_tree_ref - btrfs_add_delayed_data_ref -

[patch 55/66] btrfs: Use mempools for delayed refs

2011-10-24 Thread Jeff Mahoney
This patch converts the delayed ref code to use slab cache-backed mempools for allocating its nodes. The allocations happen deep in the call path where error recovery is impossible. By using mempools, we ensure that the allocations can't fail. Each mempool keeps a page of structures

[patch 58/66] btrfs: btrfs_free_extent void return prep

2011-10-24 Thread Jeff Mahoney
btrfs_free_extent has no error conditions, but is used via process_func in __btrfs_mod_ref which requires it to return an int. This patch cleans up the callers to eliminate error handling that will never be used. The next patch makes both btrfs_free_extent and the other function used via

[patch 54/66] btrfs: Fix kfree of member instead of structure

2011-10-24 Thread Jeff Mahoney
Correctness fix: The kfree calls in the add_delayed_* functions free the node that's passed into it, but the node is a member of another structure. It works because it's always the first member of the containing structure, but it should really be using the containing structure itself.

[patch 50/66] btrfs: insert_ptr should return void

2011-10-24 Thread Jeff Mahoney
insert_ptr has no error conditions and should return void. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.c | 46 +- 1 files changed, 13 insertions(+), 33 deletions(-) diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index

[patch 47/66] btrfs: fixup_low_keys should return void

2011-10-24 Thread Jeff Mahoney
fixup_low_keys has no error conditions and should return void. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.c | 39 +++ 1 files changed, 11 insertions(+), 28 deletions(-) diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index

[patch 46/66] btrfs: __add_reloc_root error push-up

2011-10-24 Thread Jeff Mahoney
This patch pushes kmalloc errors up to the caller and BUGs in the caller. The BUG_ON for duplicate reloc tree root insertion is replaced with a panic explaining the issue. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/relocation.c | 22 -- 1 file changed, 16

[patch 45/66] btrfs: -submit_bio_hook error push-up

2011-10-24 Thread Jeff Mahoney
This pushes failures from the submit_bio_hook callbacks, btrfs_submit_bio_hook and btree_submit_bio_hook into the callers, including callers of submit_one_bio where it catches the failures with BUG_ON. It also pushes up through the -readpage_io_failed_hook to end_bio_extent_writepage where

[patch 43/66] btrfs: Simplify btrfs_submit_bio_hook

2011-10-24 Thread Jeff Mahoney
btrfs_submit_bio_hook currently calls btrfs_bio_wq_end_io in either case of an if statement that determines one of the arguments. This patch moves the function call outside of the if statement and uses it to only determine the different argument. This allows us to catch an error in one place

[patch 42/66] btrfs: btrfs_run_defrag_inodes should return void

2011-10-24 Thread Jeff Mahoney
btrfs_run_defrag_inodes has no error conditions and should return void. Its callers already ignore the error codes anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.h |2 +- fs/btrfs/file.c |3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) ---

[patch 40/66] btrfs: btrfs_set_block_group_rw should return void

2011-10-24 Thread Jeff Mahoney
btrfs_set_block_group_rw has no error conditions and should return void. Its callers already ignore the error codes anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.h |4 ++-- fs/btrfs/extent-tree.c |3 +-- 2 files changed, 3 insertions(+), 4 deletions(-)

[patch 41/66] btrfs: setup_inline_extent_backref should return void

2011-10-24 Thread Jeff Mahoney
setup_inline_extent_backref has no error conditions and should return void. We set ret = 0 explicitly in insert_inline_extent_backref since it would have been set using the return value, which would have been 0. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/extent-tree.c | 23

[patch 44/66] btrfs: Factor out tree-ops-merge_bio_hook call

2011-10-24 Thread Jeff Mahoney
In submit_extent_page, there's a visually noisy if statement that, in the midst of other conditions, does the tree dependency for tree-ops and tree-ops-merge_bio_hook before calling it, and then another condition afterwards. If an error is returned from merge_bio_hook, there's no way to catch

[patch 39/66] btrfs: btrfs_prepare_extent_commit should return void

2011-10-24 Thread Jeff Mahoney
btrfs_prepare_extent_commit has no error conditions and should return void. Its callers already ignore the error codes anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.h |4 ++-- fs/btrfs/extent-tree.c |3 +-- 2 files changed, 3 insertions(+), 4 deletions(-)

[patch 37/66] btrfs: __setup_root should return void

2011-10-24 Thread Jeff Mahoney
__setup_root has no error conditions and should return void. Its callers already ignore the error codes anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/disk-io.c |9 - 1 file changed, 4 insertions(+), 5 deletions(-) --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c

[patch 36/66] btrfs: btrfs_invalidate_inodes should return void

2011-10-24 Thread Jeff Mahoney
btrfs_invalidate_inodes has no error conditions and should return void. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.h |2 +- fs/btrfs/inode.c |3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index

[patch 31/66] btrfs: btrfs_stop_workers should return void

2011-10-24 Thread Jeff Mahoney
btrfs_stop_workers has no error conditions and should return void. Its callers already ignore the error code anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/async-thread.c |3 +-- fs/btrfs/async-thread.h |2 +- 2 files changed, 2 insertions(+), 3 deletions(-) ---

[patch 35/66] btrfs: btrfs_init_compress should return void

2011-10-24 Thread Jeff Mahoney
btrfs_init_compress doesn't have any failure conditions, so return void. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/compression.c |3 +-- fs/btrfs/compression.h |2 +- fs/btrfs/super.c |5 + 3 files changed, 3 insertions(+), 7 deletions(-) diff --git

[patch 34/66] btrfs: tree-log: wait_for_writer should return void

2011-10-24 Thread Jeff Mahoney
wait_for_writer has no error conditions and should return void. Its callers already ignore the error codes anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/tree-log.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/tree-log.c

[patch 33/66] btrfs: tree-log: btrfs_end_log_trans should return void

2011-10-24 Thread Jeff Mahoney
btrfs_end_log_trans has no error conditions and should return void. Its callers ignore the error code anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/tree-log.c |3 +-- fs/btrfs/tree-log.h |2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git

[patch 38/66] btrfs: btrfs_destroy_delalloc_inodes should return void

2011-10-24 Thread Jeff Mahoney
btrfs_destroy_delalloc_inodes has no error conditions and should return void. Its callers already ignore the error codes anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/disk-io.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) --- a/fs/btrfs/disk-io.c +++

[patch 06/66] btrfs: lock_extent error push-up

2011-10-24 Thread Jeff Mahoney
lock_extent, try_lock_extent, and lock_extent_bits can't currently fail because errors are caught via BUG_ON. This patch pushes the error handling up to callers, which currently only handle them via BUG_ON themselves. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/compression.c

[patch 05/66] btrfs: set_extent_bit error push-up

2011-10-24 Thread Jeff Mahoney
In the locking case, set_extent_bit can return -EEXIST but callers already handle that. In the non-locking case, it can't fail. Memory allocation failures are handled by BUG_ON. This patch pushes up the BUG_ONs from set_extent_bit to callers, except where -ENOMEM can't occur (e.g.

[patch 32/66] btrfs: btrfs_requeue_work should return void

2011-10-24 Thread Jeff Mahoney
btrfs_requeue_work has no error conditions and should return void. Its callers ignore the error code anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/async-thread.c |7 ++- fs/btrfs/async-thread.h |2 +- 2 files changed, 3 insertions(+), 6 deletions(-) ---

[patch 29/66] btrfs: btrfs_queue_worker should return void

2011-10-24 Thread Jeff Mahoney
btrfs_queue_worker has no error conditions and should return void. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/async-thread.c | 14 -- fs/btrfs/async-thread.h |2 +- 2 files changed, 5 insertions(+), 11 deletions(-) --- a/fs/btrfs/async-thread.c +++

[patch 30/66] btrfs: run_ordered_completions should return void

2011-10-24 Thread Jeff Mahoney
run_ordered_completions has no error conditions and should return void. Its callers already ignore the error code anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/async-thread.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/fs/btrfs/async-thread.c +++

[patch 28/66] btrfs: fill_device_from_item should return void

2011-10-24 Thread Jeff Mahoney
fill_device_from_item has no error conditions and should return void. Its callers already ignore the error code anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/volumes.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/fs/btrfs/volumes.c +++

[patch 27/66] btrfs: schedule_bio should return void

2011-10-24 Thread Jeff Mahoney
schedule_bio has no error conditions and should return void. Its callers already ignore the error code anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/volumes.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@

[patch 25/66] btrfs: run_scheduled_bios should return void

2011-10-24 Thread Jeff Mahoney
run_scheduled_bios has no error conditions and should return void. Its callers already ignore the error code anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/volumes.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c

[patch 26/66] btrfs: btrfs_close_extra_devices should return void

2011-10-24 Thread Jeff Mahoney
btrfs_close_extra_devices has no error conditions and should return void. Its callers already ignore the error code anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/volumes.c |3 +-- fs/btrfs/volumes.h |2 +- 2 files changed, 2 insertions(+), 3 deletions(-) ---

[patch 24/66] btrfs: btrfs_cleanup_fs_uuids should return void

2011-10-24 Thread Jeff Mahoney
btrfs_cleanup_fs_uuids has no error conditions and should return void. Its callers already ignore the error code anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/volumes.c |3 +-- fs/btrfs/volumes.h |2 +- 2 files changed, 2 insertions(+), 3 deletions(-) ---

[patch 21/66] btrfs: check_page_locked should return void

2011-10-24 Thread Jeff Mahoney
check_page_locked has no error conditions and should return void. Its callers already ignore the error code anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/extent_io.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/fs/btrfs/extent_io.c +++

[patch 20/66] btrfs: check_page_uptodate should return void

2011-10-24 Thread Jeff Mahoney
check_page_uptodate has no error conditions and should return void. Its callers already ignore the error code anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/extent_io.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/fs/btrfs/extent_io.c +++

[patch 22/66] btrfs: check_page_writeback should return void

2011-10-24 Thread Jeff Mahoney
check_page_writeback has no error conditions and should return void. Its callers already ignore the error code anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/extent_io.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/fs/btrfs/extent_io.c +++

[patch 19/66] btrfs: __unlock_for_delalloc should return void

2011-10-24 Thread Jeff Mahoney
__unlock_for_delalloc has no error conditions and should return void. Its callers already ignore the error code anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/extent_io.c |9 - 1 file changed, 4 insertions(+), 5 deletions(-) --- a/fs/btrfs/extent_io.c +++

[patch 17/66] btrfs: wait_on_state should return void

2011-10-24 Thread Jeff Mahoney
wait_on_state has no error conditions and should return void. Its callers already ignore the error code anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/extent_io.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/fs/btrfs/extent_io.c +++

[patch 16/66] btrfs: set_range_writeback should return void

2011-10-24 Thread Jeff Mahoney
set_range_writeback has no error conditions and should return void. Its callers already ignore the error code anyway. There are internal error conditions but they are fatal and will cause a panic. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/extent_io.c |8 +--- 1 file

[patch 15/66] btrfs: btrfs_update_root error push-up

2011-10-24 Thread Jeff Mahoney
btrfs_update_root BUG's when it can't alloc a path, yet it can recover from a search error. This patch returns -ENOMEM instead. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ctree.h |6 +++--- fs/btrfs/root-tree.c |4 +++- 2 files changed, 6 insertions(+), 4 deletions(-)

[patch 12/66] btrfs: btrfs_drop_snapshot should return int

2011-10-24 Thread Jeff Mahoney
Commit cb1b69f4 (Btrfs: forced readonly when btrfs_drop_snapshot() fails) made btrfs_drop_snapshot return void because there were no callers checking the return value. That is the wrong order to handle error propogation since the caller will have no idea that an error has occured and continue on

[patch 11/66] btrfs: btrfs_pin_extent error push-up

2011-10-24 Thread Jeff Mahoney
btrfs_pin_extent looks up a block group and then calls pin_down_extent with it. If the lookup fails, it should return -ENOENT to allow callers to handle the error condition. For the three existing callers, it is a logic error if the lookup fails and a panic will occur. Signed-off-by: Jeff

[patch 18/66] btrfs: wait_extent_bit should return void

2011-10-24 Thread Jeff Mahoney
wait_extent_bit has no error conditions and should return void. Its callers already ignore the error code anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/extent_io.c |3 +-- fs/btrfs/extent_io.h |2 +- 2 files changed, 2 insertions(+), 3 deletions(-) ---

[patch 14/66] btrfs: find_and_setup_root error push-up

2011-10-24 Thread Jeff Mahoney
find_and_setup_root BUGs when it encounters an error from btrfs_find_last_root, which can occur if a path can't be allocated. This patch pushes it up to its callers where it is already handled. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/disk-io.c | 11 ++- 1 file

[patch 23/66] btrfs: clear_extent_buffer_dirty should return void

2011-10-24 Thread Jeff Mahoney
clear_extent_buffer_dirty has no error conditions and should return void. Its callers already ignore the error code anyway. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/extent_io.c |3 +-- fs/btrfs/extent_io.h |2 +- 2 files changed, 2 insertions(+), 3 deletions(-) ---

[patch 02/66] btrfs: Catch locking failures in {set,clear,convert}_extent_bit

2011-10-24 Thread Jeff Mahoney
The *_state functions can only return 0 or -EEXIST. This patch addresses the cases where those functions return -EEXIST, representing a locking failure. It handles them by panicking with an appropriate error message. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/extent_io.c | 58

[patch 08/66] btrfs: convert_extent_bit error push-up

2011-10-24 Thread Jeff Mahoney
convert_extent_bit can fail with -ENOMEM but nothing actually catches the errors. This patch catches the error with BUG_ON in the caller. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/extent_io.h |2 +- fs/btrfs/transaction.c |5 +++-- 2 files changed, 4 insertions(+), 3

[patch 10/66] btrfs: pin_down_extent should return void

2011-10-24 Thread Jeff Mahoney
pin_down_extent performs some operations which can't fail and then calls set_extent_dirty, which has two failure cases via set_extent_bit: 1) Return -EEXIST if exclusive bits are set - Since it doesn't use any exclusive bits, this failure case can't occur. 2) Return -ENOMEM if

[patch 03/66] btrfs: Panic on bad rbtree operations

2011-10-24 Thread Jeff Mahoney
The ordered data and relocation trees have BUG_ONs to protect against bad tree operations. This patch replaces them with a panic that will report the problem. Signed-off-by: Jeff Mahoney je...@suse.com --- fs/btrfs/ordered-data.c | 12 ++-- fs/btrfs/relocation.c | 36

[patch 01/66] btrfs: Add btrfs_panic()

2011-10-24 Thread Jeff Mahoney
As part of the effort to eliminate BUG_ON as an error handling technique, we need to determine which errors are actual logic errors, which are on-disk corruption, and which are normal runtime errors e.g. -ENOMEM. Annotating these error cases is helpful to understand and report them. This

linux v3.1 with btrfs-work: oops when deleting files

2011-10-24 Thread Kai Krakow
Hello list! I'm trying to rm some files, this is what I get in dmesg: [30975.249519] [ cut here ] [30975.249529] WARNING: at fs/btrfs/extent-tree.c:4588 __btrfs_free_extent+0x3b7/0x7ed() [30975.249532] Hardware name: [30975.249535] Modules linked in: af_packet lm90