From: David Woodhouse <dwmw2@infradead.org>
To: Steve French <smfltc@us.ibm.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: filesystem signal handling
Date: Wed, 28 Apr 2004 16:14:38 +0100 [thread overview]
Message-ID: <1083165278.4694.12.camel@localhost.localdomain> (raw)
In-Reply-To: <1083097744.4780.20.camel@stevef95.austin.ibm.com>
On Tue, 2004-04-27 at 15:29 -0500, Steve French wrote:
> 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)?
NFS does this. It's fairly ugly. What would be a _lot_ nicer if we could
have something in the task_struct which is vaguely reminiscent of
preempt_count, only it counts the number of reasons why this task cannot
receive signals. So instead of using the TASK_INTERRUPTIBLE and
TASK_UNINTERRUPTIBLE states to make the decision, we'd look at the
task's uninterruptible_count instead.
That way, we can provide functions, including the ones you mention as
dangerous, which do the right thing _both_ when called from a function
which cannot tolerate signals, and when called from a function which
_can_ perform the necessary cleanup. Without screwing with the signal
masks.
(In fact, I think it would be useful also to have a way of saying that
_fatal_ signals should be allowed, but not signals with a handler. This
would be useful in, e.g., sys_read() and sys_write().)
--
dwmw2
next prev parent reply other threads:[~2004-04-28 15:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-27 16:20 filesystem behavior when low on memory and PF_MEMALLOC Steve French
2004-04-27 19:09 ` Bryan Henderson
2004-04-27 20:29 ` filesystem signal handling Steve French
2004-04-28 15:14 ` David Woodhouse [this message]
2004-04-28 17:05 ` Trond Myklebust
2004-04-28 17:14 ` David Woodhouse
2004-04-28 17:32 ` Trond Myklebust
2004-04-28 19:28 ` Jamie Lokier
2004-04-28 19:43 ` Trond Myklebust
2004-04-28 19:47 ` Jamie Lokier
2004-04-28 20:31 ` Trond Myklebust
2004-04-29 2:18 ` David Woodhouse
2004-04-29 2:53 ` Trond Myklebust
2004-04-29 6:41 ` David Woodhouse
2004-04-29 17:41 ` Bryan Henderson
2004-04-28 21:46 ` Bryan Henderson
2004-04-29 2:34 ` David Woodhouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1083165278.4694.12.camel@localhost.localdomain \
--to=dwmw2@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=smfltc@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.