All of lore.kernel.org
 help / color / mirror / Atom feed
* consting operations
@ 2003-07-11 22:19 Matthew Wilcox
  2003-07-11 22:30 ` Andrew Morton
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Matthew Wilcox @ 2003-07-11 22:19 UTC (permalink / raw)
  To: linux-fsdevel


I was having an argument with Jeff Garzik about a completely unrelated
part of the kernel.  He wants to have an setup routine that initialises
various members of an ->*_ops vector to some default methods.  I wanted
to retaliate with "But that will be in read-only storage, so you can't
do that", but I realised that wasn't the case.

Which got me to wondering why our filesystem ops vectors aren't in
read-only storage.  As a test, I did ext2 and moved 764 bytes from .data
to .text -- not too significant, but not bad either (4 bytes disappeared
somewhere.  let's call it a rounding error).

Of course, just converting ext2 yields all kinds of warnings from the
compiler about discarding qualifiers.  We need to change linux/fs.h to
make all those things const .... and that splatters out to about 20 places
we need to let gcc know that yes, this local pointer really is const.

Worth it?  dunno.  Opinions?

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-07-14  6:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-11 22:19 consting operations Matthew Wilcox
2003-07-11 22:30 ` Andrew Morton
2003-07-12  3:02   ` Matthew Wilcox
2003-07-11 22:47 ` Herbert Pötzl
2003-07-11 23:16   ` Trond Myklebust
2003-07-12 12:21     ` Herbert Pötzl
2003-07-14  7:08 ` David Woodhouse

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.