From owner-svn-src-projects@freebsd.org Wed Apr 24 16:55:53 2019 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7E81159DBD8 for ; Wed, 24 Apr 2019 16:55:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF3276E611; Wed, 24 Apr 2019 16:55:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x3OGtfkT065748 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 24 Apr 2019 19:55:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x3OGtfkT065748 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x3OGtfhU065747; Wed, 24 Apr 2019 19:55:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 24 Apr 2019 19:55:40 +0300 From: Konstantin Belousov To: Alan Somers Cc: src-committers , svn-src-projects@freebsd.org Subject: Re: svn commit: r346640 - in projects/fuse2/sys: fs/fuse kern Message-ID: <20190424165540.GE12936@kib.kiev.ua> References: <201904241554.x3OFsIjw024483@repo.freebsd.org> <20190424162837.GD12936@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Apr 2019 16:55:54 -0000 On Wed, Apr 24, 2019 at 10:41:57AM -0600, Alan Somers wrote: > On Wed, Apr 24, 2019 at 10:28 AM Konstantin Belousov > wrote: > > > > On Wed, Apr 24, 2019 at 03:54:18PM +0000, Alan Somers wrote: > > > Author: asomers > > > Date: Wed Apr 24 15:54:18 2019 > > > New Revision: 346640 > > > URL: https://svnweb.freebsd.org/changeset/base/346640 > > > > > > Log: > > > fusefs: interruptibility improvements suggested by kib > > > > > > * Block stop signals in fticket_wait_answer > > This might be ok, but consider using VFCF_SBDRY. > > Like the way it's used in nfs_vfsops? NFS just sets the flag in VFS_SET(). Then all VOPs and VFS methods get implicit sbdry setting around them. Of course advisory locks require some more care. > > > > > > * Hold ps_mtx while checking signal disposition > > This part is pointless, as explained before. > > > > > * style(9) changes > > And sig_isfatal() is still there, which I consider an architectural bug. > > Try to think of it as a protocol bug instead. It's not ideal, but > this is the way that FUSE is supposed to work. BTW, there actually is > a intr/nointr mount option, but it's implemented in userland within > libfuse. For FreeBSD we could patch libfuse to implement it > kernel-side instead. But fixing the multi-threaded signal delivery > logic would require a version of msleep that would only catch fatal > signals. Is there such a thing? No, there is no such thing, and I noted to you that this approach simply does not work for mt programs. If one thread of mt process is inside fuse, and another thread decided to exit process (either by exit, or due to trap, or due to the 'fatal' signal action), most likely things would hang until your machinery finishes the request. Again, I strongly suggest to not fight against the signal handling code and do what other filesystems already agreed upon.