Linux Kernel
3.7.1
|
#include <client.h>
Data Fields | |
int | status |
int | t_err |
wait_queue_head_t * | wq |
struct p9_fcall * | tc |
struct p9_fcall * | rc |
void * | aux |
struct list_head | req_list |
struct p9_req_t - request slots : status of this request slot : transport error : tag of request being flushed (for flush requests) : wait_queue for the client to block on for this request : the request fcall structure : the response fcall structure : transport specific data (provided for trans_fd migration) : link for higher level objects to chain requests
Transport use an array to track outstanding requests instead of a list. While this may incurr overhead during initial allocation or expansion, it makes request lookup much easier as the tag id is a index into an array. (We use tag+1 so that we can accommodate the -1 tag for the T_VERSION request). This also has the nice effect of only having to allocate wait_queues once, instead of constantly allocating and freeing them. Its possible other resources could benefit from this scheme as well.