Re: [PATCH v1 2/5] btrfs: state information for readahead

2011-05-23 Thread Arne Jansen
On 25.05.2011 07:22, liubo wrote: > On 05/23/2011 08:59 AM, Arne Jansen wrote: >> Add state information for readahead to btrfs_fs_info and btrfs_device >> >> Signed-off-by: Arne Jansen >> --- >> fs/btrfs/ctree.h |4 >> fs/btrfs/disk-io.c |4 >> fs/btrfs/volumes.c |8 ++

Re: Mixed RAID 1 and 0 in different subvolumes?

2011-05-23 Thread Omen Wild
Quoting Hugo Mills on Mon, May 23 22:05: > > > I see an item in the Project_ideas wiki entry called "Online raid > > config" which looks exactly like what I am after. I know some of the > > items in that list are being worked on. Is anyone working on this one? > >It's certainly on my list o

Re: [PATCH v1 2/5] btrfs: state information for readahead

2011-05-23 Thread liubo
On 05/23/2011 08:59 AM, Arne Jansen wrote: > Add state information for readahead to btrfs_fs_info and btrfs_device > > Signed-off-by: Arne Jansen > --- > fs/btrfs/ctree.h |4 > fs/btrfs/disk-io.c |4 > fs/btrfs/volumes.c |8 > fs/btrfs/volumes.h |8 >

Re: [PATCH 1/9] Btrfs: introduce sub transaction stuff

2011-05-23 Thread liubo
On 05/23/2011 10:40 AM, Chris Mason wrote: > Excerpts from Chris Mason's message of 2011-05-19 20:23:29 -0400: >> Excerpts from Liu Bo's message of 2011-05-19 04:11:24 -0400: >>> Introduce a new concept "sub transaction", >>> the relation between transaction and sub transaction is >>> >>> transacti

Re: [PATCH 0/9] Btrfs: improve write ahead log with sub transaction

2011-05-23 Thread liubo
On 05/23/2011 12:43 PM, Josef Bacik wrote: > On 05/19/2011 04:11 AM, Liu Bo wrote: >> I've been working to try to improve the write-ahead log's performance, >> and I found that the bottleneck addresses in the checksum items, >> especially when we want to make a random write on a large file, e.g a 4

[PATCH 3/3] Ext4: handle SEEK_HOLE/SEEK_DATA generically V4

2011-05-23 Thread Josef Bacik
Since Ext4 has its own lseek we need to make sure it handles SEEK_HOLE/SEEK_DATA. For now just do the same thing that is done in the generic case, somebody else can come along and make it do fancy things later. Thanks, Signed-off-by: Josef Bacik --- V3->V4: -update to work the same as the gener

[PATCH 2/3] Btrfs: implement our own ->llseek V4

2011-05-23 Thread Josef Bacik
In order to handle SEEK_HOLE/SEEK_DATA we need to implement our own llseek. Basically for the normal SEEK_*'s we will just defer to the generic helper, and for SEEK_HOLE/SEEK_DATA we will use our fiemap helper to figure out the nearest hole or data. Currently this helper doesn't check for delalloc

[PATCH 1/3] fs: add SEEK_HOLE and SEEK_DATA flags V4

2011-05-23 Thread Josef Bacik
This just gets us ready to support the SEEK_HOLE and SEEK_DATA flags. Turns out using fiemap in things like cp cause more problems than it solves, so lets try and give userspace an interface that doesn't suck. We need to match solaris here, and the definitions are *o* If /whence/ is SEEK_HOLE, t

Re: Mixed RAID 1 and 0 in different subvolumes?

2011-05-23 Thread Hugo Mills
On Mon, May 23, 2011 at 01:06:21PM -0700, Omen Wild wrote: > Is there a way to mix RAID 1 and 0 in different subvolumes? I am a new > user to btrfs and would like to protect the important files with > mirroring, but have a bulk area that is striped for speed and size. Not yet. > For example I

Mixed RAID 1 and 0 in different subvolumes?

2011-05-23 Thread Omen Wild
Is there a way to mix RAID 1 and 0 in different subvolumes? I am a new user to btrfs and would like to protect the important files with mirroring, but have a bulk area that is striped for speed and size. For example I want / and /home to be mirrored, but /media can just be striped as it is all da

Integration branch pushed out to btrfs-unstable

2011-05-23 Thread Chris Mason
Hi everyone, I've pushed out my current kernel git tree to a new branch called integration-test. This is meant for integration testing only and should not be run by anyone who doesn't love crashes. I've pulled together a lot of important work from a lot of different people. It includes: The ne

Re: kernel BUG at fs/btrfs/inode.c:149!

2011-05-23 Thread Josef Bacik
On 05/23/2011 07:57 AM, Elric Milon wrote: > On Monday 16 May 2011 18:28:49 you wrote: >> On 05/16/2011 11:01 AM, Whirm wrote: >>> On Monday 16 May 2011 16:11:19 Josef Bacik wrote: > >>> >>> Sorry yes, I meant this is how I managed to get the corrupted filesystem. >>> >>> Ill try to break it again

cannot mount btrfs - parent transid verify failed

2011-05-23 Thread Robert Schöftner
hello! A power outage damaged a btrfs - it could not be mounted upon startup. kernel: 2.6.38 (from ubuntu kernel ppa). dmesg: [ 88.562819] device fsid 844676ff057abdd4-ccd6cf8af4e14dba devid 1 transid 112504 /dev/sdb1 [ 88.596515] verify_parent_transid: 6 callbacks suppressed [ 88.596518]

Re: kernel BUG at fs/btrfs/inode.c:2271!

2011-05-23 Thread Josef Bacik
On 05/22/2011 07:13 AM, Marco Neubauer wrote: > > Am 03.05.2011 um 16:54 schrieb Josef Bacik: > >> On 04/27/2011 02:52 PM, Marco Neubauer wrote: >>> Hi, >>> >>> this is happening mostly every night. I can't reproduce it right now. >>> vanilla kernel 2.6.38.4 >>> >> >> Can you update to a newer ke

Re: [PATCH 0/9] Btrfs: improve write ahead log with sub transaction

2011-05-23 Thread Josef Bacik
On 05/19/2011 04:11 AM, Liu Bo wrote: > I've been working to try to improve the write-ahead log's performance, > and I found that the bottleneck addresses in the checksum items, > especially when we want to make a random write on a large file, e.g a 4G file. > > Then a idea for this suggested by C

Re: [PATCH 1/2] fs: add a DCACHE_NEED_LOOKUP flag for d_flags V2

2011-05-23 Thread Josef Bacik
On 05/21/2011 10:11 PM, Al Viro wrote: > On Fri, May 20, 2011 at 01:44:30PM -0400, Josef Bacik wrote: >> +if (unlikely(d_need_lookup(dentry))) { >> +if (nameidata_dentry_drop_rcu(nd, dentry)) >> +return -ECHILD; >> +dpu

[PATCH] btrfs-progs: btrfs-reada, test program for readahead

2011-05-23 Thread Arne Jansen
This is a simple interface to test the new readahead-facility. You can trigger a readahead in the kernel for a given tree and key range. The default is to read the full extent tree. You can also specify to wait on it to finish (-w), or choose the traditional tree walk (-t) instead. Signed-off-by:

Re: [PATCH 1/9] Btrfs: introduce sub transaction stuff

2011-05-23 Thread Chris Mason
Excerpts from Chris Mason's message of 2011-05-19 20:23:29 -0400: > Excerpts from Liu Bo's message of 2011-05-19 04:11:24 -0400: > > Introduce a new concept "sub transaction", > > the relation between transaction and sub transaction is > > > > transaction A ---> transid = x > >sub trans

[PATCH v1 3/5] btrfs: initial readahead code and prototypes

2011-05-23 Thread Arne Jansen
This is the implementation for the generic read ahead framework. To trigger a readahead, btrfs_reada_add must be called. It will start a read ahead for the given range [start, end) on tree root. The returned handle can either be used to wait on the readahead to finish (btrfs_reada_wait), or to sen

[PATCH v1 5/5] btrfs: test ioctl for readahead

2011-05-23 Thread Arne Jansen
This ioctl is added to trigger a readahead from user mode. It implements a readahead using the new interface and also a traditional tree walk. This way it's possible to measure the two side by side. Signed-off-by: Arne Jansen --- fs/btrfs/ioctl.c | 86 ++

[PATCH v1 1/5] btrfs: add READAHEAD extent state

2011-05-23 Thread Arne Jansen
Add a READAHEAD extent state flag. Add a function to trigger a read with this flag set. Reset the flag in the end_io hook Signed-off-by: Arne Jansen --- fs/btrfs/disk-io.c | 36 fs/btrfs/disk-io.h |2 ++ fs/btrfs/extent_io.c | 10 +- fs/bt

[PATCH v1 0/5] btrfs: generic readeahead interface

2011-05-23 Thread Arne Jansen
This series introduces a generic readahead interface for btrfs trees. The intention is to use it to speed up scrub in a first run, but balance is another hot candidate. In general, every tree walk could be accompanied by a readahead. Deletion of large files comes to mind, where the fetching of the

[PATCH v1 4/5] btrfs: hooks for readahead

2011-05-23 Thread Arne Jansen
This adds the hooks needed for readahead. In the readpage_end_io_hook, the extent state is checked for the EXTENT_READAHEAD flag. Only in this case the readahead hook is called, to keep the impact on non-ra as low as possible. Additionally, a hook for a failed IO is added, otherwise readahead would

[PATCH v1 2/5] btrfs: state information for readahead

2011-05-23 Thread Arne Jansen
Add state information for readahead to btrfs_fs_info and btrfs_device Signed-off-by: Arne Jansen --- fs/btrfs/ctree.h |4 fs/btrfs/disk-io.c |4 fs/btrfs/volumes.c |8 fs/btrfs/volumes.h |8 4 files changed, 24 insertions(+), 0 deletions(-) diff --g

Re: kernel BUG at fs/btrfs/inode.c:149!

2011-05-23 Thread Elric Milon
On Monday 16 May 2011 18:28:49 you wrote: > On 05/16/2011 11:01 AM, Whirm wrote: > > On Monday 16 May 2011 16:11:19 Josef Bacik wrote: > > > > Sorry yes, I meant this is how I managed to get the corrupted filesystem. > > > > Ill try to break it again. > > Oh ok perfect, yeah I will try and do t

Fwd: Backref walking utilities

2011-05-23 Thread João Eduardo Luís
My apologies. Sent this from my mobile and forgot to send it to the list. --- João Eduardo Luís gpg key: 477C26E5 from pool.keyserver.eu Begin forwarded message: > From: João Eduardo Luís > Date: May 23, 2011 11:22:51 AM GMT+01:00 > To: Hugo Mills > Subject: Re: Backref walking utilities >

Re: Backref walking utilities

2011-05-23 Thread Hugo Mills
On Mon, May 23, 2011 at 12:02:21PM +0200, Arne Jansen wrote: > Hi liubo, > > On 23.05.2011 11:53, liubo wrote: > > As one of my plans, I'm going to take this project over unless someone has > > been working on it. > > Jan Schmidt has a patch for scrub nearly ready, that does some > ref-walking t

Re: Backref walking utilities

2011-05-23 Thread Arne Jansen
Hi liubo, On 23.05.2011 11:53, liubo wrote: > As one of my plans, I'm going to take this project over unless someone has > been working on it. Jan Schmidt has a patch for scrub nearly ready, that does some ref-walking to report affected files to the user. While this is kernel code and you're pla

Backref walking utilities

2011-05-23 Thread liubo
Hi, As one of my plans, I'm going to take this project over unless someone has been working on it. >From wiki, quote: Backref walking utilities Given a block number on a disk, the Btrfs metadata can find all the files and directories that use or care about that block. Some utiliti