2010-06-14 14:27:40 +00:00
|
|
|
// (c) 2010 Thomas Schoebel-Theuer / 1&1 Internet AG
|
2010-06-20 18:55:34 +00:00
|
|
|
#ifndef MARS_IF_DEVICE_H
|
|
|
|
#define MARS_IF_DEVICE_H
|
|
|
|
|
2010-12-10 17:40:20 +00:00
|
|
|
#include <linux/semaphore.h>
|
|
|
|
|
2010-07-05 15:56:58 +00:00
|
|
|
#define HT_SHIFT 6 //????
|
|
|
|
#define MARS_MAX_SEGMENT_SIZE (1U << (9+HT_SHIFT))
|
|
|
|
|
2010-12-10 17:40:20 +00:00
|
|
|
#define MAX_BIO 8
|
|
|
|
|
2010-12-15 12:13:18 +00:00
|
|
|
struct if_device_mref_aspect {
|
|
|
|
GENERIC_ASPECT(mref);
|
2010-12-10 17:40:20 +00:00
|
|
|
//struct list_head tmp_head;
|
|
|
|
struct list_head plug_head;
|
|
|
|
int maxlen;
|
|
|
|
int bio_count;
|
|
|
|
#if 1
|
|
|
|
int xxx;
|
|
|
|
int yyy;
|
|
|
|
#endif
|
|
|
|
struct page *orig_page;
|
|
|
|
struct bio *orig_bio[MAX_BIO];
|
2010-08-08 14:02:54 +00:00
|
|
|
struct generic_callback cb;
|
2010-11-26 13:45:10 +00:00
|
|
|
struct if_device_input *input;
|
2010-07-23 11:55:18 +00:00
|
|
|
};
|
|
|
|
|
2010-06-14 14:27:40 +00:00
|
|
|
struct if_device_input {
|
|
|
|
MARS_INPUT(if_device);
|
2010-12-10 17:40:20 +00:00
|
|
|
struct list_head plug_anchor;
|
2010-06-14 14:27:40 +00:00
|
|
|
struct request_queue *q;
|
|
|
|
struct gendisk *disk;
|
|
|
|
struct block_device *bdev;
|
2010-06-18 11:44:14 +00:00
|
|
|
spinlock_t req_lock;
|
2010-12-10 17:40:20 +00:00
|
|
|
struct semaphore kick_sem;
|
2010-08-05 15:54:48 +00:00
|
|
|
struct generic_object_layout mref_object_layout;
|
2010-06-14 14:27:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct if_device_output {
|
|
|
|
MARS_OUTPUT(if_device);
|
|
|
|
};
|
|
|
|
|
2010-08-10 17:39:30 +00:00
|
|
|
struct if_device_brick {
|
|
|
|
MARS_BRICK(if_device);
|
|
|
|
struct if_device_output hidden_output;
|
|
|
|
};
|
|
|
|
|
2010-06-14 14:27:40 +00:00
|
|
|
MARS_TYPES(if_device);
|
2010-06-20 18:55:34 +00:00
|
|
|
|
|
|
|
#endif
|