From patchwork Mon Feb 28 20:20:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mitch Harder X-Patchwork-Id: 597261 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 p1SKKRVK015052 for ; Mon, 28 Feb 2011 20:20:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755154Ab1B1UUY (ORCPT ); Mon, 28 Feb 2011 15:20:24 -0500 Received: from mail-vw0-f46.google.com ([209.85.212.46]:42381 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755095Ab1B1UUY convert rfc822-to-8bit (ORCPT ); Mon, 28 Feb 2011 15:20:24 -0500 Received: by vws12 with SMTP id 12so3475016vws.19 for ; Mon, 28 Feb 2011 12:20:23 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.180.10 with SMTP id bs10mr1487484vcb.90.1298924422260; Mon, 28 Feb 2011 12:20:22 -0800 (PST) Received: by 10.220.81.70 with HTTP; Mon, 28 Feb 2011 12:20:22 -0800 (PST) In-Reply-To: References: <1298857223-sup-5612@think> <201102281114.00018.johannes.hirte@fem.tu-ilmenau.de> <20110228161056.GA2769@localhost.localdomain> <1298911556.11118.8.camel@mainframe> Date: Mon, 28 Feb 2011 14:20:22 -0600 Message-ID: Subject: Re: [PATCH] btrfs file write debugging patch From: Mitch Harder To: =?ISO-8859-1?Q?Maria_Wikstr=F6m?= Cc: Josef Bacik , Johannes Hirte , Chris Mason , "Zhong, Xin" , "linux-btrfs@vger.kernel.org" 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, 28 Feb 2011 20:20:28 +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;