[LEDE-DEV] [PATCH 1/2] [ubox] syslog: use realloc to change log buffer size

John Crispin john at phrozen.org
Wed May 18 23:13:06 PDT 2016



On 18/05/2016 16:08, Conor O'Gorman wrote:
> On 18/05/16 15:03, Dan Bugnar wrote:
>> For the larger size it takes the distance from the old log and newest
>> and added to _log to have the new newest, same for the oldest. It
>> doesn't matter if the newest > oldest OR oldest > newest.
> If the oldest > newest, there will be a blank area, the new space. How
> will this be handled during log printing?
> 
>> And if the size is smaller than we will have a fresh new smaller
>> buffer with the newest and oldest pointing to _log(start).
>>
>> If it is possible that a message is added to the old log after the
>> realloc call is done and the log doesn't point to the new buffer, we
>> will loose that message.
> For both of these situations, it is possible to lose messages. I thought
> the intention was not to lose messages?
> 
> Conor
> 

i see it the same way. please check the code and make sure it covers all
cases. 2/2 looks good but i just marked the series as "Changes requested"

please explain in V3 how you addressed the issue of reallocating the buffer.

	John

> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev



More information about the Lede-dev mailing list