Hello

On Saturday 12 May 2007 17:03, Grzegorz Jaśkiewicz wrote:
> sounds like useless waste of time and space
> You haven't stated the reason, why it has to create and commit empty
> transaction.
> 

I think we should fix that.

Chris, do you think that we could avoid creating fake transactions with the 
below patch?


diff -puN fs/reiserfs/super.c~reiserfs-avoid-syncing-clean-fs 
fs/reiserfs/super.c
--- linux-2.6.21-mm2/fs/reiserfs/super.c~reiserfs-avoid-syncing-clean-fs        
2007-05-16 18:18:45.000000000 +0300
+++ linux-2.6.21-mm2-vs/fs/reiserfs/super.c     2007-05-16 18:19:06.000000000 
+0300
@@ -62,7 +62,7 @@ static int reiserfs_statfs(struct dentry
 
 static int reiserfs_sync_fs(struct super_block *s, int wait)
 {
-       if (!(s->s_flags & MS_RDONLY)) {
+       if (!(s->s_flags & MS_RDONLY) && s->s_dirt) {
                struct reiserfs_transaction_handle th;
                reiserfs_write_lock(s);
                if (!journal_begin(&th, s, 1))

_

Reply via email to