Re: [PATCH RESEND] Btrfs: fix inaccurate available space on raid0 profile

2011-12-14 Thread Helmut Hullen
Hallo, Miao, Du meintest am 14.12.11: When we use raid0 as the data profile, df command may show us a very inaccurate value of the available space, which may be much less than the real one. It may make the users puzzled. Fix it by changing the calculation of the available space, and making

Re: [PATCH] Btrfs: don't panic if orphan item already exists

2011-12-14 Thread Miao Xie
On wed, 14 Dec 2011 10:07:39 +0800, WuBo wrote: On 12/14/2011 03:09 AM, Josef Bacik wrote: On Tue, Dec 13, 2011 at 02:03:14PM -0500, Phillip Susi wrote: On 12/13/2011 12:55 PM, Josef Bacik wrote: I've been hitting this BUG_ON() in btrfs_orphan_add when running xfstest 269 in a loop.

What is best practice when partitioning a device that holds one or more btr-filesystems

2011-12-14 Thread Wilfred van Velzen
Hi, What is best practice when partitioning a device that holds one or more btr-filesystems Do it the old fashioned way, and create a number of partitions according to your needs? Or create one big btrfs partition and use subvolumes where you would normally create different partitions? What are

Re: What is best practice when partitioning a device that holds one or more btr-filesystems

2011-12-14 Thread Helmut Hullen
Hallo, Wilfred, Du meintest am 14.12.11: What is best practice when partitioning a device that holds one or more btr-filesystems That depends ... My favourite installation is a bundle of 2-TByte-disks which btrfs presents as one big disk. data=raid0, metadata=raid1 It's a kind of archive,

Re: [PATCH] Btrfs: don't panic if orphan item already exists

2011-12-14 Thread Josef Bacik
On Wed, Dec 14, 2011 at 05:46:37PM +0800, Miao Xie wrote: Onwed, 14 Dec 2011 10:07:39 +0800, WuBo wrote: On 12/14/2011 03:09 AM, Josef Bacik wrote: On Tue, Dec 13, 2011 at 02:03:14PM -0500, Phillip Susi wrote: On 12/13/2011 12:55 PM, Josef Bacik wrote: I've been hitting this BUG_ON()

Re: [PATCH] Btrfs: don't panic if orphan item already exists

2011-12-14 Thread Phillip Susi
On 12/14/2011 9:58 AM, Josef Bacik wrote: There is no underlying bug, there is a shitty situation, the shitty situation Maybe my assumptions are wrong somewhere then. You add the orphan item to make sure that the truncate will be finalized even if the system crashes before the transaction

Re: [PATCH] Btrfs: don't panic if orphan item already exists

2011-12-14 Thread Josef Bacik
On Wed, Dec 14, 2011 at 10:14:13AM -0500, Phillip Susi wrote: On 12/14/2011 9:58 AM, Josef Bacik wrote: There is no underlying bug, there is a shitty situation, the shitty situation Maybe my assumptions are wrong somewhere then. You add the orphan item to make sure that the truncate will

Re: [PATCH] Btrfs: don't panic if orphan item already exists

2011-12-14 Thread Josef Bacik
On Wed, Dec 14, 2011 at 10:14:13AM -0500, Phillip Susi wrote: On 12/14/2011 9:58 AM, Josef Bacik wrote: There is no underlying bug, there is a shitty situation, the shitty situation Maybe my assumptions are wrong somewhere then. You add the orphan item to make sure that the truncate will

Re: [PATCH] Btrfs: don't panic if orphan item already exists

2011-12-14 Thread Josef Bacik
On Wed, Dec 14, 2011 at 10:34:45AM -0500, Josef Bacik wrote: On Wed, Dec 14, 2011 at 10:14:13AM -0500, Phillip Susi wrote: On 12/14/2011 9:58 AM, Josef Bacik wrote: There is no underlying bug, there is a shitty situation, the shitty situation Maybe my assumptions are wrong somewhere

Re: [PATCH] Btrfs: don't panic if orphan item already exists

2011-12-14 Thread Phillip Susi
On 12/14/2011 10:27 AM, Josef Bacik wrote: Except consider the case that the program was written intelligently and checks for errors on truncate. So he writes 100G, truncates to 50M, and the truncate fails and he closes the file and exits. Then somewhere down the road the inode is evicted from

Re: [PATCH] Btrfs: don't panic if orphan item already exists

2011-12-14 Thread Josef Bacik
On Wed, Dec 14, 2011 at 10:41:05AM -0500, Phillip Susi wrote: On 12/14/2011 10:27 AM, Josef Bacik wrote: Except consider the case that the program was written intelligently and checks for errors on truncate. So he writes 100G, truncates to 50M, and the truncate fails and he closes the

Re: What is best practice when partitioning a device that holds one or more btr-filesystems

2011-12-14 Thread Peeters Simon
2011/12/14 Wilfred van Velzen wvvel...@gmail.com: Hi, What is best practice when partitioning a device that holds one or more btr-filesystems Do it the old fashioned way, and create a number of partitions according to your needs? Or create one big btrfs partition and use subvolumes where

Re: [PATCH] Btrfs: don't panic if orphan item already exists

2011-12-14 Thread Chris Mason
On Wed, Dec 14, 2011 at 10:34:45AM -0500, Josef Bacik wrote: On Wed, Dec 14, 2011 at 10:14:13AM -0500, Phillip Susi wrote: On 12/14/2011 9:58 AM, Josef Bacik wrote: There is no underlying bug, there is a shitty situation, the shitty situation Maybe my assumptions are wrong somewhere

Re: [PATCH] Btrfs: don't panic if orphan item already exists

2011-12-14 Thread Josef Bacik
On Wed, Dec 14, 2011 at 11:45:24AM -0500, Chris Mason wrote: On Wed, Dec 14, 2011 at 10:34:45AM -0500, Josef Bacik wrote: On Wed, Dec 14, 2011 at 10:14:13AM -0500, Phillip Susi wrote: On 12/14/2011 9:58 AM, Josef Bacik wrote: There is no underlying bug, there is a shitty situation, the

Re: [PATCH 2/2] Btrfs: fix wrong i_size when truncating a file to a larger size

2011-12-14 Thread Chris Mason
On Wed, Dec 14, 2011 at 03:15:53PM +0800, Miao Xie wrote: Btrfsck report error 100 after the 83th case of xfstests was run, it means the i_size of the file is wrong. The reason of this bug is that: Btrfs increased i_size of the file at the beginning, but it failed to expand the file, and

Re: What is best practice when partitioning a device that holds one or more btr-filesystems

2011-12-14 Thread Wilfred van Velzen
On Wed, Dec 14, 2011 at 7:21 PM, Mitch Harder mitch.har...@sabayonlinux.org wrote: On Wed, Dec 14, 2011 at 7:00 AM, Wilfred van Velzen wvvel...@gmail.com wrote: What is best practice when partitioning a device that holds one or more btr-filesystems When it comes to best practices in btrfs

Re: [PATCH] Btrfs: don't panic if orphan item already exists

2011-12-14 Thread Phillip Susi
On 12/14/2011 10:46 AM, Josef Bacik wrote: file looks like its only 50m but still has 100g of extents taking up space orphan cleanup happens and the inode is truncated and the extra space is cleaned up Yes, but isn't the only reason that the i_size change actually hit the disk is because of

Re: What is best practice when partitioning a device that holds one or more btr-filesystems

2011-12-14 Thread Wilfred van Velzen
On Wed, Dec 14, 2011 at 9:56 PM, Gareth Pye gar...@cerberos.id.au wrote: On Thu, Dec 15, 2011 at 5:51 AM, Wilfred van Velzen wvvel...@gmail.com wrote: (I'm not interested in what early adopter users do when they are using rc kernels...) Yet your going to use a FS without a working fsck?

Re: btrfs: open_ctree failed

2011-12-14 Thread Samuel Just
Looks like it, cross posting to linux-btrfs. -Sam On Mon, Dec 12, 2011 at 7:20 PM, Matt Weil mw...@genome.wustl.edu wrote: another butter bug? btrfs: open_ctree failed [ cut here ] WARNING: at fs/btrfs/inode.c:2194 btrfs_orphan_commit_root+0xb0/0xc0 [btrfs]()

Re: What is best practice when partitioning a device that holds one or more btr-filesystems

2011-12-14 Thread Fajar A. Nugraha
On Thu, Dec 15, 2011 at 4:42 AM, Wilfred van Velzen wvvel...@gmail.com wrote: On Wed, Dec 14, 2011 at 9:56 PM, Gareth Pye gar...@cerberos.id.au wrote: On Thu, Dec 15, 2011 at 5:51 AM, Wilfred van Velzen wvvel...@gmail.com wrote: (I'm not interested in what early adopter users do when they are

Re: kernel BUG at /build/buildd/linux-3.2.0/fs/btrfs/extent-tree.c:4816!

2011-12-14 Thread David Sterba
On Tue, Nov 29, 2011 at 01:12:14PM -0500, Chris Mason wrote: Nov 28 00:11:14 karl-workstation kernel: [212918.235050] kernel BUG at /home/apw/COD/linux/fs/btrfs/extent-tree.c:4775! Nov 28 00:11:14 karl-workstation kernel: [212918.235118] RAX: ea01 RBX: 880412c3ab40 RCX:

Re: What is best practice when partitioning a device that holds one or more btr-filesystems

2011-12-14 Thread Kok, Auke-jan H
On Wed, Dec 14, 2011 at 1:42 PM, Wilfred van Velzen wvvel...@gmail.com wrote: On Wed, Dec 14, 2011 at 9:56 PM, Gareth Pye gar...@cerberos.id.au wrote: On Thu, Dec 15, 2011 at 5:51 AM, Wilfred van Velzen wvvel...@gmail.com wrote: (I'm not interested in what early adopter users do when they are

Re: What is best practice when partitioning a device that holds one or more btr-filesystems

2011-12-14 Thread dima
On 12/15/2011 03:51 AM, Wilfred van Velzen wrote: On Wed, Dec 14, 2011 at 7:21 PM, Mitch Harder mitch.har...@sabayonlinux.org wrote: On Wed, Dec 14, 2011 at 7:00 AM, Wilfred van Velzenwvvel...@gmail.com wrote: What is best practice when partitioning a device that holds one or more

Re: [PATCH] Btrfs: don't panic if orphan item already exists

2011-12-14 Thread Miao Xie
On wed, 14 Dec 2011 10:34:45 -0500, Josef Bacik wrote: On Wed, Dec 14, 2011 at 10:14:13AM -0500, Phillip Susi wrote: On 12/14/2011 9:58 AM, Josef Bacik wrote: There is no underlying bug, there is a shitty situation, the shitty situation Maybe my assumptions are wrong somewhere then.

Re: [PATCH] Btrfs: don't panic if orphan item already exists

2011-12-14 Thread WuBo
On 12/14/2011 10:58 PM, Josef Bacik wrote: On Wed, Dec 14, 2011 at 05:46:37PM +0800, Miao Xie wrote: On wed, 14 Dec 2011 10:07:39 +0800, WuBo wrote: On 12/14/2011 03:09 AM, Josef Bacik wrote: On Tue, Dec 13, 2011 at 02:03:14PM -0500, Phillip Susi wrote: On 12/13/2011 12:55 PM, Josef Bacik

Re: WARNING: at fs/btrfs/extent-tree.c:4754 followed by BUG: unable to handle kernel NULL pointer dereference at (null)

2011-12-14 Thread Kai Krakow
Hello, I managed to mount my broken btrfs partition in read-only mode and clone my rootfs subvolume to an ext4 partition and boot from that - so I now have the original system bootable. Jan Schmidt wrote: On 07.12.2011 21:40, Kai Krakow wrote: [...] The problematic file seems to be in

Re: [PATCH 2/2] Btrfs: fix wrong i_size when truncating a file to a larger size

2011-12-14 Thread Miao Xie
On Wed, 14 Dec 2011 11:51:47 -0500, Chris Mason wrote: On Wed, Dec 14, 2011 at 03:15:53PM +0800, Miao Xie wrote: Btrfsck report error 100 after the 83th case of xfstests was run, it means the i_size of the file is wrong. The reason of this bug is that: Btrfs increased i_size of the file at