Lines Matching defs:mode
24 * A mode can be one-shot or recurrent with the recurrence being
26 * The bottom 5 bits of the "layout" indicate the mode. The
85 static int check_mode(struct faulty_conf *conf, int mode)
87 if (conf->period[mode] == 0 &&
88 atomic_read(&conf->counters[mode]) <= 0)
92 if (atomic_dec_and_test(&conf->counters[mode])) {
93 if (conf->period[mode])
94 atomic_set(&conf->counters[mode], conf->period[mode]);
124 static void add_sector(struct faulty_conf *conf, sector_t start, int mode)
130 switch(mode) {
131 case NoPersist: conf->modes[i] = mode; return;
159 conf->modes[n] = mode;
258 int mode = mddev->new_layout & ModeMask;
266 if (mode == ClearFaults)
268 else if (mode == ClearErrors) {
274 } else if (mode < Modes) {
275 conf->period[mode] = count;
277 atomic_set(&conf->counters[mode], count);