Re: [PATCH 2/2] ext3: Don't update ctime in ext3_splice_branch()

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

 



On Mon 30-01-12 17:41:33, Kazuya Mio wrote:
> VFS handles updating ctime, so we don't need to update i_ctime
> in ext3_splace_branch().
  Thanks for the patches.  This is true for ordinary writes but not true
when you write via mmap. We call file_update_time() during page fault so
ctime won't be completely wrong but still we should update it after block
is allocated during writeback to reflect that new block is allocated to
the inode.

								Honza

> I backport the following patch for ext3:
> http://marc.info/?l=linux-ext4&m=124505184027078&w=4
> 
> Signed-off-by: Kazuya Mio <k-mio@xxxxxxxxxxxxx>
> ---
>  fs/ext3/inode.c |    6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
> index 2d0afec..95cb0d1 100644
> --- a/fs/ext3/inode.c
> +++ b/fs/ext3/inode.c
> @@ -795,10 +795,6 @@ static int ext3_splice_branch(handle_t *handle, struct inode *inode,
>  	}
>  
>  	/* We are done with atomic stuff, now do the rest of housekeeping */
> -
> -	inode->i_ctime = CURRENT_TIME_SEC;
> -	ext3_mark_inode_dirty(handle, inode);
> -	/* ext3_mark_inode_dirty already updated i_sync_tid */
>  	atomic_set(&ei->i_datasync_tid, handle->h_transaction->t_tid);
>  
>  	/* had we spliced it onto indirect block? */
> @@ -819,9 +815,9 @@ static int ext3_splice_branch(handle_t *handle, struct inode *inode,
>  	} else {
>  		/*
>  		 * OK, we spliced it into the inode itself on a direct block.
> -		 * Inode was dirtied above.
>  		 */
>  		jbd_debug(5, "splicing direct\n");
> +		ext3_mark_inode_dirty(handle, inode);
>  	}
>  	return err;
>  
-- 
Jan Kara <jack@xxxxxxx>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux