From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752776Ab2BPNqt (ORCPT ); Thu, 16 Feb 2012 08:46:49 -0500 Received: from cantor2.suse.de ([195.135.220.15]:34514 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751204Ab2BPNqq (ORCPT ); Thu, 16 Feb 2012 08:46:46 -0500 From: Jan Kara To: LKML Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Eric Sandeen , Dave Chinner , Jan Kara , Peter Zijlstra , Ingo Molnar , Paul Mackerras , Arnaldo Carvalho de Melo , Jaya Kumar , Sage Weil , ceph-devel@vger.kernel.org, Steve French , linux-cifs@vger.kernel.org, Eric Van Hensbergen , Ron Minnich , Latchesar Ionkov , v9fs-developer@lists.sourceforge.net, Miklos Szeredi , fuse-devel@lists.sourceforge.net, Steven Whitehouse , cluster-devel@redhat.com, Greg Kroah-Hartman , Trond Myklebust , linux-nfs@vger.kernel.org Subject: [PATCH 00/11] Push file_update_time() into .page_mkwrite Date: Thu, 16 Feb 2012 14:46:08 +0100 Message-Id: <1329399979-3647-1-git-send-email-jack@suse.cz> X-Mailer: git-send-email 1.7.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, to provide reliable support for filesystem freezing, filesystems need to have complete control over when metadata is changed. In particular, file_update_time() calls from page fault code make it impossible for filesystems to prevent inodes from being dirtied while the filesystem is frozen. To fix the issue, this patch set changes page fault code to call file_update_time() only when ->page_mkwrite() callback is not provided. If the callback is provided, it is the responsibility of the filesystem to perform update of i_mtime / i_ctime if needed. We also push file_update_time() call to all existing ->page_mkwrite() implementations if the time update does not obviously happen by other means. If you know your filesystem does not need update of modification times in ->page_mkwrite() handler, please speak up and I'll drop the patch for your filesystem. As a side note, an alternative would be to remove call of file_update_time() from page fault code altogether and require all filesystems needing it to do that in their ->page_mkwrite() implementation. That is certainly possible although maybe slightly inefficient and would require auditting 100+ vm_operations_structs *shake*. If I get acks on these patches, Andrew, would you be willing to take these patches? Honza CC: Peter Zijlstra CC: Ingo Molnar CC: Paul Mackerras CC: Arnaldo Carvalho de Melo CC: Jaya Kumar CC: Sage Weil CC: ceph-devel@vger.kernel.org CC: Steve French CC: linux-cifs@vger.kernel.org CC: Eric Van Hensbergen CC: Ron Minnich CC: Latchesar Ionkov CC: v9fs-developer@lists.sourceforge.net CC: Miklos Szeredi CC: fuse-devel@lists.sourceforge.net CC: Steven Whitehouse CC: cluster-devel@redhat.com CC: Greg Kroah-Hartman CC: Trond Myklebust CC: linux-nfs@vger.kernel.org