From mboxrd@z Thu Jan 1 00:00:00 1970 From: Herbert =?iso-8859-1?Q?P=F6tzl?= Subject: Re: consting operations Date: Sat, 12 Jul 2003 00:47:01 +0200 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20030711224701.GA31052@www.13thfloor.at> References: <20030711221901.GO20424@parcelfarce.linux.theplanet.co.uk> Reply-To: herbert@13thfloor.at Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from www.13thfloor.AT ([212.16.59.250]:8616 "EHLO www.13thfloor.at") by vger.kernel.org with ESMTP id S267123AbTGKWcL (ORCPT ); Fri, 11 Jul 2003 18:32:11 -0400 To: Matthew Wilcox Content-Disposition: inline In-Reply-To: <20030711221901.GO20424@parcelfarce.linux.theplanet.co.uk> List-Id: linux-fsdevel.vger.kernel.org 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