Pengetahuan Kernel (16) – Struktur Data Linux (16) – request

Struktur Data request digunakan untuk membuat request ke perangkat blok pada sistem. Requestnya selalu merupakan pembacaan atau penulisan blok data ke atau dari cache buffer.

[sourcecode language=”cpp”]
struct request {
volatile int rq_status;
#define RQ_INACTIVE (-1)
#define RQ_ACTIVE 1
#define RQ_SCSI_BUSY 0xffff
#define RQ_SCSI_DONE 0xfffe
#define RQ_SCSI_DISCONNECTING 0xffe0
kdev_t rq_dev;
int cmd; /* READ or WRITE */
int errors;
unsigned long sector;
unsigned long nr_sectors;
unsigned long current_nr_sectors;
char * buffer;
struct semaphore * sem;
struct buffer_head * bh;
struct buffer_head * bhtail;
struct request * next;
};
[/sourcecode]
Sumber : tldp.org

Be the first to comment

Leave a Reply

Your email address will not be published.


*