[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPXgP12wBzSoH-2PQeKxTbcDCKyjWdBVVz6scA7bpWxoSut7ew@mail.gmail.com>
Date: Tue, 29 May 2012 19:22:17 +0200
From: Kay Sievers <kay@...y.org>
To: "Luck, Tony" <tony.luck@...el.com>
Cc: Anton Vorontsov <anton.vorontsov@...aro.org>,
Greg Kroah-Hartmann <greg@...ah.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Ingo Molnar <mingo@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Kees Cook <keescook@...omium.org>,
Colin Cross <ccross@...roid.com>,
John Stultz <john.stultz@...aro.org>
Subject: Re: [PATCH RESEND 1/3] printk: convert byte-buffer to variable-length
record buffer
On Tue, May 29, 2012 at 7:11 PM, Luck, Tony <tony.luck@...el.com> wrote:
> +/*
> + * Fill the provided buffer with as many of the the *youngest* kmsg records
> + * that fit into it. Repeated calls will fill the buffer with the next block
> + * of older records, not including the former ones. A return value of FALSE
> + * indicate that all records are read, including the oldest one.
> + */
>
> I confess to not reading all of this ... but does this handle the pstore/OOPS
> case? We'll use this call to pull as many records as will fit in the pstore
> error record ... but almost certainly won't pull all of the console log, so
> we won't see the FALSE return.
The loop in pstore gets the newest messages first, then another chunk
of the older messages with every call; pstore stops to iterate when
the defined limit it wants to store is reached, or when no messages
are available anymore.
> The system keeps on running.
>
> Now another OOPS happens and pstore wants to grab the new "youngest" records,
> it doesn't want to continue stepping to older records from the place it got
> to on the first OOPS. Will that work?
A new oops will init the iterator again, so it will start at the end
with the new messages that happened in the meantime.
The iterator is only valid while used from dump(), it will return an
error if used outside of it.
The logic *should* work; at least it should be easy to make it work if
it doesn't. :)
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists