Re: [2.6.38-rc6] create->rebalance->mount crash...

2011-02-25 Thread Daniel J Blueman
On 24 February 2011 20:48, liubo wrote: > On 02/24/2011 04:13 PM, Daniel J Blueman wrote: >> When creating a filesystem (single or redundant) with BTRFS and >> subsequently executing a balance [1], we see a kernel oops at the next >> mount [2]. >> > > Hi, Daniel, > > After digging this, I've come

Re: [PATCH] Btrfs: fix infinite loop in btrfs_shrink_device()

2011-02-25 Thread Yan, Zheng
On Sat, Feb 26, 2011 at 7:43 AM, Ilya Dryomov wrote: > In case of an ENOSPC error from btrfs_relocate_chunk() (line 2202) while > relocating a block group with offset 0 we end up endlessly looping. > This happens because key.offset -= 1 statement then unconditionally > brings us back to the beginn

[PATCH] Btrfs: fix infinite loop in btrfs_shrink_device()

2011-02-25 Thread Ilya Dryomov
In case of an ENOSPC error from btrfs_relocate_chunk() (line 2202) while relocating a block group with offset 0 we end up endlessly looping. This happens because key.offset -= 1 statement then unconditionally brings us back to the beginnig of the loop (key.offset == (u64)-1). Signed-off-by: Ilya D

Fwd: Comparing snapshots?

2011-02-25 Thread Joao Luis
I had rich text enabled by default, and the ml bounced back the email. Apparently, HTML equals spam and/or virus. :-) Here goes the plain-text version. -- Forwarded message -- From: João Eduardo Luís Date: 2011/2/25 Subject: Re: Comparing snapshots? To: kreij...@inwind.it Cc: li

[GIT PULL] Btrfs pull request for 2.6.38

2011-02-25 Thread Chris Mason
Hi everyone, Someone just figured out an enospc regression for btrfs, and that patch isn't ready for this pull request. But, this pull has some important fixes, especially for btrfs fiemap and I wanted to make sure it got out the door. Linus, the master branch of the btrfs unstable tree: git://

Re: Comparing snapshots?

2011-02-25 Thread Goffredo Baroncelli
On 02/25/2011 08:32 PM, João Eduardo Luís wrote: > Hello, > > Please note that my experience with btrfs is both recent and, above > all, very small. However, I've been wondering about the same issue > for a different purpose and your question intrigues me. > > However, and I may be off-base here,

Re: Comparing snapshots?

2011-02-25 Thread Goffredo Baroncelli
On 02/25/2011 10:59 AM, Arvin Schnell wrote: > Hi, > > for a backup program I have to find all differing files > (including metadata) in two snapshots taken from the same > subvolume. > > Having looked at the find-new command I thought about this > process: > > 1. Get the two transids when the t

Re: Comparing snapshots?

2011-02-25 Thread João Eduardo Luís
Hello, Please note that my experience with btrfs is both recent and, above all, very small. However, I've been wondering about the same issue for a different purpose and your question intrigues me. However, and I may be off-base here, I think that wouldn't be trivial to achieve. Even if one

Re: [PATCH v2]Btrfs: pwrite blocked when writing from the mmaped buffer of the same page

2011-02-25 Thread Chris Mason
Excerpts from Mitch Harder's message of 2011-02-25 13:43:37 -0500: > > The loop is more-or-less following this process (from within the > > "while (iov_iter_count(&i) > 0) {}" loop): > > > > (1) Reserve some space with btrfs_delalloc_reserve_space() > > (2) Prepare the reserved space with prepare_p

Re: [PATCH v2]Btrfs: pwrite blocked when writing from the mmaped buffer of the same page

2011-02-25 Thread Mitch Harder
On Fri, Feb 25, 2011 at 11:11 AM, Mitch Harder wrote: > On Thu, Feb 24, 2011 at 5:14 PM, Mitch Harder > wrote: >> On Thu, Feb 24, 2011 at 10:32 AM, Mitch Harder >> wrote: >>> On Thu, Feb 24, 2011 at 10:19 AM, Chris Mason >>> wrote: Excerpts from Mitch Harder's message of 2011-02-24 11:03:

Re: [PATCH v2]Btrfs: pwrite blocked when writing from the mmaped buffer of the same page

2011-02-25 Thread Mitch Harder
On Thu, Feb 24, 2011 at 5:14 PM, Mitch Harder wrote: > On Thu, Feb 24, 2011 at 10:32 AM, Mitch Harder > wrote: >> On Thu, Feb 24, 2011 at 10:19 AM, Chris Mason wrote: >>> Excerpts from Mitch Harder's message of 2011-02-24 11:03:07 -0500: On Thu, Feb 24, 2011 at 10:00 AM, Chris Mason

Re: [PATCH] rework btrfs fiemap (please review)

2011-02-25 Thread Josef Bacik
On Tue, Feb 22, 2011 at 10:29:17PM -0500, Chris Mason wrote: > Excerpts from Chris Mason's message of 2011-02-21 22:19:09 -0500: > > Hi everyone, > > > > Looks like the latest versions of cp use fiemap to decide if a file is > > sparse, which is a great way to avoid doing memcmp, but only if your

[PATCH] Btrfs: make sure we call recalculate_thresholds() in btrfs_remove_free_space()

2011-02-25 Thread Li Dongyang
we should recalculate the thresholds everytime when we add/free a bitmap, make sure we do this in btrfs_remove_free_space() by calling free_bitmap(),Thanks Signed-off-by: Li Dongyang --- fs/btrfs/free-space-cache.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git

Comparing snapshots?

2011-02-25 Thread Arvin Schnell
Hi, for a backup program I have to find all differing files (including metadata) in two snapshots taken from the same subvolume. Having looked at the find-new command I thought about this process: 1. Get the two transids when the two snapshots were created. 2. Query modifications to the origina

[PATCH V2] Btrfs: Batched discard support for btrfs

2011-02-25 Thread Li Dongyang
Thanks for your comments, here is the updated patch. I've tested it with xfstests 251(thanks to Lukas), and it looks fine to me. Signed-off-by: Li Dongyang Reviewed-by: David Sterba Reviewed-by: Kurt Garloff --- Changelog V2: *Check if we have devices support trim before trying to trim the