This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RESEND][BZ #15132][PATCH] avoid stat/fstat in statvfs/fstatvfs


On Sat, Jan 25, 2014 at 10:00:01PM +0000, Eric Wong wrote:
> Hello, my copyright assignments should be in order:
> https://sourceware.org/bugzilla/show_bug.cgi?id=15132

Thanks for pursuing this.  I don't have access to copyrights.list, so
someone who does will have to verify.

> -------------------------------------------------------------------
> From: Eric Wong <normalperson@yhbt.net>
> Date: Sat, 25 Jan 2014 21:35:55 +0000
> Subject: [PATCH] avoid stat/fstat in statvfs/fstatvfs
> 
> Delay the use of stat/fstat until stat data is required.
> When the kernel returns ST_VALID, stat data is not used
> by __internal_statvfs.

Please also describe how and on which architectures you tested the
changes - the testsuite should be run (preferrably with make xcheck)
to ensure that there are no regressions.  Also, there are multiple
configurations to test for this case, i.e. verify that there are no
regressions in kernel < 2.6.36, kernel > 2.6.36 with default
configuration and on kernel > 2.6.36 with the sources configured with
--enable-kernel=X.Y.Z where X.Y.Z > 2.6.36.

> 
> 2014-01-25  Eric Wong  <normalperson@yhbt.net>
> 

The bugzilla number goes here:

	[BZ #15132]
> 	* sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags):
> 	Call fstat64 or stat64 internally, depending on arguments passed.
> 	Replace stat buffer argument with file descriptor argument.
> 	(INTERNAL_STATVFS): Update arguments to match __statvfs_getflags.
> 	* sysdeps/unix/sysv/linux/fstatvfs.c (fstatvfs):
> 	Pass fd to __internal_statvfs instead of calling fstat64.
> 	* sysdeps/unix/sysv/linux/fstatvfs64.c (__fstatvfs64):
> 	Pass fd to __internal_statvfs64 instead of calling fstat64.
> 	* sysdeps/unix/sysv/linux/statvfs.c (statvfs):
> 	Pass -1 to __internal_statvfs instead of calling stat64.
> 	* sysdeps/unix/sysv/linux/statvfs64.c (__statvfs64):
> 	Pass -1 to __internal_statvfs64 instead of calling stat64.

The patch otherwise looks OK to me.  I'll commit it once another
maintainer verifies the copyright assignment and you describe how you
have tested the changes.

Thanks,
Siddhesh


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]