Re: i_version vs iversion (Was: Re: [RFC PATCH v2 1/2] Btrfs: add noi_version option to disable MS_I_VERSION)

2015-06-24 Thread Liu Bo
On Tue, Jun 23, 2015 at 12:32:41PM -0400, Theodore Ts'o wrote: > On Thu, Jun 18, 2015 at 04:38:56PM +0200, David Sterba wrote: > > Moving the discussion to fsdevel. > > > > Summary: disabling MS_I_VERSION brings some speedups to btrfs, but the > > generic 'noiversion' option cannot be used to achi

Re: counting fragments takes more time than defragmenting

2015-06-24 Thread Patrik Lundquist
On 24 June 2015 at 05:20, Marc MERLIN wrote: > > Hello again, > > Just curious, is anyone seeing similar things with big VM images or other > DBs? > I forgot to mention that my vdi file is 88GB. > > It's surprising that it took longer to count the fragments than to actually > defragment the file.

Re: counting fragments takes more time than defragmenting

2015-06-24 Thread Duncan
Patrik Lundquist posted on Wed, 24 Jun 2015 10:28:09 +0200 as excerpted: > But what doesn't make sense to me is btrfs fi defrag; the -t option says > >-t >defragment only files at least bytes big > > The -t value goes into struct > btrfs_ioctl_defrag_range_args.exte

Re: counting fragments takes more time than defragmenting

2015-06-24 Thread Patrik Lundquist
On 24 June 2015 at 12:46, Duncan <1i5t5.dun...@cox.net> wrote: > Patrik Lundquist posted on Wed, 24 Jun 2015 10:28:09 +0200 as excerpted: > > AFAIK, it's set huge to defrag everything, It's set to 256K by default. > Assuming "set a huge -t to defrag to the maximum extent possible" is > correct,

Re: [PATCH v2 0/5] Btrfs: RAID 5/6 missing device scrub+replace

2015-06-24 Thread Ed Tomlinson
On Wednesday, June 24, 2015 12:15:29 AM EDT, Omar Sandoval wrote: On Tue, Jun 23, 2015 at 11:07:00AM +0800, wangyf wrote: Hi, I have tested your PATCH v2 , but something wrong happened. kernel: 4.1.0-rc7+ with your five patches vitrualBox ubuntu14.10-server + LVM I make a new btrfs.ko with you

[PATCH] btrfs-progs: Fix defrag threshold overflow

2015-06-24 Thread Patrik Lundquist
btrfs fi defrag -t 1T overflows the u32 thresh variable and default, instead of max, threshold is used. Signed-off-by: Patrik Lundquist --- cmds-filesystem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmds-filesystem.c b/cmds-filesystem.c index 530f815..72bb45b 1006

[patch] btrfs: delayed-ref: double free in btrfs_add_delayed_tree_ref()

2015-06-24 Thread Dan Carpenter
There is a cut and paste error so instead of freeing "head_ref", we free "ref" twice. Fixes: 3368d001ba5d ('btrfs: qgroup: Record possible quota-related extent for qgroup.') Signed-off-by: Dan Carpenter diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c index fd64fd0..ac3e81d 100644 -

Re: [PATCH] btrfs-progs: alias btrfs device delete to btrfs device remove

2015-06-24 Thread David Sterba
On Tue, Jun 23, 2015 at 02:30:06PM -0700, Omar Sandoval wrote: > > No need to introduce the wrappers, it's enough to add an alternative > > usage string and the callback function will be the same. Also please > > keep the aliased entries next to each other. > > So the reason I did that way is that

[PATCH 1/2] btrfs-progs: replace struct cmd_group->hidden with flags

2015-06-24 Thread Omar Sandoval
We're also going to want to support aliases, so rather than adding another member, replace "hidden" with a "flags" member. Signed-off-by: Omar Sandoval --- cmds-filesystem.c | 2 +- commands.h| 8 ++-- help.c| 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff -

[PATCH 2/2] btrfs-progs: alias btrfs device delete to btrfs device remove

2015-06-24 Thread Omar Sandoval
There's an awkward asymmetry between btrfs device add and btrfs device delete. Resolve this by aliasing delete to remove. Signed-off-by: Omar Sandoval --- Documentation/btrfs-device.asciidoc | 5 - cmds-device.c | 35 ++- commands.h

[PATCH 0/2] btrfs device remove alias

2015-06-24 Thread Omar Sandoval
The opposite of btrfs device add is btrfs device delete. This really should be btrfs device remove. Changes from v1: - Add support for flags to cmd_struct and a CMD_ALIAS flag which only prints the one-line usage string - Rearrange the command wrappers in a way that could be made generic if ne

Re: i_version vs iversion (Was: Re: [RFC PATCH v2 1/2] Btrfs: add noi_version option to disable MS_I_VERSION)

2015-06-24 Thread David Sterba
On Tue, Jun 23, 2015 at 06:42:15AM +1000, Dave Chinner wrote: > On Thu, Jun 18, 2015 at 04:38:56PM +0200, David Sterba wrote: > > Moving the discussion to fsdevel. > > > > Summary: disabling MS_I_VERSION brings some speedups to btrfs, but the > > generic 'noiversion' option cannot be used to achie

Re: BTRFS balance fails with -dusage=100

2015-06-24 Thread Moby
On 06/22/2015 10:53 PM, Moby wrote: OpenSuSE 13.2 system with single BTRFS / mounted on top of /dev/md1. /dev/md1 is md raid5 across 4 SATA disks. System details are: Linux suse132 4.0.5-4.g56152db-default #1 SMP Thu Jun 18 15:11:06 UTC 2015 (56152db) x86_64 x86_64 x86_64 GNU/Linux btrfs-

Re: i_version vs iversion (Was: Re: [RFC PATCH v2 1/2] Btrfs: add noi_version option to disable MS_I_VERSION)

2015-06-24 Thread David Sterba
On Tue, Jun 23, 2015 at 12:32:41PM -0400, Theodore Ts'o wrote: > This has caused pain for the nfsv4 folks since it means that they need > to tell people to use a special mount option for ext4 if they are > actually using this for nfsv4, and I suspect they won't be all that > eager to hear that btrf

Re: [RFC PATCH v2 2/2] Btrfs: improve fsync for nocow file

2015-06-24 Thread David Sterba
On Thu, Jun 18, 2015 at 11:27:24AM +0800, Liu Bo wrote: > > > #define BTRFS_INODE_IN_DELALLOC_LIST 9 > > > #define BTRFS_INODE_READDIO_NEED_LOCK10 > > > #define BTRFS_INODE_HAS_PROPS11 > > > +#define BTRFS_INODE_NOTIMESTAMP 12 > > > +#

Re: [patch] btrfs: delayed-ref: double free in btrfs_add_delayed_tree_ref()

2015-06-24 Thread Chris Mason
On Wed, Jun 24, 2015 at 05:32:33PM +0300, Dan Carpenter wrote: > There is a cut and paste error so instead of freeing "head_ref", we free > "ref" twice. > > Fixes: 3368d001ba5d ('btrfs: qgroup: Record possible quota-related extent for > qgroup.') > Signed-off-by: Dan Carpenter Thanks Dan! Queu

Re: [PATCH 5/5] btrfs: add no_mtime flag to btrfs-extent-same

2015-06-24 Thread Zygo Blaxell
On Tue, Jun 23, 2015 at 05:11:56PM +0200, David Sterba wrote: > On Mon, Jun 22, 2015 at 03:47:42PM -0700, Mark Fasheh wrote: > > --- a/fs/btrfs/ioctl.c > > +++ b/fs/btrfs/ioctl.c > > @@ -87,7 +87,8 @@ struct btrfs_ioctl_received_subvol_args_32 { > > > > > > static int btrfs_clone(struct inode

Re: Btrfs progs release 4.1

2015-06-24 Thread Sjoerd
On Tuesday 23 June 2015 16:45:01 David Sterba wrote: > On Tue, Jun 23, 2015 at 11:03:47AM +0200, Sjoerd wrote: > > On Monday 22 June 2015 17:00:23 David Sterba wrote: > > > btrfs-progs 4.1 have been released (in time with kernel 4.1). Unusual > > > load > > > of changes. > > > > Would it be benefi

Re: i_version vs iversion (Was: Re: [RFC PATCH v2 1/2] Btrfs: add noi_version option to disable MS_I_VERSION)

2015-06-24 Thread Theodore Ts'o
On Wed, Jun 24, 2015 at 08:02:15PM +0200, David Sterba wrote: > > This sounds similar to what Dave proposed, a per-inode I_VERSION > attribute that can be changed through chattr. Though the negated meaning > of the flag could be confusing, I had to reread the paragraph again. Dave did not specify

Re: i_version vs iversion (Was: Re: [RFC PATCH v2 1/2] Btrfs: add noi_version option to disable MS_I_VERSION)

2015-06-24 Thread Dave Chinner
On Wed, Jun 24, 2015 at 07:17:50PM -0400, Theodore Ts'o wrote: > On Wed, Jun 24, 2015 at 08:02:15PM +0200, David Sterba wrote: > > > > This sounds similar to what Dave proposed, a per-inode I_VERSION > > attribute that can be changed through chattr. Though the negated meaning > > of the flag could

3.19.8: kernel BUG at fs/btrfs/extent_io.c:4548!

2015-06-24 Thread Marc MERLIN
Known already fixed problem, or not? [680279.909435] kernel BUG at fs/btrfs/extent_io.c:4548! [680279.926208] invalid opcode: [#1] SMP [680279.940494] Modules linked in: udp_diag tcp_diag inet_diag loop veth ip6table_filter ip6_tables ebtable_nat ebtables ppdev lp xt_addrtype bridge stp llc

Re: 3.19.8: kernel BUG at fs/btrfs/extent_io.c:4548!

2015-06-24 Thread Marc MERLIN
On Wed, Jun 24, 2015 at 06:38:42PM -0700, Marc MERLIN wrote: > Known already fixed problem, or not? > > [680279.909435] kernel BUG at fs/btrfs/extent_io.c:4548! > [680279.926208] invalid opcode: [#1] SMP After reboot, I'm now seeing this if that helps: [ 272.826942] BTRFS info (device dm-1)

Re: [RFC PATCH v2 2/2] Btrfs: improve fsync for nocow file

2015-06-24 Thread Liu Bo
On Wed, Jun 24, 2015 at 08:21:30PM +0200, David Sterba wrote: > On Thu, Jun 18, 2015 at 11:27:24AM +0800, Liu Bo wrote: > > > > #define BTRFS_INODE_IN_DELALLOC_LIST 9 > > > > #define BTRFS_INODE_READDIO_NEED_LOCK 10 > > > > #define BTRFS_INODE_HAS_PROPS 11 > >

Re: 3.19.8: kernel BUG at fs/btrfs/extent_io.c:4548!

2015-06-24 Thread Liu Bo
On Wed, Jun 24, 2015 at 06:38:42PM -0700, Marc MERLIN wrote: > Known already fixed problem, or not? > > [680279.909435] kernel BUG at fs/btrfs/extent_io.c:4548! > [680279.926208] invalid opcode: [#1] SMP > [680279.940494] Modules linked in: udp_diag tcp_diag inet_diag loop veth > ip6table_fi

Re: [PATCH 1/5] btrfs: pass unaligned length to btrfs_cmp_data()

2015-06-24 Thread Liu Bo
On Tue, Jun 23, 2015 at 02:28:36PM -0700, Mark Fasheh wrote: > In the case that we dedupe the tail of a file, we might expand the dedupe > len out to the end of our last block. We don't want to compare data past > i_size however, so pass the original length to btrfs_cmp_data(). Reviewed-by: Liu Bo

Re: [PATCH 2/5] btrfs: fix deadlock with extent-same and readpage

2015-06-24 Thread Liu Bo
On Tue, Jun 23, 2015 at 02:28:37PM -0700, Mark Fasheh wrote: > ->readpage() does page_lock() before extent_lock(), we do the opposite in > extent-same. We want to reverse the order in btrfs_extent_same() but it's > not quite straightforward since the page locks are taken inside > btrfs_cmp_data().

Re: counting fragments takes more time than defragmenting

2015-06-24 Thread Duncan
Patrik Lundquist posted on Wed, 24 Jun 2015 14:05:57 +0200 as excerpted: > On 24 June 2015 at 12:46, Duncan <1i5t5.dun...@cox.net> wrote: >> Patrik Lundquist posted on Wed, 24 Jun 2015 10:28:09 +0200 as >> excerpted: >> >> AFAIK, it's set huge to defrag everything, > > It's set to 256K by default

Re: [PATCH 0/2] btrfs device remove alias

2015-06-24 Thread Duncan
Omar Sandoval posted on Wed, 24 Jun 2015 09:09:15 -0700 as excerpted: > The opposite of btrfs device add is btrfs device delete. This really > should be btrfs device remove. What about btrfs device subtract? That's what _I_'d call the opposite of add. Otherwise, add/remove instead of add/delet

Re: btrfs partition converted from ext4 becomes read-only minutes after booting: WARNING: CPU: 2 PID: 2777 at ../fs/btrfs/super.c:260 __btrfs_abort_transaction+0x4b/0x120

2015-06-24 Thread Marc MERLIN
On Thu, Jun 18, 2015 at 02:05:04PM +0300, Robert Munteanu wrote: > On Wed, Jun 17, 2015 at 8:46 PM, Marc MERLIN wrote: > > On Fri, Jun 12, 2015 at 03:19:06PM +0300, Robert Munteanu wrote: > >> Hi, > > > > Note to others: kernel 4.0.4 > > > > Reply to you: > > I tried ext4 to btrfs once a year ago

Re: [PATCH v2 0/5] Btrfs: RAID 5/6 missing device scrub+replace

2015-06-24 Thread wangyf
I confirmed this bug report, and found the reason is that I compiled the patched module with a dirty kernel. This morning I tested this patch again, and didn't see above error, this patch is OK. Sorry for this bug report. : ( 在 2015年06月24日 20:00, Ed Tomlinson 写道: On Wednesday, June 24, 20

Re: counting fragments takes more time than defragmenting

2015-06-24 Thread Patrik Lundquist
On 25 June 2015 at 06:01, Duncan <1i5t5.dun...@cox.net> wrote: > > Patrik Lundquist posted on Wed, 24 Jun 2015 14:05:57 +0200 as excerpted: > > > On 24 June 2015 at 12:46, Duncan <1i5t5.dun...@cox.net> wrote: > > If it's uint32 limited, either kill everything above that in both the > documentation