On Fri, Apr 22, 2011 at 3:26 PM, Jeff Layton <jlayton@xxxxxxxxxx> wrote: > On Fri, 22 Apr 2011 23:02:00 +0400 > Pavel Shilovsky <piastry@xxxxxxxxxxx> wrote: > >> 2011/4/22 Jeff Layton <jlayton@xxxxxxxxxx>: >> > Used to be synchronous. One of the goals of the async write patchset >> > I'm working on is to change that. >> >> In this case, what do you think about to call filemap_fdatawait before >> update attributes in gettattr and llseek? It seems that it makes us >> sure that all dirty pages are written and we can get right file >> attributes from the server. >> > > Yeah, assuming that we write back immediately when notified of an > oplock break, then that should be fine. we do write back on oplock break (we have to before we can respond to the oplock break, otherwise the other client would get stale data). It is frustrating (about the protocol) that cifs breaks oplocks even if the second open is from the same client so in most cases oplock breaks would not have been needed (since it is a 2nd open from the same client) but there is nothing we can do about this other than move to batch oplock, or (for smb2) use the new smb2.1 leases. -- Thanks, Steve -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html