Re: [PATCH] reiserfs:fix journaling issue regarding fsync()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

At 09:47 06/06/30, Chris Mason wrote:
>Thanks for the patch.  One problem is this will bump the transaction marker
>for atime updates too.  I'd rather see the change done inside
>reiserfs_file_write.

I did not realize that an atime updates is also influenced.

>
>reiserfs_file_write already updates the transaction when blocks are allocated,
>but you're right that to be 100% correct we should cover the case when i_size
>increases but new blocks are not added.  Was this the case you were trying to
>fix?

Yes, that's right.

So, I remade my patch as follows.
I tested this patch and confirmed that the kernel with this patch work well.


Signed-off-by :Hisashi Hifumi <hifumi.hisashi@xxxxxxxxxxxxx>


diff -Nru linux-2.6.17/fs/reiserfs/file.c linux-2.6.17_fix/fs/reiserfs/file.c
--- linux-2.6.17/fs/reiserfs/file.c	2006-06-18 10:49:35.000000000 +0900
+++ linux-2.6.17_fix/fs/reiserfs/file.c	2006-06-30 10:09:35.000000000 +0900
@@ -860,8 +860,10 @@
 			// this sets the proper flags for O_SYNC to trigger a commit
 			mark_inode_dirty(inode);
 			reiserfs_write_unlock(inode->i_sb);
-		} else
+		} else {
+			reiserfs_update_inode_transaction(inode);
 			mark_inode_dirty(inode);
+		}

 		sd_update = 1;
 	}

Thanks.

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux