* 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* Re: consting operations
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-14 7:08 ` David Woodhouse
2 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2003-07-11 22:30 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: linux-fsdevel
Matthew Wilcox <willy@debian.org> wrote:
>
> Worth it? dunno. Opinions?
Someone doesn't have enough bugs to fix?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: consting operations
2003-07-11 22:30 ` Andrew Morton
@ 2003-07-12 3:02 ` Matthew Wilcox
0 siblings, 0 replies; 7+ messages in thread
From: Matthew Wilcox @ 2003-07-12 3:02 UTC (permalink / raw)
To: Andrew Morton; +Cc: Matthew Wilcox, linux-fsdevel
On Fri, Jul 11, 2003 at 03:30:54PM -0700, Andrew Morton wrote:
> Matthew Wilcox <willy@debian.org> wrote:
> >
> > Worth it? dunno. Opinions?
>
> Someone doesn't have enough bugs to fix?
Heh, it might prevent some bugs ... ISTR viro complaining about some dodgy
goings-on in intermezzo where the ops were treated as non-const ...
Anyway, you can take PCI Domains off the must-fix list; they're done.
--
"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
* Re: consting operations
2003-07-11 22:19 consting operations Matthew Wilcox
2003-07-11 22:30 ` Andrew Morton
@ 2003-07-11 22:47 ` Herbert Pötzl
2003-07-11 23:16 ` Trond Myklebust
2003-07-14 7:08 ` David Woodhouse
2 siblings, 1 reply; 7+ messages in thread
From: Herbert Pötzl @ 2003-07-11 22:47 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: linux-fsdevel
On Fri, Jul 11, 2003 at 11:19:01PM +0100, Matthew Wilcox wrote:
>
> 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?
why do you think that filesystem ops should be read only?
(or do you just mean for ext2/ext3/... ?)
best,
Herbert
> --
> "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
* Re: consting operations
2003-07-11 22:47 ` Herbert Pötzl
@ 2003-07-11 23:16 ` Trond Myklebust
2003-07-12 12:21 ` Herbert Pötzl
0 siblings, 1 reply; 7+ messages in thread
From: Trond Myklebust @ 2003-07-11 23:16 UTC (permalink / raw)
To: herbert; +Cc: linux-fsdevel
>>>>> " " == Herbert Pötzl <herbert@13thfloor.at> writes:
> why do you think that filesystem ops should be read only?
What possible reason could there be for making them overwritable?
Sounds like a recipe for disaster...
If you want to layer stuff on top of another filesystem, then surely
you can do that by methods that don't involve overwriting a globally
shared table.
Cheers,
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: consting operations
2003-07-11 23:16 ` Trond Myklebust
@ 2003-07-12 12:21 ` Herbert Pötzl
0 siblings, 0 replies; 7+ messages in thread
From: Herbert Pötzl @ 2003-07-12 12:21 UTC (permalink / raw)
To: Trond Myklebust; +Cc: linux-fsdevel
On Sat, Jul 12, 2003 at 01:16:45AM +0200, Trond Myklebust wrote:
> >>>>> " " == Herbert Pötzl <herbert@13thfloor.at> writes:
>
> > why do you think that filesystem ops should be read only?
>
> What possible reason could there be for making them overwritable?
> Sounds like a recipe for disaster...
hmm, yeah I guess you are right ...
I was more thinking about modular filesystems with
plugins for special symlink or directory handling,
but there it would be better to add another level
of indirection anyway ...
> If you want to layer stuff on top of another filesystem, then surely
> you can do that by methods that don't involve overwriting a globally
> shared table.
agreed, this would be bad design.
best,
Herbert
> Cheers,
> Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: consting operations
2003-07-11 22:19 consting operations Matthew Wilcox
2003-07-11 22:30 ` Andrew Morton
2003-07-11 22:47 ` Herbert Pötzl
@ 2003-07-14 7:08 ` David Woodhouse
2 siblings, 0 replies; 7+ messages in thread
From: David Woodhouse @ 2003-07-14 7:08 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: linux-fsdevel
On Fri, 2003-07-11 at 23:19, Matthew Wilcox wrote:
> 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?
I think it's worth it. I posted a patch to fs-devel on the 24th of June
which does linux/fs.h and fixes the warnings I saw with local pointers.
--
dwmw2
^ 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.