xfs
[Top] [All Lists]

[PATCH v4 7/7] xfs: Defer mmap cmtime updates

To: linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH v4 7/7] xfs: Defer mmap cmtime updates
From: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
Date: Thu, 22 Aug 2013 17:03:23 -0700
Cc: linux-ext4@xxxxxxxxxxxxxxx, Dave Chinner <david@xxxxxxxxxxxxx>, Theodore Ts'o <tytso@xxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx, Jan Kara <jack@xxxxxxx>, Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <cover.1377193658.git.luto@xxxxxxxxxxxxxx>
In-reply-to: <cover.1377193658.git.luto@xxxxxxxxxxxxxx>
References: <cover.1377193658.git.luto@xxxxxxxxxxxxxx>
References: <cover.1377193658.git.luto@xxxxxxxxxxxxxx>
This involves a change to block_page_mkwrite.  xfs is the only user.

Signed-off-by: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
---
 fs/buffer.c       | 7 -------
 fs/xfs/xfs_aops.c | 1 +
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/fs/buffer.c b/fs/buffer.c
index 4d74335..408677c 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2431,13 +2431,6 @@ int block_page_mkwrite(struct vm_area_struct *vma, 
struct vm_fault *vmf,
        struct super_block *sb = file_inode(vma->vm_file)->i_sb;
 
        sb_start_pagefault(sb);
-
-       /*
-        * Update file times before taking page lock. We may end up failing the
-        * fault so this update may be superfluous but who really cares...
-        */
-       file_update_time(vma->vm_file);
-
        ret = __block_page_mkwrite(vma, vmf, get_block);
        sb_end_pagefault(sb);
        return block_page_mkwrite_return(ret);
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index 596ec71..aa8fbcf 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -1668,6 +1668,7 @@ const struct address_space_operations 
xfs_address_space_operations = {
        .readpages              = xfs_vm_readpages,
        .writepage              = xfs_vm_writepage,
        .writepages             = xfs_vm_writepages,
+       .update_cmtime_deferred = generic_update_cmtime_deferred,
        .releasepage            = xfs_vm_releasepage,
        .invalidatepage         = xfs_vm_invalidatepage,
        .write_begin            = xfs_vm_write_begin,
-- 
1.8.3.1

<Prev in Thread] Current Thread [Next in Thread>