Re: How to handle badblocks with btrfs?

2011-06-28 Thread Arne Jansen
On 28.06.2011 01:36, Marco L. Crociani wrote: > # smartctl -d ata -l selftest /dev/sda > smartctl 5.40 2010-07-12 r3124 [x86_64-unknown-linux-gnu] (local build) > Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net > > === START OF READ SMART DATA SECTION === > SMART Self-te

Snapshot reconciliation

2011-06-28 Thread João Eduardo Luís
Hello. Can anyone think of a simple way to copy a set of pages from a given file (which may or may not be scattered throughout multiple extents) from a snapshot to correct pages within another file on another snapshot? This might sound silly, but the whole purpose is to create some sort of rec

Re: [PATCH] Btrfs: fix error check of btrfs_lookup_dentry()

2011-06-28 Thread Josef Bacik
On 06/27/2011 11:34 PM, Tsutomu Itoh wrote: > The return value of btrfs_lookup_dentry is checked so that > the panic such as illegal address reference should not occur. > > Signed-off-by: Tsutomu Itoh Nack, please fix btrfs_lookup_dentry to return ERR_PTR(-ENOENT) if it doesn't find something.

Re: Snapshot reconciliation

2011-06-28 Thread C Anthony Risinger
2011/6/28 João Eduardo Luís : > Hello. > > Can anyone think of a simple way to copy a set of pages from a given file > (which may or may not be scattered throughout multiple extents) from a > snapshot to correct pages within another file on another snapshot? > > This might sound silly, but the wh

[PATCH for -rc6] btrfs: add missing options displayed in mount output

2011-06-28 Thread David Sterba
Hi Chris, I think this is patch should go into -rc6 series, it fixes a user-visible bug. I was confused when I did not see the inode_cache in mount output although I was sure (and verified in my script) that I had passed it to mount. thanks, david --- From: David Sterba There are three missed

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

2011-06-28 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

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

2011-06-28 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 --- fs/ext4/file.c | 21 +

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

2011-06-28 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 4/4] fs: handle SEEK_HOLE/SEEK_DATA properly in all fs's that define their own llseek

2011-06-28 Thread Josef Bacik
This converts everybody to handle SEEK_HOLE/SEEK_DATA properly. In some cases we just return -EINVAL, in others we do the normal generic thing, and in others we're simply making sure that the properly due-dilligence is done. For example in NFS/CIFS we need to make sure the file size is update pro

[PATCH] xfstests 255: add a seek_data/seek_hole tester

2011-06-28 Thread Josef Bacik
This is a test to make sure seek_data/seek_hole is acting like it does on Solaris. It will check to see if the fs supports finding a hole or not and will adjust as necessary. Signed-off-by: Josef Bacik --- 255 | 71 255.out |2 + group |1 +

Re: parent transid verify failures on 2.6.39

2011-06-28 Thread Daniel Witzel
Earlier I tried the read only patch with no result. Josef said I must be applying it wrong because the error I get is not possible with the patch applied. I tried again with no luck and posted my steps for review. Well here I am a few days later with the following questions: 1) If my steps are

Re: [PATCH v8 7/8] btrfs: Replication-type information

2011-06-28 Thread David Sterba
On Sun, Jun 26, 2011 at 09:36:54PM +0100, Hugo Mills wrote: > diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c > index 828aa34..fb11550 100644 > --- a/fs/btrfs/volumes.c > +++ b/fs/btrfs/volumes.c > @@ -117,6 +117,52 @@ static void requeue_list(struct btrfs_pending_bios > *pending_bios, >

Re: parent transid verify failures on 2.6.39

2011-06-28 Thread Mitch Harder
On Tue, Jun 28, 2011 at 10:46 AM, Daniel Witzel wrote: > Earlier I tried the read only patch with no result. Josef said I must be > applying it wrong because the error I get is not possible with the patch > applied. > I tried again with no luck and posted my steps for review. Well here I am a >

Re: parent transid verify failures on 2.6.39

2011-06-28 Thread Daniel Witzel
Thanks for the reply. copied the patch from the line "diff" onward did a fresh kernel tree and got the following (same on 2.6.39-r1 and r2) localhost linux# patch -p1 --dry-run --verbose < disk-io.patch Hmm... Looks like a unified diff to me... The text leading up to this was: --

Re: parent transid verify failures on 2.6.39

2011-06-28 Thread Daniel Witzel
Thanks for the reply, Copied the patch from the "diff" line onwards and patched against a fresh kernel 2.6.39-r1 and r2 tree with same result: localhost linux # patch --dry-run --verbose -p1 < disk-io.patch Hmm... Looks like a unified diff to me... The text leading up to this was: -

Re: Snapshot reconciliation

2011-06-28 Thread João Eduardo Luís
On Jun 28, 2011, at 4:07 PM, C Anthony Risinger wrote: > 2011/6/28 João Eduardo Luís : >> Hello. >> >> Can anyone think of a simple way to copy a set of pages from a given file >> (which may or may not be scattered throughout multiple extents) from a >> snapshot to correct pages within another

[Patch] make btrfs cross compilation friendly

2011-06-28 Thread Kamble, Nitin A
Attached is a patch to fix a cross compilation issue I observed with btrfs-tools. Signed-Off-By: Nitin A Kamble Nitin A Kamble Yocto Project www.yoctoproject.org Avoid these kinds of errors while doing cross build: | ccache i586-poky-linux-gcc -march=i586 --sysroot=/disk0/pokybuild/build

Re: [PATCH v8 7/8] btrfs: Replication-type information

2011-06-28 Thread Hugo Mills
On Tue, Jun 28, 2011 at 06:32:43PM +0200, David Sterba wrote: > On Sun, Jun 26, 2011 at 09:36:54PM +0100, Hugo Mills wrote: > > diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c > > index 828aa34..fb11550 100644 > > --- a/fs/btrfs/volumes.c > > +++ b/fs/btrfs/volumes.c > > @@ -117,6 +117,52 @@ s

Re: [PATCH v8 7/8] btrfs: Replication-type information

2011-06-28 Thread Ilya Dryomov
On Tue, Jun 28, 2011 at 08:26:43PM +0100, Hugo Mills wrote: > On Tue, Jun 28, 2011 at 06:32:43PM +0200, David Sterba wrote: > > On Sun, Jun 26, 2011 at 09:36:54PM +0100, Hugo Mills wrote: > > > diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c > > > index 828aa34..fb11550 100644 > > > --- a/fs/b

[PATCH] btrfs: Remove BUG_ON's from btrfs_update_root

2011-06-28 Thread Mark Fasheh
Instead, have it pass those errors back to the callers. Most callers right now actually BUG_ON the return code anyway so behavior hasn't really changed in those cases. Others (such as btrfs_sync_log()) try to handle the error returned. btrfs_ioctl_subvol_setflags() ignores the error today. In order

Re: [PATCH] Btrfs: fix error check of btrfs_lookup_dentry()

2011-06-28 Thread Tsutomu Itoh
(2011/06/28 23:22), Josef Bacik wrote: > On 06/27/2011 11:34 PM, Tsutomu Itoh wrote: >> The return value of btrfs_lookup_dentry is checked so that >> the panic such as illegal address reference should not occur. >> >> Signed-off-by: Tsutomu Itoh > > Nack, please fix btrfs_lookup_dentry to return

[PATCH v3] Btrfs: fix error check of btrfs_lookup_dentry()

2011-06-28 Thread Tsutomu Itoh
The return value of btrfs_lookup_dentry is checked so that the panic such as illegal address reference should not occur. Signed-off-by: Tsutomu Itoh --- V1->V2: unnecessary BUG_ON was deleted V2->V3: to return -ENOENT instead of NULL when no entry was found, return value of btrfs_lookup_d

Re: [PATCH v8 2/8] btrfs: Cancel filesystem balance

2011-06-28 Thread Li Zefan
Hugo Mills wrote: > This patch adds an ioctl for cancelling a btrfs balance operation > mid-flight. The ioctl simply sets a flag, and the operation terminates > after the current block group move has completed. > > Signed-off-by: Hugo Mills > --- > fs/btrfs/ctree.h |1 + > fs/btrfs/ioctl.c

Re: Snapshot reconciliation

2011-06-28 Thread Li Zefan
João Eduardo Luís wrote: > Hello. > > Can anyone think of a simple way to copy a set of pages from a given file > (which may or may not be scattered throughout multiple extents) from a > snapshot to correct pages within another file on another snapshot? > > This might sound silly, but the whole

Re: [PATCH] xfstests 255: add a seek_data/seek_hole tester

2011-06-28 Thread Dave Chinner
On Tue, Jun 28, 2011 at 11:33:19AM -0400, Josef Bacik wrote: > This is a test to make sure seek_data/seek_hole is acting like it does on > Solaris. It will check to see if the fs supports finding a hole or not and > will > adjust as necessary. So I just looked at this with an eye to validating a