Re: [RFC][PATCH 2/2] efi_pstore: add a sequence counter to a variable name

From: Mike Waychison
Date: Thu Oct 18 2012 - 19:47:56 EST


On Fri, Oct 5, 2012 at 12:02 PM, Seiji Aguchi <seiji.aguchi@xxxxxxx> wrote:
> [Problem]
>
> Currently, a variable name, which distinguishes each entry, consists of type, id and ctime.
> But if multiple events happens in a short time, a second/third event may fail to log because
> efi_pstore can't distinguish each event with current variable name.
>
> [Solution]
>
> A reasonable way to identify all events precisely is introducing a sequence counter to
> the variable name.
>
> [Patch Description]
>
> The sequence counter has already supported in a pstore layer with "oopscount".
> So, this patch adds it to a variable name.
> Also, it is passed to read/erase callbacks of platform drivers in accordance with
> the modification of the variable name.
>
> <before applying this patch>
> a variable name of first event: dump-type0-1-12345678
> a variable name of second event: dump-type0-1-12345678
>
> type:0
> id:1
> ctime:12345678
>
> If multiple events happen in a short time, efi_pstore can't distinguish them because
> variable names are same among them.
>
> <after applying this patch>
>
> it can be distinguishable by adding a sequence counter as follows.
>
> a variable name of first event: dump-type0-1-1-12345678
> a variable name of Second event: dump-type0-1-2-12345678
>
> type:0
> id:1
> sequence counter: 1(first event), 2(second event)
> ctime:12345678

This patch plumbs the count through the same way as you plumbed the
ctime through in patch 1/2, so I'm going to hold off on commenting on
this patch until we better understand i_ctime use is resolved there.
I suspect that we don't want to continue adding more arguments through
pstore ops this way.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/