lkml.org 
[lkml]   [2012]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] msync: support syncing a small part of the file
Il 14/06/2012 00:08, Andrew Morton ha scritto:
>> > As an interested observer and a programmer who uses msync()...
>> >
>> > I never assumed msync() did the whole file.
> OK, that's one user accounted for. 3 million to go.
>
> Look, I'm not terribly averse to the change, but it does have this
> risk. And it's a nasty risk because anyone who is hit by it simply
> will not know that his applcation has lost some of its data integrity.

Sure, it reminds me of the recent bug caused by using memcpy with
overlapping areas.

But really, in this case the possibility for confusion is really small,
and would entirely be the fault of the programmer. There are argument
for addr and length, and the man page says: "To be more precise, the
part of the file that corresponds to the memory area starting at addr
and having length length is updated". Our implementation having been
suboptimal for a long time, is not a good reason to keep it suboptimal.

Anyway yes, there is an off-by-one.

Paolo


\
 
 \ /
  Last update: 2012-06-14 11:41    [W:0.043 / U:1.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site