All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] [RFC] Making mount operation soft + intr
@ 2004-12-09 21:22 Mike Waychison
  2004-12-09 21:23 ` [PATCH 1/2] Make get rootfh calls " Mike Waychison
  2004-12-09 21:23 ` [PATCH 2/2] Allow FORCEINTR override for signal masking Mike Waychison
  0 siblings, 2 replies; 3+ messages in thread
From: Mike Waychison @ 2004-12-09 21:22 UTC (permalink / raw)
  To: nfs

While implementing and testing autofsng, I found myself getting frustrated at
NFS mounts that fail and stay hung.

A typical example is to try and mount from a bogus NFS port:

mount -o port=10000 host:/export /mnt

If the default is hard, the kernel will never time out trying to get initial
contact with the server.

If the default is nointr, then there is no way for userspace to kill the mount
process.

Both of these options make sense while the filesystem is mounted, but in the
case where the server will never respond with a live nfs export, can easily
hang processes and leave locked super_block's live in the system (impeding a
reboot).

The solution I am suggesting is to force the initial rpc calls used in setting
up a mount to be soft + intr, regardless of what the real options are.  We can
do this by passing RPC_TASK_SOFT to the rpc_calls for NFS3PROC_FSINFO,
NFS3PROC_GETATTR, NFSPROC_GETATTR and NFSPROC_STATFS.

To force 'intr' regardless of whether clnt->cl_intr is set or not, we use a
similar technique to the recently added RPC_TASK_NOINTR flag used for
transaction integrity.  We introduce RPC_TASK_FORCEINTR, which overrides
RPC_TASK_NOINTR (the latter is dependent on clnt->cl_intr).

AFAICT, making these ops soft+intr is safe because there is no data to be lost
in the event of a cancelled/timed-out operation.

The first patch following this message adds RPC_TASK_FORCEINTR and makes the
rootfh ops use it and RPC_TASK_SOFT.

The second patch adds a parameter to rpc_clnt_sigmask that takes an optional
set of task flags, of which only RPC_TASK_FORCEINTR is inspected for.  This
keeps the mount paths from blocking signals SIGINT and SIGQUIT.

mount(8) still needs to be taught not to block these signals if it doesn't care
whether the mount operation succeeded or not (in the case of it not being a
loop device and mtab isn't being updated).

(I haven't touched the nfsv4 stuff as I haven't yet wrapped my head around that
code.)

Comments?



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-12-09 21:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-09 21:22 [PATCH 0/2] [RFC] Making mount operation soft + intr Mike Waychison
2004-12-09 21:23 ` [PATCH 1/2] Make get rootfh calls " Mike Waychison
2004-12-09 21:23 ` [PATCH 2/2] Allow FORCEINTR override for signal masking Mike Waychison

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.