Re: kernel got struck while scrubbing BTRFS with node- and leafsize 32768

2012-06-25 Thread Martin Steigerwald
Am Montag, 25. Juni 2012 schrieb Chester: On Sat, Jun 16, 2012 at 3:23 PM, Martin Steigerwald mar...@lichtvoll.de wrote: [251818.022631] [ cut here ] [251818.022714] WARNING: at /media/data/mattems/src/linux-2.6-3.4.1/debian/build/source_amd64_non

[patch v2] Btrfs: fix error handling in __add_reloc_root()

2012-06-25 Thread Dan Carpenter
We dereferenced node in the error message after freeing it. Also btrfs_panic() can return so we should return an error code instead of continuing. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- v2: in the first version I just deleted the kfree(). diff --git a/fs/btrfs/relocation.c

Re: [PATCH] Btrfs: do not ignore errors from btrfs_cleanup_fs_roots() when mounting

2012-06-25 Thread David Sterba
On Fri, Jun 22, 2012 at 09:14:13PM +0300, Ilya Dryomov wrote: There used to be a BUG_ON(ret) there before EH patch (79787eaa) went in. Bail out with EINVAL. Cc: David Sterba dste...@suse.cz Signed-off-by: Ilya Dryomov idryo...@gmail.com --- fs/btrfs/disk-io.c |4 ++-- 1 files

Re: [PATCH] Btrfs: flush delayed inodes if we're short on space V2

2012-06-25 Thread Josef Bacik
On 06/22/2012 09:58 PM, Miao Xie wrote: On fri, 22 Jun 2012 11:26:01 -0400, Josef Bacik wrote: diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 4b5a1e1..4053e3e 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -3727,6 +3727,62 @@ commit: return

Re: btrfs deadlock in 3.5-rc3

2012-06-25 Thread Josef Bacik
On 06/23/2012 04:50 AM, Stefan Priebe wrote: Hello list, i've seen this deadlock today and can reproduce it while using ceph. Is this a known bug? [ 599.514534] INFO: task kworker/6:0:29 blocked for more than 120 seconds. [ 599.530394] echo 0 /proc/sys/kernel/hung_task_timeout_secs

Re: [PATCH 0/5] btrfs: lz4/lz4hc compression

2012-06-25 Thread David Sterba
On Sat, Jun 23, 2012 at 04:05:43AM -0400, Andrew Mahone wrote: A large portion of the work was done by Dave Sterba, but in flattening the commits attribution has been lost. My contribution has been in debugging some of the cases in which it could crash or produce incorrect data, and cleaning

Re: [patch v2] Btrfs: fix error handling in __add_reloc_root()

2012-06-25 Thread Josef Bacik
On Mon, Jun 25, 2012 at 05:15:23AM -0600, Dan Carpenter wrote: We dereferenced node in the error message after freeing it. Also btrfs_panic() can return so we should return an error code instead of continuing. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- v2: in the first

Re: [patch v2] Btrfs: fix error handling in __add_reloc_root()

2012-06-25 Thread Dan Carpenter
On Mon, Jun 25, 2012 at 09:41:12AM -0400, Josef Bacik wrote: On Mon, Jun 25, 2012 at 05:15:23AM -0600, Dan Carpenter wrote: We dereferenced node in the error message after freeing it. Also btrfs_panic() can return so we should return an error code instead of continuing. Signed-off-by:

Re: btrfs deadlock in 3.5-rc3

2012-06-25 Thread Stefan Priebe - Profihost AG
Am 25.06.2012 15:08, schrieb Josef Bacik: This isn't showing the guy who's actually trying to commit the transaction. Next time this happens can you do a sysrq+w and capture the output and post it here so we can see what everybody is doing? Thanks, Josef No problem. Kernel trace:

Re: btrfs deadlock in 3.5-rc3

2012-06-25 Thread Josef Bacik
On Mon, Jun 25, 2012 at 08:08:31AM -0600, Stefan Priebe - Profihost AG wrote: Am 25.06.2012 15:08, schrieb Josef Bacik: This isn't showing the guy who's actually trying to commit the transaction. Next time this happens can you do a sysrq+w and capture the output and post it here so we

Re: btrfs deadlock in 3.5-rc3

2012-06-25 Thread Stefan Priebe - Profihost AG
Thats weird, sysrq+w should have a bunch of stacktraces but it's empty, so unless theres a bug theres nothing blocked. Is the box actually hung or is it just taking forever? Maybe try sysrq+w again to see if the one you pasted was just a fluke? Thanks, This one looks better:

Re: btrfs deadlock in 3.5-rc3

2012-06-25 Thread Josef Bacik
On Mon, Jun 25, 2012 at 08:45:02AM -0600, Stefan Priebe - Profihost AG wrote: Thats weird, sysrq+w should have a bunch of stacktraces but it's empty, so unless theres a bug theres nothing blocked. Is the box actually hung or is it just taking forever? Maybe try sysrq+w again to see if

Knowing how much space is taken by each snapshot?

2012-06-25 Thread Marc MERLIN
Howdy, My btrfs pool looks like this: usr usr_daily_20120622_00:01:01 usr_daily_20120623_00:18:25 usr_daily_20120624_00:01:01 usr_daily_20120625_00:01:01 usr_hourly_20120625_05:00:02 usr_hourly_20120625_06:00:01 usr_hourly_20120625_07:00:01 usr_weekly_20120610_00:02:01

Re: Knowing how much space is taken by each snapshot?

2012-06-25 Thread Hugo Mills
On Mon, Jun 25, 2012 at 07:58:40AM -0700, Marc MERLIN wrote: Howdy, My btrfs pool looks like this: usr usr_daily_20120622_00:01:01 usr_daily_20120623_00:18:25 usr_daily_20120624_00:01:01 usr_daily_20120625_00:01:01 usr_hourly_20120625_05:00:02 usr_hourly_20120625_06:00:01

3.5.0-rc4: WARNING: at fs/btrfs/super.c:221 __btrfs_abort_transaction+0xae/0xc0 (was: Re: 3.4.0-rc6:...)

2012-06-25 Thread Arnd Hannemann
Hi, still seeing this warning (well the line number changed) on 3.5.0 (rc4): [ 11.909589] [ cut here ] [ 11.909616] WARNING: at /home/arnd/Projekte/kernel/linux-2.6/fs/btrfs/super.c:221 __btrfs_abort_transaction+0xae/0xc0 [btrfs]() [ 11.909617] Hardware name:

Re: btrfs deadlock in 3.5-rc3

2012-06-25 Thread Stefan Priebe
Am 25.06.2012 16:48, schrieb Josef Bacik: On Mon, Jun 25, 2012 at 08:45:02AM -0600, Stefan Priebe - Profihost AG wrote: Thats weird, sysrq+w should have a bunch of stacktraces but it's empty, so unless theres a bug theres nothing blocked. Is the box actually hung or is it just taking

Re: Feature request: true RAID-1 mode

2012-06-25 Thread H. Peter Anvin
On 06/25/2012 08:21 AM, Chris Mason wrote: Yes and no. If you have 2 drives and you add one more, we can make it do all new chunks over 3 drives. But, turning the existing double mirror chunks into a triple mirror requires a balance. -chris So trigger one. This is the exact analogue to

Re: btrfs deadlock in 3.5-rc3

2012-06-25 Thread Josef Bacik
On Mon, Jun 25, 2012 at 11:38:38AM -0600, Stefan Priebe wrote: Am 25.06.2012 16:48, schrieb Josef Bacik: On Mon, Jun 25, 2012 at 08:45:02AM -0600, Stefan Priebe - Profihost AG wrote: Thats weird, sysrq+w should have a bunch of stacktraces but it's empty, so unless theres a bug theres

Re: btrfs deadlock in 3.5-rc3

2012-06-25 Thread Stefan Priebe
Am 25.06.2012 20:02, schrieb Josef Bacik: Can you turn that off and see if you can still reproduce the deadlock? If so sysrq+w again, if not then I know where to look ;). Thanks, without discard i can't reproduce but random write speed with ceph without discard is a LOT slower (around

3.5-rc4: BTRFS unmountable after hard lockup

2012-06-25 Thread Martin Steigerwald
Hi! I got a X server / drm related crash or hard lockup. After I rebooted I tried to mount the BTRFS on my esata disk. It has big metadata (mkfs.btrfs -l 32768 -n 32768). I got: [ 43.764274] ata5: exception Emask 0x10 SAct 0x0 SErr 0x405 action 0xe frozen [ 43.764278] ata5: irq_stat

fio reports data corruption with btrfs

2012-06-25 Thread Alex Lyakas
Greetings everybody, I am running a fio test on btrfs compiled from git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git, up to commit: cb77fcd88569cd2b7b25ecd4086ea932a53be9b3 Btrfs: delay iput with async extents including this commit. Below is a fio configuration file, and later

Re: seeking advice

2012-06-25 Thread Maciej Sujkowski
Hello Maybe someone will be able to help. I have 2 unusable instances of btrfs. 1. when I did a re-size (stretch) I had a power lost and now btrfs system is not detected on the drive (tried find-root, restore, btrfsck, btrfs show and maybe something else - can't remember as it was some time ago

Re: 3.5-rc4: BTRFS unmountable after hard lockup

2012-06-25 Thread Martin Steigerwald
Am Montag, 25. Juni 2012 schrieb Martin Steigerwald: Hi! I got a X server / drm related crash or hard lockup. After I rebooted I tried to mount the BTRFS on my esata disk. It has big metadata (mkfs.btrfs -l 32768 -n 32768). I got: [… backtrace …] BTRFS was not mounted. After trying

Re: fio reports data corruption with btrfs

2012-06-25 Thread Josef Bacik
On Mon, Jun 25, 2012 at 12:30:34PM -0600, Alex Lyakas wrote: Greetings everybody, I am running a fio test on btrfs compiled from git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git, up to commit: cb77fcd88569cd2b7b25ecd4086ea932a53be9b3 Btrfs: delay iput with async extents

Re: fio reports data corruption with btrfs

2012-06-25 Thread Josef Bacik
On Mon, Jun 25, 2012 at 12:30:34PM -0600, Alex Lyakas wrote: Greetings everybody, I am running a fio test on btrfs compiled from git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git, up to commit: cb77fcd88569cd2b7b25ecd4086ea932a53be9b3 Btrfs: delay iput with async extents

Re: btrfs deadlock in 3.5-rc3

2012-06-25 Thread Stefan Priebe
With v3.4 the same. Can't go back more as this really results in very fast corruption. Any ideas how to debug? Stefan Am 25.06.2012 20:28, schrieb Stefan Priebe: Am 25.06.2012 20:02, schrieb Josef Bacik: Can you turn that off and see if you can still reproduce the deadlock? If so

Re: btrfs deadlock in 3.5-rc3

2012-06-25 Thread Josef Bacik
On Mon, Jun 25, 2012 at 01:33:09PM -0600, Stefan Priebe wrote: With v3.4 the same. Can't go back more as this really results in very fast corruption. Any ideas how to debug? What workload are you running? I have a ssd here with discard support I can try and reproduce on. Thanks, Josef --

Re: btrfs deadlock in 3.5-rc3

2012-06-25 Thread Stefan Priebe
Am 25.06.2012 22:11, schrieb Josef Bacik: On Mon, Jun 25, 2012 at 01:33:09PM -0600, Stefan Priebe wrote: With v3.4 the same. Can't go back more as this really results in very fast corruption. Any ideas how to debug? What workload are you running? I have a ssd here with discard support I can

Re: btrfs deadlock in 3.5-rc3

2012-06-25 Thread Josef Bacik
On Mon, Jun 25, 2012 at 02:20:31PM -0600, Stefan Priebe wrote: Am 25.06.2012 22:11, schrieb Josef Bacik: On Mon, Jun 25, 2012 at 01:33:09PM -0600, Stefan Priebe wrote: With v3.4 the same. Can't go back more as this really results in very fast corruption. Any ideas how to debug? What

how to cleanup old superblock

2012-06-25 Thread Dmitry MiksIr
Hello! Long time ago I created btrfs on /dev/sda After some changes btrfs moved to /dev/sda1 (well, to md, and sda1 is part of md). As result, btrfs fi show show me 2 filesystems: new one and old one. Probably I need to do some cleaning. Can someone tell me what to do. fdisk -u -c -l /dev/sda

[PATCH] Btrfs: use _IOR for BTRFS_IOC_SUBVOL_GETFLAGS

2012-06-25 Thread Alexander Block
We used the wrong ioctl macro for the getflags ioctl before. As we don't have the set/getflags ioctls in the user space ioctl.h at the moment, it's safe to fix it now. Signed-off-by: Alexander Block abloc...@googlemail.com --- fs/btrfs/ioctl.h |2 +- 1 file changed, 1 insertion(+), 1

Re: btrfs call trace

2012-06-25 Thread Sage Weil
Hi Stefan, I haven't seen this one. The async commit stuff is mine, but there haven't been problems with it for a year or more. This is a recent kernel, I assume? Can you dump the other tasks? Something is preventing the commit from completing. [adding linux-btrfs to cc] sage On Fri,

Re: btrfs call trace

2012-06-25 Thread Stefan Priebe
Thanks it seems to be a problem with the discard option. I'm already talking to JBacik at linux-btrfs. You can find more info in this thread. http://www.spinics.net/lists/linux-btrfs/msg17439.html Hopefully we can solve it as discard gives me a huge improvement in ceph. Stefan Am 26.06.2012

Re: 3.5-rc4: BTRFS unmountable after hard lockup

2012-06-25 Thread David Sterba
On Mon, Jun 25, 2012 at 08:29:34PM +0200, Martin Steigerwald wrote: I got a X server / drm related crash or hard lockup. After I rebooted I tried to mount the BTRFS on my esata disk. It has big metadata (mkfs.btrfs -l 32768 -n 32768). I got: [ 43.764274] ata5: exception Emask 0x10

Re: Feature request: true RAID-1 mode

2012-06-25 Thread H. Peter Anvin
On 06/25/2012 03:28 PM, Gareth Pye wrote: To me one doesn't have to be triggered, a user expects to have to tell the disks to rebuild/resync/balance after adding a disk, they may want to wait till they've added all 4 disks and run a few extra commands before they run the rebalance. They do?

Re: Feature request: true RAID-1 mode

2012-06-25 Thread Gareth Pye
On Tue, Jun 26, 2012 at 8:37 AM, H. Peter Anvin h...@zytor.com wrote: They do?  E.g. mdadm doesn't make them... Hrm, you are right. It is something I always confirm is happening though. Without a M=N mode there would need to be two balances as the first balance would be doing it wrong :( --

Re: how to cleanup old superblock

2012-06-25 Thread David Sterba
On Mon, Jun 25, 2012 at 11:54:50PM +0400, Dmitry MiksIr wrote: Hello! Long time ago I created btrfs on /dev/sda After some changes btrfs moved to /dev/sda1 (well, to md, and sda1 is part of md). As result, btrfs fi show show me 2 filesystems: new one and old one. Probably I need to do some

Re: Feature request: true RAID-1 mode

2012-06-25 Thread Hugo Mills
On Mon, Jun 25, 2012 at 10:46:01AM -0700, H. Peter Anvin wrote: On 06/25/2012 08:21 AM, Chris Mason wrote: Yes and no. If you have 2 drives and you add one more, we can make it do all new chunks over 3 drives. But, turning the existing double mirror chunks into a triple mirror requires a

Re: Feature request: true RAID-1 mode

2012-06-25 Thread H. Peter Anvin
On 06/25/2012 03:54 PM, Hugo Mills wrote: On Mon, Jun 25, 2012 at 10:46:01AM -0700, H. Peter Anvin wrote: On 06/25/2012 08:21 AM, Chris Mason wrote: Yes and no. If you have 2 drives and you add one more, we can make it do all new chunks over 3 drives. But, turning the existing double mirror

Re: [patch v2] Btrfs: fix error handling in __add_reloc_root()

2012-06-25 Thread santosh prasad nayak
I am also facing similar issue while applying this patch. [santosh@localhost linux-next]$ sudo git am mail_Dan.txt Patch format detection failed. [santosh@localhost linux-next]$ regards santosh On Mon, Jun 25, 2012 at 7:23 PM, Dan Carpenter dan.carpen...@oracle.com wrote: On Mon, Jun 25,

[PATCH] Btrfs: check return value of btrfs_set_extent_delalloc()

2012-06-25 Thread Tsutomu Itoh
btrfs_set_extent_delalloc() has the possibility of returning the error. So I add the code in which the return value of btrfs_set_extent_delalloc() is checked. Signed-off-by: Tsutomu Itoh t-i...@jp.fujitsu.com --- fs/btrfs/ioctl.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-)

[PATCH] Btrfs: return error of btrfs_update_inode() to caller

2012-06-25 Thread Tsutomu Itoh
We didn't check error of btrfs_update_inode(), but that error looks easy to bubble back up. Signed-off-by: Tsutomu Itoh t-i...@jp.fujitsu.com --- fs/btrfs/inode.c|2 +- fs/btrfs/tree-log.c |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/inode.c

Re: 3.5-rc4: BTRFS unmountable after hard lockup

2012-06-25 Thread Liu Bo
On 06/26/2012 06:18 AM, David Sterba wrote: 3756 if (root-fs_info-log_root_recovering) { 3757 BUG_ON(!test_bit(BTRFS_INODE_HAS_ORPHAN_ITEM, 3758 BTRFS_I(inode)-runtime_flags)); 3759 goto no_delete; 3760 } and

[PATCH] Btrfs: fix wrong check during log recovery

2012-06-25 Thread Liu Bo
When we're evicting an inode during log recovery, we need to ensure that the inode is not in orphan state any more, which means inode's run_time flags has _no_ BTRFS_INODE_HAS_ORPHAN_ITEM. Thus, the BUG_ON was triggered because of a wrong check for the flags. Signed-off-by: Liu Bo

Re: seeking advice

2012-06-25 Thread Duncan
Maciej Sujkowski posted on Mon, 25 Jun 2012 19:43:36 +0100 as excerpted: Maybe someone will be able to help. I have 2 unusable instances of btrfs. 1. when I did a re-size (stretch) I had a power lost and now btrfs system is not detected on the drive (tried find-root, restore, btrfsck,

Re: btrfs call trace

2012-06-25 Thread Alexandre DERUMIER
Hi Stephan, Maybe it can help: If I remember discard from a kvm guest works only with ide and scsi device, but not virtio device. - Mail original - De: Stefan Priebe s.pri...@profihost.ag À: Sage Weil s...@inktank.com Cc: ceph-de...@vger.kernel.org, linux-btrfs@vger.kernel.org

Re: btrfs call trace

2012-06-25 Thread Stefan Priebe
I don't use discard in KVM. I use it at the osd disc with ceph-osd. Am 26.06.2012 um 06:09 schrieb Alexandre DERUMIER aderum...@odiso.com: Hi Stephan, Maybe it can help: If I remember discard from a kvm guest works only with ide and scsi device, but not virtio device. - Mail