[PATCH v2] btrfs: don't return EINTR

2012-04-18 Thread Arne Jansen
It is basically a good thing if we are interruptible when waiting for free space, but the generality in which it is implemented currently leads to system calls being interruptible that are not documented this way. For example git can't handle interrupted unlink(), leading to corrupt repos under spa

segmentation fault while running btrfsck

2012-04-18 Thread Nicholas Tung
Hi all, One of my btrfs volumes got corrupted, and seems to be unrecoverable. When I tried to run a recent version of btrfsck (built from git), it crashed with a segmentation fault. I have a file containing the first 8 GB (copied with "dd if=/dev/sda5 ..."), which seems to reproduce the segmen

Re: Kernel bug in BTRFS (kernel 3.3.0)

2012-04-18 Thread David Sterba
On Wed, Apr 18, 2012 at 12:22:34PM +0800, anand jain wrote: > > [370517.204350] btrfs: 1 errors while writing supers > > [370517.204376] [ cut here ] > > [370517.204391] kernel BUG at fs/btrfs/disk-io.c:2880! > > --- > if (total_errors > max_errors) { >

Re: segmentation fault while running btrfsck

2012-04-18 Thread David Sterba
On Wed, Apr 18, 2012 at 01:34:48AM -0700, Nicholas Tung wrote: > One of my btrfs volumes got corrupted, and seems to be > unrecoverable. When I tried to run a recent version of btrfsck (built > from git), it crashed with a segmentation fault. I have a file > containing the first 8 GB (copied wi

Re: [patch 1/2] Btrfs: double unlock bug in error handling

2012-04-18 Thread David Sterba
On Wed, Apr 18, 2012 at 09:59:03AM +0300, Dan Carpenter wrote: > The caller expects this function to return with the lock held and > releases it immediately on error. > > Signed-off-by: Dan Carpenter Reviewed-by: David Sterba Good catch, thanks. -- To unsubscribe from this list: send the line "

Re: [PATCH] Btrfs: always store the mirror we read the eb from

2012-04-18 Thread David Sterba
On Mon, Apr 16, 2012 at 09:42:26AM -0400, Josef Bacik wrote: > --- a/fs/btrfs/disk-io.c > +++ b/fs/btrfs/disk-io.c > @@ -390,8 +390,7 @@ static int btree_read_extent_buffer_pages(struct > btrfs_root *root, > > if (!failed_mirror) { > failed = 1; > -

Re: [patch 1/2] Btrfs: double unlock bug in error handling

2012-04-18 Thread Jan Schmidt
On 18.04.2012 08:59, Dan Carpenter wrote: > The caller expects this function to return with the lock held and > releases it immediately on error. > > Signed-off-by: Dan Carpenter > > diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c > index 2b35f8d..a0bb9dc 100644 > --- a/fs/btrfs/exten

Re: [patch 1/2] Btrfs: double unlock bug in error handling

2012-04-18 Thread David Sterba
On Wed, Apr 18, 2012 at 01:29:46PM +0200, Jan Schmidt wrote: > I think the correct way to fix this is: > > diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c > index a844204..9af261a 100644 > --- a/fs/btrfs/extent-tree.c > +++ b/fs/btrfs/extent-tree.c > @@ -2450,7 +2450,6 @@ again: > >

Re: [patch 1/2] Btrfs: double unlock bug in error handling

2012-04-18 Thread Dan Carpenter
On Wed, Apr 18, 2012 at 01:29:46PM +0200, Jan Schmidt wrote: > On 18.04.2012 08:59, Dan Carpenter wrote: > I think the correct way to fix this is: > Yeah. I considered both ways, but I chose the one which makes the tools happy. Which is the wrong choice, because taking a pointless lock is wrong

Re: [PATCH] Btrfs: always store the mirror we read the eb from

2012-04-18 Thread Josef Bacik
On Wed, Apr 18, 2012 at 12:44:07PM +0200, David Sterba wrote: > On Mon, Apr 16, 2012 at 09:42:26AM -0400, Josef Bacik wrote: > > --- a/fs/btrfs/disk-io.c > > +++ b/fs/btrfs/disk-io.c > > @@ -390,8 +390,7 @@ static int btree_read_extent_buffer_pages(struct > > btrfs_root *root, > > > >

Re: [PATCH v2] btrfs: don't return EINTR

2012-04-18 Thread Arne Jansen
On 18.04.2012 10:27, Arne Jansen wrote: > It is basically a good thing if we are interruptible when waiting for > free space, but the generality in which it is implemented currently > leads to system calls being interruptible that are not documented this > way. For example git can't handle interrup

Re: [PATCH v2] btrfs: don't return EINTR

2012-04-18 Thread Josef Bacik
On Wed, Apr 18, 2012 at 10:27:16AM +0200, Arne Jansen wrote: > It is basically a good thing if we are interruptible when waiting for > free space, but the generality in which it is implemented currently > leads to system calls being interruptible that are not documented this > way. For example git

Re: [PATCH v2] btrfs: don't return EINTR

2012-04-18 Thread Chris Mason
On Wed, Apr 18, 2012 at 10:36:11AM -0400, Josef Bacik wrote: > On Wed, Apr 18, 2012 at 10:27:16AM +0200, Arne Jansen wrote: > > It is basically a good thing if we are interruptible when waiting for > > free space, but the generality in which it is implemented currently > > leads to system calls bei

Re: Btrfs in degraded mode

2012-04-18 Thread Martin Steigerwald
Am Mittwoch, 18. April 2012 schrieb Duncan: > Shridhar Shetty posted on Tue, 17 Apr 2012 16:14:45 + as excerpted: > > I have created a btrfs filesystem with RAID1 setup having 2 disks. > > Everything works fine but when I try to umount the device and remount > > it in degraded mode, > > the dat

Re: Btrfs in degraded mode

2012-04-18 Thread David Sterba
On Wed, Apr 18, 2012 at 06:45:11PM +0200, Martin Steigerwald wrote: > You can echo 1 > > > martin@merkaba:/sys/block/sda/device> ls -l delete > --w--- 1 root root 4096 Apr 18 18:40 delete > > of the device you want to get rid of. (Double check that you have got the > right device!) > > But

[PATCH v3] btrfs: fix early abort in 'remount'

2012-04-18 Thread Sergei Trofimovich
From: Sergei Trofimovich Cc: Jeff Mahoney Cc: Chris Mason Reviewed-by: Josef Bacik Reviewed-by: Sergey V. Signed-off-by: Sergei Trofimovich --- v1->v2: fixed indentation of 'if (cond) {' suggested by Liu Bo v2->v3: added 'Reviewed-by' fs/btrfs/super.c |6 -- 1 files changed, 4 inser

Re: [PATCH v3] btrfs: fix early abort in 'remount'

2012-04-18 Thread Jeff Mahoney
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/18/2012 06:27 PM, Sergei Trofimovich wrote: > From: Sergei Trofimovich > > Cc: Jeff Mahoney Cc: Chris Mason > Reviewed-by: Josef Bacik > Reviewed-by: Sergey V. Acked-by: Jeff Mahoney > Signed-off-by: Sergei Trofimovich --- v1->v2: > fix