[PATCH] Btrfs: fix unnecessary warning when the fragments make the space alloc fail

2012-09-11 Thread Miao Xie
When we wrote some data by compress mode into a btrfs filesystem which was full of the fragments, the kernel will report: BTRFS warning (device xxx): Aborting unused transaction. The reason is: We can not find a long enough free space to store the compressed data because of the fragmentary

[PATCH] Btrfs-progs: fix arguments check of qgroup limit

2012-09-11 Thread Tsutomu Itoh
Segmentation fault occurred in the following command. # btrfs qgroup limit Segmentation fault So, we should check a minimum number of arguments. Signed-off-by: Tsutomu Itoh --- cmds-qgroup.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/cmds-qgroup.c b/cmds-qgrou

Re: enquiry about defrag

2012-09-11 Thread ching
On 09/11/2012 07:45 PM, David Sterba wrote: > On Tue, Sep 11, 2012 at 07:12:58PM +0800, ching wrote: >>> 1. According to btrfs wiki, defragment a COW file will produce two >>> unrelated files. >>> >>> Does it apply to the "autodefrag" mount option? >> can anybody helps on question 1? > The dat

Re: [PATCH] Btrfs: create a pinned em when writing to a prealloc range in DIO

2012-09-11 Thread Wade Cline
On 09/11/2012 12:42 PM, Josef Bacik wrote: Wade Cline reported a problem where he was getting garbage and warnings when writing to a preallocated range via O_DIRECT. This is because we weren't creating our normal pinned extent_map for the range we were writing to, which was causing all sorts of

[PATCH] btrfs: Kill some bi_idx references

2012-09-11 Thread Kent Overstreet
For immutable bio vecs, I've been auditing and removing bi_idx references. These were harmless, but removing them will make auditing easier. scrub_bio_end_io_worker() was open coding a bio_reset() - but this doesn't appear to have been needed for anything as right after it does a bio_put(), and pe

[PATCH] Btrfs: create a pinned em when writing to a prealloc range in DIO

2012-09-11 Thread Josef Bacik
Wade Cline reported a problem where he was getting garbage and warnings when writing to a preallocated range via O_DIRECT. This is because we weren't creating our normal pinned extent_map for the range we were writing to, which was causing all sorts of issues. This patch fixes the problem and mak

Re: DIO Write Regression on Preallocated Extents

2012-09-11 Thread Josef Bacik
On Tue, Sep 11, 2012 at 11:31:23AM -0600, Wade Cline wrote: > Hi, > > I was doing some fragmentation tests on preallocated extents on Josef's > btrfs-next branch (commit 8fe3b6) with the O_DIRECT flag enabled and > noticed some strange behavior. Writing to a preallocated extent > currently trigger

DIO Write Regression on Preallocated Extents

2012-09-11 Thread Wade Cline
Hi, I was doing some fragmentation tests on preallocated extents on Josef's btrfs-next branch (commit 8fe3b6) with the O_DIRECT flag enabled and noticed some strange behavior. Writing to a preallocated extent currently triggers a WARN_ON on in the kernel, triggers a csum error for what appear

[RESPOST][BTRFS-PROGS][PATCH] btrfs_read_dev_super(): uninitialized variable

2012-09-11 Thread Goffredo Baroncelli
This is a repost because I rebased the change. The first attempt was done with the email "[BTRFS-PROGS][BUG][PATCH] Incorrect detection of a removed device [was Re: “Bug”-report: inconsistency kernel <-> tools]" dated 08/31/2012. In the function btrfs_read_dev_super() it is possible to use th

advice for testing fileserver

2012-09-11 Thread Caleb O'Connell
I'm building a test file server using samba 3.6 to see if BTRFS is a good fit. I want to stress that this is a test setup for now. I'm trying to get an idea of the sub-volume concept and how it relates to the LVM concept. Trying to see what might be the best practice. I was going to create on

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

2012-09-11 Thread Liu Bo
On 09/11/2012 07:49 AM, David Sterba wrote: > On Thu, Sep 06, 2012 at 09:10:52AM +0800, 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 will preserve the sharing, and defrag needs to grow this

[PATCH v3] Btrfs: fix a bug of per-file nocow

2012-09-11 Thread Liu Bo
Users report a bug, the reproducer is: $ mkfs.btrfs /dev/loop0 $ mount /dev/loop0 /mnt/btrfs/ $ mkdir /mnt/btrfs/dir $ chattr +C /mnt/btrfs/dir/ $ dd if=/dev/zero of=/mnt/btrfs/dir/foo bs=4K count=10; $ lsattr /mnt/btrfs/dir/foo ---C- /mnt/btrfs/dir/foo $ filefrag /mnt/btrfs/dir/foo /mn

Re: Workaround for hardlink count problem?

2012-09-11 Thread Arne Jansen
On 11.09.2012 01:38, Jan Engelhardt wrote: > > On Tuesday 2012-09-11 01:09, Martin Steigerwald wrote: What about: - copy first backup version - btrfs subvol create first next - copy next backup version - btrfs subvol create previous next >>> >>> Wouldn't "btrfs subvol

Re: enquiry about defrag

2012-09-11 Thread David Sterba
On Tue, Sep 11, 2012 at 07:12:58PM +0800, ching wrote: > > 1. According to btrfs wiki, defragment a COW file will produce two > > unrelated files. > > > > Does it apply to the "autodefrag" mount option? > > can anybody helps on question 1? The data blocks associated with the files (that were

Re: enquiry about defrag

2012-09-11 Thread ching
On 09/09/2012 08:03 AM, ching wrote: > Hi all, > > i am new on btrfs, i am testing KVM on btrfs (host: kernel x86-64 3.5.3), the > performance is reasonable. > > I have two question on defrag, can someone help me? > > 1. According to btrfs wiki, defragment a COW file will produce two unrelated >

Re: enquiry about defrag

2012-09-11 Thread ching
On 09/11/2012 09:28 AM, Li Zefan wrote: >> may i ask a stupid question, if i remove my "compress-force=lzo" option, >> will compression disabled for new written data? > the answer is yes. :) > > The problem seems fixed. The number of extent decrease to 14055 after defrag with compression off. --

Re: Cannot create subvolume with quota enabled

2012-09-11 Thread Dan Carpenter
On Tue, Sep 11, 2012 at 04:35:26AM -0400, Marios Titas wrote: > On Tue, Sep 11, 2012 at 2:19 AM, Arne Jansen wrote: > > > > instead of applying my patch, could you please just revert > > > > commit 5986802c2fcc754040bb7ed95f30bb16c4a843b7 > > Author: Dan Carpenter > > Date: Mon Jul 30 02:16:10

Re: Your Unsubscribe Request to us...@tortoisesvn.tigris.org

2012-09-11 Thread admin
This is to inform you that your recent unsubscribe request was unsuccessful. This is probably because we could find no current subscription in your name. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo i

Re: Workaround for hardlink count problem?

2012-09-11 Thread Martin Steigerwald
Am Dienstag, 11. September 2012 schrieb Jan Engelhardt: > > On Tuesday 2012-09-11 01:09, Martin Steigerwald wrote: > >> > What about: > >> > > >> > - copy first backup version > >> > - btrfs subvol create first next > >> > - copy next backup version > >> > - btrfs subvol create previous next > >>

Re: Cannot create subvolume with quota enabled

2012-09-11 Thread Marios Titas
On Tue, Sep 11, 2012 at 2:19 AM, Arne Jansen wrote: > > instead of applying my patch, could you please just revert > > commit 5986802c2fcc754040bb7ed95f30bb16c4a843b7 > Author: Dan Carpenter > Date: Mon Jul 30 02:16:10 2012 -0600 > > Btrfs: fix some error codes in btrfs_qgroup_inherit() > >