Comment and function argument names are mismatched in bugmgr.c.

Started by Masahiko Sawadaalmost 10 years ago4 messageshackers
Jump to latest
#1Masahiko Sawada
sawada.mshk@gmail.com

Hi all,

By commit 428b1d6b, function WritebackContextInit is added but the
comment of this function seems to be incorrect.
*max_coalesce variable doesn't exist at anywhere.
Also, I think it should be fixed that the argument name of this
function does not match function declare in buf_internal.h.
Patch for that attached.

bufmgr.c:L4160
/*
* Initialize a writeback context, discarding potential previous state.
*
* *max_coalesce is a pointer to a variable containing the current maximum
* number of writeback requests that will be coalesced into a bigger one. A
* value <= 0 means that no writeback control will be performed. max_pending
* is a pointer instead of an immediate value, so the coalesce limits can
* easily changed by the GUC mechanism, and so calling code does not have to
* check the current configuration.
*/
void
WritebackContextInit(WritebackContext *context, int *max_pending)
{
Assert(*max_pending <= WRITEBACK_MAX_PENDING_FLUSHES);

context->max_pending = max_pending;
context->nr_pending = 0;
}

buf_internal.h:L303
/*
* Internal routines: only called by bufmgr
* Internal buffer management routines
*/
/* bufmgr.c */
extern void WritebackContextInit(WritebackContext *context, int *max_coalesce);

Regards,

--
Masahiko Sawada

Attachments:

fix_comment_in_bufmgr.patchtext/x-diff; charset=US-ASCII; name=fix_comment_in_bufmgr.patchDownload+5-7
#2Robert Haas
robertmhaas@gmail.com
In reply to: Masahiko Sawada (#1)
Re: Comment and function argument names are mismatched in bugmgr.c.

On Thu, Jun 23, 2016 at 3:24 AM, Masahiko Sawada <sawada.mshk@gmail.com> wrote:

By commit 428b1d6b, function WritebackContextInit is added but the
comment of this function seems to be incorrect.
*max_coalesce variable doesn't exist at anywhere.
Also, I think it should be fixed that the argument name of this
function does not match function declare in buf_internal.h.
Patch for that attached.

Andres, this looks like one for you to handle.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Andres Freund
andres@anarazel.de
In reply to: Masahiko Sawada (#1)
Re: Comment and function argument names are mismatched in bugmgr.c.

Hi,

On 2016-06-23 16:24:12 +0900, Masahiko Sawada wrote:

By commit 428b1d6b, function WritebackContextInit is added but the
comment of this function seems to be incorrect.
*max_coalesce variable doesn't exist at anywhere.
Also, I think it should be fixed that the argument name of this
function does not match function declare in buf_internal.h.
Patch for that attached.

Fix looks good to me, and your 'bugmgr.c' typo in $subject made me laugh
;). Pushed.

Thanks Robert, for pointing me to the thread, I had indeed missed it.

Greetings,

Andres Freund

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#4Masahiko Sawada
sawada.mshk@gmail.com
In reply to: Andres Freund (#3)
Re: Comment and function argument names are mismatched in bugmgr.c.

On Sat, Jul 2, 2016 at 6:34 AM, Andres Freund <andres@anarazel.de> wrote:

Hi,

On 2016-06-23 16:24:12 +0900, Masahiko Sawada wrote:

By commit 428b1d6b, function WritebackContextInit is added but the
comment of this function seems to be incorrect.
*max_coalesce variable doesn't exist at anywhere.
Also, I think it should be fixed that the argument name of this
function does not match function declare in buf_internal.h.
Patch for that attached.

Fix looks good to me, and your 'bugmgr.c' typo in $subject made me laugh
;). Pushed.

Oops, I realized it now :)
Thanks!

Regards,

--
Masahiko Sawada

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers