Re: [PATCH v2 5/6] btrfs: add state information for scrub

2011-03-11 Thread David Sterba
On Fri, Mar 11, 2011 at 03:49:42PM +0100, Arne Jansen wrote: > Add structures and state information needed for scrub > > Signed-off-by: Arne Jansen > --- > fs/btrfs/ctree.h | 26 ++ > fs/btrfs/disk-io.c | 15 +++ > fs/btrfs/ioctl.h | 17 +

Re: [PATCH v2 3/6] btrfs: add scrub code and prototypes

2011-03-11 Thread David Sterba
On Fri, Mar 11, 2011 at 03:49:40PM +0100, Arne Jansen wrote: > This is the main scrub code. > > Signed-off-by: Arne Jansen > --- > fs/btrfs/Makefile |2 +- > fs/btrfs/ctree.h | 14 + > fs/btrfs/scrub.c | 1463 > + > 3 files changed, 14

Re: [PATCH v2 0/6] btrfs: scrub

2011-03-11 Thread Ric Wheeler
On 03/11/2011 09:49 AM, Arne Jansen wrote: This series adds an initial implementation for scrub. It works quite straightforward. The usermode issues an ioctl for each device in the fs. For each device, it enumerates the allocated device chunks. For each chunk, the contained extents are enumerated

Re: Raid1 resync

2011-03-11 Thread Libor Klepáč
Hi, sorry for my bad wording, i have no crash with btrfs, I'm considering to switch to btrfs on ssd disk comming back from warranty claim. I was just asking, whether it's posible to switch my old setup (i described in my first mail) using mdraid to using btrfs internal raid without using mdraid,

Re: [PATCH V3] btrfs: implement delayed inode items operation

2011-03-11 Thread David Sterba
On Wed, Mar 09, 2011 at 01:40:28PM +0800, Miao Xie wrote: > Thanks for your advice. But AFAIK, reordering the fields like what you > said can not reduce the space of delayed_nodes, because a hole is > placed on the end to make the structure big enough to pack tightly > into arrays and maintain prop

[PATCH v2 1/6] btrfs: add parameter to btrfs_lookup_csum_range

2011-03-11 Thread Arne Jansen
A parameter is added to search the commit root instead of the live root. Signed-off-by: Arne Jansen --- fs/btrfs/ctree.h |4 ++-- fs/btrfs/file-item.c |8 +++- fs/btrfs/inode.c |2 +- fs/btrfs/relocation.c |2 +- fs/btrfs/tree-log.c |4 ++-- 5 files changed,

[PATCH v2 5/6] btrfs: add state information for scrub

2011-03-11 Thread Arne Jansen
Add structures and state information needed for scrub Signed-off-by: Arne Jansen --- fs/btrfs/ctree.h | 26 ++ fs/btrfs/disk-io.c | 15 +++ fs/btrfs/ioctl.h | 17 + fs/btrfs/volumes.h |3 +++ 4 files changed, 61 insertions(+), 0 d

[PATCH v2 6/6] btrfs: new ioctls for scrub

2011-03-11 Thread Arne Jansen
From: Jan Schmidt adds ioctls necessary to start and cancel scrubs, to get current progress and to get info about devices to be scrubbed. Note that the scrub is done per-device and that the ioctl only returns after the scrub for this devices is finished or has been canceled. Signed-off-by: Arne

[PATCH v2 3/6] btrfs: add scrub code and prototypes

2011-03-11 Thread Arne Jansen
This is the main scrub code. Signed-off-by: Arne Jansen --- fs/btrfs/Makefile |2 +- fs/btrfs/ctree.h | 14 + fs/btrfs/scrub.c | 1463 + 3 files changed, 1478 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/Makefile b/fs/btrfs/Make

[PATCH v2 0/6] btrfs: scrub

2011-03-11 Thread Arne Jansen
This series adds an initial implementation for scrub. It works quite straightforward. The usermode issues an ioctl for each device in the fs. For each device, it enumerates the allocated device chunks. For each chunk, the contained extents are enumerated and the data checksums fetched. The extents

[PATCH v2 2/6] btrfs: make struct map_lookup public

2011-03-11 Thread Arne Jansen
definition of struct map_lookup moved from volumes.c to the header Signed-off-by: Arne Jansen --- fs/btrfs/volumes.c | 14 -- fs/btrfs/volumes.h | 14 ++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 943

[PATCH v2 4/6] btrfs: sync scrub with commit & device removal

2011-03-11 Thread Arne Jansen
This adds several synchronizations: - for a transaction commit, the scrub gets paused before the tree roots are committed until the super are safely on disk - during a log commit, scrubbing of supers is disabled - on unmount, the scrub gets cancelled - on device removal, the scrub for the pa

Re: Raid1 resync

2011-03-11 Thread Wenyi Liu
Hi Libor: Maybe, you can attach your oops at first. --- Best Regards, Liu Wenyi 2011/3/11 Libor Klepáč > > Hi, > before my ssd crashed, my /home partion was sitting on md raid1 consisting of > partition on disk and iScsi LUN in network, it was created with bitmaps and > iscsi lun was set wri

Raid1 resync

2011-03-11 Thread Libor Klepáč
Hi, before my ssd crashed, my /home partion was sitting on md raid1 consisting of partition on disk and iScsi LUN in network, it was created with bitmaps and iscsi lun was set writemostly. So when i came to work, i fired up iscsi, added lun to raid and partial resync went ahead. Before leaving w