[PATCH 0/7 v3] Push file_update_time() into .page_mkwrite

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

 



  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. This is including __block_page_mkwrite() so
filesystems using it are handled. 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 calls 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 *shiver*.

Changes since v1:
* Dropped patches for filesystems which don't need them
* Added some acks
* Improved sysfs patch by Alex Elder's suggestion

Changes since v2:
* Dropped patches for more filesystems

Andrew, would you be willing to merge these patches via your tree? This seems
to be a final version.

								Honza

CC: Jaya Kumar <jayalk@xxxxxxxxxxxx>
CC: Sage Weil <sage@xxxxxxxxxxxx>
CC: ceph-devel@xxxxxxxxxxxxxxx
CC: Eric Van Hensbergen <ericvh@xxxxxxxxx>
CC: Ron Minnich <rminnich@xxxxxxxxxx>
CC: Latchesar Ionkov <lucho@xxxxxxxxxx>
CC: v9fs-developer@xxxxxxxxxxxxxxxxxxxxx
CC: Steven Whitehouse <swhiteho@xxxxxxxxxx>
CC: cluster-devel@xxxxxxxxxx
CC: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]