* [PATCH] Adding a callback for incoming sm_notify to better handle stale lock issue in client crash recovery in HA-NFS environment. The callout parameters are:
@ 2014-05-20 12:02 Steve Dickson
2014-06-01 17:13 ` Steve Dickson
0 siblings, 1 reply; 4+ messages in thread
From: Steve Dickson @ 2014-05-20 12:02 UTC (permalink / raw)
To: Linux NFS Mailing list; +Cc: jvrao, rongzeng, rong zeng
[ Forwarding this on to the mailing list ]
From: rong zeng <rongzeng@oc1547780626.ibm.com>
1. "sm-notify" - callout name
2. monitored client name as in the SM_NOTIFY request
3. IP of the sender of the SM_NOITFY request.
4. state value in the SM_NOTIFY request
This new interface can be used by different HA-NFS product
in its specific configuration and environment to
recover from the client crash and stale lock scenarios.
Signed-off-by: Rong Zeng <rongzeng@us.ibm.com>
---
utils/statd/callback.c | 13 ++++++++-----
utils/statd/statd.man | 20 ++++++++++++++++----
2 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/utils/statd/callback.c b/utils/statd/callback.c
index d1cc139..58ba70b 100644
--- a/utils/statd/callback.c
+++ b/utils/statd/callback.c
@@ -15,6 +15,7 @@
#include "rpcmisc.h"
#include "statd.h"
#include "notlist.h"
+#include "ha-callout.h"
/* Callback notify list. */
/* notify_list *cbnl = NULL; ... never used */
@@ -87,6 +88,13 @@ sm_notify_1_svc(struct stat_chge *argp, struct svc_req *rqstp)
xlog(D_CALL, "Received SM_NOTIFY from %s, state: %d",
argp->mon_name, argp->state);
+ if (!statd_present_address(sap, ip_addr, sizeof(ip_addr))) {
+ xlog_warn("Unrecognized sender address");
+ return ((void *) &result);
+ }
+
+ ha_callout("sm-notify", argp->mon_name, ip_addr, argp->state);
+
/* quick check - don't bother if we're not monitoring anyone */
if (rtnl == NULL) {
xlog_warn("SM_NOTIFY from %s while not monitoring any hosts",
@@ -94,11 +102,6 @@ sm_notify_1_svc(struct stat_chge *argp, struct svc_req *rqstp)
return ((void *) &result);
}
- if (!statd_present_address(sap, ip_addr, sizeof(ip_addr))) {
- xlog_warn("Unrecognized sender address");
- return ((void *) &result);
- }
-
/* okir change: statd doesn't remove the remote host from its
* internal monitor list when receiving an SM_NOTIFY call from
* it. Lockd will want to continue monitoring the remote host
diff --git a/utils/statd/statd.man b/utils/statd/statd.man
index 896c2f8..1e5520c 100644
--- a/utils/statd/statd.man
+++ b/utils/statd/statd.man
@@ -346,7 +346,8 @@ points due to inactivity.
.SS High-availability callouts
.B rpc.statd
can exec a special callout program during processing of
-successful SM_MON, SM_UNMON, and SM_UNMON_ALL requests.
+successful SM_MON, SM_UNMON, and SM_UNMON_ALL requests,
+or when it receives SM_NOTIFY.
Such a program may be used in High Availability NFS (HA-NFS)
environments to track lock state that may need to be migrated after
a system reboot.
@@ -357,15 +358,26 @@ option.
The program is run with 3 arguments:
The first is either
.B add-client
-or
.B del-client
+or
+.B sm-notify
depending on the reason for the callout.
The second is the
.I mon_name
of the monitored peer.
The third is the
-.I caller_name
-of the requesting lock manager.
+.I caller_name
+of the requesting lock manager for
+.B add-client
+or
+.B del-client
+, otherwise it is
+.I IP_address
+of the caller sending SM_NOTIFY.
+The forth is the
+.I state_value
+in the SM_NOTIFY request.
+
.SS IPv6 and TI-RPC support
TI-RPC is a pre-requisite for supporting NFS on IPv6.
If TI-RPC support is built into
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Adding a callback for incoming sm_notify to better handle stale lock issue in client crash recovery in HA-NFS environment. The callout parameters are:
2014-05-20 12:02 [PATCH] Adding a callback for incoming sm_notify to better handle stale lock issue in client crash recovery in HA-NFS environment. The callout parameters are: Steve Dickson
@ 2014-06-01 17:13 ` Steve Dickson
0 siblings, 0 replies; 4+ messages in thread
From: Steve Dickson @ 2014-06-01 17:13 UTC (permalink / raw)
To: Linux NFS Mailing list; +Cc: jvrao, rongzeng, rong zeng
On 05/20/2014 08:02 AM, Steve Dickson wrote:
> [ Forwarding this on to the mailing list ]
>
> From: rong zeng <rongzeng@oc1547780626.ibm.com>
>
> 1. "sm-notify" - callout name
> 2. monitored client name as in the SM_NOTIFY request
> 3. IP of the sender of the SM_NOITFY request.
> 4. state value in the SM_NOTIFY request
>
> This new interface can be used by different HA-NFS product
> in its specific configuration and environment to
> recover from the client crash and stale lock scenarios.
>
> Signed-off-by: Rong Zeng <rongzeng@us.ibm.com>
Committed...
steved.
> ---
> utils/statd/callback.c | 13 ++++++++-----
> utils/statd/statd.man | 20 ++++++++++++++++----
> 2 files changed, 24 insertions(+), 9 deletions(-)
>
> diff --git a/utils/statd/callback.c b/utils/statd/callback.c
> index d1cc139..58ba70b 100644
> --- a/utils/statd/callback.c
> +++ b/utils/statd/callback.c
> @@ -15,6 +15,7 @@
> #include "rpcmisc.h"
> #include "statd.h"
> #include "notlist.h"
> +#include "ha-callout.h"
>
> /* Callback notify list. */
> /* notify_list *cbnl = NULL; ... never used */
> @@ -87,6 +88,13 @@ sm_notify_1_svc(struct stat_chge *argp, struct svc_req *rqstp)
> xlog(D_CALL, "Received SM_NOTIFY from %s, state: %d",
> argp->mon_name, argp->state);
>
> + if (!statd_present_address(sap, ip_addr, sizeof(ip_addr))) {
> + xlog_warn("Unrecognized sender address");
> + return ((void *) &result);
> + }
> +
> + ha_callout("sm-notify", argp->mon_name, ip_addr, argp->state);
> +
> /* quick check - don't bother if we're not monitoring anyone */
> if (rtnl == NULL) {
> xlog_warn("SM_NOTIFY from %s while not monitoring any hosts",
> @@ -94,11 +102,6 @@ sm_notify_1_svc(struct stat_chge *argp, struct svc_req *rqstp)
> return ((void *) &result);
> }
>
> - if (!statd_present_address(sap, ip_addr, sizeof(ip_addr))) {
> - xlog_warn("Unrecognized sender address");
> - return ((void *) &result);
> - }
> -
> /* okir change: statd doesn't remove the remote host from its
> * internal monitor list when receiving an SM_NOTIFY call from
> * it. Lockd will want to continue monitoring the remote host
> diff --git a/utils/statd/statd.man b/utils/statd/statd.man
> index 896c2f8..1e5520c 100644
> --- a/utils/statd/statd.man
> +++ b/utils/statd/statd.man
> @@ -346,7 +346,8 @@ points due to inactivity.
> .SS High-availability callouts
> .B rpc.statd
> can exec a special callout program during processing of
> -successful SM_MON, SM_UNMON, and SM_UNMON_ALL requests.
> +successful SM_MON, SM_UNMON, and SM_UNMON_ALL requests,
> +or when it receives SM_NOTIFY.
> Such a program may be used in High Availability NFS (HA-NFS)
> environments to track lock state that may need to be migrated after
> a system reboot.
> @@ -357,15 +358,26 @@ option.
> The program is run with 3 arguments:
> The first is either
> .B add-client
> -or
> .B del-client
> +or
> +.B sm-notify
> depending on the reason for the callout.
> The second is the
> .I mon_name
> of the monitored peer.
> The third is the
> -.I caller_name
> -of the requesting lock manager.
> +.I caller_name
> +of the requesting lock manager for
> +.B add-client
> +or
> +.B del-client
> +, otherwise it is
> +.I IP_address
> +of the caller sending SM_NOTIFY.
> +The forth is the
> +.I state_value
> +in the SM_NOTIFY request.
> +
> .SS IPv6 and TI-RPC support
> TI-RPC is a pre-requisite for supporting NFS on IPv6.
> If TI-RPC support is built into
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Adding a callback for incoming sm_notify to better handle stale lock issue in client crash recovery in HA-NFS environment. The callout parameters are:
@ 2014-05-13 18:26 rongzeng
0 siblings, 0 replies; 4+ messages in thread
From: rongzeng @ 2014-05-13 18:26 UTC (permalink / raw)
To: jvrao; +Cc: rongzeng, rong zeng
From: rong zeng <rongzeng@oc1547780626.ibm.com>
1. "sm-notify" - callout name
2. monitored client name as in the SM_NOTIFY request
3. IP of the sender of the SM_NOITFY request.
4. state value in the SM_NOTIFY request
This new interface can be used by different HA-NFS product
in its specific configuration and environment to
recover from the client crash and stale lock scenarios.
Signed-off-by: Rong Zeng <rongzeng@us.ibm.com>
---
utils/statd/callback.c | 13 ++++++++-----
utils/statd/statd.man | 20 ++++++++++++++++----
2 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/utils/statd/callback.c b/utils/statd/callback.c
index d1cc139..58ba70b 100644
--- a/utils/statd/callback.c
+++ b/utils/statd/callback.c
@@ -15,6 +15,7 @@
#include "rpcmisc.h"
#include "statd.h"
#include "notlist.h"
+#include "ha-callout.h"
/* Callback notify list. */
/* notify_list *cbnl = NULL; ... never used */
@@ -87,6 +88,13 @@ sm_notify_1_svc(struct stat_chge *argp, struct svc_req *rqstp)
xlog(D_CALL, "Received SM_NOTIFY from %s, state: %d",
argp->mon_name, argp->state);
+ if (!statd_present_address(sap, ip_addr, sizeof(ip_addr))) {
+ xlog_warn("Unrecognized sender address");
+ return ((void *) &result);
+ }
+
+ ha_callout("sm-notify", argp->mon_name, ip_addr, argp->state);
+
/* quick check - don't bother if we're not monitoring anyone */
if (rtnl == NULL) {
xlog_warn("SM_NOTIFY from %s while not monitoring any hosts",
@@ -94,11 +102,6 @@ sm_notify_1_svc(struct stat_chge *argp, struct svc_req *rqstp)
return ((void *) &result);
}
- if (!statd_present_address(sap, ip_addr, sizeof(ip_addr))) {
- xlog_warn("Unrecognized sender address");
- return ((void *) &result);
- }
-
/* okir change: statd doesn't remove the remote host from its
* internal monitor list when receiving an SM_NOTIFY call from
* it. Lockd will want to continue monitoring the remote host
diff --git a/utils/statd/statd.man b/utils/statd/statd.man
index 896c2f8..1e5520c 100644
--- a/utils/statd/statd.man
+++ b/utils/statd/statd.man
@@ -346,7 +346,8 @@ points due to inactivity.
.SS High-availability callouts
.B rpc.statd
can exec a special callout program during processing of
-successful SM_MON, SM_UNMON, and SM_UNMON_ALL requests.
+successful SM_MON, SM_UNMON, and SM_UNMON_ALL requests,
+or when it receives SM_NOTIFY.
Such a program may be used in High Availability NFS (HA-NFS)
environments to track lock state that may need to be migrated after
a system reboot.
@@ -357,15 +358,26 @@ option.
The program is run with 3 arguments:
The first is either
.B add-client
-or
.B del-client
+or
+.B sm-notify
depending on the reason for the callout.
The second is the
.I mon_name
of the monitored peer.
The third is the
-.I caller_name
-of the requesting lock manager.
+.I caller_name
+of the requesting lock manager for
+.B add-client
+or
+.B del-client
+, otherwise it is
+.I IP_address
+of the caller sending SM_NOTIFY.
+The forth is the
+.I state_value
+in the SM_NOTIFY request.
+
.SS IPv6 and TI-RPC support
TI-RPC is a pre-requisite for supporting NFS on IPv6.
If TI-RPC support is built into
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] Adding a callback for incoming sm_notify to better handle stale lock issue in client crash recovery in HA-NFS environment. The callout parameters are:
@ 2014-05-08 0:16 rongzeng
0 siblings, 0 replies; 4+ messages in thread
From: rongzeng @ 2014-05-08 0:16 UTC (permalink / raw)
To: jvrao; +Cc: rongzeng, rong zeng
From: rong zeng <rongzeng@oc1547780626.ibm.com>
1. "sm-notify" - callout name
2. monitored client name as in the SM_NOTIFY request
3. IP of the sender of the SM_NOITFY request.
4. state value in the SM_NOTIFY request
This new interface can be used by different HA-NFS product
in its specific configuration and environment to
recover from the client crash and stale lock scenarios.
Signed-off-by: Rong Zeng <rongzeng@us.ibm.com>
---
utils/statd/callback.c | 13 ++++++++-----
utils/statd/statd.man | 20 ++++++++++++++++----
2 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/utils/statd/callback.c b/utils/statd/callback.c
index d1cc139..58ba70b 100644
--- a/utils/statd/callback.c
+++ b/utils/statd/callback.c
@@ -15,6 +15,7 @@
#include "rpcmisc.h"
#include "statd.h"
#include "notlist.h"
+#include "ha-callout.h"
/* Callback notify list. */
/* notify_list *cbnl = NULL; ... never used */
@@ -87,6 +88,13 @@ sm_notify_1_svc(struct stat_chge *argp, struct svc_req *rqstp)
xlog(D_CALL, "Received SM_NOTIFY from %s, state: %d",
argp->mon_name, argp->state);
+ if (!statd_present_address(sap, ip_addr, sizeof(ip_addr))) {
+ xlog_warn("Unrecognized sender address");
+ return ((void *) &result);
+ }
+
+ ha_callout("sm-notify", argp->mon_name, ip_addr, argp->state);
+
/* quick check - don't bother if we're not monitoring anyone */
if (rtnl == NULL) {
xlog_warn("SM_NOTIFY from %s while not monitoring any hosts",
@@ -94,11 +102,6 @@ sm_notify_1_svc(struct stat_chge *argp, struct svc_req *rqstp)
return ((void *) &result);
}
- if (!statd_present_address(sap, ip_addr, sizeof(ip_addr))) {
- xlog_warn("Unrecognized sender address");
- return ((void *) &result);
- }
-
/* okir change: statd doesn't remove the remote host from its
* internal monitor list when receiving an SM_NOTIFY call from
* it. Lockd will want to continue monitoring the remote host
diff --git a/utils/statd/statd.man b/utils/statd/statd.man
index 896c2f8..1e5520c 100644
--- a/utils/statd/statd.man
+++ b/utils/statd/statd.man
@@ -346,7 +346,8 @@ points due to inactivity.
.SS High-availability callouts
.B rpc.statd
can exec a special callout program during processing of
-successful SM_MON, SM_UNMON, and SM_UNMON_ALL requests.
+successful SM_MON, SM_UNMON, and SM_UNMON_ALL requests,
+or when it receives SM_NOTIFY.
Such a program may be used in High Availability NFS (HA-NFS)
environments to track lock state that may need to be migrated after
a system reboot.
@@ -357,15 +358,26 @@ option.
The program is run with 3 arguments:
The first is either
.B add-client
-or
.B del-client
+or
+.B sm-notify
depending on the reason for the callout.
The second is the
.I mon_name
of the monitored peer.
The third is the
-.I caller_name
-of the requesting lock manager.
+.I caller_name
+of the requesting lock manager for
+.B add-client
+or
+.B del-client
+, otherwise it is
+.I IP_address
+of the caller sending SM_NOTIFY.
+The forth is the
+.I state_value
+in the SM_NOTIFY request.
+
.SS IPv6 and TI-RPC support
TI-RPC is a pre-requisite for supporting NFS on IPv6.
If TI-RPC support is built into
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-01 17:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-20 12:02 [PATCH] Adding a callback for incoming sm_notify to better handle stale lock issue in client crash recovery in HA-NFS environment. The callout parameters are: Steve Dickson
2014-06-01 17:13 ` Steve Dickson
-- strict thread matches above, loose matches on Subject: below --
2014-05-13 18:26 rongzeng
2014-05-08 0:16 rongzeng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).