Re: [PATCH V4 4/7] Btrfs-progs: fix wrong way to check if the root item contains otime and uuid

2012-09-18 Thread Miao Xie
On wed, 19 Sep 2012 09:55:19 +0800, Anand Jain wrote: > > Miao, > >> wrong because it is possbile that ->generation may equal to the first >> variant of the next item. > > When can this happen ? Can you provide a scenario to run through. ? On the old kernel: # mkfs.btrfs # mount # btr

Re: [PATCH V4 4/7] Btrfs-progs: fix wrong way to check if the root item contains otime and uuid

2012-09-18 Thread Anand Jain
Miao, wrong because it is possbile that ->generation may equal to the first variant of the next item. When can this happen ? Can you provide a scenario to run through. ? Thanks, Anand -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majo

Re: Experiences: Why BTRFS had to yield for ZFS

2012-09-18 Thread Gregory Farnum
On Mon, Sep 17, 2012 at 1:45 AM, Casper Bang wrote: > Abstract > For database testing purposes, a COW filesystem was needed in order to > facilitate snapshotting and rollback, such as to provide mirrors of > our production database at fixed intervals (every night and by > demand). > > Platform > A

Re: Experiences: Why BTRFS had to yield for ZFS

2012-09-18 Thread Avi Miller
Hi, On 19/09/2012, at 2:48 AM, Andrew McGlashan wrote: > On 17/09/2012 8:05 PM, Avi Miller wrote: >> Oracle Database is not certified to run on either btrfs or ZFS on Linux, so >> if certification is an issue, you can't use either filesystem. Out of >> interest, have you done a performance be

Re: [PATCH V3 2/2] Btrfs: fix the snapshot that should not exist

2012-09-18 Thread Mitch Harder
On Thu, Aug 2, 2012 at 6:46 AM, David Sterba wrote: ... > > Fsck spits lots of errors: > > ref mismatch on [1133031424 4096] extent item 1, found 0 > Backref 1133031424 root 5 not referenced back 0x7d1f40 > Incorrect global backref count on 1133031424 found 1 wanted 0 > backpointer mismatch on [11

Re: Experiences: Why BTRFS had to yield for ZFS

2012-09-18 Thread Andrew McGlashan
Hi, On 17/09/2012 8:05 PM, Avi Miller wrote: > Oracle Database is not certified to run on either btrfs or ZFS on Linux, so > if certification is an issue, you can't use either filesystem. Out of > interest, have you done a performance benchmark with ASM using ASMlib on the > same platform? I

Scrub status, finished?

2012-09-18 Thread Lluís Batlle i Rossell
Hello, I run a scrub on a 2-disc btrfs, then cancelled it, then resumed. At the end, I expected it telling about it having finished. But the only I get on 'btrfs scrub status /' is: scrub status for 2ebf9e90-104c-47a4-adff-fada1ce3b682 scrub resumed at Tue Sep 18 15:27:45 2012, running fo

Re: [PATCH V4 6/7] Btrfs-progs: enhance btrfs subvol list only to show read-only snapshots

2012-09-18 Thread Martin Steigerwald
Am Dienstag, 18. September 2012 schrieb Miao Xie: > static const char * const cmd_subvol_list_usage[] = { > - "btrfs subvolume list [-pu] [-s 0|1] ", > + "btrfs subvolume list [-pur] [-s 0|1] ", > "List subvolumes (and snapshots)", > "", > "-p print pa

Re: [josef-btrfs:master 66/68] fs/btrfs/inode.c:2185:6: warning: passing argument 2 of 'btrfs_drop_extents' from incompatible pointer type

2012-09-18 Thread Liu Bo
On 09/18/2012 10:05 PM, Fengguang Wu wrote: > Hi Liu, > > FYI, there are new compile warnings show up in > > tree: git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git > master > head: 6a47d2266699f2d7903d26f178ed135dd9a109cf > commit: 434728b4678badfad6e8a35df26034a081014254 [

[PATCH] Btrfs: fix a compiling warning

2012-09-18 Thread Liu Bo
NOTE: This is against btrfs-next git repo. fs/btrfs/inode.c: In function ‘relink_extent_backref’: fs/btrfs/inode.c:2185:6: warning: passing argument 2 of ‘btrfs_drop_extents’ from incompatible pointer type [enabled by default] fs/btrfs/ctree.h:3340:5: note: expected ‘struct btrfs_root *’ but argum

[PATCH] btrfs: move transaction aborts to the point of failure

2012-09-18 Thread David Sterba
Call btrfs_abort_transaction as early as possible when an error condition is detected, that way the line number reported is useful and we're not clueless anymore which error path led to the abort. Signed-off-by: David Sterba --- fs/btrfs/ctree.h |5 fs/btrfs/extent-tree.c | 56 +

Re: [PATCH 2/2 v3] Btrfs: snapshot-aware defrag

2012-09-18 Thread Josef Bacik
On Mon, Sep 17, 2012 at 06:23:21PM -0600, Liu Bo wrote: > On 09/18/2012 01:15 AM, Josef Bacik wrote: > > On Mon, Sep 17, 2012 at 03:58:56AM -0600, Liu Bo wrote: > >> This comes from one of btrfs's project ideas, > >> As we defragment files, we break any sharing from other snapshots. > >> The balanc

Re: BTRFS_IOC_DEVICES_READY and removed devices

2012-09-18 Thread Josef Bacik
On Mon, Sep 17, 2012 at 04:46:08PM -0600, Kay Sievers wrote: > We are currently playing around with native btrfs multi-device support > in systemd. We already committed the needed pieces to systemd git, to > register all detected btrfs filesystems with the kernel. > > For volumes which are listed

Re: [PATCH] Btrfs: fix the missing error information in create_pending_snapshot()

2012-09-18 Thread David Sterba
On Tue, Sep 18, 2012 at 01:52:38PM +0800, Miao Xie wrote: > The macro btrfs_abort_transaction() can get the line number of the code > where the problem happens, so we should invoke it in the place that the > error occurs, or we will lose the line number. Thanks, that's it! AFAICS it's based on

Re: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-18 Thread David Sterba
On Tue, Sep 18, 2012 at 10:30:17AM +0900, Hidetoshi Seto wrote: > Now, the command can set/get 24 options. > These options are equal to mount options which store > in fs_info/mount-opt. Some of the options do not IMO fit for being default, like DEGRADED, maybe RECOVERY, maybe SKIP_BALANCE. > +

Re: [PATCH 1/2] Btrfs: make space to keep default mount options

2012-09-18 Thread David Sterba
On Tue, Sep 18, 2012 at 10:28:48AM +0900, Hidetoshi Seto wrote: > This patch create space to hold default mount option, > and to use saved default mount option change super.c > to read default mount option first when mount devices. > > Signed-off-by: Hidetoshi Seto > --- > fs/btrfs/ctree.h |

Re: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-18 Thread David Sterba
On Tue, Sep 18, 2012 at 09:19:40AM +0100, Hugo Mills wrote: > On Tue, Sep 18, 2012 at 10:19:30AM +0600, Roman Mamedov wrote: > > On Tue, 18 Sep 2012 10:31:41 +0800 > > Miao Xie wrote: > > > > > On tue, 18 Sep 2012 10:30:17 +0900, Hidetoshi Seto wrote: > > > > This patch adds mount-option command.

R: Re: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-18 Thread Goffredo Baroncelli
>Da: r...@romanrm.ru >Data: 18/09/2012 6.19 >A: >Cc: "Hidetoshi Seto", >Ogg: Re: [PATCH 2/2] Btrfs-progs: add mount-option command > >On Tue, 18 Sep 2012 10:31:41 +0800 >Miao Xie wrote: > >> On tue, 18 Sep 2012 10:30:17 +0900, Hidetoshi Seto wrote: >> > This patch adds mount-option command. >>

[PATCH V4 7/7] Btrfs-progs: update the manpage entries for the btrfs subvolume list

2012-09-18 Thread Miao Xie
From: Zhou Bo This patch adds the introduction of the new option '-r' into the man page of 'btrfs subvolume list' command. Signed-off-by: Zhou Bo Signed-off-by: Miao Xie --- Changelog v3 -> v4: - No change. Changelog v2 -> v3: - No change. Changelog v1 -> v2: - new patch --- man/btrfs.8.in

[PATCH V4 6/7] Btrfs-progs: enhance btrfs subvol list only to show read-only snapshots

2012-09-18 Thread Miao Xie
From: Miao Xie We want 'btrfs subvolume list' only to list readonly subvolumes, this patch set introduces a new option 'r' to implement it. You can use the command like that: btrfs subvolume list -r Original-Signed-off-by: Zhou Bo Signed-off-by: Miao Xie --- Changelog v3 -> v4: - re

[PATCH V4 5/7] Btrfs-progs: restructure list_subvolumes

2012-09-18 Thread Miao Xie
The current code of list_subvols() has very bad scalability, if we want to add new filter conditions or new sort methods, we have to modify lots of code. Beside that, the most code of list_snapshots() is similar to list_subvols(), So I restructure list_subvols(), and split the subvolume filter fu

[PATCH V4 4/7] Btrfs-progs: fix wrong way to check if the root item contains otime and uuid

2012-09-18 Thread Miao Xie
From: Miao Xie Now we check if the root item contains otime and uuid or not by comparing ->generation_v2 and ->generation of the btrfs_root_item structure, it is wrong because it is possbile that ->generation may equal to the first variant of the next item. We fix this problem by check the size o

[PATCH V4 3/7] Btrfs-progs: fix wrong usage of btrfs subvolume list command

2012-09-18 Thread Miao Xie
From: Miao Xie Since the uuid output function has been implemented, we should update the usage to tell the users. Signed-off-by: Miao Xie --- Changelog v3 -> v4: - no change. Changelog v1 -> v3: - new patch --- cmds-subvolume.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) dif

[PATCH V4 2/7] Btrfs-progs: fix compile warning of implicit declaration of "list_snapshots"

2012-09-18 Thread Miao Xie
From: Miao Xie This patch fixes the following warning: cmds-subvolume.c:283:3: warning: implicit declaration of function "list_snapshots" Signed-off-by: Miao Xie --- Changelog v3 -> v4: - no change. Changelog v1 -> v3: - new patch. --- btrfs-list.h |1 + 1 files changed, 1 insertions(+),

[PATCH V4 1/7] Btrfs-progs: move the function declarations to a new head file

2012-09-18 Thread Miao Xie
From: Zhou Bo Move the function declarations to a new head file. Signed-off-by: Zhou Bo Signed-off-by: Miao Xie --- Changelog v3 -> v4: - no change. Changelog v2 -> v3: - remove path_for_root() in send-utils.c Changelog v1 -> v2: - new patch. --- btrfs-list.c |1 + btrfs-list.h

[PATCH V4 0/7 ] Btrfs-progs: enhance btrfs subvol list only to show read-only snapshots

2012-09-18 Thread Miao Xie
We want 'btrfs subvolume list' only to list readonly subvolumes, this patch set introduces a new option 'r' to implement it. You can use the command like that: btrfs subvolume list -r Changelog v3 -> v4: - modify the check method which is used to check if btrfs_root_item contains otime

R: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-18 Thread Goffredo Baroncelli
Hi Seto, please could you update also the man page too ? Why it was not provided a way to clear a *single* flag ? To me it seems a bit too long to clear all the flag (btrfs mount-option clear) and then set the right one. As user interface I suggest something like chmod: btrfs mount-option

[PATCH] Btrfs: fix off-by-one in file clone

2012-09-18 Thread Liu Bo
Btrfs uses inclusive range end for lock_extent(), unlock_extent() and related functions, so we made off-by-one errors in file clone. This fixes it and also fixes some style problems. Signed-off-by: Liu Bo --- fs/btrfs/ioctl.c | 18 +- 1 files changed, 9 insertions(+), 9 deleti

Re: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-18 Thread Hugo Mills
On Tue, Sep 18, 2012 at 10:19:30AM +0600, Roman Mamedov wrote: > On Tue, 18 Sep 2012 10:31:41 +0800 > Miao Xie wrote: > > > On tue, 18 Sep 2012 10:30:17 +0900, Hidetoshi Seto wrote: > > > This patch adds mount-option command. > > > The command can set/get default mount options. > > > Now, the com