[PATCH 0/4] cifs: pave way for change to "strictcache" by default

Jeff Layton jlayton at samba.org
Mon Apr 30 10:05:17 MDT 2012


On Mon, 30 Apr 2012 10:50:25 -0500
Steve French <smfrench at gmail.com> wrote:

> On Mon, Apr 30, 2012 at 10:45 AM, Jeff Layton <jlayton at samba.org> wrote:
> > On Mon, 30 Apr 2012 10:11:43 -0500
> > Steve French <smfrench at gmail.com> wrote:
> >
> >> There is a related question of how deferring writes slightly (e.g. to
> >> buffer a full page or a full smb buffer) could corrupt data?
> >>
> >
> > You're returning from write(2) without actually sending it to the
> > backing store, but a read(2) will go to that backing store. So,
> > applications that expect the results of that write to be visible to
> > other clients (or even on the same client) won't see it.
> 
> well the results of the write MUST be visible to others reading
> on the same client.  In what case would they not be
> (other than perhaps some odd private memory mapping case)
> 
> 

If you're delaying the write, how are you going to satisfy that read?

Where will the results of that write be stored such that the read can
then see it? Typically the answer would be "the pagecache" but you
can't use it in this case.

-- 
Jeff Layton <jlayton at samba.org>


More information about the samba-technical mailing list