* 2.2.19(xx) file unmapping on abort
@ 2002-03-22 20:02 Rakesh Tiwari
2002-03-22 20:13 ` Alexander Viro
0 siblings, 1 reply; 2+ messages in thread
From: Rakesh Tiwari @ 2002-03-22 20:02 UTC (permalink / raw)
To: linux-kernel
Relevant code -
../src/linux/mm/filemap.c
static void filemap_unmap(struct vm_area_struct *vma, unsigned long
start, size_t len)
{
filemap_sync(vma, start, len, MS_ASYNC);
}
Question -
Does this imply that every time a process terminates abonormally, all
the dirty pages related to that mapping are flushed to the disk, even if
that was not intended ? Why can not it be simply this ? -
static void filemap_unmap(struct vm_area_struct *vma, unsigned long
start, size_t len)
{
filemap_sync(vma, start, len, MS_INVALIDATE);
}
I call msync() at various points in the program where data in the pages
is known to be in good condition. At the abnormal program termination, I
am not really sure if data in pages is valid or not.....
Thank you.
Rakesh :-)
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: 2.2.19(xx) file unmapping on abort
2002-03-22 20:02 2.2.19(xx) file unmapping on abort Rakesh Tiwari
@ 2002-03-22 20:13 ` Alexander Viro
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Viro @ 2002-03-22 20:13 UTC (permalink / raw)
To: Rakesh Tiwari; +Cc: linux-kernel
On Fri, 22 Mar 2002, Rakesh Tiwari wrote:
>
> I call msync() at various points in the program where data in the pages
> is known to be in good condition. At the abnormal program termination, I
> am not really sure if data in pages is valid or not.....
If you have a shared mapping it can be written to disk at any moment, so
you can't rely on that happening only at the moment of msync().
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-03-22 20:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-22 20:02 2.2.19(xx) file unmapping on abort Rakesh Tiwari
2002-03-22 20:13 ` Alexander Viro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®