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

Eric Wong normalperson@yhbt.net
Sat Feb 22 06:39:00 GMT 2014


Ondřej Bílka <neleai@seznam.cz> wrote:
> > Sorry for the delay.  I've only tested on 3.12+ so far on x86_64.
> > I'll try to get a VM setup on <2.6.36 soon
> 
> Did you test also with these kernels?

Unfortunately the machine running 2.6.32.x CentOS 6.x kernel
already had Linux commit 365b18189789bfa1acd9939e6312b8a4b4577b28
(add f_flags to struct statfs(64)) backported to it :<

Probably just be easier for me to test with the following kernel patch
than to get an older kernel running:

--- a/fs/statfs.c
+++ b/fs/statfs.c
@@ -42,7 +42,7 @@ static int flags_by_sb(int s_flags)
 
 static int calculate_f_flags(struct vfsmount *mnt)
 {
-	return ST_VALID | flags_by_mnt(mnt->mnt_flags) |
+	return flags_by_mnt(mnt->mnt_flags) |
 		flags_by_sb(mnt->mnt_sb->s_flags);
 }
 



More information about the Libc-alpha mailing list