From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hisashi Hifumi Subject: Re: [PATCH] reiserfs:fix journaling issue regarding fsync() Date: Fri, 30 Jun 2006 10:36:02 +0900 Message-ID: <6.0.0.20.2.20060630094908.0411c9d0@172.19.0.2> References: <6.0.0.20.2.20060620153929.040f0750@172.19.0.2> <200606292047.14973.mason@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Content-Transfer-Encoding: 7bit Cc: reiser@namesys.com, reiserfs-dev@namesys.com, linux-fsdevel@vger.kernel.org Return-path: Received: from serv1.oss.ntt.co.jp ([222.151.198.98]:60047 "EHLO serv1.oss.ntt.co.jp") by vger.kernel.org with ESMTP id S1751396AbWF3Bfx (ORCPT ); Thu, 29 Jun 2006 21:35:53 -0400 To: Chris Mason , reiserfs-list@namesys.com In-Reply-To: <200606292047.14973.mason@suse.com> References: <6.0.0.20.2.20060620153929.040f0750@172.19.0.2> <200606292047.14973.mason@suse.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org 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 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.