]> git.baikalelectronics.ru Git - kernel.git/commit
NSM: Make sure to return an error if the SM_MON call result is not zero
authorChuck Lever <chuck.lever@oracle.com>
Thu, 4 Dec 2008 19:21:15 +0000 (14:21 -0500)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Tue, 6 Jan 2009 16:53:51 +0000 (11:53 -0500)
commit0d0ef7aa1220c99cf36754333d0d12f75a8768c6
tree147bba86428c33650a686b70cbc32643c8547f86
parent4b1d1b0c19e82973c0bffe381f7d0adaf202b2d5
NSM: Make sure to return an error if the SM_MON call result is not zero

The nsm_monitor() function reports an error and does not set sm_monitored
if the SM_MON upcall reply has a non-zero result code, but nsm_monitor()
does not return an error to its caller in this case.

Since sm_monitored is not set, the upcall is retried when the next NLM
request invokes nsm_monitor().  However, that may not come for a while.
In the meantime, at least one NLM request will potentially proceed
without the peer being monitored properly.

Have nsm_monitor() return an error if the result code is non-zero.
This will cause all NLM requests to fail immediately if the upcall
completed successfully but rpc.statd returned an error.

This may be inconvenient in some cases (for example if rpc.statd
cannot complete a proper DNS reverse lookup of the hostname), but will
make the reboot monitoring service more robust by forcing such issues
to be corrected by an admin.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
fs/lockd/mon.c