On Mon, 28 Sep 2015 07:02:42 +0000
Bean Huo 霍斌斌 (beanhuo) <[email protected]> wrote:

> Add metadata struct for UBI bakvol.
> Currently , bakvol reserves 20 PEBs for internal log volume.
> Shares wear-leveling operation with ubi. 
> 
> 
> Signed-off-by: Bean Huo <[email protected]>
> ---
>  drivers/mtd/ubi/ubi-media.h | 40 ++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 40 insertions(+)
> 

[...]

>  
> @@ -325,6 +339,32 @@ struct ubi_vid_hdr {
>  #define UBI_VTBL_RECORD_SIZE_CRC (UBI_VTBL_RECORD_SIZE - sizeof(__be32))
>  
>  /**
> + * struct ubi_bkblk_info - the information for one backup block .
> + * @pbn: physical block number
> + * @lbn:  logic block number
> + * @plane: this block belongs to which plane
> + * @pgnum: the page number (lower page) that can be programmed last time
> + */

I'm not sure to understand what those fields are used for, but I guess
I'll understand it while reviewing the following patches.

> +struct ubi_bkblk_info {
> +     __be32  pbn;
> +     __be32  lbn;
> +     __u8    plane;
> +     __be32  pgnum;
> +     struct  list_head node;
> +};

You're mixing runtime and storage representation: node has nothing to
do here.

> +
> +/**
> + * struct ubi_bkblk_tbl - a table for backup blocks.
> + * @volume_built: indicate if backup volume be initted
> + * @bcount_of_plane:  block count that has bee applied for corresponding 
> plane
> + */
> +struct ubi_bkblk_tbl {
> +     __u8    volume_built;
> +     __be32  bcount_of_plane[2];
> +     struct  list_head head;
> +};

Ditto.



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to