Skip to contentSkip to conversation

nr_free_files ?

PATCH In review FabF 3 participants 4 messages Jun 8, 2004 – Jun 12, 2004

Subsystems (2)
lore
Share & tools
lore

FabF

author
#0 lore raw

PATCH 1/1 nr_free_files ?

Andrew,

Here's a patch removing nr_free_files.This one is unused in the whole
tree + file-nr was tri-int exposed in /proc.This patch gives file-nr simple integer as file-max.Could you apply if this doesn't break historical features ?

Regards,
FabF

include/linux/fs.h +0 -1
diff -Naur orig/include/linux/fs.h edited/include/linux/fs.h
@@ -49,7 +49,6 @@
 /* And dynamically-tunable limits and defaults: */
 struct files_stat_struct {
 	int nr_files;		/* read only */
-	int nr_free_files;	/* read only */
 	int max_files;		/* tunable */
 };
 extern struct files_stat_struct files_stat;
kernel/sysctl.c +2 -2
diff -Naur orig/kernel/sysctl.c edited/kernel/sysctl.c
@@ -822,8 +822,8 @@
 	{
 		.ctl_name	= FS_NRFILE,
 		.procname	= "file-nr",
-		.data		= &files_stat,
-		.maxlen		= 3*sizeof(int),
+		.data		= &files_stat.nr_files,
+		.maxlen		= sizeof(int),
 		.mode		= 0444,
 		.proc_handler	= &proc_dointvec,
 	},
#1 lore raw
Quoted 2 lines · FabF

Here's a patch removing nr_free_files.

It changes the format of /proc/sys/fs/file-nr.

#2 lore raw
Quoted 1 line · Andrew Morton

It changes the format of /proc/sys/fs/file-nr.

For 2.7.x is think that's fine but clearly for 2.6.x it's not. Are we starting to queue stuff for 2.7.x yet? :)

--cw

author
#3 lore raw
Quoted 6 lines · Chris Wedgwood
Quoted 1 line · Andrew Morton

It changes the format of /proc/sys/fs/file-nr.

For 2.7.x is think that's fine but clearly for 2.6.x it's not. Are we starting to queue stuff for 2.7.x yet? :)

Who _can_ do that ?

FabF

Quoted 4 lines

--cw