Hi List,

This is the nbd device structure

struct nbd_device {
        int flags;
        int harderror;          /* Code of hard error                   */
        struct socket * sock;
        struct file * file;     /* If == NULL, device is not ready, yet */
        int magic;

        spinlock_t queue_lock;
        struct list_head queue_head;    /* Requests waiting result */
        struct request *active_req;
        wait_queue_head_t active_wq;
        struct list_head waiting_queue; /* Requests to be sent */
        wait_queue_head_t waiting_wq;

        struct mutex tx_lock;
        struct gendisk *disk;
        int blksize;
        u64 bytesize;
        pid_t pid; /* pid of nbd-client, if attached */
        int xmit_timeout;
};

Can anyone tell me the exact meaning of each filed in this structure?
Especially for the fileds of following ones.
...
       spinlock_t queue_lock;
        struct list_head queue_head;    /* Requests waiting result */
        struct request *active_req;
        wait_queue_head_t active_wq;
        struct list_head waiting_queue; /* Requests to be sent */
        wait_queue_head_t waiting_wq;
...

What are their interactions with each other? What do they act in nbd module?




-- 
Thanks
Harry Wei

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Nbd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nbd-general

Reply via email to