ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / fs / afs / vlclient.c
1 /* vlclient.c: AFS Volume Location Service client
2  *
3  * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved.
4  * Written by David Howells (dhowells@redhat.com)
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version
9  * 2 of the License, or (at your option) any later version.
10  */
11
12 #include <linux/init.h>
13 #include <linux/sched.h>
14 #include <rxrpc/rxrpc.h>
15 #include <rxrpc/transport.h>
16 #include <rxrpc/connection.h>
17 #include <rxrpc/call.h>
18 #include "server.h"
19 #include "volume.h"
20 #include "vlclient.h"
21 #include "kafsasyncd.h"
22 #include "kafstimod.h"
23 #include "errors.h"
24 #include "internal.h"
25
26 #define VLGETENTRYBYID          503     /* AFS Get Cache Entry By ID operation ID */
27 #define VLGETENTRYBYNAME        504     /* AFS Get Cache Entry By Name operation ID */
28 #define VLPROBE                 514     /* AFS Probe Volume Location Service operation ID */
29
30 static void afs_rxvl_get_entry_by_id_attn(struct rxrpc_call *call);
31 static void afs_rxvl_get_entry_by_id_error(struct rxrpc_call *call);
32
33 /*****************************************************************************/
34 /*
35  * map afs VL abort codes to/from Linux error codes
36  * - called with call->lock held
37  */
38 static void afs_rxvl_aemap(struct rxrpc_call *call)
39 {
40         int err;
41
42         _enter("{%u,%u,%d}",
43                call->app_err_state, call->app_abort_code, call->app_errno);
44
45         switch (call->app_err_state) {
46         case RXRPC_ESTATE_LOCAL_ABORT:
47                 call->app_abort_code = -call->app_errno;
48                 return;
49
50         case RXRPC_ESTATE_PEER_ABORT:
51                 switch (call->app_abort_code) {
52                 case AFSVL_IDEXIST:             err = -EEXIST;          break;
53                 case AFSVL_IO:                  err = -EREMOTEIO;       break;
54                 case AFSVL_NAMEEXIST:           err = -EEXIST;          break;
55                 case AFSVL_CREATEFAIL:          err = -EREMOTEIO;       break;
56                 case AFSVL_NOENT:               err = -ENOMEDIUM;       break;
57                 case AFSVL_EMPTY:               err = -ENOMEDIUM;       break;
58                 case AFSVL_ENTDELETED:          err = -ENOMEDIUM;       break;
59                 case AFSVL_BADNAME:             err = -EINVAL;          break;
60                 case AFSVL_BADINDEX:            err = -EINVAL;          break;
61                 case AFSVL_BADVOLTYPE:          err = -EINVAL;          break;
62                 case AFSVL_BADSERVER:           err = -EINVAL;          break;
63                 case AFSVL_BADPARTITION:        err = -EINVAL;          break;
64                 case AFSVL_REPSFULL:            err = -EFBIG;           break;
65                 case AFSVL_NOREPSERVER:         err = -ENOENT;          break;
66                 case AFSVL_DUPREPSERVER:        err = -EEXIST;          break;
67                 case AFSVL_RWNOTFOUND:          err = -ENOENT;          break;
68                 case AFSVL_BADREFCOUNT:         err = -EINVAL;          break;
69                 case AFSVL_SIZEEXCEEDED:        err = -EINVAL;          break;
70                 case AFSVL_BADENTRY:            err = -EINVAL;          break;
71                 case AFSVL_BADVOLIDBUMP:        err = -EINVAL;          break;
72                 case AFSVL_IDALREADYHASHED:     err = -EINVAL;          break;
73                 case AFSVL_ENTRYLOCKED:         err = -EBUSY;           break;
74                 case AFSVL_BADVOLOPER:          err = -EBADRQC;         break;
75                 case AFSVL_BADRELLOCKTYPE:      err = -EINVAL;          break;
76                 case AFSVL_RERELEASE:           err = -EREMOTEIO;       break;
77                 case AFSVL_BADSERVERFLAG:       err = -EINVAL;          break;
78                 case AFSVL_PERM:                err = -EACCES;          break;
79                 case AFSVL_NOMEM:               err = -EREMOTEIO;       break;
80                 default:
81                         err = afs_abort_to_error(call->app_abort_code);
82                         break;
83                 }
84                 call->app_errno = err;
85                 return;
86
87         default:
88                 return;
89         }
90 } /* end afs_rxvl_aemap() */
91
92 /*****************************************************************************/
93 /*
94  * probe a volume location server to see if it is still alive
95  */
96 int afs_rxvl_probe(struct afs_server *server, int alloc_flags)
97 {
98         struct rxrpc_connection *conn;
99         struct rxrpc_call *call;
100         struct iovec piov[1];
101         size_t sent;
102         int ret;
103         u32 param[1];
104
105         DECLARE_WAITQUEUE(myself, current);
106
107         /* get hold of the vlserver connection */
108         ret = afs_server_get_vlconn(server, &conn);
109         if (ret < 0)
110                 goto out;
111
112         /* create a call through that connection */
113         ret = rxrpc_create_call(conn, NULL, NULL, afs_rxvl_aemap, &call);
114         if (ret < 0) {
115                 printk("kAFS: Unable to create call: %d\n", ret);
116                 goto out_put_conn;
117         }
118         call->app_opcode = VLPROBE;
119
120         /* we want to get event notifications from the call */
121         add_wait_queue(&call->waitq, &myself);
122
123         /* marshall the parameters */
124         param[0] = htonl(VLPROBE);
125         piov[0].iov_len = sizeof(param);
126         piov[0].iov_base = param;
127
128         /* send the parameters to the server */
129         ret = rxrpc_call_write_data(call, 1, piov, RXRPC_LAST_PACKET,
130                                     alloc_flags, 0, &sent);
131         if (ret < 0)
132                 goto abort;
133
134         /* wait for the reply to completely arrive */
135         for (;;) {
136                 set_current_state(TASK_INTERRUPTIBLE);
137                 if (call->app_call_state != RXRPC_CSTATE_CLNT_RCV_REPLY ||
138                     signal_pending(current))
139                         break;
140                 schedule();
141         }
142         set_current_state(TASK_RUNNING);
143
144         ret = -EINTR;
145         if (signal_pending(current))
146                 goto abort;
147
148         switch (call->app_call_state) {
149         case RXRPC_CSTATE_ERROR:
150                 ret = call->app_errno;
151                 goto out_unwait;
152
153         case RXRPC_CSTATE_CLNT_GOT_REPLY:
154                 ret = 0;
155                 goto out_unwait;
156
157         default:
158                 BUG();
159         }
160
161  abort:
162         set_current_state(TASK_UNINTERRUPTIBLE);
163         rxrpc_call_abort(call, ret);
164         schedule();
165
166  out_unwait:
167         set_current_state(TASK_RUNNING);
168         remove_wait_queue(&call->waitq, &myself);
169         rxrpc_put_call(call);
170  out_put_conn:
171         rxrpc_put_connection(conn);
172  out:
173         return ret;
174
175 } /* end afs_rxvl_probe() */
176
177 /*****************************************************************************/
178 /*
179  * look up a volume location database entry by name
180  */
181 int afs_rxvl_get_entry_by_name(struct afs_server *server,
182                                const char *volname,
183                                unsigned volnamesz,
184                                struct afs_cache_vlocation *entry)
185 {
186         DECLARE_WAITQUEUE(myself, current);
187
188         struct rxrpc_connection *conn;
189         struct rxrpc_call *call;
190         struct iovec piov[3];
191         unsigned tmp;
192         size_t sent;
193         int ret, loop;
194         u32 *bp, param[2], zero;
195
196         _enter(",%*.*s,%u,", volnamesz, volnamesz, volname, volnamesz);
197
198         memset(entry, 0, sizeof(*entry));
199
200         /* get hold of the vlserver connection */
201         ret = afs_server_get_vlconn(server, &conn);
202         if (ret < 0)
203                 goto out;
204
205         /* create a call through that connection */
206         ret = rxrpc_create_call(conn, NULL, NULL, afs_rxvl_aemap, &call);
207         if (ret < 0) {
208                 printk("kAFS: Unable to create call: %d\n", ret);
209                 goto out_put_conn;
210         }
211         call->app_opcode = VLGETENTRYBYNAME;
212
213         /* we want to get event notifications from the call */
214         add_wait_queue(&call->waitq, &myself);
215
216         /* marshall the parameters */
217         piov[1].iov_len = volnamesz;
218         piov[1].iov_base = (char *) volname;
219
220         zero = 0;
221         piov[2].iov_len = (4 - (piov[1].iov_len & 3)) & 3;
222         piov[2].iov_base = &zero;
223
224         param[0] = htonl(VLGETENTRYBYNAME);
225         param[1] = htonl(piov[1].iov_len);
226
227         piov[0].iov_len = sizeof(param);
228         piov[0].iov_base = param;
229
230         /* send the parameters to the server */
231         ret = rxrpc_call_write_data(call, 3, piov, RXRPC_LAST_PACKET, GFP_NOFS,
232                                     0, &sent);
233         if (ret < 0)
234                 goto abort;
235
236         /* wait for the reply to completely arrive */
237         bp = rxrpc_call_alloc_scratch(call, 384);
238
239         ret = rxrpc_call_read_data(call, bp, 384,
240                                    RXRPC_CALL_READ_BLOCK |
241                                    RXRPC_CALL_READ_ALL);
242         if (ret < 0) {
243                 if (ret == -ECONNABORTED) {
244                         ret = call->app_errno;
245                         goto out_unwait;
246                 }
247                 goto abort;
248         }
249
250         /* unmarshall the reply */
251         for (loop = 0; loop < 64; loop++)
252                 entry->name[loop] = ntohl(*bp++);
253         bp++; /* final NUL */
254
255         bp++; /* type */
256         entry->nservers = ntohl(*bp++);
257
258         for (loop = 0; loop < 8; loop++)
259                 entry->servers[loop].s_addr = *bp++;
260
261         bp += 8; /* partition IDs */
262
263         for (loop = 0; loop < 8; loop++) {
264                 tmp = ntohl(*bp++);
265                 if (tmp & AFS_VLSF_RWVOL)
266                         entry->srvtmask[loop] |= AFS_VOL_VTM_RW;
267                 if (tmp & AFS_VLSF_ROVOL)
268                         entry->srvtmask[loop] |= AFS_VOL_VTM_RO;
269                 if (tmp & AFS_VLSF_BACKVOL)
270                         entry->srvtmask[loop] |= AFS_VOL_VTM_BAK;
271         }
272
273         entry->vid[0] = ntohl(*bp++);
274         entry->vid[1] = ntohl(*bp++);
275         entry->vid[2] = ntohl(*bp++);
276
277         bp++; /* clone ID */
278
279         tmp = ntohl(*bp++); /* flags */
280         if (tmp & AFS_VLF_RWEXISTS)
281                 entry->vidmask |= AFS_VOL_VTM_RW;
282         if (tmp & AFS_VLF_ROEXISTS)
283                 entry->vidmask |= AFS_VOL_VTM_RO;
284         if (tmp & AFS_VLF_BACKEXISTS)
285                 entry->vidmask |= AFS_VOL_VTM_BAK;
286
287         ret = -ENOMEDIUM;
288         if (!entry->vidmask)
289                 goto abort;
290
291         /* success */
292         entry->rtime = get_seconds();
293         ret = 0;
294
295  out_unwait:
296         set_current_state(TASK_RUNNING);
297         remove_wait_queue(&call->waitq, &myself);
298         rxrpc_put_call(call);
299  out_put_conn:
300         rxrpc_put_connection(conn);
301  out:
302         _leave(" = %d", ret);
303         return ret;
304
305  abort:
306         set_current_state(TASK_UNINTERRUPTIBLE);
307         rxrpc_call_abort(call, ret);
308         schedule();
309         goto out_unwait;
310 } /* end afs_rxvl_get_entry_by_name() */
311
312 /*****************************************************************************/
313 /*
314  * look up a volume location database entry by ID
315  */
316 int afs_rxvl_get_entry_by_id(struct afs_server *server,
317                              afs_volid_t volid,
318                              afs_voltype_t voltype,
319                              struct afs_cache_vlocation *entry)
320 {
321         DECLARE_WAITQUEUE(myself, current);
322
323         struct rxrpc_connection *conn;
324         struct rxrpc_call *call;
325         struct iovec piov[1];
326         unsigned tmp;
327         size_t sent;
328         int ret, loop;
329         u32 *bp, param[3];
330
331         _enter(",%x,%d,", volid, voltype);
332
333         memset(entry, 0, sizeof(*entry));
334
335         /* get hold of the vlserver connection */
336         ret = afs_server_get_vlconn(server, &conn);
337         if (ret < 0)
338                 goto out;
339
340         /* create a call through that connection */
341         ret = rxrpc_create_call(conn, NULL, NULL, afs_rxvl_aemap, &call);
342         if (ret < 0) {
343                 printk("kAFS: Unable to create call: %d\n", ret);
344                 goto out_put_conn;
345         }
346         call->app_opcode = VLGETENTRYBYID;
347
348         /* we want to get event notifications from the call */
349         add_wait_queue(&call->waitq, &myself);
350
351         /* marshall the parameters */
352         param[0] = htonl(VLGETENTRYBYID);
353         param[1] = htonl(volid);
354         param[2] = htonl(voltype);
355
356         piov[0].iov_len = sizeof(param);
357         piov[0].iov_base = param;
358
359         /* send the parameters to the server */
360         ret = rxrpc_call_write_data(call, 1, piov, RXRPC_LAST_PACKET, GFP_NOFS,
361                                     0, &sent);
362         if (ret < 0)
363                 goto abort;
364
365         /* wait for the reply to completely arrive */
366         bp = rxrpc_call_alloc_scratch(call, 384);
367
368         ret = rxrpc_call_read_data(call, bp, 384,
369                                    RXRPC_CALL_READ_BLOCK |
370                                    RXRPC_CALL_READ_ALL);
371         if (ret < 0) {
372                 if (ret == -ECONNABORTED) {
373                         ret = call->app_errno;
374                         goto out_unwait;
375                 }
376                 goto abort;
377         }
378
379         /* unmarshall the reply */
380         for (loop = 0; loop < 64; loop++)
381                 entry->name[loop] = ntohl(*bp++);
382         bp++; /* final NUL */
383
384         bp++; /* type */
385         entry->nservers = ntohl(*bp++);
386
387         for (loop = 0; loop < 8; loop++)
388                 entry->servers[loop].s_addr = *bp++;
389
390         bp += 8; /* partition IDs */
391
392         for (loop = 0; loop < 8; loop++) {
393                 tmp = ntohl(*bp++);
394                 if (tmp & AFS_VLSF_RWVOL)
395                         entry->srvtmask[loop] |= AFS_VOL_VTM_RW;
396                 if (tmp & AFS_VLSF_ROVOL)
397                         entry->srvtmask[loop] |= AFS_VOL_VTM_RO;
398                 if (tmp & AFS_VLSF_BACKVOL)
399                         entry->srvtmask[loop] |= AFS_VOL_VTM_BAK;
400         }
401
402         entry->vid[0] = ntohl(*bp++);
403         entry->vid[1] = ntohl(*bp++);
404         entry->vid[2] = ntohl(*bp++);
405
406         bp++; /* clone ID */
407
408         tmp = ntohl(*bp++); /* flags */
409         if (tmp & AFS_VLF_RWEXISTS)
410                 entry->vidmask |= AFS_VOL_VTM_RW;
411         if (tmp & AFS_VLF_ROEXISTS)
412                 entry->vidmask |= AFS_VOL_VTM_RO;
413         if (tmp & AFS_VLF_BACKEXISTS)
414                 entry->vidmask |= AFS_VOL_VTM_BAK;
415
416         ret = -ENOMEDIUM;
417         if (!entry->vidmask)
418                 goto abort;
419
420 #if 0 /* TODO: remove */
421         entry->nservers = 3;
422         entry->servers[0].s_addr = htonl(0xac101249);
423         entry->servers[1].s_addr = htonl(0xac101243);
424         entry->servers[2].s_addr = htonl(0xac10125b /*0xac10125b*/);
425
426         entry->srvtmask[0] = AFS_VOL_VTM_RO;
427         entry->srvtmask[1] = AFS_VOL_VTM_RO;
428         entry->srvtmask[2] = AFS_VOL_VTM_RO | AFS_VOL_VTM_RW;
429 #endif
430
431         /* success */
432         entry->rtime = get_seconds();
433         ret = 0;
434
435  out_unwait:
436         set_current_state(TASK_RUNNING);
437         remove_wait_queue(&call->waitq, &myself);
438         rxrpc_put_call(call);
439  out_put_conn:
440         rxrpc_put_connection(conn);
441  out:
442         _leave(" = %d", ret);
443         return ret;
444
445  abort:
446         set_current_state(TASK_UNINTERRUPTIBLE);
447         rxrpc_call_abort(call, ret);
448         schedule();
449         goto out_unwait;
450 } /* end afs_rxvl_get_entry_by_id() */
451
452 /*****************************************************************************/
453 /*
454  * look up a volume location database entry by ID asynchronously
455  */
456 int afs_rxvl_get_entry_by_id_async(struct afs_async_op *op,
457                                    afs_volid_t volid,
458                                    afs_voltype_t voltype)
459 {
460         struct rxrpc_connection *conn;
461         struct rxrpc_call *call;
462         struct iovec piov[1];
463         size_t sent;
464         int ret;
465         u32 param[3];
466
467         _enter(",%x,%d,", volid, voltype);
468
469         /* get hold of the vlserver connection */
470         ret = afs_server_get_vlconn(op->server, &conn);
471         if (ret < 0) {
472                 _leave(" = %d", ret);
473                 return ret;
474         }
475
476         /* create a call through that connection */
477         ret = rxrpc_create_call(conn,
478                                 afs_rxvl_get_entry_by_id_attn,
479                                 afs_rxvl_get_entry_by_id_error,
480                                 afs_rxvl_aemap,
481                                 &op->call);
482         rxrpc_put_connection(conn);
483
484         if (ret < 0) {
485                 printk("kAFS: Unable to create call: %d\n", ret);
486                 _leave(" = %d", ret);
487                 return ret;
488         }
489
490         op->call->app_opcode = VLGETENTRYBYID;
491         op->call->app_user = op;
492
493         call = op->call;
494         rxrpc_get_call(call);
495
496         /* send event notifications from the call to kafsasyncd */
497         afs_kafsasyncd_begin_op(op);
498
499         /* marshall the parameters */
500         param[0] = htonl(VLGETENTRYBYID);
501         param[1] = htonl(volid);
502         param[2] = htonl(voltype);
503
504         piov[0].iov_len = sizeof(param);
505         piov[0].iov_base = param;
506
507         /* allocate result read buffer in scratch space */
508         call->app_scr_ptr = rxrpc_call_alloc_scratch(op->call, 384);
509
510         /* send the parameters to the server */
511         ret = rxrpc_call_write_data(call, 1, piov, RXRPC_LAST_PACKET, GFP_NOFS,
512                                     0, &sent);
513         if (ret < 0) {
514                 rxrpc_call_abort(call, ret); /* handle from kafsasyncd */
515                 ret = 0;
516                 goto out;
517         }
518
519         /* wait for the reply to completely arrive */
520         ret = rxrpc_call_read_data(call, call->app_scr_ptr, 384, 0);
521         switch (ret) {
522         case 0:
523         case -EAGAIN:
524         case -ECONNABORTED:
525                 ret = 0;
526                 break;  /* all handled by kafsasyncd */
527
528         default:
529                 rxrpc_call_abort(call, ret); /* make kafsasyncd handle it */
530                 ret = 0;
531                 break;
532         }
533
534  out:
535         rxrpc_put_call(call);
536         _leave(" = %d", ret);
537         return ret;
538
539 } /* end afs_rxvl_get_entry_by_id_async() */
540
541 /*****************************************************************************/
542 /*
543  * attend to the asynchronous get VLDB entry by ID
544  */
545 int afs_rxvl_get_entry_by_id_async2(struct afs_async_op *op,
546                                     struct afs_cache_vlocation *entry)
547 {
548         unsigned *bp, tmp;
549         int loop, ret;
550
551         _enter("{op=%p cst=%u}", op, op->call->app_call_state);
552
553         memset(entry, 0, sizeof(*entry));
554
555         if (op->call->app_call_state == RXRPC_CSTATE_COMPLETE) {
556                 /* operation finished */
557                 afs_kafsasyncd_terminate_op(op);
558
559                 bp = op->call->app_scr_ptr;
560
561                 /* unmarshall the reply */
562                 for (loop = 0; loop < 64; loop++)
563                         entry->name[loop] = ntohl(*bp++);
564                 bp++; /* final NUL */
565
566                 bp++; /* type */
567                 entry->nservers = ntohl(*bp++);
568
569                 for (loop = 0; loop < 8; loop++)
570                         entry->servers[loop].s_addr = *bp++;
571
572                 bp += 8; /* partition IDs */
573
574                 for (loop = 0; loop < 8; loop++) {
575                         tmp = ntohl(*bp++);
576                         if (tmp & AFS_VLSF_RWVOL)
577                                 entry->srvtmask[loop] |= AFS_VOL_VTM_RW;
578                         if (tmp & AFS_VLSF_ROVOL)
579                                 entry->srvtmask[loop] |= AFS_VOL_VTM_RO;
580                         if (tmp & AFS_VLSF_BACKVOL)
581                                 entry->srvtmask[loop] |= AFS_VOL_VTM_BAK;
582                 }
583
584                 entry->vid[0] = ntohl(*bp++);
585                 entry->vid[1] = ntohl(*bp++);
586                 entry->vid[2] = ntohl(*bp++);
587
588                 bp++; /* clone ID */
589
590                 tmp = ntohl(*bp++); /* flags */
591                 if (tmp & AFS_VLF_RWEXISTS)
592                         entry->vidmask |= AFS_VOL_VTM_RW;
593                 if (tmp & AFS_VLF_ROEXISTS)
594                         entry->vidmask |= AFS_VOL_VTM_RO;
595                 if (tmp & AFS_VLF_BACKEXISTS)
596                         entry->vidmask |= AFS_VOL_VTM_BAK;
597
598                 ret = -ENOMEDIUM;
599                 if (!entry->vidmask) {
600                         rxrpc_call_abort(op->call, ret);
601                         goto done;
602                 }
603
604 #if 0 /* TODO: remove */
605                 entry->nservers = 3;
606                 entry->servers[0].s_addr = htonl(0xac101249);
607                 entry->servers[1].s_addr = htonl(0xac101243);
608                 entry->servers[2].s_addr = htonl(0xac10125b /*0xac10125b*/);
609
610                 entry->srvtmask[0] = AFS_VOL_VTM_RO;
611                 entry->srvtmask[1] = AFS_VOL_VTM_RO;
612                 entry->srvtmask[2] = AFS_VOL_VTM_RO | AFS_VOL_VTM_RW;
613 #endif
614
615                 /* success */
616                 entry->rtime = get_seconds();
617                 ret = 0;
618                 goto done;
619         }
620
621         if (op->call->app_call_state == RXRPC_CSTATE_ERROR) {
622                 /* operation error */
623                 ret = op->call->app_errno;
624                 goto done;
625         }
626
627         _leave(" = -EAGAIN");
628         return -EAGAIN;
629
630  done:
631         rxrpc_put_call(op->call);
632         op->call = NULL;
633         _leave(" = %d", ret);
634         return ret;
635 } /* end afs_rxvl_get_entry_by_id_async2() */
636
637 /*****************************************************************************/
638 /*
639  * handle attention events on an async get-entry-by-ID op
640  * - called from krxiod
641  */
642 static void afs_rxvl_get_entry_by_id_attn(struct rxrpc_call *call)
643 {
644         struct afs_async_op *op = call->app_user;
645
646         _enter("{op=%p cst=%u}", op, call->app_call_state);
647
648         switch (call->app_call_state) {
649         case RXRPC_CSTATE_COMPLETE:
650                 afs_kafsasyncd_attend_op(op);
651                 break;
652         case RXRPC_CSTATE_CLNT_RCV_REPLY:
653                 if (call->app_async_read)
654                         break;
655         case RXRPC_CSTATE_CLNT_GOT_REPLY:
656                 if (call->app_read_count == 0)
657                         break;
658                 printk("kAFS: Reply bigger than expected"
659                        " {cst=%u asyn=%d mark=%Zu rdy=%Zu pr=%u%s}",
660                        call->app_call_state,
661                        call->app_async_read,
662                        call->app_mark,
663                        call->app_ready_qty,
664                        call->pkt_rcv_count,
665                        call->app_last_rcv ? " last" : "");
666
667                 rxrpc_call_abort(call, -EBADMSG);
668                 break;
669         default:
670                 BUG();
671         }
672
673         _leave("");
674
675 } /* end afs_rxvl_get_entry_by_id_attn() */
676
677 /*****************************************************************************/
678 /*
679  * handle error events on an async get-entry-by-ID op
680  * - called from krxiod
681  */
682 static void afs_rxvl_get_entry_by_id_error(struct rxrpc_call *call)
683 {
684         struct afs_async_op *op = call->app_user;
685
686         _enter("{op=%p cst=%u}", op, call->app_call_state);
687
688         afs_kafsasyncd_attend_op(op);
689
690         _leave("");
691
692 } /* end afs_rxvl_get_entry_by_id_error() */