Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 27922b4260f65d317aabda37e42bbbff > files > 1910

kernel-2.6.18-238.el5.src.rpm

From: Larry Woodman <lwoodman@redhat.com>
Date: Wed, 17 Nov 2010 15:56:53 -0500
Subject: [misc] fix dirty_bytes sysctl name
Message-id: <1290009413.17109.6.camel@dhcp-100-19-198.bos.redhat.com>
Patchwork-id: 29467
O-Subject: Re: [RHEL5 Patch] Backport dirty_background_bytes and dirty_bytes
	sysctls to RHEL 5
Bugzilla: 635782

On Thu, 2010-11-18 at 02:26 +1100, Harshula Jayasuriya wrote:
> On Tue, 2010-09-21 at 12:55 -0400, Larry Woodman wrote:
> > --- linux-2.6.18.noarch/kernel/sysctl.c.orig    2010-09-20
> > 14:38:37.000000000 -0400
> > +++ linux-2.6.18.noarch/kernel/sysctl.c 2010-09-20 14:34:12.000000000
> > -0400
>
> > @@ -1253,6 +1255,26 @@ static ctl_table vm_table[] = {
> >                 .strategy       = &sysctl_intvec,
> >                 .extra1         = &zero,
> >         },
> > +       {
> > +               .ctl_name       = VM_DIRTY_BYTES,
> > +               .procname       = "vm_dirty_bytes",
>                                     ^^^
> Shouldn't that be "dirty_bytes"? The expected path
> is: /proc/sys/vm/dirty_bytes

Probably, although this is just the name string of the file in /proc.

Attached is a patch that corrects it so it matches RHEL6 and upstream:

Signed-off-by: Jarod Wilson <jarod@redhat.com>

diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 8579372..aa68a76 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1257,7 +1257,7 @@ static ctl_table vm_table[] = {
 	},
 	{
 		.ctl_name	= VM_DIRTY_BYTES,
-		.procname	= "vm_dirty_bytes",
+		.procname	= "dirty_bytes",
 		.data		= &vm_dirty_bytes,
 		.maxlen		= sizeof(vm_dirty_bytes),
 		.mode		= 0644,