2 * Copyright (c) 2008 Isilon Inc http://www.isilon.com/
3 * Authors: Doug Rabson <dfr@rabson.org>
4 * Developed with Red Inc: Alfred Perlstein <alfred@freebsd.org>
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
30 * Copyright (c) 2012 by Delphix. All rights reserved.
34 * NFS Lock Manager, RPC service functions (nlm_..._svc)
35 * Called via nlm_dispatch.c tables.
37 * Source code derived from FreeBSD nlm_prot_server.c
39 * The real service functions all use nlm4_... args and return
40 * data types. These wrappers convert older forms to and from
41 * the new forms and call the nlm_do_... service functions.
44 #include <sys/param.h>
45 #include <sys/systm.h>
47 #include <rpcsvc/nlm_prot.h>
51 * Convert between various versions of the protocol structures.
55 * Down-convert, for granted_1 call
57 * This converts a 64-bit lock to 32-bit form for our granted
58 * call-back when we're dealing with a 32-bit NLM client.
59 * Our NLM_LOCK handler ensures that any lock we grant to a
60 * 32-bit client can be represented in 32-bits. If the
61 * ASSERTs here fire, then the call to nlm_init_flock in
62 * nlm_do_lock has failed to restrict a 32-bit client to
66 nlm_convert_to_nlm_lock(struct nlm_lock
*dst
, struct nlm4_lock
*src
)
68 dst
->caller_name
= src
->caller_name
;
71 dst
->svid
= src
->svid
;
72 ASSERT(src
->l_offset
<= MAX_UOFF32
);
73 dst
->l_offset
= (uint32_t)src
->l_offset
;
74 ASSERT(src
->l_len
<= MAX_UOFF32
);
75 dst
->l_len
= (uint32_t)src
->l_len
;
79 * Up-convert for v1 svc functions with a 32-bit lock range arg.
80 * Note that lock range checks (like overflow) are done later,
81 * in nlm_init_flock().
84 nlm_convert_to_nlm4_lock(struct nlm4_lock
*dst
, struct nlm_lock
*src
)
87 dst
->caller_name
= src
->caller_name
;
90 dst
->svid
= src
->svid
;
91 dst
->l_offset
= src
->l_offset
;
92 dst
->l_len
= src
->l_len
;
96 nlm_convert_to_nlm4_share(struct nlm4_share
*dst
, struct nlm_share
*src
)
99 dst
->caller_name
= src
->caller_name
;
102 dst
->mode
= src
->mode
;
103 dst
->access
= src
->access
;
107 * Down-convert for v1 NLM_TEST or NLM_TEST_MSG response.
108 * Note that nlm_do_test is careful to give us lock ranges
109 * that can be represented with 32-bit values. If the
110 * ASSERTs here fire, then the code in nlm_do_test that
111 * builds an nlm4_holder for a 32-bit client has failed to
112 * restrict the reported conflicting lock range so it's a
113 * valid 32-bit lock range.
116 nlm_convert_to_nlm_holder(struct nlm_holder
*dst
, struct nlm4_holder
*src
)
118 dst
->exclusive
= src
->exclusive
;
119 dst
->svid
= src
->svid
;
121 ASSERT(src
->l_offset
<= MAX_UOFF32
);
122 dst
->l_offset
= (uint32_t)src
->l_offset
;
123 ASSERT(src
->l_len
<= MAX_UOFF32
);
124 dst
->l_len
= (uint32_t)src
->l_len
;
127 static enum nlm_stats
128 nlm_convert_to_nlm_stats(enum nlm4_stats src
)
130 if (src
> nlm4_deadlck
)
132 return ((enum nlm_stats
)src
);
136 nlm_convert_to_nlm_res(struct nlm_res
*dst
, struct nlm4_res
*src
)
138 dst
->cookie
= src
->cookie
;
139 dst
->stat
.stat
= nlm_convert_to_nlm_stats(src
->stat
.stat
);
142 /* ******************************************************************** */
145 * Version 1 svc functions
149 nlm_test_1_svc(struct nlm_testargs
*argp
, nlm_testres
*resp
,
155 bzero(&args4
, sizeof (args4
));
156 bzero(&res4
, sizeof (res4
));
158 args4
.cookie
= argp
->cookie
;
159 args4
.exclusive
= argp
->exclusive
;
160 nlm_convert_to_nlm4_lock(&args4
.alock
, &argp
->alock
);
162 nlm_do_test(&args4
, &res4
, sr
, NULL
);
164 resp
->cookie
= res4
.cookie
;
165 resp
->stat
.stat
= nlm_convert_to_nlm_stats(res4
.stat
.stat
);
166 if (resp
->stat
.stat
== nlm_denied
)
167 nlm_convert_to_nlm_holder(
168 &resp
->stat
.nlm_testrply_u
.holder
,
169 &res4
.stat
.nlm4_testrply_u
.holder
);
175 * Callback functions for nlm_lock_1_svc
177 static bool_t
nlm_lock_1_reply(SVCXPRT
*, nlm4_res
*);
178 static enum clnt_stat
nlm_granted_1_cb(nlm4_testargs
*, void *, CLIENT
*);
181 nlm_lock_1_svc(nlm_lockargs
*argp
, nlm_res
*resp
,
187 bzero(&res4
, sizeof (res4
));
189 args4
.cookie
= argp
->cookie
;
190 args4
.block
= argp
->block
;
191 args4
.exclusive
= argp
->exclusive
;
192 nlm_convert_to_nlm4_lock(&args4
.alock
, &argp
->alock
);
193 args4
.reclaim
= argp
->reclaim
;
194 args4
.state
= argp
->state
;
197 nlm_do_lock(&args4
, &res4
, sr
,
198 nlm_lock_1_reply
, NULL
,
202 nlm_convert_to_nlm_res(resp
, &res4
);
204 /* above does its own reply */
209 nlm_lock_1_reply(SVCXPRT
*transp
, nlm4_res
*resp
)
213 nlm_convert_to_nlm_res(&res1
, resp
);
214 return (svc_sendreply(transp
, xdr_nlm_res
, (char *)&res1
));
217 static enum clnt_stat
218 nlm_granted_1_cb(nlm4_testargs
*argp
, void *resp
, CLIENT
*clnt
)
224 bzero(&res1
, sizeof (res1
));
226 args1
.cookie
= argp
->cookie
;
227 args1
.exclusive
= argp
->exclusive
;
228 nlm_convert_to_nlm_lock(&args1
.alock
, &argp
->alock
);
230 rv
= nlm_granted_1(&args1
, &res1
, clnt
);
232 /* NB: We have a result our caller will not free. */
233 xdr_free((xdrproc_t
)xdr_nlm_res
, (void *)&res1
);
240 nlm_cancel_1_svc(struct nlm_cancargs
*argp
, nlm_res
*resp
,
246 bzero(&res4
, sizeof (res4
));
248 args4
.cookie
= argp
->cookie
;
249 args4
.block
= argp
->block
;
250 args4
.exclusive
= argp
->exclusive
;
251 nlm_convert_to_nlm4_lock(&args4
.alock
, &argp
->alock
);
253 nlm_do_cancel(&args4
, &res4
, sr
, NULL
);
255 nlm_convert_to_nlm_res(resp
, &res4
);
261 nlm_unlock_1_svc(struct nlm_unlockargs
*argp
, nlm_res
*resp
,
264 nlm4_unlockargs args4
;
267 bzero(&res4
, sizeof (res4
));
269 args4
.cookie
= argp
->cookie
;
270 nlm_convert_to_nlm4_lock(&args4
.alock
, &argp
->alock
);
272 nlm_do_unlock(&args4
, &res4
, sr
, NULL
);
274 nlm_convert_to_nlm_res(resp
, &res4
);
280 nlm_granted_1_svc(struct nlm_testargs
*argp
, nlm_res
*resp
,
286 bzero(&res4
, sizeof (res4
));
288 args4
.cookie
= argp
->cookie
;
289 args4
.exclusive
= argp
->exclusive
;
290 nlm_convert_to_nlm4_lock(&args4
.alock
, &argp
->alock
);
292 nlm_do_granted(&args4
, &res4
, sr
, NULL
);
294 nlm_convert_to_nlm_res(resp
, &res4
);
300 * The _msg_ calls get no reply. Instead, these callers
301 * expect an RPC call to the corresponding _res function.
302 * We pass this callback function to nlm_do_test so it will
303 * use it to do the RPC callback, with the correct res type.
305 * The callback functions have nearly the same arg signature
306 * as the client call functions so that many of those can be
307 * optimized to nothing by the compiler. Also, passing the
308 * null result arg for these just to reduce warnings.
310 * See similar callbacks for other _msg functions below.
313 static enum clnt_stat
nlm_test_res_1_cb(nlm4_testres
*, void *, CLIENT
*);
316 nlm_test_msg_1_svc(struct nlm_testargs
*argp
, void *resp
,
322 bzero(&res4
, sizeof (res4
));
324 args4
.cookie
= argp
->cookie
;
325 args4
.exclusive
= argp
->exclusive
;
326 nlm_convert_to_nlm4_lock(&args4
.alock
, &argp
->alock
);
328 nlm_do_test(&args4
, &res4
, sr
,
331 /* NB: We have a result our caller will not free. */
332 xdr_free((xdrproc_t
)xdr_nlm4_testres
, (void *)&res4
);
335 /* The _msg_ calls get no reply. */
339 static enum clnt_stat
340 nlm_test_res_1_cb(nlm4_testres
*res4
, void *null
, CLIENT
*clnt
)
344 res1
.cookie
= res4
->cookie
;
345 res1
.stat
.stat
= nlm_convert_to_nlm_stats(res4
->stat
.stat
);
346 if (res1
.stat
.stat
== nlm_denied
)
347 nlm_convert_to_nlm_holder(
348 &res1
.stat
.nlm_testrply_u
.holder
,
349 &res4
->stat
.nlm4_testrply_u
.holder
);
351 return (nlm_test_res_1(&res1
, null
, clnt
));
355 * Callback functions for nlm_lock_msg_1_svc
357 static enum clnt_stat
nlm_lock_res_1_cb(nlm4_res
*, void *, CLIENT
*);
358 static enum clnt_stat
nlm_granted_msg_1_cb(nlm4_testargs
*, void *, CLIENT
*);
361 nlm_lock_msg_1_svc(nlm_lockargs
*argp
, void *resp
,
367 bzero(&res4
, sizeof (res4
));
369 args4
.cookie
= argp
->cookie
;
370 args4
.block
= argp
->block
;
371 args4
.exclusive
= argp
->exclusive
;
372 nlm_convert_to_nlm4_lock(&args4
.alock
, &argp
->alock
);
373 args4
.reclaim
= argp
->reclaim
;
374 args4
.state
= argp
->state
;
377 nlm_do_lock(&args4
, &res4
, sr
,
378 NULL
, nlm_lock_res_1_cb
,
379 nlm_granted_msg_1_cb
);
381 /* NB: We have a result our caller will not free. */
382 xdr_free((xdrproc_t
)xdr_nlm4_res
, (void *)&res4
);
385 /* The _msg_ calls get no reply. */
389 static enum clnt_stat
390 nlm_lock_res_1_cb(nlm4_res
*resp
, void *null
, CLIENT
*clnt
)
394 nlm_convert_to_nlm_res(&res1
, resp
);
395 return (nlm_lock_res_1(&res1
, null
, clnt
));
398 static enum clnt_stat
399 nlm_granted_msg_1_cb(nlm4_testargs
*argp
, void *null
, CLIENT
*clnt
)
403 args1
.cookie
= argp
->cookie
;
404 args1
.exclusive
= argp
->exclusive
;
405 nlm_convert_to_nlm_lock(&args1
.alock
, &argp
->alock
);
407 return (nlm_granted_msg_1(&args1
, null
, clnt
));
412 static enum clnt_stat
nlm_cancel_res_1_cb(nlm4_res
*, void *, CLIENT
*);
415 nlm_cancel_msg_1_svc(struct nlm_cancargs
*argp
, void *resp
,
421 bzero(&res4
, sizeof (res4
));
423 args4
.cookie
= argp
->cookie
;
424 args4
.block
= argp
->block
;
425 args4
.exclusive
= argp
->exclusive
;
426 nlm_convert_to_nlm4_lock(&args4
.alock
, &argp
->alock
);
428 nlm_do_cancel(&args4
, &res4
, sr
,
429 nlm_cancel_res_1_cb
);
431 /* NB: We have a result our caller will not free. */
432 xdr_free((xdrproc_t
)xdr_nlm4_res
, (void *)&res4
);
435 /* The _msg_ calls get no reply. */
439 static enum clnt_stat
440 nlm_cancel_res_1_cb(nlm4_res
*res4
, void *null
, CLIENT
*clnt
)
444 nlm_convert_to_nlm_res(&res1
, res4
);
445 return (nlm_cancel_res_1(&res1
, null
, clnt
));
449 static enum clnt_stat
nlm_unlock_res_1_cb(nlm4_res
*, void *, CLIENT
*);
452 nlm_unlock_msg_1_svc(struct nlm_unlockargs
*argp
, void *resp
,
455 nlm4_unlockargs args4
;
458 bzero(&res4
, sizeof (res4
));
460 args4
.cookie
= argp
->cookie
;
461 nlm_convert_to_nlm4_lock(&args4
.alock
, &argp
->alock
);
463 nlm_do_unlock(&args4
, &res4
, sr
,
464 nlm_unlock_res_1_cb
);
466 /* NB: We have a result our caller will not free. */
467 xdr_free((xdrproc_t
)xdr_nlm4_res
, (void *)&res4
);
470 /* The _msg_ calls get no reply. */
474 static enum clnt_stat
475 nlm_unlock_res_1_cb(nlm4_res
*res4
, void *null
, CLIENT
*clnt
)
479 nlm_convert_to_nlm_res(&res1
, res4
);
480 return (nlm_unlock_res_1(&res1
, null
, clnt
));
484 static enum clnt_stat
nlm_granted_res_1_cb(nlm4_res
*, void *, CLIENT
*);
487 nlm_granted_msg_1_svc(struct nlm_testargs
*argp
, void *resp
,
493 bzero(&res4
, sizeof (res4
));
495 args4
.cookie
= argp
->cookie
;
496 args4
.exclusive
= argp
->exclusive
;
497 nlm_convert_to_nlm4_lock(&args4
.alock
, &argp
->alock
);
499 nlm_do_granted(&args4
, &res4
, sr
,
500 nlm_granted_res_1_cb
);
502 /* NB: We have a result our caller will not free. */
503 xdr_free((xdrproc_t
)xdr_nlm4_res
, (void *)&res4
);
506 /* The _msg_ calls get no reply. */
510 static enum clnt_stat
511 nlm_granted_res_1_cb(nlm4_res
*res4
, void *null
, CLIENT
*clnt
)
515 nlm_convert_to_nlm_res(&res1
, res4
);
516 return (nlm_granted_res_1(&res1
, null
, clnt
));
520 * The _res_ calls get no reply. These RPC calls are
521 * "call backs" in response to RPC _msg_ calls.
522 * We don't care about these responses.
527 nlm_test_res_1_svc(nlm_testres
*argp
, void *resp
, struct svc_req
*sr
)
529 /* The _res_ calls get no reply. */
535 nlm_lock_res_1_svc(nlm_res
*argp
, void *resp
, struct svc_req
*sr
)
537 /* The _res_ calls get no reply. */
543 nlm_cancel_res_1_svc(nlm_res
*argp
, void *resp
, struct svc_req
*sr
)
545 /* The _res_ calls get no reply. */
551 nlm_unlock_res_1_svc(nlm_res
*argp
, void *resp
, struct svc_req
*sr
)
553 /* The _res_ calls get no reply. */
559 nlm_granted_res_1_svc(nlm_res
*argp
, void *resp
, struct svc_req
*sr
)
561 /* The _res_ calls get no reply. */
566 * Version 2 svc functions (used by local statd)
570 nlm_sm_notify1_2_svc(struct nlm_sm_status
*argp
, void *resp
,
573 nlm_do_notify1(argp
, resp
, sr
);
578 nlm_sm_notify2_2_svc(struct nlm_sm_status
*argp
, void *resp
,
581 nlm_do_notify2(argp
, resp
, sr
);
586 * Version 3 svc functions
590 nlm_share_3_svc(nlm_shareargs
*argp
, nlm_shareres
*resp
,
593 nlm4_shareargs args4
;
596 bzero(&res4
, sizeof (res4
));
598 args4
.cookie
= argp
->cookie
;
599 nlm_convert_to_nlm4_share(&args4
.share
, &argp
->share
);
600 args4
.reclaim
= argp
->reclaim
;
602 nlm_do_share(&args4
, &res4
, sr
);
604 resp
->cookie
= res4
.cookie
;
605 resp
->stat
= nlm_convert_to_nlm_stats(res4
.stat
);
606 resp
->sequence
= res4
.sequence
;
612 nlm_unshare_3_svc(nlm_shareargs
*argp
, nlm_shareres
*resp
,
615 nlm4_shareargs args4
;
618 bzero(&res4
, sizeof (res4
));
620 args4
.cookie
= argp
->cookie
;
621 nlm_convert_to_nlm4_share(&args4
.share
, &argp
->share
);
622 args4
.reclaim
= argp
->reclaim
;
624 nlm_do_unshare(&args4
, &res4
, sr
);
626 resp
->cookie
= res4
.cookie
;
627 resp
->stat
= nlm_convert_to_nlm_stats(res4
.stat
);
628 resp
->sequence
= res4
.sequence
;
634 nlm_nm_lock_3_svc(nlm_lockargs
*argp
, nlm_res
*resp
, struct svc_req
*sr
)
639 bzero(&res4
, sizeof (res4
));
641 args4
.cookie
= argp
->cookie
;
642 args4
.block
= argp
->block
;
643 args4
.exclusive
= argp
->exclusive
;
644 nlm_convert_to_nlm4_lock(&args4
.alock
, &argp
->alock
);
645 args4
.reclaim
= argp
->reclaim
;
646 args4
.state
= argp
->state
;
649 * Don't allow blocking for non-monitored (nm_lock) calls.
650 * These clients don't handle any callbacks, including
651 * the granted call we make after a blocking lock.
652 * Same reply callback as nlm_lock_1_svc
657 nlm_do_lock(&args4
, &res4
, sr
,
658 nlm_lock_1_reply
, NULL
,
659 NULL
); /* indicates non-monitored */
662 nlm_convert_to_nlm_res(resp
, &res4
);
664 /* above does its own reply */
669 nlm_free_all_3_svc(nlm_notify
*argp
, void *resp
, struct svc_req
*sr
)
671 struct nlm4_notify args4
;
673 args4
.name
= argp
->name
;
674 args4
.state
= argp
->state
;
676 nlm_do_free_all(&args4
, resp
, sr
);
682 * Version 4 svc functions
686 nlm4_test_4_svc(nlm4_testargs
*argp
, nlm4_testres
*resp
, struct svc_req
*sr
)
688 nlm_do_test(argp
, resp
, sr
, NULL
);
693 * Callback functions for nlm4_lock_4_svc
695 static bool_t
nlm4_lock_4_reply(SVCXPRT
*, nlm4_res
*);
696 static enum clnt_stat
nlm4_granted_4_cb(nlm4_testargs
*, void *, CLIENT
*);
699 nlm4_lock_4_svc(nlm4_lockargs
*argp
, nlm4_res
*resp
,
704 nlm_do_lock(argp
, resp
, sr
,
705 nlm4_lock_4_reply
, NULL
,
708 /* above does its own reply */
713 nlm4_lock_4_reply(SVCXPRT
*transp
, nlm4_res
*resp
)
715 return (svc_sendreply(transp
, xdr_nlm4_res
, (char *)resp
));
718 static enum clnt_stat
719 nlm4_granted_4_cb(nlm4_testargs
*argp
, void *resp
, CLIENT
*clnt
)
724 bzero(&res4
, sizeof (res4
));
725 rv
= nlm4_granted_4(argp
, &res4
, clnt
);
727 /* NB: We have a result our caller will not free. */
728 xdr_free((xdrproc_t
)xdr_nlm4_res
, (void *)&res4
);
735 nlm4_cancel_4_svc(nlm4_cancargs
*argp
, nlm4_res
*resp
, struct svc_req
*sr
)
737 nlm_do_cancel(argp
, resp
, sr
, NULL
);
742 nlm4_unlock_4_svc(nlm4_unlockargs
*argp
, nlm4_res
*resp
, struct svc_req
*sr
)
744 nlm_do_unlock(argp
, resp
, sr
, NULL
);
749 nlm4_granted_4_svc(nlm4_testargs
*argp
, nlm4_res
*resp
, struct svc_req
*sr
)
751 nlm_do_granted(argp
, resp
, sr
, NULL
);
756 nlm4_test_msg_4_svc(nlm4_testargs
*argp
, void *resp
, struct svc_req
*sr
)
760 bzero(&res4
, sizeof (res4
));
761 nlm_do_test(argp
, &res4
, sr
,
764 /* NB: We have a result our caller will not free. */
765 xdr_free((xdrproc_t
)xdr_nlm4_testres
, (void *)&res4
);
768 /* The _msg_ calls get no reply. */
773 * Callback functions for nlm4_lock_msg_4_svc
774 * (using the RPC client stubs directly)
778 nlm4_lock_msg_4_svc(nlm4_lockargs
*argp
, void *resp
,
784 bzero(&res4
, sizeof (res4
));
785 nlm_do_lock(argp
, &res4
, sr
,
786 NULL
, nlm4_lock_res_4
,
789 /* NB: We have a result our caller will not free. */
790 xdr_free((xdrproc_t
)xdr_nlm4_res
, (void *)&res4
);
793 /* The _msg_ calls get no reply. */
798 nlm4_cancel_msg_4_svc(nlm4_cancargs
*argp
, void *resp
, struct svc_req
*sr
)
802 bzero(&res4
, sizeof (res4
));
803 nlm_do_cancel(argp
, &res4
, sr
,
806 /* NB: We have a result our caller will not free. */
807 xdr_free((xdrproc_t
)xdr_nlm4_res
, (void *)&res4
);
810 /* The _msg_ calls get no reply. */
815 nlm4_unlock_msg_4_svc(nlm4_unlockargs
*argp
, void *resp
, struct svc_req
*sr
)
819 bzero(&res4
, sizeof (res4
));
820 nlm_do_unlock(argp
, &res4
, sr
,
823 /* NB: We have a result our caller will not free. */
824 xdr_free((xdrproc_t
)xdr_nlm4_res
, (void *)&res4
);
827 /* The _msg_ calls get no reply. */
832 nlm4_granted_msg_4_svc(nlm4_testargs
*argp
, void *resp
, struct svc_req
*sr
)
836 bzero(&res4
, sizeof (res4
));
837 nlm_do_granted(argp
, &res4
, sr
,
840 /* NB: We have a result our caller will not free. */
841 xdr_free((xdrproc_t
)xdr_nlm4_res
, (void *)&res4
);
844 /* The _msg_ calls get no reply. */
850 nlm4_test_res_4_svc(nlm4_testres
*argp
, void *resp
, struct svc_req
*sr
)
852 /* The _res_ calls get no reply. */
858 nlm4_lock_res_4_svc(nlm4_res
*argp
, void *resp
, struct svc_req
*sr
)
860 /* The _res_ calls get no reply. */
866 nlm4_cancel_res_4_svc(nlm4_res
*argp
, void *resp
, struct svc_req
*sr
)
868 /* The _res_ calls get no reply. */
874 nlm4_unlock_res_4_svc(nlm4_res
*argp
, void *resp
, struct svc_req
*sr
)
876 /* The _res_ calls get no reply. */
882 nlm4_granted_res_4_svc(nlm4_res
*argp
, void *resp
, struct svc_req
*sr
)
884 /* The _res_ calls get no reply. */
890 nlm4_share_4_svc(nlm4_shareargs
*argp
, nlm4_shareres
*resp
,
893 nlm_do_share(argp
, resp
, sr
);
899 nlm4_unshare_4_svc(nlm4_shareargs
*argp
, nlm4_shareres
*resp
,
902 nlm_do_unshare(argp
, resp
, sr
);
907 nlm4_nm_lock_4_svc(nlm4_lockargs
*argp
, nlm4_res
*resp
, struct svc_req
*sr
)
911 * Don't allow blocking for non-monitored (nm_lock) calls.
912 * These clients don't handle any callbacks, including
913 * the granted call we make after a blocking lock.
914 * Same reply callback as nlm4_lock_4_svc
919 nlm_do_lock(argp
, resp
, sr
,
920 nlm4_lock_4_reply
, NULL
,
921 NULL
); /* indicates non-monitored */
923 /* above does its own reply */
928 nlm4_free_all_4_svc(nlm4_notify
*argp
, void *resp
, struct svc_req
*sr
)
930 nlm_do_free_all(argp
, resp
, sr
);