From patchwork Tue Mar 1 10:14:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xin Zhong X-Patchwork-Id: 598751 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p21AF0ar008353 for ; Tue, 1 Mar 2011 10:15:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755721Ab1CAKOt (ORCPT ); Tue, 1 Mar 2011 05:14:49 -0500 Received: from mga02.intel.com ([134.134.136.20]:52378 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754721Ab1CAKOr convert rfc822-to-8bit (ORCPT ); Tue, 1 Mar 2011 05:14:47 -0500 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 01 Mar 2011 02:14:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.62,246,1297065600"; d="scan'208";a="714593918" Received: from pgsmsx602.gar.corp.intel.com ([10.221.43.81]) by orsmga001.jf.intel.com with ESMTP; 01 Mar 2011 02:14:45 -0800 Received: from shsmsx601.ccr.corp.intel.com (10.239.4.112) by pgsmsx602.gar.corp.intel.com (10.221.43.81) with Microsoft SMTP Server (TLS) id 8.2.254.0; Tue, 1 Mar 2011 18:14:38 +0800 Received: from shsmsx502.ccr.corp.intel.com ([10.239.4.96]) by shsmsx601.ccr.corp.intel.com ([10.239.4.112]) with mapi; Tue, 1 Mar 2011 18:14:36 +0800 From: "Zhong, Xin" To: Mitch Harder , =?iso-8859-1?Q?Maria_Wikstr=F6m?= CC: Josef Bacik , Johannes Hirte , Chris Mason , "linux-btrfs@vger.kernel.org" Date: Tue, 1 Mar 2011 18:14:34 +0800 Subject: RE: [PATCH] btrfs file write debugging patch Thread-Topic: [PATCH] btrfs file write debugging patch Thread-Index: AcvXhPFOxmkBMQjfTyitdOpM7tJ2zQAc9/vw Message-ID: <1865303E0DED764181A9D882DEF65FB68662A5EA63@shsmsx502.ccr.corp.intel.com> References: <1298857223-sup-5612@think> <201102281114.00018.johannes.hirte@fem.tu-ilmenau.de> <20110228161056.GA2769@localhost.localdomain> <1298911556.11118.8.camel@mainframe> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.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.6 (demeter1.kernel.org [140.211.167.41]); Tue, 01 Mar 2011 10:15:01 +0000 (UTC) --- fs/btrfs/file.c 2011-02-28 10:13:45.000000000 -0600 +++ /usr/src/linux/fs/btrfs/file.c 2011-02-28 13:07:11.000000000 -0600 @@ -53,12 +53,14 @@ int offset = pos & (PAGE_CACHE_SIZE - 1); int total_copied = 0; + /*************************** if ((jiffies % 10) == 0) return 0; if ((jiffies % 25) == 0) { write_bytes /= 2; } + **************************/ while (write_bytes > 0) { size_t count = min_t(size_t, @@ -82,10 +84,13 @@ /* Return to btrfs_file_aio_write to fault page */ if (unlikely(copied == 0)) { + trace_printk("TPK: unlikely copied == 0 in btrfs_copy_from_user (total_copied=%i)\n", + total_copied); break; } if (unlikely(copied < PAGE_CACHE_SIZE - offset)) { + trace_printk("TPK: unlikely copied < PAGE_CACHE_SIZE - offset in btrfs_copy_from_user\n"); offset += copied;