[PATCH] Btrfs-progs: Add uuid-tree.o to libbtrfs.a

2013-04-29 Thread Stefan Behrens
Since send-utils.o needs it and send-utils.o is part of the exported libbtrfs functionality. Signed-off-by: Stefan Behrens sbehr...@giantdisaster.de --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 98aa87e..589c60d 100644 --- a/Makefile

[BUG] crash after failed mount of btrfs-image

2013-04-29 Thread Jan Schmidt
Hi Josef, tried your btrfs-image tool (which didn't work for me but that's not that important). # ~/btrfs-image /dev/sdt1 /var/tmp/janosch.btrfsimage # mount -o loop /var/tmp/janosch.btrfsimage /mnt/test mount: you must specify the filesystem type Doesn't mount, okay. Use -r: # ~/btrfs-image

Re: [BUG] crash after failed mount of btrfs-image

2013-04-29 Thread Josef Bacik
On Mon, Apr 29, 2013 at 04:32:26AM -0600, Jan Schmidt wrote: Hi Josef, tried your btrfs-image tool (which didn't work for me but that's not that important). # ~/btrfs-image /dev/sdt1 /var/tmp/janosch.btrfsimage # mount -o loop /var/tmp/janosch.btrfsimage /mnt/test mount: you must specify

[PATCH] btrfs: use only memmove_extent_buffer and simplify the helpers

2013-04-29 Thread David Sterba
After commit a65917156e34594 (Btrfs: stop using highmem for extent_buffers) we don't need to call kmap_atomic anymore and can reduce the move_pages helper to a simple memmove. There's only one caller of memcpy_extent_buffer, we can use the memmove_ variant here. Signed-off-by: David Sterba

[PATCH] btrfs: use unsigned long type for extent state bits

2013-04-29 Thread David Sterba
Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/extent_io.c | 48 +--- fs/btrfs/extent_io.h | 28 +++- fs/btrfs/inode.c |5 +++-- 3 files changed, 43 insertions(+), 38 deletions(-) diff --git

[PATCH] btrfs: fix misleading variable name for flags

2013-04-29 Thread David Sterba
The variable was named 'data' in btrfs_reserve_extent and that's the only function that actually uses it to let btrfs_get_alloc_profile know what profile we want. Then it's passed down as u64 flags. Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/ctree.h |2 +-

[PATCH] Btrfs: deal with errors in write_dev_supers

2013-04-29 Thread Josef Bacik
If you try to mount -o loop a restored file system it will panic if the file ends up being smaller than the original disk. This is because we go to try and get a block for a super that may be past the EOF which makes __getblk return NULL for a buffer head when we aren't expecting it to. Fix this

Re: [PATCH 2/5] Btrfs: support printing UUID tree elements

2013-04-29 Thread David Sterba
On Fri, Apr 19, 2013 at 05:41:03PM +0200, Stefan Behrens wrote: --- a/fs/btrfs/print-tree.c +++ b/fs/btrfs/print-tree.c +static void print_uuid_item(struct extent_buffer *l, + struct btrfs_uuid_item *ptr, + u64 item_size) +{ + do { +

Re: [PATCH 3/5] Btrfs: create UUID tree if required

2013-04-29 Thread David Sterba
On Fri, Apr 19, 2013 at 05:41:04PM +0200, Stefan Behrens wrote: @@ -2830,6 +2857,15 @@ retry_root_backup: return ret; } + if (need_to_create_uuid_tree) { + ret = btrfs_create_uuid_tree(fs_info, tree_root); + if (ret) { +

Re: [PATCH 4/5] Btrfs: maintain subvolume items in the UUID tree

2013-04-29 Thread David Sterba
On Fri, Apr 19, 2013 at 05:41:05PM +0200, Stefan Behrens wrote: --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -57,6 +57,8 @@ #include send.h #include dev-replace.h +static char empty_uuid[BTRFS_UUID_SIZE] = {0}; + const @@ -567,9 +573,10 @@ static int create_snapshot(struct

Re: [PATCH 5/5] Btrfs: fill UUID tree initially

2013-04-29 Thread David Sterba
On Fri, Apr 19, 2013 at 05:41:06PM +0200, Stefan Behrens wrote: When the UUID tree is initially created, a task is spawned that walks through the root tree. For each found subvolume root_item, the uuid and received_uuid entries in the UUID tree are added. This is such a quick operation so that

Re: [PATCH 5/5] Btrfs: fill UUID tree initially

2013-04-29 Thread Stefan Behrens
On Mon, 29 Apr 2013 17:12:20 +0200, David Sterba wrote: On Fri, Apr 19, 2013 at 05:41:06PM +0200, Stefan Behrens wrote: [...] +up(fs_info-uuid_scan_sem); Does lockdep need to be instructed that a semaphore is released in a different thread it's been taken? Not sure if this wasn't for

[PATCH] Btrfs: fix check on same raid type flag twice

2013-04-29 Thread henrikno
From: Henrik Nordvik henri...@gmail.com Code checked for raid 5 flag in two else-if branches, so code would never be reached. Probably a copy-paste bug. Signed-off-by: Henrik Nordvik henri...@gmail.com --- fs/btrfs/disk-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] btrfs: device delete to get errors from the kernel

2013-04-29 Thread Josef Bacik
On Fri, Apr 26, 2013 at 03:41:15AM -0600, Anand Jain wrote: adds a parameter in the ioctl arg struct to carry the error string I don't like this approach, we are API'ifying strings coming back from the kernel. Signed-off-by: Anand Jain anand.j...@oracle.com --- fs/btrfs/ioctl.c

Re: [PATCH 1/5] Btrfs: introduce a tree for items that map UUIDs to something

2013-04-29 Thread Josef Bacik
On Fri, Apr 19, 2013 at 09:41:02AM -0600, Stefan Behrens wrote: Mapping UUIDs to subvolume IDs is an operation with a high effort today. Today, the algorithm even has quadratic effort (based on the number of existing subvolumes), which means, that it takes minutes to send/receive a single

[PATCH] Btrfs: cleanup destroy_marked_extents V2

2013-04-29 Thread Josef Bacik
We can just look up the extent_buffers for the range and free stuff that way. This makes the cleanup a bit cleaner and we can make sure to evict the extent_buffers pretty quickly by marking them as stale. Thanks, Signed-off-by: Josef Bacik jba...@fusionio.com --- V1-V2: fix infinite loop if we

Re: [bug] 3.9-rc7+next: NULL deref in btrfs_next_old_leaf/btrfs_search_slot

2013-04-29 Thread David Sterba
On Sat, Apr 27, 2013 at 10:50:43AM +0800, Liu Bo wrote: @@ -3486,14 +3486,14 @@ int close_ctree(struct btrfs_root *root) percpu_counter_sum(fs_info-delalloc_bytes)); } - free_root_pointers(fs_info, 1); - btrfs_free_block_groups(fs_info);

Panic while running defrag

2013-04-29 Thread Stephen Weinberg
I ran into a panic while running find -xdev | xargs brtfs fi defrag '{}'. I don't remember the exact command because the history was not saved. I also started and stopped it a few times however. The kernel logs were on a different filesystem. Here is the

Re: Panic while running defrag

2013-04-29 Thread cwillu
On Mon, Apr 29, 2013 at 9:20 PM, Stephen Weinberg step...@q5comm.com wrote: I ran into a panic while running find -xdev | xargs brtfs fi defrag '{}'. I don't remember the exact command because the history was not saved. I also started and stopped it a few times however. The kernel logs were

Re: [PATCH] btrfs: device delete to get errors from the kernel

2013-04-29 Thread Anand Jain
If you want to make this give you more specific errors then adjust the errno's we send back and make the userspace util translate those to their appropriate error. Thanks, Thats the approach #1 as listed before in this mail thread, let me give a try. Anand -- To unsubscribe from this