lkml.org 
[lkml]   [2014]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC v2 0/5] Non-blockling buffered fs read (page cache only)
On Mon, Sep 22, 2014 at 10:12:21AM -0400, Jonathan Corbet wrote:
> So I'm not contesting this, but I am genuinely curious: do you think
> there are applications out there requesting non-blocking behavior on
> regular files that will then break if they actually get non-blocking
> behavior? I don't suppose you have an example?

You only have to look as far as Samba, but Jeff quoted an old lkml
post earlier that had other examples.

source3/smbd/open.c:


if (first_open_attempt && lp_kernel_oplocks(SNUM(conn))) {
/*
* With kernel oplocks the open breaking an oplock
* blocks until the oplock holder has given up the
* oplock or closed the file. We prevent this by first
* trying to open the file with O_NONBLOCK (see "man
* fcntl" on Linux). For the second try, triggered by
* an oplock break response, we do not need this
* anymore.
*
* This is true under the assumption that only Samba
* requests kernel oplocks. Once someone else like
* NFSv4 starts to use that API, we will have to
* modify this by communicating with the NFSv4 server.
*/
flags2 |= O_NONBLOCK;
}


\
 
 \ /
  Last update: 2014-09-22 17:01    [W:0.103 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site