From patchwork Mon Jul 11 14:30:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 965242 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6BEUQc5016669 for ; Mon, 11 Jul 2011 14:30:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755091Ab1GKOaX (ORCPT ); Mon, 11 Jul 2011 10:30:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2481 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753997Ab1GKOaX (ORCPT ); Mon, 11 Jul 2011 10:30:23 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6BEULVi010041 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 11 Jul 2011 10:30:22 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p6BEULtL032164; Mon, 11 Jul 2011 10:30:21 -0400 Received: from localhost.localdomain (vpn-8-154.rdu.redhat.com [10.11.8.154]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p6BEUKfp014582; Mon, 11 Jul 2011 10:30:20 -0400 Message-ID: <4E1B08FC.6030907@redhat.com> Date: Mon, 11 Jul 2011 10:30:20 -0400 From: Josef Bacik User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Jeremy Sanders CC: linux-btrfs@vger.kernel.org Subject: Re: btrfs hang in flush-btrfs-5 References: In-Reply-To: X-Enigmail-Version: 1.1.2 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 11 Jul 2011 14:30:26 +0000 (UTC) On 07/11/2011 07:40 AM, Jeremy Sanders wrote: > Jeremy Sanders wrote: > >> Hi - I'm trying btrfs with kernel 2.6.38.8-32.fc15.x86_64 (a Fedora >> kernel). I'm just doing a tar-to-tar copy onto the file system with >> compress- force=zlib. Here are some traces of the stuck processes. > > I've managed to reproduce the hang using the latest btrfs from the > repository. I had to remove some of the tracing lines to get it to compile > under 2.6.38.8 and an ioctl which wasn't defined. Here is is where it is > stuck: > Hrm well that is just unlikely and hard to hit. Will you try this and see if it helps you? Thanks, Josef err = -ENOMEM; --- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 59cbdb1..3c8c435 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1081,7 +1081,8 @@ static noinline int prepare_pages(struct btrfs_root *root, struct file *file, again: for (i = 0; i < num_pages; i++) { - pages[i] = grab_cache_page(inode->i_mapping, index + i); + pages[i] = find_or_create_page(inode->i_mapping, index + i, + GFP_NOFS); if (!pages[i]) { faili = i - 1;