Lines Matching refs:barrier

568 	 * barrier unit which start_sector belongs to.
942 * To do this we raise a 'barrier'.
943 * The 'barrier' is a counter that can be raised multiple times
946 * We can only raise the barrier if there is no pending IO.
948 * We choose only to raise the barrier if no-one is waiting for the
949 * barrier to go down. This means that as soon as an IO request
950 * is ready, no other operations which require a barrier will start
975 atomic_inc(&conf->barrier[idx]);
977 * In raise_barrier() we firstly increase conf->barrier[idx] then
979 * increase conf->nr_pending[idx] then check conf->barrier[idx].
980 * A memory barrier here to make sure conf->nr_pending[idx] won't
981 * be fetched before conf->barrier[idx] is increased. Otherwise
989 * existing in corresponding I/O barrier bucket.
990 * C: while conf->barrier[idx] >= RESYNC_DEPTH, meaning reaches
991 * max resync count which allowed on current I/O barrier bucket.
996 atomic_read(&conf->barrier[idx]) < RESYNC_DEPTH) ||
1001 atomic_dec(&conf->barrier[idx]);
1017 BUG_ON(atomic_read(&conf->barrier[idx]) <= 0);
1019 atomic_dec(&conf->barrier[idx]);
1032 * conf->resync_lock when there is no barrier raised in same
1033 * barrier unit bucket. Also if the array is frozen, I/O
1039 * check conf->barrier[idx]. In raise_barrier() we firstly increase
1040 * conf->barrier[idx], then check conf->nr_pending[idx]. A memory
1041 * barrier is necessary here to make sure conf->barrier[idx] won't be
1049 * here. If during we check conf->barrier[idx], the array is
1050 * frozen (conf->array_frozen is 1), and chonf->barrier[idx] is
1057 !atomic_read(&conf->barrier[idx]))
1062 * should be decreased before waiting for barrier to drop.
1075 /* Wait for the barrier in same barrier unit bucket to drop. */
1083 !atomic_read(&conf->barrier[idx]),
1103 * conf->barrier[idx] here, memory barrier is unnecessary as well.
1183 * barrier bucket index which this I/O request hits. When all sync and
1339 * Still need barrier for READ in case that whole
2755 * This is achieved by tracking pending requests and a 'barrier' concept
2854 /* make sure good_sectors won't go across barrier unit boundary */
3091 conf->barrier = kcalloc(BARRIER_BUCKETS_NR,
3093 if (!conf->barrier)
3190 kfree(conf->barrier);
3302 kfree(conf->barrier);
3343 * Then raise a device barrier and wait until all IO stops.