Lines Matching refs:mode
94 static int check_mode(struct faulty_conf *conf, int mode) in check_mode() argument
96 if (conf->period[mode] == 0 && in check_mode()
97 atomic_read(&conf->counters[mode]) <= 0) in check_mode()
101 if (atomic_dec_and_test(&conf->counters[mode])) { in check_mode()
102 if (conf->period[mode]) in check_mode()
103 atomic_set(&conf->counters[mode], conf->period[mode]); in check_mode()
133 static void add_sector(struct faulty_conf *conf, sector_t start, int mode) in add_sector() argument
139 switch(mode) { in add_sector()
140 case NoPersist: conf->modes[i] = mode; return; in add_sector()
168 conf->modes[n] = mode; in add_sector()
264 int mode = mddev->new_layout & ModeMask; in reshape() local
272 if (mode == ClearFaults) in reshape()
274 else if (mode == ClearErrors) { in reshape()
280 } else if (mode < Modes) { in reshape()
281 conf->period[mode] = count; in reshape()
283 atomic_set(&conf->counters[mode], count); in reshape()