Return-Path: Received: from helmsgagent01.f-secure.com ([193.110.108.21]:56646 "EHLO helmsgagent01.f-secure.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1039487AbdDUNNr (ORCPT ); Fri, 21 Apr 2017 09:13:47 -0400 From: Marko Rauhamaa To: Amir Goldstein CC: Jeff Layton , Al Viro , linux-fsdevel , Jan Kara , Linux NFS Mailing List , Subject: Re: fanotify read returns with errno == EOPENSTALE References: <87inn12urq.fsf@drapion.f-secure.com> <20170322193122.GV29622@ZenIV.linux.org.uk> <87a88c2yxq.fsf@drapion.f-secure.com> <1490270212.3921.10.camel@poochiereds.net> <8760j02mfz.fsf@drapion.f-secure.com> <87lgqwa4tg.fsf@drapion.f-secure.com> <87shl38d1x.fsf@drapion.f-secure.com> Date: Fri, 21 Apr 2017 16:13:39 +0300 In-Reply-To: (Amir Goldstein's message of "Thu, 20 Apr 2017 16:34:55 +0300") Message-ID: <871ssl9a4c.fsf@drapion.f-secure.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-nfs-owner@vger.kernel.org List-ID: Amir Goldstein : > On Thu, Apr 20, 2017 at 3:43 PM, Marko Rauhamaa > wrote: >> Amir Goldstein : >> >>> Sorry I messed up the previous patch. please try this one: >> >> I will try it. Tried it. Superficially, it seems to be working, but... >> More importantly, does EAGAIN here still guarantee EPOLLET semantics >> of epoll(7)? IOW, if I get EAGAIN, I shouldn't have to try read(2)ing >> the fanotify fd again before calling epoll_wait(2). > > Yes, if you get EAGAIN it means there are no more events in the queue, > so shouldn't have to try read again. I ran into a system hang with our real product that suggests there might be a problem left. It would be explained if your patch generated an EAGAIN while there were other events waiting in the queue. I will have to investigate further. Marko -- +358 44 990 4795 Skype: marko.rauhamaa_f-secure