[PATCH 3/4] Initial implementation for ubihealthd.

Sascha Hauer s.hauer at pengutronix.de
Thu Apr 14 23:38:45 PDT 2016


On Fri, Nov 06, 2015 at 12:00:02AM +0100, Richard Weinberger wrote:

> +
> +	int shutdown = 0;
> +	int stats_timer = create_and_arm_timer(60);
> +	if (stats_timer < 0) {
> +		log_fatal("Could not create stats timer, aborting");
> +		_exit(1);
> +	}
> +	int read_peb_timer = create_and_arm_timer(read_completion / num_pebs);
> +	if (read_peb_timer < 0) {
> +		log_fatal("Could not create read timer, aborting");
> +		_exit(1);
> +	}
> +	int scrub_peb_timer = create_and_arm_timer(scrub_completion / num_pebs);
> +	if (scrub_peb_timer < 0) {
> +		log_fatal("Could not create scrubbing timer, aborting");
> +		_exit(1);
> +	}

I tried to configure a "do as fast as you can" and realized that when
read_/scrub_completion is configured lower than the number of pebs and
create_and_arm_timer is called with 0 as argument then the program no
longer works. This should probably be catched.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the linux-mtd mailing list