[PATCH 2/2] btrfs: store pointer to superblock in bd_super

2012-10-11 Thread Fernando Luis Vázquez Cao
Subject: btrfs: store pointer to superblock in bd_super This is needed to get get_active_super and, by extension, thaw_bdev initiated freezes working. Thanks go to Josef Bacik and Christoph Hellwig for initiating this effort to fix btrfs and for suggesting the solution implemented here, respectiv

[PATCH 1/2] vfs: leverage bd_super in get_active_super

2012-10-11 Thread Fernando Luis Vázquez Cao
Subject: vfs: leverage bd_super in get_active_super Using get_active_super will not work properly if the fs (like btrfs) does not save its s_bdev with the device it is on. Also it does not provide the entire picture, since an filesystem can be contained on multiple disks (again like btrfs). Fort

Re: [PATCH v2 1/4] Btrfs-progs: add mount-option command

2012-10-11 Thread Tsutomu Itoh
Hi, Seto-san, (2012/10/12 12:24), Hidetoshi Seto wrote: > This patch adds mount-option command that can set/get/clear default > mount options. > > Signed-off-by: Hidetoshi Seto > --- > Makefile |4 +- > btrfs-parse-mntopt.c | 109 + > btrfs-parse-

[PATCH 4/4] Btrfs-progs: add btrfs subvol show cli

2012-10-11 Thread Anand jain
From: Anand Jain This will add a sub command to show information about a subvol. eg: btrfs su show /btrfs/sssv3 /btrfs/sssv3 uuid: c5d646b5-a749-c646-b082-6d9a3ca870be Parent uuid:34bc8edd-113f-5141-a814-f6dfae069b01 Creation time: 2012-10-12 11:37:00 Signe

[PATCH 3/4] Btrfs-progs: method to fetch root info for subvol

2012-10-11 Thread Anand jain
From: Anand Jain Signed-off-by: Anand Jain --- btrfs-list.c | 37 + btrfs-list.h |1 + 2 files changed, 38 insertions(+), 0 deletions(-) diff --git a/btrfs-list.c b/btrfs-list.c index c0407c9..5eada92 100644 --- a/btrfs-list.c +++ b/btrfs-list.c @@ -12

[PATCH 2/4] Btrfs-progs: need struct root_info to be accesible

2012-10-11 Thread Anand jain
From: Anand Jain Signed-off-by: Anand Jain --- btrfs-list.c | 47 --- btrfs-list.h | 48 +++- 2 files changed, 47 insertions(+), 48 deletions(-) diff --git a/btrfs-list.c b/btrfs-list.c index 657e4db..c

[PATCH 1/4] Btrfs-progs: introduce btrfs_get_subvols function

2012-10-11 Thread Anand jain
From: Anand Jain Having this not part of btrfs_list_subvols will help code reuse. Signed-off-by: Anand Jain --- btrfs-list.c | 35 +-- 1 files changed, 21 insertions(+), 14 deletions(-) diff --git a/btrfs-list.c b/btrfs-list.c index 20da828..657e4db 100644 --

[PATCH 0/4] Add show sub command to btrfs subvolume

2012-10-11 Thread Anand jain
From: Anand Jain This set of patch will add show sub-command to btrfs subvolume, which is to show more information about a given subvol or snapshot. At present it shows 3 info, I hope this will be further useful if enhanced as needed. eg: # btrfs su show /btrfs/sssv3 /btrfs/sssv3 uuid:

[PATCH v2 4/4] btrfs: support default mount options

2012-10-11 Thread Hidetoshi Seto
Make space to save default mount options in super block. Parse saved default mount options first and then parse mount options given when the file system is mounted. Signed-off-by: Hidetoshi Seto --- fs/btrfs/ctree.h |7 ++- fs/btrfs/super.c | 16 ++-- 2 files changed, 20 in

[PATCH v2 3/4] btrfs: make subroutine __btrfs_parse_options

2012-10-11 Thread Hidetoshi Seto
Separate long switch statement to be reused. Signed-off-by: Hidetoshi Seto --- fs/btrfs/super.c | 431 +++--- 1 files changed, 214 insertions(+), 217 deletions(-) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 83d6f9f..d51aaee 100644 ---

[PATCH v2 2/4] Btrfs-progs: add mount-option command man page

2012-10-11 Thread Hidetoshi Seto
Add mount-option command man page. Signed-off-by: Hidetoshi Seto --- man/btrfs.8.in | 25 + 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/man/btrfs.8.in b/man/btrfs.8.in index 4b0a9f9..85d5030 100644 --- a/man/btrfs.8.in +++ b/man/btrfs.8.in @@ -52,6 +

[PATCH v2 1/4] Btrfs-progs: add mount-option command

2012-10-11 Thread Hidetoshi Seto
This patch adds mount-option command that can set/get/clear default mount options. Signed-off-by: Hidetoshi Seto --- Makefile |4 +- btrfs-parse-mntopt.c | 109 + btrfs-parse-mntopt.h | 66 ++ btrfs.c |1 + cmds-moun

[PATCH v2 0/4] Btrfs: set mount options permanently

2012-10-11 Thread Hidetoshi Seto
Following patches are going to implement one of unclaimed features listed in the btrfs wiki: https://btrfs.wiki.kernel.org/index.php/Project_ideas#Set_mount_options_permanently Previous v1 post and discussion can be referred from: http://lwn.net/Articles/516898/ v2: - Allow operator [+-=] like c

Re: [PATCH] Btrfs: extended inode refs support for send mechanism

2012-10-11 Thread Mark Fasheh
Hi Jan! On Wed, Oct 10, 2012 at 01:21:31PM +0200, Jan Schmidt wrote: > @@ -1574,11 +1599,22 @@ static int get_first_ref(struct send_ctx *sctx, > goto out; > } > > - iref = btrfs_item_ptr(path->nodes[0], path->slots[0], > - struct btrfs_inode_ref); > -

Re: [PATCH 3/4] btrfs-progs: btrfsck: Print feedback about fscking to stdout.

2012-10-11 Thread mail
Hi, > I agree that the important messages from fsck process should be printed > to stdout, and the rest like 'cannot find a valid fs on /dev' belong to > stderr so the user can simply call > > btrfsck > logfile > > and does not miss any messages in the log, while will be informed that > the proc

Re: problems with btrfs send / restore

2012-10-11 Thread Stefan Priebe
Am 11.10.2012 21:43, schrieb David Sterba: On Thu, Oct 11, 2012 at 09:33:54PM +0200, Stefan Priebe wrote: [server: /btrfs/target]# btrfs send -i /btrfs/src/\@snapshot/1 /btrfs/src/\@snapshot/2 | btrfs receive /btrfs/target/\@snapshot/ At subvol /btrfs/src/@snapshot/2 At subvol 2 ERROR: failed to

Re: problems with btrfs send / restore

2012-10-11 Thread David Sterba
On Thu, Oct 11, 2012 at 09:33:54PM +0200, Stefan Priebe wrote: > [server: /btrfs/target]# btrfs send -i /btrfs/src/\@snapshot/1 > /btrfs/src/\@snapshot/2 | btrfs receive /btrfs/target/\@snapshot/ > At subvol /btrfs/src/@snapshot/2 > At subvol 2 > ERROR: failed to open /btrfs/target/@snapshot/@snaps

problems with btrfs send / restore

2012-10-11 Thread Stefan Priebe
Hello list, i wanted to try to out btrfs send and restore but i'm failing on a simple step: [server: /btrfs/target]# btrfs send /btrfs/src/\@snapshot/1 | btrfs receive /btrfs/target/\@snapshot/ At subvol /btrfs/src/@snapshot/1 At subvol 1 [server: /btrfs/target]# ls -la /btrfs/target/\@snaps

Re: use_block_rsv problems with 3.6.1

2012-10-11 Thread Stefan Priebe
Am 11.10.2012 20:51, schrieb Josef Bacik: On Thu, Oct 11, 2012 at 12:35:48PM -0600, Stefan Priebe wrote: Hello, on i've seen the following backtrace a lot on 3.6.1: [ 2231.644332] use_block_rsv: 1451 callbacks suppressed [ 2231.645249] btrfs: block rsv returned -28 Yeah this is the last deep

Re: use_block_rsv problems with 3.6.1

2012-10-11 Thread Josef Bacik
On Thu, Oct 11, 2012 at 12:35:48PM -0600, Stefan Priebe wrote: > Hello, > > on i've seen the following backtrace a lot on 3.6.1: > [ 2231.644332] use_block_rsv: 1451 callbacks suppressed > [ 2231.645249] btrfs: block rsv returned -28 Yeah this is the last deep dark corner of ENOSPC, we don't quit

use_block_rsv problems with 3.6.1

2012-10-11 Thread Stefan Priebe
Hello, on i've seen the following backtrace a lot on 3.6.1: [ 2231.644332] use_block_rsv: 1451 callbacks suppressed [ 2231.645249] btrfs: block rsv returned -28 [ 2231.645250] [ cut here ] [ 2231.646163] WARNING: at fs/btrfs/extent-tree.c:6323 use_block_rsv+0x19a/0x1a0 [b

Re: btrfs receive to subdirectory

2012-10-11 Thread Alex Lyakas
Hi Rory, my kernel is slightly different, but the send-receive kernel code that I use is on the same commit. However, the issue you are hitting is most probably not a kernel issue. The receive part works totally in user-space. To confirm that, maybe you can post somewhere the full- and diff-streams

Re: Varying Leafsize and Nodesize in Btrfs

2012-10-11 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/30/2012 12:25 PM, Josef Bacik wrote: > Once you cross some hardware dependant threshold (usually past 32k) > you start incurring high memmove() overhead in most workloads. > Like all benchmarking its good to test your workload and see what > works

Re: [PATCH 0/3] Update LZO compression

2012-10-11 Thread Markus F.X.J. Oberhumer
Thanks Arnd, On 2012-10-11 13:41, Arnd Bergmann wrote: > On Tuesday 09 October 2012, Markus F.X.J. Oberhumer wrote: >>> >>> : This commit updates the kernel LZO code to the current upsteam version >>> : which features a significant speed improvement - benchmarking the Calgary >>> : and Silesia tes

Re: btrfs receive to subdirectory

2012-10-11 Thread Rory Campbell-Lange
On 11/10/12, Alex Lyakas (alex.bt...@zadarastorage.com) wrote: > Hi Rory, > all your tests work perfectly for me (really, I swear:)), with exact > same mount points and subvol/snap/dir names. > Just to make that the patch some how did not get messed up in the > mail, I attach it. ... happy to try

Re: [RFC v3 01/13] btrfs: add one new mount option '-o hot_track'

2012-10-11 Thread Zhi Yong Wu
On Thu, Oct 11, 2012 at 10:41 PM, David Sterba wrote: > On Thu, Oct 11, 2012 at 10:35:28PM +0800, Zhi Yong Wu wrote: >> >> --- a/fs/btrfs/super.c >> >> +++ b/fs/btrfs/super.c >> >> @@ -303,7 +304,7 @@ enum { >> >> Opt_notreelog, Opt_ratio, Opt_flushoncommit, Opt_discard, >> >> Opt_spac

Re: [RFC v3 01/13] btrfs: add one new mount option '-o hot_track'

2012-10-11 Thread David Sterba
On Thu, Oct 11, 2012 at 10:35:28PM +0800, Zhi Yong Wu wrote: > >> --- a/fs/btrfs/super.c > >> +++ b/fs/btrfs/super.c > >> @@ -303,7 +304,7 @@ enum { > >> Opt_notreelog, Opt_ratio, Opt_flushoncommit, Opt_discard, > >> Opt_space_cache, Opt_clear_cache, Opt_user_subvol_rm_allowed, > >>

Re: [RFC v3 01/13] btrfs: add one new mount option '-o hot_track'

2012-10-11 Thread Zhi Yong Wu
On Thu, Oct 11, 2012 at 12:28 AM, David Sterba wrote: > Hi, > > On Wed, Oct 10, 2012 at 06:07:23PM +0800, zwu.ker...@gmail.com wrote: >> --- a/fs/btrfs/ctree.h >> +++ b/fs/btrfs/ctree.h >> @@ -1726,6 +1726,7 @@ struct btrfs_ioctl_defrag_range_args { >> #define BTRFS_MOUNT_CHECK_INTEGRITY (1 << 2

Re: [btrfs-progs: PATCH] version.sh: fix version when built from tarball

2012-10-11 Thread Chris Mason
On Thu, Oct 11, 2012 at 02:43:48AM -0600, Sergei Trofimovich wrote: > From: Sergei Trofimovich > > [from 0.20-rc1 tarball] > > Before the patch: > $ ./btrfs --version > Btrfs Btrfs v0.19 > > After the patch: > $ ./btrfs --version > Btrfs v0.20-rc1 Thanks! -chris -- To unsubscribe from

[PATCH] Btrfs: Fix wrong error handling code

2012-10-11 Thread Stefan Behrens
gcc says "warning: comparison of unsigned expression >= 0 is always true" because i is an unsigned long. And gcc is right this time. Signed-off-by: Stefan Behrens --- fs/btrfs/extent_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/exte

Re: [RFC v3 01/13] btrfs: add one new mount option '-o hot_track'

2012-10-11 Thread Zhi Yong Wu
On Thu, Oct 11, 2012 at 12:28 AM, David Sterba wrote: > Hi, > > On Wed, Oct 10, 2012 at 06:07:23PM +0800, zwu.ker...@gmail.com wrote: >> --- a/fs/btrfs/ctree.h >> +++ b/fs/btrfs/ctree.h >> @@ -1726,6 +1726,7 @@ struct btrfs_ioctl_defrag_range_args { >> #define BTRFS_MOUNT_CHECK_INTEGRITY (1 << 2

Re: [RFC v3 02/13] vfs: introduce private radix tree structures

2012-10-11 Thread Zhi Yong Wu
On Wed, Oct 10, 2012 at 11:34 PM, David Sterba wrote: > On Wed, Oct 10, 2012 at 06:07:24PM +0800, zwu.ker...@gmail.com wrote: >> +void hot_track_init(struct super_block *sb) >> +{ > ... >> +} > >> +void hot_track_exit(struct super_block *sb) >> +{ >> + hot_cache_exit(); >> +} > > Needs to be e

Re: [PATCH] Btrfs: fix page leakage

2012-10-11 Thread Stefan Behrens
On Fri, 5 Oct 2012 16:55:00 -0400, Josef Bacik wrote: > Alloc_dummy_extent_buffer will not free the first page in the eb array if we > fail to allocate a page, fix this. Thanks, > > Reported-by: David Sterba > Signed-off-by: Josef Bacik > --- > fs/btrfs/extent_io.c |2 +- > 1 files changed

Re: btrfs receive to subdirectory

2012-10-11 Thread Alex Lyakas
Hi Rory, all your tests work perfectly for me (really, I swear:)), with exact same mount points and subvol/snap/dir names. Just to make that the patch some how did not get messed up in the mail, I attach it. Can you pls post the output of "cat /proc/mounts" and "mount" (if you're willing to debug

Re: [PATCH 0/3] Update LZO compression

2012-10-11 Thread Arnd Bergmann
On Tuesday 09 October 2012, Markus F.X.J. Oberhumer wrote: > > > > : This commit updates the kernel LZO code to the current upsteam version > > : which features a significant speed improvement - benchmarking the Calgary > > : and Silesia test corpora typically shows a doubled performance in > > :

Re: btrfs receive to subdirectory

2012-10-11 Thread Rory Campbell-Lange
On 11/10/12, Alex Lyakas (alex.bt...@zadarastorage.com) wrote: > I am using the latest code from Chris's repo ( > git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git), > which has been updated recently (latest commit > 91d9eec1ff044394f2b98ee7fcb76713dd33b994). > Do you think you ca

Re: Anyone seeing lots of "Check tree block failed" and other errors with latest kernel?

2012-10-11 Thread Chris Mason
On Thu, Oct 11, 2012 at 01:28:21AM -0600, Richard W.M. Jones wrote: > Well the bad news is that the bug happened again overnight, even > though we were definitely using btrfs-progs with the 6eba90029 patch > added, _and_ it was doing a sync + fsync between the mkfs and the > mount. This is good ju

Re: [PATCH] Btrfs: extended inode refs support for send mechanism

2012-10-11 Thread Alex Lyakas
Hi Jan, On Wed, Oct 10, 2012 at 1:21 PM, Jan Schmidt wrote: > This adds support for the new extended inode refs to btrfs send. > > Signed-off-by: Jan Schmidt > --- > fs/btrfs/backref.c | 22 - > fs/btrfs/backref.h |4 ++ > fs/btrfs/send.c| 129 >

Re: btrfs receive to subdirectory

2012-10-11 Thread Alex Lyakas
Hi Rory, thanks for letting me know. I am using the latest code from Chris's repo ( git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git), which has been updated recently (latest commit 91d9eec1ff044394f2b98ee7fcb76713dd33b994). Do you think you can try the following patch on top of

[btrfs-progs: PATCH] version.sh: fix version when built from tarball

2012-10-11 Thread Sergei Trofimovich
From: Sergei Trofimovich [from 0.20-rc1 tarball] Before the patch: $ ./btrfs --version Btrfs Btrfs v0.19 After the patch: $ ./btrfs --version Btrfs v0.20-rc1 Signed-off-by: Sergei Trofimovich --- version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.s

Re: Anyone seeing lots of "Check tree block failed" and other errors with latest kernel?

2012-10-11 Thread Richard W.M. Jones
Well the bad news is that the bug happened again overnight, even though we were definitely using btrfs-progs with the 6eba90029 patch added, _and_ it was doing a sync + fsync between the mkfs and the mount. Here is the log: modprobe btrfs [ 15.716610] Btrfs loaded grep ^[[:space:]]*btrfs$ /proc