diff mbox

btrfs file write debugging patch

Message ID AANLkTikex7g4+dc9qiPdL_xRk5SoFxE3TCfN7dg3kaR2@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mitch Harder Feb. 28, 2011, 8:20 p.m. UTC
None
diff mbox

Patch

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