#ifndef BLOCKDEV_H #define BLOCKDEV_H #include #include #include #include #include #include #include #include #include #include #include #include #include /* User Source Files */ #include "cache.h" #define ANEMONE_CLIENT_MINORS 1 #define AC_PAGING_OVER_NET 1 #define AC_HALT_QUEUE 2 #define AC_PAGING_OVER_NET_WRITE 3 #define AC_PAGING_OVER_NET_READ 4 #define SIZE 100000 #define ANEMONE_LOG_BUFF_SIZE 1024 extern ulong nsectors; module_param(nsectors, ulong, 0000); MODULE_PARM_DESC(nsectors, "Default: 100000 pages. Size of the device in units of 4k pages"); /* Structure used by the block device and passed around the upper block * device layer */ struct anemone_client { ulong size; /* Device size in sectors */ short users; /* Device user count */ spinlock_t lock; /* For mutual exclusion */ struct request_queue *queue; /* device request queue */ struct gendisk *gd; /* The Gendisk Structure */ struct list_head lh; /* This will be used to hold pending requests */ struct cache cache; /* The anemone device's cache */ char trace_buffer[ANEMONE_LOG_BUFF_SIZE]; struct file * trace_file; }; #endif