[PATCH] btrfs-progs: Init root_item to avoid gcc 4.8.2 warning

2014-02-26 Thread Qu Wenruo
When using gcc 4.8.2, -Wmaybe-uninitialized will report root_item may be used uninitialized. Since root_item_valid variant is used to determine the root_item valid, it's a false alert and to avoid the warning, just init it on allocation. Signed-off-by: Qu Wenruo quwen...@cn.fujitsu.com ---

Re: [PATCH 7/9] Btrfs: stop joining the log transaction if sync log fails

2014-02-26 Thread Miao Xie
On Sat, 22 Feb 2014 01:27:51 +0100, David Sterba wrote: On Thu, Feb 20, 2014 at 06:08:57PM +0800, Miao Xie wrote: --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -142,6 +142,12 @@ static int start_log_trans(struct btrfs_trans_handle *trans, mutex_lock(root-log_mutex);

Re: [PATCH 4/9] Btrfs: use bitfield instead of integer data type for the some variants in btrfs_root

2014-02-26 Thread Miao Xie
On Sat, 22 Feb 2014 01:23:37 +0100, David Sterba wrote: On Thu, Feb 20, 2014 at 06:08:54PM +0800, Miao Xie wrote: @@ -1352,13 +1347,15 @@ static struct btrfs_root *alloc_log_tree(struct btrfs_trans_handle *trans, root-root_key.objectid = BTRFS_TREE_LOG_OBJECTID; root-root_key.type

[PATCH] btrfs: Allow forced conversion of metadata to dup profile on, multiple devices

2014-02-26 Thread Austin S Hemmelgarn
Currently, btrfs balance start fails when trying to convert metadata or system chunks to dup profile on filesystems with multiple devices. This requires that a conversion from a multi-device filesystem to a single device filesystem use the following methodology: 1. btrfs balance start

Re: 3.14.0rc3: did not find backref in send_root

2014-02-26 Thread Marc MERLIN
On Wed, Feb 26, 2014 at 03:51:37PM +0800, Wang Shilong wrote: I've applied your patch from https://git.kernel.org/cgit/linux/kernel/git/josef/btrfs-next.git/commit/?id=1334bebe71bebbca47b3b92f25511ea980fdeab8 I can confirm this fixed the btrfs send error on my server, thank you. At snapshot

Re: [PATCH 2/2] Btrfs-progs: use bitfield instead of integer for some variants in fs_info

2014-02-26 Thread David Sterba
On Wed, Feb 26, 2014 at 10:25:24AM +0800, Wang Shilong wrote: On 02/26/2014 12:28 AM, David Sterba wrote: On Tue, Feb 25, 2014 at 07:48:57PM +0800, Wang Shilong wrote: Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- ctree.h | 8 +--- 1 file changed, 5 insertions(+), 3

Re: [PATCH 1/2] Btrfs: remove unneeded field / smaller extent_map structure

2014-02-26 Thread David Sterba
On Tue, Feb 25, 2014 at 02:15:12PM +, Filipe David Borba Manana wrote: We don't need to have an unsigned int field in the extent_map struct to tell us whether the extent map is in the inode's extent_map tree or not. We can use the rb_node struct field and the RB_CLEAR_NODE and

Re: [RFC PATCH v8 00/14] Online(inband) data deduplication

2014-02-26 Thread Jannis Achstetter
Jannis Achstetter jannis_achstetter at web.de writes: I tried yout btrfs deduplication patches today (on top of 3.13.2-gentoo) and it seems that the deduplication works great (when copying the same or similar data to the file system, the used size reported by df -h grows less than the data

Re: How to identify if a partition containing a btrfs volume is mounted and where

2014-02-26 Thread Mike Fleetwood
On 25 February 2014 10:28, Mike Fleetwood mike.fleetw...@googlemail.com wrote: On 25 February 2014 03:01, Anand Jain anand.j...@oracle.com wrote: # mkfs.btrfs /dev/sdb2 /dev/sdb3 /dev/sdb4 # mount /dev/sdb2 /mnt/1 # btrfs device delete /dev/sdb2 /mnt/1 So /dev/sdb2 is no longer part of the

Re: [PATCH] Btrfs: use btrfs_crc32c everywhere instead of libcrc32c

2014-02-26 Thread WorMzy Tykashi
On 29 January 2014 21:06, Filipe David Borba Manana fdman...@gmail.com wrote: After the commit titled Btrfs: fix btrfs boot when compiled as built-in, LIBCRC32C requirement was removed from btrfs' Kconfig. This made it not possible to build a kernel with btrfs enabled (either as module or

[PATCH 9/9] iov_iter: Kill written arg to iov_iter_init()

2014-02-26 Thread Kent Overstreet
This gets rid of a usually needless call to iov_iter_advance(). Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Alexander Viro v...@zeniv.linux.org.uk Cc: Jens Axboe ax...@kernel.dk Cc: Chris Mason c...@fb.com Cc: linux-btrfs@vger.kernel.org Cc: Steve French sfre...@samba.org Cc:

[PATCH 6/9] btrfs: Convert to bio_for_each_segment()

2014-02-26 Thread Kent Overstreet
This is going to be important for future (hopeful) block layer refactoring, and using the standard primitives makes the code easier to audit. Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Chris Mason c...@fb.com Cc: linux-btrfs@vger.kernel.org --- fs/btrfs/extent_io.c | 12 ---

[PATCH 5/9] btrfs: generic_make_request() handles arbitrary size bios now

2014-02-26 Thread Kent Overstreet
So there's no need for btrfs to break up bios for device limits anymore Signed-off-by: Kent Overstreet k...@daterainc.com Cc: Chris Mason c...@fb.com Cc: linux-btrfs@vger.kernel.org --- fs/btrfs/volumes.c | 73 -- 1 file changed, 73

Re: No space left on device (again)

2014-02-26 Thread Marcus Sundman
On 25.02.2014 22:30, Josef Bacik wrote: On 02/25/2014 03:27 PM, Marcus Sundman wrote: On 25.02.2014 22:19, Hugo Mills wrote: On Tue, Feb 25, 2014 at 01:05:51PM -0500, Jim Salter wrote: 370GB of 410GB used isn't really fine, it's over 90% usage. That said, I'd be interested to know why btrfs

Re: No space left on device (again)

2014-02-26 Thread Josef Bacik
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/26/2014 07:16 PM, Marcus Sundman wrote: On 25.02.2014 22:30, Josef Bacik wrote: On 02/25/2014 03:27 PM, Marcus Sundman wrote: On 25.02.2014 22:19, Hugo Mills wrote: On Tue, Feb 25, 2014 at 01:05:51PM -0500, Jim Salter wrote: 370GB of 410GB

Re: [RFC PATCH v8 00/14] Online(inband) data deduplication

2014-02-26 Thread Liu Bo
Hi Jannis, On Wed, Feb 26, 2014 at 08:20:01PM +, Jannis Achstetter wrote: Jannis Achstetter jannis_achstetter at web.de writes: I tried yout btrfs deduplication patches today (on top of 3.13.2-gentoo) and it seems that the deduplication works great (when copying the same or similar

[PATCH 1/3] Btrfs: don't skip the page flush since the enospc is not brought by it

2014-02-26 Thread Miao Xie
As we know, btrfs flushes the continuous pages as many as possible, but if all the free spaces are small, we will allocate the spaces by several times, and if there is something wrong with the space reservation, it is very likely that some allocations succeed and the others fail. But the current

[PATCH 2/3] Btrfs: fix wrong lock range and write size in check_can_nocow()

2014-02-26 Thread Miao Xie
The write range may not be sector-aligned, for example: ||| - write range, sector-unaligned, size: 2blocks |||| - correct lock range, size: 3blocks But according to the old code, we used the size of write range to calculate the lock range

[PATCH 3/3] Btrfs: fix preallocate vs double nocow write

2014-02-26 Thread Miao Xie
We can not release the reserved metadata space for the first write if we find the write position is pre-allocated. Because the kernel might write the data on the disk before we do the second write but after the can-nocow check, if we release the space for the first write, we might fail to update

[PATCH v3 2/4 ] Btrfs-progs: switch to arg_strtou64() part1

2014-02-26 Thread Wang Shilong
switch to arg_strtou64 plus some cleanups to remove unnecessary codes. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- v2-v3: fix a regression in parse_size() where we can not use new helper actually. --- btrfs-find-root.c | 23 +++ btrfs-list.c

[PATCH 1/4] Btrfs: rename waiting_dir_move

2014-02-26 Thread Liu Bo
This is a preparation work, rename waiting_dir_move to send_dir_node. We'd like to share waiting_dir_move structure in new did_create_dir() code. Signed-off-by: Liu Bo bo.li@oracle.com --- fs/btrfs/send.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git

[PATCH 2/4] Btrfs: check if directory has already been created smarter

2014-02-26 Thread Liu Bo
Currently to check whether a directory has been created, we search DIR_INDEX items one by one to check if children has been processed. Try to picture such a scenario: . |-- dir(ino X) |-- foo_1(ino X+1) |-- ... |-- foo_k(ino X+k) With the

[PATCH 2/2 v2] Btrfs: check if directory has already been created smarter

2014-02-26 Thread Liu Bo
Currently to check whether a directory has been created, we search DIR_INDEX items one by one to check if children has been processed. Try to picture such a scenario: . |-- dir(ino X) |-- foo_1(ino X+1) |-- ... |-- foo_k(ino X+k) With the

Re: No space left on device (again)

2014-02-26 Thread Hugo Mills
On Thu, Feb 27, 2014 at 02:16:07AM +0200, Marcus Sundman wrote: On 25.02.2014 22:30, Josef Bacik wrote: On 02/25/2014 03:27 PM, Marcus Sundman wrote: On 25.02.2014 22:19, Hugo Mills wrote: On Tue, Feb 25, 2014 at 01:05:51PM -0500, Jim Salter wrote: 370GB of 410GB used isn't really fine, it's