From patchwork Mon Mar 15 17:26:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sage Weil X-Patchwork-Id: 86005 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 o2FHRPCH000447 for ; Mon, 15 Mar 2010 17:27:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965576Ab0COR1W (ORCPT ); Mon, 15 Mar 2010 13:27:22 -0400 Received: from cobra.newdream.net ([66.33.216.30]:46051 "EHLO cobra.newdream.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965510Ab0COR1W (ORCPT ); Mon, 15 Mar 2010 13:27:22 -0400 Received: from localhost.localdomain (dsl092-035-022.lax1.dsl.speakeasy.net [66.92.35.22]) by cobra.newdream.net (Postfix) with ESMTPA id 83007BC855; Mon, 15 Mar 2010 10:28:09 -0700 (PDT) From: Sage Weil To: linux-btrfs@vger.kernel.org Cc: Sage Weil Subject: [PATCH 2/2] Btrfs: warn when partial user transactions commit Date: Mon, 15 Mar 2010 10:26:32 -0700 Message-Id: <1268673992-5250-2-git-send-email-sage@newdream.net> X-Mailer: git-send-email 1.7.0 In-Reply-To: <1268673992-5250-1-git-send-email-sage@newdream.net> References: <1268673992-5250-1-git-send-email-sage@newdream.net> 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, 15 Mar 2010 17:27:25 +0000 (UTC) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 2e6404f..33975e7 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1046,8 +1046,11 @@ int btrfs_release_file(struct inode *inode, struct file *filp) if (inode->i_size > BTRFS_ORDERED_OPERATIONS_FLUSH_LIMIT) filemap_flush(inode->i_mapping); } - if (filp->private_data) + if (filp->private_data) { + pr_warning("aborted btrfs user transaction, committing " + "partial result\n"); btrfs_ioctl_trans_end(filp); + } return 0; }