internal.h (1c966c5d26fec8bd71c42867e09d8da8aa721e58) internal.h (8e8d7f13b6d5a93b3d2cf9a4ceaaf923809fd5ac)
1/* internal AFS stuff
2 *
3 * Copyright (C) 2002, 2007 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

--- 54 unchanged lines hidden (view full) ---

63
64 /* asynchronous call completion */
65 void (*async_complete)(void *reply, int error);
66};
67
68extern const struct afs_wait_mode afs_sync_call;
69extern const struct afs_wait_mode afs_async_call;
70
1/* internal AFS stuff
2 *
3 * Copyright (C) 2002, 2007 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

--- 54 unchanged lines hidden (view full) ---

63
64 /* asynchronous call completion */
65 void (*async_complete)(void *reply, int error);
66};
67
68extern const struct afs_wait_mode afs_sync_call;
69extern const struct afs_wait_mode afs_async_call;
70
71enum afs_call_state {
72 AFS_CALL_REQUESTING, /* request is being sent for outgoing call */
73 AFS_CALL_AWAIT_REPLY, /* awaiting reply to outgoing call */
74 AFS_CALL_AWAIT_OP_ID, /* awaiting op ID on incoming call */
75 AFS_CALL_AWAIT_REQUEST, /* awaiting request data on incoming call */
76 AFS_CALL_REPLYING, /* replying to incoming call */
77 AFS_CALL_AWAIT_ACK, /* awaiting final ACK of incoming call */
78 AFS_CALL_COMPLETE, /* Completed or failed */
79};
71/*
72 * a record of an in-progress RxRPC call
73 */
74struct afs_call {
75 const struct afs_call_type *type; /* type of call */
76 const struct afs_wait_mode *wait_mode; /* completion wait mode */
77 wait_queue_head_t waitq; /* processes awaiting completion */
78 struct work_struct async_work; /* asynchronous work processor */

--- 7 unchanged lines hidden (view full) ---

86 void *buffer; /* reply receive buffer */
87 void *reply; /* reply buffer (first part) */
88 void *reply2; /* reply buffer (second part) */
89 void *reply3; /* reply buffer (third part) */
90 void *reply4; /* reply buffer (fourth part) */
91 pgoff_t first; /* first page in mapping to deal with */
92 pgoff_t last; /* last page in mapping to deal with */
93 size_t offset; /* offset into received data store */
80/*
81 * a record of an in-progress RxRPC call
82 */
83struct afs_call {
84 const struct afs_call_type *type; /* type of call */
85 const struct afs_wait_mode *wait_mode; /* completion wait mode */
86 wait_queue_head_t waitq; /* processes awaiting completion */
87 struct work_struct async_work; /* asynchronous work processor */

--- 7 unchanged lines hidden (view full) ---

95 void *buffer; /* reply receive buffer */
96 void *reply; /* reply buffer (first part) */
97 void *reply2; /* reply buffer (second part) */
98 void *reply3; /* reply buffer (third part) */
99 void *reply4; /* reply buffer (fourth part) */
100 pgoff_t first; /* first page in mapping to deal with */
101 pgoff_t last; /* last page in mapping to deal with */
102 size_t offset; /* offset into received data store */
94 enum { /* call state */
95 AFS_CALL_REQUESTING, /* request is being sent for outgoing call */
96 AFS_CALL_AWAIT_REPLY, /* awaiting reply to outgoing call */
97 AFS_CALL_AWAIT_OP_ID, /* awaiting op ID on incoming call */
98 AFS_CALL_AWAIT_REQUEST, /* awaiting request data on incoming call */
99 AFS_CALL_REPLYING, /* replying to incoming call */
100 AFS_CALL_AWAIT_ACK, /* awaiting final ACK of incoming call */
101 AFS_CALL_COMPLETE, /* Completed or failed */
102 } state;
103 enum afs_call_state state;
103 int error; /* error code */
104 u32 abort_code; /* Remote abort ID or 0 */
105 unsigned request_size; /* size of request data */
106 unsigned reply_max; /* maximum size of reply */
107 unsigned first_offset; /* offset into mapping[first] */
108 unsigned last_to; /* amount of mapping[last] */
109 unsigned char unmarshall; /* unmarshalling phase */
110 bool incoming; /* T if incoming call */

--- 657 unchanged lines hidden (view full) ---

768extern int afs_writeback_all(struct afs_vnode *);
769extern int afs_fsync(struct file *, loff_t, loff_t, int);
770
771
772/*****************************************************************************/
773/*
774 * debug tracing
775 */
104 int error; /* error code */
105 u32 abort_code; /* Remote abort ID or 0 */
106 unsigned request_size; /* size of request data */
107 unsigned reply_max; /* maximum size of reply */
108 unsigned first_offset; /* offset into mapping[first] */
109 unsigned last_to; /* amount of mapping[last] */
110 unsigned char unmarshall; /* unmarshalling phase */
111 bool incoming; /* T if incoming call */

--- 657 unchanged lines hidden (view full) ---

769extern int afs_writeback_all(struct afs_vnode *);
770extern int afs_fsync(struct file *, loff_t, loff_t, int);
771
772
773/*****************************************************************************/
774/*
775 * debug tracing
776 */
777#include <trace/events/afs.h>
778
776extern unsigned afs_debug;
777
778#define dbgprintk(FMT,...) \
779 printk("[%-6.6s] "FMT"\n", current->comm ,##__VA_ARGS__)
780
781#define kenter(FMT,...) dbgprintk("==> %s("FMT")",__func__ ,##__VA_ARGS__)
782#define kleave(FMT,...) dbgprintk("<== %s()"FMT"",__func__ ,##__VA_ARGS__)
783#define kdebug(FMT,...) dbgprintk(" "FMT ,##__VA_ARGS__)

--- 123 unchanged lines hidden ---
779extern unsigned afs_debug;
780
781#define dbgprintk(FMT,...) \
782 printk("[%-6.6s] "FMT"\n", current->comm ,##__VA_ARGS__)
783
784#define kenter(FMT,...) dbgprintk("==> %s("FMT")",__func__ ,##__VA_ARGS__)
785#define kleave(FMT,...) dbgprintk("<== %s()"FMT"",__func__ ,##__VA_ARGS__)
786#define kdebug(FMT,...) dbgprintk(" "FMT ,##__VA_ARGS__)

--- 123 unchanged lines hidden ---