Re: [PATCH -v7 2/2] Update ctime and mtime for memory-mapped files

2008-01-22 Thread Miklos Szeredi
> > > > > > /* > > > + * Scan the PTEs for pages belonging to the VMA and mark them read-only. > > > + * It will force a pagefault on the next write access. > > > + */ > > > +static void vma_wrprotect(struct vm_area_struct *vma) > > > +{ > > > + unsigned long addr; > > > + > > > + for (add

Re: [PATCH -v7 2/2] Update ctime and mtime for memory-mapped files

2008-01-21 Thread Andi Kleen
Anton Salikhmetov <[EMAIL PROTECTED]> writes: You should probably put your design document somewhere in Documentation with a patch. > + * Scan the PTEs for pages belonging to the VMA and mark them read-only. > + * It will force a pagefault on the next write access. > + */ > +static void vma_wrpro

Re: [PATCH -v7 2/2] Update ctime and mtime for memory-mapped files

2008-01-21 Thread Anton Salikhmetov
2008/1/22, Linus Torvalds <[EMAIL PROTECTED]>: > > > On Tue, 22 Jan 2008, Anton Salikhmetov wrote: > > > > /* > > + * Scan the PTEs for pages belonging to the VMA and mark them read-only. > > + * It will force a pagefault on the next write access. > > + */ > > +static void vma_wrprotect(struct vm_

Re: [PATCH -v7 2/2] Update ctime and mtime for memory-mapped files

2008-01-21 Thread Jesper Juhl
On 22/01/2008, Anton Salikhmetov <[EMAIL PROTECTED]> wrote: > 2008/1/22, Jesper Juhl <[EMAIL PROTECTED]>: > > On 22/01/2008, Anton Salikhmetov <[EMAIL PROTECTED]> wrote: > > > 2008/1/22, Jesper Juhl <[EMAIL PROTECTED]>: > > > > Some very pedantic nitpicking below; > > > > > > > > On 22/01/2008, Ant

Re: [PATCH -v7 2/2] Update ctime and mtime for memory-mapped files

2008-01-21 Thread Linus Torvalds
On Tue, 22 Jan 2008, Anton Salikhmetov wrote: > > /* > + * Scan the PTEs for pages belonging to the VMA and mark them read-only. > + * It will force a pagefault on the next write access. > + */ > +static void vma_wrprotect(struct vm_area_struct *vma) > +{ > + unsigned long addr; > + > +

Re: [PATCH -v7 2/2] Update ctime and mtime for memory-mapped files

2008-01-21 Thread Jesper Juhl
On 22/01/2008, Anton Salikhmetov <[EMAIL PROTECTED]> wrote: > 2008/1/22, Anton Salikhmetov <[EMAIL PROTECTED]>: > > 2008/1/22, Jesper Juhl <[EMAIL PROTECTED]>: > > > Some very pedantic nitpicking below; > > > ... > > By the way, if we're talking "pedantic", then: > > >>> > > debian:/tmp$ cat c.c >

Re: [PATCH -v7 2/2] Update ctime and mtime for memory-mapped files

2008-01-21 Thread Anton Salikhmetov
2008/1/22, Anton Salikhmetov <[EMAIL PROTECTED]>: > 2008/1/22, Jesper Juhl <[EMAIL PROTECTED]>: > > Some very pedantic nitpicking below; > > > > On 22/01/2008, Anton Salikhmetov <[EMAIL PROTECTED]> wrote: > > > http://bugzilla.kernel.org/show_bug.cgi?id=2645#c40 > > > > > > Update file times at wri

Re: [PATCH -v7 2/2] Update ctime and mtime for memory-mapped files

2008-01-21 Thread Anton Salikhmetov
2008/1/22, Jesper Juhl <[EMAIL PROTECTED]>: > On 22/01/2008, Anton Salikhmetov <[EMAIL PROTECTED]> wrote: > > 2008/1/22, Jesper Juhl <[EMAIL PROTECTED]>: > > > Some very pedantic nitpicking below; > > > > > > On 22/01/2008, Anton Salikhmetov <[EMAIL PROTECTED]> wrote: > ... > > > > +

Re: [PATCH -v7 2/2] Update ctime and mtime for memory-mapped files

2008-01-21 Thread Jesper Juhl
On 22/01/2008, Anton Salikhmetov <[EMAIL PROTECTED]> wrote: > 2008/1/22, Jesper Juhl <[EMAIL PROTECTED]>: > > Some very pedantic nitpicking below; > > > > On 22/01/2008, Anton Salikhmetov <[EMAIL PROTECTED]> wrote: ... > > > + if (file && (vma->vm_flags & VM_SHARED)) { > > > +

Re: [PATCH -v7 2/2] Update ctime and mtime for memory-mapped files

2008-01-21 Thread Anton Salikhmetov
2008/1/22, Jesper Juhl <[EMAIL PROTECTED]>: > Some very pedantic nitpicking below; > > On 22/01/2008, Anton Salikhmetov <[EMAIL PROTECTED]> wrote: > > http://bugzilla.kernel.org/show_bug.cgi?id=2645#c40 > > > > Update file times at write references to memory-mapped files. > > Force file times updat

Re: [PATCH -v7 2/2] Update ctime and mtime for memory-mapped files

2008-01-21 Thread Jesper Juhl
Some very pedantic nitpicking below; On 22/01/2008, Anton Salikhmetov <[EMAIL PROTECTED]> wrote: > http://bugzilla.kernel.org/show_bug.cgi?id=2645#c40 > > Update file times at write references to memory-mapped files. > Force file times update at the next write reference after > calling the msync()

[PATCH -v7 2/2] Update ctime and mtime for memory-mapped files

2008-01-21 Thread Anton Salikhmetov
http://bugzilla.kernel.org/show_bug.cgi?id=2645#c40 Update file times at write references to memory-mapped files. Force file times update at the next write reference after calling the msync() system call with the MS_ASYNC flag. Signed-off-by: Anton Salikhmetov <[EMAIL PROTECTED]> --- mm/memory.c