From: Steve French Subject: filesystem signal handling Date: 27 Apr 2004 15:29:05 -0500 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <1083097744.4780.20.camel@stevef95.austin.ibm.com> References: Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from e5.ny.us.ibm.com ([32.97.182.105]:48270 "EHLO e5.ny.us.ibm.com") by vger.kernel.org with ESMTP id S264330AbUD0UaH (ORCPT ); Tue, 27 Apr 2004 16:30:07 -0400 Received: from northrelay02.pok.ibm.com (northrelay02.pok.ibm.com [9.56.224.150]) by e5.ny.us.ibm.com (8.12.10/8.12.2) with ESMTP id i3RKU68H733888 for ; Tue, 27 Apr 2004 16:30:06 -0400 Received: from stevef95-009041091094.austin.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by northrelay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i3RKUIw6096678 for ; Tue, 27 Apr 2004 16:30:19 -0400 In-Reply-To: To: unlisted-recipients:; (no To-header on input) List-Id: linux-fsdevel.vger.kernel.org I noticed that the ramfs and libfs code do not have special handling of signals (checking for signal_pending, returning or handling ERESTARTSYS or EINTR). Is it permitted for a filesystem to mask signals temporarily across most fs calls and simply let the higher layers handle checking for signal_pending (other than using the existing of a signal_pending to shorten schedule_timeouts so the app would not wait as long on errors)? For network filesystems, especially for stateful calls such as create, open, unlink, link, mkdir, rmdir), signals look dangerous - what would happen if the filesystem gets a signal in the midst of (or right after) a socket write of a network request and the filesystem returns an error (such as ERESTARTSYS/EINTR) but the actual open ended up succeeding on the server but only after the client filesystem had returned an error to the app. Seems like there could be cases in which the local kernel had released a file struct (on an open failure due to a signal) but the server would have to keep the file struct around. Is there a Unix/Linux convention for signal handling in network filesystems?