/* Copyright (c) 2013 Coraid, Inc. See COPYING for GPL terms. */ #include <linux/blk-mq.h>
#define VERSION "85" #define AOE_MAJOR 152 #define DEVICE_NAME "aoe"
/* set AOE_PARTITIONS to 1 to use whole-disks only * default is 16, which is 15 partitions plus the whole disk
*/ #ifndef AOE_PARTITIONS #define AOE_PARTITIONS (16) #endif
enum {
DEVFL_UP = 1, /* device is installed in system and ready for AoE->ATA commands */
DEVFL_TKILL = (1<<1), /* flag for timer to know when to kill self */
DEVFL_EXT = (1<<2), /* device accepts lba48 commands */
DEVFL_GDALLOC = (1<<3), /* need to alloc gendisk */
DEVFL_GD_NOW = (1<<4), /* allocating gendisk */
DEVFL_KICKME = (1<<5), /* slow polling network card catch */
DEVFL_NEWSIZE = (1<<6), /* need to update dev size in block layer */
DEVFL_FREEING = (1<<7), /* set when device is being cleaned up */
DEVFL_FREED = (1<<8), /* device has been cleaned up */
DEVFL_DEAD = (1<<9), /* device has timed out of aoe_deadsecs */
};
struct aoetgt { unsignedchar addr[6];
ushort nframes; /* cap on frames to use */ struct aoedev *d; /* parent device I belong to */ struct list_head ffree; /* list of free frames */ struct aoeif ifs[NAOEIFS]; struct aoeif *ifp; /* current aoeif in use */
ushort nout; /* number of AoE commands outstanding */
ushort maxout; /* current value for max outstanding */
ushort next_cwnd; /* incr maxout after decrementing to zero */
ushort ssthresh; /* slow start threshold */
ulong falloc; /* number of allocated frames */ int taint; /* how much we want to avoid this aoetgt */ int minbcnt; int wpkts, rpkts; char nout_probes;
};
struct aoedev { struct aoedev *next;
ulong sysminor;
ulong aoemajor;
u32 rttavg; /* scaled AoE round trip time average */
u32 rttdev; /* scaled round trip time mean deviation */
u16 aoeminor;
u16 flags;
u16 nopen; /* (bd_openers isn't available without sleeping) */
u16 fw_ver; /* version of blade's firmware */
u16 lasttag; /* last tag sent */
u16 useme;
ulong ref; struct work_struct work;/* disk create work struct */ struct gendisk *gd; struct dentry *debugfs; struct request_queue *blkq; struct list_head rq_list; struct blk_mq_tag_set tag_set; struct hd_geometry geo;
sector_t ssize; struct timer_list timer;
spinlock_t lock; struct sk_buff_head skbpool;
mempool_t *bufpool; /* for deadlock-free Buf allocation */ struct { /* pointers to work in progress */ struct buf *buf; struct bio *nxbio; struct request *rq;
} ip;
ulong maxbcnt; struct list_head factive[NFACTIVE]; /* hash of active frames */ struct list_head rexmitq; /* deferred retransmissions */ struct aoetgt **targets;
ulong ntargets; /* number of allocated aoetgt pointers */ struct aoetgt **tgt; /* target in use when working */
ulong kicked; char ident[512];
};
/* kthread tracking */ struct ktstate { struct completion rendez; struct task_struct *task;
wait_queue_head_t *waitq; int (*fn) (int); char name[12];
spinlock_t *lock; int id; int active;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.