Re: [PATCH] Btrfs: initial online fsck support

2011-07-20 Thread Chris Mason
Excerpts from Andi Kleen's message of 2011-07-02 13:04:43 -0400:
  The two big features of btrfs are self-healing and online fsck, those have 
  to 
 
 Are they?
 
  be implemented in kernel space.
 
 Why? There have been online fscks in user space in the past,
 e.g. the various schemes using LVM snapshots for ext* and 
 other related work on the BSD FFS. I don't see any principal
 reason why it couldn't be done for btrfs either.
 
 A good fsck is quite complex and you are unlikely to want all
 that code in kernel space.

The offline fsck for btrfs is basically for repairing the worst possible
problems (things that make the FS unmountable).

The online code can easily take on smaller things, like detecting
incorrect link counts and a whole series of other problems that
shouldn't require offline access.

-chris
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Btrfs: initial online fsck support

2011-07-02 Thread Hubert Kario
On Friday 01 of July 2011 19:48:36 Andi Kleen wrote:
 Li Zefan l...@cn.fujitsu.com writes:
  This is an initial version of online fsck. What it does is:
  
  - check the dir item and dir index pointing to a file.
  - check the structure of extents of a file.
  
  As furthur work, we should consider:
  
  - fix but not only check the structure of a file.
  - verify the extent allocation tree on the fly.
 
 It's scary to have a fsck in kernel space. Is there no way to do
 this from user space?
 
 -Andi

There will be a userspace fsck (Chris Mason is working on it ATM).

The two big features of btrfs are self-healing and online fsck, those have to 
be implemented in kernel space.
-- 
Hubert Kario
QBS - Quality Business Software
02-656 Warszawa, ul. Ksawerów 30/85
tel. +48 (22) 646-61-51, 646-74-24
www.qbs.com.pl
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Btrfs: initial online fsck support

2011-07-02 Thread Andi Kleen
 The two big features of btrfs are self-healing and online fsck, those have to 

Are they?

 be implemented in kernel space.

Why? There have been online fscks in user space in the past,
e.g. the various schemes using LVM snapshots for ext* and 
other related work on the BSD FFS. I don't see any principal
reason why it couldn't be done for btrfs either.

A good fsck is quite complex and you are unlikely to want all
that code in kernel space.

-Andi
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Btrfs: initial online fsck support

2011-07-02 Thread Hubert Kario
On Saturday 02 of July 2011 19:04:43 Andi Kleen wrote:
  The two big features of btrfs are self-healing and online fsck, those
  have to
 
 Are they?

they are scheduled to be, just like RAID5/6, mixed RAID in single FS...
 
  be implemented in kernel space.
 
 Why? There have been online fscks in user space in the past,
 e.g. the various schemes using LVM snapshots for ext* and
 other related work on the BSD FFS. I don't see any principal
 reason why it couldn't be done for btrfs either.

Doing a fsck on LVM snapshot of btrfs:
1. is impossible (UUIDs)
2. won't fix errors

I have to note that I don't know how FFS fsck is implemented.
 
 A good fsck is quite complex and you are unlikely to want all
 that code in kernel space.

complete one, yes, but it's not quite pointless, ZFS does it like this and 
admins rather like it

-- 
Hubert Kario
QBS - Quality Business Software
ul. Ksawerów 30/85
02-656 Warszawa
POLAND
tel. +48 (22) 646-61-51, 646-74-24
fax +48 (22) 646-61-50
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Btrfs: initial online fsck support

2011-07-01 Thread Andi Kleen
Li Zefan l...@cn.fujitsu.com writes:

 This is an initial version of online fsck. What it does is:

 - check the dir item and dir index pointing to a file.
 - check the structure of extents of a file.

 As furthur work, we should consider:

 - fix but not only check the structure of a file.
 - verify the extent allocation tree on the fly.

It's scary to have a fsck in kernel space. Is there no way to do
this from user space?

-Andi

-- 
a...@linux.intel.com -- Speaking for myself only
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html