Add u_int nstart, nend counters to consumer and providers so we will not
have to examine the stats structure to tell if we have outstanding I/O requests. Making them u_int improves the chance of atomic updates to them, but risks roll-over. Since the only interesting property is if they are equal or not, this is not an issue.
This commit is contained in:
parent
aade76cf59
commit
3bea2a0b26
@ -152,6 +152,7 @@ struct g_consumer {
|
||||
struct g_event *event;
|
||||
int spoiled;
|
||||
struct g_stat *stat;
|
||||
u_int nstart, nend;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -173,6 +174,7 @@ struct g_provider {
|
||||
u_int stripesize;
|
||||
u_int stripeoffset;
|
||||
struct g_stat *stat;
|
||||
u_int nstart, nend;
|
||||
u_int flags;
|
||||
#define G_PF_CANDELETE 0x1
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user