Re: WARNING: at fs/btrfs/free-space-cache.c:1887 after hard shutdown.

2012-06-29 Thread Jordan Windsor
On Fri, Jun 29, 2012 at 10:34 PM, Josef Bacik wrote: > On Fri, Jun 29, 2012 at 12:35:01AM -0600, Jordan Windsor wrote: >> On Fri, Jun 29, 2012 at 3:09 PM, Chris Samuel wrote: >> > On 29/06/12 15:36, Jordan Windsor wrote: >> > >> >> I get the same problem with linux-mainline from AUR (latest) >> >

Re: Kernel panic from "btrfs subvolume delete"

2012-06-29 Thread Hugo Mills
On Fri, Jun 29, 2012 at 03:23:13PM +0100, Richard Cooper wrote: > > On 29 Jun 2012, at 11:42, Fajar A. Nugraha wrote: > >> What should I do now? Do I need to upgrade to a more recent btrfs? > > > > Yep > > > >> If so, how? > > > > https://blogs.oracle.com/linux/entry/oracle_unbreakable_enterpri

Re: Kernel panic from "btrfs subvolume delete"

2012-06-29 Thread Fajar A. Nugraha
On Fri, Jun 29, 2012 at 9:23 PM, Richard Cooper wrote: >>> If so, how? >> >> https://blogs.oracle.com/linux/entry/oracle_unbreakable_enterprise_kernel_release >> http://elrepo.org/tiki/kernel-ml > > Perfect, thank you! I was looking for a mainline kernel yum repo but my > google-fu was failing me

Re: Kernel panic from "btrfs subvolume delete"

2012-06-29 Thread Richard Cooper
On 29 Jun 2012, at 11:42, Fajar A. Nugraha wrote: >> What should I do now? Do I need to upgrade to a more recent btrfs? > > Yep > >> If so, how? > > https://blogs.oracle.com/linux/entry/oracle_unbreakable_enterprise_kernel_release > http://elrepo.org/tiki/kernel-ml Perfect, thank you! I was lo

Re: Can give some help?

2012-06-29 Thread Zhi Yong Wu
On Fri, Jun 29, 2012 at 9:47 PM, Hugo Mills wrote: > On Fri, Jun 29, 2012 at 09:41:47PM +0800, Zhi Yong Wu wrote: >> HI, >> >> Can anyone let me know where the funtions are declared or defined, >> such as btrfs_header_nritems(), btrfs_header_level(), etc? thanks. > >   ctree.h, somewhere around or

Re: Can give some help?

2012-06-29 Thread Hugo Mills
On Fri, Jun 29, 2012 at 09:41:47PM +0800, Zhi Yong Wu wrote: > HI, > > Can anyone let me know where the funtions are declared or defined, > such as btrfs_header_nritems(), btrfs_header_level(), etc? thanks. ctree.h, somewhere around or after line 1550. They're all accessor functions, defined b

Can give some help?

2012-06-29 Thread Zhi Yong Wu
HI, Can anyone let me know where the funtions are declared or defined, such as btrfs_header_nritems(), btrfs_header_level(), etc? thanks. -- Regards, Zhi Yong Wu -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More

Re: [PATCH] Btrfs: fix dio write vs buffered read race V2

2012-06-29 Thread Chris Mason
On Thu, Jun 28, 2012 at 08:18:35PM -0600, Miao Xie wrote: > On Thu, 28 Jun 2012 08:34:23 -0400, Josef Bacik wrote: > > On Wed, Jun 27, 2012 at 09:35:08PM -0600, Miao Xie wrote: > >> On Tue, 26 Jun 2012 09:42:56 -0400, Josef Bacik wrote: > >>> From: Josef Bacik > >>> > >>> Miao pointed out there's

Re: WARNING: at fs/btrfs/free-space-cache.c:1887 after hard shutdown.

2012-06-29 Thread Josef Bacik
On Fri, Jun 29, 2012 at 12:35:01AM -0600, Jordan Windsor wrote: > On Fri, Jun 29, 2012 at 3:09 PM, Chris Samuel wrote: > > On 29/06/12 15:36, Jordan Windsor wrote: > > > >> I get the same problem with linux-mainline from AUR (latest) > > > > What does uname -a say ? > > > > cheers! > > Chris > > -

Re: Long btrfs hangs during suspend to RAM / BTRFS warning (device dm-0): Aborting unused transaction

2012-06-29 Thread Marc MERLIN
On Tue, Jun 26, 2012 at 10:20:12PM -0700, Marc MERLIN wrote: > On Tue, Jun 26, 2012 at 06:38:18PM -0700, Marc MERLIN wrote: > > Now, I'm also seeing these below and I have this again (86% CPU): > > 6076 root 20 0 000 R 86 0.0 29:40.11 > > btrfs-delalloc- > > > > How ba

Re: Kernel panic from "btrfs subvolume delete"

2012-06-29 Thread Duncan
Fajar A. Nugraha posted on Fri, 29 Jun 2012 17:42:26 +0700 as excerpted: > On Fri, Jun 29, 2012 at 5:11 PM, Richard Cooper > wrote: >> Hi All, >> >> I have two machines where I've been testing various btrfs based backup >> strategies. They are both Cent OS 6 with the standard kernel and >> btrfs-

Re: Kernel panic from "btrfs subvolume delete"

2012-06-29 Thread Fajar A. Nugraha
On Fri, Jun 29, 2012 at 5:11 PM, Richard Cooper wrote: > Hi All, > > I have two machines where I've been testing various btrfs based backup > strategies. They are both Cent OS 6 with the standard kernel and btrfs-progs > RPMs from the CentOS repos. > > - kernel-2.6.32-220.17.1.el6.x86_64 > - btr

Re: [PATCH 2/3] Btrfs-progs: make get default report correctly

2012-06-29 Thread Ilya Dryomov
On Fri, Jun 29, 2012 at 06:00:37PM +0800, Liu Bo wrote: > We have both set-default and get-default, but actually our get-default > does not show which one is the default one. > > This patch plus the kernel side patch fix this. Are you referring to the fact that get-default in Chris' btrfs-progs m

Kernel panic from "btrfs subvolume delete"

2012-06-29 Thread Richard Cooper
Hi All, I have two machines where I've been testing various btrfs based backup strategies. They are both Cent OS 6 with the standard kernel and btrfs-progs RPMs from the CentOS repos. - kernel-2.6.32-220.17.1.el6.x86_64 - btrfs-progs-0.19-12.el6.x86_64 Both are currently in a state when trying

Re: [PATCH 1/3] Btrfs-progs: add support to set subvolume/snapshot readonly

2012-06-29 Thread Ilya Dryomov
On Fri, Jun 29, 2012 at 06:00:36PM +0800, Liu Bo wrote: > Setting subvolume/snapshot readonly has been missing for a long time. > > With this patch, we can set a subvolume/snapshot readonly via: > > obtrfs subvolume set-ro Alexander's 'btrfs property' patches do exactly this, but in a much

[PATCH 2/3] Btrfs: update subvol_getflags/setflags to know new args from user

2012-06-29 Thread Liu Bo
I've modified 'btrfs subvolume list' to show a subvolume's attributes, such as readonly and default, and adopted a new structure for args for subvol_getflags/setflags. So here is the kernel side update. Signed-off-by: Liu Bo --- fs/btrfs/ioctl.c | 100 --

[PATCH 1/3] Btrfs: add default support for subvol getflags

2012-06-29 Thread Liu Bo
This is kernel side patch for 'btrfs subvolume get-default'. Our 'btrfs subvolume get-default' did not work as wish, because we do not have APIs to fetch the subvolume's default state. This patch treats default state as a flag and returns it to user space. Signed-off-by: Liu Bo --- fs/btrfs/io

[PATCH 3/3] Btrfs: use helper function to simplify code

2012-06-29 Thread Liu Bo
We've made a helper function for reading root, so just apply it. Signed-off-by: Liu Bo --- fs/btrfs/ioctl.c | 13 + 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index f9c2180..9b93fda 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrf

[PATCH 3/3] Btrfs-progs: add 's' option for 'btrfs subvolume list'

2012-06-29 Thread Liu Bo
We want 'btrfs subvolume list' to act as 'ls', which means that we can not only list out all the subvolumes we have, but also list each single one. So this patch add 's' option to show a single one: $ ./btrfs sub list /mnt/btrfs/ ID 256 top level 5 path subvol (Readonly,) ID 257 top level 5 path

[PATCH 2/3] Btrfs-progs: make get default report correctly

2012-06-29 Thread Liu Bo
We have both set-default and get-default, but actually our get-default does not show which one is the default one. This patch plus the kernel side patch fix this. Signed-off-by: Liu Bo --- Makefile |6 +++--- btrfs-list.c | 44 +--- cmds

[PATCH 1/3] Btrfs-progs: add support to set subvolume/snapshot readonly

2012-06-29 Thread Liu Bo
Setting subvolume/snapshot readonly has been missing for a long time. With this patch, we can set a subvolume/snapshot readonly via: obtrfs subvolume set-ro Signed-off-by: Liu Bo --- cmds-subvolume.c | 40 ioctl.h |7 +++ 2 files

[PATCH 3/4 v2] Btrfs: use mnt_want_write_file instead of mnt_want_write

2012-06-29 Thread Liu Bo
mnt_want_write_file is faster when file has been opened for write. Signed-off-by: Liu Bo --- fs/btrfs/ioctl.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 069cd85..df4c04d 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.

[PATCH 4/4 v2] Btrfs: do not set subvolume flags in readonly mode

2012-06-29 Thread Liu Bo
$ mkfs.btrfs /dev/sdb7 $ btrfstune -S1 /dev/sdb7 $ mount /dev/sdb7 /mnt/btrfs mount: block device /dev/sdb7 is write-protected, mounting read-only $ btrfs dev add /dev/sdb8 /mnt/btrfs/ Now we get a btrfs in which mnt flags has readonly but sb flags does not. So for those ioctls that only check sb

[PATCH 2/4 v2] Btrfs: remove redundant r/o check for superblock

2012-06-29 Thread Liu Bo
mnt_want_write() and mnt_want_write_file() will check sb->s_flags with MS_RDONLY, and we don't need to do it ourselves. Signed-off-by: Liu Bo --- fs/btrfs/ioctl.c |7 --- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index b5e946e..069

[PATCH 1/4 v2] Btrfs: check write access to mount earlier while creating snapshots

2012-06-29 Thread Liu Bo
Move check of write access to mount into upper functions so that we can use mnt_want_write_file instead, which is faster than mnt_want_write. Signed-off-by: Liu Bo --- fs/btrfs/ioctl.c | 22 +++--- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/fs/btrfs/ioctl.

Re: Error compiling btrfs-tools from git (undefined reference to `pthread_create')

2012-06-29 Thread Lenz Grimmer
Hi, thank you for your reply. On 06/27/2012 02:20 PM, cwillu wrote: > On Wed, Jun 27, 2012 at 6:11 AM, Lenz Grimmer wrote: >> On Ubuntu 11.10 "Oneiric" with gcc 4.6.1, compiling the btrfs tools from git >> fails for me with the following error: > > Which git repo? > git://git.kernel.org/pub/scm