From patchwork Mon May 3 02:11:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yan, Zheng" X-Patchwork-Id: 96408 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o432C09S028973 for ; Mon, 3 May 2010 02:12:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756070Ab0ECCL6 (ORCPT ); Sun, 2 May 2010 22:11:58 -0400 Received: from rcsinet10.oracle.com ([148.87.113.121]:20845 "EHLO rcsinet10.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755668Ab0ECCL5 (ORCPT ); Sun, 2 May 2010 22:11:57 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o432Bs0r020289 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 3 May 2010 02:11:56 GMT Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o431pW5m004955 for ; Mon, 3 May 2010 02:11:54 GMT Received: from abhmt010.oracle.com by acsmt354.oracle.com with ESMTP id 229342601272852704; Sun, 02 May 2010 19:11:44 -0700 Received: from [192.168.0.100] (/118.114.211.1) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 02 May 2010 19:11:44 -0700 Message-ID: <4BDE30D6.9000602@oracle.com> Date: Mon, 03 May 2010 10:11:34 +0800 From: "Yan, Zheng" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4 MIME-Version: 1.0 To: linux-btrfs@vger.kernel.org, Chris Mason Subject: [PATCH] btrfs: Fix block generation verification race X-Auth-Type: Internal IP X-Source-IP: acsinet15.oracle.com [141.146.126.227] X-CT-RefId: str=0001.0A090206.4BDE30EC.00B2:SCFMA922111,ss=1,fgs=0 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.3 (demeter.kernel.org [140.211.167.41]); Mon, 03 May 2010 02:12:00 +0000 (UTC) diff -urp 1/fs/btrfs/ctree.c 2/fs/btrfs/ctree.c --- 1/fs/btrfs/ctree.c 2010-04-14 14:49:56.342950744 +0800 +++ 2/fs/btrfs/ctree.c 2010-05-03 09:44:24.426642447 +0800 @@ -1589,7 +1589,7 @@ read_block_for_search(struct btrfs_trans btrfs_release_path(NULL, p); ret = -EAGAIN; - tmp = read_tree_block(root, blocknr, blocksize, gen); + tmp = read_tree_block(root, blocknr, blocksize, 0); if (tmp) { /* * If the read above didn't mark this buffer up to date,