Re: [PATCH] btrfs-progs: Add version.h dependency to fix parallel builds

2013-09-18 Thread Rongqing Li
On 09/18/2013 10:26 AM, Eric Sandeen wrote: On 9/17/13 8:56 PM, Eric Sandeen wrote: Change the suffix rule to ensure that version.h is built before we try to create any .o file. Reported-by: Roy Li rongqing...@windriver.com Signed-off-by: Eric Sandeen sand...@redhat.com --- I dunno, does

[PATCH 2/4] Btrfs-progs: pass flag to control whether run ioctl in btrfs_scan_for_fsid()

2013-09-18 Thread Wang Shilong
If some fatal superblocks are damaged, running ioctl will return failure, in this case, we should avoid run ioctl. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- btrfs-find-root.c | 2 +- chunk-recover.c | 2 +- disk-io.c | 6 +++--- disk-io.h | 3 ++- 4 files

[PATCH 0/4] add super-recover tool to recover bad supers

2013-09-18 Thread Wang Shilong
Until now if one of device's first superblock is corrupt,btrfs will fail to mount. Luckily, btrfs have at least two superblocks for every disk. In theory, if silent corrupting happens when we are writting superblocks into disk, we must hold at least one good superblock. One side effect is that

[PATCH 4/4] Btrfs-progs: add super-recover to recover bad supers

2013-09-18 Thread Wang Shilong
Until now if one of device's first superblock is corrupt,btrfs will fail to mount. Luckily, btrfs have at least two superblocks for every disk. In theory, if silent corrupting happens when we are writting superblocks into disk, we must hold at least one good superblock. One side effect is that

[PATCH 3/4] Btrfs-progs: move ask_user() to utils.c

2013-09-18 Thread Wang Shilong
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com --- chunk-recover.c | 18 -- utils.c | 18 ++ utils.h | 1 + 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/chunk-recover.c b/chunk-recover.c index 9af4887..e44ca72 100644 ---

Re: [PATCH] btrfs: drop unused parameter from btrfs_item_nr

2013-09-18 Thread Ross Kirk
On 16 September 2013 16:50, David Sterba dste...@suse.cz wrote: On Mon, Sep 16, 2013 at 03:58:09PM +0100, Ross Kirk wrote: Remove unused eb parameter from btrfs_item_nr Hmm it's been unused since day one 5f39d397dfbe140a14edecd4e73c34ce23c4f9ee Mon Oct 15 16:14:19 2007 Signed-off-by: Ross

Re: [patch 1/9] btrfs: add ioctls to query/change feature bits online

2013-09-18 Thread David Sterba
On Mon, Sep 16, 2013 at 02:19:11PM -0400, Jeff Mahoney wrote: +static int btrfs_ioctl_set_features(struct file *file, void __user *arg) +{ ... + trans = btrfs_start_transaction(root, 1); trans = btrfs_start_transaction(root, 0); + if (IS_ERR(trans)) + return

Re: [patch 1/9] btrfs: add ioctls to query/change feature bits online

2013-09-18 Thread David Sterba
On Mon, Sep 16, 2013 at 02:19:11PM -0400, Jeff Mahoney wrote: There are some feature bits that require no offline setup and can be enabled online. I've only reviewed extended irefs, but there will probably be more. Each feature bit being set online has to be treated separately regarding safety

Re: [PATCH] btrfs: drop unused parameter from btrfs_item_nr

2013-09-18 Thread David Sterba
On Wed, Sep 18, 2013 at 01:28:32PM +0100, Ross Kirk wrote: Signed-off-by: Ross Kirk ross.k...@gmail.com Reviewed-by: David Sterba dste...@suse.cz Do I need to update anything following the Reviewed-by sign off? First time submitting a patch so still working things out :) No you don't,

Re: [patch 1/9] btrfs: add ioctls to query/change feature bits online

2013-09-18 Thread Jeff Mahoney
On 9/18/13 10:14 AM, David Sterba wrote: On Mon, Sep 16, 2013 at 02:19:11PM -0400, Jeff Mahoney wrote: There are some feature bits that require no offline setup and can be enabled online. I've only reviewed extended irefs, but there will probably be more. Each feature bit being set online

Re: [PATCH] btrfs-progs: Add dependencies explicitly to fix a parallel build issue

2013-09-18 Thread David Sterba
On Wed, Sep 18, 2013 at 09:11:01AM +0800, rongqing...@windriver.com wrote: From: Roy Li rongqing...@windriver.com The dependencies of all: version.h or other similar ones can not fix the parallel build failure, only reduce the times; In fact, many *.o files require version.h file.

[PATCH] Btrfs: kill delay_iput arg to the wait_ordered functions V2

2013-09-18 Thread Josef Bacik
This is a left over of how we used to wait for ordered extents, which was to grab the inode and then run filemap flush on it. However if we have an ordered extent then we already are holding a ref on the inode, and we just use btrfs_start_ordered_extent anyway, so there is no reason to have an

Re: [PATCH 4/4] Btrfs-progs: add super-recover to recover bad supers

2013-09-18 Thread David Sterba
On Wed, Sep 18, 2013 at 04:27:36PM +0800, Wang Shilong wrote: --- a/disk-io.c +++ b/disk-io.c @@ -982,7 +982,8 @@ int btrfs_setup_chunk_tree_and_device_map(struct btrfs_fs_info *fs_info) static struct btrfs_fs_info *__open_ctree_fd(int fp, const char *path,

Re: [PATCH 0/4] add super-recover tool to recover bad supers

2013-09-18 Thread David Sterba
On Wed, Sep 18, 2013 at 04:27:32PM +0800, Wang Shilong wrote: Until now if one of device's first superblock is corrupt,btrfs will fail to mount. Luckily, btrfs have at least two superblocks for every disk. This little program will scan devices and find good superblocks (max generation,

[PATCH] btrfs-progs: remove leftovers from hg times

2013-09-18 Thread David Sterba
Signed-off-by: David Sterba dste...@suse.cz --- .hgignore | 1 - .hgtags| 15 --- version.sh | 20 3 files changed, 36 deletions(-) delete mode 100644 .hgignore delete mode 100644 .hgtags diff --git a/.hgignore b/.hgignore deleted file mode 100644 index

Re: [PATCH 4/4] Btrfs-progs: add super-recover to recover bad supers

2013-09-18 Thread Wang Shilong
Hello David, On Wed, Sep 18, 2013 at 04:27:36PM +0800, Wang Shilong wrote: --- a/disk-io.c +++ b/disk-io.c @@ -982,7 +982,8 @@ int btrfs_setup_chunk_tree_and_device_map(struct btrfs_fs_info *fs_info) static struct btrfs_fs_info *__open_ctree_fd(int fp, const char *path,

[PATCH] btrfs-progs: look up the containing tree root id

2013-09-18 Thread David Sterba
Find the tree id of the containing subvolume for a given file or directory. For subvolume return it's own id. $ btrfs inspect-internal rootid path Signed-off-by: David Sterba dste...@suse.cz --- cmds-inspect.c | 38 ++ man/btrfs.8.in |9 +

Re: [PATCH 4/4] Btrfs-progs: add super-recover to recover bad supers

2013-09-18 Thread David Sterba
On Wed, Sep 18, 2013 at 11:31:16PM +0800, Wang Shilong wrote: static struct btrfs_fs_info *__open_ctree_fd(int fp, const char *path, u64 sb_bytenr, u64 root_tree_bytenr, int writes, -

Re: Build failures due to commit 416161db (btrfs: offline dedupe)

2013-09-18 Thread Guenter Roeck
On Tue, Sep 17, 2013 at 03:43:54PM -0700, Mark Fasheh wrote: On Fri, Sep 13, 2013 at 03:33:34PM -0400, Chris Mason wrote: Mark, could you please send a patch for the whole-struct option until the unaligned put is upstreamed? -chris Here you go. It's been lightly tested and needs

Re: rootfs crash

2013-09-18 Thread Jogi Hofmüller
Hi Clemens, all, Am 2013-09-17 20:53, schrieb Clemens Eisserer: a. comment out the free()-calls which led to crashes Uh, well, I did not want to go that far ;) I'm certainly not the greatest programmer around, but not freeing allocated memory seems kind of drastic. Anyway, I checked out a

[PATCH] xfstests: introduce _filter_backtick

2013-09-18 Thread Josef Bacik
Apparently the GNU guys decided to change their error output from something like Error `Error message' To Error 'Error message' So to fix this I've introduced _filter_backtick which will change any ` to ' and then changed the output of the tests that were failing for me because of this output.

[PATCH] xfstests: fix set-default test in btrfs/001

2013-09-18 Thread Josef Bacik
We were actually testing this improperly, there was a bug in the set default code so we weren't actually honoring the 0 subvolid properly. To fix this we need to get the subvolid for the subvol we want to set as the default and use that in the command. With this patch we now pass again with the

Re: [PATCH] Btrfs: export btrfs space shared info to userspace

2013-09-18 Thread Josef Bacik
On Mon, Sep 16, 2013 at 03:40:12PM +0800, Liu Bo wrote: Similar to ocfs2, btrfs also supports that extents can be shared by different inodes, and there are some userspace tools requesting for this kind of 'space shared infomation'.[1] ocfs2 uses flag FIEMAP_EXTENT_SHARED, so does btrfs.

Re: [PATCH] xfstests: introduce _filter_backtick

2013-09-18 Thread Dave Chinner
On Wed, Sep 18, 2013 at 04:29:26PM -0400, Josef Bacik wrote: Apparently the GNU guys decided to change their error output from something like Error `Error message' To Error 'Error message' So to fix this I've introduced _filter_backtick which will change any ` to ' and then

Re: Build failures due to commit 416161db (btrfs: offline dedupe)

2013-09-18 Thread Mark Fasheh
On Wed, Sep 18, 2013 at 11:40:07AM -0700, Guenter Roeck wrote: On Tue, Sep 17, 2013 at 03:43:54PM -0700, Mark Fasheh wrote: On Fri, Sep 13, 2013 at 03:33:34PM -0400, Chris Mason wrote: Mark, could you please send a patch for the whole-struct option until the unaligned put is upstreamed?