diff mbox

Btrfs fails randomly

Message ID 3d0408630912272101j71c60ea0t5862ea5da09e7e15@mail.gmail.com (mailing list archive)
State Accepted
Headers show

Commit Message

Yan, Zheng Dec. 28, 2009, 5:01 a.m. UTC
None
diff mbox

Patch

diff -urp 1/fs/btrfs/ordered-data.c 2/fs/btrfs/ordered-data.c
--- 1/fs/btrfs/ordered-data.c	2009-12-28 12:23:42.088546898 +0800
+++ 2/fs/btrfs/ordered-data.c	2009-12-28 12:57:24.250542741 +0800
@@ -626,6 +626,8 @@  int btrfs_ordered_update_i_size(struct i

 	if (ordered)
 		offset = entry_end(ordered);
+	else
+		offset = ALIGN(offset, BTRFS_I(inode)->root->sectorsize);

 	mutex_lock(&tree->mutex);
 	disk_i_size = BTRFS_I(inode)->disk_i_size;