Re: [PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-02 Thread Jan Schmidt
[added Josef] Josef: Please queue this patch for rc2, we finally agreed. On Fri, August 03, 2012 at 05:20 (+0200), Liu Bo wrote: > On 08/02/2012 10:28 PM, Jan Schmidt wrote: >> If such a situation doesn't exist, there's no need for this flag. The fact >> that >> ext has such a flag doesn't convi

Re: [PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-02 Thread Liu Bo
On 08/02/2012 10:28 PM, Jan Schmidt wrote: > On Thu, August 02, 2012 at 15:46 (+0200), Arne Jansen wrote: >> On 02.08.2012 13:57, Liu Bo wrote: >>> Anyway, for now, our error flag has only been stored in memory, so what >>> about just keep it until we find a graceful way? >> >> Yeah, we need this p

Re: [PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-02 Thread cwillu
On Thu, Aug 2, 2012 at 7:46 AM, Arne Jansen wrote: > On 02.08.2012 13:57, Liu Bo wrote: >> On 08/02/2012 07:40 PM, Arne Jansen wrote: >>> On 02.08.2012 13:34, Liu Bo wrote: On 08/02/2012 07:18 PM, Arne Jansen wrote: > On 02.08.2012 12:36, Liu Bo wrote: >> On 08/02/2012 06:30 PM, Stefa

Re: [PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-02 Thread Jan Schmidt
On Thu, August 02, 2012 at 15:46 (+0200), Arne Jansen wrote: > On 02.08.2012 13:57, Liu Bo wrote: >> Anyway, for now, our error flag has only been stored in memory, so what >> about just keep it until we find a graceful way? > > Yeah, we need this patch to restore consistency. We can define a fixe

Re: [PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-02 Thread Arne Jansen
On 02.08.2012 15:57, David Sterba wrote: > On Thu, Aug 02, 2012 at 03:46:50PM +0200, Arne Jansen wrote: >>> Anyway, for now, our error flag has only been stored in memory, so what >>> about just keep it until we find a graceful way? >> >> Yeah, we need this patch to restore consistency. We can defi

Re: [PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-02 Thread David Sterba
On Thu, Aug 02, 2012 at 03:46:50PM +0200, Arne Jansen wrote: > > Anyway, for now, our error flag has only been stored in memory, so what > > about just keep it until we find a graceful way? > > Yeah, we need this patch to restore consistency. We can define a fixed > area on disk (e.g. behind the s

Re: [PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-02 Thread Arne Jansen
On 02.08.2012 13:57, Liu Bo wrote: > On 08/02/2012 07:40 PM, Arne Jansen wrote: >> On 02.08.2012 13:34, Liu Bo wrote: >>> On 08/02/2012 07:18 PM, Arne Jansen wrote: On 02.08.2012 12:36, Liu Bo wrote: > On 08/02/2012 06:30 PM, Stefan Behrens wrote: >> On Wed, 01 Aug 2012 16:31:54 +0200,

Re: [PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-02 Thread Liu Bo
On 08/02/2012 07:40 PM, Arne Jansen wrote: > On 02.08.2012 13:34, Liu Bo wrote: >> On 08/02/2012 07:18 PM, Arne Jansen wrote: >>> On 02.08.2012 12:36, Liu Bo wrote: On 08/02/2012 06:30 PM, Stefan Behrens wrote: > On Wed, 01 Aug 2012 16:31:54 +0200, Stefan Behrens wrote: >> On Wed, 01 A

Re: [PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-02 Thread Arne Jansen
On 02.08.2012 13:34, Liu Bo wrote: > On 08/02/2012 07:18 PM, Arne Jansen wrote: >> On 02.08.2012 12:36, Liu Bo wrote: >>> On 08/02/2012 06:30 PM, Stefan Behrens wrote: On Wed, 01 Aug 2012 16:31:54 +0200, Stefan Behrens wrote: > On Wed, 01 Aug 2012 21:31:58 +0800, Liu Bo wrote: >> On 08

Re: [PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-02 Thread Liu Bo
On 08/02/2012 07:18 PM, Arne Jansen wrote: > On 02.08.2012 12:36, Liu Bo wrote: >> On 08/02/2012 06:30 PM, Stefan Behrens wrote: >>> On Wed, 01 Aug 2012 16:31:54 +0200, Stefan Behrens wrote: On Wed, 01 Aug 2012 21:31:58 +0800, Liu Bo wrote: > On 08/01/2012 09:07 PM, Jan Schmidt wrote:

Re: [PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-02 Thread Arne Jansen
On 02.08.2012 12:36, Liu Bo wrote: > On 08/02/2012 06:30 PM, Stefan Behrens wrote: >> On Wed, 01 Aug 2012 16:31:54 +0200, Stefan Behrens wrote: >>> On Wed, 01 Aug 2012 21:31:58 +0800, Liu Bo wrote: On 08/01/2012 09:07 PM, Jan Schmidt wrote: > On Wed, August 01, 2012 at 14:02 (+0200), Liu B

Re: [PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-02 Thread Liu Bo
On 08/02/2012 06:30 PM, Stefan Behrens wrote: > On Wed, 01 Aug 2012 16:31:54 +0200, Stefan Behrens wrote: >> On Wed, 01 Aug 2012 21:31:58 +0800, Liu Bo wrote: >>> On 08/01/2012 09:07 PM, Jan Schmidt wrote: On Wed, August 01, 2012 at 14:02 (+0200), Liu Bo wrote: > On 08/01/2012 07:45 PM, St

Re: [PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-02 Thread Stefan Behrens
On Wed, 01 Aug 2012 16:31:54 +0200, Stefan Behrens wrote: > On Wed, 01 Aug 2012 21:31:58 +0800, Liu Bo wrote: >> On 08/01/2012 09:07 PM, Jan Schmidt wrote: >>> On Wed, August 01, 2012 at 14:02 (+0200), Liu Bo wrote: On 08/01/2012 07:45 PM, Stefan Behrens wrote: > With commit acce952b0, btr

Re: [PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-01 Thread Stefan Behrens
On Wed, 01 Aug 2012 21:31:58 +0800, Liu Bo wrote: > On 08/01/2012 09:07 PM, Jan Schmidt wrote: >> On Wed, August 01, 2012 at 14:02 (+0200), Liu Bo wrote: >>> On 08/01/2012 07:45 PM, Stefan Behrens wrote: With commit acce952b0, btrfs was changed to flag the filesystem with BTRFS_SUPER_FLAG

Re: [PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-01 Thread Arne Jansen
On 01.08.2012 15:31, Liu Bo wrote: > On 08/01/2012 09:07 PM, Jan Schmidt wrote: >> On Wed, August 01, 2012 at 14:02 (+0200), Liu Bo wrote: >>> On 08/01/2012 07:45 PM, Stefan Behrens wrote: With commit acce952b0, btrfs was changed to flag the filesystem with BTRFS_SUPER_FLAG_ERROR and swit

Re: [PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-01 Thread Liu Bo
On 08/01/2012 09:07 PM, Jan Schmidt wrote: > On Wed, August 01, 2012 at 14:02 (+0200), Liu Bo wrote: >> On 08/01/2012 07:45 PM, Stefan Behrens wrote: >>> With commit acce952b0, btrfs was changed to flag the filesystem with >>> BTRFS_SUPER_FLAG_ERROR and switch to read-only mode after a fatal >>> er

Re: [PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-01 Thread Jan Schmidt
On Wed, August 01, 2012 at 14:02 (+0200), Liu Bo wrote: > On 08/01/2012 07:45 PM, Stefan Behrens wrote: >> With commit acce952b0, btrfs was changed to flag the filesystem with >> BTRFS_SUPER_FLAG_ERROR and switch to read-only mode after a fatal >> error happened like a write I/O errors of all mirro

Re: [PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-01 Thread Liu Bo
On 08/01/2012 07:45 PM, Stefan Behrens wrote: > With commit acce952b0, btrfs was changed to flag the filesystem with > BTRFS_SUPER_FLAG_ERROR and switch to read-only mode after a fatal > error happened like a write I/O errors of all mirrors. > In such situations, on unmount, the superblock is writt

[PATCH v2] Btrfs: remove superblock writing after fatal error

2012-08-01 Thread Stefan Behrens
With commit acce952b0, btrfs was changed to flag the filesystem with BTRFS_SUPER_FLAG_ERROR and switch to read-only mode after a fatal error happened like a write I/O errors of all mirrors. In such situations, on unmount, the superblock is written in btrfs_error_commit_super(). This is done with th