kernel_optimize_test/Documentation/filesystems
Boaz Harrosh dd9061846a mm: new pfn_mkwrite same as page_mkwrite for VM_PFNMAP
This will allow FS that uses VM_PFNMAP | VM_MIXEDMAP (no page structs) to
get notified when access is a write to a read-only PFN.

This can happen if we mmap() a file then first mmap-read from it to
page-in a read-only PFN, than we mmap-write to the same page.

We need this functionality to fix a DAX bug, where in the scenario above
we fail to set ctime/mtime though we modified the file.  An xfstest is
attached to this patchset that shows the failure and the fix.  (A DAX
patch will follow)

This functionality is extra important for us, because upon dirtying of a
pmem page we also want to RDMA the page to a remote cluster node.

We define a new pfn_mkwrite and do not reuse page_mkwrite because
  1 - The name ;-)
  2 - But mainly because it would take a very long and tedious
      audit of all page_mkwrite functions of VM_MIXEDMAP/VM_PFNMAP
      users. To make sure they do not now CRASH. For example current
      DAX code (which this is for) would crash.
      If we would want to reuse page_mkwrite, We will need to first
      patch all users, so to not-crash-on-no-page. Then enable this
      patch. But even if I did that I would not sleep so well at night.
      Adding a new vector is the safest thing to do, and is not that
      expensive. an extra pointer at a static function vector per driver.
      Also the new vector is better for performance, because else we
      Will call all current Kernel vectors, so to:
        check-ha-no-page-do-nothing and return.

No need to call it from do_shared_fault because do_wp_page is called to
change pte permissions anyway.

Signed-off-by: Yigal Korman <yigal@plexistor.com>
Signed-off-by: Boaz Harrosh <boaz@plexistor.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Matthew Wilcox <matthew.r.wilcox@intel.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Hugh Dickins <hughd@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Dave Chinner <david@fromorbit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-15 16:35:20 -07:00
..
caching sched: Remove proliferation of wait_on_bit() action functions 2014-07-16 15:10:39 +02:00
cifs update CIFS TODO list 2014-08-02 01:26:07 -05:00
configfs
nfs Merge branch 'for-3.20' of git://linux-nfs.org/~bfields/linux 2015-02-12 10:39:41 -08:00
pohmelfs
.gitignore Documentation: update .gitignore files 2014-09-26 11:02:59 +02:00
9p.txt 9p: update documentation 2014-01-24 10:55:21 -06:00
00-INDEX dax: replace XIP documentation with DAX documentation 2015-02-16 17:56:03 -08:00
adfs.txt
affs.txt affs: add mount option to avoid filename truncates 2014-04-07 16:36:08 -07:00
afs.txt
autofs4-mount-control.txt doc: fix double words 2014-03-21 13:16:58 +01:00
autofs4.txt autofs: the documentation I wanted to read 2014-10-14 02:18:17 +02:00
automount-support.txt
befs.txt
bfs.txt
btrfs.txt btrfs: Add treelog mount option. 2014-01-28 13:20:20 -08:00
ceph.txt
coda.txt
cramfs.txt
dax.txt dax: does not work correctly with virtual aliasing caches 2015-02-16 17:56:04 -08:00
debugfs.txt debugfs: Have debugfs_print_regs32() return void 2014-11-05 14:13:38 -05:00
devpts.txt
directory-locking vfs: take i_mutex on renamed file 2013-11-09 00:16:40 -05:00
dlmfs.txt ocfs2: update web page + git tree in documentation 2015-02-28 09:57:50 -08:00
dnotify_test.c
dnotify.txt
ecryptfs.txt
efivarfs.txt
exofs.txt
ext2.txt ext2: get rid of most mentions of XIP in ext2 2015-02-16 17:56:04 -08:00
ext3.txt
ext4.txt ext4: add DAX functionality 2015-02-16 17:56:04 -08:00
f2fs.txt f2fs: introduce a batched trim 2015-02-11 17:04:44 -08:00
fiemap.txt fsioctl.c: make generic_block_fiemap() signal-tolerant 2015-02-10 14:30:30 -08:00
files.txt
fuse.txt
gfs2-glocks.txt
gfs2-uevents.txt
gfs2.txt
hfs.txt
hfsplus.txt Documentation: update URL to hfsplus Technote 1150 2014-02-20 14:48:51 +01:00
hpfs.txt
inotify.txt inotify: update documentation to reflect code changes 2015-02-10 14:30:28 -08:00
isofs.txt
jfs.txt
Locking mm: new pfn_mkwrite same as page_mkwrite for VM_PFNMAP 2015-04-15 16:35:20 -07:00
locks.txt
logfs.txt
Makefile Documentation: add makefiles for more targets 2014-09-26 11:02:56 +02:00
mandatory-locking.txt
ncpfs.txt
nilfs2.txt nilfs2: update project's web site in nilfs2.txt 2014-04-03 16:21:26 -07:00
ntfs.txt NTFS: Remove changelog from Documentation/filesystems/ntfs.txt. 2014-10-16 12:43:57 +01:00
ocfs2.txt ocfs2: update web page + git tree in documentation 2015-02-28 09:57:50 -08:00
omfs.txt
overlayfs.txt ovl: document lower layer ordering 2015-01-08 15:09:15 +01:00
path-lookup.txt
porting kill f_dentry macro 2014-11-19 13:02:11 -05:00
proc.txt fs: proc: task_mmu: show page size in /proc/<pid>/numa_maps 2015-02-12 18:54:12 -08:00
qnx6.txt
quota.txt
ramfs-rootfs-initramfs.txt
relay.txt
romfs.txt
seq_file.txt Documentation: update seq_file 2014-12-29 15:40:18 -07:00
sharedsubtree.txt doc: spelling error changes 2014-05-05 15:32:05 +02:00
spufs.txt
squashfs.txt Squashfs: Add LZ4 compression configuration option 2014-11-27 18:48:44 +00:00
sysfs-pci.txt
sysfs-tagging.txt
sysfs.txt Documentation/filesystems/sysfs.txt: fix device_attribute declaration 2014-01-23 16:37:00 -08:00
sysv-fs.txt
tmpfs.txt
ubifs.txt
udf.txt
ufs.txt
vfat.txt fs/fat/: add support for DOS 1.x formatted volumes 2014-06-06 16:08:10 -07:00
vfs.txt vfs: remove get_xip_mem 2015-02-16 17:56:03 -08:00
xfs-delayed-logging-design.txt
xfs-self-describing-metadata.txt
xfs.txt Merge branch 'xfs-misc-fixes-for-3.20-4' into for-next 2015-02-10 09:24:25 +11:00