On 09/01/2015 01:22 PM, Kirill A. Shutemov wrote:
For VM_PFNMAP and VM_MIXEDMAP we use vm_ops->pfn_mkwrite instead
vm_ops->page_mkwrite to notify abort write access. This means we want
vma->vm_page_prot to be write-protected if the VMA provides this vm_ops.
I will test with this right away and ACK on this.
Hmm so are you saying we might be missing some buffer modifications right now.
What would be a theoretical scenario that will cause these missed events?
I would like to put a test in our test rigs that should fail today and this
[In our system every modified pmem block is also RDMAed to a remote
pmem for HA, a missed modification will make the two copies unsynced]
Thanks for catching this
Signed-off-by: Kirill A. Shutemov
Cc: Yigal Korman <yigal(a)plexistor.com>
Cc: Boaz Harrosh <boaz(a)plexistor.com>
Cc: Matthew Wilcox <matthew.r.wilcox(a)intel.com>
Cc: Jan Kara <jack(a)suse.cz>
Cc: Dave Chinner <david(a)fromorbit.com>
mm/mmap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/mmap.c b/mm/mmap.c
index df6d5f07035b..3f78bceefe5a 100644
@@ -1498,7 +1498,8 @@ int vma_wants_writenotify(struct vm_area_struct *vma)
/* The backer wishes to know when pages are first written to? */
- if (vma->vm_ops && vma->vm_ops->page_mkwrite)
+ if (vma->vm_ops &&
+ (vma->vm_ops->page_mkwrite || vma->vm_ops->pfn_mkwrite))
/* The open routine did something to the protections that pgprot_modify