diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-02-11 11:01:26 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-02-11 11:01:26 +0000 |
commit | 81e9eba33ac459f8f46d05de515dc2d41e5da419 (patch) | |
tree | 53af8c909fde6c1dd1828c0cf580322f79d1119c /sys/geom/geom_io.c | |
parent | 9358a8009ae0deea867261d21f0da64c69eba1c7 (diff) | |
download | src-81e9eba33ac459f8f46d05de515dc2d41e5da419.tar.gz src-81e9eba33ac459f8f46d05de515dc2d41e5da419.zip |
Turn the "updating" flag (back) into two sequence number fields at
either ends of the structure so we have a way to determine if a
snapshot is consistent.
Notes
Notes:
svn path=/head/; revision=110685
Diffstat (limited to 'sys/geom/geom_io.c')
-rw-r--r-- | sys/geom/geom_io.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c index 1912587970d1..f334817e29fa 100644 --- a/sys/geom/geom_io.c +++ b/sys/geom/geom_io.c @@ -327,8 +327,8 @@ g_io_deliver(struct bio *bp, int error) } binuptime(&t1); /* Raise the "inconsistent" flag for userland */ - atomic_set_acq_int(&cp->stat->updating, 1); - atomic_set_acq_int(&pp->stat->updating, 1); + atomic_add_acq_int(&cp->stat->seq0, 1); + atomic_add_acq_int(&pp->stat->seq0, 1); if (idx >= 0) { /* Account the service time */ dt = t1; @@ -360,8 +360,8 @@ g_io_deliver(struct bio *bp, int error) bintime_add(&pp->stat->bt, &dt); pp->stat->wentbusy = t1; /* Mark the structures as consistent again */ - atomic_store_rel_int(&cp->stat->updating, 0); - atomic_store_rel_int(&pp->stat->updating, 0); + atomic_add_acq_int(&cp->stat->seq1, 1); + atomic_add_acq_int(&pp->stat->seq1, 1); } cp->stat->nend++; pp->stat->nend++; |