diff mbox

[2/2] Btrfs: warn when partial user transactions commit

Message ID 1268673992-5250-2-git-send-email-sage@newdream.net (mailing list archive)
State New, archived
Headers show

Commit Message

Sage Weil March 15, 2010, 5:26 p.m. UTC
None
diff mbox

Patch

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;
 }