mars/mars_bio.h

56 lines
994 B
C
Raw Normal View History

2011-03-18 13:15:40 +00:00
// (c) 2010 Thomas Schoebel-Theuer / 1&1 Internet AG
#ifndef MARS_BIO_H
#define MARS_BIO_H
#include <linux/blkdev.h>
2011-03-29 14:40:40 +00:00
2011-03-18 13:15:40 +00:00
struct bio_mref_aspect {
GENERIC_ASPECT(mref);
struct list_head io_head;
struct bio *bio;
struct bio_output *output;
int status_code;
2011-03-29 14:40:40 +00:00
int hash_pos;
2011-06-30 13:15:52 +00:00
int alloc_len;
2011-03-31 16:16:00 +00:00
bool do_dealloc;
2011-03-18 13:15:40 +00:00
};
struct bio_brick {
MARS_BRICK(bio);
// tunables
int ra_pages;
2012-02-25 21:22:52 +00:00
int bg_threshold;
int bg_maxfly;
2011-05-06 10:25:52 +00:00
bool do_noidle;
bool do_sync;
bool do_unplug;
2011-03-18 13:15:40 +00:00
// readonly
loff_t total_size;
2012-02-25 21:22:52 +00:00
atomic_t fly_count[MARS_PRIO_NR];
2011-05-26 14:32:32 +00:00
atomic_t background_count;
2011-04-29 09:36:10 +00:00
atomic_t completed_count;
2012-02-25 21:22:52 +00:00
atomic_t total_completed_count[MARS_PRIO_NR];
2011-05-26 14:32:32 +00:00
atomic_t total_background_count;
2011-03-18 13:15:40 +00:00
// private
spinlock_t lock;
2011-05-26 14:32:32 +00:00
struct list_head background_list;
2011-03-18 13:15:40 +00:00
struct list_head completed_list;
wait_queue_head_t event;
struct file *filp;
struct block_device *bdev;
struct task_struct *thread;
int bvec_max;
};
struct bio_input {
MARS_INPUT(bio);
};
struct bio_output {
MARS_OUTPUT(bio);
};
MARS_TYPES(bio);
#endif