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

2012-09-18 Thread Miao Xie
On Tue, 18 Sep 2012 13:56:44 +0800, Anand Jain wrote: -if(ri-generation == ri-generation_v2) { +if(sh-len == sizeof(struct btrfs_root_item)) { t = ri-otime.sec; This looks fine now but should this work when we move to v3 and still

[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 bo.li@oracle.com --- fs/btrfs/ioctl.c | 18 +- 1 files changed, 9

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

2012-09-18 Thread Goffredo Baroncelli kreij...@libero.it
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 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 mnt Changelog v3 - v4: - modify the check method which is used to check if btrfs_root_item contains

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

2012-09-18 Thread Miao Xie
From: Zhou Bo zhoub-f...@cn.fujitsu.com Move the function declarations to a new head file. Signed-off-by: Zhou Bo zhoub-f...@cn.fujitsu.com Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- Changelog v3 - v4: - no change. Changelog v2 - v3: - remove path_for_root() in send-utils.c Changelog v1

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

2012-09-18 Thread Miao Xie
From: Miao Xie mi...@cn.fujitsu.com This patch fixes the following warning: cmds-subvolume.c:283:3: warning: implicit declaration of function list_snapshots Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- Changelog v3 - v4: - no change. Changelog v1 - v3: - new patch. --- btrfs-list.h |1

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

2012-09-18 Thread Miao Xie
From: Miao Xie mi...@cn.fujitsu.com Since the uuid output function has been implemented, we should update the usage to tell the users. Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- Changelog v3 - v4: - no change. Changelog v1 - v3: - new patch --- cmds-subvolume.c |3 ++- 1 files

[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 mi...@cn.fujitsu.com 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

[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

[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 mi...@cn.fujitsu.com 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 path Original-Signed-off-by: Zhou Bo zhoub-f...@cn.fujitsu.com

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

2012-09-18 Thread Miao Xie
From: Zhou Bo zhoub-f...@cn.fujitsu.com This patch adds the introduction of the new option '-r' into the man page of 'btrfs subvolume list' command. Signed-off-by: Zhou Bo zhoub-f...@cn.fujitsu.com Signed-off-by: Miao Xie mi...@cn.fujitsu.com --- Changelog v3 - v4: - No change. Changelog v2 -

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

2012-09-18 Thread Goffredo Baroncelli kreij...@libero.it
Da: r...@romanrm.ru Data: 18/09/2012 6.19 A: mi...@cn.fujitsu.com Cc: Hidetoshi Setoseto.hideto...@jp.fujitsu.com, linux-btrfs@vger.kernel. org Ogg: Re: [PATCH 2/2] Btrfs-progs: add mount-option command On Tue, 18 Sep 2012 10:31:41 +0800 Miao Xie mi...@cn.fujitsu.com wrote: On tue, 18 Sep

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 mi...@cn.fujitsu.com wrote: On tue, 18 Sep 2012 10:30:17 +0900, Hidetoshi Seto wrote: This patch adds mount-option

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 seto.hideto...@jp.fujitsu.com ---

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] 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: 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 in

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 balancing code

[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 dste...@suse.cz --- fs/btrfs/ctree.h |5

[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

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 [66/68]

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] path, + btrfs subvolume list [-pur] [-s 0|1] path, List subvolumes (and snapshots), , -p print parent

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

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

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 d...@jikos.cz 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

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 andrew.mcglas...@affinityvision.com.au 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

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 casper.b...@gmail.com 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).

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

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 partition # mount