Messages in this thread | | | Date | Fri, 22 Jun 2012 14:12:53 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH v2 1/2] msync: support syncing a small part of the file |
| |
On Fri, 15 Jun 2012 17:12:58 +0200 Paolo Bonzini <pbonzini@redhat.com> wrote:
> msync does not need to flush changes to the entire file, even with MS_SYNC. > Instead, it can use vfs_fsync_range to only synchronize a part of the file. > This is part of the specification; expecting msync to synchronize all the > file would take a very creative interpretation of the manual page as well > as the specification. > > In addition, not all metadata has to be synced; msync is closer to > fdatasync than it is to fsync. So, pass 1 to vfs_fsync_range.
I renamed the patch to "msync: switch to syncing only the affected part of the file" to emphasise that there is a behavioural change here.
Then I deleted the patch.
Please recall my thus-far-utterly-and-irritatingly-ignored comments about nonlinear mappings. Presently an msync() on a nonlinear mapping will work correctly, because we sync the whole file, yes? And with this change, we will no longer sync all the pages which were covered by the affected memory range. Thus breaking the syscall?
| |