[PATCH 4/4] UBI WL-Subsys: Improvement in prot tree
Artem Bityutskiy
dedekind at infradead.org
Tue Dec 9 08:03:23 EST 2008
On Tue, 2008-12-09 at 19:46 +0800, xiaochuan-xu wrote:
> >From e3af46580d374fc5da79212c17ef9f0179299bd0 Mon Sep 17 00:00:00 2001
> From: Xiaochuan-Xu <xiaochuan-xu at cqu.edu.cn>
> Date: Tue, 9 Dec 2008 19:27:40 +0800
> Subject: [PATCH] Adjust severial macros
>
> In order to fulfill the identical function of the currenty
> prot RB-tree. *_PROTECTION macros are increased respectively
>
> Signed-off-by: Xiaochuan-Xu <xiaochuan-xu at cqu.edu.cn>
> ---
> drivers/mtd/ubi/wl.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
> index 0b1e8c7..603435f 100644
> --- a/drivers/mtd/ubi/wl.c
> +++ b/drivers/mtd/ubi/wl.c
> @@ -130,9 +130,9 @@
> * How many erase cycles are short term, unknown, and long term physical
> * eraseblocks protected.
> */
> -#define ST_PROTECTION 16
> -#define U_PROTECTION 10
> -#define LT_PROTECTION 4
> +#define ST_PROTECTION 17
> +#define U_PROTECTION 11
> +#define LT_PROTECTION 5
I doubt these constants make much sense. I would suggest you to get rid
of them and simplify things. Let's have only one constant instead of 3.
This will allow us to implement efficient protection queue which you
will not need to walk at all.
So I'd suggest you to send a separate "preparation" patch which
introduces one constant instead of 3. E.g.,
#define PROTECTION 10
It may be re-named to PROT_LIST_LEN later, probably.
How does this plan sound to you?
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
More information about the linux-mtd
mailing list