From owner-xfs@oss.sgi.com Wed Aug 1 03:03:14 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 01 Aug 2007 03:03:16 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=AWL,BAYES_50,LONGWORDS autolearn=no version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l71A39bm006777 for ; Wed, 1 Aug 2007 03:03:13 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id UAA27292; Wed, 1 Aug 2007 20:03:02 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l71A31eW44275992; Wed, 1 Aug 2007 20:03:02 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l71A2w1t41635989; Wed, 1 Aug 2007 20:02:58 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Wed, 1 Aug 2007 20:02:58 +1000 From: David Chinner To: "William J. Earl" Cc: David Chinner , xfs-oss , Michael Nishimoto , markgw@sgi.com Subject: Re: RFC: log record CRC validation Message-ID: <20070801100258.GV31489@sgi.com> References: <20070725092445.GT12413810@sgi.com> <46A7226D.8080906@sgi.com> <46A8DF7E.4090006@agami.com> <20070726233129.GM12413810@sgi.com> <46AAA340.60208@agami.com> <20070731053048.GP31489@sgi.com> <46AFE2CB.6080102@agami.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46AFE2CB.6080102@agami.com> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12423 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Tue, Jul 31, 2007 at 06:32:59PM -0700, William J. Earl wrote: > David Chinner wrote: > >IMO, continuing down this same "the block device is perfect" path is > >a "head in the sand" approach. By ignoring the fact that errors can > >and do occur, we're screwing ourselves when something does actually > >go wrong because we haven't put in place the mechanisms to detect > >errors because we've assumed they will never happen. > > > >We've spent 15 years so far trying to work out what has gone wrong > >in XFS by adding more and more reactive debug into the code without > >an eye to a robust solution. We add a chunk of code here to detect > >that problem, a chunk of code there to detect this problem, and so > >on. It's just not good enough anymore. > > > >Like good security, filesystem integrity is not provided by a single > >mechanism. "Defense in depth" is what we are aiming to provide here > >and to do that you have to assume that errors can propagate through > >every interface into the filesystem. > > > > > > > I understand your argument, but why not simply strengthen the > block layer, even you do it with an optional XFS-based checksum scheme > on all blocks? You could probably do this using dm-crypt and an integrity hash. Unfortunately, I don't trust dm-crypt as far as I can throw it because we've been severely bitten by bugs in dm-crypt. Specifically the bug that existed from 2.6.14 through to 2.6.19 where it reported success to readahead bios that had been cancelled due to block device congestion and hence returning uninitialised bios as "complete" and error free. This resulted in XFS shutdowns because the only code in the entire of Linux that triggered this problem was the XFS btree readahead. Every time this occurred the finger was pointed at XFS because it detected the corruption and we had *zero* information telling us what the problem might have been. A btree block CRC failure would have *immediately* told us the block layer had returned us bad data. This is where I come back to defense in depth. Block device level integrity checking is not sufficient as bugs in this layer still need to be caught by the filesystem. I stand by this even if I implemented the block layer code myself - I don't write perfect code and nobody else does, either. Hence we *must* assume that the layer that returned the block is imperfect even if we wrote it.... > That way, you would not wind up detecting metadata > corruption and silently ignoring file data corruption Data integrity has different selection criteria compared to ensuring structural integrity of the filesystem. That is, different users have different requirements for data integrity and performance. e.g. bit errors in video and audio data don't matter but performance does, yet we still need to protect the filesystem metadata against the same bit errors. Hence, IMO, we really do need to treat them seperately to retain flexibility in the filesystem for different applications. I would prefer to aim for per-inode selection of data CRCs and allow inheritance of the attribute through the directory heirachy. That way the behaviour is user selectable for the subset of the files that the system owner cares about enough to protect. If you want to protect the entire filesystem, set the flag on the root directory at mkfs time.... > For example, > suppose you stole one block in N (where you might choose N according to > the RAID data stripe size, when running over MD), and used it as a > checksum block (storing (N-1)*K subblock checksums)? This in effect > would require either RAID full-stripe read-modify-write or at least an > extra block read-modify-write for a real block write, but it would give > you complete metadata and data integrity checking. This could be an > XFS feature or a new MD feature ("checksum" layer). dm-crypt. But, see above. > This would clearly be somewhat expensive for random writes, > much like RAID 6, and also expensive for random reads, unless the N were > equal to the RAID block size, but, as with the NetApp and Tandem > software checksums, it would assure that a high level of data integrity. Good integrity, but random writes is one of XFS's weaknesses and this would just make it worse. Netapp leverages both WAFL's linearisation of random writes and specialised hardware (NVRAM) to avoid this performance proble altogether but we can't. It's a showstopper, IMO. No matter which way I look at it, block layer integrity checking provides insufficient correctness guarantees while neutralising XFS's strengths and magnifying it's weaknesses. To me it just doesn't make sense for XFS to go down this path when there are other options that don't have these drawbacks. Basically, it makes much more sense to me to break the problem down into it's component pieces and provide protection for each of those pieces one at a time without introducing new issues. This way we don't compromise the strengths of XFS or reduce the flexibility of the filesystem in any way whilst providing better protection against errors that cause corruption. Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Wed Aug 1 04:17:24 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 01 Aug 2007 04:17:28 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.suse.de (mx1.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l71BHLbm016715 for ; Wed, 1 Aug 2007 04:17:24 -0700 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 6BD8D12533; Wed, 1 Aug 2007 13:17:23 +0200 (CEST) To: David Chinner Cc: Michael Nishimoto , markgw@sgi.com, xfs-dev , xfs-oss Subject: Re: RFC: log record CRC validation References: <20070725092445.GT12413810@sgi.com> <46A7226D.8080906@sgi.com> <46A8DF7E.4090006@agami.com> <20070726233129.GM12413810@sgi.com> <46A94963.7000103@agami.com> <20070727065930.GT12413810@sgi.com> <46AFD88E.9070403@agami.com> <20070801022418.GR31489@sgi.com> From: Andi Kleen Date: 01 Aug 2007 14:11:58 +0200 In-Reply-To: <20070801022418.GR31489@sgi.com> Message-ID: Lines: 17 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12424 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: andi@firstfloor.org Precedence: bulk X-list: xfs David Chinner writes: > I haven't looked at great depth into other structures in terms of > implementation details. I know that if we use a 16 bit CRC on > directories we can get away without a on-disk format change as the > xfs_da_blkinfo structure has 16 bits of padding. However, given that > directory block size can reach 64k, a CRC16 check is really only > capable of single bit error detection. Hence I think we really need > CRC32 here which means an on-disk format change. When the directory format is changed it would be nice to also support DT_* types at the same time. They can speed up some operations nicely because file system walkers can avoid a stat() (and seek to the inode) just to find out if a name is a directory or not. Right now there is no space for this unfortunately. -Andi From owner-xfs@oss.sgi.com Wed Aug 1 05:17:25 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 01 Aug 2007 05:17:28 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l71CHLbm024611 for ; Wed, 1 Aug 2007 05:17:23 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id WAA00550; Wed, 1 Aug 2007 22:17:18 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l71CHGeW44879811; Wed, 1 Aug 2007 22:17:17 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l71CHDon44939707; Wed, 1 Aug 2007 22:17:13 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Wed, 1 Aug 2007 22:17:13 +1000 From: David Chinner To: Mario Becroft Cc: linux-xfs@oss.sgi.com Subject: Re: Proper method of snapshotting XFS with external log using LVM2 Message-ID: <20070801121713.GY31489@sgi.com> References: <1185737538.12064.44.camel@server.ak.quickcircuit.co.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1185737538.12064.44.camel@server.ak.quickcircuit.co.nz> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12425 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Mon, Jul 30, 2007 at 07:32:18AM +1200, Mario Becroft wrote: > I am using XFS and LVM2 under Linux. My XFS filesystems have an external > log. > > What is the correct method of creating an LVM2 snapshot of volumes > containing an XFS filesystem with external log? Not sure. I've never tried it. > Do I need to snapshot the main filesystem volume and the log volume? Yes. > Should I be using xfs_freeze to ensure that the filesystem is not > modified between when I create the filesystem snapshot and the log > snapshot? Yes. > Or is there a special procedure for atomically creating both snapshots? > > Or should I not be using an external log? If not, won't this decrease > performance? If it doesn't work, then don't use an external log and yes, it will decrease performance. > In the past I have successfully used xfs_freeze and created separate > snapshots of the filesystem and log volumes. However, I am not sure > whether this is the recommended approach. As long as both snapshots were taken with the one xfs_freeze command, then it shouldbe ok. Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Wed Aug 1 05:23:31 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 01 Aug 2007 05:23:34 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from isp.becroft.co.nz (isp.becroft.co.nz [202.89.33.33]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l71CNTbm028796 for ; Wed, 1 Aug 2007 05:23:30 -0700 Received: from server.ak.quickcircuit.co.nz (gateway.quickcircuit.co.nz [210.55.214.217]) by isp.becroft.co.nz (8.12.11.20060308/8.12.9) with ESMTP id l71CNTG7016188; Thu, 2 Aug 2007 00:23:29 +1200 Subject: Re: Proper method of snapshotting XFS with external log using LVM2 From: Mario Becroft To: David Chinner Cc: linux-xfs@oss.sgi.com In-Reply-To: <20070801121713.GY31489@sgi.com> References: <1185737538.12064.44.camel@server.ak.quickcircuit.co.nz> <20070801121713.GY31489@sgi.com> Content-Type: text/plain Organization: QuickCircuit Ltd. Date: Thu, 02 Aug 2007 00:23:29 +1200 Message-Id: <1185971009.13401.146.camel@server.ak.quickcircuit.co.nz> Mime-Version: 1.0 X-Mailer: Evolution 2.4.2.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Scanned: ClamAV version 0.88, clamav-milter version 0.87 on isp.becroft.co.nz X-Virus-Status: Clean X-archive-position: 12426 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: mb@gem.win.co.nz Precedence: bulk X-list: xfs Hi David, Thanks very much for your clear explanation of how to snapshot XFS filesystems with external log. It is good to know that I am doing it right. I found that in the latest Linux kernel version 2.6.22.1, you cannot use the method I have been using, and which you confirmed is ok. The problem is that if you xfs_freeze the filesystem, then the LVM snapshot command hangs forever. (Back in kernel version 2.6.16 this did not happen.) I guess the snapshot command is also attempting to freeze the filesystem, or something, which doesn't work when it is already frozen. I suppose how to fix this is a question for the linux-lvm mailing list. Thanks again for your detailed answer. -- Mario Becroft From owner-xfs@oss.sgi.com Wed Aug 1 05:55:56 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 01 Aug 2007 05:56:03 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l71Ctpbm018177 for ; Wed, 1 Aug 2007 05:55:55 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l71CtsA5027305 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 1 Aug 2007 14:55:54 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l71CtsaQ027303; Wed, 1 Aug 2007 14:55:54 +0200 Date: Wed, 1 Aug 2007 14:55:54 +0200 From: Christoph Hellwig To: David Chinner Cc: Christoph Hellwig , xfs@oss.sgi.com Subject: Re: [PATCH] stop using uio in the readlink code Message-ID: <20070801125554.GA27199@lst.de> References: <20070729211354.GB12824@lst.de> <20070801054142.GT31489@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070801054142.GT31489@sgi.com> User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12427 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs On Wed, Aug 01, 2007 at 03:41:42PM +1000, David Chinner wrote: > Do we really need to copy this code? I guess it doesn't really > matter that much but it would be nice not to have to copy an > exported vfs function just because we don't have a dentry... I was wondering whether to send a patch to fix and export the VFS function afterwards, but I really don't want a an xfs patch like this to have a VFS change depency to start with. Especially as I want to change the name of the helper in namei.c aswell - the vfs_ prefix is completely wrong. From owner-xfs@oss.sgi.com Wed Aug 1 07:09:59 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 01 Aug 2007 07:10:02 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l71E9qbm000998 for ; Wed, 1 Aug 2007 07:09:57 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id AAA04568; Thu, 2 Aug 2007 00:09:48 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l71E9keW45088064; Thu, 2 Aug 2007 00:09:47 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l71E9ij445007528; Thu, 2 Aug 2007 00:09:44 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Thu, 2 Aug 2007 00:09:44 +1000 From: David Chinner To: Mario Becroft Cc: David Chinner , linux-xfs@oss.sgi.com Subject: Re: Proper method of snapshotting XFS with external log using LVM2 Message-ID: <20070801140944.GA31489@sgi.com> References: <1185737538.12064.44.camel@server.ak.quickcircuit.co.nz> <20070801121713.GY31489@sgi.com> <1185971009.13401.146.camel@server.ak.quickcircuit.co.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1185971009.13401.146.camel@server.ak.quickcircuit.co.nz> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12428 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Thu, Aug 02, 2007 at 12:23:29AM +1200, Mario Becroft wrote: > Hi David, > > Thanks very much for your clear explanation of how to snapshot XFS > filesystems with external log. It is good to know that I am doing it > right. > > I found that in the latest Linux kernel version 2.6.22.1, you cannot use > the method I have been using, and which you confirmed is ok. The problem > is that if you xfs_freeze the filesystem, then the LVM snapshot command > hangs forever. Ah, yes, I wondered if that still happened. The dm snapshot code is a little naive - it just assumes that it is the only thing that can freeze a device. > (Back in kernel version 2.6.16 this did not happen.) I > guess the snapshot command is also attempting to freeze the filesystem, > or something, which doesn't work when it is already frozen. It hangs on a lock that is held across the xfs_freeze -f ; xfs_freeze -u sequence. > I suppose > how to fix this is a question for the linux-lvm mailing list. IIRC from the last time this came, they'll tell you not to use xfs_freeze. As it is, the freeze_bdev() interface that both xfs_freeze and dm-snapshot use is a complete pile of crud that we need to fix. One of these days I'll get some time to fix it.... Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Wed Aug 1 08:02:56 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 01 Aug 2007 08:02:59 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_05 autolearn=ham version=3.2.0-pre1-r499012 Received: from isp.becroft.co.nz (isp.becroft.co.nz [202.89.33.33]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l71F2sbm006128 for ; Wed, 1 Aug 2007 08:02:56 -0700 Received: from server.ak.quickcircuit.co.nz (gateway.quickcircuit.co.nz [210.55.214.217]) by isp.becroft.co.nz (8.12.11.20060308/8.12.9) with ESMTP id l71F2sSp020306; Thu, 2 Aug 2007 03:02:54 +1200 Subject: Re: Proper method of snapshotting XFS with external log using LVM2 From: Mario Becroft To: David Chinner Cc: linux-xfs@oss.sgi.com, linux-lvm@redhat.com In-Reply-To: <20070801140944.GA31489@sgi.com> References: <1185737538.12064.44.camel@server.ak.quickcircuit.co.nz> <20070801121713.GY31489@sgi.com> <1185971009.13401.146.camel@server.ak.quickcircuit.co.nz> <20070801140944.GA31489@sgi.com> Content-Type: text/plain Organization: QuickCircuit Ltd. Date: Thu, 02 Aug 2007 03:02:54 +1200 Message-Id: <1185980574.2694.35.camel@server.ak.quickcircuit.co.nz> Mime-Version: 1.0 X-Mailer: Evolution 2.4.2.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Scanned: ClamAV version 0.88, clamav-milter version 0.87 on isp.becroft.co.nz X-Virus-Status: Clean X-archive-position: 12429 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: mb@gem.win.co.nz Precedence: bulk X-list: xfs On Thu, 2007-08-02 at 00:09 +1000, David Chinner wrote: > [lvm snapshot] hangs on a lock that is held across the xfs_freeze -f ; > xfs_freeze -u sequence. Right. > > I suppose > > how to fix this is a question for the linux-lvm mailing list. > > IIRC from the last time this came, they'll tell you not to use > xfs_freeze. Well, two problems with that: 1. There is no way to atomically create snapshots of two different volumes (the main filesystem and the log) without using xfs_freeze. 2. I tried without xfs_freeze anyway just to see what would happen, and actually in kernel 2.6.22.1 if you simply create a snapshot of the main filesystem volume and destroy it several times in a row (not even touching the log volume yet) lvcreate hangs. So it sounds like there is a fundamental problem with the approach, plus a bug somewhere... I will copy this to linux-lvm. For the benefit of those reading on linux-lvm, the issue is that I am trying to snapshot an XFS filesystem with an external log. To do this it is necessary to snapshot two volumes--the main filesystem volume and the log volume--while the filesystem is frozen. It is not sufficient to freeze the filesystem separately for each snapshot creation since its state might change between the two snapshots. The correct approach is to use xfs_freeze to freeze the filesystem, then create both snapshots, then unfreeze it. This used to work 100% reliably with kernel 2.6.16, device-mapper 1.02.03 and LVM2 2.02.02. With device-mapper 1.02.21 and LVM2 2.02.27, lvcreate hangs while creating a snapshot of a filesystem that has been frozen with xfs_freeze. Furthermore, when using kernel 2.6.22.1 (and latest device-mapper and LVM2), even if I do not use xfs_freeze, lvcreate hangs about 10% of the time when creating a snapshot. Once in the hung state (whether because xfs_freeze was used or because of the random hang) it seems impossible to get it unstuck without rebooting the system. I guess this is not an XFS-specific problem--it would happen with any filesystem employing a separate log volume. I am happy to test any patches that might address this issue... or maybe even hack one up myself if someone gives me some pointers, but I guess someone who knows something about LVM should really do it. -- Mario Becroft From owner-xfs@oss.sgi.com Wed Aug 1 21:59:25 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 01 Aug 2007 21:59:28 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_40 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l724xKbm022989 for ; Wed, 1 Aug 2007 21:59:24 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id OAA28659; Thu, 2 Aug 2007 14:59:19 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 1161) id 52D2858F4B6B; Thu, 2 Aug 2007 14:59:19 +1000 (EST) To: xfs@oss.sgi.com Cc: sgi.bugs.xfs@engr.sgi.com Subject: TAKE 968166 - XFSQA 122: TOT XFS type checking fails Message-Id: <20070802045919.52D2858F4B6B@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 14:59:19 +1000 (EST) From: bnaujok@sgi.com (Barry Naujok) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12430 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: bnaujok@sgi.com Precedence: bulk X-list: xfs Fix up QA for xfsprogs 2.9.x Date: Thu Aug 2 14:57:53 AEST 2007 Workarea: chook.melbourne.sgi.com:/home/bnaujok/isms/repair Inspected by: mohamedb@sgi.com The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/xfs-cmds/master-melb Modid: master-melb:xfs-cmds:29298a xfstests/030.out.linux - 1.4 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfstests/030.out.linux.diff?r1=text&tr1=1.4&r2=text&tr2=1.3&f=h - Golden output is slightly wrong for xfs_repair 2.9.2+ xfstests/122 - 1.5 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfstests/122.diff?r1=text&tr1=1.5&r2=text&tr2=1.4&f=h - Update test for xfs_metablock_t structure From owner-xfs@oss.sgi.com Thu Aug 2 00:13:29 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 00:13:33 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l727DPbm003782 for ; Thu, 2 Aug 2007 00:13:28 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id RAA02238; Thu, 2 Aug 2007 17:13:23 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id ACB8A58F4B6D; Thu, 2 Aug 2007 17:13:23 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968554 - Filestreams fixes for 2.6.23 Message-Id: <20070802071323.ACB8A58F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 17:13:23 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12431 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs Set filestreams object timeout to something sane. Date: Thu Aug 2 17:12:33 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29303a fs/xfs/linux-2.6/xfs_globals.c - 1.71 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_globals.c.diff?r1=text&tr1=1.71&r2=text&tr2=1.70&f=h - Set the filestreams default timeout to 30s. From owner-xfs@oss.sgi.com Thu Aug 2 00:25:20 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 00:25:25 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l727PFbm012238 for ; Thu, 2 Aug 2007 00:25:18 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id RAA02769; Thu, 2 Aug 2007 17:25:15 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 9F08058F4B6D; Thu, 2 Aug 2007 17:25:15 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: TAKE PARTIAL 968554 - Filestreams fixes for 2.6.23 Message-Id: <20070802072515.9F08058F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 17:25:15 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12432 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On-demand reaping of the MRU cache Instead of running the mru cache reaper all the time based on a timeout, we should only run it when the cache has active objects. This allows CPUs to sleep when there is no activity rather than be woken repeatedly just to check if there is anything to do. Date: Thu Aug 2 17:24:38 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: donaldd The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29305a fs/xfs/xfs_mru_cache.h - 1.2 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mru_cache.h.diff?r1=text&tr1=1.2&r2=text&tr2=1.1&f=h - Change the reaper to start when the first object is stored in the cache and stop when the last object is reaped. fs/xfs/xfs_mru_cache.c - 1.2 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mru_cache.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.1&f=h - Change the reaper to start when the first object is stored in the cache and stop when the last object is reaped. fs/xfs/xfs_filestream.c - 1.2 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_filestream.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.1&f=h - No longer need to tell the MRU cache to restart the reaper when we flush the cache. From owner-xfs@oss.sgi.com Thu Aug 2 00:29:15 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 00:29:18 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l727TCbm014035 for ; Thu, 2 Aug 2007 00:29:14 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id RAA02911; Thu, 2 Aug 2007 17:29:12 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 8B3D058F4B6D; Thu, 2 Aug 2007 17:29:12 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: TAKE 968554 - Filestreams fixes for 2.6.23 Message-Id: <20070802072912.8B3D058F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 17:29:12 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12433 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs Export the filestreams trace buffer for modularised debugging setups Signed-Off-By: Christoph Hellwig Date: Thu Aug 2 17:28:29 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29306a fs/xfs/linux-2.6/xfs_ksyms.c - 1.60 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_ksyms.c.diff?r1=text&tr1=1.60&r2=text&tr2=1.59&f=h - Export the filestreams trace buffer. From owner-xfs@oss.sgi.com Thu Aug 2 00:40:21 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 00:40:25 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l727eIbm018527 for ; Thu, 2 Aug 2007 00:40:20 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id RAA03285; Thu, 2 Aug 2007 17:40:18 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 9CF4458F4B6D; Thu, 2 Aug 2007 17:40:18 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968555 - sparse fixes for 2.6.23 Message-Id: <20070802074018.9CF4458F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 17:40:18 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12434 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs Fix sparse NULL vs 0 warnings Sparse now warns about comparing pointers to 0, so change all instance where that happens to NULL instead. Signed-off-by: Christoph Hellwig Date: Thu Aug 2 17:39:43 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29308a fs/xfs/xfs_log.c - 1.333 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_log.c.diff?r1=text&tr1=1.333&r2=text&tr2=1.332&f=h - Fix sparse NULL vs 0 warnings fs/xfs/xfs_log_recover.c - 1.320 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_log_recover.c.diff?r1=text&tr1=1.320&r2=text&tr2=1.319&f=h - Fix sparse NULL vs 0 warnings From owner-xfs@oss.sgi.com Thu Aug 2 00:46:37 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 00:46:40 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l727kVbm021238 for ; Thu, 2 Aug 2007 00:46:36 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id RAA03557; Thu, 2 Aug 2007 17:46:26 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id F0D0458F4B6D; Thu, 2 Aug 2007 17:46:25 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968555 - sparse fixes for 2.6.23 Message-Id: <20070802074625.F0D0458F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 17:46:25 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12435 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs Fix sparse warning in kmem_shake_allow We can't return a masked result of a __bitwise type. Compare it to 0 first to keep the behaviour without the warning. Signed-off-by: Christoph Hellwig Date: Thu Aug 2 17:45:47 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29309a fs/xfs/linux-2.6/kmem.h - 1.43 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/kmem.h.diff?r1=text&tr1=1.43&r2=text&tr2=1.42&f=h - Sparse warns if we return a masked result of a __bitwise type. From owner-xfs@oss.sgi.com Thu Aug 2 00:53:27 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 00:53:31 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l727rObm024225 for ; Thu, 2 Aug 2007 00:53:26 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id RAA03698; Thu, 2 Aug 2007 17:53:24 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 9F3AF58F4B6D; Thu, 2 Aug 2007 17:53:24 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968555 - sparse fixes for 2.6.23 Message-Id: <20070802075324.9F3AF58F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 17:53:24 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12436 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs fix ASSERT and ASSERT_ALWAYS - remove the != 0 inside the unlikely in ASSERT_ALWAYS because sparse now complains about comparisons between pointers and 0 - add a standalone ASSERT implementation because defining it to ASSERT_ALWAYS means the string is expanded before the token passing stringification. This way we get the actual content of the assertation in the assfail message and don't overflow sparse's stringification buffer leading to sparse error messages. Signed-off-by: Christoph Hellwig Date: Thu Aug 2 17:52:47 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29310a fs/xfs/support/debug.h - 1.18 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/support/debug.h.diff?r1=text&tr1=1.18&r2=text&tr2=1.17&f=h - Clean up sparse warnings fo ASSERT_ALWAYS and make ASSERT always stringify the failure correctly. From owner-xfs@oss.sgi.com Thu Aug 2 00:58:41 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 00:58:45 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l727wabm026258 for ; Thu, 2 Aug 2007 00:58:39 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id RAA03883; Thu, 2 Aug 2007 17:58:35 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id C646258F4B6D; Thu, 2 Aug 2007 17:58:35 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: TAKE 968555 - sparse fixes for 2.6.23 Message-Id: <20070802075835.C646258F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 17:58:35 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12437 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs fix sparse shadowed variable warnings - in xfs_probe_cluster rename the inner len to pg_len. There's no harm here because the outer len isn't used after the inner len comes into existance but it keeps the code clean. - in xfs_da_do_buf remove the inner i because they don't overlap and they are both the same type. Signed-off-by: Christoph Hellwig Date: Thu Aug 2 17:58:04 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29311a fs/xfs/xfs_da_btree.c - 1.175 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_da_btree.c.diff?r1=text&tr1=1.175&r2=text&tr2=1.174&f=h - Fix shadowed var in xfs_da_do_buf. fs/xfs/linux-2.6/xfs_aops.c - 1.147 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_aops.c.diff?r1=text&tr1=1.147&r2=text&tr2=1.146&f=h - Fix shadowed var in xfs_probe_cluster. From owner-xfs@oss.sgi.com Thu Aug 2 03:55:49 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 03:55:52 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l72Atkbm020226 for ; Thu, 2 Aug 2007 03:55:48 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id UAA08071; Thu, 2 Aug 2007 20:55:43 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 0AFC658F4B6D; Thu, 2 Aug 2007 20:55:42 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - fix constness warning in dmapi Message-Id: <20070802105543.0AFC658F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 20:55:42 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12438 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs fix constness warning in dmapi File operations are const now so make sure the dmapi code propagates this properly. Signed-off-by: Christoph Hellwig Date: Thu Aug 2 20:54:51 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29313a fs/xfs/dmapi/xfs_dm_fsops.c - 1.7 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm_fsops.c.diff?r1=text&tr1=1.7&r2=text&tr2=1.6&f=h - make file operations const. Modid: linux-melb:dmapi:29313b fs/dmapi/dmapi_kern.h - 1.20 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/fs/dmapi/dmapi_kern.h.diff?r1=text&tr1=1.20&r2=text&tr2=1.19&f=h - make file operations const. From owner-xfs@oss.sgi.com Thu Aug 2 03:59:01 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 03:59:05 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l72Awwbm021634 for ; Thu, 2 Aug 2007 03:59:00 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id UAA08146; Thu, 2 Aug 2007 20:58:58 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id C6AC858F4B6D; Thu, 2 Aug 2007 20:58:58 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - fix dmapi warning in 32bit builds Message-Id: <20070802105858.C6AC858F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 20:58:58 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12439 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs fix dmapi warning in 32bit builds dm_size_t is 64bit even in 32bit builds so we need to use max_t when when comparing to PAGE_CACHE_SIZE. Signed-off-by: Christoph Hellwig Date: Thu Aug 2 20:58:31 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29314a fs/xfs/dmapi/xfs_dm.c - 1.40 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm.c.diff?r1=text&tr1=1.40&r2=text&tr2=1.39&f=h - fix 32bit build warning in xfs_dm_probe_hole. From owner-xfs@oss.sgi.com Thu Aug 2 04:01:35 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 04:01:37 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l72B1Sbm022898 for ; Thu, 2 Aug 2007 04:01:34 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA08398; Thu, 2 Aug 2007 21:01:27 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id A1C2058F4B6D; Thu, 2 Aug 2007 21:01:27 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - fix format string warnings in xfsidbg Message-Id: <20070802110127.A1C2058F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 21:01:27 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12440 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs fix format string warnings in xfsidbg Signed-off-by: Christoph Hellwig Date: Thu Aug 2 21:01:03 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29315a fs/xfs/xfsidbg.c - 1.317 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfsidbg.c.diff?r1=text&tr1=1.317&r2=text&tr2=1.316&f=h - fix format string warnings. From owner-xfs@oss.sgi.com Thu Aug 2 04:04:26 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 04:04:29 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l72B4Lbm024274 for ; Thu, 2 Aug 2007 04:04:24 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA08480; Thu, 2 Aug 2007 21:04:21 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 3AE9458F4B6D; Thu, 2 Aug 2007 21:04:21 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - fix sparse endianess warnings in xfsidbg Message-Id: <20070802110421.3AE9458F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 21:04:21 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12441 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs fix sparse endianess warnings in xfsidbg xfsidbg was missed in a a few of the previous endianess conversions, and this patch brings it up to the proper state. Signed-off-by: Christoph Hellwig Date: Thu Aug 2 21:04:00 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29316a fs/xfs/xfsidbg.c - 1.318 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfsidbg.c.diff?r1=text&tr1=1.318&r2=text&tr2=1.317&f=h - fix sparse endianess warnings. From owner-xfs@oss.sgi.com Thu Aug 2 04:07:44 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 04:07:47 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l72B7ebm025787 for ; Thu, 2 Aug 2007 04:07:43 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA08573; Thu, 2 Aug 2007 21:07:40 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 53C2A58F4B6D; Thu, 2 Aug 2007 21:07:40 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - remove confusing INT_ comments in xfs_bmap_btree.c Message-Id: <20070802110740.53C2A58F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 21:07:40 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12442 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs remove confusing INT_ comments in xfs_bmap_btree.c Signed-off-by: Christoph Hellwig Date: Thu Aug 2 21:07:17 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29317a fs/xfs/xfs_bmap_btree.c - 1.162 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_bmap_btree.c.diff?r1=text&tr1=1.162&r2=text&tr2=1.161&f=h - Cleanup unneeded comments. From owner-xfs@oss.sgi.com Thu Aug 2 04:14:13 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 04:14:16 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l72BE9bm028028 for ; Thu, 2 Aug 2007 04:14:12 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA08715; Thu, 2 Aug 2007 21:14:09 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 027AC58F4B6D; Thu, 2 Aug 2007 21:14:08 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - split ondisk vs incore versions of xfs_bmbt_rec_t Message-Id: <20070802111409.027AC58F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 21:14:08 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12443 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs split ondisk vs incore versions of xfs_bmbt_rec_t currently xfs_bmbt_rec_t is used both for ondisk extents as well as host-endian ones. This patch adds a new xfs_bmbt_rec_host_t for the native endian ones and cleans up the fallout. There have been various endianess issues in the tracing / debug printf code that are fixed by this patch. Signed-off-by: Christoph Hellwig Date: Thu Aug 2 21:13:30 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29318a fs/xfs/xfsidbg.c - 1.319 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfsidbg.c.diff?r1=text&tr1=1.319&r2=text&tr2=1.318&f=h - split ondisk vs incore versions of xfs_bmbt_rec_t fs/xfs/xfs_bmap_btree.h - 1.77 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_bmap_btree.h.diff?r1=text&tr1=1.77&r2=text&tr2=1.76&f=h - split ondisk vs incore versions of xfs_bmbt_rec_t fs/xfs/xfs_bmap_btree.c - 1.163 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_bmap_btree.c.diff?r1=text&tr1=1.163&r2=text&tr2=1.162&f=h - split ondisk vs incore versions of xfs_bmbt_rec_t fs/xfs/xfs_inode.c - 1.468 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.c.diff?r1=text&tr1=1.468&r2=text&tr2=1.467&f=h - split ondisk vs incore versions of xfs_bmbt_rec_t fs/xfs/xfs_inode.h - 1.223 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.h.diff?r1=text&tr1=1.223&r2=text&tr2=1.222&f=h - split ondisk vs incore versions of xfs_bmbt_rec_t fs/xfs/xfs_bmap.h - 1.100 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_bmap.h.diff?r1=text&tr1=1.100&r2=text&tr2=1.99&f=h - split ondisk vs incore versions of xfs_bmbt_rec_t fs/xfs/xfs_bmap.c - 1.374 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_bmap.c.diff?r1=text&tr1=1.374&r2=text&tr2=1.373&f=h - split ondisk vs incore versions of xfs_bmbt_rec_t fs/xfs/quota/xfs_qm.c - 1.51 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/quota/xfs_qm.c.diff?r1=text&tr1=1.51&r2=text&tr2=1.50&f=h - split ondisk vs incore versions of xfs_bmbt_rec_t From owner-xfs@oss.sgi.com Thu Aug 2 04:25:00 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 04:25:05 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l72BOsbm003236 for ; Thu, 2 Aug 2007 04:24:59 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA09019; Thu, 2 Aug 2007 21:24:53 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 44B6C58F4B6D; Thu, 2 Aug 2007 21:24:53 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - cleanup definitions of BMBT_*BITLEN macros Message-Id: <20070802112453.44B6C58F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 21:24:53 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12444 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs cleanup definitions of BMBT_*BITLEN macros The BMBT_*BITLEN are currently defined in a complicated way depending on XFS_NATIVE_HOST. But if all the macros are expanded they (obviously) expand to the same value for both cases. This patch defines the macros in the most simple way and updates the comment describing them to remove outdated bits. Signed-off-by: Christoph Hellwig Date: Thu Aug 2 21:24:18 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29320a fs/xfs/xfs_bmap_btree.h - 1.78 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_bmap_btree.h.diff?r1=text&tr1=1.78&r2=text&tr2=1.77&f=h - Remove the dependency of the BMBT_*BITLEN macros on XFS_NATIVE_HOST From owner-xfs@oss.sgi.com Thu Aug 2 04:28:04 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 04:28:08 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l72BS1bm004543 for ; Thu, 2 Aug 2007 04:28:02 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA09075; Thu, 2 Aug 2007 21:28:00 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 0B9C858F4B6D; Thu, 2 Aug 2007 21:27:59 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - endianess annotations for xfs_bmbt_rec_t Message-Id: <20070802112800.0B9C858F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 21:27:59 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12445 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs endianess annotations for xfs_bmbt_rec_t Signed-off-by: Christoph Hellwig Date: Thu Aug 2 21:27:34 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29321a fs/xfs/xfs_bmap_btree.h - 1.79 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_bmap_btree.h.diff?r1=text&tr1=1.79&r2=text&tr2=1.78&f=h - Add endian annotations for xfs_bmbt_rec_t operations. fs/xfs/xfs_bmap_btree.c - 1.165 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_bmap_btree.c.diff?r1=text&tr1=1.165&r2=text&tr2=1.164&f=h - Add endian annotations for xfs_bmbt_rec_t operations. fs/xfs/xfs_inode.c - 1.469 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.c.diff?r1=text&tr1=1.469&r2=text&tr2=1.468&f=h - Add endian annotations for xfs_bmbt_rec_t operations. fs/xfs/xfs_bmap.c - 1.375 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_bmap.c.diff?r1=text&tr1=1.375&r2=text&tr2=1.374&f=h - Add endian annotations for xfs_bmbt_rec_t operations. From owner-xfs@oss.sgi.com Thu Aug 2 04:31:09 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 04:31:13 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l72BV6bm005809 for ; Thu, 2 Aug 2007 04:31:08 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA08913; Thu, 2 Aug 2007 21:18:51 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 9603458F4B6D; Thu, 2 Aug 2007 21:18:51 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - clean up xfs_bmbt_set_all/xfs_bmbt_disk_set_all Message-Id: <20070802111851.9603458F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 21:18:51 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12446 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs clean up xfs_bmbt_set_all/xfs_bmbt_disk_set_all xfs_bmbt_set_all/xfs_bmbt_disk_set_all are identical to xfs_bmbt_set_allf/xfs_bmbt_disk_set_allf except that the former take a xfs_bmbt_irec_t and the latter take the individual extent fields as scalar values. This patch reimplements xfs_bmbt_set_all/xfs_bmbt_disk_set_all as trivial wrappers around xfs_bmbt_set_allf/xfs_bmbt_disk_set_allf and cleans up the variable naming in xfs_bmbt_set_allf/xfs_bmbt_disk_set_allf to have some meaning instead of one char variable names. Signed-off-by: Christoph Hellwig Date: Thu Aug 2 21:18:19 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29319a fs/xfs/xfs_bmap_btree.c - 1.164 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_bmap_btree.c.diff?r1=text&tr1=1.164&r2=text&tr2=1.163&f=h - Reimplement xfs_bmbt_set_all/xfs_bmbt_disk_set_all as trivial wrappers around xfs_bmbt_set_allf/xfs_bmbt_disk_set_allf and clean up variable naming. From owner-xfs@oss.sgi.com Thu Aug 2 04:35:33 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 04:35:37 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l72BZUbm007486 for ; Thu, 2 Aug 2007 04:35:32 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA09466; Thu, 2 Aug 2007 21:35:30 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 65FD458F4B6D; Thu, 2 Aug 2007 21:35:30 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - Remove m_nreadaheads Message-Id: <20070802113530.65FD458F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 21:35:30 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12447 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs Remove m_nreadaheads m_nreadaheads in the mount struct is never used; remove it and the various macros assigned to it. Also remove a couple other unused macros in the same areas. Removes one user of xfs_physmem. Signed-off-by: Eric Sandeen Date: Thu Aug 2 21:35:08 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: sandeen@sandeen.net The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29322a fs/xfs/xfsidbg.c - 1.320 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfsidbg.c.diff?r1=text&tr1=1.320&r2=text&tr2=1.319&f=h - remove unused m_nreadaheads and associated macros. fs/xfs/xfs_rw.h - 1.83 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_rw.h.diff?r1=text&tr1=1.83&r2=text&tr2=1.82&f=h - remove unused m_nreadaheads and associated macros. fs/xfs/xfs_mount.h - 1.238 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.h.diff?r1=text&tr1=1.238&r2=text&tr2=1.237&f=h - remove unused m_nreadaheads and associated macros. fs/xfs/xfs_mount.c - 1.399 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.c.diff?r1=text&tr1=1.399&r2=text&tr2=1.398&f=h - remove unused m_nreadaheads and associated macros. fs/xfs/linux-2.6/xfs_lrw.h - 1.56 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_lrw.h.diff?r1=text&tr1=1.56&r2=text&tr2=1.55&f=h - remove unused m_nreadaheads and associated macros. fs/xfs/linux-2.4/xfs_lrw.h - 1.50 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.4/xfs_lrw.h.diff?r1=text&tr1=1.50&r2=text&tr2=1.49&f=h - remove unused m_nreadaheads and associated macros. From owner-xfs@oss.sgi.com Thu Aug 2 04:39:05 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 04:39:08 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l72Bd1bm008854 for ; Thu, 2 Aug 2007 04:39:02 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA09527; Thu, 2 Aug 2007 21:38:58 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id DC9AC58F4B6D; Thu, 2 Aug 2007 21:38:57 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - choose single default logbuf count & size Message-Id: <20070802113857.DC9AC58F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 21:38:57 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12448 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs choose single default logbuf count & size Remove sizing of logbuf size & count based on physical memory; this was never a very good gauge as it's looking at global memory, but deciding on sizing per-filesystem; no account is made of the total number of filesystems, for example. For now just take the largest "default" case, as was set for machines with >400MB - 8 x 32k buffers. This can always be tuned higher or lower with mount options if necessary. Removes one more user of xfs_physmem. Signed-off-by: Eric Sandeen Date: Thu Aug 2 21:38:35 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: sandeen@sandeen.net The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29323a fs/xfs/xfs_log.c - 1.334 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_log.c.diff?r1=text&tr1=1.334&r2=text&tr2=1.333&f=h - Don't size logbuf size and count based on physical memory. fs/xfs/xfs_log_priv.h - 1.118 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_log_priv.h.diff?r1=text&tr1=1.118&r2=text&tr2=1.117&f=h - Don't size logbuf size and count based on physical memory. From owner-xfs@oss.sgi.com Thu Aug 2 04:42:45 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 04:42:49 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l72Bggbm010240 for ; Thu, 2 Aug 2007 04:42:44 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA09620; Thu, 2 Aug 2007 21:42:42 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 5FBCF58F4B6D; Thu, 2 Aug 2007 21:42:42 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - Pick a single default inode cluster size. Message-Id: <20070802114242.5FBCF58F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 21:42:42 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12449 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs Pick a single default inode cluster size. Remove scaling of inode "clusters" based on machine memory; small cluster cut-point was an unrealistic 32MB and was probably never tested. Removes another user of xfs_physmem. Signed-off-by: Eric Sandeen Date: Thu Aug 2 21:42:18 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: sandeen@sandeen.net The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29324a fs/xfs/xfs_ialloc.h - 1.48 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_ialloc.h.diff?r1=text&tr1=1.48&r2=text&tr2=1.47&f=h - Don't scale inode cluster size based on physical memory. fs/xfs/xfs_mount.c - 1.400 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.c.diff?r1=text&tr1=1.400&r2=text&tr2=1.399&f=h - Don't scale inode cluster size based on physical memory. From owner-xfs@oss.sgi.com Thu Aug 2 04:46:12 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 04:46:15 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l72Bk8bm011474 for ; Thu, 2 Aug 2007 04:46:11 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA09850; Thu, 2 Aug 2007 21:46:08 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 8BA0B58F4B6D; Thu, 2 Aug 2007 21:46:08 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - Remove xfs_physmem Message-Id: <20070802114608.8BA0B58F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 21:46:08 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12450 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs Remove xfs_physmem Now that nobody's using it, remove xfs_physmem & friends. Signed-off-by: Eric Sandeen Date: Thu Aug 2 21:45:47 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: sandeen@sandeen.net The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29325a fs/xfs/linux-2.6/xfs_globals.h - 1.20 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_globals.h.diff?r1=text&tr1=1.20&r2=text&tr2=1.19&f=h - remove unused xfs_physmem & friends. fs/xfs/linux-2.6/xfs_globals.c - 1.72 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_globals.c.diff?r1=text&tr1=1.72&r2=text&tr2=1.71&f=h - remove unused xfs_physmem & friends. fs/xfs/linux-2.6/xfs_super.c - 1.384 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_super.c.diff?r1=text&tr1=1.384&r2=text&tr2=1.383&f=h - remove unused xfs_physmem & friends. fs/xfs/linux-2.4/xfs_globals.h - 1.24 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.4/xfs_globals.h.diff?r1=text&tr1=1.24&r2=text&tr2=1.23&f=h - remove unused xfs_physmem & friends. fs/xfs/linux-2.4/xfs_globals.c - 1.78 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.4/xfs_globals.c.diff?r1=text&tr1=1.78&r2=text&tr2=1.77&f=h - remove unused xfs_physmem & friends. fs/xfs/linux-2.4/xfs_super.c - 1.337 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.4/xfs_super.c.diff?r1=text&tr1=1.337&r2=text&tr2=1.336&f=h - remove unused xfs_physmem & friends. From owner-xfs@oss.sgi.com Thu Aug 2 04:50:01 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 04:50:04 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l72Bnvbm012906 for ; Thu, 2 Aug 2007 04:50:00 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA09968; Thu, 2 Aug 2007 21:49:56 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 2AF9858F4B6D; Thu, 2 Aug 2007 21:49:56 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - move linux/log2.h header to xfs_linux.h Message-Id: <20070802114956.2AF9858F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 21:49:56 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12451 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs move linux/log2.h header to xfs_linux.h Generally we try not to directly include linux header files in core xfs code; xfs_linux.h is the spot for that. Signed-off-by: Eric Sandeen Date: Thu Aug 2 21:49:33 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: sandeen@sandeen.net The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29326a fs/xfs/xfs_inode.c - 1.470 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.c.diff?r1=text&tr1=1.470&r2=text&tr2=1.469&f=h - move linux/log2.h header to xfs_linux.h fs/xfs/linux-2.6/xfs_linux.h - 1.155 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_linux.h.diff?r1=text&tr1=1.155&r2=text&tr2=1.154&f=h - move linux/log2.h header to xfs_linux.h fs/xfs/linux-2.4/xfs_linux.h - 1.163 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.4/xfs_linux.h.diff?r1=text&tr1=1.163&r2=text&tr2=1.162&f=h - move linux/log2.h header to xfs_linux.h From owner-xfs@oss.sgi.com Thu Aug 2 04:54:11 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 04:54:14 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l72Bs7bm014544 for ; Thu, 2 Aug 2007 04:54:10 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA10083; Thu, 2 Aug 2007 21:53:54 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id D5C9258F4B6D; Thu, 2 Aug 2007 21:53:53 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - clean up xfs_start_flags Message-Id: <20070802115353.D5C9258F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 21:53:53 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12452 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs clean up xfs_start_flags xfs_start_flags can make use of is_power_of_2 to tidy up the test a little bit. Signed-off-by: Eric Sandeen Date: Thu Aug 2 21:53:18 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: sandeen@sandeen.net The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29327a fs/xfs/xfs_log_priv.h - 1.119 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_log_priv.h.diff?r1=text&tr1=1.119&r2=text&tr2=1.118&f=h - use of is_power_of_2 rather than explicitly testing all the possible power of 2 log buffer sizes. fs/xfs/xfs_vfsops.c - 1.523 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vfsops.c.diff?r1=text&tr1=1.523&r2=text&tr2=1.522&f=h - use of is_power_of_2 rather than explicitly testing all the possible power of 2 log buffer sizes. From owner-xfs@oss.sgi.com Thu Aug 2 05:12:05 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 05:12:08 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l72CC2bm021988 for ; Thu, 2 Aug 2007 05:12:04 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id WAA10672; Thu, 2 Aug 2007 22:12:01 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id F402E58F4B6D; Thu, 2 Aug 2007 22:12:00 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - Fix a potential NULL pointer deref in XFS on failed mount. Message-Id: <20070802121200.F402E58F4B6D@chook.melbourne.sgi.com> Date: Thu, 2 Aug 2007 22:12:00 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12453 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs Fix a potential NULL pointer deref in XFS on failed mount. If we fail to open the the log device buftarg, we can fall through to error handling code that fails to check for a NULL log device buftarg before calling xfs_free_buftarg(). This patch fixes the issue by checking mp->m_logdev_targp against NULL in xfs_unmountfs_close() and doing the proper xfs_blkdev_put(logdev); and xfs_blkdev_put(rtdev); on (!mp->m_rtdev_targp) in xfs_mount(). Discovered by the Coverity checker. Signed-off-by: Jesper Juhl Date: Thu Aug 2 22:11:36 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: jesper.juhl@gmail.com The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29328a fs/xfs/xfs_vfsops.c - 1.524 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vfsops.c.diff?r1=text&tr1=1.524&r2=text&tr2=1.523&f=h - Ensure we only ever attempt to free a log device buftarg if we allocated one in teh first place. fs/xfs/xfs_mount.c - 1.401 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.c.diff?r1=text&tr1=1.401&r2=text&tr2=1.400&f=h - Ensure we only ever attempt to free a log device buftarg if we allocated one in teh first place. From owner-xfs@oss.sgi.com Thu Aug 2 07:15:13 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 07:15:22 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: * X-Spam-Status: No, score=1.6 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_23, J_CHICKENPOX_33,J_CHICKENPOX_62 autolearn=no version=3.2.0-pre1-r499012 Received: from bay0-omc1-s16.bay0.hotmail.com (bay0-omc1-s16.bay0.hotmail.com [65.54.246.88]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l72EFCbm000427 for ; Thu, 2 Aug 2007 07:15:13 -0700 Received: from hotmail.com ([65.54.174.76]) by bay0-omc1-s16.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Thu, 2 Aug 2007 07:15:16 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Thu, 2 Aug 2007 07:15:15 -0700 Message-ID: Received: from 85.36.106.198 by BAY103-DAV4.phx.gbl with DAV; Thu, 02 Aug 2007 14:15:10 +0000 X-Originating-IP: [85.36.106.198] X-Originating-Email: [pupilla@hotmail.com] X-Sender: pupilla@hotmail.com From: "Marco Berizzi" To: Cc: "Christoph Lameter" , "David Chinner" , , "Marco Berizzi" Subject: kernel BUG at mm/slab.c:2980 (was Re: [] xfs_bmap_search_multi_extents+0x6f/0xe0) Date: Thu, 2 Aug 2007 16:14:25 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1123 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1123 X-OriginalArrivalTime: 02 Aug 2007 14:15:15.0515 (UTC) FILETIME=[8C1AF0B0:01C7D50F] X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12454 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: pupilla@hotmail.com Precedence: bulk X-list: xfs Marco Berizzi wrote: > Hello everybody. > I'm running linux 2.6.22 on Slackware. > This box is running openswan 2.4.9 > and squid 2.6S13 > I get tons of these messages: > > Jul 20 01:17:09 Gemini kernel: msnt_auth S 00000000 0 8356 819 > (NOTLB) > Jul 20 01:17:09 Gemini kernel: c2bd5d54 00000086 00000001 > 00000000 00000000 00000001 00000000 c11df050 > Jul 20 01:17:09 Gemini kernel: 00000014 c2bd5e24 c2bd5e78 > c2bd5e78 c11df050 c1255b7c c019c63f 00006559 > Jul 20 01:17:09 Gemini kernel: 7601a27a 0002faa4 7fffffff > 7fffffff c8af2d00 c2bd5db0 c02e9fc6 c2bd5e50 > Jul 20 01:17:09 Gemini kernel: Call Trace: > Jul 20 01:17:09 Gemini kernel: [] > xfs_bmap_search_multi_extents+0x6f/0xe0 > Jul 20 01:17:09 Gemini kernel: [] schedule_timeout+0x96/0xa0 > Jul 20 01:17:09 Gemini kernel: [] > unix_stream_data_wait+0xa9/0xd0 > Jul 20 01:17:09 Gemini kernel: [] > autoremove_wake_function+0x0/0x50 > Jul 20 01:17:09 Gemini kernel: [] > autoremove_wake_function+0x0/0x50 > Jul 20 01:17:09 Gemini kernel: [] > unix_stream_recvmsg+0x37c/0x3e0 > Jul 20 01:17:09 Gemini kernel: [] do_sock_read+0x9d/0xb0 > Jul 20 01:17:09 Gemini kernel: [] sock_aio_read+0x78/0x80 > Jul 20 01:17:09 Gemini kernel: [] do_sync_read+0xc0/0x100 > Jul 20 01:17:09 Gemini kernel: [] > autoremove_wake_function+0x0/0x50 > Jul 20 01:17:09 Gemini kernel: [] do_mmap_pgoff+0x3f3/0x730 > Jul 20 01:17:09 Gemini kernel: [] vfs_read+0x100/0x110 > Jul 20 01:17:09 Gemini kernel: [] sys_read+0x47/0x80 > Jul 20 01:17:09 Gemini kernel: [] syscall_call+0x7/0xb > Jul 20 01:17:09 Gemini kernel: ======================= > Jul 20 09:01:35 Gemini kernel: atkbd.c: Spurious NAK on isa0060/serio0. > Some program might be trying access hardware directly. > Jul 20 09:02:05 Gemini kernel: atkbd.c: Spurious NAK on isa0060/serio0. > Some program might be trying access hardware directly. > Jul 20 09:05:39 Gemini kernel: atkbd.c: Spurious ACK on isa0060/serio0. > Some program might be trying access hardware directly. > > Here is the dmesg and .config output: > > Linux version 2.6.22 (root@Gemini) (gcc version 3.3.6) #1 Mon Jul 9 > 13:48:37 CEST 2007 > BIOS-provided physical RAM map: > BIOS-e820: 0000000000000000 - 000000000009f800 (usable) > BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved) > BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved) > BIOS-e820: 0000000000100000 - 000000000a000000 (usable) > BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved) > 160MB LOWMEM available. > Entering add_active_range(0, 0, 40960) 0 entries of 256 used > Zone PFN ranges: > DMA 0 -> 4096 > Normal 4096 -> 40960 > early_node_map[1] active PFN ranges > 0: 0 -> 40960 > On node 0 totalpages: 40960 > DMA zone: 32 pages used for memmap > DMA zone: 0 pages reserved > DMA zone: 4064 pages, LIFO batch:0 > Normal zone: 288 pages used for memmap > Normal zone: 36576 pages, LIFO batch:7 > DMI 2.1 present. > Allocating PCI resources starting at 10000000 (gap: 0a000000:f5ff0000) > Built 1 zonelists. Total pages: 40640 > Kernel command line: auto BOOT_IMAGE=Linux ro root=301 > Local APIC disabled by BIOS -- you can enable it with "lapic" > mapped APIC to ffffd000 (01141000) > Enabling fast FPU save and restore... done. > Initializing CPU#0 > PID hash table entries: 1024 (order: 10, 4096 bytes) > Detected 267.277 MHz processor. > Console: colour VGA+ 80x25 > Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) > Inode-cache hash table entries: 16384 (order: 4, 65536 bytes) > Memory: 158964k/163840k available (1965k kernel code, 4444k reserved, > 626k data, 160k init, 0k highmem) > virtual kernel memory layout: > fixmap : 0xfffb7000 - 0xfffff000 ( 288 kB) > vmalloc : 0xca800000 - 0xfffb5000 ( 855 MB) > lowmem : 0xc0000000 - 0xca000000 ( 160 MB) > .init : 0xc038c000 - 0xc03b4000 ( 160 kB) > .data : 0xc02eb718 - 0xc0388300 ( 626 kB) > .text : 0xc0100000 - 0xc02eb718 (1965 kB) > Checking if this processor honours the WP bit even in supervisor mode... > Ok. > Calibrating delay using timer specific routine.. 535.18 BogoMIPS > (lpj=1070367) > Mount-cache hash table entries: 512 > CPU: After generic identify, caps: 0183f9ff 00000000 00000000 00000000 > 00000000 00000000 00000000 > CPU: L1 I cache: 16K, L1 D cache: 16K > CPU: After all inits, caps: 0183f9ff 00000000 00000000 00000040 00000000 > 00000000 00000000 > Compat vDSO mapped to ffffe000. > CPU: Intel Celeron (Covington) stepping 00 > Checking 'hlt' instruction... OK. > ACPI: Core revision 20070126 > ACPI Exception (tbxface-0618): AE_NO_ACPI_TABLES, While loading > namespace from ACPI tables [20070126] > ACPI: Unable to load the System Description Tables > NET: Registered protocol family 16 > PCI: PCI BIOS revision 2.10 entry at 0xfda61, last bus=1 > PCI: Using configuration type 1 > Setting up standard PCI resources > ACPI: Interpreter disabled. > Linux Plug and Play Support v0.97 (c) Adam Belay > pnp: PnP ACPI: disabled > PCI: Probing PCI hardware > PCI: Probing PCI hardware (bus 00) > * Found PM-Timer Bug on the chipset. Due to workarounds for a bug, > * this clock source is slow. Consider trying other clock sources > PCI quirk: region 6100-613f claimed by PIIX4 ACPI > PCI quirk: region 5f00-5f0f claimed by PIIX4 SMB > PCI: Using IRQ router PIIX/ICH [8086/7110] at 0000:00:07.0 > PCI: setting IRQ 11 as level-triggered > PCI: Found IRQ 11 for device 0000:00:07.2 > PCI: Sharing IRQ 11 with 0000:00:0b.0 > Time: tsc clocksource has been installed. > PCI: Bridge: 0000:00:01.0 > IO window: b000-bfff > MEM window: efe00000-efefffff > PREFETCH window: e5c00000-e7cfffff > NET: Registered protocol family 2 > IP route cache hash table entries: 2048 (order: 1, 8192 bytes) > TCP established hash table entries: 8192 (order: 4, 65536 bytes) > TCP bind hash table entries: 8192 (order: 3, 32768 bytes) > TCP: Hash tables configured (established 8192 bind 8192) > TCP reno registered > SGI XFS with no debug enabled > io scheduler noop registered > io scheduler deadline registered (default) > Limiting direct PCI/PCI transfers. > Boot video device is 0000:01:00.0 > Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2 > ide: Assuming 33MHz system bus speed for PIO modes; override with > idebus=xx > PIIX4: IDE controller at PCI slot 0000:00:07.1 > PIIX4: chipset revision 1 > PIIX4: not 100% native mode: will probe irqs later > ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:DMA, hdb:pio > ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:pio, hdd:pio > Probing IDE interface ide0... > hda: QUANTUM FIREBALL EX3.2A, ATA DISK drive > hda: selected mode 0x42 > ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 > Probing IDE interface ide1... > hda: max request size: 128KiB > hda: 6306048 sectors (3228 MB) w/418KiB Cache, CHS=6256/16/63, UDMA(33) > hda: cache flushes not supported > hda: hda1 hda2 < hda5 hda6 hda7 hda8 hda9 > > PNP: No PS/2 controller found. Probing ports directly. > serio: i8042 KBD port at 0x60,0x64 irq 1 > serio: i8042 AUX port at 0x60,0x64 irq 12 > mice: PS/2 mouse device common for all mice > nf_conntrack version 0.5.0 (1280 buckets, 10240 max) > ip_tables: (C) 2000-2006 Netfilter Core Team > TCP cubic registered > Initializing XFRM netlink socket > NET: Registered protocol family 1 > NET: Registered protocol family 17 > NET: Registered protocol family 15 > Using IPI Shortcut mode > Filesystem "hda1": Disabling barriers, not supported by the underlying > device > XFS mounting filesystem hda1 > Ending clean XFS mount for filesystem: hda1 > VFS: Mounted root (xfs filesystem) readonly. > Freeing unused kernel memory: 160k freed > input: AT Translated Set 2 keyboard as /class/input/input0 > Adding 209624k swap on /dev/hda9. Priority:-1 extents:1 across:209624k > Filesystem "hda1": Disabling barriers, not supported by the underlying > device > Filesystem "hda1": Disabling barriers, not supported by the underlying > device > PCI: setting IRQ 9 as level-triggered > PCI: Found IRQ 9 for device 0000:00:09.0 > 3c59x: Donald Becker and others. > 0000:00:09.0: 3Com PCI 3c905 Boomerang 100baseTx at 0001de00. > PCI: setting IRQ 10 as level-triggered > PCI: Found IRQ 10 for device 0000:00:0a.0 > 0000:00:0a.0: 3Com PCI 3c905 Boomerang 100baseTx at 0001dc00. > PCI: Found IRQ 11 for device 0000:00:0b.0 > PCI: Sharing IRQ 11 with 0000:00:07.2 > 0000:00:0b.0: 3Com PCI 3c905 Boomerang 100baseTx at 0001da00. > Filesystem "hda5": Disabling barriers, not supported by the underlying > device > XFS mounting filesystem hda5 > Ending clean XFS mount for filesystem: hda5 > Filesystem "hda6": Disabling barriers, not supported by the underlying > device > XFS mounting filesystem hda6 > Ending clean XFS mount for filesystem: hda6 > Filesystem "hda7": Disabling barriers, not supported by the underlying > device > XFS mounting filesystem hda7 > Ending clean XFS mount for filesystem: hda7 > Filesystem "hda8": Disabling barriers, not supported by the underlying > device > XFS mounting filesystem hda8 > Ending clean XFS mount for filesystem: hda8 > > # > # Automatically generated make config: don't edit > # Linux kernel version: 2.6.22 > # Mon Jul 9 11:57:41 2007 > # > CONFIG_X86_32=y > CONFIG_GENERIC_TIME=y > CONFIG_CLOCKSOURCE_WATCHDOG=y > CONFIG_GENERIC_CLOCKEVENTS=y > CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y > CONFIG_LOCKDEP_SUPPORT=y > CONFIG_STACKTRACE_SUPPORT=y > CONFIG_SEMAPHORE_SLEEPERS=y > CONFIG_X86=y > CONFIG_MMU=y > CONFIG_ZONE_DMA=y > CONFIG_QUICKLIST=y > CONFIG_GENERIC_ISA_DMA=y > CONFIG_GENERIC_IOMAP=y > CONFIG_GENERIC_BUG=y > CONFIG_GENERIC_HWEIGHT=y > CONFIG_ARCH_MAY_HAVE_PC_FDC=y > CONFIG_DMI=y > CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" > > # > # Code maturity level options > # > # CONFIG_EXPERIMENTAL is not set > CONFIG_BROKEN_ON_SMP=y > CONFIG_INIT_ENV_ARG_LIMIT=32 > > # > # General setup > # > CONFIG_LOCALVERSION="" > # CONFIG_LOCALVERSION_AUTO is not set > CONFIG_SWAP=y > CONFIG_SYSVIPC=y > # CONFIG_IPC_NS is not set > CONFIG_SYSVIPC_SYSCTL=y > CONFIG_BSD_PROCESS_ACCT=y > # CONFIG_BSD_PROCESS_ACCT_V3 is not set > # CONFIG_TASKSTATS is not set > # CONFIG_UTS_NS is not set > # CONFIG_AUDIT is not set > # CONFIG_IKCONFIG is not set > CONFIG_LOG_BUF_SHIFT=14 > # CONFIG_SYSFS_DEPRECATED is not set > # CONFIG_RELAY is not set > # CONFIG_BLK_DEV_INITRD is not set > CONFIG_SYSCTL=y > # CONFIG_EMBEDDED is not set > CONFIG_UID16=y > CONFIG_SYSCTL_SYSCALL=y > CONFIG_KALLSYMS=y > # CONFIG_KALLSYMS_EXTRA_PASS is not set > CONFIG_HOTPLUG=y > CONFIG_PRINTK=y > CONFIG_BUG=y > CONFIG_ELF_CORE=y > CONFIG_BASE_FULL=y > CONFIG_FUTEX=y > CONFIG_ANON_INODES=y > CONFIG_EPOLL=y > CONFIG_SIGNALFD=y > CONFIG_TIMERFD=y > CONFIG_EVENTFD=y > CONFIG_SHMEM=y > CONFIG_VM_EVENT_COUNTERS=y > CONFIG_SLAB=y > # CONFIG_SLUB is not set > # CONFIG_SLOB is not set > CONFIG_RT_MUTEXES=y > # CONFIG_TINY_SHMEM is not set > CONFIG_BASE_SMALL=0 > > # > # Loadable module support > # > CONFIG_MODULES=y > CONFIG_MODULE_UNLOAD=y > # CONFIG_MODVERSIONS is not set > # CONFIG_MODULE_SRCVERSION_ALL is not set > # CONFIG_KMOD is not set > > # > # Block layer > # > CONFIG_BLOCK=y > # CONFIG_LBD is not set > # CONFIG_BLK_DEV_IO_TRACE is not set > # CONFIG_LSF is not set > > # > # IO Schedulers > # > CONFIG_IOSCHED_NOOP=y > # CONFIG_IOSCHED_AS is not set > CONFIG_IOSCHED_DEADLINE=y > # CONFIG_IOSCHED_CFQ is not set > # CONFIG_DEFAULT_AS is not set > CONFIG_DEFAULT_DEADLINE=y > # CONFIG_DEFAULT_CFQ is not set > # CONFIG_DEFAULT_NOOP is not set > CONFIG_DEFAULT_IOSCHED="deadline" > > # > # Processor type and features > # > # CONFIG_TICK_ONESHOT is not set > # CONFIG_NO_HZ is not set > # CONFIG_HIGH_RES_TIMERS is not set > # CONFIG_SMP is not set > CONFIG_X86_PC=y > # CONFIG_X86_ELAN is not set > # CONFIG_X86_VOYAGER is not set > # CONFIG_X86_NUMAQ is not set > # CONFIG_X86_SUMMIT is not set > # CONFIG_X86_BIGSMP is not set > # CONFIG_X86_VISWS is not set > # CONFIG_X86_GENERICARCH is not set > # CONFIG_X86_ES7000 is not set > # CONFIG_M386 is not set > # CONFIG_M486 is not set > # CONFIG_M586 is not set > # CONFIG_M586TSC is not set > # CONFIG_M586MMX is not set > # CONFIG_M686 is not set > CONFIG_MPENTIUMII=y > # CONFIG_MPENTIUMIII is not set > # CONFIG_MPENTIUMM is not set > # CONFIG_MCORE2 is not set > # CONFIG_MPENTIUM4 is not set > # CONFIG_MK6 is not set > # CONFIG_MK7 is not set > # CONFIG_MK8 is not set > # CONFIG_MCRUSOE is not set > # CONFIG_MEFFICEON is not set > # CONFIG_MWINCHIPC6 is not set > # CONFIG_MWINCHIP2 is not set > # CONFIG_MWINCHIP3D is not set > # CONFIG_MGEODEGX1 is not set > # CONFIG_MGEODE_LX is not set > # CONFIG_MCYRIXIII is not set > # CONFIG_MVIAC3_2 is not set > # CONFIG_MVIAC7 is not set > # CONFIG_X86_GENERIC is not set > CONFIG_X86_CMPXCHG=y > CONFIG_X86_L1_CACHE_SHIFT=5 > CONFIG_X86_XADD=y > CONFIG_RWSEM_XCHGADD_ALGORITHM=y > # CONFIG_ARCH_HAS_ILOG2_U32 is not set > # CONFIG_ARCH_HAS_ILOG2_U64 is not set > CONFIG_GENERIC_CALIBRATE_DELAY=y > CONFIG_X86_WP_WORKS_OK=y > CONFIG_X86_INVLPG=y > CONFIG_X86_BSWAP=y > CONFIG_X86_POPAD_OK=y > CONFIG_X86_GOOD_APIC=y > CONFIG_X86_INTEL_USERCOPY=y > CONFIG_X86_USE_PPRO_CHECKSUM=y > CONFIG_X86_TSC=y > CONFIG_X86_CMOV=y > CONFIG_X86_MINIMUM_CPU_MODEL=4 > # CONFIG_HPET_TIMER is not set > CONFIG_PREEMPT_NONE=y > # CONFIG_PREEMPT_VOLUNTARY is not set > # CONFIG_PREEMPT is not set > CONFIG_X86_UP_APIC=y > CONFIG_X86_UP_IOAPIC=y > CONFIG_X86_LOCAL_APIC=y > CONFIG_X86_IO_APIC=y > # CONFIG_X86_MCE is not set > CONFIG_VM86=y > # CONFIG_TOSHIBA is not set > # CONFIG_I8K is not set > # CONFIG_X86_REBOOTFIXUPS is not set > # CONFIG_MICROCODE is not set > # CONFIG_X86_MSR is not set > # CONFIG_X86_CPUID is not set > > # > # Firmware Drivers > # > # CONFIG_EDD is not set > # CONFIG_DELL_RBU is not set > # CONFIG_DCDBAS is not set > CONFIG_NOHIGHMEM=y > # CONFIG_HIGHMEM4G is not set > # CONFIG_HIGHMEM64G is not set > CONFIG_PAGE_OFFSET=0xC0000000 > CONFIG_ARCH_POPULATES_NODE_MAP=y > CONFIG_FLATMEM=y > CONFIG_FLAT_NODE_MEM_MAP=y > # CONFIG_SPARSEMEM_STATIC is not set > CONFIG_SPLIT_PTLOCK_CPUS=4 > # CONFIG_RESOURCES_64BIT is not set > CONFIG_ZONE_DMA_FLAG=1 > CONFIG_NR_QUICK=1 > # CONFIG_MATH_EMULATION is not set > # CONFIG_MTRR is not set > # CONFIG_EFI is not set > CONFIG_SECCOMP=y > # CONFIG_HZ_100 is not set > CONFIG_HZ_250=y > # CONFIG_HZ_300 is not set > # CONFIG_HZ_1000 is not set > CONFIG_HZ=250 > # CONFIG_KEXEC is not set > CONFIG_PHYSICAL_START=0x100000 > CONFIG_PHYSICAL_ALIGN=0x100000 > # CONFIG_COMPAT_VDSO is not set > > # > # Power management options (ACPI, APM) > # > CONFIG_PM=y > # CONFIG_PM_LEGACY is not set > # CONFIG_PM_DEBUG is not set > # CONFIG_PM_SYSFS_DEPRECATED is not set > # CONFIG_SOFTWARE_SUSPEND is not set > > # > # ACPI (Advanced Configuration and Power Interface) Support > # > CONFIG_ACPI=y > # CONFIG_ACPI_SLEEP is not set > # CONFIG_ACPI_PROCFS is not set > # CONFIG_ACPI_AC is not set > # CONFIG_ACPI_BATTERY is not set > # CONFIG_ACPI_BUTTON is not set > # CONFIG_ACPI_FAN is not set > # CONFIG_ACPI_PROCESSOR is not set > # CONFIG_ACPI_ASUS is not set > # CONFIG_ACPI_TOSHIBA is not set > CONFIG_ACPI_BLACKLIST_YEAR=0 > # CONFIG_ACPI_DEBUG is not set > CONFIG_ACPI_EC=y > CONFIG_ACPI_POWER=y > CONFIG_ACPI_SYSTEM=y > CONFIG_X86_PM_TIMER=y > # CONFIG_APM is not set > > # > # CPU Frequency scaling > # > # CONFIG_CPU_FREQ is not set > > # > # Bus options (PCI, PCMCIA, EISA, MCA, ISA) > # > CONFIG_PCI=y > # CONFIG_PCI_GOBIOS is not set > # CONFIG_PCI_GOMMCONFIG is not set > # CONFIG_PCI_GODIRECT is not set > CONFIG_PCI_GOANY=y > CONFIG_PCI_BIOS=y > CONFIG_PCI_DIRECT=y > CONFIG_PCI_MMCONFIG=y > # CONFIG_PCIEPORTBUS is not set > CONFIG_ARCH_SUPPORTS_MSI=y > # CONFIG_PCI_MSI is not set > # CONFIG_HT_IRQ is not set > CONFIG_ISA_DMA_API=y > # CONFIG_ISA is not set > # CONFIG_MCA is not set > # CONFIG_SCx200 is not set > > # > # PCCARD (PCMCIA/CardBus) support > # > # CONFIG_PCCARD is not set > > # > # Executable file formats > # > CONFIG_BINFMT_ELF=y > # CONFIG_BINFMT_AOUT is not set > # CONFIG_BINFMT_MISC is not set > > # > # Networking > # > CONFIG_NET=y > > # > # Networking options > # > CONFIG_PACKET=y > CONFIG_PACKET_MMAP=y > CONFIG_UNIX=y > CONFIG_XFRM=y > CONFIG_XFRM_USER=y > CONFIG_NET_KEY=y > CONFIG_INET=y > # CONFIG_IP_MULTICAST is not set > CONFIG_IP_ADVANCED_ROUTER=y > CONFIG_ASK_IP_FIB_HASH=y > # CONFIG_IP_FIB_TRIE is not set > CONFIG_IP_FIB_HASH=y > CONFIG_IP_MULTIPLE_TABLES=y > CONFIG_IP_ROUTE_MULTIPATH=y > # CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set > CONFIG_IP_ROUTE_VERBOSE=y > # CONFIG_IP_PNP is not set > # CONFIG_NET_IPIP is not set > # CONFIG_NET_IPGRE is not set > CONFIG_SYN_COOKIES=y > # CONFIG_INET_AH is not set > CONFIG_INET_ESP=y > CONFIG_INET_IPCOMP=y > CONFIG_INET_XFRM_TUNNEL=y > CONFIG_INET_TUNNEL=y > CONFIG_INET_XFRM_MODE_TRANSPORT=y > CONFIG_INET_XFRM_MODE_TUNNEL=y > # CONFIG_INET_XFRM_MODE_BEET is not set > CONFIG_INET_DIAG=y > CONFIG_INET_TCP_DIAG=y > # CONFIG_TCP_CONG_ADVANCED is not set > CONFIG_TCP_CONG_CUBIC=y > CONFIG_DEFAULT_TCP_CONG="cubic" > # CONFIG_IP_VS is not set > # CONFIG_IPV6 is not set > # CONFIG_INET6_XFRM_TUNNEL is not set > # CONFIG_INET6_TUNNEL is not set > # CONFIG_NETWORK_SECMARK is not set > CONFIG_NETFILTER=y > # CONFIG_NETFILTER_DEBUG is not set > > # > # Core Netfilter Configuration > # > CONFIG_NETFILTER_NETLINK=m > CONFIG_NETFILTER_NETLINK_QUEUE=m > CONFIG_NETFILTER_NETLINK_LOG=m > CONFIG_NF_CONNTRACK_ENABLED=y > CONFIG_NF_CONNTRACK=y > CONFIG_NF_CT_ACCT=y > CONFIG_NF_CONNTRACK_MARK=y > CONFIG_NF_CT_PROTO_GRE=m > # CONFIG_NF_CONNTRACK_AMANDA is not set > CONFIG_NF_CONNTRACK_FTP=m > # CONFIG_NF_CONNTRACK_IRC is not set > CONFIG_NF_CONNTRACK_PPTP=m > # CONFIG_NF_CONNTRACK_TFTP is not set > CONFIG_NETFILTER_XTABLES=y > CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m > CONFIG_NETFILTER_XT_TARGET_CONNMARK=m > CONFIG_NETFILTER_XT_TARGET_DSCP=m > CONFIG_NETFILTER_XT_TARGET_MARK=y > CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m > CONFIG_NETFILTER_XT_TARGET_NFLOG=m > CONFIG_NETFILTER_XT_TARGET_NOTRACK=m > CONFIG_NETFILTER_XT_TARGET_TCPMSS=m > CONFIG_NETFILTER_XT_MATCH_COMMENT=m > CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m > CONFIG_NETFILTER_XT_MATCH_CONNMARK=m > CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m > CONFIG_NETFILTER_XT_MATCH_DCCP=m > CONFIG_NETFILTER_XT_MATCH_DSCP=m > CONFIG_NETFILTER_XT_MATCH_ESP=m > CONFIG_NETFILTER_XT_MATCH_HELPER=y > CONFIG_NETFILTER_XT_MATCH_LENGTH=m > CONFIG_NETFILTER_XT_MATCH_LIMIT=y > CONFIG_NETFILTER_XT_MATCH_MAC=m > CONFIG_NETFILTER_XT_MATCH_MARK=y > CONFIG_NETFILTER_XT_MATCH_POLICY=y > CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y > CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m > CONFIG_NETFILTER_XT_MATCH_QUOTA=m > CONFIG_NETFILTER_XT_MATCH_REALM=m > CONFIG_NETFILTER_XT_MATCH_STATE=y > CONFIG_NETFILTER_XT_MATCH_STATISTIC=m > CONFIG_NETFILTER_XT_MATCH_STRING=m > CONFIG_NETFILTER_XT_MATCH_TCPMSS=y > CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m > > # > # IP: Netfilter Configuration > # > CONFIG_NF_CONNTRACK_IPV4=y > # CONFIG_NF_CONNTRACK_PROC_COMPAT is not set > # CONFIG_IP_NF_QUEUE is not set > CONFIG_IP_NF_IPTABLES=y > CONFIG_IP_NF_MATCH_IPRANGE=m > CONFIG_IP_NF_MATCH_TOS=m > # CONFIG_IP_NF_MATCH_RECENT is not set > CONFIG_IP_NF_MATCH_ECN=m > CONFIG_IP_NF_MATCH_AH=m > CONFIG_IP_NF_MATCH_TTL=m > CONFIG_IP_NF_MATCH_OWNER=m > CONFIG_IP_NF_MATCH_ADDRTYPE=m > CONFIG_IP_NF_FILTER=y > CONFIG_IP_NF_TARGET_REJECT=y > CONFIG_IP_NF_TARGET_LOG=m > CONFIG_IP_NF_TARGET_ULOG=m > CONFIG_NF_NAT=y > CONFIG_NF_NAT_NEEDED=y > CONFIG_IP_NF_TARGET_MASQUERADE=m > CONFIG_IP_NF_TARGET_REDIRECT=m > CONFIG_IP_NF_TARGET_NETMAP=m > CONFIG_IP_NF_TARGET_SAME=m > CONFIG_NF_NAT_PROTO_GRE=m > CONFIG_NF_NAT_FTP=m > # CONFIG_NF_NAT_IRC is not set > # CONFIG_NF_NAT_TFTP is not set > # CONFIG_NF_NAT_AMANDA is not set > CONFIG_NF_NAT_PPTP=m > # CONFIG_NF_NAT_H323 is not set > # CONFIG_NF_NAT_SIP is not set > CONFIG_IP_NF_MANGLE=y > CONFIG_IP_NF_TARGET_TOS=m > CONFIG_IP_NF_TARGET_ECN=m > CONFIG_IP_NF_TARGET_TTL=m > CONFIG_IP_NF_RAW=m > CONFIG_IP_NF_ARPTABLES=m > CONFIG_IP_NF_ARPFILTER=m > CONFIG_IP_NF_ARP_MANGLE=m > # CONFIG_BRIDGE is not set > # CONFIG_VLAN_8021Q is not set > # CONFIG_DECNET is not set > # CONFIG_LLC2 is not set > # CONFIG_IPX is not set > # CONFIG_ATALK is not set > > # > # QoS and/or fair queueing > # > CONFIG_NET_SCHED=y > CONFIG_NET_SCH_FIFO=y > > # > # Queueing/Scheduling > # > # CONFIG_NET_SCH_CBQ is not set > CONFIG_NET_SCH_HTB=m > CONFIG_NET_SCH_HFSC=m > CONFIG_NET_SCH_PRIO=m > CONFIG_NET_SCH_RED=m > CONFIG_NET_SCH_SFQ=m > CONFIG_NET_SCH_TEQL=m > CONFIG_NET_SCH_TBF=m > CONFIG_NET_SCH_GRED=m > CONFIG_NET_SCH_DSMARK=m > # CONFIG_NET_SCH_NETEM is not set > CONFIG_NET_SCH_INGRESS=m > > # > # Classification > # > CONFIG_NET_CLS=y > CONFIG_NET_CLS_BASIC=m > CONFIG_NET_CLS_TCINDEX=m > CONFIG_NET_CLS_ROUTE4=m > CONFIG_NET_CLS_ROUTE=y > CONFIG_NET_CLS_FW=m > CONFIG_NET_CLS_U32=m > CONFIG_CLS_U32_PERF=y > CONFIG_CLS_U32_MARK=y > CONFIG_NET_CLS_RSVP=m > # CONFIG_NET_CLS_RSVP6 is not set > CONFIG_NET_EMATCH=y > CONFIG_NET_EMATCH_STACK=32 > CONFIG_NET_EMATCH_CMP=m > CONFIG_NET_EMATCH_NBYTE=m > CONFIG_NET_EMATCH_U32=m > CONFIG_NET_EMATCH_META=m > CONFIG_NET_EMATCH_TEXT=m > CONFIG_NET_CLS_ACT=y > CONFIG_NET_ACT_POLICE=m > CONFIG_NET_ACT_GACT=m > CONFIG_GACT_PROB=y > CONFIG_NET_ACT_MIRRED=m > CONFIG_NET_ACT_IPT=m > CONFIG_NET_ACT_PEDIT=m > # CONFIG_NET_ACT_SIMP is not set > # CONFIG_NET_CLS_IND is not set > CONFIG_NET_ESTIMATOR=y > > # > # Network testing > # > # CONFIG_NET_PKTGEN is not set > # CONFIG_HAMRADIO is not set > # CONFIG_IRDA is not set > # CONFIG_BT is not set > CONFIG_FIB_RULES=y > > # > # Wireless > # > # CONFIG_CFG80211 is not set > # CONFIG_WIRELESS_EXT is not set > # CONFIG_IEEE80211 is not set > # CONFIG_RFKILL is not set > > # > # Device Drivers > # > > # > # Generic Driver Options > # > CONFIG_STANDALONE=y > # CONFIG_PREVENT_FIRMWARE_BUILD is not set > # CONFIG_FW_LOADER is not set > # CONFIG_SYS_HYPERVISOR is not set > > # > # Connector - unified userspace <-> kernelspace linker > # > # CONFIG_CONNECTOR is not set > # CONFIG_MTD is not set > > # > # Parallel port support > # > # CONFIG_PARPORT is not set > > # > # Plug and Play support > # > CONFIG_PNP=y > # CONFIG_PNP_DEBUG is not set > > # > # Protocols > # > CONFIG_PNPACPI=y > > # > # Block devices > # > CONFIG_BLK_DEV_FD=m > # CONFIG_BLK_CPQ_DA is not set > # CONFIG_BLK_CPQ_CISS_DA is not set > # CONFIG_BLK_DEV_DAC960 is not set > # CONFIG_BLK_DEV_COW_COMMON is not set > # CONFIG_BLK_DEV_LOOP is not set > # CONFIG_BLK_DEV_NBD is not set > # CONFIG_BLK_DEV_SX8 is not set > # CONFIG_BLK_DEV_RAM is not set > # CONFIG_CDROM_PKTCDVD is not set > # CONFIG_ATA_OVER_ETH is not set > > # > # Misc devices > # > # CONFIG_PHANTOM is not set > # CONFIG_SGI_IOC4 is not set > # CONFIG_SONY_LAPTOP is not set > # CONFIG_THINKPAD_ACPI is not set > CONFIG_IDE=y > CONFIG_BLK_DEV_IDE=y > > # > # Please see Documentation/ide.txt for help/info on IDE drives > # > # CONFIG_BLK_DEV_IDE_SATA is not set > # CONFIG_BLK_DEV_HD_IDE is not set > CONFIG_BLK_DEV_IDEDISK=y > # CONFIG_IDEDISK_MULTI_MODE is not set > CONFIG_BLK_DEV_IDECD=m > # CONFIG_BLK_DEV_IDEFLOPPY is not set > # CONFIG_BLK_DEV_IDEACPI is not set > # CONFIG_IDE_TASK_IOCTL is not set > # CONFIG_IDE_PROC_FS is not set > > # > # IDE chipset support/bugfixes > # > # CONFIG_IDE_GENERIC is not set > # CONFIG_BLK_DEV_CMD640 is not set > # CONFIG_BLK_DEV_IDEPNP is not set > CONFIG_BLK_DEV_IDEPCI=y > CONFIG_IDEPCI_SHARE_IRQ=y > CONFIG_IDEPCI_PCIBUS_ORDER=y > # CONFIG_BLK_DEV_OFFBOARD is not set > # CONFIG_BLK_DEV_GENERIC is not set > # CONFIG_BLK_DEV_RZ1000 is not set > CONFIG_BLK_DEV_IDEDMA_PCI=y > # CONFIG_BLK_DEV_IDEDMA_FORCED is not set > CONFIG_IDEDMA_ONLYDISK=y > # CONFIG_BLK_DEV_AEC62XX is not set > # CONFIG_BLK_DEV_ALI15X3 is not set > # CONFIG_BLK_DEV_AMD74XX is not set > # CONFIG_BLK_DEV_ATIIXP is not set > # CONFIG_BLK_DEV_CMD64X is not set > # CONFIG_BLK_DEV_TRIFLEX is not set > # CONFIG_BLK_DEV_CY82C693 is not set > # CONFIG_BLK_DEV_CS5530 is not set > # CONFIG_BLK_DEV_CS5535 is not set > # CONFIG_BLK_DEV_HPT34X is not set > # CONFIG_BLK_DEV_HPT366 is not set > # CONFIG_BLK_DEV_JMICRON is not set > # CONFIG_BLK_DEV_SC1200 is not set > CONFIG_BLK_DEV_PIIX=y > # CONFIG_BLK_DEV_IT8213 is not set > # CONFIG_BLK_DEV_IT821X is not set > # CONFIG_BLK_DEV_NS87415 is not set > # CONFIG_BLK_DEV_PDC202XX_OLD is not set > # CONFIG_BLK_DEV_PDC202XX_NEW is not set > # CONFIG_BLK_DEV_SVWKS is not set > # CONFIG_BLK_DEV_SIIMAGE is not set > # CONFIG_BLK_DEV_SIS5513 is not set > # CONFIG_BLK_DEV_SLC90E66 is not set > # CONFIG_BLK_DEV_TRM290 is not set > # CONFIG_BLK_DEV_VIA82CXXX is not set > # CONFIG_BLK_DEV_TC86C001 is not set > # CONFIG_IDE_ARM is not set > CONFIG_BLK_DEV_IDEDMA=y > # CONFIG_IDEDMA_IVB is not set > # CONFIG_BLK_DEV_HD is not set > > # > # SCSI device support > # > # CONFIG_RAID_ATTRS is not set > # CONFIG_SCSI is not set > # CONFIG_SCSI_NETLINK is not set > # CONFIG_ATA is not set > > # > # Multi-device support (RAID and LVM) > # > # CONFIG_MD is not set > > # > # Fusion MPT device support > # > # CONFIG_FUSION is not set > > # > # IEEE 1394 (FireWire) support > # > > # > # An alternative FireWire stack is available with EXPERIMENTAL=y > # > # CONFIG_IEEE1394 is not set > > # > # I2O device support > # > # CONFIG_I2O is not set > # CONFIG_MACINTOSH_DRIVERS is not set > > # > # Network device support > # > CONFIG_NETDEVICES=y > CONFIG_IFB=m > # CONFIG_DUMMY is not set > # CONFIG_BONDING is not set > # CONFIG_EQUALIZER is not set > CONFIG_TUN=m > # CONFIG_NET_SB1000 is not set > # CONFIG_ARCNET is not set > # CONFIG_PHYLIB is not set > > # > # Ethernet (10 or 100Mbit) > # > CONFIG_NET_ETHERNET=y > CONFIG_MII=m > # CONFIG_HAPPYMEAL is not set > # CONFIG_SUNGEM is not set > # CONFIG_CASSINI is not set > CONFIG_NET_VENDOR_3COM=y > CONFIG_VORTEX=m > # CONFIG_TYPHOON is not set > > # > # Tulip family network device support > # > # CONFIG_NET_TULIP is not set > # CONFIG_HP100 is not set > # CONFIG_NET_PCI is not set > # CONFIG_NETDEV_1000 is not set > # CONFIG_NETDEV_10000 is not set > # CONFIG_TR is not set > > # > # Wireless LAN > # > # CONFIG_WLAN_PRE80211 is not set > # CONFIG_WLAN_80211 is not set > # CONFIG_WAN is not set > # CONFIG_FDDI is not set > # CONFIG_PPP is not set > # CONFIG_SLIP is not set > # CONFIG_NETPOLL is not set > # CONFIG_NET_POLL_CONTROLLER is not set > > # > # ISDN subsystem > # > # CONFIG_ISDN is not set > > # > # Telephony Support > # > # CONFIG_PHONE is not set > > # > # Input device support > # > CONFIG_INPUT=y > # CONFIG_INPUT_FF_MEMLESS is not set > # CONFIG_INPUT_POLLDEV is not set > > # > # Userland interfaces > # > CONFIG_INPUT_MOUSEDEV=y > # CONFIG_INPUT_MOUSEDEV_PSAUX is not set > CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 > CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 > # CONFIG_INPUT_JOYDEV is not set > # CONFIG_INPUT_TSDEV is not set > # CONFIG_INPUT_EVDEV is not set > # CONFIG_INPUT_EVBUG is not set > > # > # Input Device Drivers > # > CONFIG_INPUT_KEYBOARD=y > CONFIG_KEYBOARD_ATKBD=y > # CONFIG_KEYBOARD_SUNKBD is not set > # CONFIG_KEYBOARD_LKKBD is not set > # CONFIG_KEYBOARD_XTKBD is not set > # CONFIG_KEYBOARD_NEWTON is not set > # CONFIG_KEYBOARD_STOWAWAY is not set > # CONFIG_INPUT_MOUSE is not set > # CONFIG_INPUT_JOYSTICK is not set > # CONFIG_INPUT_TABLET is not set > # CONFIG_INPUT_TOUCHSCREEN is not set > # CONFIG_INPUT_MISC is not set > > # > # Hardware I/O ports > # > CONFIG_SERIO=y > CONFIG_SERIO_I8042=y > # CONFIG_SERIO_SERPORT is not set > # CONFIG_SERIO_CT82C710 is not set > # CONFIG_SERIO_PCIPS2 is not set > CONFIG_SERIO_LIBPS2=y > # CONFIG_SERIO_RAW is not set > # CONFIG_GAMEPORT is not set > > # > # Character devices > # > CONFIG_VT=y > CONFIG_VT_CONSOLE=y > CONFIG_HW_CONSOLE=y > # CONFIG_VT_HW_CONSOLE_BINDING is not set > # CONFIG_SERIAL_NONSTANDARD is not set > > # > # Serial drivers > # > # CONFIG_SERIAL_8250 is not set > > # > # Non-8250 serial port support > # > # CONFIG_SERIAL_JSM is not set > CONFIG_UNIX98_PTYS=y > # CONFIG_LEGACY_PTYS is not set > > # > # IPMI > # > # CONFIG_IPMI_HANDLER is not set > # CONFIG_WATCHDOG is not set > # CONFIG_HW_RANDOM is not set > # CONFIG_NVRAM is not set > # CONFIG_RTC is not set > # CONFIG_GEN_RTC is not set > # CONFIG_R3964 is not set > # CONFIG_APPLICOM is not set > # CONFIG_AGP is not set > # CONFIG_DRM is not set > # CONFIG_MWAVE is not set > # CONFIG_PC8736x_GPIO is not set > # CONFIG_NSC_GPIO is not set > # CONFIG_CS5535_GPIO is not set > # CONFIG_RAW_DRIVER is not set > # CONFIG_HPET is not set > # CONFIG_HANGCHECK_TIMER is not set > > # > # TPM devices > # > CONFIG_DEVPORT=y > # CONFIG_I2C is not set > > # > # SPI support > # > # CONFIG_SPI is not set > # CONFIG_SPI_MASTER is not set > > # > # Dallas's 1-wire bus > # > # CONFIG_W1 is not set > # CONFIG_HWMON is not set > > # > # Multifunction device drivers > # > # CONFIG_MFD_SM501 is not set > > # > # Multimedia devices > # > # CONFIG_VIDEO_DEV is not set > # CONFIG_DVB_CORE is not set > # CONFIG_DAB is not set > > # > # Graphics support > # > # CONFIG_BACKLIGHT_LCD_SUPPORT is not set > > # > # Display device support > # > # CONFIG_DISPLAY_SUPPORT is not set > # CONFIG_VGASTATE is not set > # CONFIG_FB is not set > > # > # Console display driver support > # > CONFIG_VGA_CONSOLE=y > # CONFIG_VGACON_SOFT_SCROLLBACK is not set > # CONFIG_VIDEO_SELECT is not set > CONFIG_DUMMY_CONSOLE=y > > # > # Sound > # > # CONFIG_SOUND is not set > > # > # HID Devices > # > # CONFIG_HID is not set > > # > # USB support > # > CONFIG_USB_ARCH_HAS_HCD=y > CONFIG_USB_ARCH_HAS_OHCI=y > CONFIG_USB_ARCH_HAS_EHCI=y > # CONFIG_USB is not set > > # > # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' > # > > # > # USB Gadget Support > # > # CONFIG_USB_GADGET is not set > # CONFIG_MMC is not set > > # > # LED devices > # > # CONFIG_NEW_LEDS is not set > > # > # LED drivers > # > > # > # LED Triggers > # > > # > # InfiniBand support > # > # CONFIG_INFINIBAND is not set > > # > # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) > # > > # > # Real Time Clock > # > > # > # DMA Engine support > # > # CONFIG_DMA_ENGINE is not set > > # > # DMA Clients > # > > # > # DMA Devices > # > > # > # Virtualization > # > > # > # File systems > # > CONFIG_EXT2_FS=m > # CONFIG_EXT2_FS_XATTR is not set > # CONFIG_EXT2_FS_XIP is not set > # CONFIG_EXT3_FS is not set > # CONFIG_REISERFS_FS is not set > # CONFIG_JFS_FS is not set > # CONFIG_FS_POSIX_ACL is not set > CONFIG_XFS_FS=y > # CONFIG_XFS_QUOTA is not set > # CONFIG_XFS_SECURITY is not set > # CONFIG_XFS_POSIX_ACL is not set > # CONFIG_XFS_RT is not set > # CONFIG_OCFS2_FS is not set > # CONFIG_MINIX_FS is not set > # CONFIG_ROMFS_FS is not set > CONFIG_INOTIFY=y > CONFIG_INOTIFY_USER=y > # CONFIG_QUOTA is not set > CONFIG_DNOTIFY=y > # CONFIG_AUTOFS_FS is not set > # CONFIG_AUTOFS4_FS is not set > # CONFIG_FUSE_FS is not set > > # > # CD-ROM/DVD Filesystems > # > CONFIG_ISO9660_FS=m > # CONFIG_JOLIET is not set > # CONFIG_ZISOFS is not set > # CONFIG_UDF_FS is not set > > # > # DOS/FAT/NT Filesystems > # > # CONFIG_MSDOS_FS is not set > # CONFIG_VFAT_FS is not set > # CONFIG_NTFS_FS is not set > > # > # Pseudo filesystems > # > CONFIG_PROC_FS=y > CONFIG_PROC_KCORE=y > CONFIG_PROC_SYSCTL=y > CONFIG_SYSFS=y > # CONFIG_TMPFS is not set > # CONFIG_HUGETLBFS is not set > # CONFIG_HUGETLB_PAGE is not set > CONFIG_RAMFS=y > > # > # Miscellaneous filesystems > # > # CONFIG_HFSPLUS_FS is not set > # CONFIG_CRAMFS is not set > # CONFIG_VXFS_FS is not set > # CONFIG_HPFS_FS is not set > # CONFIG_QNX4FS_FS is not set > # CONFIG_SYSV_FS is not set > # CONFIG_UFS_FS is not set > > # > # Network File Systems > # > # CONFIG_NFS_FS is not set > # CONFIG_NFSD is not set > # CONFIG_SMB_FS is not set > # CONFIG_CIFS is not set > # CONFIG_NCP_FS is not set > # CONFIG_CODA_FS is not set > > # > # Partition Types > # > # CONFIG_PARTITION_ADVANCED is not set > CONFIG_MSDOS_PARTITION=y > > # > # Native Language Support > # > # CONFIG_NLS is not set > > # > # Kernel hacking > # > CONFIG_TRACE_IRQFLAGS_SUPPORT=y > # CONFIG_PRINTK_TIME is not set > # CONFIG_ENABLE_MUST_CHECK is not set > # CONFIG_MAGIC_SYSRQ is not set > # CONFIG_UNUSED_SYMBOLS is not set > # CONFIG_DEBUG_FS is not set > # CONFIG_HEADERS_CHECK is not set > # CONFIG_DEBUG_KERNEL is not set > CONFIG_DEBUG_BUGVERBOSE=y > CONFIG_EARLY_PRINTK=y > CONFIG_X86_FIND_SMP_CONFIG=y > CONFIG_X86_MPPARSE=y > CONFIG_DOUBLEFAULT=y > > # > # Security options > # > # CONFIG_KEYS is not set > # CONFIG_SECURITY is not set > > # > # Cryptographic options > # > CONFIG_CRYPTO=y > CONFIG_CRYPTO_ALGAPI=y > CONFIG_CRYPTO_BLKCIPHER=y > CONFIG_CRYPTO_HASH=y > CONFIG_CRYPTO_MANAGER=y > CONFIG_CRYPTO_HMAC=y > # CONFIG_CRYPTO_NULL is not set > # CONFIG_CRYPTO_MD4 is not set > CONFIG_CRYPTO_MD5=y > CONFIG_CRYPTO_SHA1=y > CONFIG_CRYPTO_SHA256=y > CONFIG_CRYPTO_SHA512=y > # CONFIG_CRYPTO_WP512 is not set > # CONFIG_CRYPTO_TGR192 is not set > CONFIG_CRYPTO_ECB=m > CONFIG_CRYPTO_CBC=y > # CONFIG_CRYPTO_PCBC is not set > # CONFIG_CRYPTO_CRYPTD is not set > CONFIG_CRYPTO_DES=y > # CONFIG_CRYPTO_FCRYPT is not set > CONFIG_CRYPTO_BLOWFISH=m > # CONFIG_CRYPTO_TWOFISH is not set > CONFIG_CRYPTO_TWOFISH_COMMON=m > CONFIG_CRYPTO_TWOFISH_586=m > CONFIG_CRYPTO_SERPENT=m > # CONFIG_CRYPTO_AES is not set > CONFIG_CRYPTO_AES_586=y > # CONFIG_CRYPTO_CAST5 is not set > # CONFIG_CRYPTO_CAST6 is not set > # CONFIG_CRYPTO_TEA is not set > # CONFIG_CRYPTO_ARC4 is not set > # CONFIG_CRYPTO_KHAZAD is not set > # CONFIG_CRYPTO_ANUBIS is not set > CONFIG_CRYPTO_DEFLATE=y > # CONFIG_CRYPTO_MICHAEL_MIC is not set > # CONFIG_CRYPTO_CRC32C is not set > # CONFIG_CRYPTO_CAMELLIA is not set > # CONFIG_CRYPTO_TEST is not set > > # > # Hardware crypto devices > # > # CONFIG_CRYPTO_DEV_PADLOCK is not set > # CONFIG_CRYPTO_DEV_GEODE is not set > > # > # Library routines > # > CONFIG_BITREVERSE=m > CONFIG_CRC_CCITT=m > CONFIG_CRC16=m > # CONFIG_CRC_ITU_T is not set > CONFIG_CRC32=m > CONFIG_LIBCRC32C=m > CONFIG_ZLIB_INFLATE=y > CONFIG_ZLIB_DEFLATE=y > CONFIG_TEXTSEARCH=y > CONFIG_TEXTSEARCH_KMP=m > CONFIG_TEXTSEARCH_BM=m > CONFIG_TEXTSEARCH_FSM=m > CONFIG_PLIST=y > CONFIG_HAS_IOMEM=y > CONFIG_HAS_IOPORT=y > CONFIG_HAS_DMA=y > CONFIG_GENERIC_HARDIRQS=y > CONFIG_GENERIC_IRQ_PROBE=y > CONFIG_X86_BIOS_REBOOT=y > CONFIG_KTIME_SCALAR=y Me again. Just few minutes ago linux has been definitely crashed. This is the dmesg: Aug 2 15:24:36 Gemini kernel: BUG: unable to handle kernel paging request at virtual address cbb93164 Aug 2 15:24:36 Gemini kernel: printing eip: Aug 2 15:24:36 Gemini kernel: c014e83f Aug 2 15:24:36 Gemini kernel: *pde = 00000000 Aug 2 15:24:36 Gemini kernel: Oops: 0002 [#1] Aug 2 15:24:36 Gemini kernel: Modules linked in: nf_nat_pptp nf_nat_proto_gre nf_conntrack_pptp nf_conntrack_proto_gre nf_nat_ftp nf_conntrack_ftp 3c59x mii Aug 2 15:24:36 Gemini kernel: CPU: 0 Aug 2 15:24:36 Gemini kernel: EIP: 0060:[] Not tainted VLI Aug 2 15:24:36 Gemini kernel: EFLAGS: 00010807 (2.6.22 #1) Aug 2 15:24:36 Gemini kernel: EIP is at slab_put_obj+0x1f/0x40 Aug 2 15:24:36 Gemini kernel: eax: ffffffff ebx: c925a000 ecx: 5a2cdcd1 edx: 00a4e452 Aug 2 15:24:36 Gemini kernel: esi: c11ff1e0 edi: c925a000 ebp: 0000000b esp: c9fe9ed0 Aug 2 15:24:36 Gemini kernel: ds: 007b es: 007b fs: 0000 gs: 0000 ss: 0068 Aug 2 15:24:37 Gemini kernel: Process xfssyncd (pid: 223, ti=c9fe8000 task=c11b2a90 task.ti=c9fe8000) Aug 2 15:24:37 Gemini kernel: Stack: c925a000 c11c06a0 c11ff1e0 c014ec16 00000000 0000003c c11b9010 c11b9010 Aug 2 15:24:37 Gemini kernel: c11ff1e0 c11ff1e0 00000000 c014ecdf 00000000 0000003c c11b9000 c11b9000 Aug 2 15:24:37 Gemini kernel: 00000246 c11ff1e0 c9a3aaf0 c014f069 c9dce3e0 c9dce3e0 00000001 00000002 Aug 2 15:24:37 Gemini kernel: Call Trace: Aug 2 15:24:37 Gemini kernel: [] free_block+0x86/0x100 Aug 2 15:24:37 Gemini kernel: [] cache_flusharray+0x4f/0xc0 Aug 2 15:24:37 Gemini kernel: [] kmem_cache_free+0x69/0x90 Aug 2 15:24:37 Gemini kernel: [] xfs_idestroy+0x40/0x90 Aug 2 15:24:37 Gemini kernel: [] xfs_finish_reclaim+0xb3/0x120 Aug 2 15:24:37 Gemini kernel: [] xfs_finish_reclaim_all+0xc9/0xf0 Aug 2 15:24:37 Gemini kernel: [] xfs_syncsub+0x63/0x290 Aug 2 15:24:37 Gemini kernel: [] schedule_timeout+0x55/0xa0 Aug 2 15:24:37 Gemini kernel: [] vfs_sync+0x22/0x30 Aug 2 15:24:37 Gemini kernel: [] vfs_sync_worker+0x41/0x50 Aug 2 15:24:37 Gemini kernel: [] xfssyncd+0x109/0x180 Aug 2 15:24:37 Gemini kernel: [] xfssyncd+0x0/0x180 Aug 2 15:24:37 Gemini kernel: [] kthread+0x6a/0x70 Aug 2 15:24:37 Gemini kernel: [] kthread+0x0/0x70 Aug 2 15:24:37 Gemini kernel: [] kernel_thread_helper+0x7/0x10 Aug 2 15:24:37 Gemini kernel: ======================= Aug 2 15:24:37 Gemini kernel: Code: 4a 14 c3 89 f6 8d bc 27 00 00 00 00 83 ec 0c 89 74 24 04 89 c6 89 7c 24 08 89 d7 89 1c 24 8b 42 0c 29 c1 89 c8 f7 66 14 8b 47 14 <89> 44 97 1c 8b 1c 24 89 57 14 8b 74 24 04 ff 4f 10 8b 7c 24 08 Aug 2 15:24:37 Gemini kernel: EIP: [] slab_put_obj+0x1f/0x40 SS:ESP 0068:c9fe9ed0 Aug 2 15:24:40 Gemini kernel: BUG: unable to handle kernel paging request at virtual address 00100104 Aug 2 15:24:40 Gemini kernel: printing eip: Aug 2 15:24:40 Gemini kernel: c014ebf4 Aug 2 15:24:40 Gemini kernel: *pde = 00000000 Aug 2 15:24:40 Gemini kernel: Oops: 0002 [#2] Aug 2 15:24:40 Gemini kernel: Modules linked in: nf_nat_pptp nf_nat_proto_gre nf_conntrack_pptp nf_conntrack_proto_gre nf_nat_ftp nf_conntrack_ftp 3c59x mii Aug 2 15:24:40 Gemini kernel: CPU: 0 Aug 2 15:24:40 Gemini kernel: EIP: 0060:[] Not tainted VLI Aug 2 15:24:40 Gemini kernel: EFLAGS: 00010082 (2.6.22 #1) Aug 2 15:24:40 Gemini kernel: EIP is at free_block+0x64/0x100 Aug 2 15:24:40 Gemini kernel: eax: 00100100 ebx: c925a000 ecx: c925a4ec edx: 00200200 Aug 2 15:24:40 Gemini kernel: esi: c11c06a0 edi: c11ff1e0 ebp: 0000000b esp: c11a3f14 Aug 2 15:24:40 Gemini kernel: ds: 007b es: 007b fs: 0000 gs: 0000 ss: 0068 Aug 2 15:24:40 Gemini kernel: Process events/0 (pid: 4, ti=c11a2000 task=c1195a50 task.ti=c11a2000) Aug 2 15:24:40 Gemini kernel: Stack: 00000000 00000018 c11b9010 c11b9010 c11b9000 00000018 c11ff1e0 c014f4e1 Aug 2 15:24:40 Gemini kernel: 00000000 c11c06a0 c11ff1e0 c03cdc20 00000000 c014f55b 00000000 00000000 Aug 2 15:24:40 Gemini kernel: 00038e6b c03cdc20 c117e8a0 c014f500 c01228ea 00005ead 7180abb4 00073f12 Aug 2 15:24:40 Gemini kernel: Call Trace: Aug 2 15:24:40 Gemini kernel: [] drain_array+0x91/0xb0 Aug 2 15:24:40 Gemini kernel: [] cache_reap+0x5b/0x100 Aug 2 15:24:40 Gemini kernel: [] cache_reap+0x0/0x100 Aug 2 15:24:40 Gemini kernel: [] run_workqueue+0x4a/0x100 Aug 2 15:24:40 Gemini kernel: [] worker_thread+0xcb/0x100 Aug 2 15:24:40 Gemini kernel: [] autoremove_wake_function+0x0/0x50 Aug 2 15:24:40 Gemini kernel: [] __wake_up_common+0x37/0x70 Aug 2 15:24:40 Gemini kernel: [] autoremove_wake_function+0x0/0x50 Aug 2 15:24:40 Gemini kernel: [] worker_thread+0x0/0x100 Aug 2 15:24:40 Gemini kernel: [] kthread+0x6a/0x70 Aug 2 15:24:40 Gemini kernel: [] kthread+0x0/0x70 Aug 2 15:24:40 Gemini kernel: [] kernel_thread_helper+0x7/0x10 Aug 2 15:24:40 Gemini kernel: ======================= Aug 2 15:24:40 Gemini kernel: Code: da 25 00 40 02 00 3d 00 40 02 00 0f 84 a8 00 00 00 8b 02 a8 80 0f 84 8b 00 00 00 8b 5a 1c 8b 44 24 20 8b 53 04 8b 74 87 4c 8b 03 <89> 50 04 89 02 89 da c7 03 00 01 10 00 c7 43 04 00 02 20 00 8b Aug 2 15:24:40 Gemini kernel: EIP: [] free_block+0x64/0x100 SS:ESP 0068:c11a3f14 Aug 2 15:29:03 Gemini kernel: ------------[ cut here ]------------ Aug 2 15:29:03 Gemini kernel: kernel BUG at mm/slab.c:2980! Aug 2 15:29:03 Gemini kernel: invalid opcode: 0000 [#3] Aug 2 15:29:03 Gemini kernel: Modules linked in: nf_nat_pptp nf_nat_proto_gre nf_conntrack_pptp nf_conntrack_proto_gre nf_nat_ftp nf_conntrack_ftp 3c59x mii Aug 2 15:29:03 Gemini kernel: CPU: 0 Aug 2 15:29:03 Gemini kernel: EIP: 0060:[] Not tainted VLI Aug 2 15:29:03 Gemini kernel: EFLAGS: 00010046 (2.6.22 #1) Aug 2 15:29:03 Gemini kernel: EIP is at cache_alloc_refill+0x16d/0x1c0 Aug 2 15:29:03 Gemini kernel: eax: 0000001c ebx: 00000005 ecx: 00000036 edx: c11ff1e0 Aug 2 15:29:03 Gemini kernel: esi: c8a40000 edi: c11c06a0 ebp: c11b9000 esp: c8da7dc8 Aug 2 15:29:03 Gemini kernel: ds: 007b es: 007b fs: 0000 gs: 0033 ss: 0068 Aug 2 15:29:03 Gemini kernel: Process unlinkd (pid: 2476, ti=c8da6000 task=c11b3ab0 task.ti=c8da6000) Aug 2 15:29:03 Gemini kernel: Stack: c9fb1400 c11c06a8 00000036 00000250 c11ff1e0 00000286 c11ff1e0 00000250 Aug 2 15:29:03 Gemini kernel: c11ff1e0 c014ed8f 00000000 00000001 c01de776 c9fb1400 00025638 c01c5554 Aug 2 15:29:03 Gemini kernel: c6355800 c9fb1400 c11ff1e0 c64340d4 c01de805 c6355800 c9fb1400 00000004 Aug 2 15:29:03 Gemini kernel: Call Trace: Aug 2 15:29:03 Gemini kernel: [] kmem_cache_alloc+0x3f/0x50 Aug 2 15:29:03 Gemini kernel: [] kmem_zone_alloc+0x46/0xc0 Aug 2 15:29:03 Gemini kernel: [] xfs_log_reserve+0xa4/0xb0 Aug 2 15:29:03 Gemini kernel: [] kmem_zone_zalloc+0x15/0x50 Aug 2 15:29:03 Gemini kernel: [] xfs_inode_item_init+0x1d/0x80 Aug 2 15:29:03 Gemini kernel: [] xfs_trans_ijoin+0x6f/0x80 Aug 2 15:29:03 Gemini kernel: [] xfs_remove+0x1c3/0x460 Aug 2 15:29:03 Gemini kernel: [] xfs_vn_unlink+0x23/0x60 Aug 2 15:29:03 Gemini kernel: [] xfs_dir_lookup_int+0x9b/0x100 Aug 2 15:29:03 Gemini kernel: [] xfs_trans_unlocked_item+0x38/0x60 Aug 2 15:29:03 Gemini kernel: [] xfs_lookup+0x6a/0x80 Aug 2 15:29:03 Gemini kernel: [] d_instantiate+0x30/0x50 Aug 2 15:29:03 Gemini kernel: [] d_splice_alias+0x2d/0xa0 Aug 2 15:29:03 Gemini kernel: [] permission+0x89/0xd0 Aug 2 15:29:03 Gemini kernel: [] vfs_unlink+0x88/0x90 Aug 2 15:29:03 Gemini kernel: [] do_unlinkat+0x94/0x110 Aug 2 15:29:03 Gemini kernel: [] vfs_read+0xe8/0x110 Aug 2 15:29:03 Gemini kernel: [] sys_read+0x47/0x80 Aug 2 15:29:03 Gemini kernel: [] syscall_call+0x7/0xb Aug 2 15:29:03 Gemini kernel: ======================= Aug 2 15:29:03 Gemini kernel: Code: d2 0f 84 cb fe ff ff eb ba 8b 55 00 31 c0 85 d2 75 b1 eb c0 8b 47 08 89 70 04 89 06 8b 44 24 04 89 77 08 89 46 04 e9 7a ff ff ff <0f> 0b 90 eb fe c7 47 30 01 00 00 00 8b 77 10 8d 47 10 39 c6 0f Aug 2 15:29:03 Gemini kernel: EIP: [] cache_alloc_refill+0x16d/0x1c0 SS:ESP 0068:c8da7dc8 From owner-xfs@oss.sgi.com Thu Aug 2 07:34:21 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 07:34:24 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_24 autolearn=no version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l72EYEbm007625 for ; Thu, 2 Aug 2007 07:34:17 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l72EYHA5030564 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 2 Aug 2007 16:34:17 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l72EYH8i030562 for xfs@oss.sgi.com; Thu, 2 Aug 2007 16:34:17 +0200 Date: Thu, 2 Aug 2007 16:34:17 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH] remove unessecary vfs argument to DM_EVENT_ENABLED Message-ID: <20070802143417.GA30414@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12455 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs We can easily derive the vfs from the inode passed in. Also kill the unused DM_EVENT_ENABLED_IO macro. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm.c 2007-08-01 19:53:27.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c 2007-08-01 19:53:42.000000000 +0200 @@ -3271,8 +3271,7 @@ xfs_dm_send_mmap_event( xfs_ilock(ip, iolock); /* If write possible, try a DMAPI write event */ - if ((max_event == DM_EVENT_WRITE) && - DM_EVENT_ENABLED(vp->v_vfsp, ip, max_event)){ + if (max_event == DM_EVENT_WRITE && DM_EVENT_ENABLED(ip, max_event)) { error = xfs_dm_send_data_event(max_event, vp, offset, evsize, 0, &locktype); goto out_unlock; @@ -3281,7 +3280,7 @@ xfs_dm_send_mmap_event( /* Try a read event if max_event was != DM_EVENT_WRITE or if it * was DM_EVENT_WRITE but the WRITE event was not enabled. */ - if (DM_EVENT_ENABLED (vp->v_vfsp, ip, DM_EVENT_READ)) { + if (DM_EVENT_ENABLED(ip, DM_EVENT_READ)) { error = xfs_dm_send_data_event(DM_EVENT_READ, vp, offset, evsize, 0, &locktype); } Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_file.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_file.c 2007-08-01 19:53:22.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_file.c 2007-08-01 19:53:42.000000000 +0200 @@ -384,7 +384,7 @@ xfs_file_open_exec( if (!ip) return -EINVAL; - if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ)) + if (DM_EVENT_ENABLED(ip, DM_EVENT_READ)) return -XFS_SEND_DATA(mp, DM_EVENT_READ, vp, 0, 0, 0, NULL); } Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_lrw.c 2007-08-01 19:53:27.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c 2007-08-01 19:56:14.000000000 +0200 @@ -245,8 +245,7 @@ xfs_read( mutex_lock(&inode->i_mutex); xfs_ilock(ip, XFS_IOLOCK_SHARED); - if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ) && - !(ioflags & IO_INVIS)) { + if (DM_EVENT_ENABLED(ip, DM_EVENT_READ) && !(ioflags & IO_INVIS)) { bhv_vrwlock_t locktype = VRWLOCK_READ; int dmflags = FILP_DELAY_FLAG(file) | DM_SEM_FLAG_RD(ioflags); @@ -307,8 +306,7 @@ xfs_sendfile( xfs_ilock(ip, XFS_IOLOCK_SHARED); - if (DM_EVENT_ENABLED(BHV_TO_VNODE(bdp)->v_vfsp, ip, DM_EVENT_READ) && - (!(ioflags & IO_INVIS))) { + if (DM_EVENT_ENABLED(ip, DM_EVENT_READ) && !(ioflags & IO_INVIS)) { bhv_vrwlock_t locktype = VRWLOCK_READ; int error; @@ -351,8 +349,7 @@ xfs_splice_read( xfs_ilock(ip, XFS_IOLOCK_SHARED); - if (DM_EVENT_ENABLED(BHV_TO_VNODE(bdp)->v_vfsp, ip, DM_EVENT_READ) && - (!(ioflags & IO_INVIS))) { + if (DM_EVENT_ENABLED(ip, DM_EVENT_READ) && !(ioflags & IO_INVIS)) { bhv_vrwlock_t locktype = VRWLOCK_READ; int error; @@ -398,8 +395,7 @@ xfs_splice_write( xfs_ilock(ip, XFS_IOLOCK_EXCL); - if (DM_EVENT_ENABLED(BHV_TO_VNODE(bdp)->v_vfsp, ip, DM_EVENT_WRITE) && - (!(ioflags & IO_INVIS))) { + if (DM_EVENT_ENABLED(ip, DM_EVENT_WRITE) && !(ioflags & IO_INVIS)) { bhv_vrwlock_t locktype = VRWLOCK_WRITE; int error; @@ -724,7 +720,7 @@ start: goto out_unlock_mutex; } - if ((DM_EVENT_ENABLED(vp->v_vfsp, xip, DM_EVENT_WRITE) && + if ((DM_EVENT_ENABLED(xip, DM_EVENT_WRITE) && !(ioflags & IO_INVIS) && !eventsent)) { int dmflags = FILP_DELAY_FLAG(file); @@ -876,10 +872,8 @@ retry: if (ret == -EIOCBQUEUED && !(ioflags & IO_ISAIO)) ret = wait_on_sync_kiocb(iocb); - if ((ret == -ENOSPC) && - DM_EVENT_ENABLED(vp->v_vfsp, xip, DM_EVENT_NOSPACE) && - !(ioflags & IO_INVIS)) { - + if (ret == -ENOSPC && + DM_EVENT_ENABLED(xip, DM_EVENT_NOSPACE) && !(ioflags & IO_INVIS)) { xfs_rwunlock(bdp, locktype); if (need_i_mutex) mutex_unlock(&inode->i_mutex); Index: linux-2.6-xfs/fs/xfs/xfs_bmap.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_bmap.c 2007-08-01 19:53:27.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_bmap.c 2007-08-01 19:53:42.000000000 +0200 @@ -5811,10 +5811,9 @@ xfs_getbmap( * could misinterpret holes in a DMAPI file as true holes, * when in fact they may represent offline user data. */ - if ( (interface & BMV_IF_NO_DMAPI_READ) == 0 - && DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ) - && whichfork == XFS_DATA_FORK) { - + if ((interface & BMV_IF_NO_DMAPI_READ) == 0 && + DM_EVENT_ENABLED(ip, DM_EVENT_READ) && + whichfork == XFS_DATA_FORK) { error = XFS_SEND_DATA(mp, DM_EVENT_READ, vp, 0, 0, 0, NULL); if (error) return XFS_ERROR(error); Index: linux-2.6-xfs/fs/xfs/xfs_dmapi.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_dmapi.h 2007-08-01 19:53:16.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_dmapi.h 2007-08-01 19:53:42.000000000 +0200 @@ -67,18 +67,12 @@ typedef enum { #define HAVE_DM_RIGHT_T /* Defines for determining if an event message should be sent. */ -#define DM_EVENT_ENABLED(vfsp, ip, event) ( \ - unlikely ((vfsp)->vfs_flag & VFS_DMI) && \ +#define DM_EVENT_ENABLED(ip, event) ( \ + unlikely (XFS_MTOVFS((ip)->i_mount)->vfs_flag & VFS_DMI) && \ ( ((ip)->i_d.di_dmevmask & (1 << event)) || \ ((ip)->i_mount->m_dmevmask & (1 << event)) ) \ ) -#define DM_EVENT_ENABLED_IO(vfsp, io, event) ( \ - unlikely ((vfsp)->vfs_flag & VFS_DMI) && \ - ( ((io)->io_dmevmask & (1 << event)) || \ - ((io)->io_mount->m_dmevmask & (1 << event)) ) \ - ) - #define DM_XFS_VALID_FS_EVENTS ( \ (1 << DM_EVENT_PREUNMOUNT) | \ (1 << DM_EVENT_UNMOUNT) | \ Index: linux-2.6-xfs/fs/xfs/xfs_rename.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_rename.c 2007-08-01 19:53:27.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_rename.c 2007-08-01 19:53:42.000000000 +0200 @@ -264,9 +264,8 @@ xfs_rename( src_dp = XFS_BHVTOI(src_dir_bdp); mp = src_dp->i_mount; - if (DM_EVENT_ENABLED(src_dir_vp->v_vfsp, src_dp, DM_EVENT_RENAME) || - DM_EVENT_ENABLED(target_dir_vp->v_vfsp, - target_dp, DM_EVENT_RENAME)) { + if (DM_EVENT_ENABLED(src_dp, DM_EVENT_RENAME) || + DM_EVENT_ENABLED(target_dp, DM_EVENT_RENAME)) { error = XFS_SEND_NAMESP(mp, DM_EVENT_RENAME, src_dir_vp, DM_RIGHT_NULL, target_dir_vp, DM_RIGHT_NULL, @@ -603,9 +602,8 @@ xfs_rename( /* Fall through to std_return with error = 0 or errno from * xfs_trans_commit */ std_return: - if (DM_EVENT_ENABLED(src_dir_vp->v_vfsp, src_dp, DM_EVENT_POSTRENAME) || - DM_EVENT_ENABLED(target_dir_vp->v_vfsp, - target_dp, DM_EVENT_POSTRENAME)) { + if (DM_EVENT_ENABLED(src_dp, DM_EVENT_POSTRENAME) || + DM_EVENT_ENABLED(target_dp, DM_EVENT_POSTRENAME)) { (void) XFS_SEND_NAMESP (mp, DM_EVENT_POSTRENAME, src_dir_vp, DM_RIGHT_NULL, target_dir_vp, DM_RIGHT_NULL, Index: linux-2.6-xfs/fs/xfs/xfs_vnodeops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vnodeops.c 2007-08-01 19:53:27.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vnodeops.c 2007-08-01 19:58:06.000000000 +0200 @@ -337,7 +337,7 @@ xfs_setattr( } } } else { - if (DM_EVENT_ENABLED (vp->v_vfsp, ip, DM_EVENT_TRUNCATE) && + if (DM_EVENT_ENABLED(ip, DM_EVENT_TRUNCATE) && !(flags & ATTR_DMI)) { int dmflags = AT_DELAY_FLAG(flags) | DM_SEM_FLAG_WR; code = XFS_SEND_DATA(mp, DM_EVENT_TRUNCATE, vp, @@ -896,7 +896,7 @@ xfs_setattr( return code; } - if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_ATTRIBUTE) && + if (DM_EVENT_ENABLED(ip, DM_EVENT_ATTRIBUTE) && !(flags & ATTR_DMI)) { (void) XFS_SEND_NAMESP(mp, DM_EVENT_ATTRIBUTE, vp, DM_RIGHT_NULL, NULL, DM_RIGHT_NULL, NULL, NULL, @@ -1651,8 +1651,7 @@ xfs_inactive( mp = ip->i_mount; - if (ip->i_d.di_nlink == 0 && - DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_DESTROY)) { + if (ip->i_d.di_nlink == 0 && DM_EVENT_ENABLED(ip, DM_EVENT_DESTROY)) { (void) XFS_SEND_DESTROY(mp, vp, DM_RIGHT_NULL); } @@ -1907,7 +1906,7 @@ xfs_create( dm_di_mode = vap->va_mode; namelen = VNAMELEN(dentry); - if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_CREATE)) { + if (DM_EVENT_ENABLED(dp, DM_EVENT_CREATE)) { error = XFS_SEND_NAMESP(mp, DM_EVENT_CREATE, dir_vp, DM_RIGHT_NULL, NULL, DM_RIGHT_NULL, name, NULL, @@ -2072,9 +2071,8 @@ xfs_create( /* Fallthrough to std_return with error = 0 */ std_return: - if ( (*vpp || (error != 0 && dm_event_sent != 0)) && - DM_EVENT_ENABLED(dir_vp->v_vfsp, XFS_BHVTOI(dir_bdp), - DM_EVENT_POSTCREATE)) { + if ((*vpp || (error != 0 && dm_event_sent != 0)) && + DM_EVENT_ENABLED(XFS_BHVTOI(dir_bdp), DM_EVENT_POSTCREATE)) { (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTCREATE, dir_vp, DM_RIGHT_NULL, *vpp ? vp:NULL, @@ -2408,7 +2406,7 @@ xfs_remove( IRELE(ip); } - if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_REMOVE)) { + if (DM_EVENT_ENABLED(dp, DM_EVENT_REMOVE)) { error = XFS_SEND_NAMESP(mp, DM_EVENT_REMOVE, dir_vp, DM_RIGHT_NULL, NULL, DM_RIGHT_NULL, name, NULL, dm_di_mode, 0, 0); @@ -2584,8 +2582,7 @@ xfs_remove( /* Fall through to std_return with error = 0 */ std_return: - if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, - DM_EVENT_POSTREMOVE)) { + if (DM_EVENT_ENABLED(dp, DM_EVENT_POSTREMOVE)) { (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTREMOVE, dir_vp, DM_RIGHT_NULL, NULL, DM_RIGHT_NULL, @@ -2662,7 +2659,7 @@ xfs_link( if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); - if (DM_EVENT_ENABLED(src_vp->v_vfsp, tdp, DM_EVENT_LINK)) { + if (DM_EVENT_ENABLED(tdp, DM_EVENT_LINK)) { error = XFS_SEND_NAMESP(mp, DM_EVENT_LINK, target_dir_vp, DM_RIGHT_NULL, src_vp, DM_RIGHT_NULL, @@ -2773,8 +2770,7 @@ xfs_link( /* Fall through to std_return with error = 0. */ std_return: - if (DM_EVENT_ENABLED(src_vp->v_vfsp, sip, - DM_EVENT_POSTLINK)) { + if (DM_EVENT_ENABLED(sip, DM_EVENT_POSTLINK)) { (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTLINK, target_dir_vp, DM_RIGHT_NULL, src_vp, DM_RIGHT_NULL, @@ -2838,7 +2834,7 @@ xfs_mkdir( dp_joined_to_trans = B_FALSE; dm_di_mode = vap->va_mode; - if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_CREATE)) { + if (DM_EVENT_ENABLED(dp, DM_EVENT_CREATE)) { error = XFS_SEND_NAMESP(mp, DM_EVENT_CREATE, dir_vp, DM_RIGHT_NULL, NULL, DM_RIGHT_NULL, dir_name, NULL, @@ -2995,9 +2991,8 @@ xfs_mkdir( * xfs_trans_commit. */ std_return: - if ( (created || (error != 0 && dm_event_sent != 0)) && - DM_EVENT_ENABLED(dir_vp->v_vfsp, XFS_BHVTOI(dir_bdp), - DM_EVENT_POSTCREATE)) { + if ((created || (error != 0 && dm_event_sent != 0)) && + DM_EVENT_ENABLED(XFS_BHVTOI(dir_bdp), DM_EVENT_POSTCREATE)) { (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTCREATE, dir_vp, DM_RIGHT_NULL, created ? XFS_ITOV(cdp):NULL, @@ -3066,7 +3061,7 @@ xfs_rmdir( IRELE(cdp); } - if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_REMOVE)) { + if (DM_EVENT_ENABLED(dp, DM_EVENT_REMOVE)) { error = XFS_SEND_NAMESP(mp, DM_EVENT_REMOVE, dir_vp, DM_RIGHT_NULL, NULL, DM_RIGHT_NULL, @@ -3255,7 +3250,7 @@ xfs_rmdir( /* Fall through to std_return with error = 0 or the errno * from xfs_trans_commit. */ std_return: - if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_POSTREMOVE)) { + if (DM_EVENT_ENABLED(dp, DM_EVENT_POSTREMOVE)) { (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTREMOVE, dir_vp, DM_RIGHT_NULL, NULL, DM_RIGHT_NULL, @@ -3359,7 +3354,7 @@ xfs_symlink( } } - if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_SYMLINK)) { + if (DM_EVENT_ENABLED(dp, DM_EVENT_SYMLINK)) { error = XFS_SEND_NAMESP(mp, DM_EVENT_SYMLINK, dir_vp, DM_RIGHT_NULL, NULL, DM_RIGHT_NULL, link_name, target_path, 0, 0, 0); @@ -3559,8 +3554,7 @@ xfs_symlink( /* Fall through to std_return with error = 0 or errno from * xfs_trans_commit */ std_return: - if (DM_EVENT_ENABLED(dir_vp->v_vfsp, XFS_BHVTOI(dir_bdp), - DM_EVENT_POSTSYMLINK)) { + if (DM_EVENT_ENABLED(XFS_BHVTOI(dir_bdp), DM_EVENT_POSTSYMLINK)) { (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTSYMLINK, dir_vp, DM_RIGHT_NULL, error ? NULL : XFS_ITOV(ip), @@ -4062,7 +4056,7 @@ xfs_alloc_file_space( /* Generate a DMAPI event if needed. */ if (alloc_type != 0 && offset < ip->i_size && (attr_flags&ATTR_DMI) == 0 && - DM_EVENT_ENABLED(XFS_MTOVFS(mp), ip, DM_EVENT_WRITE)) { + DM_EVENT_ENABLED(ip, DM_EVENT_WRITE)) { xfs_off_t end_dmi_offset; end_dmi_offset = offset+len; @@ -4176,9 +4170,8 @@ retry: allocatesize_fsb -= allocated_fsb; } dmapi_enospc_check: - if (error == ENOSPC && (attr_flags&ATTR_DMI) == 0 && - DM_EVENT_ENABLED(XFS_MTOVFS(mp), ip, DM_EVENT_NOSPACE)) { - + if (error == ENOSPC && (attr_flags & ATTR_DMI) == 0 && + DM_EVENT_ENABLED(ip, DM_EVENT_NOSPACE)) { error = XFS_SEND_NAMESP(mp, DM_EVENT_NOSPACE, XFS_ITOV(ip), DM_RIGHT_NULL, XFS_ITOV(ip), DM_RIGHT_NULL, @@ -4322,9 +4315,8 @@ xfs_free_file_space( end_dmi_offset = offset + len; endoffset_fsb = XFS_B_TO_FSBT(mp, end_dmi_offset); - if (offset < ip->i_size && - (attr_flags & ATTR_DMI) == 0 && - DM_EVENT_ENABLED(XFS_MTOVFS(mp), ip, DM_EVENT_WRITE)) { + if (offset < ip->i_size && (attr_flags & ATTR_DMI) == 0 && + DM_EVENT_ENABLED(ip, DM_EVENT_WRITE)) { if (end_dmi_offset > ip->i_size) end_dmi_offset = ip->i_size; error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, vp, From owner-xfs@oss.sgi.com Thu Aug 2 14:29:26 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 14:29:29 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_66 autolearn=no version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l72LTNbm031203 for ; Thu, 2 Aug 2007 14:29:26 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l72LTQA5024914 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 2 Aug 2007 23:29:26 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l72LTQQp024912 for xfs@oss.sgi.com; Thu, 2 Aug 2007 23:29:26 +0200 Date: Thu, 2 Aug 2007 23:29:26 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH] dmapi: simplify slab cache creation Message-ID: <20070802212926.GA24834@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12456 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs Currently two out of three slab caches are created on-demand on dmapi_register. Move them into dmapi_init as the others are to clean up all the mess about checking whether dmapi_register has been called before or is in the process of beeing called. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/dmapi/dmapi_mountinfo.c =================================================================== --- linux-2.6-xfs.orig/fs/dmapi/dmapi_mountinfo.c 2007-08-02 16:00:52.000000000 +0200 +++ linux-2.6-xfs/fs/dmapi/dmapi_mountinfo.c 2007-08-02 16:07:13.000000000 +0200 @@ -471,40 +471,7 @@ dmapi_register( struct filesystem_dmapi_operations *dmapiops) { dm_vector_map_t *proto; - static int initialized = 0; -wait_cache: - spin_lock(&dm_fsys_lock); - if (initialized == -1) { - spin_unlock(&dm_fsys_lock); - goto wait_cache; - } - if (initialized == 0) - initialized = -1; - spin_unlock(&dm_fsys_lock); - - if (initialized == -1) { - ASSERT(dm_fsys_map_cachep == NULL); - ASSERT(dm_fsys_vptr_cachep == NULL); - - dm_fsys_map_cachep = kmem_cache_create("dm_fsys_map", - sizeof(dm_vector_map_t), 0, 0, NULL, NULL); - - dm_fsys_vptr_cachep = kmem_cache_create("dm_fsys_vptr", - sizeof(dm_fsys_vector_t), 0, 0, NULL, NULL); - - spin_lock(&dm_fsys_lock); - if ((dm_fsys_map_cachep == NULL) || - (dm_fsys_map_cachep == NULL)) { - initialized = 0; - spin_unlock(&dm_fsys_lock); - goto out_cache_free; - } - initialized = 1; - spin_unlock(&dm_fsys_lock); - } - - ASSERT_ALWAYS(initialized == 1); proto = kmem_cache_alloc(dm_fsys_map_cachep, GFP_KERNEL); if (proto == NULL) { printk("%s/%d: kmem_cache_alloc(dm_fsys_map_cachep) returned NULL\n", __FUNCTION__, __LINE__); @@ -521,21 +488,8 @@ wait_cache: list_add(&proto->ftype_list, &dm_fsys_map); ftype_list(); spin_unlock(&dm_fsys_lock); - - return; - -out_cache_free: - if (dm_fsys_map_cachep) { - kmem_cache_destroy(dm_fsys_map_cachep); - dm_fsys_map_cachep = NULL; - } - if (dm_fsys_vptr_cachep) { - kmem_cache_destroy(dm_fsys_vptr_cachep); - dm_fsys_vptr_cachep = NULL; - } } - /* Called by a filesystem module that is unloading from the kernel */ void dmapi_unregister( Index: linux-2.6-xfs/fs/dmapi/dmapi_sysent.c =================================================================== --- linux-2.6-xfs.orig/fs/dmapi/dmapi_sysent.c 2007-08-02 16:03:21.000000000 +0200 +++ linux-2.6-xfs/fs/dmapi/dmapi_sysent.c 2007-08-02 16:09:46.000000000 +0200 @@ -740,35 +740,47 @@ int __init dmapi_init(void) dm_tokdata_cachep = kmem_cache_create("dm_tokdata", sizeof(struct dm_tokdata), 0, 0, NULL, NULL); if (dm_tokdata_cachep == NULL) - goto out_cache_free; + goto out; dm_fsreg_cachep = kmem_cache_create("dm_fsreg", sizeof(struct dm_fsreg), 0, 0, NULL, NULL); if (dm_fsreg_cachep == NULL) - goto out_cache_free; + goto out_free_tokdata_cachep; dm_session_cachep = kmem_cache_create("dm_session", sizeof(struct dm_session), 0, 0, NULL, NULL); if (dm_session_cachep == NULL) - goto out_cache_free; + goto out_free_fsreg_cachep; + + dm_fsys_map_cachep = kmem_cache_create("dm_fsys_map", + sizeof(dm_vector_map_t), 0, 0, NULL, NULL); + if (dm_fsys_map_cachep == NULL) + goto out_free_session_cachep; + dm_fsys_vptr_cachep = kmem_cache_create("dm_fsys_vptr", + sizeof(dm_fsys_vector_t), 0, 0, NULL, NULL); + if (dm_fsys_vptr_cachep == NULL) + goto out_free_fsys_map_cachep; ret = misc_register(&dmapi_dev); - if( ret != 0 ) + if (ret) { printk(KERN_ERR "dmapi_init: misc_register returned %d\n", ret); + goto out_free_fsys_vptr_cachep; + } + dmapi_init_procfs(dmapi_dev.minor); return 0; -out_cache_free: - if (dm_tokdata_cachep) - kmem_cache_destroy(dm_tokdata_cachep); - if (dm_fsreg_cachep) - kmem_cache_destroy(dm_fsreg_cachep); - if (dm_session_cachep) - kmem_cache_destroy(dm_session_cachep); - if (dm_fsys_map_cachep) - kmem_cache_destroy(dm_fsys_map_cachep); - if (dm_fsys_vptr_cachep) - kmem_cache_destroy(dm_fsys_vptr_cachep); + out_free_fsys_vptr_cachep: + kmem_cache_destroy(dm_fsys_vptr_cachep); + out_free_fsys_map_cachep: + kmem_cache_destroy(dm_fsys_map_cachep); + out_free_session_cachep: + kmem_cache_destroy(dm_session_cachep); + out_free_fsreg_cachep: + kmem_cache_destroy(dm_fsreg_cachep); + out_free_tokdata_cachep: + kmem_cache_destroy(dm_tokdata_cachep); + out: return -ENOMEM; } From owner-xfs@oss.sgi.com Thu Aug 2 17:29:29 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 17:29:35 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l730TQbm030483 for ; Thu, 2 Aug 2007 17:29:28 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l730TSA5003121 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 3 Aug 2007 02:29:29 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l730TSAb003119; Fri, 3 Aug 2007 02:29:28 +0200 Date: Fri, 3 Aug 2007 02:29:28 +0200 From: Christoph Hellwig To: David Chinner Cc: Christoph Hellwig , xfs@oss.sgi.com Subject: Re: [PATCH] dinode endianess annotations Message-ID: <20070803002928.GA2830@lst.de> References: <20070720163026.GA6902@lst.de> <20070723002121.GK31489@sgi.com> <20070723084419.GA1003@lst.de> <20070728175900.GA6557@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070728175900.GA6557@lst.de> User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12457 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs On Sat, Jul 28, 2007 at 07:59:00PM +0200, Christoph Hellwig wrote: > The updated patch didn't actually compile with dmapi enabled. Here's > a fixed version: And here's another iteration. I started doing some local patches that include xfs_inode.h in a lot more places and really got nnoyed by the tail of includes xfs_dinode.h requires to compile. So this patch includes the move of xfs_icdinode to xfs_inode.h that I suggested previously. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm.c 2007-08-03 01:02:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c 2007-08-03 01:18:08.000000000 +0200 @@ -345,20 +345,19 @@ _xfs_dic2dmflags( STATIC uint xfs_ip2dmflags( - xfs_inode_t *ip) + xfs_inode_t *ip) { - xfs_dinode_core_t *dic = &ip->i_d; - - return _xfs_dic2dmflags(dic->di_flags) | - (XFS_CFORK_Q(dic) ? DM_XFLAG_HASATTR : 0); + return _xfs_dic2dmflags(ip->i_d.di_flags) | + (XFS_CFORK_Q(&ip->i_d) ? DM_XFLAG_HASATTR : 0); } STATIC uint xfs_dic2dmflags( - xfs_dinode_core_t *dic) + xfs_dinode_t *dip) { - return _xfs_dic2dmflags(INT_GET(dic->di_flags, ARCH_CONVERT)) | - (XFS_CFORK_Q_DISK(dic) ? DM_XFLAG_HASATTR : 0); + return _xfs_dic2dmflags(be16_to_cpu(dip->di_core.di_flags)) | + (XFS_CFORK_Q_DISK(&dip->di_core) ? + DM_XFLAG_HASATTR : 0); } /* @@ -387,32 +386,33 @@ xfs_dip_to_stat( * the new format. We don't change the version number so that we * can distinguish this from a real new format inode. */ - if (INT_GET(dic->di_version, ARCH_CONVERT) == XFS_DINODE_VERSION_1) { - buf->dt_nlink = INT_GET(dic->di_onlink, ARCH_CONVERT); + if (dic->di_version == XFS_DINODE_VERSION_1) { + buf->dt_nlink = be16_to_cpu(dic->di_onlink); /*buf->dt_xfs_projid = 0;*/ } else { - buf->dt_nlink = INT_GET(dic->di_nlink, ARCH_CONVERT); - /*buf->dt_xfs_projid = INT_GET(dic->di_projid, ARCH_CONVERT);*/ + buf->dt_nlink = be32_to_cpu(dic->di_nlink); + /*buf->dt_xfs_projid = be16_to_cpu(dic->di_projid);*/ } buf->dt_ino = ino; buf->dt_dev = XFS_TO_HOST_DEVT(mp); - buf->dt_mode = INT_GET(dic->di_mode, ARCH_CONVERT); - buf->dt_uid = INT_GET(dic->di_uid, ARCH_CONVERT); - buf->dt_gid = INT_GET(dic->di_gid, ARCH_CONVERT); - buf->dt_size = INT_GET(dic->di_size, ARCH_CONVERT); - buf->dt_atime = INT_GET(dic->di_atime.t_sec, ARCH_CONVERT); - buf->dt_mtime = INT_GET(dic->di_mtime.t_sec, ARCH_CONVERT); - buf->dt_ctime = INT_GET(dic->di_ctime.t_sec, ARCH_CONVERT); - buf->dt_xfs_xflags = xfs_dic2dmflags(dic); - buf->dt_xfs_extsize = INT_GET(dic->di_extsize, ARCH_CONVERT) << mp->m_sb.sb_blocklog; - buf->dt_xfs_extents = INT_GET(dic->di_nextents, ARCH_CONVERT); - buf->dt_xfs_aextents = INT_GET(dic->di_anextents, ARCH_CONVERT); - buf->dt_xfs_igen = INT_GET(dic->di_gen, ARCH_CONVERT); - buf->dt_xfs_dmstate = INT_GET(dic->di_dmstate, ARCH_CONVERT); + buf->dt_mode = be16_to_cpu(dic->di_mode); + buf->dt_uid = be32_to_cpu(dic->di_uid); + buf->dt_gid = be32_to_cpu(dic->di_gid); + buf->dt_size = be64_to_cpu(dic->di_size); + buf->dt_atime = be32_to_cpu(dic->di_atime.t_sec); + buf->dt_mtime = be32_to_cpu(dic->di_mtime.t_sec); + buf->dt_ctime = be32_to_cpu(dic->di_ctime.t_sec); + buf->dt_xfs_xflags = xfs_dic2dmflags(dip); + buf->dt_xfs_extsize = + be32_to_cpu(dic->di_extsize) << mp->m_sb.sb_blocklog; + buf->dt_xfs_extents = be32_to_cpu(dic->di_nextents); + buf->dt_xfs_aextents = be16_to_cpu(dic->di_anextents); + buf->dt_xfs_igen = be32_to_cpu(dic->di_gen); + buf->dt_xfs_dmstate = be16_to_cpu(dic->di_dmstate); - switch (INT_GET(dic->di_format, ARCH_CONVERT)) { + switch (dic->di_format) { case XFS_DINODE_FMT_DEV: - buf->dt_rdev = INT_GET(dip->di_u.di_dev, ARCH_CONVERT); + buf->dt_rdev = be32_to_cpu(dip->di_u.di_dev); buf->dt_blksize = BLKDEV_IOSIZE; buf->dt_blocks = 0; break; @@ -426,8 +426,8 @@ xfs_dip_to_stat( case XFS_DINODE_FMT_BTREE: buf->dt_rdev = 0; buf->dt_blksize = mp->m_sb.sb_blocksize; - buf->dt_blocks = XFS_FSB_TO_BB(mp, - INT_GET(dic->di_nblocks, ARCH_CONVERT)); + buf->dt_blocks = + XFS_FSB_TO_BB(mp, be64_to_cpu(dic->di_nblocks)); break; } @@ -439,8 +439,8 @@ xfs_dip_to_stat( buf->dt_pers = 0; buf->dt_change = 0; buf->dt_nevents = DM_EVENT_MAX; - buf->dt_emask = INT_GET(dic->di_dmevmask, ARCH_CONVERT); - buf->dt_dtime = INT_GET(dic->di_ctime.t_sec, ARCH_CONVERT); + buf->dt_emask = be32_to_cpu(dic->di_dmevmask); + buf->dt_dtime = be32_to_cpu(dic->di_ctime.t_sec); /* Set if one of READ, WRITE or TRUNCATE bits is set in emask */ buf->dt_pmanreg = (DMEV_ISSET(DM_EVENT_READ, buf->dt_emask) || DMEV_ISSET(DM_EVENT_WRITE, buf->dt_emask) || @@ -458,7 +458,7 @@ xfs_ip_to_stat( xfs_inode_t *ip, dm_stat_t *buf) { - xfs_dinode_core_t *dic = &ip->i_d; + xfs_icdinode_t *dic = &ip->i_d; bhv_vnode_t *vp = XFS_ITOV(ip); buf->dt_ino = ino; @@ -604,8 +604,7 @@ xfs_dm_inline_attr( caddr_t attr_buf, int *value_lenp) { - if (INT_GET(dip->di_core.di_aformat, ARCH_CONVERT) == - XFS_DINODE_FMT_LOCAL) { + if (dip->di_core.di_aformat == XFS_DINODE_FMT_LOCAL) { xfs_attr_shortform_t *sf; xfs_attr_sf_entry_t *sfe; unsigned int namelen = strlen(attr_name); @@ -649,7 +648,7 @@ dm_dip_to_handle( xfid->fid_len = sizeof(xfs_fid2_t) - sizeof(xfid->fid_len); xfid->fid_pad = 0; xfid->fid_ino = ino; - xfid->fid_gen = INT_GET(dip->di_core.di_gen, ARCH_CONVERT); + xfid->fid_gen = be32_to_cpu(dip->di_core.di_gen); memcpy(&handlep->ha_fsid, fsid, sizeof(*fsid)); memcpy(&handlep->ha_fid, &fid, fid.dm_fid_len + sizeof(fid.dm_fid_len)); Index: linux-2.6-xfs/fs/xfs/xfs_dinode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_dinode.h 2007-08-03 01:00:28.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_dinode.h 2007-08-03 01:21:31.000000000 +0200 @@ -34,41 +34,41 @@ struct xfs_mount; * because we only need the core part in the in-core inode. */ typedef struct xfs_timestamp { - __int32_t t_sec; /* timestamp seconds */ - __int32_t t_nsec; /* timestamp nanoseconds */ + __be32 t_sec; /* timestamp seconds */ + __be32 t_nsec; /* timestamp nanoseconds */ } xfs_timestamp_t; /* * Note: Coordinate changes to this structure with the XFS_DI_* #defines - * below and the offsets table in xfs_ialloc_log_di(). + * below, the offsets table in xfs_ialloc_log_di() and struct xfs_icdinode + * in xfs_inode.h. */ -typedef struct xfs_dinode_core -{ - __uint16_t di_magic; /* inode magic # = XFS_DINODE_MAGIC */ - __uint16_t di_mode; /* mode and type of file */ - __int8_t di_version; /* inode version */ - __int8_t di_format; /* format of di_c data */ - __uint16_t di_onlink; /* old number of links to file */ - __uint32_t di_uid; /* owner's user id */ - __uint32_t di_gid; /* owner's group id */ - __uint32_t di_nlink; /* number of links to file */ - __uint16_t di_projid; /* owner's project id */ - __uint8_t di_pad[8]; /* unused, zeroed space */ - __uint16_t di_flushiter; /* incremented on flush */ +typedef struct xfs_dinode_core { + __be16 di_magic; /* inode magic # = XFS_DINODE_MAGIC */ + __be16 di_mode; /* mode and type of file */ + __u8 di_version; /* inode version */ + __u8 di_format; /* format of di_c data */ + __be16 di_onlink; /* old number of links to file */ + __be32 di_uid; /* owner's user id */ + __be32 di_gid; /* owner's group id */ + __be32 di_nlink; /* number of links to file */ + __be16 di_projid; /* owner's project id */ + __u8 di_pad[8]; /* unused, zeroed space */ + __be16 di_flushiter; /* incremented on flush */ xfs_timestamp_t di_atime; /* time last accessed */ xfs_timestamp_t di_mtime; /* time last modified */ xfs_timestamp_t di_ctime; /* time created/inode modified */ - xfs_fsize_t di_size; /* number of bytes in file */ - xfs_drfsbno_t di_nblocks; /* # of direct & btree blocks used */ - xfs_extlen_t di_extsize; /* basic/minimum extent size for file */ - xfs_extnum_t di_nextents; /* number of extents in data fork */ - xfs_aextnum_t di_anextents; /* number of extents in attribute fork*/ - __uint8_t di_forkoff; /* attr fork offs, <<3 for 64b align */ - __int8_t di_aformat; /* format of attr fork's data */ - __uint32_t di_dmevmask; /* DMIG event mask */ - __uint16_t di_dmstate; /* DMIG state info */ - __uint16_t di_flags; /* random flags, XFS_DIFLAG_... */ - __uint32_t di_gen; /* generation number */ + __be64 di_size; /* number of bytes in file */ + __be64 di_nblocks; /* # of direct & btree blocks used */ + __be32 di_extsize; /* basic/minimum extent size for file */ + __be32 di_nextents; /* number of extents in data fork */ + __be16 di_anextents; /* number of extents in attribute fork*/ + __u8 di_forkoff; /* attr fork offs, <<3 for 64b align */ + __s8 di_aformat; /* format of attr fork's data */ + __be32 di_dmevmask; /* DMIG event mask */ + __be16 di_dmstate; /* DMIG state info */ + __be16 di_flags; /* random flags, XFS_DIFLAG_... */ + __be32 di_gen; /* generation number */ } xfs_dinode_core_t; #define DI_MAX_FLUSH 0xffff @@ -81,13 +81,13 @@ typedef struct xfs_dinode * sure to update the macros like XFS_LITINO below and * XFS_BMAP_RBLOCK_DSIZE in xfs_bmap_btree.h. */ - xfs_agino_t di_next_unlinked;/* agi unlinked list ptr */ + __be32 di_next_unlinked;/* agi unlinked list ptr */ union { xfs_bmdr_block_t di_bmbt; /* btree root block */ xfs_bmbt_rec_32_t di_bmx[1]; /* extent list */ xfs_dir2_sf_t di_dir2sf; /* shortform directory v2 */ char di_c[1]; /* local contents */ - xfs_dev_t di_dev; /* device for S_IFCHR/S_IFBLK */ + __be32 di_dev; /* device for S_IFCHR/S_IFBLK */ uuid_t di_muuid; /* mount point value */ char di_symlink[1]; /* local symbolic link */ } di_u; @@ -175,8 +175,7 @@ typedef enum xfs_dinode_fmt #define XFS_CFORK_Q_DISK(dcp) ((dcp)->di_forkoff != 0) #define XFS_CFORK_BOFF(dcp) ((int)((dcp)->di_forkoff << 3)) -#define XFS_CFORK_BOFF_DISK(dcp) \ - ((int)(INT_GET((dcp)->di_forkoff, ARCH_CONVERT) << 3)) +#define XFS_CFORK_BOFF_DISK(dcp) ((int)((dcp)->di_forkoff << 3)) #define XFS_CFORK_DSIZE_DISK(dcp,mp) \ (XFS_CFORK_Q_DISK(dcp) ? XFS_CFORK_BOFF_DISK(dcp) : XFS_LITINO(mp)) @@ -225,8 +224,8 @@ typedef enum xfs_dinode_fmt #define XFS_CFORK_NEXTENTS_DISK(dcp,w) \ ((w) == XFS_DATA_FORK ? \ - INT_GET((dcp)->di_nextents, ARCH_CONVERT) : \ - INT_GET((dcp)->di_anextents, ARCH_CONVERT)) + be32_to_cpu((dcp)->di_nextents) : \ + be16_to_cpu((dcp)->di_anextents)) #define XFS_CFORK_NEXTENTS(dcp,w) \ ((w) == XFS_DATA_FORK ? (dcp)->di_nextents : (dcp)->di_anextents) #define XFS_DFORK_NEXTENTS(dip,w) XFS_CFORK_NEXTENTS_DISK(&(dip)->di_core, w) Index: linux-2.6-xfs/fs/xfs/xfs_ialloc.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_ialloc.c 2007-08-03 01:00:28.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_ialloc.c 2007-08-03 01:06:39.000000000 +0200 @@ -293,9 +293,9 @@ xfs_ialloc_ag_alloc( xfs_biozero(fbuf, 0, ninodes << args.mp->m_sb.sb_inodelog); for (i = 0; i < ninodes; i++) { free = XFS_MAKE_IPTR(args.mp, fbuf, i); - INT_SET(free->di_core.di_magic, ARCH_CONVERT, XFS_DINODE_MAGIC); - INT_SET(free->di_core.di_version, ARCH_CONVERT, version); - INT_SET(free->di_next_unlinked, ARCH_CONVERT, NULLAGINO); + free->di_core.di_magic = cpu_to_be16(XFS_DINODE_MAGIC); + free->di_core.di_version = version; + free->di_next_unlinked = cpu_to_be32(NULLAGINO); xfs_ialloc_log_di(tp, fbuf, i, XFS_DI_CORE_BITS | XFS_DI_NEXT_UNLINKED); } Index: linux-2.6-xfs/fs/xfs/xfs_inode.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_inode.c 2007-08-03 01:02:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_inode.c 2007-08-03 01:17:08.000000000 +0200 @@ -193,8 +193,8 @@ xfs_inotobp( } dip = (xfs_dinode_t *)xfs_buf_offset(bp, 0); di_ok = - INT_GET(dip->di_core.di_magic, ARCH_CONVERT) == XFS_DINODE_MAGIC && - XFS_DINODE_GOOD_VERSION(INT_GET(dip->di_core.di_version, ARCH_CONVERT)); + be16_to_cpu(dip->di_core.di_magic) == XFS_DINODE_MAGIC && + XFS_DINODE_GOOD_VERSION(dip->di_core.di_version); if (unlikely(XFS_TEST_ERROR(!di_ok, mp, XFS_ERRTAG_ITOBP_INOTOBP, XFS_RANDOM_ITOBP_INOTOBP))) { XFS_CORRUPTION_ERROR("xfs_inotobp", XFS_ERRLEVEL_LOW, mp, dip); @@ -338,8 +338,8 @@ xfs_itobp( dip = (xfs_dinode_t *)xfs_buf_offset(bp, (i << mp->m_sb.sb_inodelog)); - di_ok = INT_GET(dip->di_core.di_magic, ARCH_CONVERT) == XFS_DINODE_MAGIC && - XFS_DINODE_GOOD_VERSION(INT_GET(dip->di_core.di_version, ARCH_CONVERT)); + di_ok = be16_to_cpu(dip->di_core.di_magic) == XFS_DINODE_MAGIC && + XFS_DINODE_GOOD_VERSION(dip->di_core.di_version); if (unlikely(XFS_TEST_ERROR(!di_ok, mp, XFS_ERRTAG_ITOBP_INOTOBP, XFS_RANDOM_ITOBP_INOTOBP))) { @@ -353,7 +353,7 @@ xfs_itobp( "daddr %lld #%d (magic=%x)", XFS_BUFTARG_NAME(mp->m_ddev_targp), (unsigned long long)imap.im_blkno, i, - INT_GET(dip->di_core.di_magic, ARCH_CONVERT)); + be16_to_cpu(dip->di_core.di_magic)); #endif XFS_CORRUPTION_ERROR("xfs_itobp", XFS_ERRLEVEL_HIGH, mp, dip); @@ -399,27 +399,26 @@ xfs_iformat( XFS_IFORK_DSIZE(ip) / (uint)sizeof(xfs_bmbt_rec_t); error = 0; - if (unlikely( - INT_GET(dip->di_core.di_nextents, ARCH_CONVERT) + - INT_GET(dip->di_core.di_anextents, ARCH_CONVERT) > - INT_GET(dip->di_core.di_nblocks, ARCH_CONVERT))) { + if (unlikely(be32_to_cpu(dip->di_core.di_nextents) + + be16_to_cpu(dip->di_core.di_anextents) > + be64_to_cpu(dip->di_core.di_nblocks))) { xfs_fs_repair_cmn_err(CE_WARN, ip->i_mount, "corrupt dinode %Lu, extent total = %d, nblocks = %Lu.", (unsigned long long)ip->i_ino, - (int)(INT_GET(dip->di_core.di_nextents, ARCH_CONVERT) - + INT_GET(dip->di_core.di_anextents, ARCH_CONVERT)), + (int)(be32_to_cpu(dip->di_core.di_nextents) + + be16_to_cpu(dip->di_core.di_anextents)), (unsigned long long) - INT_GET(dip->di_core.di_nblocks, ARCH_CONVERT)); + be64_to_cpu(dip->di_core.di_nblocks)); XFS_CORRUPTION_ERROR("xfs_iformat(1)", XFS_ERRLEVEL_LOW, ip->i_mount, dip); return XFS_ERROR(EFSCORRUPTED); } - if (unlikely(INT_GET(dip->di_core.di_forkoff, ARCH_CONVERT) > ip->i_mount->m_sb.sb_inodesize)) { + if (unlikely(dip->di_core.di_forkoff > ip->i_mount->m_sb.sb_inodesize)) { xfs_fs_repair_cmn_err(CE_WARN, ip->i_mount, "corrupt dinode %Lu, forkoff = 0x%x.", (unsigned long long)ip->i_ino, - (int)(INT_GET(dip->di_core.di_forkoff, ARCH_CONVERT))); + dip->di_core.di_forkoff); XFS_CORRUPTION_ERROR("xfs_iformat(2)", XFS_ERRLEVEL_LOW, ip->i_mount, dip); return XFS_ERROR(EFSCORRUPTED); @@ -430,25 +429,25 @@ xfs_iformat( case S_IFCHR: case S_IFBLK: case S_IFSOCK: - if (unlikely(INT_GET(dip->di_core.di_format, ARCH_CONVERT) != XFS_DINODE_FMT_DEV)) { + if (unlikely(dip->di_core.di_format != XFS_DINODE_FMT_DEV)) { XFS_CORRUPTION_ERROR("xfs_iformat(3)", XFS_ERRLEVEL_LOW, ip->i_mount, dip); return XFS_ERROR(EFSCORRUPTED); } ip->i_d.di_size = 0; ip->i_size = 0; - ip->i_df.if_u2.if_rdev = INT_GET(dip->di_u.di_dev, ARCH_CONVERT); + ip->i_df.if_u2.if_rdev = be32_to_cpu(dip->di_u.di_dev); break; case S_IFREG: case S_IFLNK: case S_IFDIR: - switch (INT_GET(dip->di_core.di_format, ARCH_CONVERT)) { + switch (dip->di_core.di_format) { case XFS_DINODE_FMT_LOCAL: /* * no local regular files yet */ - if (unlikely((INT_GET(dip->di_core.di_mode, ARCH_CONVERT) & S_IFMT) == S_IFREG)) { + if (unlikely((be16_to_cpu(dip->di_core.di_mode) & S_IFMT) == S_IFREG)) { xfs_fs_repair_cmn_err(CE_WARN, ip->i_mount, "corrupt inode %Lu " "(local format for regular file).", @@ -459,7 +458,7 @@ xfs_iformat( return XFS_ERROR(EFSCORRUPTED); } - di_size = INT_GET(dip->di_core.di_size, ARCH_CONVERT); + di_size = be64_to_cpu(dip->di_core.di_size); if (unlikely(di_size > XFS_DFORK_DSIZE(dip, ip->i_mount))) { xfs_fs_repair_cmn_err(CE_WARN, ip->i_mount, "corrupt inode %Lu " @@ -501,7 +500,7 @@ xfs_iformat( ip->i_afp = kmem_zone_zalloc(xfs_ifork_zone, KM_SLEEP); ip->i_afp->if_ext_max = XFS_IFORK_ASIZE(ip) / (uint)sizeof(xfs_bmbt_rec_t); - switch (INT_GET(dip->di_core.di_aformat, ARCH_CONVERT)) { + switch (dip->di_core.di_aformat) { case XFS_DINODE_FMT_LOCAL: atp = (xfs_attr_shortform_t *)XFS_DFORK_APTR(dip); size = be16_to_cpu(atp->hdr.totsize); @@ -709,70 +708,74 @@ xfs_iformat_btree( return 0; } -/* - * xfs_xlate_dinode_core - translate an xfs_inode_core_t between ondisk - * and native format - * - * buf = on-disk representation - * dip = native representation - * dir = direction - +ve -> disk to native - * -ve -> native to disk - */ void -xfs_xlate_dinode_core( - xfs_caddr_t buf, - xfs_dinode_core_t *dip, - int dir) -{ - xfs_dinode_core_t *buf_core = (xfs_dinode_core_t *)buf; - xfs_dinode_core_t *mem_core = (xfs_dinode_core_t *)dip; - xfs_arch_t arch = ARCH_CONVERT; - - ASSERT(dir); - - INT_XLATE(buf_core->di_magic, mem_core->di_magic, dir, arch); - INT_XLATE(buf_core->di_mode, mem_core->di_mode, dir, arch); - INT_XLATE(buf_core->di_version, mem_core->di_version, dir, arch); - INT_XLATE(buf_core->di_format, mem_core->di_format, dir, arch); - INT_XLATE(buf_core->di_onlink, mem_core->di_onlink, dir, arch); - INT_XLATE(buf_core->di_uid, mem_core->di_uid, dir, arch); - INT_XLATE(buf_core->di_gid, mem_core->di_gid, dir, arch); - INT_XLATE(buf_core->di_nlink, mem_core->di_nlink, dir, arch); - INT_XLATE(buf_core->di_projid, mem_core->di_projid, dir, arch); - - if (dir > 0) { - memcpy(mem_core->di_pad, buf_core->di_pad, - sizeof(buf_core->di_pad)); - } else { - memcpy(buf_core->di_pad, mem_core->di_pad, - sizeof(buf_core->di_pad)); - } - - INT_XLATE(buf_core->di_flushiter, mem_core->di_flushiter, dir, arch); +xfs_dinode_from_disk( + xfs_icdinode_t *to, + xfs_dinode_core_t *from) +{ + to->di_magic = be16_to_cpu(from->di_magic); + to->di_mode = be16_to_cpu(from->di_mode); + to->di_version = from ->di_version; + to->di_format = from->di_format; + to->di_onlink = be16_to_cpu(from->di_onlink); + to->di_uid = be32_to_cpu(from->di_uid); + to->di_gid = be32_to_cpu(from->di_gid); + to->di_nlink = be32_to_cpu(from->di_nlink); + to->di_projid = be16_to_cpu(from->di_projid); + memcpy(to->di_pad, from->di_pad, sizeof(to->di_pad)); + to->di_flushiter = be16_to_cpu(from->di_flushiter); + to->di_atime.t_sec = be32_to_cpu(from->di_atime.t_sec); + to->di_atime.t_nsec = be32_to_cpu(from->di_atime.t_nsec); + to->di_mtime.t_sec = be32_to_cpu(from->di_mtime.t_sec); + to->di_mtime.t_nsec = be32_to_cpu(from->di_mtime.t_nsec); + to->di_ctime.t_sec = be32_to_cpu(from->di_ctime.t_sec); + to->di_ctime.t_nsec = be32_to_cpu(from->di_ctime.t_nsec); + to->di_size = be64_to_cpu(from->di_size); + to->di_nblocks = be64_to_cpu(from->di_nblocks); + to->di_extsize = be32_to_cpu(from->di_extsize); + to->di_nextents = be32_to_cpu(from->di_nextents); + to->di_anextents = be16_to_cpu(from->di_anextents); + to->di_forkoff = from->di_forkoff; + to->di_aformat = from->di_aformat; + to->di_dmevmask = be32_to_cpu(from->di_dmevmask); + to->di_dmstate = be16_to_cpu(from->di_dmstate); + to->di_flags = be16_to_cpu(from->di_flags); + to->di_gen = be32_to_cpu(from->di_gen); +} - INT_XLATE(buf_core->di_atime.t_sec, mem_core->di_atime.t_sec, - dir, arch); - INT_XLATE(buf_core->di_atime.t_nsec, mem_core->di_atime.t_nsec, - dir, arch); - INT_XLATE(buf_core->di_mtime.t_sec, mem_core->di_mtime.t_sec, - dir, arch); - INT_XLATE(buf_core->di_mtime.t_nsec, mem_core->di_mtime.t_nsec, - dir, arch); - INT_XLATE(buf_core->di_ctime.t_sec, mem_core->di_ctime.t_sec, - dir, arch); - INT_XLATE(buf_core->di_ctime.t_nsec, mem_core->di_ctime.t_nsec, - dir, arch); - INT_XLATE(buf_core->di_size, mem_core->di_size, dir, arch); - INT_XLATE(buf_core->di_nblocks, mem_core->di_nblocks, dir, arch); - INT_XLATE(buf_core->di_extsize, mem_core->di_extsize, dir, arch); - INT_XLATE(buf_core->di_nextents, mem_core->di_nextents, dir, arch); - INT_XLATE(buf_core->di_anextents, mem_core->di_anextents, dir, arch); - INT_XLATE(buf_core->di_forkoff, mem_core->di_forkoff, dir, arch); - INT_XLATE(buf_core->di_aformat, mem_core->di_aformat, dir, arch); - INT_XLATE(buf_core->di_dmevmask, mem_core->di_dmevmask, dir, arch); - INT_XLATE(buf_core->di_dmstate, mem_core->di_dmstate, dir, arch); - INT_XLATE(buf_core->di_flags, mem_core->di_flags, dir, arch); - INT_XLATE(buf_core->di_gen, mem_core->di_gen, dir, arch); +void +xfs_dinode_to_disk( + xfs_dinode_core_t *to, + xfs_icdinode_t *from) +{ + to->di_magic = cpu_to_be16(from->di_magic); + to->di_mode = cpu_to_be16(from->di_mode); + to->di_version = from ->di_version; + to->di_format = from->di_format; + to->di_onlink = cpu_to_be16(from->di_onlink); + to->di_uid = cpu_to_be32(from->di_uid); + to->di_gid = cpu_to_be32(from->di_gid); + to->di_nlink = cpu_to_be32(from->di_nlink); + to->di_projid = cpu_to_be16(from->di_projid); + memcpy(to->di_pad, from->di_pad, sizeof(to->di_pad)); + to->di_flushiter = cpu_to_be16(from->di_flushiter); + to->di_atime.t_sec = cpu_to_be32(from->di_atime.t_sec); + to->di_atime.t_nsec = cpu_to_be32(from->di_atime.t_nsec); + to->di_mtime.t_sec = cpu_to_be32(from->di_mtime.t_sec); + to->di_mtime.t_nsec = cpu_to_be32(from->di_mtime.t_nsec); + to->di_ctime.t_sec = cpu_to_be32(from->di_ctime.t_sec); + to->di_ctime.t_nsec = cpu_to_be32(from->di_ctime.t_nsec); + to->di_size = cpu_to_be64(from->di_size); + to->di_nblocks = cpu_to_be64(from->di_nblocks); + to->di_extsize = cpu_to_be32(from->di_extsize); + to->di_nextents = cpu_to_be32(from->di_nextents); + to->di_anextents = cpu_to_be16(from->di_anextents); + to->di_forkoff = from->di_forkoff; + to->di_aformat = from->di_aformat; + to->di_dmevmask = cpu_to_be32(from->di_dmevmask); + to->di_dmstate = cpu_to_be16(from->di_dmstate); + to->di_flags = cpu_to_be16(from->di_flags); + to->di_gen = cpu_to_be32(from->di_gen); } STATIC uint @@ -819,7 +822,7 @@ uint xfs_ip2xflags( xfs_inode_t *ip) { - xfs_dinode_core_t *dic = &ip->i_d; + xfs_icdinode_t *dic = &ip->i_d; return _xfs_dic2xflags(dic->di_flags) | (XFS_CFORK_Q(dic) ? XFS_XFLAG_HASATTR : 0); @@ -829,7 +832,7 @@ uint xfs_dic2xflags( xfs_dinode_core_t *dic) { - return _xfs_dic2xflags(INT_GET(dic->di_flags, ARCH_CONVERT)) | + return _xfs_dic2xflags(be16_to_cpu(dic->di_flags)) | (XFS_CFORK_Q_DISK(dic) ? XFS_XFLAG_HASATTR : 0); } @@ -899,14 +902,14 @@ xfs_iread( * If we got something that isn't an inode it means someone * (nfs or dmi) has a stale handle. */ - if (INT_GET(dip->di_core.di_magic, ARCH_CONVERT) != XFS_DINODE_MAGIC) { + if (be16_to_cpu(dip->di_core.di_magic) != XFS_DINODE_MAGIC) { kmem_zone_free(xfs_inode_zone, ip); xfs_trans_brelse(tp, bp); #ifdef DEBUG xfs_fs_cmn_err(CE_ALERT, mp, "xfs_iread: " "dip->di_core.di_magic (0x%x) != " "XFS_DINODE_MAGIC (0x%x)", - INT_GET(dip->di_core.di_magic, ARCH_CONVERT), + be16_to_cpu(dip->di_core.di_magic), XFS_DINODE_MAGIC); #endif /* DEBUG */ return XFS_ERROR(EINVAL); @@ -920,8 +923,7 @@ xfs_iread( * Otherwise, just get the truly permanent information. */ if (dip->di_core.di_mode) { - xfs_xlate_dinode_core((xfs_caddr_t)&dip->di_core, - &(ip->i_d), 1); + xfs_dinode_from_disk(&ip->i_d, &dip->di_core); error = xfs_iformat(ip, dip); if (error) { kmem_zone_free(xfs_inode_zone, ip); @@ -934,10 +936,10 @@ xfs_iread( return error; } } else { - ip->i_d.di_magic = INT_GET(dip->di_core.di_magic, ARCH_CONVERT); - ip->i_d.di_version = INT_GET(dip->di_core.di_version, ARCH_CONVERT); - ip->i_d.di_gen = INT_GET(dip->di_core.di_gen, ARCH_CONVERT); - ip->i_d.di_flushiter = INT_GET(dip->di_core.di_flushiter, ARCH_CONVERT); + ip->i_d.di_magic = be16_to_cpu(dip->di_core.di_magic); + ip->i_d.di_version = dip->di_core.di_version; + ip->i_d.di_gen = be32_to_cpu(dip->di_core.di_gen); + ip->i_d.di_flushiter = be16_to_cpu(dip->di_core.di_flushiter); /* * Make sure to pull in the mode here as well in * case the inode is released without being used. @@ -1959,8 +1961,7 @@ xfs_iunlink( if (error) { return error; } - ASSERT(INT_GET(dip->di_next_unlinked, ARCH_CONVERT) == NULLAGINO); - ASSERT(dip->di_next_unlinked); + ASSERT(be32_to_cpu(dip->di_next_unlinked) == NULLAGINO); /* both on-disk, don't endian flip twice */ dip->di_next_unlinked = agi->agi_unlinked[bucket_index]; offset = ip->i_boffset + @@ -2071,10 +2072,10 @@ xfs_iunlink_remove( error, mp->m_fsname); return error; } - next_agino = INT_GET(dip->di_next_unlinked, ARCH_CONVERT); + next_agino = be32_to_cpu(dip->di_next_unlinked); ASSERT(next_agino != 0); if (next_agino != NULLAGINO) { - INT_SET(dip->di_next_unlinked, ARCH_CONVERT, NULLAGINO); + dip->di_next_unlinked = cpu_to_be32(NULLAGINO); offset = ip->i_boffset + offsetof(xfs_dinode_t, di_next_unlinked); xfs_trans_inode_buf(tp, ibp); @@ -2118,7 +2119,7 @@ xfs_iunlink_remove( error, mp->m_fsname); return error; } - next_agino = INT_GET(last_dip->di_next_unlinked, ARCH_CONVERT); + next_agino = be32_to_cpu(last_dip->di_next_unlinked); ASSERT(next_agino != NULLAGINO); ASSERT(next_agino != 0); } @@ -2133,11 +2134,11 @@ xfs_iunlink_remove( error, mp->m_fsname); return error; } - next_agino = INT_GET(dip->di_next_unlinked, ARCH_CONVERT); + next_agino = be32_to_cpu(dip->di_next_unlinked); ASSERT(next_agino != 0); ASSERT(next_agino != agino); if (next_agino != NULLAGINO) { - INT_SET(dip->di_next_unlinked, ARCH_CONVERT, NULLAGINO); + dip->di_next_unlinked = cpu_to_be32(NULLAGINO); offset = ip->i_boffset + offsetof(xfs_dinode_t, di_next_unlinked); xfs_trans_inode_buf(tp, ibp); @@ -2150,7 +2151,7 @@ xfs_iunlink_remove( /* * Point the previous inode on the list to the next inode. */ - INT_SET(last_dip->di_next_unlinked, ARCH_CONVERT, next_agino); + last_dip->di_next_unlinked = cpu_to_be32(next_agino); ASSERT(next_agino != 0); offset = last_offset + offsetof(xfs_dinode_t, di_next_unlinked); xfs_trans_inode_buf(tp, last_ibp); @@ -3009,7 +3010,7 @@ xfs_iflush_fork( case XFS_DINODE_FMT_DEV: if (iip->ili_format.ilf_fields & XFS_ILOG_DEV) { ASSERT(whichfork == XFS_DATA_FORK); - INT_SET(dip->di_u.di_dev, ARCH_CONVERT, ip->i_df.if_u2.if_rdev); + dip->di_u.di_dev = cpu_to_be32(ip->i_df.if_u2.if_rdev); } break; @@ -3358,11 +3359,11 @@ xfs_iflush_int( */ xfs_synchronize_atime(ip); - if (XFS_TEST_ERROR(INT_GET(dip->di_core.di_magic,ARCH_CONVERT) != XFS_DINODE_MAGIC, + if (XFS_TEST_ERROR(be16_to_cpu(dip->di_core.di_magic) != XFS_DINODE_MAGIC, mp, XFS_ERRTAG_IFLUSH_1, XFS_RANDOM_IFLUSH_1)) { xfs_cmn_err(XFS_PTAG_IFLUSH, CE_ALERT, mp, "xfs_iflush: Bad inode %Lu magic number 0x%x, ptr 0x%p", - ip->i_ino, (int) INT_GET(dip->di_core.di_magic, ARCH_CONVERT), dip); + ip->i_ino, be16_to_cpu(dip->di_core.di_magic), dip); goto corrupt_out; } if (XFS_TEST_ERROR(ip->i_d.di_magic != XFS_DINODE_MAGIC, @@ -3425,7 +3426,7 @@ xfs_iflush_int( * because if the inode is dirty at all the core must * be. */ - xfs_xlate_dinode_core((xfs_caddr_t)&(dip->di_core), &(ip->i_d), -1); + xfs_dinode_to_disk(&dip->di_core, &ip->i_d); /* Wrap, we never let the log put out DI_MAX_FLUSH */ if (ip->i_d.di_flushiter == DI_MAX_FLUSH) @@ -3445,7 +3446,7 @@ xfs_iflush_int( * Convert it back. */ ASSERT(ip->i_d.di_nlink <= XFS_MAXLINK_1); - INT_SET(dip->di_core.di_onlink, ARCH_CONVERT, ip->i_d.di_nlink); + dip->di_core.di_onlink = cpu_to_be16(ip->i_d.di_nlink); } else { /* * The superblock version has already been bumped, @@ -3453,7 +3454,7 @@ xfs_iflush_int( * format permanent. */ ip->i_d.di_version = XFS_DINODE_VERSION_2; - INT_SET(dip->di_core.di_version, ARCH_CONVERT, XFS_DINODE_VERSION_2); + dip->di_core.di_version = XFS_DINODE_VERSION_2; ip->i_d.di_onlink = 0; dip->di_core.di_onlink = 0; memset(&(ip->i_d.di_pad[0]), 0, sizeof(ip->i_d.di_pad)); Index: linux-2.6-xfs/fs/xfs/xfs_itable.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_itable.c 2007-08-03 01:00:28.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_itable.c 2007-08-03 01:06:39.000000000 +0200 @@ -57,7 +57,7 @@ xfs_bulkstat_one_iget( xfs_bstat_t *buf, /* return buffer */ int *stat) /* BULKSTAT_RV_... */ { - xfs_dinode_core_t *dic; /* dinode core info pointer */ + xfs_icdinode_t *dic; /* dinode core info pointer */ xfs_inode_t *ip; /* incore inode pointer */ bhv_vnode_t *vp; int error; @@ -151,37 +151,37 @@ xfs_bulkstat_one_dinode( * the new format. We don't change the version number so that we * can distinguish this from a real new format inode. */ - if (INT_GET(dic->di_version, ARCH_CONVERT) == XFS_DINODE_VERSION_1) { - buf->bs_nlink = INT_GET(dic->di_onlink, ARCH_CONVERT); + if (dic->di_version == XFS_DINODE_VERSION_1) { + buf->bs_nlink = be16_to_cpu(dic->di_onlink); buf->bs_projid = 0; } else { - buf->bs_nlink = INT_GET(dic->di_nlink, ARCH_CONVERT); - buf->bs_projid = INT_GET(dic->di_projid, ARCH_CONVERT); + buf->bs_nlink = be32_to_cpu(dic->di_nlink); + buf->bs_projid = be16_to_cpu(dic->di_projid); } buf->bs_ino = ino; - buf->bs_mode = INT_GET(dic->di_mode, ARCH_CONVERT); - buf->bs_uid = INT_GET(dic->di_uid, ARCH_CONVERT); - buf->bs_gid = INT_GET(dic->di_gid, ARCH_CONVERT); - buf->bs_size = INT_GET(dic->di_size, ARCH_CONVERT); - buf->bs_atime.tv_sec = INT_GET(dic->di_atime.t_sec, ARCH_CONVERT); - buf->bs_atime.tv_nsec = INT_GET(dic->di_atime.t_nsec, ARCH_CONVERT); - buf->bs_mtime.tv_sec = INT_GET(dic->di_mtime.t_sec, ARCH_CONVERT); - buf->bs_mtime.tv_nsec = INT_GET(dic->di_mtime.t_nsec, ARCH_CONVERT); - buf->bs_ctime.tv_sec = INT_GET(dic->di_ctime.t_sec, ARCH_CONVERT); - buf->bs_ctime.tv_nsec = INT_GET(dic->di_ctime.t_nsec, ARCH_CONVERT); + buf->bs_mode = be16_to_cpu(dic->di_mode); + buf->bs_uid = be32_to_cpu(dic->di_uid); + buf->bs_gid = be32_to_cpu(dic->di_gid); + buf->bs_size = be64_to_cpu(dic->di_size); + buf->bs_atime.tv_sec = be32_to_cpu(dic->di_atime.t_sec); + buf->bs_atime.tv_nsec = be32_to_cpu(dic->di_atime.t_nsec); + buf->bs_mtime.tv_sec = be32_to_cpu(dic->di_mtime.t_sec); + buf->bs_mtime.tv_nsec = be32_to_cpu(dic->di_mtime.t_nsec); + buf->bs_ctime.tv_sec = be32_to_cpu(dic->di_ctime.t_sec); + buf->bs_ctime.tv_nsec = be32_to_cpu(dic->di_ctime.t_nsec); buf->bs_xflags = xfs_dic2xflags(dic); - buf->bs_extsize = INT_GET(dic->di_extsize, ARCH_CONVERT) << mp->m_sb.sb_blocklog; - buf->bs_extents = INT_GET(dic->di_nextents, ARCH_CONVERT); - buf->bs_gen = INT_GET(dic->di_gen, ARCH_CONVERT); + buf->bs_extsize = be32_to_cpu(dic->di_extsize) << mp->m_sb.sb_blocklog; + buf->bs_extents = be32_to_cpu(dic->di_nextents); + buf->bs_gen = be32_to_cpu(dic->di_gen); memset(buf->bs_pad, 0, sizeof(buf->bs_pad)); - buf->bs_dmevmask = INT_GET(dic->di_dmevmask, ARCH_CONVERT); - buf->bs_dmstate = INT_GET(dic->di_dmstate, ARCH_CONVERT); - buf->bs_aextents = INT_GET(dic->di_anextents, ARCH_CONVERT); + buf->bs_dmevmask = be32_to_cpu(dic->di_dmevmask); + buf->bs_dmstate = be16_to_cpu(dic->di_dmstate); + buf->bs_aextents = be16_to_cpu(dic->di_anextents); - switch (INT_GET(dic->di_format, ARCH_CONVERT)) { + switch (dic->di_format) { case XFS_DINODE_FMT_DEV: - buf->bs_rdev = INT_GET(dip->di_u.di_dev, ARCH_CONVERT); + buf->bs_rdev = be32_to_cpu(dip->di_u.di_dev); buf->bs_blksize = BLKDEV_IOSIZE; buf->bs_blocks = 0; break; @@ -195,7 +195,7 @@ xfs_bulkstat_one_dinode( case XFS_DINODE_FMT_BTREE: buf->bs_rdev = 0; buf->bs_blksize = mp->m_sb.sb_blocksize; - buf->bs_blocks = INT_GET(dic->di_nblocks, ARCH_CONVERT); + buf->bs_blocks = be64_to_cpu(dic->di_nblocks); break; } @@ -290,16 +290,15 @@ xfs_bulkstat_use_dinode( return 1; dip = (xfs_dinode_t *) xfs_buf_offset(bp, clustidx << mp->m_sb.sb_inodelog); - if (INT_GET(dip->di_core.di_magic, ARCH_CONVERT) != XFS_DINODE_MAGIC || - !XFS_DINODE_GOOD_VERSION( - INT_GET(dip->di_core.di_version, ARCH_CONVERT))) + if (be16_to_cpu(dip->di_core.di_magic) != XFS_DINODE_MAGIC || + !XFS_DINODE_GOOD_VERSION(dip->di_core.di_version)) return 0; if (flags & BULKSTAT_FG_QUICK) { *dipp = dip; return 1; } /* BULKSTAT_FG_INLINE: if attr fork is local, or not there, use it */ - aformat = INT_GET(dip->di_core.di_aformat, ARCH_CONVERT); + aformat = dip->di_core.di_aformat; if ((XFS_CFORK_Q(&dip->di_core) == 0) || (aformat == XFS_DINODE_FMT_LOCAL) || (aformat == XFS_DINODE_FMT_EXTENTS && !dip->di_core.di_anextents)) { Index: linux-2.6-xfs/fs/xfs/xfs_log_recover.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_log_recover.c 2007-08-03 01:02:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_log_recover.c 2007-08-03 01:18:09.000000000 +0200 @@ -2245,7 +2245,7 @@ xlog_recover_do_inode_trans( int error; int attr_index; uint fields; - xfs_dinode_core_t *dicp; + xfs_icdinode_t *dicp; int need_free = 0; if (pass == XLOG_RECOVER_PASS1) { @@ -2309,7 +2309,7 @@ xlog_recover_do_inode_trans( * Make sure the place we're flushing out to really looks * like an inode! */ - if (unlikely(INT_GET(dip->di_core.di_magic, ARCH_CONVERT) != XFS_DINODE_MAGIC)) { + if (unlikely(be16_to_cpu(dip->di_core.di_magic) != XFS_DINODE_MAGIC)) { xfs_buf_relse(bp); xfs_fs_cmn_err(CE_ALERT, mp, "xfs_inode_recover: Bad inode magic number, dino ptr = 0x%p, dino bp = 0x%p, ino = %Ld", @@ -2319,7 +2319,7 @@ xlog_recover_do_inode_trans( error = EFSCORRUPTED; goto error; } - dicp = (xfs_dinode_core_t*)(item->ri_buf[1].i_addr); + dicp = (xfs_icdinode_t *)(item->ri_buf[1].i_addr); if (unlikely(dicp->di_magic != XFS_DINODE_MAGIC)) { xfs_buf_relse(bp); xfs_fs_cmn_err(CE_ALERT, mp, @@ -2332,15 +2332,13 @@ xlog_recover_do_inode_trans( } /* Skip replay when the on disk inode is newer than the log one */ - if (dicp->di_flushiter < - INT_GET(dip->di_core.di_flushiter, ARCH_CONVERT)) { + if (dicp->di_flushiter < be16_to_cpu(dip->di_core.di_flushiter)) { /* * Deal with the wrap case, DI_MAX_FLUSH is less * than smaller numbers */ - if ((INT_GET(dip->di_core.di_flushiter, ARCH_CONVERT) - == DI_MAX_FLUSH) && - (dicp->di_flushiter < (DI_MAX_FLUSH>>1))) { + if (be16_to_cpu(dip->di_core.di_flushiter) == DI_MAX_FLUSH && + dicp->di_flushiter < (DI_MAX_FLUSH >> 1)) { /* do nothing */ } else { xfs_buf_relse(bp); @@ -2411,8 +2409,8 @@ xlog_recover_do_inode_trans( } /* The core is in in-core format */ - xfs_xlate_dinode_core((xfs_caddr_t)&dip->di_core, - (xfs_dinode_core_t*)item->ri_buf[1].i_addr, -1); + xfs_dinode_to_disk(&dip->di_core, + (xfs_icdinode_t *)item->ri_buf[1].i_addr); /* the rest is in on-disk format */ if (item->ri_buf[1].i_len > sizeof(xfs_dinode_core_t)) { @@ -2424,8 +2422,7 @@ xlog_recover_do_inode_trans( fields = in_f->ilf_fields; switch (fields & (XFS_ILOG_DEV | XFS_ILOG_UUID)) { case XFS_ILOG_DEV: - INT_SET(dip->di_u.di_dev, ARCH_CONVERT, in_f->ilf_u.ilfu_rdev); - + dip->di_u.di_dev = cpu_to_be32(in_f->ilf_u.ilfu_rdev); break; case XFS_ILOG_UUID: dip->di_u.di_muuid = in_f->ilf_u.ilfu_uuid; @@ -3234,8 +3231,8 @@ xlog_recover_process_iunlinks( ASSERT(ip->i_d.di_nlink == 0); /* setup for the next pass */ - agino = INT_GET(dip->di_next_unlinked, - ARCH_CONVERT); + agino = be32_to_cpu( + dip->di_next_unlinked); xfs_buf_relse(ibp); /* * Prevent any DMAPI event from Index: linux-2.6-xfs/fs/xfs/xfsidbg.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfsidbg.c 2007-08-03 01:02:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfsidbg.c 2007-08-03 01:18:09.000000000 +0200 @@ -232,7 +232,7 @@ static char * xfs_fmtsize(size_t i); static char * xfs_fmtuuid(uuid_t *); static void xfs_inode_item_print(xfs_inode_log_item_t *ilip, int summary); static void xfs_inodebuf(xfs_buf_t *bp); -static void xfs_prdinode_core(xfs_dinode_core_t *dip); +static void xfs_prdinode_incore(xfs_icdinode_t *dip); static void xfs_qoff_item_print(xfs_qoff_logitem_t *lip, int summary); static void xfs_xexlist_fork(xfs_inode_t *ip, int whichfork); static void xfs_xnode_fork(char *name, xfs_ifork_t *f); @@ -3828,7 +3828,7 @@ static void xfs_inodebuf(xfs_buf_t *bp) { xfs_dinode_t *di; - xfs_dinode_core_t dic; + xfs_icdinode_t dic; int n, i; n = XFS_BUF_COUNT(bp) >> 8; @@ -3836,11 +3836,10 @@ xfs_inodebuf(xfs_buf_t *bp) di = (xfs_dinode_t *)xfs_buf_offset(bp, i * 256); - xfs_xlate_dinode_core((xfs_caddr_t)&di->di_core, &dic, 1); - xfs_prdinode_core(&dic); + xfs_dinode_from_disk(&dic, &di->di_core); + xfs_prdinode_incore(&dic); kdb_printf("next_unlinked 0x%x u@0x%p\n", - INT_GET(di->di_next_unlinked, ARCH_CONVERT), - &di->di_u); + be32_to_cpu(di->di_next_unlinked), &di->di_u); } } @@ -3981,7 +3980,7 @@ xfs_inval_cached_trace_entry(ktrace_entr * Print disk inode core. */ static void -xfs_prdinode_core(xfs_dinode_core_t *dip) +xfs_prdinode_incore(xfs_icdinode_t *dip) { static char *diflags[] = { "realtime", /* XFS_DIFLAG_REALTIME */ @@ -5059,7 +5058,7 @@ xfsidbg_xbuf_real(xfs_buf_t *bp, int sum kdb_printf("buf 0x%p dir/attr node 0x%p\n", bp, node); xfsidbg_xdanode(node); } - } else if (INT_GET((di = d)->di_core.di_magic, ARCH_CONVERT) == XFS_DINODE_MAGIC) { + } else if (be16_to_cpu((di = d)->di_core.di_magic) == XFS_DINODE_MAGIC) { if (summary) { kdb_printf("Disk Inode (at 0x%p)\n", di); } else { @@ -6906,7 +6905,7 @@ xfsidbg_xnode(xfs_inode_t *ip) xfs_xnode_fork("data", &ip->i_df); xfs_xnode_fork("attr", ip->i_afp); kdb_printf("\n"); - xfs_prdinode_core(&ip->i_d); + xfs_prdinode_incore(&ip->i_d); } static void Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ksyms.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_ksyms.c 2007-08-03 01:02:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ksyms.c 2007-08-03 01:18:09.000000000 +0200 @@ -329,7 +329,7 @@ EXPORT_SYMBOL(xfs_vfsops); EXPORT_SYMBOL(xfs_vnodeops); EXPORT_SYMBOL(xfs_vtoi); EXPORT_SYMBOL(xfs_write_clear_setuid); -EXPORT_SYMBOL(xfs_xlate_dinode_core); +EXPORT_SYMBOL(xfs_dinode_from_disk); EXPORT_SYMBOL(xfs_xlatesb); EXPORT_SYMBOL(xfs_zero_eof); EXPORT_SYMBOL(xlog_recover_process_iunlinks); Index: linux-2.6-xfs/fs/xfs/xfs_inode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_inode.h 2007-08-03 01:02:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_inode.h 2007-08-03 01:22:01.000000000 +0200 @@ -227,6 +227,43 @@ typedef struct xfs_chash { * chain off the mount structure by xfs_sync calls. */ +typedef struct xfs_ictimestamp { + __int32_t t_sec; /* timestamp seconds */ + __int32_t t_nsec; /* timestamp nanoseconds */ +} xfs_ictimestamp_t; + +/* + * NOTE: This structure must be kept identical to struct xfs_dinode_core + * in xfs_dinode.h except for the endianess annotations. + */ +typedef struct xfs_icincore { + __uint16_t di_magic; /* inode magic # = XFS_DINODE_MAGIC */ + __uint16_t di_mode; /* mode and type of file */ + __int8_t di_version; /* inode version */ + __int8_t di_format; /* format of di_c data */ + __uint16_t di_onlink; /* old number of links to file */ + __uint32_t di_uid; /* owner's user id */ + __uint32_t di_gid; /* owner's group id */ + __uint32_t di_nlink; /* number of links to file */ + __uint16_t di_projid; /* owner's project id */ + __uint8_t di_pad[8]; /* unused, zeroed space */ + __uint16_t di_flushiter; /* incremented on flush */ + xfs_ictimestamp_t di_atime; /* time last accessed */ + xfs_ictimestamp_t di_mtime; /* time last modified */ + xfs_ictimestamp_t di_ctime; /* time created/inode modified */ + xfs_fsize_t di_size; /* number of bytes in file */ + xfs_drfsbno_t di_nblocks; /* # of direct & btree blocks used */ + xfs_extlen_t di_extsize; /* basic/minimum extent size for file */ + xfs_extnum_t di_nextents; /* number of extents in data fork */ + xfs_aextnum_t di_anextents; /* number of extents in attribute fork*/ + __uint8_t di_forkoff; /* attr fork offs, <<3 for 64b align */ + __int8_t di_aformat; /* format of attr fork's data */ + __uint32_t di_dmevmask; /* DMIG event mask */ + __uint16_t di_dmstate; /* DMIG state info */ + __uint16_t di_flags; /* random flags, XFS_DIFLAG_... */ + __uint32_t di_gen; /* generation number */ +} xfs_icdinode_t; + typedef struct { struct xfs_ihash *ip_hash; /* pointer to hash header */ struct xfs_inode *ip_next; /* inode hash link forw */ @@ -282,7 +319,7 @@ typedef struct xfs_inode { unsigned int i_gen; /* generation count */ unsigned int i_delayed_blks; /* count of delay alloc blks */ - xfs_dinode_core_t i_d; /* most of ondisk inode */ + xfs_icdinode_t i_d; /* most of ondisk inode */ xfs_chashlist_t *i_chash; /* cluster hash list header */ struct xfs_inode *i_cnext; /* cluster hash link forward */ struct xfs_inode *i_cprev; /* cluster hash link backward */ @@ -514,8 +551,11 @@ int xfs_iread_extents(struct xfs_trans int xfs_ialloc(struct xfs_trans *, xfs_inode_t *, mode_t, xfs_nlink_t, xfs_dev_t, struct cred *, xfs_prid_t, int, struct xfs_buf **, boolean_t *, xfs_inode_t **); -void xfs_xlate_dinode_core(xfs_caddr_t, struct xfs_dinode_core *, - int); +void xfs_dinode_from_disk(xfs_icdinode_t *, + xfs_dinode_core_t *); +void xfs_dinode_to_disk(xfs_dinode_core_t *, + xfs_icdinode_t *); + uint xfs_ip2xflags(struct xfs_inode *); uint xfs_dic2xflags(struct xfs_dinode_core *); int xfs_ifree(struct xfs_trans *, xfs_inode_t *, From owner-xfs@oss.sgi.com Thu Aug 2 18:21:09 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 18:21:13 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l731L7bm015320 for ; Thu, 2 Aug 2007 18:21:08 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l731LAA5006750 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Fri, 3 Aug 2007 03:21:10 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l731LAfW006748 for xfs@oss.sgi.com; Fri, 3 Aug 2007 03:21:10 +0200 Date: Fri, 3 Aug 2007 03:21:10 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH] replace some large xfs_log_priv.h macros by proper functions Message-ID: <20070803012110.GA6590@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12458 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs ... or in the case of XLOG_TIC_ADD_OPHDR remove a useless macro entirely. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/xfs_log.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_log.c 2007-08-03 01:02:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_log.c 2007-08-03 01:10:41.000000000 +0200 @@ -252,6 +252,29 @@ xlog_grant_add_space(struct log *log, in xlog_grant_add_space_reserve(log, bytes); } +static void +xlog_tic_reset_res(xlog_ticket_t *tic) +{ + tic->t_res_num = 0; + tic->t_res_arr_sum = 0; + tic->t_res_num_ophdrs = 0; +} + +static void +xlog_tic_add_region(xlog_ticket_t *tic, uint len, uint type) +{ + if (tic->t_res_num == XLOG_TIC_LEN_MAX) { + /* add to overflow and start again */ + tic->t_res_o_flow += tic->t_res_arr_sum; + tic->t_res_num = 0; + tic->t_res_arr_sum = 0; + } + + tic->t_res_arr[tic->t_res_num].r_len = len; + tic->t_res_arr[tic->t_res_num].r_type = type; + tic->t_res_arr_sum += len; + tic->t_res_num++; +} /* * NOTES: @@ -1765,14 +1788,14 @@ xlog_write(xfs_mount_t * mp, len = 0; if (ticket->t_flags & XLOG_TIC_INITED) { /* acct for start rec of xact */ len += sizeof(xlog_op_header_t); - XLOG_TIC_ADD_OPHDR(ticket); + ticket->t_res_num_ophdrs++; } for (index = 0; index < nentries; index++) { len += sizeof(xlog_op_header_t); /* each region gets >= 1 */ - XLOG_TIC_ADD_OPHDR(ticket); + ticket->t_res_num_ophdrs++; len += reg[index].i_len; - XLOG_TIC_ADD_REGION(ticket, reg[index].i_len, reg[index].i_type); + xlog_tic_add_region(ticket, reg[index].i_len, reg[index].i_type); } contwr = *start_lsn = 0; @@ -1881,7 +1904,7 @@ xlog_write(xfs_mount_t * mp, len += sizeof(xlog_op_header_t); /* from splitting of region */ /* account for new log op header */ ticket->t_curr_res -= sizeof(xlog_op_header_t); - XLOG_TIC_ADD_OPHDR(ticket); + ticket->t_res_num_ophdrs++; } xlog_verify_dest_ptr(log, ptr); @@ -2379,7 +2402,7 @@ restart: */ if (log_offset == 0) { ticket->t_curr_res -= log->l_iclog_hsize; - XLOG_TIC_ADD_REGION(ticket, + xlog_tic_add_region(ticket, log->l_iclog_hsize, XLOG_REG_TYPE_LRHEADER); INT_SET(head->h_cycle, ARCH_CONVERT, log->l_curr_cycle); @@ -2567,7 +2590,7 @@ xlog_regrant_write_log_space(xlog_t * #endif tic->t_curr_res = tic->t_unit_res; - XLOG_TIC_RESET_RES(tic); + xlog_tic_reset_res(tic); if (tic->t_cnt > 0) return 0; @@ -2708,7 +2731,7 @@ xlog_regrant_reserve_log_space(xlog_t s = GRANT_LOCK(log); xlog_grant_sub_space(log, ticket->t_curr_res); ticket->t_curr_res = ticket->t_unit_res; - XLOG_TIC_RESET_RES(ticket); + xlog_tic_reset_res(ticket); xlog_trace_loggrant(log, ticket, "xlog_regrant_reserve_log_space: sub current res"); xlog_verify_grant_head(log, 1); @@ -2725,7 +2748,7 @@ xlog_regrant_reserve_log_space(xlog_t xlog_verify_grant_head(log, 0); GRANT_UNLOCK(log, s); ticket->t_curr_res = ticket->t_unit_res; - XLOG_TIC_RESET_RES(ticket); + xlog_tic_reset_res(ticket); } /* xlog_regrant_reserve_log_space */ @@ -3348,7 +3371,7 @@ xlog_ticket_get(xlog_t *log, tic->t_flags |= XLOG_TIC_PERM_RESERV; sv_init(&(tic->t_sema), SV_DEFAULT, "logtick"); - XLOG_TIC_RESET_RES(tic); + xlog_tic_reset_res(tic); return tic; } /* xlog_ticket_get */ Index: linux-2.6-xfs/fs/xfs/xfs_log_priv.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_log_priv.h 2007-08-03 01:02:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_log_priv.h 2007-08-03 01:10:17.000000000 +0200 @@ -249,22 +249,6 @@ typedef __uint32_t xlog_tid_t; /* Ticket reservation region accounting */ #define XLOG_TIC_LEN_MAX 15 -#define XLOG_TIC_RESET_RES(t) ((t)->t_res_num = \ - (t)->t_res_arr_sum = (t)->t_res_num_ophdrs = 0) -#define XLOG_TIC_ADD_OPHDR(t) ((t)->t_res_num_ophdrs++) -#define XLOG_TIC_ADD_REGION(t, len, type) \ - do { \ - if ((t)->t_res_num == XLOG_TIC_LEN_MAX) { \ - /* add to overflow and start again */ \ - (t)->t_res_o_flow += (t)->t_res_arr_sum; \ - (t)->t_res_num = 0; \ - (t)->t_res_arr_sum = 0; \ - } \ - (t)->t_res_arr[(t)->t_res_num].r_len = (len); \ - (t)->t_res_arr[(t)->t_res_num].r_type = (type); \ - (t)->t_res_arr_sum += (len); \ - (t)->t_res_num++; \ - } while (0) /* * Reservation region From owner-xfs@oss.sgi.com Thu Aug 2 19:31:14 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 19:31:18 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_24 autolearn=no version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l732V6bm003064 for ; Thu, 2 Aug 2007 19:31:10 -0700 Received: from [134.14.55.89] (soarer.melbourne.sgi.com [134.14.55.89]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id MAA02748; Fri, 3 Aug 2007 12:19:09 +1000 Message-ID: <46B2911A.60308@sgi.com> Date: Fri, 03 Aug 2007 12:21:14 +1000 From: Vlad Apostolov User-Agent: Thunderbird 1.5.0.12 (X11/20070509) MIME-Version: 1.0 To: Christoph Hellwig CC: xfs@oss.sgi.com Subject: Re: [PATCH] remove unessecary vfs argument to DM_EVENT_ENABLED References: <20070802143417.GA30414@lst.de> In-Reply-To: <20070802143417.GA30414@lst.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12459 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: vapo@sgi.com Precedence: bulk X-list: xfs It is looking good Christoph. I built it and ran DMAPI QA and all went fine. Dave is also looking at it and would provide a feedback. Regards, Vlad Christoph Hellwig wrote: > We can easily derive the vfs from the inode passed in. Also kill > the unused DM_EVENT_ENABLED_IO macro. > > > Signed-off-by: Christoph Hellwig > > Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c > =================================================================== > --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm.c 2007-08-01 19:53:27.000000000 +0200 > +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c 2007-08-01 19:53:42.000000000 +0200 > @@ -3271,8 +3271,7 @@ xfs_dm_send_mmap_event( > > xfs_ilock(ip, iolock); > /* If write possible, try a DMAPI write event */ > - if ((max_event == DM_EVENT_WRITE) && > - DM_EVENT_ENABLED(vp->v_vfsp, ip, max_event)){ > + if (max_event == DM_EVENT_WRITE && DM_EVENT_ENABLED(ip, max_event)) { > error = xfs_dm_send_data_event(max_event, vp, offset, > evsize, 0, &locktype); > goto out_unlock; > @@ -3281,7 +3280,7 @@ xfs_dm_send_mmap_event( > /* Try a read event if max_event was != DM_EVENT_WRITE or if it > * was DM_EVENT_WRITE but the WRITE event was not enabled. > */ > - if (DM_EVENT_ENABLED (vp->v_vfsp, ip, DM_EVENT_READ)) { > + if (DM_EVENT_ENABLED(ip, DM_EVENT_READ)) { > error = xfs_dm_send_data_event(DM_EVENT_READ, vp, offset, > evsize, 0, &locktype); > } > Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_file.c > =================================================================== > --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_file.c 2007-08-01 19:53:22.000000000 +0200 > +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_file.c 2007-08-01 19:53:42.000000000 +0200 > @@ -384,7 +384,7 @@ xfs_file_open_exec( > > if (!ip) > return -EINVAL; > - if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ)) > + if (DM_EVENT_ENABLED(ip, DM_EVENT_READ)) > return -XFS_SEND_DATA(mp, DM_EVENT_READ, vp, > 0, 0, 0, NULL); > } > Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c > =================================================================== > --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_lrw.c 2007-08-01 19:53:27.000000000 +0200 > +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c 2007-08-01 19:56:14.000000000 +0200 > @@ -245,8 +245,7 @@ xfs_read( > mutex_lock(&inode->i_mutex); > xfs_ilock(ip, XFS_IOLOCK_SHARED); > > - if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ) && > - !(ioflags & IO_INVIS)) { > + if (DM_EVENT_ENABLED(ip, DM_EVENT_READ) && !(ioflags & IO_INVIS)) { > bhv_vrwlock_t locktype = VRWLOCK_READ; > int dmflags = FILP_DELAY_FLAG(file) | DM_SEM_FLAG_RD(ioflags); > > @@ -307,8 +306,7 @@ xfs_sendfile( > > xfs_ilock(ip, XFS_IOLOCK_SHARED); > > - if (DM_EVENT_ENABLED(BHV_TO_VNODE(bdp)->v_vfsp, ip, DM_EVENT_READ) && > - (!(ioflags & IO_INVIS))) { > + if (DM_EVENT_ENABLED(ip, DM_EVENT_READ) && !(ioflags & IO_INVIS)) { > bhv_vrwlock_t locktype = VRWLOCK_READ; > int error; > > @@ -351,8 +349,7 @@ xfs_splice_read( > > xfs_ilock(ip, XFS_IOLOCK_SHARED); > > - if (DM_EVENT_ENABLED(BHV_TO_VNODE(bdp)->v_vfsp, ip, DM_EVENT_READ) && > - (!(ioflags & IO_INVIS))) { > + if (DM_EVENT_ENABLED(ip, DM_EVENT_READ) && !(ioflags & IO_INVIS)) { > bhv_vrwlock_t locktype = VRWLOCK_READ; > int error; > > @@ -398,8 +395,7 @@ xfs_splice_write( > > xfs_ilock(ip, XFS_IOLOCK_EXCL); > > - if (DM_EVENT_ENABLED(BHV_TO_VNODE(bdp)->v_vfsp, ip, DM_EVENT_WRITE) && > - (!(ioflags & IO_INVIS))) { > + if (DM_EVENT_ENABLED(ip, DM_EVENT_WRITE) && !(ioflags & IO_INVIS)) { > bhv_vrwlock_t locktype = VRWLOCK_WRITE; > int error; > > @@ -724,7 +720,7 @@ start: > goto out_unlock_mutex; > } > > - if ((DM_EVENT_ENABLED(vp->v_vfsp, xip, DM_EVENT_WRITE) && > + if ((DM_EVENT_ENABLED(xip, DM_EVENT_WRITE) && > !(ioflags & IO_INVIS) && !eventsent)) { > int dmflags = FILP_DELAY_FLAG(file); > > @@ -876,10 +872,8 @@ retry: > if (ret == -EIOCBQUEUED && !(ioflags & IO_ISAIO)) > ret = wait_on_sync_kiocb(iocb); > > - if ((ret == -ENOSPC) && > - DM_EVENT_ENABLED(vp->v_vfsp, xip, DM_EVENT_NOSPACE) && > - !(ioflags & IO_INVIS)) { > - > + if (ret == -ENOSPC && > + DM_EVENT_ENABLED(xip, DM_EVENT_NOSPACE) && !(ioflags & IO_INVIS)) { > xfs_rwunlock(bdp, locktype); > if (need_i_mutex) > mutex_unlock(&inode->i_mutex); > Index: linux-2.6-xfs/fs/xfs/xfs_bmap.c > =================================================================== > --- linux-2.6-xfs.orig/fs/xfs/xfs_bmap.c 2007-08-01 19:53:27.000000000 +0200 > +++ linux-2.6-xfs/fs/xfs/xfs_bmap.c 2007-08-01 19:53:42.000000000 +0200 > @@ -5811,10 +5811,9 @@ xfs_getbmap( > * could misinterpret holes in a DMAPI file as true holes, > * when in fact they may represent offline user data. > */ > - if ( (interface & BMV_IF_NO_DMAPI_READ) == 0 > - && DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ) > - && whichfork == XFS_DATA_FORK) { > - > + if ((interface & BMV_IF_NO_DMAPI_READ) == 0 && > + DM_EVENT_ENABLED(ip, DM_EVENT_READ) && > + whichfork == XFS_DATA_FORK) { > error = XFS_SEND_DATA(mp, DM_EVENT_READ, vp, 0, 0, 0, NULL); > if (error) > return XFS_ERROR(error); > Index: linux-2.6-xfs/fs/xfs/xfs_dmapi.h > =================================================================== > --- linux-2.6-xfs.orig/fs/xfs/xfs_dmapi.h 2007-08-01 19:53:16.000000000 +0200 > +++ linux-2.6-xfs/fs/xfs/xfs_dmapi.h 2007-08-01 19:53:42.000000000 +0200 > @@ -67,18 +67,12 @@ typedef enum { > #define HAVE_DM_RIGHT_T > > /* Defines for determining if an event message should be sent. */ > -#define DM_EVENT_ENABLED(vfsp, ip, event) ( \ > - unlikely ((vfsp)->vfs_flag & VFS_DMI) && \ > +#define DM_EVENT_ENABLED(ip, event) ( \ > + unlikely (XFS_MTOVFS((ip)->i_mount)->vfs_flag & VFS_DMI) && \ > ( ((ip)->i_d.di_dmevmask & (1 << event)) || \ > ((ip)->i_mount->m_dmevmask & (1 << event)) ) \ > ) > > -#define DM_EVENT_ENABLED_IO(vfsp, io, event) ( \ > - unlikely ((vfsp)->vfs_flag & VFS_DMI) && \ > - ( ((io)->io_dmevmask & (1 << event)) || \ > - ((io)->io_mount->m_dmevmask & (1 << event)) ) \ > - ) > - > #define DM_XFS_VALID_FS_EVENTS ( \ > (1 << DM_EVENT_PREUNMOUNT) | \ > (1 << DM_EVENT_UNMOUNT) | \ > Index: linux-2.6-xfs/fs/xfs/xfs_rename.c > =================================================================== > --- linux-2.6-xfs.orig/fs/xfs/xfs_rename.c 2007-08-01 19:53:27.000000000 +0200 > +++ linux-2.6-xfs/fs/xfs/xfs_rename.c 2007-08-01 19:53:42.000000000 +0200 > @@ -264,9 +264,8 @@ xfs_rename( > src_dp = XFS_BHVTOI(src_dir_bdp); > mp = src_dp->i_mount; > > - if (DM_EVENT_ENABLED(src_dir_vp->v_vfsp, src_dp, DM_EVENT_RENAME) || > - DM_EVENT_ENABLED(target_dir_vp->v_vfsp, > - target_dp, DM_EVENT_RENAME)) { > + if (DM_EVENT_ENABLED(src_dp, DM_EVENT_RENAME) || > + DM_EVENT_ENABLED(target_dp, DM_EVENT_RENAME)) { > error = XFS_SEND_NAMESP(mp, DM_EVENT_RENAME, > src_dir_vp, DM_RIGHT_NULL, > target_dir_vp, DM_RIGHT_NULL, > @@ -603,9 +602,8 @@ xfs_rename( > /* Fall through to std_return with error = 0 or errno from > * xfs_trans_commit */ > std_return: > - if (DM_EVENT_ENABLED(src_dir_vp->v_vfsp, src_dp, DM_EVENT_POSTRENAME) || > - DM_EVENT_ENABLED(target_dir_vp->v_vfsp, > - target_dp, DM_EVENT_POSTRENAME)) { > + if (DM_EVENT_ENABLED(src_dp, DM_EVENT_POSTRENAME) || > + DM_EVENT_ENABLED(target_dp, DM_EVENT_POSTRENAME)) { > (void) XFS_SEND_NAMESP (mp, DM_EVENT_POSTRENAME, > src_dir_vp, DM_RIGHT_NULL, > target_dir_vp, DM_RIGHT_NULL, > Index: linux-2.6-xfs/fs/xfs/xfs_vnodeops.c > =================================================================== > --- linux-2.6-xfs.orig/fs/xfs/xfs_vnodeops.c 2007-08-01 19:53:27.000000000 +0200 > +++ linux-2.6-xfs/fs/xfs/xfs_vnodeops.c 2007-08-01 19:58:06.000000000 +0200 > @@ -337,7 +337,7 @@ xfs_setattr( > } > } > } else { > - if (DM_EVENT_ENABLED (vp->v_vfsp, ip, DM_EVENT_TRUNCATE) && > + if (DM_EVENT_ENABLED(ip, DM_EVENT_TRUNCATE) && > !(flags & ATTR_DMI)) { > int dmflags = AT_DELAY_FLAG(flags) | DM_SEM_FLAG_WR; > code = XFS_SEND_DATA(mp, DM_EVENT_TRUNCATE, vp, > @@ -896,7 +896,7 @@ xfs_setattr( > return code; > } > > - if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_ATTRIBUTE) && > + if (DM_EVENT_ENABLED(ip, DM_EVENT_ATTRIBUTE) && > !(flags & ATTR_DMI)) { > (void) XFS_SEND_NAMESP(mp, DM_EVENT_ATTRIBUTE, vp, DM_RIGHT_NULL, > NULL, DM_RIGHT_NULL, NULL, NULL, > @@ -1651,8 +1651,7 @@ xfs_inactive( > > mp = ip->i_mount; > > - if (ip->i_d.di_nlink == 0 && > - DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_DESTROY)) { > + if (ip->i_d.di_nlink == 0 && DM_EVENT_ENABLED(ip, DM_EVENT_DESTROY)) { > (void) XFS_SEND_DESTROY(mp, vp, DM_RIGHT_NULL); > } > > @@ -1907,7 +1906,7 @@ xfs_create( > dm_di_mode = vap->va_mode; > namelen = VNAMELEN(dentry); > > - if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_CREATE)) { > + if (DM_EVENT_ENABLED(dp, DM_EVENT_CREATE)) { > error = XFS_SEND_NAMESP(mp, DM_EVENT_CREATE, > dir_vp, DM_RIGHT_NULL, NULL, > DM_RIGHT_NULL, name, NULL, > @@ -2072,9 +2071,8 @@ xfs_create( > /* Fallthrough to std_return with error = 0 */ > > std_return: > - if ( (*vpp || (error != 0 && dm_event_sent != 0)) && > - DM_EVENT_ENABLED(dir_vp->v_vfsp, XFS_BHVTOI(dir_bdp), > - DM_EVENT_POSTCREATE)) { > + if ((*vpp || (error != 0 && dm_event_sent != 0)) && > + DM_EVENT_ENABLED(XFS_BHVTOI(dir_bdp), DM_EVENT_POSTCREATE)) { > (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTCREATE, > dir_vp, DM_RIGHT_NULL, > *vpp ? vp:NULL, > @@ -2408,7 +2406,7 @@ xfs_remove( > IRELE(ip); > } > > - if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_REMOVE)) { > + if (DM_EVENT_ENABLED(dp, DM_EVENT_REMOVE)) { > error = XFS_SEND_NAMESP(mp, DM_EVENT_REMOVE, dir_vp, > DM_RIGHT_NULL, NULL, DM_RIGHT_NULL, > name, NULL, dm_di_mode, 0, 0); > @@ -2584,8 +2582,7 @@ xfs_remove( > > /* Fall through to std_return with error = 0 */ > std_return: > - if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, > - DM_EVENT_POSTREMOVE)) { > + if (DM_EVENT_ENABLED(dp, DM_EVENT_POSTREMOVE)) { > (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTREMOVE, > dir_vp, DM_RIGHT_NULL, > NULL, DM_RIGHT_NULL, > @@ -2662,7 +2659,7 @@ xfs_link( > if (XFS_FORCED_SHUTDOWN(mp)) > return XFS_ERROR(EIO); > > - if (DM_EVENT_ENABLED(src_vp->v_vfsp, tdp, DM_EVENT_LINK)) { > + if (DM_EVENT_ENABLED(tdp, DM_EVENT_LINK)) { > error = XFS_SEND_NAMESP(mp, DM_EVENT_LINK, > target_dir_vp, DM_RIGHT_NULL, > src_vp, DM_RIGHT_NULL, > @@ -2773,8 +2770,7 @@ xfs_link( > > /* Fall through to std_return with error = 0. */ > std_return: > - if (DM_EVENT_ENABLED(src_vp->v_vfsp, sip, > - DM_EVENT_POSTLINK)) { > + if (DM_EVENT_ENABLED(sip, DM_EVENT_POSTLINK)) { > (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTLINK, > target_dir_vp, DM_RIGHT_NULL, > src_vp, DM_RIGHT_NULL, > @@ -2838,7 +2834,7 @@ xfs_mkdir( > dp_joined_to_trans = B_FALSE; > dm_di_mode = vap->va_mode; > > - if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_CREATE)) { > + if (DM_EVENT_ENABLED(dp, DM_EVENT_CREATE)) { > error = XFS_SEND_NAMESP(mp, DM_EVENT_CREATE, > dir_vp, DM_RIGHT_NULL, NULL, > DM_RIGHT_NULL, dir_name, NULL, > @@ -2995,9 +2991,8 @@ xfs_mkdir( > * xfs_trans_commit. */ > > std_return: > - if ( (created || (error != 0 && dm_event_sent != 0)) && > - DM_EVENT_ENABLED(dir_vp->v_vfsp, XFS_BHVTOI(dir_bdp), > - DM_EVENT_POSTCREATE)) { > + if ((created || (error != 0 && dm_event_sent != 0)) && > + DM_EVENT_ENABLED(XFS_BHVTOI(dir_bdp), DM_EVENT_POSTCREATE)) { > (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTCREATE, > dir_vp, DM_RIGHT_NULL, > created ? XFS_ITOV(cdp):NULL, > @@ -3066,7 +3061,7 @@ xfs_rmdir( > IRELE(cdp); > } > > - if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_REMOVE)) { > + if (DM_EVENT_ENABLED(dp, DM_EVENT_REMOVE)) { > error = XFS_SEND_NAMESP(mp, DM_EVENT_REMOVE, > dir_vp, DM_RIGHT_NULL, > NULL, DM_RIGHT_NULL, > @@ -3255,7 +3250,7 @@ xfs_rmdir( > /* Fall through to std_return with error = 0 or the errno > * from xfs_trans_commit. */ > std_return: > - if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_POSTREMOVE)) { > + if (DM_EVENT_ENABLED(dp, DM_EVENT_POSTREMOVE)) { > (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTREMOVE, > dir_vp, DM_RIGHT_NULL, > NULL, DM_RIGHT_NULL, > @@ -3359,7 +3354,7 @@ xfs_symlink( > } > } > > - if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_SYMLINK)) { > + if (DM_EVENT_ENABLED(dp, DM_EVENT_SYMLINK)) { > error = XFS_SEND_NAMESP(mp, DM_EVENT_SYMLINK, dir_vp, > DM_RIGHT_NULL, NULL, DM_RIGHT_NULL, > link_name, target_path, 0, 0, 0); > @@ -3559,8 +3554,7 @@ xfs_symlink( > /* Fall through to std_return with error = 0 or errno from > * xfs_trans_commit */ > std_return: > - if (DM_EVENT_ENABLED(dir_vp->v_vfsp, XFS_BHVTOI(dir_bdp), > - DM_EVENT_POSTSYMLINK)) { > + if (DM_EVENT_ENABLED(XFS_BHVTOI(dir_bdp), DM_EVENT_POSTSYMLINK)) { > (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTSYMLINK, > dir_vp, DM_RIGHT_NULL, > error ? NULL : XFS_ITOV(ip), > @@ -4062,7 +4056,7 @@ xfs_alloc_file_space( > /* Generate a DMAPI event if needed. */ > if (alloc_type != 0 && offset < ip->i_size && > (attr_flags&ATTR_DMI) == 0 && > - DM_EVENT_ENABLED(XFS_MTOVFS(mp), ip, DM_EVENT_WRITE)) { > + DM_EVENT_ENABLED(ip, DM_EVENT_WRITE)) { > xfs_off_t end_dmi_offset; > > end_dmi_offset = offset+len; > @@ -4176,9 +4170,8 @@ retry: > allocatesize_fsb -= allocated_fsb; > } > dmapi_enospc_check: > - if (error == ENOSPC && (attr_flags&ATTR_DMI) == 0 && > - DM_EVENT_ENABLED(XFS_MTOVFS(mp), ip, DM_EVENT_NOSPACE)) { > - > + if (error == ENOSPC && (attr_flags & ATTR_DMI) == 0 && > + DM_EVENT_ENABLED(ip, DM_EVENT_NOSPACE)) { > error = XFS_SEND_NAMESP(mp, DM_EVENT_NOSPACE, > XFS_ITOV(ip), DM_RIGHT_NULL, > XFS_ITOV(ip), DM_RIGHT_NULL, > @@ -4322,9 +4315,8 @@ xfs_free_file_space( > end_dmi_offset = offset + len; > endoffset_fsb = XFS_B_TO_FSBT(mp, end_dmi_offset); > > - if (offset < ip->i_size && > - (attr_flags & ATTR_DMI) == 0 && > - DM_EVENT_ENABLED(XFS_MTOVFS(mp), ip, DM_EVENT_WRITE)) { > + if (offset < ip->i_size && (attr_flags & ATTR_DMI) == 0 && > + DM_EVENT_ENABLED(ip, DM_EVENT_WRITE)) { > if (end_dmi_offset > ip->i_size) > end_dmi_offset = ip->i_size; > error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, vp, > > From owner-xfs@oss.sgi.com Thu Aug 2 20:09:22 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 20:10:22 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_20 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7339Jbm016377 for ; Thu, 2 Aug 2007 20:09:21 -0700 Received: from pc-bnaujok.melbourne.sgi.com (pc-bnaujok.melbourne.sgi.com [134.14.55.58]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id NAA03976; Fri, 3 Aug 2007 13:09:22 +1000 Date: Fri, 03 Aug 2007 13:13:34 +1000 To: "xfs@oss.sgi.com" , xfs-dev Subject: REVIEW: fix xfs_repair phase 4 ag_stride with prefetch From: "Barry Naujok" Organization: SGI Content-Type: multipart/mixed; boundary=----------gjkibzd07A5PDL7qz04KI3 MIME-Version: 1.0 Message-ID: User-Agent: Opera Mail/9.10 (Win32) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12460 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: bnaujok@sgi.com Precedence: bulk X-list: xfs ------------gjkibzd07A5PDL7qz04KI3 Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 Content-Transfer-Encoding: Quoted-Printable AG stride testing was performed on a system with ample amounts of memory, so prefetching with AG stride during Phase 4 was missed. The attached patch fixes this. 32 AGs, ag_stride =3D 4: Phase 3 - for each AG... - scan and clear agi unlinked lists... - process known inodes and perform inode discovery... - agno =3D 0 - agno =3D 4 - agno =3D 8 - agno =3D 12 - agno =3D 16 - agno =3D 20 - agno =3D 24 - agno =3D 28 which is correct... but in Phase 4: Phase 4 - check for duplicate blocks... - setting up duplicate extent list... - check for inodes claiming duplicate blocks... - agno =3D 0 - agno =3D 1 - agno =3D 2 - agno =3D 5 - agno =3D 6 - agno =3D 4 - agno =3D 7 - agno =3D 3= ------------gjkibzd07A5PDL7qz04KI3 Content-Disposition: attachment; filename=fix_ag_stride Content-Type: application/octet-stream; name=fix_ag_stride Content-Transfer-Encoding: Base64 SW5kZXg6IHJlcGFpci94ZnNwcm9ncy9yZXBhaXIvcGhhc2U0LmMKPT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PQotLS0gcmVwYWlyLm9yaWcveGZzcHJvZ3MvcmVw YWlyL3BoYXNlNC5jCTIwMDctMDctMjQgMTU6MzQ6MzkuMDAwMDAwMDAwICsx MDAwCisrKyByZXBhaXIveGZzcHJvZ3MvcmVwYWlyL3BoYXNlNC5jCTIwMDct MDgtMDMgMTI6MDQ6MzguMjAxMTc2MjgzICsxMDAwCkBAIC0xMzcsNiArMTM3 LDcgQEAKIAl4ZnNfbW91bnRfdAkJKm1wKQogewogCWludCAJCQlpLCBqOwor CXhmc19hZ251bWJlcl90IAkJYWdubzsKIAl3b3JrX3F1ZXVlX3QJCSpxdWV1 ZXM7CiAJcHJlZmV0Y2hfYXJnc190CQkqcGZfYXJnc1syXTsKIApAQCAtMTUz LDEyICsxNTQsMTMgQEAKIAkJCS8qCiAJCQkgKiBjcmVhdGUgb25lIHdvcmtl ciB0aHJlYWQgZm9yIGVhY2ggc2VnbWVudCBvZiB0aGUgdm9sdW1lCiAJCQkg Ki8KLQkJCWZvciAoaSA9IDA7IGkgPCB0aHJlYWRfY291bnQ7IGkrKykgewor CQkJZm9yIChpID0gMCwgYWdubyA9IDA7IGkgPCB0aHJlYWRfY291bnQ7IGkr KykgewogCQkJCWNyZWF0ZV93b3JrX3F1ZXVlKCZxdWV1ZXNbaV0sIG1wLCAx KTsKIAkJCQlwZl9hcmdzWzBdID0gTlVMTDsKLQkJCQlmb3IgKGogPSBpOyBq IDwgbXAtPm1fc2Iuc2JfYWdjb3VudDsgaiArPSBhZ19zdHJpZGUpIHsKLQkJ CQkJcGZfYXJnc1swXSA9IHN0YXJ0X2lub2RlX3ByZWZldGNoKGosIDAsIHBm X2FyZ3NbMF0pOwotCQkJCQlxdWV1ZV93b3JrKCZxdWV1ZXNbaV0sIHByb2Nl c3NfYWdfZnVuYywgaiwgcGZfYXJnc1swXSk7CisJCQkJZm9yIChqID0gMDsg aiA8IGFnX3N0cmlkZSAmJiBhZ25vIDwgbXAtPm1fc2Iuc2JfYWdjb3VudDsK KwkJCQkJCWorKywgYWdubysrKSB7CisJCQkJCXBmX2FyZ3NbMF0gPSBzdGFy dF9pbm9kZV9wcmVmZXRjaChhZ25vLCAwLCBwZl9hcmdzWzBdKTsKKwkJCQkJ cXVldWVfd29yaygmcXVldWVzW2ldLCBwcm9jZXNzX2FnX2Z1bmMsIGFnbm8s IHBmX2FyZ3NbMF0pOwogCQkJCX0KIAkJCX0KIAkJCS8qCg== ------------gjkibzd07A5PDL7qz04KI3-- From owner-xfs@oss.sgi.com Thu Aug 2 23:17:20 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 02 Aug 2007 23:17:25 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: **** X-Spam-Status: No, score=4.5 required=5.0 tests=BAYES_99,HELO_DYNAMIC_DHCP, RCVD_IN_DNSWL_LOW,RDNS_DYNAMIC autolearn=no version=3.2.0-pre1-r499012 Received: from cmx01.servicemail24.de (cmx01.servicemail24.de [195.71.127.228]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l736HHbm023338 for ; Thu, 2 Aug 2007 23:17:19 -0700 Received: from dehzbkana01 (145.228.48.201) by cmx01.servicemail24.de (PowerMTA(TM) v3.0r14) id hmb478064cc5 for ; Fri, 3 Aug 2007 08:07:15 +0200 (envelope-from ) Message-ID: <24860348.1186121235657.JavaMail.SYSTEM@dehzbkana01> Date: Fri, 3 Aug 2007 08:07:15 +0200 (CEST) From: "certpartner@msdirectservices.com" To: Subject: Re: information (KMM7984527I17898L0KM) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit x-mailer: KANA Response 7.6.1.43 X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12461 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: certpartner@msdirectservices.com Precedence: bulk X-list: xfs Dear Partner, Thank you for your query regarding the Microsoft Partner Program. We are currently researching your query and will respond as soon as possible. If we can be of any further assistance to you, please do not hesitate to contact us. If you would like some further information on the Microsoft partner program, please visit our web sites at http://www.microsoft.com/partner/program We look forward to your company's participation in the Microsoft Partner Program. Kind Regards, Your Microsoft Partner Program Team Microsoft highly recommends that users with Internet access update their Microsoft software to protect against viruses and security vulnerabilities. The easiest way to do this is to visit the following website: http://www.Microsoft.com/protect From owner-xfs@oss.sgi.com Fri Aug 3 07:37:09 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 03 Aug 2007 07:37:15 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: **** X-Spam-Status: No, score=4.3 required=5.0 tests=AWL,BAYES_50,FAKE_REPLY_C, J_CHICKENPOX_23,NORMAL_HTTP_TO_IP autolearn=no version=3.2.0-pre1-r499012 Received: from bay0-omc2-s29.bay0.hotmail.com (bay0-omc2-s29.bay0.hotmail.com [65.54.246.165]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l73Eb8bm029136 for ; Fri, 3 Aug 2007 07:37:09 -0700 Received: from hotmail.com ([65.54.174.83]) by bay0-omc2-s29.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Fri, 3 Aug 2007 07:37:12 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 3 Aug 2007 07:37:12 -0700 Message-ID: Received: from 85.36.106.198 by BAY103-DAV11.phx.gbl with DAV; Fri, 03 Aug 2007 14:37:11 +0000 X-Originating-IP: [85.36.106.198] X-Originating-Email: [pupilla@hotmail.com] X-Sender: pupilla@hotmail.com From: "Marco Berizzi" To: Cc: "Christoph Lameter" , "David Chinner" , , "Marco Berizzi" Subject: Re: kernel BUG at mm/slab.c:2980 (was Re: [] xfs_bmap_search_multi_extents+0x6f/0xe0) Date: Fri, 3 Aug 2007 16:36:25 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1123 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1123 X-OriginalArrivalTime: 03 Aug 2007 14:37:12.0591 (UTC) FILETIME=[C78E89F0:01C7D5DB] X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12462 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: pupilla@hotmail.com Precedence: bulk X-list: xfs Marco Berizzi wrote: > Marco Berizzi wrote: > > > Hello everybody. > > I'm running linux 2.6.22 on Slackware. > > This box is running openswan 2.4.9 > > and squid 2.6S13 > > I get tons of these messages: > > > > Jul 20 01:17:09 Gemini kernel: msnt_auth S 00000000 0 8356 > 819 > > (NOTLB) > > Jul 20 01:17:09 Gemini kernel: c2bd5d54 00000086 00000001 > > 00000000 00000000 00000001 00000000 c11df050 > > Jul 20 01:17:09 Gemini kernel: 00000014 c2bd5e24 c2bd5e78 > > c2bd5e78 c11df050 c1255b7c c019c63f 00006559 > > Jul 20 01:17:09 Gemini kernel: 7601a27a 0002faa4 7fffffff > > 7fffffff c8af2d00 c2bd5db0 c02e9fc6 c2bd5e50 > > Jul 20 01:17:09 Gemini kernel: Call Trace: > > Jul 20 01:17:09 Gemini kernel: [] > > xfs_bmap_search_multi_extents+0x6f/0xe0 > > Jul 20 01:17:09 Gemini kernel: [] > schedule_timeout+0x96/0xa0 > > Jul 20 01:17:09 Gemini kernel: [] > > unix_stream_data_wait+0xa9/0xd0 > > Jul 20 01:17:09 Gemini kernel: [] > > autoremove_wake_function+0x0/0x50 > > Jul 20 01:17:09 Gemini kernel: [] > > autoremove_wake_function+0x0/0x50 > > Jul 20 01:17:09 Gemini kernel: [] > > unix_stream_recvmsg+0x37c/0x3e0 > > Jul 20 01:17:09 Gemini kernel: [] do_sock_read+0x9d/0xb0 > > Jul 20 01:17:09 Gemini kernel: [] sock_aio_read+0x78/0x80 > > Jul 20 01:17:09 Gemini kernel: [] do_sync_read+0xc0/0x100 > > Jul 20 01:17:09 Gemini kernel: [] > > autoremove_wake_function+0x0/0x50 > > Jul 20 01:17:09 Gemini kernel: [] do_mmap_pgoff+0x3f3/0x730 > > Jul 20 01:17:09 Gemini kernel: [] vfs_read+0x100/0x110 > > Jul 20 01:17:09 Gemini kernel: [] sys_read+0x47/0x80 > > Jul 20 01:17:09 Gemini kernel: [] syscall_call+0x7/0xb > > Jul 20 01:17:09 Gemini kernel: ======================= > > Jul 20 09:01:35 Gemini kernel: atkbd.c: Spurious NAK on > isa0060/serio0. > > Some program might be trying access hardware directly. > > Jul 20 09:02:05 Gemini kernel: atkbd.c: Spurious NAK on > isa0060/serio0. > > Some program might be trying access hardware directly. > > Jul 20 09:05:39 Gemini kernel: atkbd.c: Spurious ACK on > isa0060/serio0. > > Some program might be trying access hardware directly. > Me again. > Just few minutes ago linux has been definitely > crashed. This is the dmesg: > > Aug 2 15:24:36 Gemini kernel: BUG: unable to handle kernel paging > request at virtual address cbb93164 > Aug 2 15:24:36 Gemini kernel: printing eip: > Aug 2 15:24:36 Gemini kernel: c014e83f > Aug 2 15:24:36 Gemini kernel: *pde = 00000000 > Aug 2 15:24:36 Gemini kernel: Oops: 0002 [#1] > Aug 2 15:24:36 Gemini kernel: Modules linked in: nf_nat_pptp > nf_nat_proto_gre nf_conntrack_pptp nf_conntrack_proto_gre nf_nat_ftp > nf_conntrack_ftp 3c59x mii > Aug 2 15:24:36 Gemini kernel: CPU: 0 > Aug 2 15:24:36 Gemini kernel: EIP: 0060:[] Not tainted > VLI > Aug 2 15:24:36 Gemini kernel: EFLAGS: 00010807 (2.6.22 #1) > Aug 2 15:24:36 Gemini kernel: EIP is at slab_put_obj+0x1f/0x40 > Aug 2 15:24:36 Gemini kernel: eax: ffffffff ebx: c925a000 ecx: > 5a2cdcd1 edx: 00a4e452 > Aug 2 15:24:36 Gemini kernel: esi: c11ff1e0 edi: c925a000 ebp: > 0000000b esp: c9fe9ed0 > Aug 2 15:24:36 Gemini kernel: ds: 007b es: 007b fs: 0000 gs: 0000 > ss: 0068 > Aug 2 15:24:37 Gemini kernel: Process xfssyncd (pid: 223, ti=c9fe8000 > task=c11b2a90 task.ti=c9fe8000) > Aug 2 15:24:37 Gemini kernel: Stack: c925a000 c11c06a0 c11ff1e0 > c014ec16 00000000 0000003c c11b9010 c11b9010 > Aug 2 15:24:37 Gemini kernel: c11ff1e0 c11ff1e0 00000000 > c014ecdf 00000000 0000003c c11b9000 c11b9000 > Aug 2 15:24:37 Gemini kernel: 00000246 c11ff1e0 c9a3aaf0 > c014f069 c9dce3e0 c9dce3e0 00000001 00000002 > Aug 2 15:24:37 Gemini kernel: Call Trace: > Aug 2 15:24:37 Gemini kernel: [] free_block+0x86/0x100 > Aug 2 15:24:37 Gemini kernel: [] cache_flusharray+0x4f/0xc0 > Aug 2 15:24:37 Gemini kernel: [] kmem_cache_free+0x69/0x90 > Aug 2 15:24:37 Gemini kernel: [] xfs_idestroy+0x40/0x90 > Aug 2 15:24:37 Gemini kernel: [] > xfs_finish_reclaim+0xb3/0x120 > Aug 2 15:24:37 Gemini kernel: [] > xfs_finish_reclaim_all+0xc9/0xf0 > Aug 2 15:24:37 Gemini kernel: [] xfs_syncsub+0x63/0x290 > Aug 2 15:24:37 Gemini kernel: [] schedule_timeout+0x55/0xa0 > Aug 2 15:24:37 Gemini kernel: [] vfs_sync+0x22/0x30 > Aug 2 15:24:37 Gemini kernel: [] vfs_sync_worker+0x41/0x50 > Aug 2 15:24:37 Gemini kernel: [] xfssyncd+0x109/0x180 > Aug 2 15:24:37 Gemini kernel: [] xfssyncd+0x0/0x180 > Aug 2 15:24:37 Gemini kernel: [] kthread+0x6a/0x70 > Aug 2 15:24:37 Gemini kernel: [] kthread+0x0/0x70 > Aug 2 15:24:37 Gemini kernel: [] > kernel_thread_helper+0x7/0x10 > Aug 2 15:24:37 Gemini kernel: ======================= > Aug 2 15:24:37 Gemini kernel: Code: 4a 14 c3 89 f6 8d bc 27 00 00 00 00 > 83 ec 0c 89 74 24 04 89 c6 89 7c 24 08 89 d7 89 1c 24 8b 42 0c 29 c1 89 > c8 f7 66 14 8b 47 14 <89> 44 97 1c 8b 1c 24 89 57 14 8b 74 24 04 ff 4f > 10 8b 7c 24 08 > Aug 2 15:24:37 Gemini kernel: EIP: [] slab_put_obj+0x1f/0x40 > SS:ESP 0068:c9fe9ed0 > Aug 2 15:24:40 Gemini kernel: BUG: unable to handle kernel paging > request at virtual address 00100104 > Aug 2 15:24:40 Gemini kernel: printing eip: > Aug 2 15:24:40 Gemini kernel: c014ebf4 > Aug 2 15:24:40 Gemini kernel: *pde = 00000000 > Aug 2 15:24:40 Gemini kernel: Oops: 0002 [#2] > Aug 2 15:24:40 Gemini kernel: Modules linked in: nf_nat_pptp > nf_nat_proto_gre nf_conntrack_pptp nf_conntrack_proto_gre nf_nat_ftp > nf_conntrack_ftp 3c59x mii > Aug 2 15:24:40 Gemini kernel: CPU: 0 > Aug 2 15:24:40 Gemini kernel: EIP: 0060:[] Not tainted > VLI > Aug 2 15:24:40 Gemini kernel: EFLAGS: 00010082 (2.6.22 #1) > Aug 2 15:24:40 Gemini kernel: EIP is at free_block+0x64/0x100 > Aug 2 15:24:40 Gemini kernel: eax: 00100100 ebx: c925a000 ecx: > c925a4ec edx: 00200200 > Aug 2 15:24:40 Gemini kernel: esi: c11c06a0 edi: c11ff1e0 ebp: > 0000000b esp: c11a3f14 > Aug 2 15:24:40 Gemini kernel: ds: 007b es: 007b fs: 0000 gs: 0000 > ss: 0068 > Aug 2 15:24:40 Gemini kernel: Process events/0 (pid: 4, ti=c11a2000 > task=c1195a50 task.ti=c11a2000) > Aug 2 15:24:40 Gemini kernel: Stack: 00000000 00000018 c11b9010 > c11b9010 c11b9000 00000018 c11ff1e0 c014f4e1 > Aug 2 15:24:40 Gemini kernel: 00000000 c11c06a0 c11ff1e0 > c03cdc20 00000000 c014f55b 00000000 00000000 > Aug 2 15:24:40 Gemini kernel: 00038e6b c03cdc20 c117e8a0 > c014f500 c01228ea 00005ead 7180abb4 00073f12 > Aug 2 15:24:40 Gemini kernel: Call Trace: > Aug 2 15:24:40 Gemini kernel: [] drain_array+0x91/0xb0 > Aug 2 15:24:40 Gemini kernel: [] cache_reap+0x5b/0x100 > Aug 2 15:24:40 Gemini kernel: [] cache_reap+0x0/0x100 > Aug 2 15:24:40 Gemini kernel: [] run_workqueue+0x4a/0x100 > Aug 2 15:24:40 Gemini kernel: [] worker_thread+0xcb/0x100 > Aug 2 15:24:40 Gemini kernel: [] > autoremove_wake_function+0x0/0x50 > Aug 2 15:24:40 Gemini kernel: [] __wake_up_common+0x37/0x70 > Aug 2 15:24:40 Gemini kernel: [] > autoremove_wake_function+0x0/0x50 > Aug 2 15:24:40 Gemini kernel: [] worker_thread+0x0/0x100 > Aug 2 15:24:40 Gemini kernel: [] kthread+0x6a/0x70 > Aug 2 15:24:40 Gemini kernel: [] kthread+0x0/0x70 > Aug 2 15:24:40 Gemini kernel: [] > kernel_thread_helper+0x7/0x10 > Aug 2 15:24:40 Gemini kernel: ======================= > Aug 2 15:24:40 Gemini kernel: Code: da 25 00 40 02 00 3d 00 40 02 00 0f > 84 a8 00 00 00 8b 02 a8 80 0f 84 8b 00 00 00 8b 5a 1c 8b 44 24 20 8b 53 > 04 8b 74 87 4c 8b 03 <89> 50 04 89 02 89 da c7 03 00 01 10 00 c7 43 04 > 00 02 20 00 8b > Aug 2 15:24:40 Gemini kernel: EIP: [] free_block+0x64/0x100 > SS:ESP 0068:c11a3f14 > Aug 2 15:29:03 Gemini kernel: ------------[ cut here ]------------ > Aug 2 15:29:03 Gemini kernel: kernel BUG at mm/slab.c:2980! > Aug 2 15:29:03 Gemini kernel: invalid opcode: 0000 [#3] > Aug 2 15:29:03 Gemini kernel: Modules linked in: nf_nat_pptp > nf_nat_proto_gre nf_conntrack_pptp nf_conntrack_proto_gre nf_nat_ftp > nf_conntrack_ftp 3c59x mii > Aug 2 15:29:03 Gemini kernel: CPU: 0 > Aug 2 15:29:03 Gemini kernel: EIP: 0060:[] Not tainted > VLI > Aug 2 15:29:03 Gemini kernel: EFLAGS: 00010046 (2.6.22 #1) > Aug 2 15:29:03 Gemini kernel: EIP is at cache_alloc_refill+0x16d/0x1c0 > Aug 2 15:29:03 Gemini kernel: eax: 0000001c ebx: 00000005 ecx: > 00000036 edx: c11ff1e0 > Aug 2 15:29:03 Gemini kernel: esi: c8a40000 edi: c11c06a0 ebp: > c11b9000 esp: c8da7dc8 > Aug 2 15:29:03 Gemini kernel: ds: 007b es: 007b fs: 0000 gs: 0033 > ss: 0068 > Aug 2 15:29:03 Gemini kernel: Process unlinkd (pid: 2476, ti=c8da6000 > task=c11b3ab0 task.ti=c8da6000) > Aug 2 15:29:03 Gemini kernel: Stack: c9fb1400 c11c06a8 00000036 > 00000250 c11ff1e0 00000286 c11ff1e0 00000250 > Aug 2 15:29:03 Gemini kernel: c11ff1e0 c014ed8f 00000000 > 00000001 c01de776 c9fb1400 00025638 c01c5554 > Aug 2 15:29:03 Gemini kernel: c6355800 c9fb1400 c11ff1e0 > c64340d4 c01de805 c6355800 c9fb1400 00000004 > Aug 2 15:29:03 Gemini kernel: Call Trace: > Aug 2 15:29:03 Gemini kernel: [] kmem_cache_alloc+0x3f/0x50 > Aug 2 15:29:03 Gemini kernel: [] kmem_zone_alloc+0x46/0xc0 > Aug 2 15:29:03 Gemini kernel: [] xfs_log_reserve+0xa4/0xb0 > Aug 2 15:29:03 Gemini kernel: [] kmem_zone_zalloc+0x15/0x50 > Aug 2 15:29:03 Gemini kernel: [] > xfs_inode_item_init+0x1d/0x80 > Aug 2 15:29:03 Gemini kernel: [] xfs_trans_ijoin+0x6f/0x80 > Aug 2 15:29:03 Gemini kernel: [] xfs_remove+0x1c3/0x460 > Aug 2 15:29:03 Gemini kernel: [] xfs_vn_unlink+0x23/0x60 > Aug 2 15:29:03 Gemini kernel: [] > xfs_dir_lookup_int+0x9b/0x100 > Aug 2 15:29:03 Gemini kernel: [] > xfs_trans_unlocked_item+0x38/0x60 > Aug 2 15:29:03 Gemini kernel: [] xfs_lookup+0x6a/0x80 > Aug 2 15:29:03 Gemini kernel: [] d_instantiate+0x30/0x50 > Aug 2 15:29:03 Gemini kernel: [] d_splice_alias+0x2d/0xa0 > Aug 2 15:29:03 Gemini kernel: [] permission+0x89/0xd0 > Aug 2 15:29:03 Gemini kernel: [] vfs_unlink+0x88/0x90 > Aug 2 15:29:03 Gemini kernel: [] do_unlinkat+0x94/0x110 > Aug 2 15:29:03 Gemini kernel: [] vfs_read+0xe8/0x110 > Aug 2 15:29:03 Gemini kernel: [] sys_read+0x47/0x80 > Aug 2 15:29:03 Gemini kernel: [] syscall_call+0x7/0xb > Aug 2 15:29:03 Gemini kernel: ======================= > Aug 2 15:29:03 Gemini kernel: Code: d2 0f 84 cb fe ff ff eb ba 8b 55 00 > 31 c0 85 d2 75 b1 eb c0 8b 47 08 89 70 04 89 06 8b 44 24 04 89 77 08 89 > 46 04 e9 7a ff ff ff <0f> 0b 90 eb fe c7 47 30 01 00 00 00 8b 77 10 8d > 47 10 39 c6 0f > Aug 2 15:29:03 Gemini kernel: EIP: [] > cache_alloc_refill+0x16d/0x1c0 SS:ESP 0068:c8da7dc8 Me again. This morning a system with a similar .config (only different hardware) has been crashed. Only a monitor bitmap at http://80.204.235.230/foto3.jpg is available. No error was written under /var/log/kernel Here is dmesg and .config Linux version 2.6.22 (root@Pleiadi) (gcc version 3.4.6) #1 SMP Mon Jul 9 16:20:51 CEST 2007 BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 000000000009ac00 (usable) BIOS-e820: 000000000009ac00 - 00000000000a0000 (reserved) BIOS-e820: 00000000000ce000 - 00000000000d0000 (reserved) BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved) BIOS-e820: 0000000000100000 - 000000003fef0000 (usable) BIOS-e820: 000000003fef0000 - 000000003fefb000 (ACPI data) BIOS-e820: 000000003fefb000 - 000000003ff00000 (ACPI NVS) BIOS-e820: 000000003ff00000 - 000000003ff80000 (usable) BIOS-e820: 000000003ff80000 - 0000000040000000 (reserved) BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved) BIOS-e820: 00000000fec00000 - 00000000fed00400 (reserved) BIOS-e820: 00000000fee00000 - 00000000fef00000 (reserved) BIOS-e820: 00000000ffb00000 - 00000000ffc00000 (reserved) BIOS-e820: 00000000fff00000 - 0000000100000000 (reserved) 127MB HIGHMEM available. 896MB LOWMEM available. found SMP MP-table at 000f6c10 Entering add_active_range(0, 0, 262016) 0 entries of 256 used Zone PFN ranges: DMA 0 -> 4096 Normal 4096 -> 229376 HighMem 229376 -> 262016 early_node_map[1] active PFN ranges 0: 0 -> 262016 On node 0 totalpages: 262016 DMA zone: 32 pages used for memmap DMA zone: 0 pages reserved DMA zone: 4064 pages, LIFO batch:0 Normal zone: 1760 pages used for memmap Normal zone: 223520 pages, LIFO batch:31 HighMem zone: 255 pages used for memmap HighMem zone: 32385 pages, LIFO batch:7 DMI present. ACPI: RSDP 000F6BA0, 0024 (r2 PTLTD ) ACPI: XSDT 3FEF5381, 004C (r1 PTLTD XSDT 6040001 LTP 0) ACPI: FACP 3FEF5441, 00F4 (r3 FSC 6040001 F4240) ACPI: DSDT 3FEF5535, 597B (r1 FSC D1649 6040001 MSFT 2000002) ACPI: FACS 3FEFBFC0, 0040 ACPI: SPCR 3FEFAEB0, 0050 (r1 PTLTD $UCRTBL$ 6040001 PTL 1) ACPI: MCFG 3FEFAF00, 0040 (r1 PTLTD MCFG 6040001 LTP 0) ACPI: APIC 3FEFAF40, 0098 (r1 PTLTD APIC 6040001 LTP 0) ACPI: BOOT 3FEFAFD8, 0028 (r1 PTLTD $SBFTBL$ 6040001 LTP 1) ACPI: PM-Timer IO Port: 0xf008 ACPI: Local APIC address 0xfee00000 ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled) Processor #0 15:4 APIC version 20 ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled) Processor #1 15:4 APIC version 20 ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1]) ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1]) ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0]) IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-23 ACPI: IOAPIC (id[0x03] address[0xfec80000] gsi_base[24]) IOAPIC[1]: apic_id 3, version 32, address 0xfec80000, GSI 24-47 ACPI: IOAPIC (id[0x04] address[0xfec80800] gsi_base[48]) IOAPIC[2]: apic_id 4, version 32, address 0xfec80800, GSI 48-71 ACPI: IOAPIC (id[0x05] address[0xfec84000] gsi_base[72]) IOAPIC[3]: apic_id 5, version 32, address 0xfec84000, GSI 72-95 ACPI: IOAPIC (id[0x06] address[0xfec84800] gsi_base[96]) IOAPIC[4]: apic_id 6, version 32, address 0xfec84800, GSI 96-119 ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 high edge) ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) ACPI: IRQ0 used by override. ACPI: IRQ2 used by override. ACPI: IRQ9 used by override. Enabling APIC mode: Flat. Using 5 I/O APICs Using ACPI (MADT) for SMP configuration information Allocating PCI resources starting at 50000000 (gap: 40000000:a0000000) Built 1 zonelists. Total pages: 259969 Kernel command line: BOOT_IMAGE=Linux ro root=801 mapped APIC to ffffd000 (fee00000) mapped IOAPIC to ffffc000 (fec00000) mapped IOAPIC to ffffb000 (fec80000) mapped IOAPIC to ffffa000 (fec80800) mapped IOAPIC to ffff9000 (fec84000) mapped IOAPIC to ffff8000 (fec84800) Enabling fast FPU save and restore... done. Enabling unmasked SIMD FPU exception support... done. Initializing CPU#0 PID hash table entries: 4096 (order: 12, 16384 bytes) Detected 3200.438 MHz processor. Console: colour VGA+ 80x25 Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) Memory: 1035204k/1048064k available (2069k kernel code, 12224k reserved, 626k data, 204k init, 130496k highmem) virtual kernel memory layout: fixmap : 0xfff9d000 - 0xfffff000 ( 392 kB) pkmap : 0xff800000 - 0xffc00000 (4096 kB) vmalloc : 0xf8800000 - 0xff7fe000 ( 111 MB) lowmem : 0xc0000000 - 0xf8000000 ( 896 MB) .init : 0xc03a7000 - 0xc03da000 ( 204 kB) .data : 0xc03055e4 - 0xc03a2000 ( 626 kB) .text : 0xc0100000 - 0xc03055e4 (2069 kB) Checking if this processor honours the WP bit even in supervisor mode... Ok. Calibrating delay using timer specific routine.. 6403.73 BogoMIPS (lpj=32018667) Mount-cache hash table entries: 512 CPU: After generic identify, caps: bfebfbff 20100000 00000000 00000000 0000641d 00000000 00000001 monitor/mwait feature present. using mwait in idle threads. CPU: Trace cache: 12K uops, L1 D cache: 16K CPU: L2 cache: 2048K CPU: Physical Processor ID: 0 CPU: After all inits, caps: bfebfbff 20100000 00000000 0000b180 0000641d 00000000 00000001 Compat vDSO mapped to ffffe000. Checking 'hlt' instruction... OK. Freeing SMP alternatives: 10k freed ACPI: Core revision 20070126 CPU0: Intel(R) Xeon(TM) CPU 3.20GHz stepping 0a Booting processor 1/1 eip 2000 Initializing CPU#1 Calibrating delay using timer specific routine.. 6400.45 BogoMIPS (lpj=32002272) CPU: After generic identify, caps: bfebfbff 20100000 00000000 00000000 0000641d 00000000 00000001 monitor/mwait feature present. CPU: Trace cache: 12K uops, L1 D cache: 16K CPU: L2 cache: 2048K CPU: Physical Processor ID: 0 CPU: After all inits, caps: bfebfbff 20100000 00000000 0000b180 0000641d 00000000 00000001 CPU1: Intel(R) Xeon(TM) CPU 3.20GHz stepping 0a Total of 2 processors activated (12804.18 BogoMIPS). ENABLING IO-APIC IRQs .TIMER: vector=0x31 apic1=0 pin1=2 apic2=-1 pin2=-1 checking TSC synchronization [CPU#0 -> CPU#1]: passed. Brought up 2 CPUs migration_cost=62 NET: Registered protocol family 16 ACPI: bus type pci registered PCI: Found Intel Corporation E7520 Memory Controller Hub with MMCONFIG support. PCI: Using MMCONFIG Setting up standard PCI resources ACPI: Interpreter enabled ACPI: Using IOAPIC for interrupt routing ACPI: Device [PS2M] status [00000008]: functional but not present; setting present ACPI: Device [ECP] status [00000008]: functional but not present; setting present ACPI: Device [COM1] status [00000008]: functional but not present; setting present ACPI: PCI Root Bridge [PCI0] (0000:00) PCI: Probing PCI hardware (bus 00) PCI quirk: region f000-f07f claimed by ICH4 ACPI/GPIO/TCO PCI quirk: region f180-f1bf claimed by ICH4 GPIO PCI: PXH quirk detected, disabling MSI for SHPC device PCI: PXH quirk detected, disabling MSI for SHPC device PCI: Transparent bridge - 0000:00:1e.0 ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PEA0.DOB0._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PEA0.DOB2._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PEC0.PXH0._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PEC0.PXH2._PRT] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 10 *11 12 14 15) ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 *9 10 11 12 14 15) ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 *5 6 7 9 10 11 12 14 15) ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 9 *10 11 12 14 15) ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled. ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled. ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled. ACPI: PCI Interrupt Link [LNKH] (IRQs 3 *4 5 6 7 9 10 11 12 14 15) Linux Plug and Play Support v0.97 (c) Adam Belay pnp: PnP ACPI init ACPI: bus type pnp registered pnp: PnP ACPI: found 11 devices ACPI: ACPI bus type pnp unregistered SCSI subsystem initialized PCI: Using ACPI for IRQ routing PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a report Time: tsc clocksource has been installed. pnp: 00:02: iomem range 0xfee00000-0xfeefffff could not be reserved pnp: 00:02: iomem range 0xfec00000-0xfecfffff could not be reserved PCI: Bridge: 0000:01:00.0 IO window: 3000-3fff MEM window: de100000-de3fffff PREFETCH window: 50000000-501fffff PCI: Bridge: 0000:01:00.2 IO window: 4000-4fff MEM window: de400000-de4fffff PREFETCH window: 50200000-502fffff PCI: Bridge: 0000:00:02.0 IO window: 3000-4fff MEM window: de100000-de4fffff PREFETCH window: 50000000-502fffff PCI: Bridge: 0000:00:04.0 IO window: disabled. MEM window: de500000-de5fffff PREFETCH window: disabled. PCI: Bridge: 0000:00:05.0 IO window: disabled. MEM window: de600000-de6fffff PREFETCH window: disabled. PCI: Bridge: 0000:06:00.0 IO window: disabled. MEM window: disabled. PREFETCH window: disabled. PCI: Bridge: 0000:06:00.2 IO window: disabled. MEM window: disabled. PREFETCH window: disabled. PCI: Bridge: 0000:00:06.0 IO window: disabled. MEM window: de700000-de7fffff PREFETCH window: disabled. PCI: Bridge: 0000:00:1e.0 IO window: 5000-5fff MEM window: de800000-dfffffff PREFETCH window: 50300000-503fffff ACPI: PCI Interrupt 0000:00:02.0[A] -> GSI 16 (level, low) -> IRQ 16 PCI: Setting latency timer of device 0000:00:02.0 to 64 PCI: Setting latency timer of device 0000:01:00.0 to 64 PCI: Setting latency timer of device 0000:01:00.2 to 64 ACPI: PCI Interrupt 0000:00:04.0[A] -> GSI 16 (level, low) -> IRQ 16 PCI: Setting latency timer of device 0000:00:04.0 to 64 ACPI: PCI Interrupt 0000:00:05.0[A] -> GSI 16 (level, low) -> IRQ 16 PCI: Setting latency timer of device 0000:00:05.0 to 64 ACPI: PCI Interrupt 0000:00:06.0[A] -> GSI 16 (level, low) -> IRQ 16 PCI: Setting latency timer of device 0000:00:06.0 to 64 ACPI: PCI Interrupt 0000:06:00.0[A] -> GSI 16 (level, low) -> IRQ 16 PCI: Setting latency timer of device 0000:06:00.0 to 64 ACPI: PCI Interrupt 0000:06:00.2[B] -> GSI 17 (level, low) -> IRQ 17 PCI: Setting latency timer of device 0000:06:00.2 to 64 PCI: Setting latency timer of device 0000:00:1e.0 to 64 NET: Registered protocol family 2 IP route cache hash table entries: 32768 (order: 5, 131072 bytes) TCP established hash table entries: 131072 (order: 8, 1572864 bytes) TCP bind hash table entries: 65536 (order: 7, 524288 bytes) TCP: Hash tables configured (established 131072 bind 65536) TCP reno registered Simple Boot Flag at 0x5c set to 0x80 highmem bounce pool size: 64 pages SGI XFS with no debug enabled io scheduler noop registered io scheduler deadline registered (default) Boot video device is 0000:09:05.0 Fusion MPT base driver 3.04.04 Copyright (c) 1999-2007 LSI Logic Corporation Fusion MPT SPI Host driver 3.04.04 ACPI: PCI Interrupt 0000:02:08.0[A] -> GSI 24 (level, low) -> IRQ 18 mptbase: Initiating ioc0 bringup ioc0: 53C1030: Capabilities={Initiator} scsi0 : ioc0: LSI53C1030, FwRev=01033000h, Ports=1, MaxQ=222, IRQ=18 scsi 0:0:0:0: Direct-Access LSILOGIC 1030 IM 1000 PQ: 0 ANSI: 2 sd 0:0:0:0: [sda] 585728000 512-byte hardware sectors (299893 MB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 03 00 00 08 sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA sd 0:0:0:0: [sda] 585728000 512-byte hardware sectors (299893 MB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 03 00 00 08 sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA sda: sda1 sda2 < sda5 sda6 sda7 sda8 sda9 > sd 0:0:0:0: [sda] Attached SCSI disk scsi 0:0:8:0: Processor SDR GEM318P 1 PQ: 0 ANSI: 2 target0:0:8: Beginning Domain Validation target0:0:8: Ending Domain Validation target0:0:8: asynchronous scsi 0:1:0:0: Direct-Access HITACHI HUS103030FL3800 SK02 PQ: 0 ANSI: 3 mptbase: ioc0: RAID STATUS CHANGE for VolumeID 0 mptbase: ioc0: volume is now optimal, enabled, quiesced mptbase: ioc0: RAID STATUS CHANGE for PhysDisk 0 id=0 mptbase: ioc0: PhysDisk is now online, quiesced mptbase: ioc0: RAID STATUS CHANGE for PhysDisk 1 id=0 mptbase: ioc0: PhysDisk is now online, quiesced target0:1:0: Beginning Domain Validation target0:1:0: Ending Domain Validation mptbase: ioc0: RAID STATUS CHANGE for VolumeID 0 mptbase: ioc0: volume is now optimal, enabled mptbase: ioc0: RAID STATUS CHANGE for PhysDisk 0 id=0 mptbase: ioc0: PhysDisk is now online mptbase: ioc0: RAID STATUS CHANGE for PhysDisk 1 id=0 mptbase: ioc0: PhysDisk is now online target0:1:0: FAST-160 WIDE SCSI 320.0 MB/s DT IU QAS RTI WRFLOW PCOMP (6.25 ns, offset 80) scsi 0:1:1:0: Direct-Access HITACHI HUS103030FL3800 SK02 PQ: 0 ANSI: 3 mptbase: ioc0: RAID STATUS CHANGE for VolumeID 0 mptbase: ioc0: volume is now optimal, enabled, quiesced mptbase: ioc0: RAID STATUS CHANGE for PhysDisk 0 id=0 mptbase: ioc0: PhysDisk is now online, quiesced mptbase: ioc0: RAID STATUS CHANGE for PhysDisk 1 id=0 mptbase: ioc0: PhysDisk is now online, quiesced target0:1:1: Beginning Domain Validation target0:1:1: Ending Domain Validation mptbase: ioc0: RAID STATUS CHANGE for VolumeID 0 mptbase: ioc0: volume is now optimal, enabled mptbase: ioc0: RAID STATUS CHANGE for PhysDisk 0 id=0 mptbase: ioc0: PhysDisk is now online mptbase: ioc0: RAID STATUS CHANGE for PhysDisk 1 id=0 mptbase: ioc0: PhysDisk is now online target0:1:1: FAST-160 WIDE SCSI 320.0 MB/s DT IU QAS RTI WRFLOW PCOMP (6.25 ns, offset 80) ACPI: PCI Interrupt 0000:02:08.1[B] -> GSI 25 (level, low) -> IRQ 19 mptbase: Initiating ioc1 bringup ioc1: 53C1030: Capabilities={Initiator} scsi1 : ioc1: LSI53C1030, FwRev=01033000h, Ports=1, MaxQ=222, IRQ=19 PNP: PS/2 Controller [PNP0303:KEYB] at 0x60,0x64 irq 1 PNP: PS/2 controller doesn't have AUX irq; using default 12 serio: i8042 KBD port at 0x60,0x64 irq 1 mice: PS/2 mouse device common for all mice nf_conntrack version 0.5.0 (8188 buckets, 65504 max) ip_tables: (C) 2000-2006 Netfilter Core Team TCP cubic registered Initializing XFRM netlink socket NET: Registered protocol family 1 NET: Registered protocol family 17 NET: Registered protocol family 15 Starting balanced_irq Using IPI Shortcut mode input: AT Translated Set 2 keyboard as /class/input/input0 XFS mounting filesystem sda1 Starting XFS recovery on filesystem: sda1 (logdev: internal) Ending XFS recovery on filesystem: sda1 (logdev: internal) VFS: Mounted root (xfs filesystem) readonly. Freeing unused kernel memory: 204k freed Adding 875500k swap on /dev/sda9. Priority:-1 extents:1 across:875500k tg3.c:v3.77 (May 31, 2007) ACPI: PCI Interrupt 0000:04:00.0[A] -> GSI 16 (level, low) -> IRQ 16 PCI: Setting latency timer of device 0000:04:00.0 to 64 eth0: Tigon3 [partno(BCM95721) rev 4101 PHY(5750)] (PCI Express) 10/100/1000Base-T Ethernet 00:30:05:cb:27:c1 eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[1] WireSpeed[1] TSOcap[1] eth0: dma_rwctrl[76180000] dma_mask[64-bit] ACPI: PCI Interrupt 0000:05:00.0[A] -> GSI 16 (level, low) -> IRQ 16 PCI: Setting latency timer of device 0000:05:00.0 to 64 eth1: Tigon3 [partno(BCM95721) rev 4101 PHY(5750)] (PCI Express) 10/100/1000Base-T Ethernet 00:30:05:c2:56:0e eth1: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] WireSpeed[1] TSOcap[1] eth1: dma_rwctrl[76180000] dma_mask[64-bit] Intel(R) PRO/1000 Network Driver - version 7.3.20-k2-NAPI Copyright (c) 1999-2006 Intel Corporation. ACPI: PCI Interrupt 0000:03:04.0[A] -> GSI 52 (level, low) -> IRQ 20 e1000: 0000:03:04.0: e1000_probe: (PCI-X:100MHz:64-bit) 00:04:23:d0:0f:02 e1000: eth2: e1000_probe: Intel(R) PRO/1000 Network Connection XFS mounting filesystem sda5 Starting XFS recovery on filesystem: sda5 (logdev: internal) Ending XFS recovery on filesystem: sda5 (logdev: internal) XFS mounting filesystem sda6 Starting XFS recovery on filesystem: sda6 (logdev: internal) Ending XFS recovery on filesystem: sda6 (logdev: internal) XFS mounting filesystem sda7 Starting XFS recovery on filesystem: sda7 (logdev: internal) Ending XFS recovery on filesystem: sda7 (logdev: internal) XFS mounting filesystem sda8 Starting XFS recovery on filesystem: sda8 (logdev: internal) Ending XFS recovery on filesystem: sda8 (logdev: internal) e1000: eth2: e1000_watchdog: NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX tg3: eth1: Link is up at 100 Mbps, full duplex. tg3: eth1: Flow control is off for TX and off for RX. tg3: eth0: Link is up at 10 Mbps, full duplex. tg3: eth0: Flow control is off for TX and off for RX. # # Automatically generated make config: don't edit # Linux kernel version: 2.6.22 # Mon Jul 9 16:14:56 2007 # CONFIG_X86_32=y CONFIG_GENERIC_TIME=y CONFIG_CLOCKSOURCE_WATCHDOG=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_SEMAPHORE_SLEEPERS=y CONFIG_X86=y CONFIG_MMU=y CONFIG_ZONE_DMA=y CONFIG_QUICKLIST=y CONFIG_GENERIC_ISA_DMA=y CONFIG_GENERIC_IOMAP=y CONFIG_GENERIC_BUG=y CONFIG_GENERIC_HWEIGHT=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_DMI=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # # Code maturity level options # # CONFIG_EXPERIMENTAL is not set CONFIG_LOCK_KERNEL=y CONFIG_INIT_ENV_ARG_LIMIT=32 # # General setup # CONFIG_LOCALVERSION="" # CONFIG_LOCALVERSION_AUTO is not set CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_IPC_NS is not set CONFIG_SYSVIPC_SYSCTL=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set # CONFIG_TASKSTATS is not set # CONFIG_UTS_NS is not set # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set CONFIG_LOG_BUF_SHIFT=15 # CONFIG_CPUSETS is not set # CONFIG_SYSFS_DEPRECATED is not set # CONFIG_RELAY is not set # CONFIG_BLK_DEV_INITRD is not set CONFIG_SYSCTL=y # CONFIG_EMBEDDED is not set CONFIG_UID16=y CONFIG_SYSCTL_SYSCALL=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_HOTPLUG=y CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_ANON_INODES=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_SLAB=y # CONFIG_SLUB is not set # CONFIG_SLOB is not set CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # # Loadable module support # CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set # CONFIG_KMOD is not set CONFIG_STOP_MACHINE=y # # Block layer # CONFIG_BLOCK=y # CONFIG_LBD is not set # CONFIG_BLK_DEV_IO_TRACE is not set # CONFIG_LSF is not set # # IO Schedulers # CONFIG_IOSCHED_NOOP=y # CONFIG_IOSCHED_AS is not set CONFIG_IOSCHED_DEADLINE=y # CONFIG_IOSCHED_CFQ is not set # CONFIG_DEFAULT_AS is not set CONFIG_DEFAULT_DEADLINE=y # CONFIG_DEFAULT_CFQ is not set # CONFIG_DEFAULT_NOOP is not set CONFIG_DEFAULT_IOSCHED="deadline" # # Processor type and features # # CONFIG_TICK_ONESHOT is not set # CONFIG_NO_HZ is not set # CONFIG_HIGH_RES_TIMERS is not set CONFIG_SMP=y CONFIG_X86_PC=y # CONFIG_X86_ELAN is not set # CONFIG_X86_VOYAGER is not set # CONFIG_X86_NUMAQ is not set # CONFIG_X86_SUMMIT is not set # CONFIG_X86_BIGSMP is not set # CONFIG_X86_VISWS is not set # CONFIG_X86_GENERICARCH is not set # CONFIG_X86_ES7000 is not set # CONFIG_M386 is not set # CONFIG_M486 is not set # CONFIG_M586 is not set # CONFIG_M586TSC is not set # CONFIG_M586MMX is not set # CONFIG_M686 is not set # CONFIG_MPENTIUMII is not set # CONFIG_MPENTIUMIII is not set # CONFIG_MPENTIUMM is not set # CONFIG_MCORE2 is not set CONFIG_MPENTIUM4=y # CONFIG_MK6 is not set # CONFIG_MK7 is not set # CONFIG_MK8 is not set # CONFIG_MCRUSOE is not set # CONFIG_MEFFICEON is not set # CONFIG_MWINCHIPC6 is not set # CONFIG_MWINCHIP2 is not set # CONFIG_MWINCHIP3D is not set # CONFIG_MGEODEGX1 is not set # CONFIG_MGEODE_LX is not set # CONFIG_MCYRIXIII is not set # CONFIG_MVIAC3_2 is not set # CONFIG_MVIAC7 is not set # CONFIG_X86_GENERIC is not set CONFIG_X86_CMPXCHG=y CONFIG_X86_L1_CACHE_SHIFT=7 CONFIG_X86_XADD=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y # CONFIG_ARCH_HAS_ILOG2_U32 is not set # CONFIG_ARCH_HAS_ILOG2_U64 is not set CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_X86_WP_WORKS_OK=y CONFIG_X86_INVLPG=y CONFIG_X86_BSWAP=y CONFIG_X86_POPAD_OK=y CONFIG_X86_GOOD_APIC=y CONFIG_X86_INTEL_USERCOPY=y CONFIG_X86_USE_PPRO_CHECKSUM=y CONFIG_X86_TSC=y CONFIG_X86_CMOV=y CONFIG_X86_MINIMUM_CPU_MODEL=4 # CONFIG_HPET_TIMER is not set CONFIG_NR_CPUS=2 CONFIG_SCHED_SMT=y # CONFIG_SCHED_MC is not set CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set # CONFIG_PREEMPT_BKL is not set CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y # CONFIG_X86_MCE is not set CONFIG_VM86=y # CONFIG_TOSHIBA is not set # CONFIG_I8K is not set # CONFIG_X86_REBOOTFIXUPS is not set # CONFIG_MICROCODE is not set # CONFIG_X86_MSR is not set # CONFIG_X86_CPUID is not set # # Firmware Drivers # # CONFIG_EDD is not set # CONFIG_DELL_RBU is not set # CONFIG_DCDBAS is not set # CONFIG_NOHIGHMEM is not set CONFIG_HIGHMEM4G=y # CONFIG_HIGHMEM64G is not set CONFIG_PAGE_OFFSET=0xC0000000 CONFIG_HIGHMEM=y CONFIG_ARCH_POPULATES_NODE_MAP=y CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPLIT_PTLOCK_CPUS=4 # CONFIG_RESOURCES_64BIT is not set CONFIG_ZONE_DMA_FLAG=1 CONFIG_NR_QUICK=1 CONFIG_HIGHPTE=y # CONFIG_MATH_EMULATION is not set # CONFIG_MTRR is not set # CONFIG_EFI is not set CONFIG_IRQBALANCE=y CONFIG_SECCOMP=y CONFIG_HZ_100=y # CONFIG_HZ_250 is not set # CONFIG_HZ_300 is not set # CONFIG_HZ_1000 is not set CONFIG_HZ=100 # CONFIG_KEXEC is not set CONFIG_PHYSICAL_START=0x100000 CONFIG_PHYSICAL_ALIGN=0x100000 # CONFIG_COMPAT_VDSO is not set CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y # # Power management options (ACPI, APM) # CONFIG_PM=y # CONFIG_PM_LEGACY is not set # CONFIG_PM_DEBUG is not set # CONFIG_PM_SYSFS_DEPRECATED is not set # # ACPI (Advanced Configuration and Power Interface) Support # CONFIG_ACPI=y # CONFIG_ACPI_PROCFS is not set # CONFIG_ACPI_AC is not set # CONFIG_ACPI_BATTERY is not set # CONFIG_ACPI_BUTTON is not set # CONFIG_ACPI_FAN is not set # CONFIG_ACPI_PROCESSOR is not set # CONFIG_ACPI_ASUS is not set # CONFIG_ACPI_TOSHIBA is not set CONFIG_ACPI_BLACKLIST_YEAR=0 # CONFIG_ACPI_DEBUG is not set CONFIG_ACPI_EC=y CONFIG_ACPI_POWER=y CONFIG_ACPI_SYSTEM=y CONFIG_X86_PM_TIMER=y # CONFIG_APM is not set # # CPU Frequency scaling # # CONFIG_CPU_FREQ is not set # # Bus options (PCI, PCMCIA, EISA, MCA, ISA) # CONFIG_PCI=y # CONFIG_PCI_GOBIOS is not set # CONFIG_PCI_GOMMCONFIG is not set # CONFIG_PCI_GODIRECT is not set CONFIG_PCI_GOANY=y CONFIG_PCI_BIOS=y CONFIG_PCI_DIRECT=y CONFIG_PCI_MMCONFIG=y # CONFIG_PCIEPORTBUS is not set CONFIG_ARCH_SUPPORTS_MSI=y # CONFIG_PCI_MSI is not set # CONFIG_HT_IRQ is not set CONFIG_ISA_DMA_API=y # CONFIG_ISA is not set # CONFIG_MCA is not set # CONFIG_SCx200 is not set # # PCCARD (PCMCIA/CardBus) support # # CONFIG_PCCARD is not set # # Executable file formats # CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set # # Networking # CONFIG_NET=y # # Networking options # CONFIG_PACKET=y CONFIG_PACKET_MMAP=y CONFIG_UNIX=y CONFIG_XFRM=y CONFIG_XFRM_USER=y CONFIG_NET_KEY=y CONFIG_INET=y # CONFIG_IP_MULTICAST is not set CONFIG_IP_ADVANCED_ROUTER=y CONFIG_ASK_IP_FIB_HASH=y # CONFIG_IP_FIB_TRIE is not set CONFIG_IP_FIB_HASH=y CONFIG_IP_MULTIPLE_TABLES=y CONFIG_IP_ROUTE_MULTIPATH=y # CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set CONFIG_IP_ROUTE_VERBOSE=y # CONFIG_IP_PNP is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set CONFIG_SYN_COOKIES=y # CONFIG_INET_AH is not set CONFIG_INET_ESP=y CONFIG_INET_IPCOMP=y CONFIG_INET_XFRM_TUNNEL=y CONFIG_INET_TUNNEL=y CONFIG_INET_XFRM_MODE_TRANSPORT=y CONFIG_INET_XFRM_MODE_TUNNEL=y # CONFIG_INET_XFRM_MODE_BEET is not set CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_CUBIC=y CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_IP_VS is not set # CONFIG_IPV6 is not set # CONFIG_INET6_XFRM_TUNNEL is not set # CONFIG_INET6_TUNNEL is not set # CONFIG_NETWORK_SECMARK is not set CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set # # Core Netfilter Configuration # CONFIG_NETFILTER_NETLINK=m CONFIG_NETFILTER_NETLINK_QUEUE=m CONFIG_NETFILTER_NETLINK_LOG=m CONFIG_NF_CONNTRACK_ENABLED=y CONFIG_NF_CONNTRACK=y CONFIG_NF_CT_ACCT=y CONFIG_NF_CONNTRACK_MARK=y CONFIG_NF_CT_PROTO_GRE=m # CONFIG_NF_CONNTRACK_AMANDA is not set CONFIG_NF_CONNTRACK_FTP=m # CONFIG_NF_CONNTRACK_IRC is not set CONFIG_NF_CONNTRACK_PPTP=m # CONFIG_NF_CONNTRACK_TFTP is not set CONFIG_NETFILTER_XTABLES=y CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m CONFIG_NETFILTER_XT_TARGET_CONNMARK=m CONFIG_NETFILTER_XT_TARGET_DSCP=m CONFIG_NETFILTER_XT_TARGET_MARK=y CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m CONFIG_NETFILTER_XT_TARGET_NFLOG=m CONFIG_NETFILTER_XT_TARGET_NOTRACK=m CONFIG_NETFILTER_XT_TARGET_TCPMSS=m CONFIG_NETFILTER_XT_MATCH_COMMENT=m CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m CONFIG_NETFILTER_XT_MATCH_CONNMARK=m CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m CONFIG_NETFILTER_XT_MATCH_DCCP=m CONFIG_NETFILTER_XT_MATCH_DSCP=m CONFIG_NETFILTER_XT_MATCH_ESP=m CONFIG_NETFILTER_XT_MATCH_HELPER=y CONFIG_NETFILTER_XT_MATCH_LENGTH=m CONFIG_NETFILTER_XT_MATCH_LIMIT=y CONFIG_NETFILTER_XT_MATCH_MAC=m CONFIG_NETFILTER_XT_MATCH_MARK=y CONFIG_NETFILTER_XT_MATCH_POLICY=y CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m CONFIG_NETFILTER_XT_MATCH_QUOTA=m CONFIG_NETFILTER_XT_MATCH_REALM=m CONFIG_NETFILTER_XT_MATCH_STATE=y CONFIG_NETFILTER_XT_MATCH_STATISTIC=y CONFIG_NETFILTER_XT_MATCH_STRING=m CONFIG_NETFILTER_XT_MATCH_TCPMSS=y CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m # # IP: Netfilter Configuration # CONFIG_NF_CONNTRACK_IPV4=y # CONFIG_NF_CONNTRACK_PROC_COMPAT is not set # CONFIG_IP_NF_QUEUE is not set CONFIG_IP_NF_IPTABLES=y CONFIG_IP_NF_MATCH_IPRANGE=m CONFIG_IP_NF_MATCH_TOS=m # CONFIG_IP_NF_MATCH_RECENT is not set CONFIG_IP_NF_MATCH_ECN=m # CONFIG_IP_NF_MATCH_AH is not set CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_MATCH_OWNER=m CONFIG_IP_NF_MATCH_ADDRTYPE=m CONFIG_IP_NF_FILTER=y CONFIG_IP_NF_TARGET_REJECT=y CONFIG_IP_NF_TARGET_LOG=m # CONFIG_IP_NF_TARGET_ULOG is not set CONFIG_NF_NAT=y CONFIG_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=m CONFIG_IP_NF_TARGET_REDIRECT=m CONFIG_IP_NF_TARGET_NETMAP=m CONFIG_IP_NF_TARGET_SAME=m CONFIG_NF_NAT_PROTO_GRE=m CONFIG_NF_NAT_FTP=m # CONFIG_NF_NAT_IRC is not set # CONFIG_NF_NAT_TFTP is not set # CONFIG_NF_NAT_AMANDA is not set CONFIG_NF_NAT_PPTP=m # CONFIG_NF_NAT_H323 is not set # CONFIG_NF_NAT_SIP is not set CONFIG_IP_NF_MANGLE=y CONFIG_IP_NF_TARGET_TOS=m CONFIG_IP_NF_TARGET_ECN=m CONFIG_IP_NF_TARGET_TTL=m CONFIG_IP_NF_RAW=m CONFIG_IP_NF_ARPTABLES=m CONFIG_IP_NF_ARPFILTER=m CONFIG_IP_NF_ARP_MANGLE=m # CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set # CONFIG_DECNET is not set # CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set # # QoS and/or fair queueing # CONFIG_NET_SCHED=y CONFIG_NET_SCH_FIFO=y # # Queueing/Scheduling # # CONFIG_NET_SCH_CBQ is not set CONFIG_NET_SCH_HTB=m CONFIG_NET_SCH_HFSC=m CONFIG_NET_SCH_PRIO=m CONFIG_NET_SCH_RED=m CONFIG_NET_SCH_SFQ=m CONFIG_NET_SCH_TEQL=m CONFIG_NET_SCH_TBF=m CONFIG_NET_SCH_GRED=m CONFIG_NET_SCH_DSMARK=m CONFIG_NET_SCH_NETEM=m CONFIG_NET_SCH_INGRESS=m # # Classification # CONFIG_NET_CLS=y CONFIG_NET_CLS_BASIC=m CONFIG_NET_CLS_TCINDEX=m CONFIG_NET_CLS_ROUTE4=m CONFIG_NET_CLS_ROUTE=y CONFIG_NET_CLS_FW=m CONFIG_NET_CLS_U32=m CONFIG_CLS_U32_PERF=y CONFIG_CLS_U32_MARK=y CONFIG_NET_CLS_RSVP=m # CONFIG_NET_CLS_RSVP6 is not set CONFIG_NET_EMATCH=y CONFIG_NET_EMATCH_STACK=32 CONFIG_NET_EMATCH_CMP=m CONFIG_NET_EMATCH_NBYTE=m CONFIG_NET_EMATCH_U32=m CONFIG_NET_EMATCH_META=m CONFIG_NET_EMATCH_TEXT=m CONFIG_NET_CLS_ACT=y CONFIG_NET_ACT_POLICE=m CONFIG_NET_ACT_GACT=m CONFIG_GACT_PROB=y CONFIG_NET_ACT_MIRRED=m CONFIG_NET_ACT_IPT=m CONFIG_NET_ACT_PEDIT=m # CONFIG_NET_ACT_SIMP is not set # CONFIG_NET_CLS_IND is not set CONFIG_NET_ESTIMATOR=y # # Network testing # # CONFIG_NET_PKTGEN is not set # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set CONFIG_FIB_RULES=y # # Wireless # # CONFIG_CFG80211 is not set # CONFIG_WIRELESS_EXT is not set # CONFIG_IEEE80211 is not set # CONFIG_RFKILL is not set # # Device Drivers # # # Generic Driver Options # CONFIG_STANDALONE=y # CONFIG_PREVENT_FIRMWARE_BUILD is not set # CONFIG_FW_LOADER is not set # CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker # # CONFIG_CONNECTOR is not set # CONFIG_MTD is not set # # Parallel port support # # CONFIG_PARPORT is not set # # Plug and Play support # CONFIG_PNP=y # CONFIG_PNP_DEBUG is not set # # Protocols # CONFIG_PNPACPI=y # # Block devices # CONFIG_BLK_DEV_FD=m # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set # # Misc devices # # CONFIG_PHANTOM is not set # CONFIG_SGI_IOC4 is not set # CONFIG_SONY_LAPTOP is not set # CONFIG_THINKPAD_ACPI is not set CONFIG_IDE=m CONFIG_BLK_DEV_IDE=m # # Please see Documentation/ide.txt for help/info on IDE drives # # CONFIG_BLK_DEV_IDE_SATA is not set # CONFIG_BLK_DEV_HD_IDE is not set # CONFIG_BLK_DEV_IDEDISK is not set # CONFIG_IDEDISK_MULTI_MODE is not set CONFIG_BLK_DEV_IDECD=m # CONFIG_BLK_DEV_IDEFLOPPY is not set # CONFIG_BLK_DEV_IDESCSI is not set # CONFIG_BLK_DEV_IDEACPI is not set # CONFIG_IDE_TASK_IOCTL is not set # CONFIG_IDE_PROC_FS is not set # # IDE chipset support/bugfixes # # CONFIG_IDE_GENERIC is not set # CONFIG_BLK_DEV_CMD640 is not set # CONFIG_BLK_DEV_IDEPNP is not set CONFIG_BLK_DEV_IDEPCI=y CONFIG_IDEPCI_SHARE_IRQ=y # CONFIG_IDEPCI_PCIBUS_ORDER is not set # CONFIG_BLK_DEV_OFFBOARD is not set # CONFIG_BLK_DEV_GENERIC is not set # CONFIG_BLK_DEV_RZ1000 is not set CONFIG_BLK_DEV_IDEDMA_PCI=y # CONFIG_BLK_DEV_IDEDMA_FORCED is not set CONFIG_IDEDMA_ONLYDISK=y # CONFIG_BLK_DEV_AEC62XX is not set # CONFIG_BLK_DEV_ALI15X3 is not set # CONFIG_BLK_DEV_AMD74XX is not set # CONFIG_BLK_DEV_ATIIXP is not set # CONFIG_BLK_DEV_CMD64X is not set # CONFIG_BLK_DEV_TRIFLEX is not set # CONFIG_BLK_DEV_CY82C693 is not set # CONFIG_BLK_DEV_CS5530 is not set # CONFIG_BLK_DEV_CS5535 is not set # CONFIG_BLK_DEV_HPT34X is not set # CONFIG_BLK_DEV_HPT366 is not set # CONFIG_BLK_DEV_JMICRON is not set # CONFIG_BLK_DEV_SC1200 is not set CONFIG_BLK_DEV_PIIX=m # CONFIG_BLK_DEV_IT8213 is not set # CONFIG_BLK_DEV_IT821X is not set # CONFIG_BLK_DEV_NS87415 is not set # CONFIG_BLK_DEV_PDC202XX_OLD is not set # CONFIG_BLK_DEV_PDC202XX_NEW is not set # CONFIG_BLK_DEV_SVWKS is not set # CONFIG_BLK_DEV_SIIMAGE is not set # CONFIG_BLK_DEV_SIS5513 is not set # CONFIG_BLK_DEV_SLC90E66 is not set # CONFIG_BLK_DEV_TRM290 is not set # CONFIG_BLK_DEV_VIA82CXXX is not set # CONFIG_BLK_DEV_TC86C001 is not set # CONFIG_IDE_ARM is not set CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set # CONFIG_BLK_DEV_HD is not set # # SCSI device support # # CONFIG_RAID_ATTRS is not set CONFIG_SCSI=y # CONFIG_SCSI_NETLINK is not set # CONFIG_SCSI_PROC_FS is not set # # SCSI support type (disk, tape, CD-ROM) # CONFIG_BLK_DEV_SD=y # CONFIG_CHR_DEV_ST is not set # CONFIG_CHR_DEV_OSST is not set # CONFIG_BLK_DEV_SR is not set # CONFIG_CHR_DEV_SG is not set # CONFIG_CHR_DEV_SCH is not set # # Some SCSI devices (e.g. CD jukebox) support multiple LUNs # # CONFIG_SCSI_MULTI_LUN is not set # CONFIG_SCSI_CONSTANTS is not set # CONFIG_SCSI_LOGGING is not set # CONFIG_SCSI_SCAN_ASYNC is not set CONFIG_SCSI_WAIT_SCAN=m # # SCSI Transports # CONFIG_SCSI_SPI_ATTRS=y # CONFIG_SCSI_FC_ATTRS is not set # CONFIG_SCSI_ISCSI_ATTRS is not set # CONFIG_SCSI_SAS_ATTRS is not set # CONFIG_SCSI_SAS_LIBSAS is not set # # SCSI low-level drivers # # CONFIG_ISCSI_TCP is not set # CONFIG_BLK_DEV_3W_XXXX_RAID is not set # CONFIG_SCSI_3W_9XXX is not set # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AACRAID is not set # CONFIG_SCSI_AIC7XXX is not set # CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_AIC94XX is not set # CONFIG_SCSI_DPT_I2O is not set # CONFIG_SCSI_ADVANSYS is not set # CONFIG_SCSI_ARCMSR is not set # CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_LEGACY is not set # CONFIG_MEGARAID_SAS is not set # CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_EATA is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_IPS is not set # CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_STEX is not set # CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_QLOGIC_1280 is not set # CONFIG_SCSI_QLA_FC is not set # CONFIG_SCSI_QLA_ISCSI is not set # CONFIG_SCSI_LPFC is not set # CONFIG_SCSI_DC390T is not set # CONFIG_SCSI_NSP32 is not set # CONFIG_SCSI_DEBUG is not set # CONFIG_SCSI_SRP is not set # CONFIG_ATA is not set # # Multi-device support (RAID and LVM) # # CONFIG_MD is not set # # Fusion MPT device support # CONFIG_FUSION=y CONFIG_FUSION_SPI=y # CONFIG_FUSION_FC is not set # CONFIG_FUSION_SAS is not set CONFIG_FUSION_MAX_SGE=128 # CONFIG_FUSION_CTL is not set # # IEEE 1394 (FireWire) support # # # An alternative FireWire stack is available with EXPERIMENTAL=y # # CONFIG_IEEE1394 is not set # # I2O device support # # CONFIG_I2O is not set # CONFIG_MACINTOSH_DRIVERS is not set # # Network device support # CONFIG_NETDEVICES=y CONFIG_IFB=m # CONFIG_DUMMY is not set # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set CONFIG_TUN=m # CONFIG_NET_SB1000 is not set # CONFIG_ARCNET is not set # # Ethernet (10 or 100Mbit) # # CONFIG_NET_ETHERNET is not set CONFIG_NETDEV_1000=y # CONFIG_ACENIC is not set # CONFIG_DL2K is not set CONFIG_E1000=m CONFIG_E1000_NAPI=y # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set # CONFIG_R8169 is not set # CONFIG_SIS190 is not set # CONFIG_SKGE is not set # CONFIG_SKY2 is not set # CONFIG_SK98LIN is not set # CONFIG_VIA_VELOCITY is not set CONFIG_TIGON3=m # CONFIG_BNX2 is not set # CONFIG_QLA3XXX is not set # CONFIG_NETDEV_10000 is not set # CONFIG_TR is not set # # Wireless LAN # # CONFIG_WLAN_PRE80211 is not set # CONFIG_WLAN_80211 is not set # CONFIG_WAN is not set # CONFIG_FDDI is not set # CONFIG_PPP is not set # CONFIG_SLIP is not set # CONFIG_NET_FC is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set # # ISDN subsystem # # CONFIG_ISDN is not set # # Telephony Support # # CONFIG_PHONE is not set # # Input device support # CONFIG_INPUT=y # CONFIG_INPUT_FF_MEMLESS is not set # CONFIG_INPUT_POLLDEV is not set # # Userland interfaces # CONFIG_INPUT_MOUSEDEV=y # CONFIG_INPUT_MOUSEDEV_PSAUX is not set CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set # CONFIG_INPUT_TSDEV is not set # CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set # # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_SUNKBD is not set # CONFIG_KEYBOARD_LKKBD is not set # CONFIG_KEYBOARD_XTKBD is not set # CONFIG_KEYBOARD_NEWTON is not set # CONFIG_KEYBOARD_STOWAWAY is not set # CONFIG_INPUT_MOUSE is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TABLET is not set # CONFIG_INPUT_TOUCHSCREEN is not set # CONFIG_INPUT_MISC is not set # # Hardware I/O ports # CONFIG_SERIO=y CONFIG_SERIO_I8042=y # CONFIG_SERIO_SERPORT is not set # CONFIG_SERIO_CT82C710 is not set # CONFIG_SERIO_PCIPS2 is not set CONFIG_SERIO_LIBPS2=y # CONFIG_SERIO_RAW is not set # CONFIG_GAMEPORT is not set # # Character devices # CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y # CONFIG_VT_HW_CONSOLE_BINDING is not set # CONFIG_SERIAL_NONSTANDARD is not set # # Serial drivers # # CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support # # CONFIG_SERIAL_JSM is not set CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set # # IPMI # # CONFIG_IPMI_HANDLER is not set # CONFIG_WATCHDOG is not set CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_INTEL=m # CONFIG_HW_RANDOM_AMD is not set # CONFIG_HW_RANDOM_GEODE is not set # CONFIG_HW_RANDOM_VIA is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set # CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_MWAVE is not set # CONFIG_PC8736x_GPIO is not set # CONFIG_NSC_GPIO is not set # CONFIG_CS5535_GPIO is not set # CONFIG_RAW_DRIVER is not set # CONFIG_HPET is not set # CONFIG_HANGCHECK_TIMER is not set # # TPM devices # CONFIG_DEVPORT=y # CONFIG_I2C is not set # # SPI support # # CONFIG_SPI is not set # CONFIG_SPI_MASTER is not set # # Dallas's 1-wire bus # # CONFIG_W1 is not set # CONFIG_HWMON is not set # # Multifunction device drivers # # CONFIG_MFD_SM501 is not set # # Multimedia devices # # CONFIG_VIDEO_DEV is not set # CONFIG_DVB_CORE is not set # CONFIG_DAB is not set # # Graphics support # # CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Display device support # # CONFIG_DISPLAY_SUPPORT is not set # CONFIG_VGASTATE is not set # CONFIG_FB is not set # # Console display driver support # CONFIG_VGA_CONSOLE=y # CONFIG_VGACON_SOFT_SCROLLBACK is not set # CONFIG_VIDEO_SELECT is not set CONFIG_DUMMY_CONSOLE=y # # Sound # # CONFIG_SOUND is not set # # HID Devices # # CONFIG_HID is not set # # USB support # CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB_ARCH_HAS_EHCI=y # CONFIG_USB is not set # # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' # # # USB Gadget Support # # CONFIG_USB_GADGET is not set # CONFIG_MMC is not set # # LED devices # # CONFIG_NEW_LEDS is not set # # LED drivers # # # LED Triggers # # # InfiniBand support # # CONFIG_INFINIBAND is not set # # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) # # # Real Time Clock # # # DMA Engine support # # CONFIG_DMA_ENGINE is not set # # DMA Clients # # # DMA Devices # # # Virtualization # # # File systems # CONFIG_EXT2_FS=m # CONFIG_EXT2_FS_XATTR is not set # CONFIG_EXT2_FS_XIP is not set # CONFIG_EXT3_FS is not set # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set # CONFIG_FS_POSIX_ACL is not set CONFIG_XFS_FS=y # CONFIG_XFS_QUOTA is not set # CONFIG_XFS_SECURITY is not set # CONFIG_XFS_POSIX_ACL is not set # CONFIG_XFS_RT is not set # CONFIG_OCFS2_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_INOTIFY=y CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set # CONFIG_FUSE_FS is not set # # CD-ROM/DVD Filesystems # CONFIG_ISO9660_FS=m # CONFIG_JOLIET is not set # CONFIG_ZISOFS is not set # CONFIG_UDF_FS is not set # # DOS/FAT/NT Filesystems # # CONFIG_MSDOS_FS is not set # CONFIG_VFAT_FS is not set # CONFIG_NTFS_FS is not set # # Pseudo filesystems # CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y CONFIG_PROC_SYSCTL=y CONFIG_SYSFS=y # CONFIG_TMPFS is not set # CONFIG_HUGETLBFS is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y # # Miscellaneous filesystems # # CONFIG_HFSPLUS_FS is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set # CONFIG_QNX4FS_FS is not set # CONFIG_SYSV_FS is not set # CONFIG_UFS_FS is not set # # Network File Systems # # CONFIG_NFS_FS is not set # CONFIG_NFSD is not set # CONFIG_SMB_FS is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set CONFIG_MSDOS_PARTITION=y # # Native Language Support # # CONFIG_NLS is not set # # Kernel hacking # CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set # CONFIG_ENABLE_MUST_CHECK is not set # CONFIG_MAGIC_SYSRQ is not set # CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_FS is not set # CONFIG_HEADERS_CHECK is not set # CONFIG_DEBUG_KERNEL is not set CONFIG_DEBUG_BUGVERBOSE=y CONFIG_EARLY_PRINTK=y CONFIG_X86_FIND_SMP_CONFIG=y CONFIG_X86_MPPARSE=y CONFIG_DOUBLEFAULT=y # # Security options # # CONFIG_KEYS is not set # CONFIG_SECURITY is not set # # Cryptographic options # CONFIG_CRYPTO=y CONFIG_CRYPTO_ALGAPI=y CONFIG_CRYPTO_BLKCIPHER=y CONFIG_CRYPTO_HASH=y CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_HMAC=y # CONFIG_CRYPTO_NULL is not set # CONFIG_CRYPTO_MD4 is not set CONFIG_CRYPTO_MD5=y CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_SHA256=y CONFIG_CRYPTO_SHA512=y # CONFIG_CRYPTO_WP512 is not set # CONFIG_CRYPTO_TGR192 is not set CONFIG_CRYPTO_ECB=m CONFIG_CRYPTO_CBC=y # CONFIG_CRYPTO_PCBC is not set # CONFIG_CRYPTO_CRYPTD is not set CONFIG_CRYPTO_DES=y # CONFIG_CRYPTO_FCRYPT is not set CONFIG_CRYPTO_BLOWFISH=m # CONFIG_CRYPTO_TWOFISH is not set CONFIG_CRYPTO_TWOFISH_COMMON=m CONFIG_CRYPTO_TWOFISH_586=m CONFIG_CRYPTO_SERPENT=m # CONFIG_CRYPTO_AES is not set CONFIG_CRYPTO_AES_586=y # CONFIG_CRYPTO_CAST5 is not set # CONFIG_CRYPTO_CAST6 is not set # CONFIG_CRYPTO_TEA is not set # CONFIG_CRYPTO_ARC4 is not set # CONFIG_CRYPTO_KHAZAD is not set # CONFIG_CRYPTO_ANUBIS is not set CONFIG_CRYPTO_DEFLATE=y # CONFIG_CRYPTO_MICHAEL_MIC is not set # CONFIG_CRYPTO_CRC32C is not set # CONFIG_CRYPTO_CAMELLIA is not set # CONFIG_CRYPTO_TEST is not set # # Hardware crypto devices # # CONFIG_CRYPTO_DEV_PADLOCK is not set # CONFIG_CRYPTO_DEV_GEODE is not set # # Library routines # CONFIG_BITREVERSE=m CONFIG_CRC_CCITT=m CONFIG_CRC16=m # CONFIG_CRC_ITU_T is not set CONFIG_CRC32=m CONFIG_LIBCRC32C=m CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m CONFIG_PLIST=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HAS_DMA=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_PENDING_IRQ=y CONFIG_X86_SMP=y CONFIG_X86_HT=y CONFIG_X86_BIOS_REBOOT=y CONFIG_X86_TRAMPOLINE=y CONFIG_KTIME_SCALAR=y From owner-xfs@oss.sgi.com Fri Aug 3 10:24:04 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 03 Aug 2007 10:24:07 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_20 autolearn=ham version=3.2.0-pre1-r499012 Received: from relay.sgi.com (netops-testserver-3.corp.sgi.com [192.26.57.72]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l73HO1bm027356 for ; Fri, 3 Aug 2007 10:24:04 -0700 Received: from schroedinger.engr.sgi.com (schroedinger.engr.sgi.com [150.166.1.51]) by netops-testserver-3.corp.sgi.com (Postfix) with ESMTP id 7BBF1908A2 for ; Fri, 3 Aug 2007 10:08:01 -0700 (PDT) Received: from clameter (helo=localhost) by schroedinger.engr.sgi.com with local-esmtp (Exim 3.36 #1 (Debian)) id 1IH09q-0004Vl-00; Fri, 03 Aug 2007 09:37:46 -0700 Date: Fri, 3 Aug 2007 09:37:46 -0700 (PDT) From: Christoph Lameter X-X-Sender: clameter@schroedinger.engr.sgi.com To: Marco Berizzi cc: linux-kernel@vger.kernel.org, David Chinner , xfs@oss.sgi.com Subject: Re: kernel BUG at mm/slab.c:2980 (was Re: [] xfs_bmap_search_multi_extents+0x6f/0xe0) In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12463 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: clameter@sgi.com Precedence: bulk X-list: xfs Could you try this with the SLUB allocator and then boot with "slub_debug"? From owner-xfs@oss.sgi.com Sat Aug 4 12:00:14 2007 Received: with ECARTIS (v1.0.0; list xfs); Sat, 04 Aug 2007 12:00:17 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=AWL,BAYES_50 autolearn=ham version=3.2.0-pre1-r499012 Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.188]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l74J0Cbm010459 for ; Sat, 4 Aug 2007 12:00:13 -0700 Received: by mu-out-0910.google.com with SMTP id i10so1488937mue for ; Sat, 04 Aug 2007 12:00:16 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:from:to:subject:date:user-agent:cc:mime-version:content-disposition:content-type:content-transfer-encoding:message-id; b=W8M+yBqM+sxsS8HB/h35QwNHOH4gZhyTR87HZAmDoEkitIAF2JyPr5X3wBnvfJpumNlyISHKGTQwS4TX8gncmqqzIBL/XZfofUv+zSCycyoGefaU3+WJDjXD9KfTw5UjQQDrinpKjqPKDxsrJ+nn2OpXyWZT8lA2H9wkT44K81M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:from:to:subject:date:user-agent:cc:mime-version:content-disposition:content-type:content-transfer-encoding:message-id; b=OEEGYbe7ZxFzjHB8pUlmr/sc54z4FjU5Wsi/1Dwiw9hrbPVkh31MrDrT1vc9KXY4ugDjb/liVsYWOZAaMZlN3546VM0dpLB52UXYWz/XTT+GeoOaNrWMmBzyD8jMuq4FUxnNDn3CzCo+HaFJSh+Prdx7X8YdWCRO/4hWumIigX8= Received: by 10.86.26.11 with SMTP id 11mr3143511fgz.1186252335882; Sat, 04 Aug 2007 11:32:15 -0700 (PDT) Received: from ?192.168.1.34? ( [90.184.90.115]) by mx.google.com with ESMTPS id u9sm14099447muf.2007.08.04.11.32.14 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 04 Aug 2007 11:32:15 -0700 (PDT) From: Jesper Juhl To: Andrew Morton Subject: [PATCH][RESEND] fix a potential NULL pointer deref in XFS on failed mount. Date: Sat, 4 Aug 2007 20:30:21 +0200 User-Agent: KMail/1.9.7 Cc: Linux Kernel Mailing List , David Chinner , xfs@oss.sgi.com, xfs-masters@oss.sgi.com, Jesper Juhl MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200708042030.21375.jesper.juhl@gmail.com> X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12464 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jesper.juhl@gmail.com Precedence: bulk X-list: xfs Back in 2006 (2006-10-31 to be specific, reposted on 2006-11-16), I submitted a patch to fix a potential NULL pointer deref in XFS on failed mount. The patch drew some comments and it turned out that my initial approach to a fix was wrong. David Chinner kindly offered some tips on how to implement a proper fix, and on 2006-11-20 I submitted a revised fix. This patch, unfortunately, didn't draw any comments, nor did it ever get merged anywhere. I believe that now sufficient time has passed to warrent a repost. And now, on August 4, 2007 - yet another resend. it would really be nice if this patch could either get merged or, if it is wrong for some reason, get an explicit NACK. Come on people, what's it going to be? The Coverity checker spotted (as bug #346) a potential problem in XFS. The problem is that if, in xfs_mount(), this code triggers: ... if (!mp->m_logdev_targp) goto error0; ... Then we'll end up calling xfs_unmountfs_close() with a NULL 'mp->m_logdev_targp'. This in turn will result in a call to xfs_free_buftarg() with its 'btp' argument == NULL. xfs_free_buftarg() dereferences 'btp' leading to a NULL pointer dereference and crash. I think this can happen, since the fatal call to xfs_free_buftarg() happens when 'm_logdev_targp != m_ddev_targp' and due to a check of 'm_ddev_targp' against NULL in xfs_mount() (and subsequent return if it is NULL) the two will never both be NULL when we hit the error0 label from the two lines cited above. This patch fixes the issue by checking mp->m_logdev_targp against NULL in xfs_unmountfs_close() and doing the proper xfs_blkdev_put(logdev); and xfs_blkdev_put(rtdev); on (!mp->m_rtdev_targp) in xfs_mount(). Compile tested. Comments and feedback welcome. Please consider merging. Signed-off-by: Jesper Juhl --- fs/xfs/xfs_mount.c | 2 +- fs/xfs/xfs_vfsops.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index a66b398..215e041 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c @@ -1275,7 +1275,7 @@ xfs_unmountfs(xfs_mount_t *mp, struct cred *cr) void xfs_unmountfs_close(xfs_mount_t *mp, struct cred *cr) { - if (mp->m_logdev_targp != mp->m_ddev_targp) + if (mp->m_logdev_targp && mp->m_logdev_targp != mp->m_ddev_targp) xfs_free_buftarg(mp->m_logdev_targp, 1); if (mp->m_rtdev_targp) xfs_free_buftarg(mp->m_rtdev_targp, 1); diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c index 11f5ea2..6d4bc5d 100644 --- a/fs/xfs/xfs_vfsops.c +++ b/fs/xfs/xfs_vfsops.c @@ -482,13 +482,19 @@ xfs_mount( } if (rtdev) { mp->m_rtdev_targp = xfs_alloc_buftarg(rtdev, 1); - if (!mp->m_rtdev_targp) + if (!mp->m_rtdev_targp) { + xfs_blkdev_put(logdev); + xfs_blkdev_put(rtdev); goto error0; + } } mp->m_logdev_targp = (logdev && logdev != ddev) ? xfs_alloc_buftarg(logdev, 1) : mp->m_ddev_targp; - if (!mp->m_logdev_targp) + if (!mp->m_logdev_targp) { + xfs_blkdev_put(logdev); + xfs_blkdev_put(rtdev); goto error0; + } /* * Setup flags based on mount(2) options and then the superblock From owner-xfs@oss.sgi.com Sun Aug 5 14:06:08 2007 Received: with ECARTIS (v1.0.0; list xfs); Sun, 05 Aug 2007 14:06:11 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=AWL,BAYES_50,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l75L66bm026047 for ; Sun, 5 Aug 2007 14:06:08 -0700 Received: from Liberator.local (liberator.sandeen.net [10.0.0.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 4247D18015183 for ; Sun, 5 Aug 2007 16:06:10 -0500 (CDT) Message-ID: <46B63BC2.7020109@sandeen.net> Date: Sun, 05 Aug 2007 16:06:10 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: xfs-oss Subject: [PATCH] fix nasty quota hashtable allocation bug Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12465 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs This git mod: 77e4635ae191774526ed695482a151ac986f3806 converted to a "greedy" allocation interface, but for the quota hashtables it switched from allocating XFS_QM_HASHSIZE (nr of elements) xfs_dqhash_t's to allocating only XFS_QM_HASHSIZE *bytes* - quite a lot smaller! Then when we converted hsize "back" to nr of elements (the division line) hsize went to 0. This was leading to oopses when running any quota tests on the Fedora 8 test kernel, but the problem has been there for almost a year. Signed-off-by: Eric Sandeen Index: linux-2.6.22-rc4/fs/xfs/quota/xfs_qm.c =================================================================== --- linux-2.6.22-rc4.orig/fs/xfs/quota/xfs_qm.c +++ linux-2.6.22-rc4/fs/xfs/quota/xfs_qm.c @@ -117,7 +117,8 @@ xfs_Gqm_init(void) * Initialize the dquot hash tables. */ udqhash = kmem_zalloc_greedy(&hsize, - XFS_QM_HASHSIZE_LOW, XFS_QM_HASHSIZE_HIGH, + XFS_QM_HASHSIZE_LOW * sizeof(xfs_dqhash_t), + XFS_QM_HASHSIZE_HIGH * sizeof(xfs_dqhash_t), KM_SLEEP | KM_MAYFAIL | KM_LARGE); gdqhash = kmem_zalloc(hsize, KM_SLEEP | KM_LARGE); hsize /= sizeof(xfs_dqhash_t); From owner-xfs@oss.sgi.com Sun Aug 5 22:56:42 2007 Received: with ECARTIS (v1.0.0; list xfs); Sun, 05 Aug 2007 22:56:45 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_66 autolearn=no version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l765udbm030668 for ; Sun, 5 Aug 2007 22:56:41 -0700 Received: from [134.14.55.89] (soarer.melbourne.sgi.com [134.14.55.89]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id PAA26031; Mon, 6 Aug 2007 15:56:35 +1000 Message-ID: <46B6B88F.1020401@sgi.com> Date: Mon, 06 Aug 2007 15:58:39 +1000 From: Vlad Apostolov User-Agent: Thunderbird 1.5.0.12 (X11/20070509) MIME-Version: 1.0 To: Christoph Hellwig CC: xfs@oss.sgi.com Subject: Re: [PATCH] dmapi: simplify slab cache creation References: <20070802212926.GA24834@lst.de> In-Reply-To: <20070802212926.GA24834@lst.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12466 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: vapo@sgi.com Precedence: bulk X-list: xfs It is looking good Christoph, Regards, Vlad Christoph Hellwig wrote: > Currently two out of three slab caches are created on-demand on > dmapi_register. Move them into dmapi_init as the others are to clean up > all the mess about checking whether dmapi_register has been called > before or is in the process of beeing called. > > > Signed-off-by: Christoph Hellwig > > Index: linux-2.6-xfs/fs/dmapi/dmapi_mountinfo.c > =================================================================== > --- linux-2.6-xfs.orig/fs/dmapi/dmapi_mountinfo.c 2007-08-02 16:00:52.000000000 +0200 > +++ linux-2.6-xfs/fs/dmapi/dmapi_mountinfo.c 2007-08-02 16:07:13.000000000 +0200 > @@ -471,40 +471,7 @@ dmapi_register( > struct filesystem_dmapi_operations *dmapiops) > { > dm_vector_map_t *proto; > - static int initialized = 0; > > -wait_cache: > - spin_lock(&dm_fsys_lock); > - if (initialized == -1) { > - spin_unlock(&dm_fsys_lock); > - goto wait_cache; > - } > - if (initialized == 0) > - initialized = -1; > - spin_unlock(&dm_fsys_lock); > - > - if (initialized == -1) { > - ASSERT(dm_fsys_map_cachep == NULL); > - ASSERT(dm_fsys_vptr_cachep == NULL); > - > - dm_fsys_map_cachep = kmem_cache_create("dm_fsys_map", > - sizeof(dm_vector_map_t), 0, 0, NULL, NULL); > - > - dm_fsys_vptr_cachep = kmem_cache_create("dm_fsys_vptr", > - sizeof(dm_fsys_vector_t), 0, 0, NULL, NULL); > - > - spin_lock(&dm_fsys_lock); > - if ((dm_fsys_map_cachep == NULL) || > - (dm_fsys_map_cachep == NULL)) { > - initialized = 0; > - spin_unlock(&dm_fsys_lock); > - goto out_cache_free; > - } > - initialized = 1; > - spin_unlock(&dm_fsys_lock); > - } > - > - ASSERT_ALWAYS(initialized == 1); > proto = kmem_cache_alloc(dm_fsys_map_cachep, GFP_KERNEL); > if (proto == NULL) { > printk("%s/%d: kmem_cache_alloc(dm_fsys_map_cachep) returned NULL\n", __FUNCTION__, __LINE__); > @@ -521,21 +488,8 @@ wait_cache: > list_add(&proto->ftype_list, &dm_fsys_map); > ftype_list(); > spin_unlock(&dm_fsys_lock); > - > - return; > - > -out_cache_free: > - if (dm_fsys_map_cachep) { > - kmem_cache_destroy(dm_fsys_map_cachep); > - dm_fsys_map_cachep = NULL; > - } > - if (dm_fsys_vptr_cachep) { > - kmem_cache_destroy(dm_fsys_vptr_cachep); > - dm_fsys_vptr_cachep = NULL; > - } > } > > - > /* Called by a filesystem module that is unloading from the kernel */ > void > dmapi_unregister( > Index: linux-2.6-xfs/fs/dmapi/dmapi_sysent.c > =================================================================== > --- linux-2.6-xfs.orig/fs/dmapi/dmapi_sysent.c 2007-08-02 16:03:21.000000000 +0200 > +++ linux-2.6-xfs/fs/dmapi/dmapi_sysent.c 2007-08-02 16:09:46.000000000 +0200 > @@ -740,35 +740,47 @@ int __init dmapi_init(void) > dm_tokdata_cachep = kmem_cache_create("dm_tokdata", > sizeof(struct dm_tokdata), 0, 0, NULL, NULL); > if (dm_tokdata_cachep == NULL) > - goto out_cache_free; > + goto out; > > dm_fsreg_cachep = kmem_cache_create("dm_fsreg", > sizeof(struct dm_fsreg), 0, 0, NULL, NULL); > if (dm_fsreg_cachep == NULL) > - goto out_cache_free; > + goto out_free_tokdata_cachep; > > dm_session_cachep = kmem_cache_create("dm_session", > sizeof(struct dm_session), 0, 0, NULL, NULL); > if (dm_session_cachep == NULL) > - goto out_cache_free; > + goto out_free_fsreg_cachep; > + > + dm_fsys_map_cachep = kmem_cache_create("dm_fsys_map", > + sizeof(dm_vector_map_t), 0, 0, NULL, NULL); > + if (dm_fsys_map_cachep == NULL) > + goto out_free_session_cachep; > + dm_fsys_vptr_cachep = kmem_cache_create("dm_fsys_vptr", > + sizeof(dm_fsys_vector_t), 0, 0, NULL, NULL); > + if (dm_fsys_vptr_cachep == NULL) > + goto out_free_fsys_map_cachep; > > ret = misc_register(&dmapi_dev); > - if( ret != 0 ) > + if (ret) { > printk(KERN_ERR "dmapi_init: misc_register returned %d\n", ret); > + goto out_free_fsys_vptr_cachep; > + } > + > dmapi_init_procfs(dmapi_dev.minor); > return 0; > > -out_cache_free: > - if (dm_tokdata_cachep) > - kmem_cache_destroy(dm_tokdata_cachep); > - if (dm_fsreg_cachep) > - kmem_cache_destroy(dm_fsreg_cachep); > - if (dm_session_cachep) > - kmem_cache_destroy(dm_session_cachep); > - if (dm_fsys_map_cachep) > - kmem_cache_destroy(dm_fsys_map_cachep); > - if (dm_fsys_vptr_cachep) > - kmem_cache_destroy(dm_fsys_vptr_cachep); > + out_free_fsys_vptr_cachep: > + kmem_cache_destroy(dm_fsys_vptr_cachep); > + out_free_fsys_map_cachep: > + kmem_cache_destroy(dm_fsys_map_cachep); > + out_free_session_cachep: > + kmem_cache_destroy(dm_session_cachep); > + out_free_fsreg_cachep: > + kmem_cache_destroy(dm_fsreg_cachep); > + out_free_tokdata_cachep: > + kmem_cache_destroy(dm_tokdata_cachep); > + out: > return -ENOMEM; > } > > > From owner-xfs@oss.sgi.com Sun Aug 5 23:31:30 2007 Received: with ECARTIS (v1.0.0; list xfs); Sun, 05 Aug 2007 23:31:33 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l766VQbm008584 for ; Sun, 5 Aug 2007 23:31:28 -0700 Received: from [134.14.55.89] (soarer.melbourne.sgi.com [134.14.55.89]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id QAA27016; Mon, 6 Aug 2007 16:31:24 +1000 Message-ID: <46B6C0B9.2050503@sgi.com> Date: Mon, 06 Aug 2007 16:33:29 +1000 From: Vlad Apostolov User-Agent: Thunderbird 1.5.0.12 (X11/20070509) MIME-Version: 1.0 To: sgi.bugs.xfs@engr.sgi.com CC: linux-xfs@oss.sgi.com Subject: TAKE 968690 - remove unessecary vfs argument to DM_EVENT_ENABLED Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12467 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: vapo@sgi.com Precedence: bulk X-list: xfs Date: Mon Aug 6 16:27:33 AEST 2007 Workarea: soarer.melbourne.sgi.com:/home/vapo/isms/linux-xfs-patch-reviews Inspected by: vapo The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29340a fs/xfs/xfs_vnodeops.c - 1.705 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vnodeops.c.diff?r1=text&tr1=1.705&r2=text&tr2=1.704&f=h - pv 968690, author Christoph Hellwig , rv vapo - remove unessecary vfs argument to DM_EVENT_ENABLED fs/xfs/xfs_dmapi.h - 1.59 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dmapi.h.diff?r1=text&tr1=1.59&r2=text&tr2=1.58&f=h - pv 968690, author Christoph Hellwig , rv vapo - remove unessecary vfs argument to DM_EVENT_ENABLED fs/xfs/xfs_bmap.c - 1.376 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_bmap.c.diff?r1=text&tr1=1.376&r2=text&tr2=1.375&f=h - pv 968690, author Christoph Hellwig , rv vapo - remove unessecary vfs argument to DM_EVENT_ENABLED fs/xfs/xfs_rename.c - 1.71 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_rename.c.diff?r1=text&tr1=1.71&r2=text&tr2=1.70&f=h - pv 968690, author Christoph Hellwig , rv vapo - remove unessecary vfs argument to DM_EVENT_ENABLED fs/xfs/linux-2.6/xfs_lrw.c - 1.262 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_lrw.c.diff?r1=text&tr1=1.262&r2=text&tr2=1.261&f=h - pv 968690, author Christoph Hellwig , rv vapo - remove unessecary vfs argument to DM_EVENT_ENABLED. fs/xfs/linux-2.6/xfs_file.c - 1.151 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_file.c.diff?r1=text&tr1=1.151&r2=text&tr2=1.150&f=h - pv 968690, author Christoph Hellwig , rv vapo - remove unessecary vfs argument to DM_EVENT_ENABLED fs/xfs/dmapi/xfs_dm.c - 1.41 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm.c.diff?r1=text&tr1=1.41&r2=text&tr2=1.40&f=h - pv 968690, author Christoph Hellwig , rv vapo - remove unessecary vfs argument to DM_EVENT_ENABLED From owner-xfs@oss.sgi.com Sun Aug 5 23:43:08 2007 Received: with ECARTIS (v1.0.0; list xfs); Sun, 05 Aug 2007 23:43:11 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l766h4bm012069 for ; Sun, 5 Aug 2007 23:43:07 -0700 Received: from [134.14.55.89] (soarer.melbourne.sgi.com [134.14.55.89]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id QAA27300; Mon, 6 Aug 2007 16:43:03 +1000 Message-ID: <46B6C374.8000808@sgi.com> Date: Mon, 06 Aug 2007 16:45:08 +1000 From: Vlad Apostolov User-Agent: Thunderbird 1.5.0.12 (X11/20070509) MIME-Version: 1.0 To: sgi.bugs.xfs@engr.sgi.com CC: linux-xfs@oss.sgi.com Subject: TAKE 968691 - dmapi: simplify slab cache creation Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12468 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: vapo@sgi.com Precedence: bulk X-list: xfs Date: Mon Aug 6 16:40:14 AEST 2007 Workarea: soarer.melbourne.sgi.com:/home/vapo/isms/linux-xfs-patch-reviews Inspected by: vapo The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: linux-melb:dmapi:29343a fs/dmapi/dmapi_mountinfo.c - 1.31 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/linux-2.6-xfs/fs/dmapi/dmapi_mountinfo.c.diff?r1=text&tr1=1.31&r2=text&tr2=1.30&f=h - pv 968691, author Christoph Hellwig , rv vapo - dmapi: simplify slab cache creation fs/dmapi/dmapi_sysent.c - 1.38 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/linux-2.6-xfs/fs/dmapi/dmapi_sysent.c.diff?r1=text&tr1=1.38&r2=text&tr2=1.37&f=h - pv 968691, author Christoph Hellwig , rv vapo - dmapi: simplify slab cache creation From owner-xfs@oss.sgi.com Mon Aug 6 06:54:11 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 06 Aug 2007 06:54:18 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-5.2 required=5.0 tests=AWL,BAYES_50, RCVD_IN_DNSWL_MED,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l76Ds9bm028490 for ; Mon, 6 Aug 2007 06:54:11 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l76Ds4k2031806; Mon, 6 Aug 2007 09:54:04 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l76Ds48l017071; Mon, 6 Aug 2007 09:54:04 -0400 Received: from dantu.rdu.redhat.com (dantu.rdu.redhat.com [172.16.57.196]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l76Ds3Yv007097; Mon, 6 Aug 2007 09:54:03 -0400 Received: from dantu.rdu.redhat.com (localhost.localdomain [127.0.0.1]) by dantu.rdu.redhat.com (8.14.1/8.13.8) with ESMTP id l76Ds3vb002256; Mon, 6 Aug 2007 09:54:03 -0400 Received: (from jlayton@localhost) by dantu.rdu.redhat.com (8.14.1/8.14.1/Submit) id l76Ds3mU002255; Mon, 6 Aug 2007 09:54:03 -0400 Date: Mon, 6 Aug 2007 09:54:03 -0400 Message-Id: <200708061354.l76Ds3mU002255@dantu.rdu.redhat.com> From: Jeff Layton Subject: [PATCH 00/25] move handling of setuid/gid bits from VFS into individual setattr functions (RESEND) To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12470 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jlayton@redhat.com Precedence: bulk X-list: xfs Apologies for the resend, but the original sending had the date in the email header and it caused some of these to bounce... ( Please consider trimming the Cc list if discussing some aspect of this that doesn't concern everyone.) When an unprivileged process attempts to modify a file that has the setuid or setgid bits set, the VFS will attempt to clear these bits. The VFS will set the ATTR_KILL_SUID or ATTR_KILL_SGID bits in the ia_valid mask, and then call notify_change to clear these bits and set the mode accordingly. With a networked filesystem (NFS in particular but most likely others), the client machine may not have credentials that allow for the clearing of these bits. In some situations, this can lead to file corruption, or to an operation failing outright because the setattr fails. In this situation, we'd like to just leave the handling of this to the server and ignore these bits. The problem is that by the time nfs_setattr is called, the VFS has already reinterpreted the ATTR_KILL_* bits into a mode change. We can't fix this in the filesystems where this is a problem, as doing so would leave us having to second-guess what the VFS wants us to do. So we need to change it so that filesystems have more flexibility in how to interpret the ATTR_KILL_* bits. The first patch in the following patchset moves this logic into a helper function, and then only calls this helper function for inodes that do not have a setattr operation defined. The subsequent patches fix up individual filesystem setattr functions to call this helper function. The upshot of this is that with this change, filesystems that define a setattr inode operation are now responsible for handling the ATTR_KILL bits as well. They can trivially do so by calling the helper, but they must do so. Some of the follow-on patches may not be strictly necessary, but I decided that it was better to take the conservative approach and call the helper when I wasn't sure. I've tried to CC the maintainers for the individual filesystems as well where I could find them, please let me know if there are others who should be informed. Comments and suggestions appreciated... Signed-off-by: Jeff Layton From owner-xfs@oss.sgi.com Mon Aug 6 06:54:12 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 06 Aug 2007 06:54:17 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,J_CHICKENPOX_46, RCVD_IN_DNSWL_MED,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l76DsAbm028500 for ; Mon, 6 Aug 2007 06:54:12 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l76Ds87T031853; Mon, 6 Aug 2007 09:54:08 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l76Ds7PT017116; Mon, 6 Aug 2007 09:54:07 -0400 Received: from dantu.rdu.redhat.com (dantu.rdu.redhat.com [172.16.57.196]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l76Ds7nv007110; Mon, 6 Aug 2007 09:54:07 -0400 Received: from dantu.rdu.redhat.com (localhost.localdomain [127.0.0.1]) by dantu.rdu.redhat.com (8.14.1/8.13.8) with ESMTP id l76Ds6Y3002261; Mon, 6 Aug 2007 09:54:06 -0400 Received: (from jlayton@localhost) by dantu.rdu.redhat.com (8.14.1/8.14.1/Submit) id l76Ds6sq002260; Mon, 6 Aug 2007 09:54:06 -0400 Date: Mon, 6 Aug 2007 09:54:06 -0400 Message-Id: <200708061354.l76Ds6sq002260@dantu.rdu.redhat.com> From: Jeff Layton Subject: [PATCH 01/25] VFS: move attr_kill logic from notify_change into helper function To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12469 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jlayton@redhat.com Precedence: bulk X-list: xfs Separate the handling of the local ia_valid bitmask from the one in attr->ia_valid. This allows us to hand off the actual handling of the ATTR_KILL_* flags to the .setattr i_op when one is defined. notify_change still needs to process those flags for the local ia_valid variable, since it uses that to decide whether to return early, and to pass a (hopefully) appropriate bitmask to fsnotify_change. Signed-off-by: Jeff Layton --- fs/attr.c | 54 +++++++++++++++++++++++++++++++++------------------ include/linux/fs.h | 1 + 2 files changed, 36 insertions(+), 19 deletions(-) diff --git a/fs/attr.c b/fs/attr.c index f8dfc22..47015e0 100644 --- a/fs/attr.c +++ b/fs/attr.c @@ -100,15 +100,39 @@ int inode_setattr(struct inode * inode, struct iattr * attr) } EXPORT_SYMBOL(inode_setattr); +void attr_kill_to_mode(struct inode *inode, struct iattr *attr) +{ + if (attr->ia_valid & ATTR_KILL_SUID) { + attr->ia_valid &= ~ATTR_KILL_SUID; + if (inode->i_mode & S_ISUID) { + if (!(attr->ia_valid & ATTR_MODE)) { + attr->ia_valid |= ATTR_MODE; + attr->ia_mode = inode->i_mode; + } + attr->ia_mode &= ~S_ISUID; + } + } + if (attr->ia_valid & ATTR_KILL_SGID) { + attr->ia_valid &= ~ATTR_KILL_SGID; + if ((inode->i_mode & (S_ISGID | S_IXGRP)) == + (S_ISGID | S_IXGRP)) { + if (!(attr->ia_valid & ATTR_MODE)) { + attr->ia_valid |= ATTR_MODE; + attr->ia_mode = inode->i_mode; + } + attr->ia_mode &= ~S_ISGID; + } + } +} +EXPORT_SYMBOL(attr_kill_to_mode); + int notify_change(struct dentry * dentry, struct iattr * attr) { struct inode *inode = dentry->d_inode; - mode_t mode; int error; struct timespec now; unsigned int ia_valid = attr->ia_valid; - mode = inode->i_mode; now = current_fs_time(inode->i_sb); attr->ia_ctime = now; @@ -117,26 +141,17 @@ int notify_change(struct dentry * dentry, struct iattr * attr) if (!(ia_valid & ATTR_MTIME_SET)) attr->ia_mtime = now; if (ia_valid & ATTR_KILL_SUID) { - attr->ia_valid &= ~ATTR_KILL_SUID; - if (mode & S_ISUID) { - if (!(ia_valid & ATTR_MODE)) { - ia_valid = attr->ia_valid |= ATTR_MODE; - attr->ia_mode = inode->i_mode; - } - attr->ia_mode &= ~S_ISUID; - } + ia_valid &= ~ATTR_KILL_SUID; + if (inode->i_mode & S_ISUID) + ia_valid |= ATTR_MODE; } if (ia_valid & ATTR_KILL_SGID) { - attr->ia_valid &= ~ ATTR_KILL_SGID; - if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) { - if (!(ia_valid & ATTR_MODE)) { - ia_valid = attr->ia_valid |= ATTR_MODE; - attr->ia_mode = inode->i_mode; - } - attr->ia_mode &= ~S_ISGID; - } + ia_valid &= ~ATTR_KILL_SGID; + if ((inode->i_mode & (S_ISGID | S_IXGRP)) == + (S_ISGID | S_IXGRP)) + ia_valid |= ATTR_MODE; } - if (!attr->ia_valid) + if (!ia_valid) return 0; if (ia_valid & ATTR_SIZE) @@ -147,6 +162,7 @@ int notify_change(struct dentry * dentry, struct iattr * attr) if (!error) error = inode->i_op->setattr(dentry, attr); } else { + attr_kill_to_mode(inode, attr); error = inode_change_ok(inode, attr); if (!error) error = security_inode_setattr(dentry, attr); diff --git a/include/linux/fs.h b/include/linux/fs.h index d33bead..f617b23 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1561,6 +1561,7 @@ extern int do_remount_sb(struct super_block *sb, int flags, #ifdef CONFIG_BLOCK extern sector_t bmap(struct inode *, sector_t); #endif +extern void attr_kill_to_mode(struct inode *inode, struct iattr *attr); extern int notify_change(struct dentry *, struct iattr *); extern int permission(struct inode *, int, struct nameidata *); extern int generic_permission(struct inode *, int, -- 1.5.2.2 From owner-xfs@oss.sgi.com Mon Aug 6 06:55:18 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 06 Aug 2007 06:55:23 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_MED,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l76DtFbm028954 for ; Mon, 6 Aug 2007 06:55:17 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l76DtGpf000476; Mon, 6 Aug 2007 09:55:16 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l76DtGYA017853; Mon, 6 Aug 2007 09:55:16 -0400 Received: from dantu.rdu.redhat.com (dantu.rdu.redhat.com [172.16.57.196]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l76DtFSS007797; Mon, 6 Aug 2007 09:55:16 -0400 Received: from dantu.rdu.redhat.com (localhost.localdomain [127.0.0.1]) by dantu.rdu.redhat.com (8.14.1/8.13.8) with ESMTP id l76DtFYU002382; Mon, 6 Aug 2007 09:55:15 -0400 Received: (from jlayton@localhost) by dantu.rdu.redhat.com (8.14.1/8.14.1/Submit) id l76DtFVO002381; Mon, 6 Aug 2007 09:55:15 -0400 Date: Mon, 6 Aug 2007 09:55:15 -0400 Message-Id: <200708061355.l76DtFVO002381@dantu.rdu.redhat.com> From: Jeff Layton Subject: [PATCH 23/25] XFS: call attr_kill_to_mode from xfs_vn_setattr To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: xfs@oss.sgi.com X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12471 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jlayton@redhat.com Precedence: bulk X-list: xfs ..and only save off ia_valid after it returns Signed-off-by: Jeff Layton --- fs/xfs/linux-2.6/xfs_iops.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 0b5fa12..67fba53 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c @@ -651,12 +651,15 @@ xfs_vn_setattr( struct iattr *attr) { struct inode *inode = dentry->d_inode; - unsigned int ia_valid = attr->ia_valid; + unsigned int ia_valid; bhv_vnode_t *vp = vn_from_inode(inode); bhv_vattr_t vattr = { 0 }; int flags = 0; int error; + attr_kill_to_mode(inode, attr); + ia_valid = attr->ia_valid; + if (ia_valid & ATTR_UID) { vattr.va_mask |= XFS_AT_UID; vattr.va_uid = attr->ia_uid; -- 1.5.2.2 From owner-xfs@oss.sgi.com Mon Aug 6 07:54:19 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 06 Aug 2007 07:54:23 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=AWL,BAYES_00, DATE_IN_PAST_96_XX,RCVD_IN_DNSWL_MED,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l76EsIbm014916 for ; Mon, 6 Aug 2007 07:54:19 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l76DIWhZ006286; Mon, 6 Aug 2007 09:18:32 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l76DIVJ2030684; Mon, 6 Aug 2007 09:18:31 -0400 Received: from dantu.rdu.redhat.com (dantu.rdu.redhat.com [172.16.57.196]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l76DIVLd027246; Mon, 6 Aug 2007 09:18:31 -0400 Received: from dantu.rdu.redhat.com (localhost.localdomain [127.0.0.1]) by dantu.rdu.redhat.com (8.14.1/8.13.8) with ESMTP id l76DIVGA001788; Mon, 6 Aug 2007 09:18:31 -0400 Received: (from jlayton@localhost) by dantu.rdu.redhat.com (8.14.1/8.14.1/Submit) id l76DIVoF001787; Mon, 6 Aug 2007 09:18:31 -0400 Message-Id: <200708061318.l76DIVoF001787@dantu.rdu.redhat.com> From: Jeff Layton Date: Tue, 24 Jul 2007 13:22:34 -0400 Subject: [PATCH 23/25] XFS: call attr_kill_to_mode from xfs_vn_setattr To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: xfs@oss.sgi.com X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12472 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jlayton@redhat.com Precedence: bulk X-list: xfs ..and only save off ia_valid after it returns Signed-off-by: Jeff Layton --- fs/xfs/linux-2.6/xfs_iops.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 0b5fa12..67fba53 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c @@ -651,12 +651,15 @@ xfs_vn_setattr( struct iattr *attr) { struct inode *inode = dentry->d_inode; - unsigned int ia_valid = attr->ia_valid; + unsigned int ia_valid; bhv_vnode_t *vp = vn_from_inode(inode); bhv_vattr_t vattr = { 0 }; int flags = 0; int error; + attr_kill_to_mode(inode, attr); + ia_valid = attr->ia_valid; + if (ia_valid & ATTR_UID) { vattr.va_mask |= XFS_AT_UID; vattr.va_uid = attr->ia_uid; -- 1.5.2.2 From owner-xfs@oss.sgi.com Mon Aug 6 07:56:44 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 06 Aug 2007 07:56:50 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-5.1 required=5.0 tests=AWL,BAYES_00, DATE_IN_PAST_96_XX,J_CHICKENPOX_46,RCVD_IN_DNSWL_MED,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l76Euebo015851 for ; Mon, 6 Aug 2007 07:56:44 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l76DHjCg005693; Mon, 6 Aug 2007 09:17:45 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l76DHjix030281; Mon, 6 Aug 2007 09:17:45 -0400 Received: from dantu.rdu.redhat.com (dantu.rdu.redhat.com [172.16.57.196]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l76DHisx026914; Mon, 6 Aug 2007 09:17:44 -0400 Received: from dantu.rdu.redhat.com (localhost.localdomain [127.0.0.1]) by dantu.rdu.redhat.com (8.14.1/8.13.8) with ESMTP id l76DHiE9001661; Mon, 6 Aug 2007 09:17:44 -0400 Received: (from jlayton@localhost) by dantu.rdu.redhat.com (8.14.1/8.14.1/Submit) id l76DHivu001660; Mon, 6 Aug 2007 09:17:44 -0400 Message-Id: <200708061317.l76DHivu001660@dantu.rdu.redhat.com> From: Jeff Layton Date: Wed, 25 Jul 2007 12:47:28 -0400 Subject: [PATCH 01/25] VFS: move attr_kill logic from notify_change into helper function To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12474 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jlayton@redhat.com Precedence: bulk X-list: xfs Separate the handling of the local ia_valid bitmask from the one in attr->ia_valid. This allows us to hand off the actual handling of the ATTR_KILL_* flags to the .setattr i_op when one is defined. notify_change still needs to process those flags for the local ia_valid variable, since it uses that to decide whether to return early, and to pass a (hopefully) appropriate bitmask to fsnotify_change. Signed-off-by: Jeff Layton --- fs/attr.c | 54 +++++++++++++++++++++++++++++++++------------------ include/linux/fs.h | 1 + 2 files changed, 36 insertions(+), 19 deletions(-) diff --git a/fs/attr.c b/fs/attr.c index f8dfc22..47015e0 100644 --- a/fs/attr.c +++ b/fs/attr.c @@ -100,15 +100,39 @@ int inode_setattr(struct inode * inode, struct iattr * attr) } EXPORT_SYMBOL(inode_setattr); +void attr_kill_to_mode(struct inode *inode, struct iattr *attr) +{ + if (attr->ia_valid & ATTR_KILL_SUID) { + attr->ia_valid &= ~ATTR_KILL_SUID; + if (inode->i_mode & S_ISUID) { + if (!(attr->ia_valid & ATTR_MODE)) { + attr->ia_valid |= ATTR_MODE; + attr->ia_mode = inode->i_mode; + } + attr->ia_mode &= ~S_ISUID; + } + } + if (attr->ia_valid & ATTR_KILL_SGID) { + attr->ia_valid &= ~ATTR_KILL_SGID; + if ((inode->i_mode & (S_ISGID | S_IXGRP)) == + (S_ISGID | S_IXGRP)) { + if (!(attr->ia_valid & ATTR_MODE)) { + attr->ia_valid |= ATTR_MODE; + attr->ia_mode = inode->i_mode; + } + attr->ia_mode &= ~S_ISGID; + } + } +} +EXPORT_SYMBOL(attr_kill_to_mode); + int notify_change(struct dentry * dentry, struct iattr * attr) { struct inode *inode = dentry->d_inode; - mode_t mode; int error; struct timespec now; unsigned int ia_valid = attr->ia_valid; - mode = inode->i_mode; now = current_fs_time(inode->i_sb); attr->ia_ctime = now; @@ -117,26 +141,17 @@ int notify_change(struct dentry * dentry, struct iattr * attr) if (!(ia_valid & ATTR_MTIME_SET)) attr->ia_mtime = now; if (ia_valid & ATTR_KILL_SUID) { - attr->ia_valid &= ~ATTR_KILL_SUID; - if (mode & S_ISUID) { - if (!(ia_valid & ATTR_MODE)) { - ia_valid = attr->ia_valid |= ATTR_MODE; - attr->ia_mode = inode->i_mode; - } - attr->ia_mode &= ~S_ISUID; - } + ia_valid &= ~ATTR_KILL_SUID; + if (inode->i_mode & S_ISUID) + ia_valid |= ATTR_MODE; } if (ia_valid & ATTR_KILL_SGID) { - attr->ia_valid &= ~ ATTR_KILL_SGID; - if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) { - if (!(ia_valid & ATTR_MODE)) { - ia_valid = attr->ia_valid |= ATTR_MODE; - attr->ia_mode = inode->i_mode; - } - attr->ia_mode &= ~S_ISGID; - } + ia_valid &= ~ATTR_KILL_SGID; + if ((inode->i_mode & (S_ISGID | S_IXGRP)) == + (S_ISGID | S_IXGRP)) + ia_valid |= ATTR_MODE; } - if (!attr->ia_valid) + if (!ia_valid) return 0; if (ia_valid & ATTR_SIZE) @@ -147,6 +162,7 @@ int notify_change(struct dentry * dentry, struct iattr * attr) if (!error) error = inode->i_op->setattr(dentry, attr); } else { + attr_kill_to_mode(inode, attr); error = inode_change_ok(inode, attr); if (!error) error = security_inode_setattr(dentry, attr); diff --git a/include/linux/fs.h b/include/linux/fs.h index d33bead..f617b23 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1561,6 +1561,7 @@ extern int do_remount_sb(struct super_block *sb, int flags, #ifdef CONFIG_BLOCK extern sector_t bmap(struct inode *, sector_t); #endif +extern void attr_kill_to_mode(struct inode *inode, struct iattr *attr); extern int notify_change(struct dentry *, struct iattr *); extern int permission(struct inode *, int, struct nameidata *); extern int generic_permission(struct inode *, int, -- 1.5.2.2 From owner-xfs@oss.sgi.com Mon Aug 6 07:56:42 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 06 Aug 2007 07:56:49 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-5.2 required=5.0 tests=AWL,BAYES_00, DATE_IN_PAST_96_XX,RCVD_IN_DNSWL_MED,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l76Euebm015851 for ; Mon, 6 Aug 2007 07:56:42 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l76DHhLM005671; Mon, 6 Aug 2007 09:17:43 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l76DHgiH030274; Mon, 6 Aug 2007 09:17:42 -0400 Received: from dantu.rdu.redhat.com (dantu.rdu.redhat.com [172.16.57.196]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l76DHgkN026903; Mon, 6 Aug 2007 09:17:42 -0400 Received: from dantu.rdu.redhat.com (localhost.localdomain [127.0.0.1]) by dantu.rdu.redhat.com (8.14.1/8.13.8) with ESMTP id l76DHgH6001654; Mon, 6 Aug 2007 09:17:42 -0400 Received: (from jlayton@localhost) by dantu.rdu.redhat.com (8.14.1/8.14.1/Submit) id l76DHc8e001653; Mon, 6 Aug 2007 09:17:38 -0400 Message-Id: <200708061317.l76DHc8e001653@dantu.rdu.redhat.com> From: Jeff Layton Date: Wed, 25 Jul 2007 12:47:28 -0400 Subject: [PATCH 00/25] move handling of setuid/gid bits from VFS into individual setattr functions To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12473 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jlayton@redhat.com Precedence: bulk X-list: xfs ( Please consider trimming the Cc list if discussing some aspect of this that doesn't concern everyone ) When an unprivileged process attempts to modify a file that has the setuid or setgid bits set, the VFS will attempt to clear these bits. The VFS will set the ATTR_KILL_SUID or ATTR_KILL_SGID bits in the ia_valid mask, and then call notify_change to clear these bits and set the mode accordingly. With a networked filesystem (NFS in particular but most likely others), the client machine may not have credentials that allow for the clearing of these bits. In some situations, this can lead to file corruption, or to an operation failing outright because the setattr fails. In this situation, we'd like to just leave the handling of this to the server and ignore these bits. The problem is that by the time nfs_setattr is called, the VFS has already reinterpreted the ATTR_KILL_* bits into a mode change. We can't fix this in the filesystems where this is a problem, as doing so would leave us having to second-guess what the VFS wants us to do. So we need to change it so that filesystems have more flexibility in how to interpret the ATTR_KILL_* bits. The first patch in the following patchset moves this logic into a helper function, and then only calls this helper function for inodes that do not have a setattr operation defined. The subsequent patches fix up individual filesystem setattr functions to call this helper function. The upshot of this is that with this change, filesystems that define a setattr inode operation are now responsible for handling the ATTR_KILL bits as well. They can trivially do so by calling the helper, but they must do so. Some of the follow-on patches may not be strictly necessary, but I decided that it was better to take the conservative approach and call the helper when I wasn't sure. I've tried to CC the maintainers for the individual filesystems as well where I could find them, please let me know if there are others who should be informed. Comments and suggestions appreciated... Signed-off-by: Jeff Layton From owner-xfs@oss.sgi.com Mon Aug 6 10:50:21 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 06 Aug 2007 10:50:30 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail-gw2.sa.eol.hu (mail-gw2.sa.eol.hu [212.108.200.109]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l76HoIbm005896 for ; Mon, 6 Aug 2007 10:50:21 -0700 Received: from dorka.pomaz.szeredi.hu (224-083.adsl.pool.ew.hu [193.226.224.83]) by mail-gw2.sa.eol.hu (mu) with ESMTP id l76HiStA001227; Mon, 6 Aug 2007 19:44:33 +0200 Received: from miko by dorka.pomaz.szeredi.hu with local (Exim 3.36 #1 (Debian)) id 1II6cM-0004yj-00; Mon, 06 Aug 2007 19:43:46 +0200 To: jlayton@redhat.com CC: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, codalist@TELEMANN.coda.cs.cmu.edu, cluster-devel@redhat.com, jfs-discussion@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, zippel@linux-m68k.org, xfs@oss.sgi.com, joel.becker@oracle.com, wli@holomorphy.com, reiserfs-devel@vger.kernel.org, dhowells@redhat.com, fuse-devel@lists.sourceforge.net, jffs-dev@axis.com, user-mode-linux-user@lists.sourceforge.net, v9fs-developer@lists.sourceforge.net, linux-ext4@vger.kernel.org, linux-cifs-client@lists.samba.org, ocfs2-devel@oss.oracle.com, bfennema@falcon.csc.calpoly.edu In-reply-to: <200708061354.l76Ds6sq002260@dantu.rdu.redhat.com> (message from Jeff Layton on Mon, 6 Aug 2007 09:54:06 -0400) Subject: Re: [fuse-devel] [PATCH 01/25] VFS: move attr_kill logic from notify_change into helper function References: <200708061354.l76Ds6sq002260@dantu.rdu.redhat.com> Message-Id: From: Miklos Szeredi Date: Mon, 06 Aug 2007 19:43:46 +0200 X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12475 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: miklos@szeredi.hu Precedence: bulk X-list: xfs > Separate the handling of the local ia_valid bitmask from the one in > attr->ia_valid. This allows us to hand off the actual handling of the > ATTR_KILL_* flags to the .setattr i_op when one is defined. > > notify_change still needs to process those flags for the local ia_valid > variable, since it uses that to decide whether to return early, and to pass > a (hopefully) appropriate bitmask to fsnotify_change. I agree with this change and fuse will make use of it as well. Maybe instead of unconditionally moving attr_kill_to_mode() inside ->setattr() it could be made conditional based on an inode flag similarly to S_NOCMTIME. Advantages: - no need to modify a lot of in-tree filesystems - no silent breakage of out-of-tree fs Actually I think the new flag would be used by exacly the same filesystems as S_NOCMTIME, so maybe it would make sense to rename S_NOCMTIME to something more generic (S_NOATTRUPDATE or whatever) and use that. But that could still break out-of-tree fs, so a separate flag is probably better. Miklos From owner-xfs@oss.sgi.com Mon Aug 6 11:14:12 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 06 Aug 2007 11:14:18 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_MED,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l76IE9bm013784 for ; Mon, 6 Aug 2007 11:14:11 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l76IDarr030424; Mon, 6 Aug 2007 14:13:36 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l76IDaHl008738; Mon, 6 Aug 2007 14:13:36 -0400 Received: from tleilax.poochiereds.net (vpn-14-58.rdu.redhat.com [10.11.14.58]) by pobox.corp.redhat.com (8.13.1/8.13.1) with SMTP id l76IDYio003449; Mon, 6 Aug 2007 14:13:34 -0400 Date: Mon, 6 Aug 2007 14:13:33 -0400 From: Jeff Layton To: Miklos Szeredi Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, codalist@TELEMANN.coda.cs.cmu.edu, cluster-devel@redhat.com, jfs-discussion@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, zippel@linux-m68k.org, xfs@oss.sgi.com, joel.becker@oracle.com, wli@holomorphy.com, reiserfs-devel@vger.kernel.org, dhowells@redhat.com, fuse-devel@lists.sourceforge.net, jffs-dev@axis.com, user-mode-linux-user@lists.sourceforge.net, v9fs-developer@lists.sourceforge.net, linux-ext4@vger.kernel.org, linux-cifs-client@lists.samba.org, ocfs2-devel@oss.oracle.com, bfennema@falcon.csc.calpoly.edu Subject: Re: [fuse-devel] [PATCH 01/25] VFS: move attr_kill logic from notify_change into helper function Message-Id: <20070806141333.0f54ab17.jlayton@redhat.com> In-Reply-To: References: <200708061354.l76Ds6sq002260@dantu.rdu.redhat.com> X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.14; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12476 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jlayton@redhat.com Precedence: bulk X-list: xfs On Mon, 06 Aug 2007 19:43:46 +0200 Miklos Szeredi wrote: > > Separate the handling of the local ia_valid bitmask from the one in > > attr->ia_valid. This allows us to hand off the actual handling of the > > ATTR_KILL_* flags to the .setattr i_op when one is defined. > > > > notify_change still needs to process those flags for the local ia_valid > > variable, since it uses that to decide whether to return early, and to pass > > a (hopefully) appropriate bitmask to fsnotify_change. > > I agree with this change and fuse will make use of it as well. > > Maybe instead of unconditionally moving attr_kill_to_mode() inside > ->setattr() it could be made conditional based on an inode flag > similarly to S_NOCMTIME. Advantages: > > - no need to modify a lot of in-tree filesystems > - no silent breakage of out-of-tree fs > > Actually I think the new flag would be used by exacly the same > filesystems as S_NOCMTIME, so maybe it would make sense to rename > S_NOCMTIME to something more generic (S_NOATTRUPDATE or whatever) and > use that. > > But that could still break out-of-tree fs, so a separate flag is > probably better. > In the past I've been told that adding new flags is something of a "last resort". Since it's not strictly necessary to fix this then it may be best to avoid that. That said, if the concensus is that we need a transition mechanism, then I'd be open to such a suggestion. -- Jeff Layton From owner-xfs@oss.sgi.com Mon Aug 6 11:29:16 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 06 Aug 2007 11:29:21 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail-gw3.sa.ew.hu (mail-gw3.sa.ew.hu [212.108.200.82]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l76ITEbm018293 for ; Mon, 6 Aug 2007 11:29:16 -0700 Received: from dorka.pomaz.szeredi.hu (224-083.adsl.pool.ew.hu [193.226.224.83]) by mail-gw3.sa.ew.hu (mu) with ESMTP id l76IS0JL029842; Mon, 6 Aug 2007 20:28:04 +0200 Received: from miko by dorka.pomaz.szeredi.hu with local (Exim 3.36 #1 (Debian)) id 1II7JR-0005BN-00; Mon, 06 Aug 2007 20:28:17 +0200 To: jlayton@redhat.com CC: miklos@szeredi.hu, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, codalist@telemann.coda.cs.cmu.edu, cluster-devel@redhat.com, jfs-discussion@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, zippel@linux-m68k.org, xfs@oss.sgi.com, joel.becker@oracle.com, wli@holomorphy.com, reiserfs-devel@vger.kernel.org, dhowells@redhat.com, fuse-devel@lists.sourceforge.net, jffs-dev@axis.com, user-mode-linux-user@lists.sourceforge.net, v9fs-developer@lists.sourceforge.net, linux-ext4@vger.kernel.org, linux-cifs-client@lists.samba.org, ocfs2-devel@oss.oracle.com, bfennema@falcon.csc.calpoly.edu In-reply-to: <20070806141333.0f54ab17.jlayton@redhat.com> (message from Jeff Layton on Mon, 6 Aug 2007 14:13:33 -0400) Subject: Re: [fuse-devel] [PATCH 01/25] VFS: move attr_kill logic from notify_change into helper function References: <200708061354.l76Ds6sq002260@dantu.rdu.redhat.com> <20070806141333.0f54ab17.jlayton@redhat.com> Message-Id: From: Miklos Szeredi Date: Mon, 06 Aug 2007 20:28:17 +0200 X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12477 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: miklos@szeredi.hu Precedence: bulk X-list: xfs > > I agree with this change and fuse will make use of it as well. > > > > Maybe instead of unconditionally moving attr_kill_to_mode() inside > > ->setattr() it could be made conditional based on an inode flag > > similarly to S_NOCMTIME. Advantages: > > > > - no need to modify a lot of in-tree filesystems > > - no silent breakage of out-of-tree fs > > > > Actually I think the new flag would be used by exacly the same > > filesystems as S_NOCMTIME, so maybe it would make sense to rename > > S_NOCMTIME to something more generic (S_NOATTRUPDATE or whatever) and > > use that. > > > > But that could still break out-of-tree fs, so a separate flag is > > probably better. > > > > In the past I've been told that adding new flags is something of a > "last resort". Since it's not strictly necessary to fix this then > it may be best to avoid that. > > That said, if the concensus is that we need a transition mechanism, > then I'd be open to such a suggestion. I think there's really no other choice here. Your patch is changing the API in a very unsafe way, since there will be no error or warning on an unconverted fs. And that could lead to security holes. If we would rename the setattr method to setattr_new as well as changing it's behavior, that would be fine. But I guess we do not want to do that. Miklos From owner-xfs@oss.sgi.com Mon Aug 6 12:26:04 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 06 Aug 2007 12:26:11 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from pat.uio.no (pat.uio.no [129.240.10.15]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l76JQ2bm007224 for ; Mon, 6 Aug 2007 12:26:04 -0700 Received: from mail-mx9.uio.no ([129.240.10.39]) by pat.uio.no with esmtp (Exim 4.67) (envelope-from ) id 1II7sz-00052h-1F; Mon, 06 Aug 2007 21:05:01 +0200 Received: from smtp.uio.no ([129.240.10.9] helo=mail-mx9.uio.no) by mail-mx9.uio.no with esmtp (Exim 4.67) (envelope-from ) id 1II7sw-0006Iw-Sj; Mon, 06 Aug 2007 21:04:59 +0200 Received: from c-69-242-210-120.hsd1.mi.comcast.net ([69.242.210.120] helo=[192.168.0.101]) by mail-mx9.uio.no with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.67) (envelope-from ) id 1II7sw-0006Ef-20; Mon, 06 Aug 2007 21:04:58 +0200 Subject: Re: [fuse-devel] [PATCH 01/25] VFS: move attr_kill logic from notify_change into helper function From: Trond Myklebust To: Miklos Szeredi Cc: jlayton@redhat.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, codalist@telemann.coda.cs.cmu.edu, cluster-devel@redhat.com, jfs-discussion@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, zippel@linux-m68k.org, xfs@oss.sgi.com, joel.becker@oracle.com, wli@holomorphy.com, reiserfs-devel@vger.kernel.org, dhowells@redhat.com, fuse-devel@lists.sourceforge.net, jffs-dev@axis.com, user-mode-linux-user@lists.sourceforge.net, v9fs-developer@lists.sourceforge.net, linux-ext4@vger.kernel.org, linux-cifs-client@lists.samba.org, ocfs2-devel@oss.oracle.com, bfennema@falcon.csc.calpoly.edu In-Reply-To: References: <200708061354.l76Ds6sq002260@dantu.rdu.redhat.com> <20070806141333.0f54ab17.jlayton@redhat.com> Content-Type: text/plain Date: Mon, 06 Aug 2007 15:04:23 -0400 Message-Id: <1186427063.6616.59.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-UiO-Resend: resent X-UiO-Spam-info: not spam, SpamAssassin (score=-0.1, required=12.0, autolearn=disabled, AWL=-0.072) X-UiO-Scanned: E871CF2CF44222422B0CA0EBF571F169B732228E X-UiO-SPAM-Test: remote_host: 129.240.10.9 spam_score: 0 maxlevel 200 minaction 2 bait 0 mail/h: 71 total 3121728 max/h 8345 blacklist 0 greylist 0 ratelimit 0 X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12478 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: trond.myklebust@fys.uio.no Precedence: bulk X-list: xfs On Mon, 2007-08-06 at 20:28 +0200, Miklos Szeredi wrote: > Your patch is changing the API in a very unsafe way, since there will > be no error or warning on an unconverted fs. And that could lead to > security holes. > > If we would rename the setattr method to setattr_new as well as > changing it's behavior, that would be fine. But I guess we do not > want to do that. Which "unconverted fses"? If we're talking out of tree stuff, then too bad: it is _their_ responsibility to keep up with kernel changes. Trond From owner-xfs@oss.sgi.com Mon Aug 6 12:38:12 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 06 Aug 2007 12:38:19 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail-gw3.sa.ew.hu (mail-gw3.sa.ew.hu [212.108.200.82]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l76Jc8bm011252 for ; Mon, 6 Aug 2007 12:38:11 -0700 Received: from dorka.pomaz.szeredi.hu (224-083.adsl.pool.ew.hu [193.226.224.83]) by mail-gw3.sa.ew.hu (mu) with ESMTP id l76Jag2u025483; Mon, 6 Aug 2007 21:36:46 +0200 Received: from miko by dorka.pomaz.szeredi.hu with local (Exim 3.36 #1 (Debian)) id 1II8Nw-0005XH-00; Mon, 06 Aug 2007 21:37:00 +0200 To: trond.myklebust@fys.uio.no CC: miklos@szeredi.hu, jlayton@redhat.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, codalist@telemann.coda.cs.cmu.edu, cluster-devel@redhat.com, jfs-discussion@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, zippel@linux-m68k.org, xfs@oss.sgi.com, joel.becker@oracle.com, wli@holomorphy.com, reiserfs-devel@vger.kernel.org, dhowells@redhat.com, fuse-devel@lists.sourceforge.net, jffs-dev@axis.com, user-mode-linux-user@lists.sourceforge.net, v9fs-developer@lists.sourceforge.net, linux-ext4@vger.kernel.org, linux-cifs-client@lists.samba.org, ocfs2-devel@oss.oracle.com, bfennema@falcon.csc.calpoly.edu In-reply-to: <1186427063.6616.59.camel@localhost> (message from Trond Myklebust on Mon, 06 Aug 2007 15:04:23 -0400) Subject: Re: [fuse-devel] [PATCH 01/25] VFS: move attr_kill logic from notify_change into helper function References: <200708061354.l76Ds6sq002260@dantu.rdu.redhat.com> <20070806141333.0f54ab17.jlayton@redhat.com> <1186427063.6616.59.camel@localhost> Message-Id: From: Miklos Szeredi Date: Mon, 06 Aug 2007 21:37:00 +0200 X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12479 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: miklos@szeredi.hu Precedence: bulk X-list: xfs > > Your patch is changing the API in a very unsafe way, since there will > > be no error or warning on an unconverted fs. And that could lead to > > security holes. > > > > If we would rename the setattr method to setattr_new as well as > > changing it's behavior, that would be fine. But I guess we do not > > want to do that. > > Which "unconverted fses"? If we're talking out of tree stuff, then too > bad: it is _their_ responsibility to keep up with kernel changes. It is usually a good idea to not change the semantics of an API in a backward incompatible way without changing the syntax as well. This is true regardless of whether we care about out-of-tree code or not (and we should care to some degree). And especially true if the change in question is security sensitive. Miklos From owner-xfs@oss.sgi.com Mon Aug 6 14:23:55 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 06 Aug 2007 14:24:08 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from pat.uio.no (pat.uio.no [129.240.10.15]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l76LNqbm008349 for ; Mon, 6 Aug 2007 14:23:54 -0700 Received: from mail-mx2.uio.no ([129.240.10.30]) by pat.uio.no with esmtp (Exim 4.67) (envelope-from ) id 1IIA3F-0006HQ-Sn; Mon, 06 Aug 2007 23:23:46 +0200 Received: from smtp.uio.no ([129.240.10.9] helo=mail-mx2.uio.no) by mail-mx2.uio.no with esmtp (Exim 4.67) (envelope-from ) id 1IIA3F-0004en-BV; Mon, 06 Aug 2007 23:23:45 +0200 Received: from c-69-242-210-120.hsd1.mi.comcast.net ([69.242.210.120] helo=[192.168.0.101]) by mail-mx2.uio.no with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.67) (envelope-from ) id 1IIA3E-0004ea-Kl; Mon, 06 Aug 2007 23:23:44 +0200 Subject: Re: [fuse-devel] [PATCH 01/25] VFS: move attr_kill logic from notify_change into helper function From: Trond Myklebust To: Miklos Szeredi Cc: jlayton@redhat.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, codalist@telemann.coda.cs.cmu.edu, cluster-devel@redhat.com, jfs-discussion@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, zippel@linux-m68k.org, xfs@oss.sgi.com, joel.becker@oracle.com, wli@holomorphy.com, reiserfs-devel@vger.kernel.org, dhowells@redhat.com, fuse-devel@lists.sourceforge.net, jffs-dev@axis.com, user-mode-linux-user@lists.sourceforge.net, v9fs-developer@lists.sourceforge.net, linux-ext4@vger.kernel.org, linux-cifs-client@lists.samba.org, ocfs2-devel@oss.oracle.com, bfennema@falcon.csc.calpoly.edu In-Reply-To: References: <200708061354.l76Ds6sq002260@dantu.rdu.redhat.com> <20070806141333.0f54ab17.jlayton@redhat.com> <1186427063.6616.59.camel@localhost> Content-Type: text/plain Date: Mon, 06 Aug 2007 17:23:39 -0400 Message-Id: <1186435419.6616.136.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-UiO-Resend: resent X-UiO-Spam-info: not spam, SpamAssassin (score=-0.1, required=12.0, autolearn=disabled, AWL=-0.052) X-UiO-Scanned: EE5CF09D8275BCAE529DFB845F42ED9BCB7A24FB X-UiO-SPAM-Test: remote_host: 129.240.10.9 spam_score: 0 maxlevel 200 minaction 2 bait 0 mail/h: 206 total 3123507 max/h 8345 blacklist 0 greylist 0 ratelimit 0 X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12480 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: trond.myklebust@fys.uio.no Precedence: bulk X-list: xfs On Mon, 2007-08-06 at 21:37 +0200, Miklos Szeredi wrote: > > > Your patch is changing the API in a very unsafe way, since there will > > > be no error or warning on an unconverted fs. And that could lead to > > > security holes. > > > > > > If we would rename the setattr method to setattr_new as well as > > > changing it's behavior, that would be fine. But I guess we do not > > > want to do that. > > > > Which "unconverted fses"? If we're talking out of tree stuff, then too > > bad: it is _their_ responsibility to keep up with kernel changes. > > It is usually a good idea to not change the semantics of an API in a > backward incompatible way without changing the syntax as well. We're taking two setattr flags ATTR_KILL_SGID, and ATTR_KILL_SUID which have existed for several years in the VFS, and making them visible to the filesystems. Out-of-tree filesystems that care can check for them in a completely backward compatible way: you don't even need to add a #define. > This is true regardless of whether we care about out-of-tree code or > not (and we should care to some degree). And especially true if the > change in question is security sensitive. It is not true "regardless": the in-tree code is being converted. Out-of-tree code is the only "problem" here, and their only problem is that they may have to add support for the new flags if they also support suid/sgid mode bits. Are you advocating reserving a new filesystem bit every time we need to add an attribute flag? Trond From owner-xfs@oss.sgi.com Tue Aug 7 02:20:57 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 02:21:01 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.182]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l779Kqbm009690 for ; Tue, 7 Aug 2007 02:20:57 -0700 Received: by wa-out-1112.google.com with SMTP id k22so2273633waf for ; Tue, 07 Aug 2007 02:20:57 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=JWplrwHnRlJcICuhaljd6M3xtOTNU9e5/W5ulwctRp/f6o+F1jm6cSUw8ljJM8DuwE4Xq873dzkbPt6LhlmATQ+p/af6j51euAFNg/gLfIZSmwa2zerp3Yf7k5rYWzWvIjhGu8rXZwZFiOyqNcS3Gm1BVT+6X4oLkjfetps9EPA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=k9B0+iv8ejFPm8+RBSBrm9iSC7dO/wKcqK4fxqTepIiaD1TL4oXZb4nsdyefR2HyAHGcNVHVL4O1niRbYiNgFmEQZ+vTr4VhL2MqrcS0t/btYQOXmNfWFt3kMCvJRBR/V5Bu7k0ky6oK7AMmQXL/0p64Bn4qtgBri6yo2kGNy1Q= Received: by 10.114.149.2 with SMTP id w2mr6556533wad.1186478456834; Tue, 07 Aug 2007 02:20:56 -0700 (PDT) Received: by 10.114.13.15 with HTTP; Tue, 7 Aug 2007 02:20:56 -0700 (PDT) Message-ID: <5d96567b0708070220u23c895ffk54849fca947b5100@mail.gmail.com> Date: Tue, 7 Aug 2007 12:20:56 +0300 From: Raz To: "David Chinner" Subject: Re: raid50 and 9TB volumes Cc: linux-xfs@oss.sgi.com In-Reply-To: <20070724010105.GN31489@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5d96567b0707160542t2144c382mbfe3da92f0990694@mail.gmail.com> <20070716130140.GC31489@sgi.com> <5d96567b0707160653m5951fac9v5a56bb4c92174d63@mail.gmail.com> <20070716221831.GE31489@sgi.com> <18076.1449.138328.66699@notabene.brown> <20070717001205.GI31489@sgi.com> <18076.4940.845633.149160@notabene.brown> <20070717005854.GL31489@sgi.com> <5d96567b0707222309y61480271xa8220a0b179764e0@mail.gmail.com> <20070724010105.GN31489@sgi.com> X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12481 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: raziebe@gmail.com Precedence: bulk X-list: xfs On 7/24/07, David Chinner wrote: > On Mon, Jul 23, 2007 at 09:09:03AM +0300, Raz wrote: > > My QA to re-installed the system. same kernel, different results. now, > > /proc/paritions > > reports : > > 9 1 5114281984 md1 > > 9 2 5128001536 md2 > > 9 3 10242281472 md3 > > > > blockdev --getsize64 /dev/md3 > > 10488096227328 > > > > but xfs keeps on crashing. when formatting it ot 6.3 TB we're OK. when > > letting xfs's mkfs choose the > > So at 6.3TB everything is ok. At what point does it start having > problems? 6.4TB, 6.8TB, 8TB, 9TB? over 8 TB. we checked several times. in 8.5 it crashes. > I know Neil pointed out that you shouldn't have 10TB but closer to > 7TB - is this true? the drives are of 750 GB each. > Cheers, > > Dave. > -- > Dave Chinner > Principal Engineer > SGI Australian Software Group > -- Raz From owner-xfs@oss.sgi.com Tue Aug 7 07:27:38 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 07:27:43 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: ** X-Spam-Status: No, score=2.0 required=5.0 tests=AWL,BAYES_50 autolearn=ham version=3.2.0-pre1-r499012 Received: from m01.elite.ru (m01.elite.ru [89.108.83.249]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l77ERZbm006911 for ; Tue, 7 Aug 2007 07:27:37 -0700 Received: from ethaniel (195.225.129.41 [195.225.129.41]) by m01.elite.ru (ISMS) with ESMTP id 51E52116A8 for ; Tue, 7 Aug 2007 18:10:15 +0400 (MSD) Date: Tue, 7 Aug 2007 18:10:22 +0400 From: Arkadiy Kulev X-Mailer: The Bat! (v3.99.3) Professional Reply-To: Arkadiy Kulev X-Priority: 3 (Normal) Message-ID: <337047880.20070807181022@ethaniel.com> To: xfs@oss.sgi.com Subject: many subdirectories, slow search. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12482 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: eth@ethaniel.com Precedence: bulk X-list: xfs Hello xfs, I have a external SATA storage, that is connected to my server via SCSI HBA. The server is a 32 bit core2duo with 1gb RAM. The server is used for storing millions of images that are accessed randomly (around 50-100 queries per second, total of 2-3 megabytes per second). I started noticing, that images are being accessed slowly (high lag of 5-10 seconds). Even when I connect via ssh and do "ls /data1" for instance (/data1 is my 2 terabyte xfs partition) it gives me a result only after a few seconds, even though the root folder is not big. I suppose that I am storing images incorrectly - placing images from the same group (album) to different folders: albums/00/00/1130000-h200.jpg .... albums/45/87/2334587-h200.jpg albums/45/87/2334587-10x10.jpg .... albums/99/99/5679999-h200.jpg (album subtree depends on the last 4 digits of photo id) I am asking for your advice as gurus. Is it better to place all images that are accessed from the same webpage (ordered access in other terms) in the same folder? Or it doesn't matter? Maybe there is some way of better storing of images? Switching to SCSI disks is not an option. Any ideas? Maybe I tuned ocfs2 wrong? meta-data=/dev/sdb1 isize=256 agcount=32, agsize=15258737 blks = sectsz=512 attr=0 data = bsize=4096 blocks=488279584, imaxpct=25 = sunit=0 swidth=0 blks, unwritten=1 naming =version 2 bsize=4096 log =internal bsize=4096 blocks=32768, version=1 = sectsz=512 sunit=0 blks, lazy-count=0 realtime =none extsz=65536 blocks=0, rtextents=0 -- Best regards, Arkadiy mailto:eth@ethaniel.com From owner-xfs@oss.sgi.com Tue Aug 7 13:19:40 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 13:19:43 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.251]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l77KJabm023283 for ; Tue, 7 Aug 2007 13:19:39 -0700 Received: by an-out-0708.google.com with SMTP id c38so404798ana for ; Tue, 07 Aug 2007 13:19:41 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=MtO6G1PKLw0G/Wto5smgDowwn0+yVj0MEvEABncwxrQeTHPPua9KzY2JOoIckD9Hxi+givvzngmoJ+JJCuG5xthjXPsJZxyOs+i9vtDaE/mWzvCDQxWFDPZCcDDpfCtrLlYjjR78OMryKktFWGuMh23mn7OWpIa5pj9T9tAz6H8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=gHybSHdWHrExFiLezCGjft+cn2I+i1Ki9lGe0V1FoRuBAoOYVskO2sf+DBSin1w4ENIeg8ogkt4zNYJho9hlJdxLmZ+cUqZdz2zltUFSSj3nU3coX6Ue2/+KBhS3Pc4xal+WOfMDx2QlxpPjs0W2356JMc/U1Sj8J02mrIvBnSs= Received: by 10.100.93.5 with SMTP id q5mr4125952anb.1186516300863; Tue, 07 Aug 2007 12:51:40 -0700 (PDT) Received: by 10.100.96.1 with HTTP; Tue, 7 Aug 2007 12:51:40 -0700 (PDT) Message-ID: <9a8748490708071251l72d1e564u3f0d3bd5b6e4110d@mail.gmail.com> Date: Tue, 7 Aug 2007 21:51:40 +0200 From: "Jesper Juhl" To: "David Chinner" Subject: Re: [PATCH][RESEND] fix a potential NULL pointer deref in XFS on failed mount. Cc: "Andrew Morton" , "Linux Kernel Mailing List" , xfs@oss.sgi.com, xfs-masters@oss.sgi.com In-Reply-To: <20070806005214.GK31489@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200708042030.21375.jesper.juhl@gmail.com> <20070806005214.GK31489@sgi.com> X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12483 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jesper.juhl@gmail.com Precedence: bulk X-list: xfs On 06/08/07, David Chinner wrote: > On Sat, Aug 04, 2007 at 08:30:21PM +0200, Jesper Juhl wrote: > > Back in 2006 (2006-10-31 to be specific, reposted on 2006-11-16), I > > submitted a patch to fix a potential NULL pointer deref in XFS on > > failed mount. > > Already checked into xfs-dev tree. Will go to next mainline merge. > > http://oss.sgi.com/archives/xfs/2007-08/msg00030.html > Ok. Thanks a lot for the feedback David. -- Jesper Juhl Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html Plain text mails only, please http://www.expita.com/nomime.html From owner-xfs@oss.sgi.com Tue Aug 7 14:14:43 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 14:14:49 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l77LEfbm006443 for ; Tue, 7 Aug 2007 14:14:43 -0700 Received: from hch by pentafluge.infradead.org with local (Exim 4.63 #1 (Red Hat Linux)) id 1IIVzJ-00082G-77; Tue, 07 Aug 2007 21:49:09 +0100 Date: Tue, 7 Aug 2007 21:49:09 +0100 From: Christoph Hellwig To: Jeff Layton Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com Subject: Re: [PATCH 00/25] move handling of setuid/gid bits from VFS into individual setattr functions (RESEND) Message-ID: <20070807204909.GA30159@infradead.org> Mail-Followup-To: Christoph Hellwig , Jeff Layton , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com References: <200708061354.l76Ds3mU002255@dantu.rdu.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200708061354.l76Ds3mU002255@dantu.rdu.redhat.com> User-Agent: Mutt/1.4.2.3i X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12484 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: xfs First thanks a lot for doing this work, it's been long needed. Second please don't send out that many patches. We encourage people to split things into small patches when the changes are logially separated. Which these are not - it's a flag day change (which btw is fine despite the rants soe people spewed in reply to this), so it should be one single patch. (Or one for all mainline filesystems + one per fs only in -mm to make Andrew's life a little easier if you really care.) From owner-xfs@oss.sgi.com Tue Aug 7 14:21:06 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 14:21:12 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l77LL5bm008761 for ; Tue, 7 Aug 2007 14:21:06 -0700 Received: from hch by pentafluge.infradead.org with local (Exim 4.63 #1 (Red Hat Linux)) id 1IIW1t-00088Q-H4; Tue, 07 Aug 2007 21:51:49 +0100 Date: Tue, 7 Aug 2007 21:51:49 +0100 From: Christoph Hellwig To: Jeff Layton Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com Subject: Re: [PATCH 01/25] VFS: move attr_kill logic from notify_change into helper function Message-ID: <20070807205145.GB30159@infradead.org> Mail-Followup-To: Christoph Hellwig , Jeff Layton , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com References: <200708061354.l76Ds6sq002260@dantu.rdu.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200708061354.l76Ds6sq002260@dantu.rdu.redhat.com> User-Agent: Mutt/1.4.2.3i X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12485 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: xfs > +void attr_kill_to_mode(struct inode *inode, struct iattr *attr) This function badly needs a kerneldoc description. Also I can't say I like the name a lot, but without a clearly better idea I should probably not complain :) We should at least add a generic_ prefix to indicate it's a generic helper valid for most filesystem (and the kerneldoc comment can explain the details) From owner-xfs@oss.sgi.com Tue Aug 7 15:16:34 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 15:16:41 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-6.0 required=5.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_MED,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l77MGVbm026371 for ; Tue, 7 Aug 2007 15:16:34 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l77MDqVt007031; Tue, 7 Aug 2007 18:13:52 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l77MDpAq013085; Tue, 7 Aug 2007 18:13:51 -0400 Received: from tleilax.poochiereds.net (vpn-14-145.rdu.redhat.com [10.11.14.145]) by pobox.corp.redhat.com (8.13.1/8.13.1) with SMTP id l77MDoQr019443; Tue, 7 Aug 2007 18:13:50 -0400 Date: Tue, 7 Aug 2007 18:13:49 -0400 From: Jeff Layton To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com Subject: Re: [PATCH 00/25] move handling of setuid/gid bits from VFS into individual setattr functions (RESEND) Message-Id: <20070807181349.5d4175c7.jlayton@redhat.com> In-Reply-To: <20070807204909.GA30159@infradead.org> References: <200708061354.l76Ds3mU002255@dantu.rdu.redhat.com> <20070807204909.GA30159@infradead.org> X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.14; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12486 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jlayton@redhat.com Precedence: bulk X-list: xfs On Tue, 7 Aug 2007 21:49:09 +0100 Christoph Hellwig wrote: > First thanks a lot for doing this work, it's been long needed. > > Second please don't send out that many patches. We encourage people > to split things into small patches when the changes are logially > separated. Which these are not - it's a flag day change (which btw > is fine despite the rants soe people spewed in reply to this), so it > should be one single patch. (Or one for all mainline filesystems + > one per fs only in -mm to make Andrew's life a little easier if you > really care.) Thanks. I debated about how best to split these up. A coworker mentioned that Andrew had tossed him back a single patch that touched several mainline filesystems and asked him to break it up. I took that to mean that the patches should generally be split out, but I guess I took that too far ;-) -- Jeff Layton From owner-xfs@oss.sgi.com Tue Aug 7 15:23:03 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 15:23:08 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-6.1 required=5.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_MED,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l77MN0bm028238 for ; Tue, 7 Aug 2007 15:23:03 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l77MKlPT011649; Tue, 7 Aug 2007 18:20:47 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l77MKkXp015738; Tue, 7 Aug 2007 18:20:46 -0400 Received: from tleilax.poochiereds.net (vpn-14-145.rdu.redhat.com [10.11.14.145]) by pobox.corp.redhat.com (8.13.1/8.13.1) with SMTP id l77MKjRC021457; Tue, 7 Aug 2007 18:20:45 -0400 Date: Tue, 7 Aug 2007 18:20:44 -0400 From: Jeff Layton To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com Subject: Re: [PATCH 01/25] VFS: move attr_kill logic from notify_change into helper function Message-Id: <20070807182044.06ce4675.jlayton@redhat.com> In-Reply-To: <20070807205145.GB30159@infradead.org> References: <200708061354.l76Ds6sq002260@dantu.rdu.redhat.com> <20070807205145.GB30159@infradead.org> X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.14; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12487 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jlayton@redhat.com Precedence: bulk X-list: xfs On Tue, 7 Aug 2007 21:51:49 +0100 Christoph Hellwig wrote: > > +void attr_kill_to_mode(struct inode *inode, struct iattr *attr) > > This function badly needs a kerneldoc description. Also I can't say > I like the name a lot, but without a clearly better idea I should > probably not complain :) > Thanks for the comments. I'm not thrilled with the name either, but kill_suid and *remove_suid were already taken, and I really didn't want to name this something too similar since there are already so many similarly named functions that don't do the same thing. I'm definitely open to suggestions for something different. > We should at least add a generic_ prefix to indicate it's a generic > helper valid for most filesystem (and the kerneldoc comment can explain > the details) > Both good suggestions. I'll plan to incorporate them in the next respin of the set. Thanks, -- Jeff Layton From owner-xfs@oss.sgi.com Tue Aug 7 17:16:55 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 17:17:00 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from smtp2.linux-foundation.org (smtp2.linux-foundation.org [207.189.120.14]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l780Gqbm026924 for ; Tue, 7 Aug 2007 17:16:55 -0700 Received: from imap1.linux-foundation.org (imap1.linux-foundation.org [207.189.120.55]) by smtp2.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id l780F80F031122 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 7 Aug 2007 17:15:09 -0700 Received: from akpm.corp.google.com (localhost [127.0.0.1]) by imap1.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with SMTP id l780F1rJ011883; Tue, 7 Aug 2007 17:15:01 -0700 Date: Tue, 7 Aug 2007 17:15:01 -0700 From: Andrew Morton To: Jeff Layton Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com Subject: Re: [PATCH 00/25] move handling of setuid/gid bits from VFS into individual setattr functions (RESEND) Message-Id: <20070807171501.e31c4a97.akpm@linux-foundation.org> In-Reply-To: <200708061354.l76Ds3mU002255@dantu.rdu.redhat.com> References: <200708061354.l76Ds3mU002255@dantu.rdu.redhat.com> X-Mailer: Sylpheed version 2.2.7 (GTK+ 2.8.6; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: lf$Revision: 1.184 $ X-Scanned-By: MIMEDefang 2.53 on 207.189.120.14 X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12488 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: akpm@linux-foundation.org Precedence: bulk X-list: xfs On Mon, 6 Aug 2007 09:54:03 -0400 Jeff Layton wrote: > Apologies for the resend, but the original sending had the date in the > email header and it caused some of these to bounce... > > ( Please consider trimming the Cc list if discussing some aspect of this > that doesn't concern everyone.) > > When an unprivileged process attempts to modify a file that has the > setuid or setgid bits set, the VFS will attempt to clear these bits. The > VFS will set the ATTR_KILL_SUID or ATTR_KILL_SGID bits in the ia_valid > mask, and then call notify_change to clear these bits and set the mode > accordingly. > > With a networked filesystem (NFS in particular but most likely others), > the client machine may not have credentials that allow for the clearing > of these bits. In some situations, this can lead to file corruption, or > to an operation failing outright because the setattr fails. > > In this situation, we'd like to just leave the handling of this to > the server and ignore these bits. The problem is that by the time > nfs_setattr is called, the VFS has already reinterpreted the ATTR_KILL_* > bits into a mode change. We can't fix this in the filesystems where > this is a problem, as doing so would leave us having to second-guess > what the VFS wants us to do. So we need to change it so that filesystems > have more flexibility in how to interpret the ATTR_KILL_* bits. > > The first patch in the following patchset moves this logic into a helper > function, and then only calls this helper function for inodes that do > not have a setattr operation defined. The subsequent patches fix up > individual filesystem setattr functions to call this helper function. > > The upshot of this is that with this change, filesystems that define > a setattr inode operation are now responsible for handling the ATTR_KILL > bits as well. They can trivially do so by calling the helper, but they > must do so. > > Some of the follow-on patches may not be strictly necessary, but I > decided that it was better to take the conservative approach and call > the helper when I wasn't sure. I've tried to CC the maintainers > for the individual filesystems as well where I could find them, > please let me know if there are others who should be informed. > > Comments and suggestions appreciated... > From a purely practical standpoint: it's a concern that all filesytems need patching to continue to correctly function after this change. There might be filesystems which you missed, and there are out-of-tree filesystems which won't be updated. And I think the impact upon the out-of-tree filesystems would be fairly severe: they quietly and subtly get their secutiry guarantees broken (I think?) Is there any way in which we can prevent these problems? Say - rename something so that unconverted filesystems will reliably fail to compile? - leave existing filesystems alone, but add a new inode_operations.setattr_jeff, which the networked filesytems can implement, and teach core vfs to call setattr_jeff in preference to setattr? Something else? From owner-xfs@oss.sgi.com Tue Aug 7 17:46:05 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 17:46:10 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_54 autolearn=no version=3.2.0-pre1-r499012 Received: from pat.uio.no (pat.uio.no [129.240.10.15]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l780k2bm000877 for ; Tue, 7 Aug 2007 17:46:04 -0700 Received: from mail-mx1.uio.no ([129.240.10.29]) by pat.uio.no with esmtp (Exim 4.67) (envelope-from ) id 1IIZgK-0003Lj-13; Wed, 08 Aug 2007 02:45:48 +0200 Received: from smtp.uio.no ([129.240.10.9] helo=mail-mx1.uio.no) by mail-mx1.uio.no with esmtp (Exim 4.67) (envelope-from ) id 1IIZgE-0004dH-B6; Wed, 08 Aug 2007 02:45:47 +0200 Received: from c-69-242-210-120.hsd1.mi.comcast.net ([69.242.210.120] helo=[192.168.0.101]) by mail-mx1.uio.no with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.67) (envelope-from ) id 1IIZgD-0004d1-JR; Wed, 08 Aug 2007 02:45:41 +0200 Subject: Re: [PATCH 00/25] move handling of setuid/gid bits from VFS into individual setattr functions (RESEND) From: Trond Myklebust To: Andrew Morton Cc: Jeff Layton , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com In-Reply-To: <20070807171501.e31c4a97.akpm@linux-foundation.org> References: <200708061354.l76Ds3mU002255@dantu.rdu.redhat.com> <20070807171501.e31c4a97.akpm@linux-foundation.org> Content-Type: text/plain Date: Tue, 07 Aug 2007 20:45:34 -0400 Message-Id: <1186533934.6625.91.camel@heimdal.trondhjem.org> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-UiO-Resend: resent X-UiO-Spam-info: not spam, SpamAssassin (score=-0.1, required=12.0, autolearn=disabled, AWL=-0.105) X-UiO-Scanned: 5DD508554BB32E554F9CCDFECDEC7B1A489F08D0 X-UiO-SPAM-Test: remote_host: 129.240.10.9 spam_score: 0 maxlevel 200 minaction 2 bait 0 mail/h: 289 total 3142576 max/h 8345 blacklist 0 greylist 0 ratelimit 0 X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12489 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: trond.myklebust@fys.uio.no Precedence: bulk X-list: xfs On Tue, 2007-08-07 at 17:15 -0700, Andrew Morton wrote: > Is there any way in which we can prevent these problems? Say The problem here is that we occasionally DO need to add new flags, and yes, they MAY be security related. The whole reason why we're now having to change the semantics of setattr is because somebody tried to hack their way around the write+suid issue. I suspect we will see the exact same thing will happen again in a couple of years with Serge's ATTR_KILL_PRIV flag. > - rename something so that unconverted filesystems will reliably fail to > compile? > > - leave existing filesystems alone, but add a new > inode_operations.setattr_jeff, which the networked filesytems can > implement, and teach core vfs to call setattr_jeff in preference to > setattr? If you really need to know that the filesystem is handling the flags, then how about instead having ->setattr() return something which indicates which flags it actually handled? That is likely to be a far more intrusive change, but it is one which is future-proof. Trond From owner-xfs@oss.sgi.com Tue Aug 7 17:54:59 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 17:55:07 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from smtp2.linux-foundation.org (smtp2.linux-foundation.org [207.189.120.14]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l780swbm002985 for ; Tue, 7 Aug 2007 17:54:58 -0700 Received: from imap1.linux-foundation.org (imap1.linux-foundation.org [207.189.120.55]) by smtp2.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id l780s975032369 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 7 Aug 2007 17:54:10 -0700 Received: from akpm.corp.google.com (localhost [127.0.0.1]) by imap1.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with SMTP id l780s3Q3013306; Tue, 7 Aug 2007 17:54:03 -0700 Date: Tue, 7 Aug 2007 17:54:02 -0700 From: Andrew Morton To: Trond Myklebust Cc: Jeff Layton , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com Subject: Re: [PATCH 00/25] move handling of setuid/gid bits from VFS into individual setattr functions (RESEND) Message-Id: <20070807175402.03ceb0b7.akpm@linux-foundation.org> In-Reply-To: <1186533934.6625.91.camel@heimdal.trondhjem.org> References: <200708061354.l76Ds3mU002255@dantu.rdu.redhat.com> <20070807171501.e31c4a97.akpm@linux-foundation.org> <1186533934.6625.91.camel@heimdal.trondhjem.org> X-Mailer: Sylpheed version 2.2.7 (GTK+ 2.8.6; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: lf$Revision: 1.184 $ X-Scanned-By: MIMEDefang 2.53 on 207.189.120.14 X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12490 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: akpm@linux-foundation.org Precedence: bulk X-list: xfs On Tue, 07 Aug 2007 20:45:34 -0400 Trond Myklebust wrote: > > - rename something so that unconverted filesystems will reliably fail to > > compile? > > > > - leave existing filesystems alone, but add a new > > inode_operations.setattr_jeff, which the networked filesytems can > > implement, and teach core vfs to call setattr_jeff in preference to > > setattr? > > If you really need to know that the filesystem is handling the flags, > then how about instead having ->setattr() return something which > indicates which flags it actually handled? That is likely to be a far > more intrusive change, but it is one which is future-proof. If we change ->setattr so that it will return a positive, non-zero value which the caller can then check and reliably do printk("that filesystem needs updating") then that addresses my concern, sure. From owner-xfs@oss.sgi.com Tue Aug 7 18:34:40 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 18:34:44 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l781Yabm010073 for ; Tue, 7 Aug 2007 18:34:38 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id LAA17185; Wed, 8 Aug 2007 11:34:35 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l781YXeW54154144; Wed, 8 Aug 2007 11:34:34 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l781YUZV35824320; Wed, 8 Aug 2007 11:34:30 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Wed, 8 Aug 2007 11:34:30 +1000 From: David Chinner To: Arkadiy Kulev Cc: xfs@oss.sgi.com Subject: Re: many subdirectories, slow search. Message-ID: <20070808013430.GL12413810@sgi.com> References: <337047880.20070807181022@ethaniel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <337047880.20070807181022@ethaniel.com> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12491 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Tue, Aug 07, 2007 at 06:10:22PM +0400, Arkadiy Kulev wrote: > Hello xfs, > > I have a external SATA storage, that is connected to my server via > SCSI HBA. The server is a 32 bit core2duo with 1gb RAM. ..... > I started noticing, that images are being accessed slowly (high > lag of 5-10 seconds). Even when I connect via ssh and do "ls /data1" > for instance (/data1 is my 2 terabyte xfs partition) it gives me a > result only after a few seconds, even though the root folder is not > big. Is it always slow, or does it slow down after some runtime? Does that slow access correspond to running out of free memory on the machine? i.e. Does it speed up again if you: # echo 3 > /proc/sys/vm/drop_caches Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Tue Aug 7 18:39:03 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 18:39:06 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=AWL,BAYES_40,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l781d1bm011025 for ; Tue, 7 Aug 2007 18:39:02 -0700 Received: from liberator.sandeen.net (liberator.sandeen.net [10.0.0.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 7D7F61807DEFF for ; Tue, 7 Aug 2007 20:39:05 -0500 (CDT) Message-ID: <46B91EBA.10407@sandeen.net> Date: Tue, 07 Aug 2007 20:39:06 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: xfs-oss Subject: qa 166 failure on f8 kernel Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12492 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Posting this just in case it rings any bells, though I plan to investigate... [root@inode xfstests]# ./check 166 FSTYP -- xfs (non-debug) PLATFORM -- Linux/x86_64 inode 2.6.23-0.71.rc2.fc8 MKFS_OPTIONS -- -f -bsize=4096 /dev/sdb6 MOUNT_OPTIONS -- /dev/sdb6 /mnt/sdb6 166 - output mismatch (see 166.out.bad) 2,6c2,7 < 0: [0..31]: XX..YY AG (AA..BB) 32 < 1: [32..127]: XX..YY AG (AA..BB) 96 10000 < 2: [128..159]: XX..YY AG (AA..BB) 32 < 3: [160..223]: XX..YY AG (AA..BB) 64 10000 < 4: [224..255]: XX..YY AG (AA..BB) 32 --- > /mnt/sdb6/test_file: XX..YY AG (AA..BB) > 0: [0..7]: XX..YY AG (AA..BB) 8 > 1: [8..127]: XX..YY AG (AA..BB) 120 10000 > 2: [128..135]: XX..YY AG (AA..BB) 8 > 3: [136..247]: XX..YY AG (AA..BB) 112 10000 > 4: [248..255]: XX..YY AG (AA..BB) 8 Failures: 166 Failed 1 of 1 tests [root@inode xfstests]# uname -a Linux inode.lab.msp.redhat.com 2.6.23-0.71.rc2.fc8 #1 SMP Sat Aug 4 01:21:06 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux -Eric From owner-xfs@oss.sgi.com Tue Aug 7 18:43:35 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 18:43:39 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l781hSbm012164 for ; Tue, 7 Aug 2007 18:43:34 -0700 Received: from [134.14.55.89] (soarer.melbourne.sgi.com [134.14.55.89]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id LAA17432; Wed, 8 Aug 2007 11:43:27 +1000 Message-ID: <46B9203B.6050405@sgi.com> Date: Wed, 08 Aug 2007 11:45:31 +1000 From: Vlad Apostolov User-Agent: Thunderbird 1.5.0.12 (X11/20070509) MIME-Version: 1.0 To: sgi.bugs.xfs@engr.sgi.com CC: linux-xfs@oss.sgi.com Subject: PARTIAL TAKE 964111 - XFSQA 144 fails on i386 with TOT 26x_xfs kernel Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12493 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: vapo@sgi.com Precedence: bulk X-list: xfs Date: Wed Aug 8 11:38:19 AEST 2007 Workarea: soarer.melbourne.sgi.com:/home/vapo/isms/xfs-cmds Inspected by: lachlan The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/xfs-cmds/master-melb Modid: master-melb:xfs-cmds:29347a xfstests/dmapi/src/suite1/cmd/print_event.c - 1.7 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfstests/dmapi/src/suite1/print_event.c.diff?r1=text&tr1=1.7&r2=text&tr2=1.6&f=h - pv 964111, rv lachlan - terminate attribute name string From owner-xfs@oss.sgi.com Tue Aug 7 18:49:35 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 18:49:39 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l781nWbm013414 for ; Tue, 7 Aug 2007 18:49:34 -0700 Received: from [134.14.55.89] (soarer.melbourne.sgi.com [134.14.55.89]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id LAA17772; Wed, 8 Aug 2007 11:49:32 +1000 Message-ID: <46B921A8.1080102@sgi.com> Date: Wed, 08 Aug 2007 11:51:36 +1000 From: Vlad Apostolov User-Agent: Thunderbird 1.5.0.12 (X11/20070509) MIME-Version: 1.0 To: sgi.bugs.xfs@engr.sgi.com CC: linux-xfs@oss.sgi.com Subject: PARTIAL TAKE 966845 - XFSQA 168: test fails on i386 TOT 26x_xfs due to garbaged output Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12494 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: vapo@sgi.com Precedence: bulk X-list: xfs Date: Wed Aug 8 11:38:19 AEST 2007 Workarea: soarer.melbourne.sgi.com:/home/vapo/isms/xfs-cmds Inspected by: lachlan The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/xfs-cmds/master-melb Modid: master-melb:xfs-cmds:29347a xfstests/dmapi/src/suite1/cmd/print_event.c - 1.7 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfstests/dmapi/src/suite1/print_event.c.diff?r1=text&tr1=1.7&r2=text&tr2=1.6&f=h - pv 966845, rv lachlan - terminate attribute name string From owner-xfs@oss.sgi.com Tue Aug 7 19:43:20 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 19:43:25 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l782hCbm025043 for ; Tue, 7 Aug 2007 19:43:15 -0700 Received: from [134.14.55.89] (soarer.melbourne.sgi.com [134.14.55.89]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id MAA19182; Wed, 8 Aug 2007 12:43:11 +1000 Message-ID: <46B92E3B.7060908@sgi.com> Date: Wed, 08 Aug 2007 12:45:15 +1000 From: Vlad Apostolov User-Agent: Thunderbird 1.5.0.12 (X11/20070509) MIME-Version: 1.0 To: sgi.bugs.xfs@engr.sgi.com CC: linux-xfs@oss.sgi.com Subject: TAKE 968773 - minor fixes for XFS DMAPI tests Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12495 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: vapo@sgi.com Precedence: bulk X-list: xfs Date: Wed Aug 8 12:41:15 AEST 2007 Workarea: soarer.melbourne.sgi.com:/home/vapo/isms/xfs-cmds-patches Inspected by: vapo The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/xfs-cmds/master-melb Modid: master-melb:xfs-cmds:29348a xfstests/dmapi/src/suite2/src/dm_test_daemon.c - 1.4 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfstests/dmapi/src/suite2/src/dm_test_daemon.c.diff?r1=text&tr1=1.4&r2=text&tr2=1.3&f=h xfstests/dmapi/src/suite1/cmd/print_event.c - 1.8 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfstests/dmapi/src/suite1/print_event.c.diff?r1=text&tr1=1.8&r2=text&tr2=1.7&f=h xfstests/dmapi/src/simple/dm_getall_tokens.c - 1.9 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfstests/dmapi/src/simple/dm_getall_tokens.c.diff?r1=text&tr1=1.9&r2=text&tr2=1.8&f=h xfstests/dmapi/src/common/lib/util.c - 1.5 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfstests/dmapi/src/common/lib/util.c.diff?r1=text&tr1=1.5&r2=text&tr2=1.4&f=h - pv 968773, author Chris Pascoe , rv vapo - minor fixes for XFS DMAPI tests From owner-xfs@oss.sgi.com Tue Aug 7 19:56:23 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 19:56:28 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l782uKbm028771 for ; Tue, 7 Aug 2007 19:56:22 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id MAA20639; Wed, 8 Aug 2007 12:56:19 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l782uHeW54194245; Wed, 8 Aug 2007 12:56:18 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l782uG0M54136229; Wed, 8 Aug 2007 12:56:16 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Wed, 8 Aug 2007 12:56:16 +1000 From: David Chinner To: Eric Sandeen Cc: xfs-oss Subject: Re: qa 166 failure on f8 kernel Message-ID: <20070808025615.GH52011508@sgi.com> References: <46B91EBA.10407@sandeen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46B91EBA.10407@sandeen.net> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12496 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Tue, Aug 07, 2007 at 08:39:06PM -0500, Eric Sandeen wrote: > Posting this just in case it rings any bells, though I plan to > investigate... > > [root@inode xfstests]# ./check 166 > FSTYP -- xfs (non-debug) > PLATFORM -- Linux/x86_64 inode 2.6.23-0.71.rc2.fc8 > MKFS_OPTIONS -- -f -bsize=4096 /dev/sdb6 > MOUNT_OPTIONS -- /dev/sdb6 /mnt/sdb6 > > 166 - output mismatch (see 166.out.bad) > 2,6c2,7 > < 0: [0..31]: XX..YY AG (AA..BB) 32 > < 1: [32..127]: XX..YY AG (AA..BB) 96 10000 > < 2: [128..159]: XX..YY AG (AA..BB) 32 > < 3: [160..223]: XX..YY AG (AA..BB) 64 10000 > < 4: [224..255]: XX..YY AG (AA..BB) 32 > --- > > /mnt/sdb6/test_file: XX..YY AG (AA..BB) > > 0: [0..7]: XX..YY AG (AA..BB) 8 > > 1: [8..127]: XX..YY AG (AA..BB) 120 10000 > > 2: [128..135]: XX..YY AG (AA..BB) 8 > > 3: [136..247]: XX..YY AG (AA..BB) 112 10000 > > 4: [248..255]: XX..YY AG (AA..BB) 8 When you post the failure, someone will say, "Duh, that's obvious". Well: Duh! That's obvious. ;) You've got 3x4k written blocks in the file which is *correct*. There's nothing wrong with the kernel code. It's just that the test is expecting 3x16k extents to be marked written. See the problem yet? mmap dirties entire pages. page size differs between platforms - ia64 = 16k, x86 = 4k - so the size of the extent allocated is different. Guess what platform I wrote the test on and use as my primary platform? The output needs better filtering, methinks. Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Tue Aug 7 19:58:47 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 19:58:52 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l782wjbm029428 for ; Tue, 7 Aug 2007 19:58:47 -0700 Received: from Liberator.local (liberator.sandeen.net [10.0.0.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 958A318015183; Tue, 7 Aug 2007 21:58:49 -0500 (CDT) Message-ID: <46B9316A.40508@sandeen.net> Date: Tue, 07 Aug 2007 21:58:50 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: David Chinner CC: xfs-oss Subject: Re: qa 166 failure on f8 kernel References: <46B91EBA.10407@sandeen.net> <20070808025615.GH52011508@sgi.com> In-Reply-To: <20070808025615.GH52011508@sgi.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12497 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs David Chinner wrote: > On Tue, Aug 07, 2007 at 08:39:06PM -0500, Eric Sandeen wrote: >> Posting this just in case it rings any bells, though I plan to >> investigate... >> >> [root@inode xfstests]# ./check 166 >> FSTYP -- xfs (non-debug) >> PLATFORM -- Linux/x86_64 inode 2.6.23-0.71.rc2.fc8 >> MKFS_OPTIONS -- -f -bsize=4096 /dev/sdb6 >> MOUNT_OPTIONS -- /dev/sdb6 /mnt/sdb6 >> >> 166 - output mismatch (see 166.out.bad) >> 2,6c2,7 >> < 0: [0..31]: XX..YY AG (AA..BB) 32 >> < 1: [32..127]: XX..YY AG (AA..BB) 96 10000 >> < 2: [128..159]: XX..YY AG (AA..BB) 32 >> < 3: [160..223]: XX..YY AG (AA..BB) 64 10000 >> < 4: [224..255]: XX..YY AG (AA..BB) 32 >> --- >>> /mnt/sdb6/test_file: XX..YY AG (AA..BB) >>> 0: [0..7]: XX..YY AG (AA..BB) 8 >>> 1: [8..127]: XX..YY AG (AA..BB) 120 10000 >>> 2: [128..135]: XX..YY AG (AA..BB) 8 >>> 3: [136..247]: XX..YY AG (AA..BB) 112 10000 >>> 4: [248..255]: XX..YY AG (AA..BB) 8 > > When you post the failure, someone will say, "Duh, that's obvious". fine, fine ;-) > Well: Duh! That's obvious. ;) > > You've got 3x4k written blocks in the file which is *correct*. > There's nothing wrong with the kernel code. It's just that the test > is expecting 3x16k extents to be marked written. > > See the problem yet? > > mmap dirties entire pages. page size differs between platforms - > ia64 = 16k, x86 = 4k - so the size of the extent allocated is > different. Guess what platform I wrote the test on and use as my > primary platform? > > The output needs better filtering, methinks. yeah, figured it had something to do w/ the ia64 weenies when I saw the 32 vs. 8, factor of 4 ... fine, fine, my bad. :) Thanks, -Eric > Cheers, > > Dave. From owner-xfs@oss.sgi.com Tue Aug 7 21:08:29 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 21:08:33 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7848Nbm017415 for ; Tue, 7 Aug 2007 21:08:27 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id OAA23530; Wed, 8 Aug 2007 14:08:08 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l78486eW54190263; Wed, 8 Aug 2007 14:08:07 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l78484UT54185838; Wed, 8 Aug 2007 14:08:04 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Wed, 8 Aug 2007 14:08:04 +1000 From: David Chinner To: Eric Sandeen Cc: David Chinner , xfs-oss Subject: Re: qa 166 failure on f8 kernel Message-ID: <20070808040804.GJ52011508@sgi.com> References: <46B91EBA.10407@sandeen.net> <20070808025615.GH52011508@sgi.com> <46B9316A.40508@sandeen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46B9316A.40508@sandeen.net> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12498 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Tue, Aug 07, 2007 at 09:58:50PM -0500, Eric Sandeen wrote: > yeah, figured it had something to do w/ the ia64 weenies when I saw the > 32 vs. 8, factor of 4 ... fine, fine, my bad. :) No, not your bad. Mine if anyones because I wrote the test. Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Tue Aug 7 21:11:01 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 21:11:04 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_43, J_CHICKENPOX_63,SPF_HELO_PASS autolearn=no version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l784Axbm018436 for ; Tue, 7 Aug 2007 21:11:01 -0700 Received: from Liberator.local (liberator.sandeen.net [10.0.0.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 50DB91807DEFF; Tue, 7 Aug 2007 23:11:04 -0500 (CDT) Message-ID: <46B94259.6060309@sandeen.net> Date: Tue, 07 Aug 2007 23:11:05 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: David Chinner CC: xfs-oss Subject: Re: qa 166 failure on f8 kernel References: <46B91EBA.10407@sandeen.net> <20070808025615.GH52011508@sgi.com> <46B9316A.40508@sandeen.net> <20070808040804.GJ52011508@sgi.com> In-Reply-To: <20070808040804.GJ52011508@sgi.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12499 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs David Chinner wrote: > On Tue, Aug 07, 2007 at 09:58:50PM -0500, Eric Sandeen wrote: > >> yeah, figured it had something to do w/ the ia64 weenies when I saw the >> 32 vs. 8, factor of 4 ... fine, fine, my bad. :) >> > > No, not your bad. Mine if anyones because I wrote the test. > > Cheers, > > Dave. > Well, I was going to look at it more closely before I sent it off :) What do you think of a patch like this, to munmap 16k chunks regardless of page size: --- src/unwritten_mmap.c.orig 2007-08-07 22:53:08.962031839 -0500 +++ src/unwritten_mmap.c 2007-08-07 23:02:05.939112618 -0500 @@ -12,6 +12,7 @@ */ int main(int argc, char **argv) { unsigned long long o; + int minsize; int fd, i; struct xfs_flock64 space; unsigned char *buf; @@ -23,6 +24,13 @@ errno = 0; o = strtoull(argv[1], NULL, 0); + + minsize = 3*16384; /* 3 ia64 pages */ + if (o < minsize) { + fprintf(stderr, "count must be at least %d\n", minsize); + exit(1); + } + if (errno) { perror("strtoull"); exit(errno); @@ -55,9 +63,9 @@ perror("mmap()"); exit(5); } else { + memset(buf, 0, 16384); + memset(buf+o/2, 0, 16384); + memset(buf+o-16384, 0, 16384); munmap(buf, o); } -Eric From owner-xfs@oss.sgi.com Tue Aug 7 21:15:45 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 21:15:51 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l784Fgbm020179 for ; Tue, 7 Aug 2007 21:15:44 -0700 Received: from pc-bnaujok.melbourne.sgi.com (pc-bnaujok.melbourne.sgi.com [134.14.55.58]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id OAA23643; Wed, 8 Aug 2007 14:15:40 +1000 Date: Wed, 08 Aug 2007 14:19:00 +1000 To: "Eric Sandeen" , xfs-oss Subject: Re: qa 166 failure on f8 kernel From: "Barry Naujok" Organization: SGI Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 References: <46B91EBA.10407@sandeen.net> Message-ID: In-Reply-To: <46B91EBA.10407@sandeen.net> User-Agent: Opera Mail/9.10 (Win32) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from Quoted-Printable to 8bit by oss.sgi.com id l784Fjbm020201 X-archive-position: 12500 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: bnaujok@sgi.com Precedence: bulk X-list: xfs On Wed, 08 Aug 2007 11:39:06 +1000, Eric Sandeen wrote: > Posting this just in case it rings any bells, though I plan to > investigate... > > [root@inode xfstests]# ./check 166 > FSTYP -- xfs (non-debug) > PLATFORM -- Linux/x86_64 inode 2.6.23-0.71.rc2.fc8 > MKFS_OPTIONS -- -f -bsize=4096 /dev/sdb6 > MOUNT_OPTIONS -- /dev/sdb6 /mnt/sdb6 > > 166 - output mismatch (see 166.out.bad) > 2,6c2,7 > < 0: [0..31]: XX..YY AG (AA..BB) 32 > < 1: [32..127]: XX..YY AG (AA..BB) 96 10000 > < 2: [128..159]: XX..YY AG (AA..BB) 32 > < 3: [160..223]: XX..YY AG (AA..BB) 64 10000 > < 4: [224..255]: XX..YY AG (AA..BB) 32 > --- >> /mnt/sdb6/test_file: XX..YY AG (AA..BB) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I suspect this line is appearing in the output due to a number in the mountpoint. I think the _filter_blocks() is only extracting lines with numbers in it. >> 0: [0..7]: XX..YY AG (AA..BB) 8 >> 1: [8..127]: XX..YY AG (AA..BB) 120 10000 >> 2: [128..135]: XX..YY AG (AA..BB) 8 >> 3: [136..247]: XX..YY AG (AA..BB) 112 10000 >> 4: [248..255]: XX..YY AG (AA..BB) 8 > Failures: 166 > Failed 1 of 1 tests > [root@inode xfstests]# uname -a > Linux inode.lab.msp.redhat.com 2.6.23-0.71.rc2.fc8 #1 SMP Sat Aug 4 > 01:21:06 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux > > -Eric > > From owner-xfs@oss.sgi.com Tue Aug 7 21:16:38 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 21:16:40 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_43, J_CHICKENPOX_63,SPF_HELO_PASS autolearn=no version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l784Gbbm020786 for ; Tue, 7 Aug 2007 21:16:38 -0700 Received: from Liberator.local (liberator.sandeen.net [10.0.0.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 341AD1807DF04; Tue, 7 Aug 2007 23:16:42 -0500 (CDT) Message-ID: <46B943AB.10807@sandeen.net> Date: Tue, 07 Aug 2007 23:16:43 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: David Chinner CC: xfs-oss Subject: Re: qa 166 failure on f8 kernel References: <46B91EBA.10407@sandeen.net> <20070808025615.GH52011508@sgi.com> <46B9316A.40508@sandeen.net> <20070808040804.GJ52011508@sgi.com> <46B94259.6060309@sandeen.net> In-Reply-To: <46B94259.6060309@sandeen.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12501 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Eric Sandeen wrote: > David Chinner wrote: > > >> On Tue, Aug 07, 2007 at 09:58:50PM -0500, Eric Sandeen wrote: >> >> >>> yeah, figured it had something to do w/ the ia64 weenies when I saw the >>> 32 vs. 8, factor of 4 ... fine, fine, my bad. :) >>> >>> >> No, not your bad. Mine if anyones because I wrote the test. >> >> Cheers, >> >> Dave. >> >> > Well, I was going to look at it more closely before I sent it off :) > > What do you think of a patch like this, to munmap 16k chunks regardless > of page size: > Er, bad patch-ninja-boy, don't hand-edit :) --- src/unwritten_mmap.c.orig 2007-08-07 22:53:08.962031839 -0500 +++ src/unwritten_mmap.c 2007-08-07 23:04:14.230540957 -0500 @@ -12,6 +12,7 @@ */ int main(int argc, char **argv) { unsigned long long o; + int minsize; int fd, i; struct xfs_flock64 space; unsigned char *buf; @@ -23,6 +24,13 @@ errno = 0; o = strtoull(argv[1], NULL, 0); + + minsize = 3*16384; /* 3 ia64 pages */ + if (o < minsize) { + fprintf(stderr, "count must be at least %d\n", minsize); + exit(1); + } + if (errno) { perror("strtoull"); exit(errno); @@ -55,9 +63,9 @@ perror("mmap()"); exit(5); } else { - buf[o-1] = 0; - buf[o/2] = 0; - buf[0] = 0; + memset(buf, 0, 16384); + memset(buf+o/2, 0, 16384); + memset(buf+o-16384, 0, 16384); munmap(buf, o); } From owner-xfs@oss.sgi.com Tue Aug 7 21:18:07 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 21:18:11 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l784I5bm021705 for ; Tue, 7 Aug 2007 21:18:07 -0700 Received: from Liberator.local (liberator.sandeen.net [10.0.0.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 9C5A51807DEFF; Tue, 7 Aug 2007 23:18:09 -0500 (CDT) Message-ID: <46B94402.5090801@sandeen.net> Date: Tue, 07 Aug 2007 23:18:10 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Barry Naujok CC: xfs-oss Subject: Re: qa 166 failure on f8 kernel References: <46B91EBA.10407@sandeen.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12502 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Barry Naujok wrote: > On Wed, 08 Aug 2007 11:39:06 +1000, Eric Sandeen > wrote: > >> Posting this just in case it rings any bells, though I plan to >> investigate... >> >> [root@inode xfstests]# ./check 166 >> FSTYP -- xfs (non-debug) >> PLATFORM -- Linux/x86_64 inode 2.6.23-0.71.rc2.fc8 >> MKFS_OPTIONS -- -f -bsize=4096 /dev/sdb6 >> MOUNT_OPTIONS -- /dev/sdb6 /mnt/sdb6 >> >> 166 - output mismatch (see 166.out.bad) >> 2,6c2,7 >> < 0: [0..31]: XX..YY AG (AA..BB) 32 >> < 1: [32..127]: XX..YY AG (AA..BB) 96 10000 >> < 2: [128..159]: XX..YY AG (AA..BB) 32 >> < 3: [160..223]: XX..YY AG (AA..BB) 64 10000 >> < 4: [224..255]: XX..YY AG (AA..BB) 32 >> --- >>> /mnt/sdb6/test_file: XX..YY AG (AA..BB) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > I suspect this line is appearing in the output due to a number > in the mountpoint. I think the _filter_blocks() is only > extracting lines with numbers in it. Bingo. Yep, changing it to /mnt/foo, plus my change to the test, passes. thanks! -Eric From owner-xfs@oss.sgi.com Tue Aug 7 21:19:32 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 21:19:37 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l784JSbm022425 for ; Tue, 7 Aug 2007 21:19:31 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id OAA23920; Wed, 8 Aug 2007 14:19:23 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l784JLeW54233522; Wed, 8 Aug 2007 14:19:22 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l784JK6f53277195; Wed, 8 Aug 2007 14:19:20 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Wed, 8 Aug 2007 14:19:20 +1000 From: David Chinner To: Eric Sandeen Cc: David Chinner , xfs-oss Subject: Re: qa 166 failure on f8 kernel Message-ID: <20070808041920.GK52011508@sgi.com> References: <46B91EBA.10407@sandeen.net> <20070808025615.GH52011508@sgi.com> <46B9316A.40508@sandeen.net> <20070808040804.GJ52011508@sgi.com> <46B94259.6060309@sandeen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46B94259.6060309@sandeen.net> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12503 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Tue, Aug 07, 2007 at 11:11:05PM -0500, Eric Sandeen wrote: > David Chinner wrote: > > > On Tue, Aug 07, 2007 at 09:58:50PM -0500, Eric Sandeen wrote: > > > >> yeah, figured it had something to do w/ the ia64 weenies when I saw the > >> 32 vs. 8, factor of 4 ... fine, fine, my bad. :) > >> > > > > No, not your bad. Mine if anyones because I wrote the test. > > > > Cheers, > > > > Dave. > > > Well, I was going to look at it more closely before I sent it off :) > > What do you think of a patch like this, to munmap 16k chunks regardless > of page size: That could be done, but will break on 64k page size machines ;) Perhaps the filter needs to use `getconf PAGE_SIZE` to filter the output down: ia64: % getconf PAGE_SIZE 16384 x86_64: % getconf PAGE_SIZE 4096 So the written extent sizes are output as a multiple of page size rather than basic blocks.... Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Tue Aug 7 21:28:45 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 21:28:48 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l784Shbm025213 for ; Tue, 7 Aug 2007 21:28:45 -0700 Received: from Liberator.local (liberator.sandeen.net [10.0.0.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id B7BA41807F9CC; Tue, 7 Aug 2007 23:28:47 -0500 (CDT) Message-ID: <46B94680.3070405@sandeen.net> Date: Tue, 07 Aug 2007 23:28:48 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: David Chinner CC: xfs-oss Subject: Re: qa 166 failure on f8 kernel References: <46B91EBA.10407@sandeen.net> <20070808025615.GH52011508@sgi.com> <46B9316A.40508@sandeen.net> <20070808040804.GJ52011508@sgi.com> <46B94259.6060309@sandeen.net> <20070808041920.GK52011508@sgi.com> In-Reply-To: <20070808041920.GK52011508@sgi.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12504 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs David Chinner wrote: > That could be done, but will break on 64k page size machines ;) > > Perhaps the filter needs to use `getconf PAGE_SIZE` to filter the > output down: > > ia64: > > % getconf PAGE_SIZE > 16384 > > x86_64: > > % getconf PAGE_SIZE > 4096 > > So the written extent sizes are output as a multiple of > page size rather than basic blocks.... yeah, computing all the numbers for the filter seemed nasty. Maybe just a dumbed-down filter that expects written unwritten written unwritten written would be sufficient for this test. --- 166.orig 2007-08-07 23:19:33.391317217 -0500 +++ 166 2007-08-07 23:21:11.111409407 -0500 @@ -31,9 +31,9 @@ { $AWK_PROG '/[0-9]/ { if ($7) - print $1, $2, "XX..YY", "AG", "(AA..BB)", $6, $7; + print $7 else - print $1, $2, "XX..YY", "AG", "(AA..BB)", $6; + print "no flags" }' } --- 166.out.orig 2007-08-07 23:21:25.299244961 -0500 +++ 166.out 2007-08-07 23:21:45.706131763 -0500 @@ -1,6 +1,6 @@ QA output created by 166 -0: [0..31]: XX..YY AG (AA..BB) 32 -1: [32..127]: XX..YY AG (AA..BB) 96 10000 -2: [128..159]: XX..YY AG (AA..BB) 32 -3: [160..223]: XX..YY AG (AA..BB) 64 10000 -4: [224..255]: XX..YY AG (AA..BB) 32 +no flags +10000 +no flags +10000 +no flags -Eric From owner-xfs@oss.sgi.com Tue Aug 7 21:54:29 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 21:54:35 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l784sPbm030830 for ; Tue, 7 Aug 2007 21:54:28 -0700 Received: from pc-bnaujok.melbourne.sgi.com (pc-bnaujok.melbourne.sgi.com [134.14.55.58]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id OAA24637; Wed, 8 Aug 2007 14:54:21 +1000 To: "Eric Sandeen" , "David Chinner" Subject: Re: qa 166 failure on f8 kernel From: "Barry Naujok" Organization: SGI Cc: xfs-oss Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 References: <46B91EBA.10407@sandeen.net> <20070808025615.GH52011508@sgi.com> <46B9316A.40508@sandeen.net> <20070808040804.GJ52011508@sgi.com> <46B94259.6060309@sandeen.net> <20070808041920.GK52011508@sgi.com> <46B94680.3070405@sandeen.net> Content-Transfer-Encoding: 7bit Date: Wed, 08 Aug 2007 14:57:55 +1000 Message-ID: In-Reply-To: <46B94680.3070405@sandeen.net> User-Agent: Opera Mail/9.10 (Win32) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12505 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: bnaujok@sgi.com Precedence: bulk X-list: xfs On Wed, 08 Aug 2007 14:28:48 +1000, Eric Sandeen wrote: > David Chinner wrote: > >> That could be done, but will break on 64k page size machines ;) >> >> Perhaps the filter needs to use `getconf PAGE_SIZE` to filter the >> output down: >> >> ia64: >> >> % getconf PAGE_SIZE >> 16384 >> >> x86_64: >> >> % getconf PAGE_SIZE >> 4096 >> >> So the written extent sizes are output as a multiple of >> page size rather than basic blocks.... > > > yeah, computing all the numbers for the filter seemed nasty. > > Maybe just a dumbed-down filter that expects > > written > unwritten > written > unwritten > written > > would be sufficient for this test. > > --- 166.orig 2007-08-07 23:19:33.391317217 -0500 > +++ 166 2007-08-07 23:21:11.111409407 -0500 > @@ -31,9 +31,9 @@ > { > $AWK_PROG '/[0-9]/ { > if ($7) > - print $1, $2, "XX..YY", "AG", "(AA..BB)", $6, $7; > + print $7 > else > - print $1, $2, "XX..YY", "AG", "(AA..BB)", $6; > + print "no flags" > }' > } > > --- 166.out.orig 2007-08-07 23:21:25.299244961 -0500 > +++ 166.out 2007-08-07 23:21:45.706131763 -0500 > @@ -1,6 +1,6 @@ > QA output created by 166 > -0: [0..31]: XX..YY AG (AA..BB) 32 > -1: [32..127]: XX..YY AG (AA..BB) 96 10000 > -2: [128..159]: XX..YY AG (AA..BB) 32 > -3: [160..223]: XX..YY AG (AA..BB) 64 10000 > -4: [224..255]: XX..YY AG (AA..BB) 32 > +no flags > +10000 > +no flags > +10000 > +no flags > > > -Eric > Instead of "no flags", how about "00000" so the test doesn't break with xfsprogs 2.9.x and later. > From owner-xfs@oss.sgi.com Tue Aug 7 22:00:10 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 22:00:14 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l78507bm032147 for ; Tue, 7 Aug 2007 22:00:10 -0700 Received: from Liberator.local (liberator.sandeen.net [10.0.0.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id B20B41807DF04; Wed, 8 Aug 2007 00:00:11 -0500 (CDT) Message-ID: <46B94DDC.7040100@sandeen.net> Date: Wed, 08 Aug 2007 00:00:12 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Barry Naujok CC: David Chinner , xfs-oss Subject: Re: qa 166 failure on f8 kernel References: <46B91EBA.10407@sandeen.net> <20070808025615.GH52011508@sgi.com> <46B9316A.40508@sandeen.net> <20070808040804.GJ52011508@sgi.com> <46B94259.6060309@sandeen.net> <20070808041920.GK52011508@sgi.com> <46B94680.3070405@sandeen.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12506 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Barry Naujok wrote: > Instead of "no flags", how about "00000" so the test doesn't break > with xfsprogs 2.9.x and later. > > [root@inode xfstests]# rpm -q xfsprogs xfsprogs-2.9.3-1 I have that... but... whatever works :) -Eric From owner-xfs@oss.sgi.com Tue Aug 7 22:15:22 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 22:15:32 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail-gw2.sa.eol.hu (mail-gw2.sa.eol.hu [212.108.200.109]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l785FJbm002960 for ; Tue, 7 Aug 2007 22:15:22 -0700 Received: from dorka.pomaz.szeredi.hu (224-083.adsl.pool.ew.hu [193.226.224.83]) by mail-gw2.sa.eol.hu (mu) with ESMTP id l785FLgS024702; Wed, 8 Aug 2007 07:15:23 +0200 Received: from miko by dorka.pomaz.szeredi.hu with local (Exim 3.36 #1 (Debian)) id 1IIdsT-0001dn-00; Wed, 08 Aug 2007 07:14:37 +0200 To: akpm@linux-foundation.org CC: jlayton@redhat.com, codalist@telemann.coda.cs.cmu.edu, cluster-devel@redhat.com, jfs-discussion@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, reiserfs-devel@vger.kernel.org, zippel@linux-m68k.org, xfs@oss.sgi.com, linux-kernel@vger.kernel.org, wli@holomorphy.com, joel.becker@oracle.com, dhowells@redhat.com, fuse-devel@lists.sourceforge.net, jffs-dev@axis.com, user-mode-linux-user@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, linux-ext4@vger.kernel.org, linux-cifs-client@lists.samba.org, ocfs2-devel@oss.oracle.com, bfennema@falcon.csc.calpoly.edu In-reply-to: <20070807171501.e31c4a97.akpm@linux-foundation.org> (message from Andrew Morton on Tue, 7 Aug 2007 17:15:01 -0700) Subject: Re: [fuse-devel] [PATCH 00/25] move handling of setuid/gid bits from VFS into individual setattr functions (RESEND) References: <200708061354.l76Ds3mU002255@dantu.rdu.redhat.com> <20070807171501.e31c4a97.akpm@linux-foundation.org> Message-Id: From: Miklos Szeredi Date: Wed, 08 Aug 2007 07:14:37 +0200 X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12507 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: miklos@szeredi.hu Precedence: bulk X-list: xfs > >From a purely practical standpoint: it's a concern that all filesytems need > patching to continue to correctly function after this change. There might > be filesystems which you missed, and there are out-of-tree filesystems > which won't be updated. > > And I think the impact upon the out-of-tree filesystems would be fairly > severe: they quietly and subtly get their secutiry guarantees broken (I > think?) > > Is there any way in which we can prevent these problems? Say > > - rename something so that unconverted filesystems will reliably fail to > compile? Maybe renaming ATTR_MODE to ATTR_MODE_SET (changing it's value as well, so that binary stuff breaks visibly as well)? This would make sense, because we are changing what this attribute acually means. In the new code attr->ia_mode only contains the originally set mode, not the ones we've added to change the suid bits. Miklos From owner-xfs@oss.sgi.com Tue Aug 7 22:16:58 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 22:17:02 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_50 autolearn=ham version=3.2.0-pre1-r499012 Received: from relay.sgi.com (netops-testserver-3.corp.sgi.com [192.26.57.72]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l785Gvbm003434 for ; Tue, 7 Aug 2007 22:16:58 -0700 Received: from mtv-amer002e--3.americas.sgi.com (unknown [192.26.64.114]) by netops-testserver-3.corp.sgi.com (Postfix) with ESMTP id 14F6190898 for ; Tue, 7 Aug 2007 22:01:33 -0700 (PDT) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: qa 166 failure on f8 kernel Date: Tue, 7 Aug 2007 21:13:15 -0700 Message-ID: In-Reply-To: <20070808025615.GH52011508@sgi.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: qa 166 failure on f8 kernel Thread-Index: AcfZZ8/+CsI7MncITCidZk+cUHULrAAClkhQ From: "Alex Elder" To: "David Chinner" , "Eric Sandeen" Cc: "xfs-oss" X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id l785Gwbm003440 X-archive-position: 12508 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: aelder@sgi.com Precedence: bulk X-list: xfs > From: xfs-bounce@oss.sgi.com > [mailto:xfs-bounce@oss.sgi.com]On Behalf Of > David Chinner > Sent: Tuesday, August 07, 2007 9:56 PM > To: Eric Sandeen > Cc: xfs-oss > Subject: Re: qa 166 failure on f8 kernel ... > mmap dirties entire pages. page size differs between platforms - > ia64 = 16k, x86 = 4k - so the size of the extent allocated is > different. Guess what platform I wrote the test on and use as my > primary platform? > > The output needs better filtering, methinks. Could the test be changed so the output is pagesize independent rather than filtering the output? Or maybe the test should use a buffer size that's the LCM of all supported page sizes. I'm not actually familiar with the test, so forgive me if I'm way off... -Alex From owner-xfs@oss.sgi.com Tue Aug 7 22:47:13 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 07 Aug 2007 22:47:18 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=AWL,BAYES_50 autolearn=ham version=3.2.0-pre1-r499012 Received: from postoffice.aconex.com (mail.app.aconex.com [203.89.192.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l785lBbm009371 for ; Tue, 7 Aug 2007 22:47:12 -0700 Received: from mail.aconex.com (castle.yarra.acx [192.168.3.3]) by postoffice.aconex.com (Postfix) with ESMTP id B1AD9120DDD2; Wed, 8 Aug 2007 15:47:14 +1000 (EST) Received: from 192.168.3.1 (proxying for 211.28.181.43) (SquirrelMail authenticated user nscott) by mail.aconex.com with HTTP; Wed, 8 Aug 2007 15:47:29 +1000 (EST) Message-ID: <37268.192.168.3.1.1186552049.squirrel@mail.aconex.com> In-Reply-To: References: Date: Wed, 8 Aug 2007 15:47:29 +1000 (EST) Subject: RE: qa 166 failure on f8 kernel From: nscott@aconex.com To: "Alex Elder" Cc: "David Chinner" , "Eric Sandeen" , "xfs-oss" User-Agent: SquirrelMail/1.4.8-4.el4.centos MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12509 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: nscott@aconex.com Precedence: bulk X-list: xfs >> From: xfs-bounce@oss.sgi.com >> [mailto:xfs-bounce@oss.sgi.com]On Behalf Of >> David Chinner >> Sent: Tuesday, August 07, 2007 9:56 PM >> To: Eric Sandeen >> Cc: xfs-oss >> Subject: Re: qa 166 failure on f8 kernel > ... >> mmap dirties entire pages. page size differs between platforms - >> ia64 = 16k, x86 = 4k - so the size of the extent allocated is >> different. Guess what platform I wrote the test on and use as my >> primary platform? >> >> The output needs better filtering, methinks. > > Could the test be changed so the output is pagesize independent > rather than filtering the output? Or maybe the test should > use a buffer size that's the LCM of all supported page sizes. > FWIW, xfs-cmds/xfstests/src/feature.c will tell you the page size (-s); with that you can accurately filter the output and not lose any info. cheers. -- Nathan From owner-xfs@oss.sgi.com Wed Aug 8 01:14:21 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 01:14:26 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l788EFbm011124 for ; Wed, 8 Aug 2007 01:14:19 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id SAA00573; Wed, 8 Aug 2007 18:14:14 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 4BF9458C1762; Wed, 8 Aug 2007 18:14:14 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: TAKE 968837 - fix nasty quota hashtable allocation bug Message-Id: <20070808081414.4BF9458C1762@chook.melbourne.sgi.com> Date: Wed, 8 Aug 2007 18:14:14 +1000 (EST) From: dgc@sgi.com (David Chinner) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12510 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs fix nasty quota hashtable allocation bug This git mod: 77e4635ae191774526ed695482a151ac986f3806 converted to a "greedy" allocation interface, but for the quota hashtables it switched from allocating XFS_QM_HASHSIZE (nr of elements) xfs_dqhash_t's to allocating only XFS_QM_HASHSIZE *bytes* - quite a lot smaller! Then when we converted hsize "back" to nr of elements (the division line) hsize went to 0. This was leading to oopses when running any quota tests on the Fedora 8 test kernel, but the problem has been there for almost a year. Signed-off-by: Eric Sandeen Date: Wed Aug 8 18:13:50 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: sandeen@sandeen.net The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29354a fs/xfs/quota/xfs_qm.c - 1.52 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/quota/xfs_qm.c.diff?r1=text&tr1=1.52&r2=text&tr2=1.51&f=h - correct the quota hash allocation size so we allocate a hash the size we mean and not something a lot smaller. From owner-xfs@oss.sgi.com Wed Aug 8 03:40:23 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 03:40:26 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_05,RCVD_IN_DNSWL_HI autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l78AeKbm022883 for ; Wed, 8 Aug 2007 03:40:22 -0700 Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 0A36D122A9 for ; Wed, 8 Aug 2007 12:40:25 +0200 (CEST) From: Andi Kleen Organization: SUSE Linux Products GmbH, Nuernberg, GF: Markus Rex, HRB 16746 (AG Nuernberg) To: xfs@oss.sgi.com Subject: XFS thread inflation in 2.6.23rc Date: Wed, 8 Aug 2007 12:40:21 +0200 User-Agent: KMail/1.9.6 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708081240.21548.ak@suse.de> X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12511 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: ak@suse.de Precedence: bulk X-list: xfs In 2.6.23rc I have a new kernel thread running from XFS: 30137 ? S< 0:00 [xfs_mru_cache] Is that one really needed? Can it be started only on demand when that MRU feature is used? Thanks, -Andi From owner-xfs@oss.sgi.com Wed Aug 8 05:14:08 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 05:14:14 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l78CE3bm021823 for ; Wed, 8 Aug 2007 05:14:07 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id WAA07234; Wed, 8 Aug 2007 22:14:03 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l78CE0eW54564834; Wed, 8 Aug 2007 22:14:01 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l78CDxoH54624800; Wed, 8 Aug 2007 22:13:59 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Wed, 8 Aug 2007 22:13:59 +1000 From: David Chinner To: Andi Kleen Cc: xfs@oss.sgi.com Subject: Re: XFS thread inflation in 2.6.23rc Message-ID: <20070808121359.GP52011508@sgi.com> References: <200708081240.21548.ak@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200708081240.21548.ak@suse.de> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12512 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Wed, Aug 08, 2007 at 12:40:21PM +0200, Andi Kleen wrote: > > In 2.6.23rc I have a new kernel thread running from XFS: > > 30137 ? S< 0:00 [xfs_mru_cache] > > Is that one really needed? Can it be started only on demand when that MRU > feature is used? It uses a single threaded workqueue for reaping objects and the thread comes along with that. Creating the workqueue on demand would require creating a kernel thread inside a transaction and that's not some thing we want to do. It can't really be put into an existing thread/workqueue because of deadlock problems which is why it has it's own workqueue.... Besides, what's the point of having nice constructs like dedicated workqueues if people complain when they get used to solve problems? Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Wed Aug 8 05:22:13 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 05:22:18 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-5.6 required=5.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.0-pre1-r499012 Received: from mx2.suse.de (ns2.suse.de [195.135.220.15]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l78CMBbm024435 for ; Wed, 8 Aug 2007 05:22:13 -0700 Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id C042B21967; Wed, 8 Aug 2007 14:22:13 +0200 (CEST) From: Andi Kleen Organization: SUSE Linux Products GmbH, Nuernberg, GF: Markus Rex, HRB 16746 (AG Nuernberg) To: David Chinner Subject: Re: XFS thread inflation in 2.6.23rc Date: Wed, 8 Aug 2007 14:22:10 +0200 User-Agent: KMail/1.9.6 Cc: xfs@oss.sgi.com References: <200708081240.21548.ak@suse.de> <20070808121359.GP52011508@sgi.com> In-Reply-To: <20070808121359.GP52011508@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708081422.10373.ak@suse.de> X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12513 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: ak@suse.de Precedence: bulk X-list: xfs On Wednesday 08 August 2007 14:13:59 David Chinner wrote: > On Wed, Aug 08, 2007 at 12:40:21PM +0200, Andi Kleen wrote: > > > > In 2.6.23rc I have a new kernel thread running from XFS: > > > > 30137 ? S< 0:00 [xfs_mru_cache] > > > > Is that one really needed? Can it be started only on demand when that MRU > > feature is used? > > It uses a single threaded workqueue for reaping objects and the thread comes > along with that. Creating the workqueue on demand would require creating a > kernel thread inside a transaction and that's not some thing we want to do. Why not? I can't think of any possible problem except memory allocation recursion, but even that should be handled. > Besides, what's the point of having nice constructs like dedicated > workqueues It's a resource that shouldn't be overused. Especially for such a obscure feature -- i remember reviewing your rationale for the MRU cache and the probability of this applying to 99.9+% of users ever is pretty small. If you insist adding such things make them as least as unobtrusive as possible. > if people complain when they get used to solve problems? Does XFS really need that many threads? Seems doubtful to me. Ok part of the problem is that the workqueues are a little dumb. e.g. it's highly doubtful per SMT thread workqueues really make any sense. It would be probably enough to have one per socket or one per node. But that's a separate issue from just gratuitously adding new ones. -Andi From owner-xfs@oss.sgi.com Wed Aug 8 05:23:34 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 05:23:39 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_50 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail.lichtvoll.de (mondschein.lichtvoll.de [194.150.191.11]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l78CNWbm025004 for ; Wed, 8 Aug 2007 05:23:34 -0700 Received: from dhcp-190-24.of.teamix.net (blackhole.teamix.net [194.150.191.251]) by mail.lichtvoll.de (Postfix) with ESMTP id 334245AD96 for ; Wed, 8 Aug 2007 14:27:39 +0200 (CEST) From: Martin Steigerwald To: linux-xfs@oss.sgi.com Subject: Impact of atime updates on XFS Date: Wed, 8 Aug 2007 14:23:34 +0200 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708081423.34330.Martin@lichtvoll.de> X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12514 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: Martin@lichtvoll.de Precedence: bulk X-list: xfs Hello! Today, I read about the impact of atime updates on ext3 and possible approaches on how to reduce that impact by using relatime, a modified version of relatime - Ingo Molnar posted a patch - or two different states of dirty inodes, atime dirty inodes which do not need to be flushed soon and dirty inodes with other changes which should be flushed soon[1]. What would be the impact of atime versus noatime on XFS? What is the recommended setting for XFS? Are there any plans to implement relatime logic - maybe even the improved one by Ingo Molnar - into XFS? I just remounted my partitions on the notebook and my workstation with noatime for testing and I have the feeling that it indeed does help. What are experiences of others? [1] http://kerneltrap.org/node/14148 Regards, -- Martin 'Helios' Steigerwald - http://www.Lichtvoll.de GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7 From owner-xfs@oss.sgi.com Wed Aug 8 05:30:54 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 05:30:57 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,J_CHICKENPOX_12 autolearn=no version=3.2.0-pre1-r499012 Received: from rproxy.teamix.net (team.teamix.net [194.150.191.72]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l78CUqbm027228 for ; Wed, 8 Aug 2007 05:30:54 -0700 Received: from mango.of.teamix.net (unknown [172.21.123.1]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by rproxy.teamix.net (Postfix) with ESMTP id 64A8347E4E for ; Wed, 8 Aug 2007 12:07:14 +0000 (UTC) From: Martin Steigerwald Organization: team(ix) GmbH To: xfs@oss.sgi.com Subject: Impact of atime updates on XFS Date: Wed, 8 Aug 2007 14:07:51 +0200 User-Agent: KMail/1.9.5 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart6672721.czGhctzodD"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200708081408.01817.ms@teamix.de> X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12515 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: ms@teamix.de Precedence: bulk X-list: xfs --nextPart6672721.czGhctzodD Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello! Today, I read about the impact of atime updates on ext3 and possible=20 approaches on how to reduce that impact by using relatime, a modified versi= on=20 of relatime - Ingo Molnar posted a patch - or two different states of dirty= =20 inodes, atime dirty inodes which do not need to be flushed soon and dirty= =20 inodes with other changes which should be flushed soon[1]. What would be the impact of atime versus noatime on XFS? What is the=20 recommended setting for XFS? Are there any plans to implement relatime=20 logic - maybe even the improved one by Ingo Molnar - into XFS? I just remounted my partitions on the notebook and my workstation with noat= ime=20 for testing and I have the feeling that it indeed does help. [1] http://kerneltrap.org/node/14148 Regards, --=20 Martin Steigerwald - team(ix) GmbH - http://www.teamix.de gpg: 19E3 8D42 896F D004 08AC A0CA 1E10 C593 0399 AE90 --nextPart6672721.czGhctzodD Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBGubIhHhDFkwOZrpARAgoYAJ91rpXXQFtBChdWm/ph9o5LhF1G/wCfazLx McgykjdGegfwbP7FMAYzZL0= =6q23 -----END PGP SIGNATURE----- --nextPart6672721.czGhctzodD-- From owner-xfs@oss.sgi.com Wed Aug 8 05:30:54 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 05:30:58 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,J_CHICKENPOX_12 autolearn=no version=3.2.0-pre1-r499012 Received: from rproxy.teamix.net (team.teamix.net [194.150.191.72]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l78CUqbm027227 for ; Wed, 8 Aug 2007 05:30:54 -0700 Received: from mango.of.teamix.net (unknown [172.21.123.1]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by rproxy.teamix.net (Postfix) with ESMTP id 38F7547E4F for ; Wed, 8 Aug 2007 12:11:57 +0000 (UTC) From: Martin Steigerwald Organization: team(ix) GmbH To: xfs@oss.sgi.com Subject: Impact of atime updates on XFS User-Agent: KMail/1.9.5 MIME-Version: 1.0 X-UID: 1992 X-Length: 1965 Date: Wed, 8 Aug 2007 14:12:47 +0200 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708081412.47772.ms@teamix.de> X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12516 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: ms@teamix.de Precedence: bulk X-list: xfs Hello! Today, I read about the impact of atime updates on ext3 and possible approaches on how to reduce that impact by using relatime, a modified version of relatime - Ingo Molnar posted a patch - or two different states of dirty inodes, atime dirty inodes which do not need to be flushed soon and dirty inodes with other changes which should be flushed soon[1]. What would be the impact of atime versus noatime on XFS? What is the recommended setting for XFS? Are there any plans to implement relatime logic - maybe even the improved one by Ingo Molnar - into XFS? I just remounted my partitions on the notebook and my workstation with noatime for testing and I have the feeling that it indeed does help. [1] http://kerneltrap.org/node/14148 Regards, -- Martin Steigerwald - team(ix) GmbH - http://www.teamix.de gpg: 19E3 8D42 896F D004 08AC A0CA 1E10 C593 0399 AE90 From owner-xfs@oss.sgi.com Wed Aug 8 05:56:11 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 05:56:21 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-6.2 required=5.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_MED,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l78Cu8bm002902 for ; Wed, 8 Aug 2007 05:56:11 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l78CsaLM029178; Wed, 8 Aug 2007 08:54:36 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l78CsaeP009617; Wed, 8 Aug 2007 08:54:36 -0400 Received: from dantu.rdu.redhat.com (dantu.rdu.redhat.com [172.16.57.196]) by pobox.corp.redhat.com (8.13.1/8.13.1) with SMTP id l78CsZ03013302; Wed, 8 Aug 2007 08:54:35 -0400 Date: Wed, 8 Aug 2007 08:54:35 -0400 From: Jeff Layton To: Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com Subject: Re: [PATCH 00/25] move handling of setuid/gid bits from VFS into individual setattr functions (RESEND) Message-Id: <20070808085435.722f2b10.jlayton@redhat.com> In-Reply-To: <20070807171501.e31c4a97.akpm@linux-foundation.org> References: <200708061354.l76Ds3mU002255@dantu.rdu.redhat.com> <20070807171501.e31c4a97.akpm@linux-foundation.org> X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.14; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12517 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jlayton@redhat.com Precedence: bulk X-list: xfs On Tue, 7 Aug 2007 17:15:01 -0700 Andrew Morton wrote: > On Mon, 6 Aug 2007 09:54:03 -0400 > Jeff Layton wrote: > > > Apologies for the resend, but the original sending had the date in the > > email header and it caused some of these to bounce... > > > > ( Please consider trimming the Cc list if discussing some aspect of this > > that doesn't concern everyone.) > > > > When an unprivileged process attempts to modify a file that has the > > setuid or setgid bits set, the VFS will attempt to clear these bits. The > > VFS will set the ATTR_KILL_SUID or ATTR_KILL_SGID bits in the ia_valid > > mask, and then call notify_change to clear these bits and set the mode > > accordingly. > > > > With a networked filesystem (NFS in particular but most likely others), > > the client machine may not have credentials that allow for the clearing > > of these bits. In some situations, this can lead to file corruption, or > > to an operation failing outright because the setattr fails. > > > > In this situation, we'd like to just leave the handling of this to > > the server and ignore these bits. The problem is that by the time > > nfs_setattr is called, the VFS has already reinterpreted the ATTR_KILL_* > > bits into a mode change. We can't fix this in the filesystems where > > this is a problem, as doing so would leave us having to second-guess > > what the VFS wants us to do. So we need to change it so that filesystems > > have more flexibility in how to interpret the ATTR_KILL_* bits. > > > > The first patch in the following patchset moves this logic into a helper > > function, and then only calls this helper function for inodes that do > > not have a setattr operation defined. The subsequent patches fix up > > individual filesystem setattr functions to call this helper function. > > > > The upshot of this is that with this change, filesystems that define > > a setattr inode operation are now responsible for handling the ATTR_KILL > > bits as well. They can trivially do so by calling the helper, but they > > must do so. > > > > Some of the follow-on patches may not be strictly necessary, but I > > decided that it was better to take the conservative approach and call > > the helper when I wasn't sure. I've tried to CC the maintainers > > for the individual filesystems as well where I could find them, > > please let me know if there are others who should be informed. > > > > Comments and suggestions appreciated... > > > > From a purely practical standpoint: it's a concern that all filesytems need > patching to continue to correctly function after this change. There might > be filesystems which you missed, and there are out-of-tree filesystems > which won't be updated. > > And I think the impact upon the out-of-tree filesystems would be fairly > severe: they quietly and subtly get their secutiry guarantees broken (I > think?) > Yep. Any filesystem that declares a setattr op will have to deal with the ATTR_KILL_S* flags themselves. The breakage will be silent too. > Is there any way in which we can prevent these problems? Say > > - rename something so that unconverted filesystems will reliably fail to > compile? > I suppose we could rename the .setattr inode operation to something else, but then we'll be stuck with it for at least a while. That seems sort of kludgey too... > - leave existing filesystems alone, but add a new > inode_operations.setattr_jeff, which the networked filesytems can > implement, and teach core vfs to call setattr_jeff in preference to > setattr? > > Something else? There's also the approach suggested by Miklos: Add a new inode flag that tells notify_change not to convert ATTR_KILL_S* flags into a mode change. Basically, allow filesystems to "opt out" of that behavior. I'd definitly pick that over a new inode op. That would also allow the default case be for the VFS to continue handling these flags. Everything would continue to work but filesystems that need to handle these flags differently would be able to do so. Thoughts? -- Jeff Layton From owner-xfs@oss.sgi.com Wed Aug 8 06:14:11 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 06:14:15 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l78DE7bm008349 for ; Wed, 8 Aug 2007 06:14:09 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id XAA09308; Wed, 8 Aug 2007 23:14:07 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l78DE5eW54573008; Wed, 8 Aug 2007 23:14:06 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l78DE4bN54739235; Wed, 8 Aug 2007 23:14:04 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Wed, 8 Aug 2007 23:14:04 +1000 From: David Chinner To: Andi Kleen Cc: xfs@oss.sgi.com Subject: Re: XFS thread inflation in 2.6.23rc Message-ID: <20070808131404.GQ52011508@sgi.com> References: <200708081240.21548.ak@suse.de> <20070808121359.GP52011508@sgi.com> <200708081422.10373.ak@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200708081422.10373.ak@suse.de> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12518 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Wed, Aug 08, 2007 at 02:22:10PM +0200, Andi Kleen wrote: > On Wednesday 08 August 2007 14:13:59 David Chinner wrote: > > On Wed, Aug 08, 2007 at 12:40:21PM +0200, Andi Kleen wrote: > > > > > > In 2.6.23rc I have a new kernel thread running from XFS: > > > > > > 30137 ? S< 0:00 [xfs_mru_cache] > > > > > > Is that one really needed? Can it be started only on demand when that MRU > > > feature is used? > > > > It uses a single threaded workqueue for reaping objects and the thread comes > > along with that. Creating the workqueue on demand would require creating a > > kernel thread inside a transaction and that's not some thing we want to do. > > Why not? I can't think of any possible problem except memory allocation > recursion, but even that should be handled. Memory allocation failure + dirty transaction == filesystem shutdown. Bad, bad, bad, bad. > > Besides, what's the point of having nice constructs like dedicated > > workqueues > > It's a resource that shouldn't be overused. A workqueue + thread uses, what, 10-15k of memory? That's the cost of about 10 cached inodes. It is insignificant... > Especially for such a obscure feature -- i remember reviewing your > rationale for the MRU cache and the probability of this applying > to 99.9+% of users ever is pretty small. If you insist adding such > things make them as least as unobtrusive as possible. Sure, it was written for a small market, but it's useful for other workloads. e.g. got a heavy tmp file load? Mark /tmp as a filestream directory and all your temp files end up in one location on disk and don't pollute and fragment everything else. Got a PVR that records multiple streams at once? I wouldn't reject this out of hand as not useful. It was created for the specific purpose of workload isolation and that can be used in many different ways.... > > if people complain when they get used to solve problems? > > Does XFS really need that many threads? Seems doubtful to me. XFS is much more threaded than any other linux filesystem. It does lots of stuff asynchronously and that's where the threads and workqueues come in. They fit in very closely with the nature of XFS which is to do as much stuff concurrently as possible on as many CPUs as possible. Hmmm. I guess you are really not going to like the patch I have that moves the AIL pushing to a new thread to solve some of scalability issues in the transaction subsystem...... > Ok part of the problem is that the workqueues are a little dumb. > e.g. it's highly doubtful per SMT thread workqueues really make > any sense. It would be probably enough to have one per socket or > one per node. Agreed, but that is a workqueue implementation detail, not a reason for preventing ppl from using workqueues. > But that's a separate issue from just gratuitously adding new ones. Call it what you will. Threads and workqueues are there to be used and they cost very little for the flexibility and concurrency they provide us. Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Wed Aug 8 06:17:23 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 06:17:27 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l78DHHbm010303 for ; Wed, 8 Aug 2007 06:17:21 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id XAA09531; Wed, 8 Aug 2007 23:17:17 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l78DHFeW54677942; Wed, 8 Aug 2007 23:17:15 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l78DHDG854739979; Wed, 8 Aug 2007 23:17:13 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Wed, 8 Aug 2007 23:17:13 +1000 From: David Chinner To: Christoph Hellwig Cc: David Chinner , Eric Sandeen , xfs-oss Subject: Re: qa 166 failure on f8 kernel Message-ID: <20070808131713.GR52011508@sgi.com> References: <46B91EBA.10407@sandeen.net> <20070808025615.GH52011508@sgi.com> <46B9316A.40508@sandeen.net> <20070808040804.GJ52011508@sgi.com> <20070808131319.GA11451@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070808131319.GA11451@infradead.org> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12519 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Wed, Aug 08, 2007 at 02:13:19PM +0100, Christoph Hellwig wrote: > On Wed, Aug 08, 2007 at 02:08:04PM +1000, David Chinner wrote: > > On Tue, Aug 07, 2007 at 09:58:50PM -0500, Eric Sandeen wrote: > > > yeah, figured it had something to do w/ the ia64 weenies when I saw the > > > 32 vs. 8, factor of 4 ... fine, fine, my bad. :) > > > > No, not your bad. Mine if anyones because I wrote the test. > > Ia64 supports 4k, 8k, 16k and 64k base pagesize. Time to add a little > script to make the pagesize random for your kernel builds? Interesting idea. Definitely worth considering for the randomised mkfs/mount option config QA runs we already do.... Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Wed Aug 8 06:26:09 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 06:26:17 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-7.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.suse.de (ns.suse.de [195.135.220.2]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l78DQ5bm013309 for ; Wed, 8 Aug 2007 06:26:08 -0700 Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 68715124CE; Wed, 8 Aug 2007 15:26:09 +0200 (CEST) From: Andi Kleen Organization: SUSE Linux Products GmbH, Nuernberg, GF: Markus Rex, HRB 16746 (AG Nuernberg) To: David Chinner Subject: Re: XFS thread inflation in 2.6.23rc Date: Wed, 8 Aug 2007 15:26:06 +0200 User-Agent: KMail/1.9.6 Cc: xfs@oss.sgi.com References: <200708081240.21548.ak@suse.de> <200708081422.10373.ak@suse.de> <20070808131404.GQ52011508@sgi.com> In-Reply-To: <20070808131404.GQ52011508@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708081526.06860.ak@suse.de> X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12520 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: ak@suse.de Precedence: bulk X-list: xfs On Wednesday 08 August 2007 15:14:04 David Chinner wrote: > Memory allocation failure + dirty transaction == filesystem shutdown. You mean if the workqueue creation would fail? Surely not having the MRU cache is not a catastrophe and would allow the transaction to commit anyways? The other alternative would be to start it when a directory with the flag is first seen. That should be before any transactions. The other thing is that it would be nasty to switch do_fork to use GFP_NOFS, but I doubt that's really needed. > > > Besides, what's the point of having nice constructs like dedicated > > > workqueues > > > > It's a resource that shouldn't be overused. > > A workqueue + thread uses, what, 10-15k of memory? That's the cost of about > 10 cached inodes. It is insignificant... A little bloat here and a little bloat there and soon we're talking about serious memory. e.g. on a dual core box in a standard configuration we're going towards ~50 kernel threads out of the box now and that's just too much IMNSHO. Given there are other really bad wastes of memory (don't get me started on some of the hash tables), but it's not totally insignificant. Threads also have some CPU costs even when sleeping, e.g. there is still code which walks all threads to do various things. > Hmmm. I guess you are really not going to like the patch I > have that moves the AIL pushing to a new thread to solve > some of scalability issues in the transaction subsystem...... Per CPU or single? If the later definitely the workqueues would need to be fixed first. -Andi From owner-xfs@oss.sgi.com Wed Aug 8 06:29:01 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 06:29:08 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l78DSvbm014427 for ; Wed, 8 Aug 2007 06:29:00 -0700 Received: from hch by pentafluge.infradead.org with local (Exim 4.63 #1 (Red Hat Linux)) id 1IIlLj-0003AC-HQ; Wed, 08 Aug 2007 14:13:19 +0100 Date: Wed, 8 Aug 2007 14:13:19 +0100 From: Christoph Hellwig To: David Chinner Cc: Eric Sandeen , xfs-oss Subject: Re: qa 166 failure on f8 kernel Message-ID: <20070808131319.GA11451@infradead.org> References: <46B91EBA.10407@sandeen.net> <20070808025615.GH52011508@sgi.com> <46B9316A.40508@sandeen.net> <20070808040804.GJ52011508@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070808040804.GJ52011508@sgi.com> User-Agent: Mutt/1.4.2.3i X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12521 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: xfs On Wed, Aug 08, 2007 at 02:08:04PM +1000, David Chinner wrote: > On Tue, Aug 07, 2007 at 09:58:50PM -0500, Eric Sandeen wrote: > > yeah, figured it had something to do w/ the ia64 weenies when I saw the > > 32 vs. 8, factor of 4 ... fine, fine, my bad. :) > > No, not your bad. Mine if anyones because I wrote the test. Ia64 supports 4k, 8k, 16k and 64k base pagesize. Time to add a little script to make the pagesize random for your kernel builds? From owner-xfs@oss.sgi.com Wed Aug 8 06:56:38 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 06:56:42 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail.lichtvoll.de (mondschein.lichtvoll.de [194.150.191.11]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l78Duabm022139 for ; Wed, 8 Aug 2007 06:56:37 -0700 Received: from dhcp-190-24.of.teamix.net (blackhole.teamix.net [194.150.191.251]) by mail.lichtvoll.de (Postfix) with ESMTP id 93A155AD96 for ; Wed, 8 Aug 2007 16:00:45 +0200 (CEST) From: Martin Steigerwald To: linux-xfs@oss.sgi.com Subject: Re: Impact of atime updates on XFS Date: Wed, 8 Aug 2007 15:56:40 +0200 User-Agent: KMail/1.9.7 References: <200708081423.34330.Martin@lichtvoll.de> (sfid-20070808_143744_321805_8011EA5B) In-Reply-To: <200708081423.34330.Martin@lichtvoll.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708081556.40222.Martin@lichtvoll.de> X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12522 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: Martin@lichtvoll.de Precedence: bulk X-list: xfs Sorry for three of these... I should have exercised more patience. Well at least the spamfilter lets my mails through again... -- Martin 'Helios' Steigerwald - http://www.Lichtvoll.de GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7 From owner-xfs@oss.sgi.com Wed Aug 8 09:09:29 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 09:09:34 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_53, J_CHICKENPOX_63,SPF_HELO_PASS autolearn=no version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l78G9Sbm028949 for ; Wed, 8 Aug 2007 09:09:29 -0700 Received: from liberator.sandeen.net (liberator.sandeen.net [10.0.0.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 66DEB1807E35C; Wed, 8 Aug 2007 11:09:32 -0500 (CDT) Message-ID: <46B9EABD.9010901@sandeen.net> Date: Wed, 08 Aug 2007 11:09:33 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: James Pearson CC: xfs@oss.sgi.com, James Braid Subject: Re: New CentOS4/RHEL4-compatible xfs module rpms References: <46B9E98D.9070401@moving-picture.com> In-Reply-To: <46B9E98D.9070401@moving-picture.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12523 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs James Pearson wrote: >>> That's odd. You have the module on the server, exporting an xfs >>> filesystem, and you're getting permission denied on the client? >> Yep. And rmmod'ing the updated XFS module and insmod'ing the older >> module makes it work again. > > The 'stock' RHEL4/CentOS4 kernels don't have xfs modules - so, I guess > you have rebuilt your kernel with the XFS code that is there by default? > > If this is the case, then this _may be_ the cause of the problem ... the > updated xfs module code uses any existing XFS configs in the kernel you > are building against - the Makefile states: > > # Set up our config. > # > # If the kernel already has an XFS config, use it. > # Else if config.xfs is here, use it for our config. Otherwise, > # Else default to only CONFIG_XFS_FS=m (simplest config) > > The problem is that the 'stock' 2.6.9 kernel doesn't define (or use) > CONFIG_XFS_EXPORT - but the updated xfs module code requires this to > allow NFS exports of a XFS file system ... > > So my guess is that your re-built updated xfs modules don't use > CONFIG_XFS_EXPORT > > I guess with a bit of hacking to the Makefile, you could force > 'CONFIG_XFS_EXPORT=y' to be added - you might even be able to do this > via the rpmbuild command line ... although I don't know how. Ah, that may well be it. yeah, the rpm needs to set its own config options since the centos kernel has no xfs config. (Sorry, I just haven't had time to look into it yet) - but I bet you're right that setting the config option in the makefile in the rpm will fix things right up! -Eric From owner-xfs@oss.sgi.com Wed Aug 8 09:22:37 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 09:22:41 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_50,J_CHICKENPOX_53, J_CHICKENPOX_63 autolearn=no version=3.2.0-pre1-r499012 Received: from moving-picture.com (mpc-26.sohonet.co.uk [193.203.82.251]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l78GMYbm000519 for ; Wed, 8 Aug 2007 09:22:36 -0700 Received: from minion.mpc.local ([172.16.11.112]:37937 helo=moving-picture.com) by moving-picture.com with esmtp (Exim 4.43) id 1IIo1N-00048A-Lv; Wed, 08 Aug 2007 17:04:29 +0100 Message-ID: <46B9E98D.9070401@moving-picture.com> Date: Wed, 08 Aug 2007 17:04:29 +0100 From: James Pearson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040524 X-Accept-Language: en-us, en MIME-Version: 1.0 To: xfs@oss.sgi.com, James Braid CC: Eric Sandeen Subject: Re: New CentOS4/RHEL4-compatible xfs module rpms Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Disclaimer: This email and any attachments are confidential, may be legally X-Disclaimer: privileged and intended solely for the use of addressee. If you X-Disclaimer: are not the intended recipient of this message, any disclosure, X-Disclaimer: copying, distribution or any action taken in reliance on it is X-Disclaimer: strictly prohibited and may be unlawful. If you have received X-Disclaimer: this message in error, please notify the sender and delete all X-Disclaimer: copies from your system. X-Disclaimer: X-Disclaimer: Email may be susceptible to data corruption, interception and X-Disclaimer: unauthorised amendment, and we do not accept liability for any X-Disclaimer: such corruption, interception or amendment or the consequences X-Disclaimer: thereof. X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12524 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: james-p@moving-picture.com Precedence: bulk X-list: xfs >> That's odd. You have the module on the server, exporting an xfs >> filesystem, and you're getting permission denied on the client? > > Yep. And rmmod'ing the updated XFS module and insmod'ing the older > module makes it work again. The 'stock' RHEL4/CentOS4 kernels don't have xfs modules - so, I guess you have rebuilt your kernel with the XFS code that is there by default? If this is the case, then this _may be_ the cause of the problem ... the updated xfs module code uses any existing XFS configs in the kernel you are building against - the Makefile states: # Set up our config. # # If the kernel already has an XFS config, use it. # Else if config.xfs is here, use it for our config. Otherwise, # Else default to only CONFIG_XFS_FS=m (simplest config) The problem is that the 'stock' 2.6.9 kernel doesn't define (or use) CONFIG_XFS_EXPORT - but the updated xfs module code requires this to allow NFS exports of a XFS file system ... So my guess is that your re-built updated xfs modules don't use CONFIG_XFS_EXPORT I guess with a bit of hacking to the Makefile, you could force 'CONFIG_XFS_EXPORT=y' to be added - you might even be able to do this via the rpmbuild command line ... although I don't know how. James Pearson From owner-xfs@oss.sgi.com Wed Aug 8 09:50:52 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 09:51:00 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from smtp2.linux-foundation.org (smtp2.linux-foundation.org [207.189.120.14]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l78Gombm007329 for ; Wed, 8 Aug 2007 09:50:51 -0700 Received: from imap1.linux-foundation.org (imap1.linux-foundation.org [207.189.120.55]) by smtp2.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id l78Gn02f020740 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 8 Aug 2007 09:49:01 -0700 Received: from box (localhost [127.0.0.1]) by imap1.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with SMTP id l78GmrP8015532; Wed, 8 Aug 2007 09:48:53 -0700 Date: Wed, 8 Aug 2007 09:48:53 -0700 From: Andrew Morton To: Jeff Layton Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com Subject: Re: [PATCH 00/25] move handling of setuid/gid bits from VFS into individual setattr functions (RESEND) Message-Id: <20070808094853.8c27450c.akpm@linux-foundation.org> In-Reply-To: <20070808085435.722f2b10.jlayton@redhat.com> References: <200708061354.l76Ds3mU002255@dantu.rdu.redhat.com> <20070807171501.e31c4a97.akpm@linux-foundation.org> <20070808085435.722f2b10.jlayton@redhat.com> X-Mailer: Sylpheed 2.4.1 (GTK+ 2.8.17; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: lf$Revision: 1.184 $ X-Scanned-By: MIMEDefang 2.53 on 207.189.120.14 X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12525 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: akpm@linux-foundation.org Precedence: bulk X-list: xfs On Wed, 8 Aug 2007 08:54:35 -0400 Jeff Layton wrote: > On Tue, 7 Aug 2007 17:15:01 -0700 > Andrew Morton wrote: > > > On Mon, 6 Aug 2007 09:54:03 -0400 > > Jeff Layton wrote: > > > > Is there any way in which we can prevent these problems? Say > > > > - rename something so that unconverted filesystems will reliably fail to > > compile? > > > > I suppose we could rename the .setattr inode operation to something > else, but then we'll be stuck with it for at least a while. That seems > sort of kludgey too... Sure. We're changing the required behaviour of .setattr. Changing its name is a fine and reasonably reliable way to communicate that fact. > > - leave existing filesystems alone, but add a new > > inode_operations.setattr_jeff, which the networked filesytems can > > implement, and teach core vfs to call setattr_jeff in preference to > > setattr? > > > > Something else? > > There's also the approach suggested by Miklos: Add a new inode flag that > tells notify_change not to convert ATTR_KILL_S* flags into a mode > change. Basically, allow filesystems to "opt out" of that behavior. > > I'd definitly pick that over a new inode op. That would also allow the > default case be for the VFS to continue handling these flags. > Everything would continue to work but filesystems that need to handle > these flags differently would be able to do so. > We should opt for whatever produces the best end state in the kernel tree. ie: if it takes more work and a larger patch to create a better result, let's go for the better result. We merge large patches all the time. We prefer to smash through, get it right whatever the transient cost. But quietly making out-of-tree filesystems less secure is a pretty high cost. I'm suspecting that adding more flags and some code to test them purely to minimise the size of the patch and to retain compatibility with the old .setattr is not a good tradeoff, given that we'd carry the flags and tests for evermore. So I'd suggest s/setattr/something_else/g. From owner-xfs@oss.sgi.com Wed Aug 8 13:29:00 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 13:29:06 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from sovereign.computergmbh.de (sovereign.computergmbh.de [85.214.69.204]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l78KSvbm030959 for ; Wed, 8 Aug 2007 13:28:59 -0700 Received: by sovereign.computergmbh.de (Postfix, from userid 25121) id F0A11180E1C5F; Wed, 8 Aug 2007 22:05:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by sovereign.computergmbh.de (Postfix) with ESMTP id E84371C012256; Wed, 8 Aug 2007 22:05:13 +0200 (CEST) Date: Wed, 8 Aug 2007 22:05:13 +0200 (CEST) From: Jan Engelhardt To: Andrew Morton cc: Jeff Layton , codalist@TELEMANN.coda.cs.cmu.edu, cluster-devel@redhat.com, jfs-discussion@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, reiserfs-devel@vger.kernel.org, zippel@linux-m68k.org, xfs@oss.sgi.com, linux-kernel@vger.kernel.org, wli@holomorphy.com, joel.becker@oracle.com, dhowells@redhat.com, fuse-devel@lists.sourceforge.net, jffs-dev@axis.com, user-mode-linux-user@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, linux-ext4@vger.kernel.org, linux-cifs-client@lists.samba.org, ocfs2-devel@oss.oracle.com, bfennema@falcon.csc.calpoly.edu Subject: Re: [fuse-devel] [PATCH 00/25] move handling of setuid/gid bits from VFS into individual setattr functions (RESEND) In-Reply-To: <20070808094853.8c27450c.akpm@linux-foundation.org> Message-ID: References: <200708061354.l76Ds3mU002255@dantu.rdu.redhat.com> <20070807171501.e31c4a97.akpm@linux-foundation.org> <20070808085435.722f2b10.jlayton@redhat.com> <20070808094853.8c27450c.akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12526 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jengelh@computergmbh.de Precedence: bulk X-list: xfs On Aug 8 2007 09:48, Andrew Morton wrote: >> > On Mon, 6 Aug 2007 09:54:03 -0400 >> > Jeff Layton wrote: >> > >> > Is there any way in which we can prevent these problems? Say >> > >> > - rename something so that unconverted filesystems will reliably fail to >> > compile? >> > >> >> I suppose we could rename the .setattr inode operation to something >> else, but then we'll be stuck with it for at least a while. That seems >> sort of kludgey too... > >Sure. We're changing the required behaviour of .setattr. Changing its >name is a fine and reasonably reliable way to communicate that fact. Maybe ->chattr/->chgattr? Jan -- From owner-xfs@oss.sgi.com Wed Aug 8 16:08:46 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 16:08:49 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL,BAYES_40,J_CHICKENPOX_43 autolearn=no version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l78N8cbm010542 for ; Wed, 8 Aug 2007 16:08:43 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id JAA27837; Thu, 9 Aug 2007 09:08:38 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l78N8beW55615922; Thu, 9 Aug 2007 09:08:38 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l78N8arx55484114; Thu, 9 Aug 2007 09:08:36 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Thu, 9 Aug 2007 09:08:36 +1000 From: David Chinner To: xfs-dev Cc: xfs-oss Subject: [PATCH 1 of 4] Convert inode hash chains to radix trees Message-ID: <20070808230836.GP12413810@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12528 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs Convert the inode cache hash to a radix tree. A radix tree has been chosen to replace the hash because of a neat alignment of XFS inode structures and the kernel radix tree fanout. XFS allocates inodes in clusters of 64 inodes and the radix tree keeps 64 sequential entries per node. That means all fo the inodes in a cluster will always sit in the same node of the radix tree. A single radix tree with a read/write lock does not provide enough parallelism to prevent performance regressions on multi-processor machines, so we hash the inode clusters into different radix trees each with their own read/write lock. The default is to create (2*ncpus)-1 radix trees up to a maximum of 15. The ihashsize mount option is still present, but it's mostly irrelevant now. Signed-off-by: Dave Chinner --- fs/xfs/xfs_iget.c | 321 +++++++++++++++++++++-------------------------------- fs/xfs/xfs_inode.c | 5 fs/xfs/xfs_inode.h | 8 - fs/xfs/xfsidbg.c | 6 4 files changed, 136 insertions(+), 204 deletions(-) Index: 2.6.x-xfs-new/fs/xfs/xfs_iget.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_iget.c 2007-01-31 13:26:32.636232335 +1100 +++ 2.6.x-xfs-new/fs/xfs/xfs_iget.c 2007-01-31 13:55:37.117047088 +1100 @@ -49,25 +49,24 @@ void xfs_ihash_init(xfs_mount_t *mp) { - __uint64_t icount; uint i; - if (!mp->m_ihsize) { - icount = mp->m_maxicount ? mp->m_maxicount : - (mp->m_sb.sb_dblocks << mp->m_sb.sb_inopblog); - mp->m_ihsize = 1 << max_t(uint, 8, - (xfs_highbit64(icount) + 1) / 2); - mp->m_ihsize = min_t(uint, mp->m_ihsize, - (64 * NBPP) / sizeof(xfs_ihash_t)); + if (!mp->m_ihsize || mp->m_ihsize > 128) { + /* default to (2*cpus) - 1 or 15. */ + mp->m_ihsize = (2 * num_online_cpus()) - 1; + mp->m_ihsize = min_t(size_t, 15, mp->m_ihsize); + printk("mp->m_ihsize %ld\n", mp->m_ihsize); } - mp->m_ihash = kmem_zalloc_greedy(&mp->m_ihsize, + mp->m_ihash = kmem_zalloc_greedy((size_t *)&mp->m_ihsize, NBPC * sizeof(xfs_ihash_t), mp->m_ihsize * sizeof(xfs_ihash_t), KM_SLEEP | KM_MAYFAIL | KM_LARGE); mp->m_ihsize /= sizeof(xfs_ihash_t); - for (i = 0; i < mp->m_ihsize; i++) + for (i = 0; i < mp->m_ihsize; i++) { rwlock_init(&(mp->m_ihash[i].ih_lock)); + INIT_RADIX_TREE(&(mp->m_ihash[i].ih_root), GFP_ATOMIC); + } } /* @@ -89,9 +88,7 @@ xfs_chash_init(xfs_mount_t *mp) { uint i; - mp->m_chsize = max_t(uint, 1, mp->m_ihsize / - (XFS_INODE_CLUSTER_SIZE(mp) >> mp->m_sb.sb_inodelog)); - mp->m_chsize = min_t(uint, mp->m_chsize, mp->m_ihsize); + mp->m_chsize = mp->m_ihsize * 2049; mp->m_chash = (xfs_chash_t *)kmem_zalloc(mp->m_chsize * sizeof(xfs_chash_t), KM_SLEEP | KM_LARGE); @@ -117,40 +114,6 @@ xfs_chash_free(xfs_mount_t *mp) } /* - * Try to move an inode to the front of its hash list if possible - * (and if its not there already). Called right after obtaining - * the list version number and then dropping the read_lock on the - * hash list in question (which is done right after looking up the - * inode in question...). - */ -STATIC void -xfs_ihash_promote( - xfs_ihash_t *ih, - xfs_inode_t *ip, - ulong version) -{ - xfs_inode_t *iq; - - if ((ip->i_prevp != &ih->ih_next) && write_trylock(&ih->ih_lock)) { - if (likely(version == ih->ih_version)) { - /* remove from list */ - if ((iq = ip->i_next)) { - iq->i_prevp = ip->i_prevp; - } - *ip->i_prevp = iq; - - /* insert at list head */ - iq = ih->ih_next; - iq->i_prevp = &ip->i_next; - ip->i_next = iq; - ip->i_prevp = &ih->ih_next; - ih->ih_next = ip; - } - write_unlock(&ih->ih_lock); - } -} - -/* * Look up an inode by number in the given file system. * The inode is looked up in the hash table for the file system * represented by the mount point parameter mp. Each bucket of @@ -209,140 +172,135 @@ xfs_iget_core( again: read_lock(&ih->ih_lock); - for (ip = ih->ih_next; ip != NULL; ip = ip->i_next) { - if (ip->i_ino == ino) { + ip = (xfs_inode_t *)radix_tree_lookup(&ih->ih_root, (unsigned long)ino); + if (ip != NULL) { + /* + * If INEW is set this inode is being set up + * we need to pause and try again. + */ + if (xfs_iflags_test(ip, XFS_INEW)) { + read_unlock(&ih->ih_lock); + delay(1); + XFS_STATS_INC(xs_ig_frecycle); + + goto again; + } + + inode_vp = XFS_ITOV_NULL(ip); + if (inode_vp == NULL) { /* - * If INEW is set this inode is being set up + * If IRECLAIM is set this inode is + * on its way out of the system, * we need to pause and try again. */ - if (xfs_iflags_test(ip, XFS_INEW)) { + if (xfs_iflags_test(ip, XFS_IRECLAIM)) { read_unlock(&ih->ih_lock); delay(1); XFS_STATS_INC(xs_ig_frecycle); goto again; } + ASSERT(xfs_iflags_test(ip, XFS_IRECLAIMABLE)); - inode_vp = XFS_ITOV_NULL(ip); - if (inode_vp == NULL) { - /* - * If IRECLAIM is set this inode is - * on its way out of the system, - * we need to pause and try again. - */ - if (xfs_iflags_test(ip, XFS_IRECLAIM)) { - read_unlock(&ih->ih_lock); - delay(1); - XFS_STATS_INC(xs_ig_frecycle); - - goto again; - } - ASSERT(xfs_iflags_test(ip, XFS_IRECLAIMABLE)); - - /* - * If lookup is racing with unlink, then we - * should return an error immediately so we - * don't remove it from the reclaim list and - * potentially leak the inode. - */ - if ((ip->i_d.di_mode == 0) && - !(flags & XFS_IGET_CREATE)) { - read_unlock(&ih->ih_lock); - return ENOENT; - } - - /* - * There may be transactions sitting in the - * incore log buffers or being flushed to disk - * at this time. We can't clear the - * XFS_IRECLAIMABLE flag until these - * transactions have hit the disk, otherwise we - * will void the guarantee the flag provides - * xfs_iunpin() - */ - if (xfs_ipincount(ip)) { - read_unlock(&ih->ih_lock); - xfs_log_force(mp, 0, - XFS_LOG_FORCE|XFS_LOG_SYNC); - XFS_STATS_INC(xs_ig_frecycle); - goto again; - } - - vn_trace_exit(vp, "xfs_iget.alloc", - (inst_t *)__return_address); - - XFS_STATS_INC(xs_ig_found); - - xfs_iflags_clear(ip, XFS_IRECLAIMABLE); - version = ih->ih_version; + /* + * If lookup is racing with unlink, then we + * should return an error immediately so we + * don't remove it from the reclaim list and + * potentially leak the inode. + */ + if ((ip->i_d.di_mode == 0) && + !(flags & XFS_IGET_CREATE)) { read_unlock(&ih->ih_lock); - xfs_ihash_promote(ih, ip, version); - - XFS_MOUNT_ILOCK(mp); - list_del_init(&ip->i_reclaim); - XFS_MOUNT_IUNLOCK(mp); - - goto finish_inode; - - } else if (vp != inode_vp) { - struct inode *inode = vn_to_inode(inode_vp); - - /* The inode is being torn down, pause and - * try again. - */ - if (inode->i_state & (I_FREEING | I_CLEAR)) { - read_unlock(&ih->ih_lock); - delay(1); - XFS_STATS_INC(xs_ig_frecycle); - - goto again; - } -/* Chances are the other vnode (the one in the inode) is being torn - * down right now, and we landed on top of it. Question is, what do - * we do? Unhook the old inode and hook up the new one? - */ - cmn_err(CE_PANIC, - "xfs_iget_core: ambiguous vns: vp/0x%p, invp/0x%p", - inode_vp, vp); + return ENOENT; } /* - * Inode cache hit: if ip is not at the front of - * its hash chain, move it there now. - * Do this with the lock held for update, but - * do statistics after releasing the lock. + * There may be transactions sitting in the + * incore log buffers or being flushed to disk + * at this time. We can't clear the + * XFS_IRECLAIMABLE flag until these + * transactions have hit the disk, otherwise we + * will void the guarantee the flag provides + * xfs_iunpin() */ + if (xfs_ipincount(ip)) { + read_unlock(&ih->ih_lock); + xfs_log_force(mp, 0, + XFS_LOG_FORCE|XFS_LOG_SYNC); + XFS_STATS_INC(xs_ig_frecycle); + goto again; + } + + vn_trace_exit(vp, "xfs_iget.alloc", + (inst_t *)__return_address); + + XFS_STATS_INC(xs_ig_found); + + xfs_iflags_clear(ip, XFS_IRECLAIMABLE); version = ih->ih_version; read_unlock(&ih->ih_lock); - xfs_ihash_promote(ih, ip, version); - XFS_STATS_INC(xs_ig_found); -finish_inode: - if (ip->i_d.di_mode == 0) { - if (!(flags & XFS_IGET_CREATE)) - return ENOENT; - xfs_iocore_inode_reinit(ip); + XFS_MOUNT_ILOCK(mp); + list_del_init(&ip->i_reclaim); + XFS_MOUNT_IUNLOCK(mp); + + goto finish_inode; + + } else if (vp != inode_vp) { + struct inode *inode = vn_to_inode(inode_vp); + + /* The inode is being torn down, pause and + * try again. + */ + if (inode->i_state & (I_FREEING | I_CLEAR)) { + read_unlock(&ih->ih_lock); + delay(1); + XFS_STATS_INC(xs_ig_frecycle); + + goto again; } +/* Chances are the other vnode (the one in the inode) is being torn +* down right now, and we landed on top of it. Question is, what do +* we do? Unhook the old inode and hook up the new one? +*/ + cmn_err(CE_PANIC, + "xfs_iget_core: ambiguous vns: vp/0x%p, invp/0x%p", + inode_vp, vp); + } - if (lock_flags != 0) - xfs_ilock(ip, lock_flags); + /* + * Inode cache hit: if ip is not at the front of + * its hash chain, move it there now. + * Do this with the lock held for update, but + * do statistics after releasing the lock. + */ + version = ih->ih_version; + read_unlock(&ih->ih_lock); + XFS_STATS_INC(xs_ig_found); - xfs_iflags_clear(ip, XFS_ISTALE); - vn_trace_exit(vp, "xfs_iget.found", - (inst_t *)__return_address); - goto return_ip; +finish_inode: + if (ip->i_d.di_mode == 0) { + if (!(flags & XFS_IGET_CREATE)) + return ENOENT; + xfs_iocore_inode_reinit(ip); } + + if (lock_flags != 0) + xfs_ilock(ip, lock_flags); + + xfs_iflags_clear(ip, XFS_ISTALE); + vn_trace_exit(vp, "xfs_iget.found", + (inst_t *)__return_address); + goto return_ip; } /* * Inode cache miss: save the hash chain version stamp and unlock * the chain, so we don't deadlock in vn_alloc. */ - XFS_STATS_INC(xs_ig_missed); - version = ih->ih_version; - read_unlock(&ih->ih_lock); + XFS_STATS_INC(xs_ig_missed); /* * Read the disk inode attributes into a new inode structure and get @@ -370,34 +328,32 @@ finish_inode: * Put ip on its hash chain, unless someone else hashed a duplicate * after we released the hash lock. */ + if (radix_tree_preload(GFP_KERNEL)) { + delay(1); + goto again; + } write_lock(&ih->ih_lock); - if (ih->ih_version != version) { - for (iq = ih->ih_next; iq != NULL; iq = iq->i_next) { - if (iq->i_ino == ino) { - write_unlock(&ih->ih_lock); - xfs_idestroy(ip); - - XFS_STATS_INC(xs_ig_dup); - goto again; - } - } + error = radix_tree_insert(&ih->ih_root, (unsigned long)ino, (void *)ip); + if (unlikely(error)) { + BUG_ON(error != -EEXIST); + write_unlock(&ih->ih_lock); + radix_tree_preload_end(); + xfs_idestroy(ip); + ASSERT(ih->ih_version != version); + XFS_STATS_INC(xs_ig_dup); + goto again; } /* * These values _must_ be set before releasing ihlock! */ ip->i_hash = ih; - if ((iq = ih->ih_next)) { - iq->i_prevp = &ip->i_next; - } - ip->i_next = iq; - ip->i_prevp = &ih->ih_next; - ih->ih_next = ip; ip->i_udquot = ip->i_gdquot = NULL; ih->ih_version++; xfs_iflags_set(ip, XFS_INEW); write_unlock(&ih->ih_lock); + radix_tree_preload_end(); /* * put ip on its cluster's hash chain @@ -589,30 +545,16 @@ xfs_inode_incore(xfs_mount_t *mp, { xfs_ihash_t *ih; xfs_inode_t *ip; - ulong version; ih = XFS_IHASH(mp, ino); read_lock(&ih->ih_lock); - for (ip = ih->ih_next; ip != NULL; ip = ip->i_next) { - if (ip->i_ino == ino) { - /* - * If we find it and tp matches, return it. - * Also move it to the front of the hash list - * if we find it and it is not already there. - * Otherwise break from the loop and return - * NULL. - */ - if (ip->i_transp == tp) { - version = ih->ih_version; - read_unlock(&ih->ih_lock); - xfs_ihash_promote(ih, ip, version); - return (ip); - } - break; - } - } + ip = (xfs_inode_t *) radix_tree_lookup(&ih->ih_root, (unsigned long)ino); read_unlock(&ih->ih_lock); - return (NULL); + + /* the returned inode must match the transaction */ + if (ip && (ip->i_transp != tp)) + return NULL; + return ip; } /* @@ -727,10 +669,7 @@ xfs_iextract( ih = ip->i_hash; write_lock(&ih->ih_lock); - if ((iq = ip->i_next)) { - iq->i_prevp = ip->i_prevp; - } - *ip->i_prevp = iq; + radix_tree_delete(&ih->ih_root, ip->i_ino); ih->ih_version++; write_unlock(&ih->ih_lock); Index: 2.6.x-xfs-new/fs/xfs/xfs_inode.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_inode.c 2007-01-31 13:48:33.744203521 +1100 +++ 2.6.x-xfs-new/fs/xfs/xfs_inode.c 2007-01-31 13:55:37.141043962 +1100 @@ -2183,10 +2183,7 @@ xfs_ifree_cluster( for (i = 0; i < ninodes; i++) { ih = XFS_IHASH(mp, inum + i); read_lock(&ih->ih_lock); - for (ip = ih->ih_next; ip != NULL; ip = ip->i_next) { - if (ip->i_ino == inum + i) - break; - } + ip = (xfs_inode_t *)radix_tree_lookup(&ih->ih_root, inum + i); /* Inode not in memory or we found it already, * nothing to do Index: 2.6.x-xfs-new/fs/xfs/xfs_inode.h =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_inode.h 2007-01-31 13:26:32.636232335 +1100 +++ 2.6.x-xfs-new/fs/xfs/xfs_inode.h 2007-01-31 13:55:37.141043962 +1100 @@ -175,12 +175,12 @@ extern void xfs_iocore_inode_reinit(stru * file system to hash the inodes for that file system. */ typedef struct xfs_ihash { - struct xfs_inode *ih_next; + struct radix_tree_root ih_root; rwlock_t ih_lock; uint ih_version; } xfs_ihash_t; -#define XFS_IHASH(mp,ino) ((mp)->m_ihash + (((uint)(ino)) % (mp)->m_ihsize)) +#define XFS_IHASH(mp,ino) ((mp)->m_ihash + (((uint)((ino) >> 6)) % (mp)->m_ihsize)) /* * This is the xfs inode cluster hash. This hash is used by xfs_iflush to @@ -229,20 +229,16 @@ typedef struct xfs_chash { typedef struct { struct xfs_ihash *ip_hash; /* pointer to hash header */ - struct xfs_inode *ip_next; /* inode hash link forw */ struct xfs_inode *ip_mnext; /* next inode in mount list */ struct xfs_inode *ip_mprev; /* ptr to prev inode */ - struct xfs_inode **ip_prevp; /* ptr to prev i_next */ struct xfs_mount *ip_mount; /* fs mount struct ptr */ } xfs_iptr_t; typedef struct xfs_inode { /* Inode linking and identification information. */ struct xfs_ihash *i_hash; /* pointer to hash header */ - struct xfs_inode *i_next; /* inode hash link forw */ struct xfs_inode *i_mnext; /* next inode in mount list */ struct xfs_inode *i_mprev; /* ptr to prev inode */ - struct xfs_inode **i_prevp; /* ptr to prev i_next */ struct xfs_mount *i_mount; /* fs mount struct ptr */ struct list_head i_reclaim; /* reclaim list */ struct bhv_desc i_bhv_desc; /* inode behavior descriptor*/ Index: 2.6.x-xfs-new/fs/xfs/xfsidbg.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfsidbg.c 2007-01-31 13:53:28.253834613 +1100 +++ 2.6.x-xfs-new/fs/xfs/xfsidbg.c 2007-01-31 13:55:37.145043441 +1100 @@ -6581,6 +6581,7 @@ xfsidbg_xmount(xfs_mount_t *mp) static void xfsidbg_xihash(xfs_mount_t *mp) { +#if 0 xfs_ihash_t *ih; int i; int j; @@ -6641,6 +6642,7 @@ xfsidbg_xihash(xfs_mount_t *mp) } kdb_printf("\n"); kfree(hist); +#endif } /* @@ -6658,10 +6660,8 @@ xfsidbg_xnode(xfs_inode_t *ip) NULL }; - kdb_printf("hash 0x%p next 0x%p prevp 0x%p mount 0x%p\n", + kdb_printf("hash 0x%p mount 0x%p\n", ip->i_hash, - ip->i_next, - ip->i_prevp, ip->i_mount); kdb_printf("mnext 0x%p mprev 0x%p vnode 0x%p \n", ip->i_mnext, From owner-xfs@oss.sgi.com Wed Aug 8 16:07:14 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 16:07:17 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_20 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l78N78bm009951 for ; Wed, 8 Aug 2007 16:07:12 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id JAA27776; Thu, 9 Aug 2007 09:07:08 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l78N77eW55620626; Thu, 9 Aug 2007 09:07:08 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l78N77oa55635210; Thu, 9 Aug 2007 09:07:07 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Thu, 9 Aug 2007 09:07:07 +1000 From: David Chinner To: xfs-dev Cc: xfs-oss Subject: [PATCH 0 of 4] Radix tree based inode caching Message-ID: <20070808230706.GO12413810@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12527 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs One of the perpetual scaling problems XFS has is indexing it's incore inodes. We currently uses hashes and the default hash sizes chosen can only ever be a tradeoff between memory consumption and the maximum realistic size of the cache. As a result, anyone who has millions of inodes cached on a filesystem needs to tunes the size of the cache via the ihashsize mount option to allow decent scalability with inode cache operations. A further problem is the separate inode cluster hash, whose size is based on the ihashsize but is smaller, and so under certain conditions (sparse cluster cache population) this can become a limitation long before the inode hash is causing issues. The following patchset removes the inode hash and cluster hash and replaces them with radix trees to avoid the scalability limitations of the hashes. It also reduces the size of the inodes by 3 pointers.... -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Wed Aug 8 16:10:22 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 16:10:25 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_66 autolearn=no version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l78NAIbm011693 for ; Wed, 8 Aug 2007 16:10:21 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id JAA27934; Thu, 9 Aug 2007 09:10:18 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l78NAHeW55450563; Thu, 9 Aug 2007 09:10:18 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l78NAGld55637430; Thu, 9 Aug 2007 09:10:16 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Thu, 9 Aug 2007 09:10:16 +1000 From: David Chinner To: xfs-dev Cc: xfs-oss Subject: [PATCH 2 of 4] Per cluster-object inode chain locks Message-ID: <20070808231016.GQ12413810@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12529 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs Per cluster-object inode chain locks. Currently, the cluster inode chain is protected by the cluster hash chain lock. This means that any operation on the cluster inode chain can hold out searches of the cluster hash. It also means that the cluster inode chain is not independent of the cluster hash and hence cannot be cleanly separated. Give the cluster object it's own lock so that inode chain operations can be done independently of the cluster hash. Signed-off-by: Dave Chinner --- fs/xfs/xfs_iget.c | 26 +++++++++++++++++++++----- fs/xfs/xfs_inode.c | 10 +++------- fs/xfs/xfs_inode.h | 1 + 3 files changed, 25 insertions(+), 12 deletions(-) Index: 2.6.x-xfs-new/fs/xfs/xfs_iget.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_iget.c 2006-10-19 10:52:04.731953950 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_iget.c 2006-10-19 10:52:24.661381439 +1000 @@ -367,7 +367,9 @@ finish_inode: if (chl->chl_blkno == ip->i_blkno) { /* insert this inode into the doubly-linked list - * where chl points */ + * where chl points. lock the chl to protect against + * others traversing the chl list */ + spin_lock(&chl->chl_lock); if ((iq = chl->chl_ip)) { ip->i_cprev = iq->i_cprev; iq->i_cprev->i_cnext = ip; @@ -379,6 +381,7 @@ finish_inode: } chl->chl_ip = ip; ip->i_chash = chl; + spin_unlock(&chl->chl_lock); break; } } @@ -392,8 +395,11 @@ finish_inode: kmem_zone_alloc(xfs_chashlist_zone, KM_SLEEP); ASSERT(chlnew != NULL); + spin_lock_init(&chlnew->chl_lock); goto chlredo; } else { + /* exclusive access to this chl thanks to the ch_lock + * in write mode, so no lock really needed */ ip->i_cnext = ip; ip->i_cprev = ip; ip->i_chash = chlnew; @@ -679,13 +685,21 @@ xfs_iextract( */ mp = ip->i_mount; ch = XFS_CHASH(mp, ip->i_blkno); - s = mutex_spinlock(&ch->ch_lock); - - if (ip->i_cnext == ip) { + spin_lock(&ip->i_chash->chl_lock); + if (unlikely(ip->i_cnext == ip)) { /* Last inode on chashlist */ ASSERT(ip->i_cnext == ip && ip->i_cprev == ip); ASSERT(ip->i_chash != NULL); chm=NULL; + + spin_unlock(&ip->i_chash->chl_lock); + spin_lock(&ch->ch_lock); + spin_lock(&ip->i_chash->chl_lock); + if (ip->i_cnext != ip) { + spin_unlock(&ch->ch_lock); + goto delete; + } + spin_unlock(&ip->i_chash->chl_lock); chl = ip->i_chash; if (chl->chl_prev) chl->chl_prev->chl_next = chl->chl_next; @@ -693,20 +707,22 @@ xfs_iextract( ch->ch_list = chl->chl_next; if (chl->chl_next) chl->chl_next->chl_prev = chl->chl_prev; + spin_unlock(&ch->ch_lock); kmem_zone_free(xfs_chashlist_zone, chl); } else { /* delete one inode from a non-empty list */ +delete: iq = ip->i_cnext; iq->i_cprev = ip->i_cprev; ip->i_cprev->i_cnext = iq; if (ip->i_chash->chl_ip == ip) { ip->i_chash->chl_ip = iq; } + spin_unlock(&ip->i_chash->chl_lock); ip->i_chash = __return_address; ip->i_cprev = __return_address; ip->i_cnext = __return_address; } - mutex_spinunlock(&ch->ch_lock, s); /* * Remove from mount's inode list. Index: 2.6.x-xfs-new/fs/xfs/xfs_inode.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_inode.c 2006-10-19 10:45:26.243612163 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_inode.c 2006-10-19 10:52:24.661381439 +1000 @@ -3004,7 +3004,6 @@ xfs_iflush( xfs_mount_t *mp; int error; /* REFERENCED */ - xfs_chash_t *ch; xfs_inode_t *iq; int clcount; /* count of inodes clustered */ int bufwasdelwri; @@ -3123,12 +3122,9 @@ xfs_iflush( * inode clustering: * see if other inodes can be gathered into this write */ - + spin_lock(&ip->i_chash->chl_lock); ip->i_chash->chl_buf = bp; - ch = XFS_CHASH(mp, ip->i_blkno); - s = mutex_spinlock(&ch->ch_lock); - clcount = 0; for (iq = ip->i_cnext; iq != ip; iq = iq->i_cnext) { /* @@ -3181,7 +3177,7 @@ xfs_iflush( xfs_iunlock(iq, XFS_ILOCK_SHARED); } } - mutex_spinunlock(&ch->ch_lock, s); + spin_unlock(&ip->i_chash->chl_lock); if (clcount) { XFS_STATS_INC(xs_icluster_flushcnt); @@ -3218,7 +3214,7 @@ cluster_corrupt_out: /* Corruption detected in the clustering loop. Invalidate the * inode buffer and shut down the filesystem. */ - mutex_spinunlock(&ch->ch_lock, s); + spin_unlock(&ip->i_chash->chl_lock); /* * Clean up the buffer. If it was B_DELWRI, just release it -- Index: 2.6.x-xfs-new/fs/xfs/xfs_inode.h =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_inode.h 2006-10-19 10:45:26.243612163 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_inode.h 2006-10-19 10:52:24.665380923 +1000 @@ -194,6 +194,7 @@ typedef struct xfs_chashlist { xfs_daddr_t chl_blkno; /* starting block number of * the cluster */ struct xfs_buf *chl_buf; /* the inode buffer */ + lock_t chl_lock; /* inode list lock */ } xfs_chashlist_t; typedef struct xfs_chash { From owner-xfs@oss.sgi.com Wed Aug 8 16:11:51 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 16:11:54 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_43, J_CHICKENPOX_66 autolearn=no version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l78NBkbm012697 for ; Wed, 8 Aug 2007 16:11:48 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id JAA28000; Thu, 9 Aug 2007 09:11:46 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l78NBjeW55599802; Thu, 9 Aug 2007 09:11:45 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l78NBhEA55533950; Thu, 9 Aug 2007 09:11:43 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Thu, 9 Aug 2007 09:11:43 +1000 From: David Chinner To: xfs-dev Cc: xfs-oss Subject: [PATCH 3 of 4] Remove the cluster hash lists Message-ID: <20070808231143.GR12413810@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12530 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs Remove the cluster hash lists and replace with lookups into the new radix tree. This removes scalability limitations inherent in the cluster hash sizing algorithms. We can do this due to the fact that all inodes in a cluster have sequential numbers and have a defined alignment. This means we can mask out the inode number within the cluster to give us the cluster address that the inode belongs to. We can then do a gang lookup on the radix tree to find out if there is already an existing cached inode in the cluster. if there is, then we can obtain the cluster object from the existing cached inode. If there isn't we simply allocate a new one and attach it to the inode we are inserting into the radix tree. Signed-off-by: Dave Chinner --- fs/xfs/linux-2.6/xfs_ksyms.c | 2 fs/xfs/xfs_iget.c | 201 +++++++++++++------------------------------ fs/xfs/xfs_inode.c | 11 +- fs/xfs/xfs_inode.h | 32 ++---- fs/xfs/xfs_mount.c | 4 fs/xfs/xfs_vfsops.c | 8 - fs/xfs/xfsidbg.c | 96 -------------------- 7 files changed, 84 insertions(+), 270 deletions(-) Index: 2.6.x-xfs-new/fs/xfs/xfs_iget.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_iget.c 2007-07-23 11:11:10.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_iget.c 2007-07-23 11:13:19.414234814 +1000 @@ -80,40 +80,6 @@ xfs_ihash_free(xfs_mount_t *mp) } /* - * Initialize the inode cluster hash table for the newly mounted file system. - * Its size is derived from the ihash table size. - */ -void -xfs_chash_init(xfs_mount_t *mp) -{ - uint i; - - mp->m_chsize = mp->m_ihsize * 2049; - mp->m_chash = (xfs_chash_t *)kmem_zalloc(mp->m_chsize - * sizeof(xfs_chash_t), - KM_SLEEP | KM_LARGE); - for (i = 0; i < mp->m_chsize; i++) { - spinlock_init(&mp->m_chash[i].ch_lock,"xfshash"); - } -} - -/* - * Free up structures allocated by xfs_chash_init, at unmount time. - */ -void -xfs_chash_free(xfs_mount_t *mp) -{ - int i; - - for (i = 0; i < mp->m_chsize; i++) { - spinlock_destroy(&mp->m_chash[i].ch_lock); - } - - kmem_free(mp->m_chash, mp->m_chsize*sizeof(xfs_chash_t)); - mp->m_chash = NULL; -} - -/* * Look up an inode by number in the given file system. * The inode is looked up in the hash table for the file system * represented by the mount point parameter mp. Each bucket of @@ -161,10 +127,8 @@ xfs_iget_core( bhv_vnode_t *inode_vp; ulong version; int error; - /* REFERENCED */ - xfs_chash_t *ch; - xfs_chashlist_t *chl, *chlnew; - SPLDECL(s); + xfs_icluster_t *icl, *new_icl = NULL; + unsigned long first_index, mask; ih = XFS_IHASH(mp, ino); @@ -325,15 +289,31 @@ finish_inode: } /* - * Put ip on its hash chain, unless someone else hashed a duplicate - * after we released the hash lock. + * This is a bit messy - we preallocate everything we _might_ + * need before we pick up the hash lock. That way we donnn't have to + * juggle locks and go all the way back to the start. */ + new_icl = (xfs_icluster_t *)kmem_zone_alloc(xfs_icluster_zone, KM_SLEEP); if (radix_tree_preload(GFP_KERNEL)) { delay(1); goto again; } + mask = ~(((XFS_INODE_CLUSTER_SIZE(mp) >> mp->m_sb.sb_inodelog)) - 1); + first_index = ino & mask; write_lock(&ih->ih_lock); + /* + * Find the cluster if it exists + */ + icl = NULL; + if (radix_tree_gang_lookup(&ih->ih_root, (void**)&iq, first_index, 1)) { + if ((iq->i_ino & mask) == first_index) + icl = iq->i_cluster; + } + + /* + * insert the new inode + */ error = radix_tree_insert(&ih->ih_root, (unsigned long)ino, (void *)ip); if (unlikely(error)) { BUG_ON(error != -EEXIST); @@ -352,76 +332,36 @@ finish_inode: ip->i_udquot = ip->i_gdquot = NULL; ih->ih_version++; xfs_iflags_set(ip, XFS_INEW); - write_unlock(&ih->ih_lock); - radix_tree_preload_end(); - /* - * put ip on its cluster's hash chain - */ - ASSERT(ip->i_chash == NULL && ip->i_cprev == NULL && + ASSERT(ip->i_cluster == NULL && ip->i_cprev == NULL && ip->i_cnext == NULL); - chlnew = NULL; - ch = XFS_CHASH(mp, ip->i_blkno); - chlredo: - s = mutex_spinlock(&ch->ch_lock); - for (chl = ch->ch_list; chl != NULL; chl = chl->chl_next) { - if (chl->chl_blkno == ip->i_blkno) { - - /* insert this inode into the doubly-linked list - * where chl points. lock the chl to protect against - * others traversing the chl list */ - spin_lock(&chl->chl_lock); - if ((iq = chl->chl_ip)) { - ip->i_cprev = iq->i_cprev; - iq->i_cprev->i_cnext = ip; - iq->i_cprev = ip; - ip->i_cnext = iq; - } else { - ip->i_cnext = ip; - ip->i_cprev = ip; - } - chl->chl_ip = ip; - ip->i_chash = chl; - spin_unlock(&chl->chl_lock); - break; - } - } - - /* no hash list found for this block; add a new hash list */ - if (chl == NULL) { - if (chlnew == NULL) { - mutex_spinunlock(&ch->ch_lock, s); - ASSERT(xfs_chashlist_zone != NULL); - chlnew = (xfs_chashlist_t *) - kmem_zone_alloc(xfs_chashlist_zone, - KM_SLEEP); - ASSERT(chlnew != NULL); - spin_lock_init(&chlnew->chl_lock); - goto chlredo; - } else { - /* exclusive access to this chl thanks to the ch_lock - * in write mode, so no lock really needed */ - ip->i_cnext = ip; - ip->i_cprev = ip; - ip->i_chash = chlnew; - chlnew->chl_ip = ip; - chlnew->chl_blkno = ip->i_blkno; - if (ch->ch_list) - ch->ch_list->chl_prev = chlnew; - chlnew->chl_next = ch->ch_list; - chlnew->chl_prev = NULL; - ch->ch_list = chlnew; - chlnew = NULL; - } + if (icl) { + /* insert this inode into the doubly-linked list + * where icl points. lock the icl to protect against + * others traversing the icl list */ + spin_lock(&icl->icl_lock); + ASSERT(icl->icl_ip != NULL); + iq = icl->icl_ip; + ip->i_cprev = iq->i_cprev; + iq->i_cprev->i_cnext = ip; + iq->i_cprev = ip; + ip->i_cnext = iq; + icl->icl_ip = ip; + ip->i_cluster = icl; + spin_unlock(&icl->icl_lock); } else { - if (chlnew != NULL) { - kmem_zone_free(xfs_chashlist_zone, chlnew); - } + ip->i_cnext = ip; + ip->i_cprev = ip; + ip->i_cluster = new_icl; + new_icl->icl_ip = ip; + spin_lock_init(&new_icl->icl_lock); + new_icl = NULL; } - - mutex_spinunlock(&ch->ch_lock, s); - + write_unlock(&ih->ih_lock); + radix_tree_preload_end(); + if (new_icl) + kmem_zone_free(xfs_icluster_zone, new_icl); /* * Link ip to its mount and thread it on the mount's inode list. @@ -669,9 +609,6 @@ xfs_iextract( xfs_ihash_t *ih; xfs_inode_t *iq; xfs_mount_t *mp; - xfs_chash_t *ch; - xfs_chashlist_t *chl, *chm; - SPLDECL(s); ih = ip->i_hash; write_lock(&ih->ih_lock); @@ -680,48 +617,34 @@ xfs_iextract( write_unlock(&ih->ih_lock); /* - * Remove from cluster hash list - * 1) delete the chashlist if this is the last inode on the chashlist - * 2) unchain from list of inodes - * 3) point chashlist->chl_ip to 'chl_next' if to this inode. + * Remove from cluster list */ mp = ip->i_mount; - ch = XFS_CHASH(mp, ip->i_blkno); - spin_lock(&ip->i_chash->chl_lock); + spin_lock(&ip->i_cluster->icl_lock); if (unlikely(ip->i_cnext == ip)) { - /* Last inode on chashlist */ + /* + * Last inode in cluster object. + * + * We've been removed from the inode radix tree, and + * we are the last inode to reference the cluster. + * We can simply drop our loks and free it at this point + * because nothing can find us or the cluster. + */ ASSERT(ip->i_cnext == ip && ip->i_cprev == ip); - ASSERT(ip->i_chash != NULL); - chm=NULL; + ASSERT(ip->i_cluster != NULL); - spin_unlock(&ip->i_chash->chl_lock); - spin_lock(&ch->ch_lock); - spin_lock(&ip->i_chash->chl_lock); - if (ip->i_cnext != ip) { - spin_unlock(&ch->ch_lock); - goto delete; - } - spin_unlock(&ip->i_chash->chl_lock); - chl = ip->i_chash; - if (chl->chl_prev) - chl->chl_prev->chl_next = chl->chl_next; - else - ch->ch_list = chl->chl_next; - if (chl->chl_next) - chl->chl_next->chl_prev = chl->chl_prev; - spin_unlock(&ch->ch_lock); - kmem_zone_free(xfs_chashlist_zone, chl); + spin_unlock(&ip->i_cluster->icl_lock); + kmem_zone_free(xfs_icluster_zone, ip->i_cluster); } else { /* delete one inode from a non-empty list */ -delete: iq = ip->i_cnext; iq->i_cprev = ip->i_cprev; ip->i_cprev->i_cnext = iq; - if (ip->i_chash->chl_ip == ip) { - ip->i_chash->chl_ip = iq; + if (ip->i_cluster->icl_ip == ip) { + ip->i_cluster->icl_ip = iq; } - spin_unlock(&ip->i_chash->chl_lock); - ip->i_chash = __return_address; + spin_unlock(&ip->i_cluster->icl_lock); + ip->i_cluster = __return_address; ip->i_cprev = __return_address; ip->i_cnext = __return_address; } Index: 2.6.x-xfs-new/fs/xfs/xfs_inode.h =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_inode.h 2007-07-23 11:11:10.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_inode.h 2007-07-23 11:13:19.414234814 +1000 @@ -187,23 +187,13 @@ typedef struct xfs_ihash { * find inodes that share a cluster and can be flushed to disk at the same * time. */ -typedef struct xfs_chashlist { - struct xfs_chashlist *chl_next; - struct xfs_chashlist *chl_prev; - struct xfs_inode *chl_ip; - xfs_daddr_t chl_blkno; /* starting block number of +typedef struct xfs_icluster { + struct xfs_inode *icl_ip; + xfs_daddr_t icl_blkno; /* starting block number of * the cluster */ - struct xfs_buf *chl_buf; /* the inode buffer */ - lock_t chl_lock; /* inode list lock */ -} xfs_chashlist_t; - -typedef struct xfs_chash { - xfs_chashlist_t *ch_list; - lock_t ch_lock; -} xfs_chash_t; - -#define XFS_CHASH(mp,blk) ((mp)->m_chash + (((uint)blk) % (mp)->m_chsize)) - + struct xfs_buf *icl_buf; /* the inode buffer */ + lock_t icl_lock; /* inode list lock */ +} xfs_icluster_t; /* * This is the xfs in-core inode structure. @@ -280,9 +270,9 @@ typedef struct xfs_inode { unsigned int i_delayed_blks; /* count of delay alloc blks */ xfs_icdinode_t i_d; /* most of ondisk inode */ - xfs_chashlist_t *i_chash; /* cluster hash list header */ - struct xfs_inode *i_cnext; /* cluster hash link forward */ - struct xfs_inode *i_cprev; /* cluster hash link backward */ + xfs_icluster_t *i_cluster; /* cluster list header */ + struct xfs_inode *i_cnext; /* cluster link forward */ + struct xfs_inode *i_cprev; /* cluster link backward */ xfs_fsize_t i_size; /* in-memory size */ /* Trace buffers per inode. */ @@ -477,8 +467,6 @@ xfs_iflags_test(xfs_inode_t *ip, unsigne */ void xfs_ihash_init(struct xfs_mount *); void xfs_ihash_free(struct xfs_mount *); -void xfs_chash_init(struct xfs_mount *); -void xfs_chash_free(struct xfs_mount *); xfs_inode_t *xfs_inode_incore(struct xfs_mount *, xfs_ino_t, struct xfs_trans *); void xfs_inode_lock_init(xfs_inode_t *, struct bhv_vnode *); @@ -589,7 +577,7 @@ void xfs_inobp_check(struct xfs_mount * #define xfs_inobp_check(mp, bp) #endif /* DEBUG */ -extern struct kmem_zone *xfs_chashlist_zone; +extern struct kmem_zone *xfs_icluster_zone; extern struct kmem_zone *xfs_ifork_zone; extern struct kmem_zone *xfs_inode_zone; extern struct kmem_zone *xfs_ili_zone; Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_ksyms.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/linux-2.6/xfs_ksyms.c 2007-07-23 11:11:02.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_ksyms.c 2007-07-23 11:13:19.426233246 +1000 @@ -233,7 +233,7 @@ EXPORT_SYMBOL(xfs_bulkstat); EXPORT_SYMBOL(xfs_bunmapi); EXPORT_SYMBOL(xfs_bwrite); EXPORT_SYMBOL(xfs_change_file_space); -EXPORT_SYMBOL(xfs_chashlist_zone); +EXPORT_SYMBOL(xfs_icluster_zone); EXPORT_SYMBOL(xfs_dev_is_read_only); EXPORT_SYMBOL(xfs_dir_getdents); EXPORT_SYMBOL(xfs_dir_ialloc); Index: 2.6.x-xfs-new/fs/xfs/xfs_inode.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_inode.c 2007-07-23 11:11:10.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_inode.c 2007-07-23 11:13:19.430232723 +1000 @@ -52,7 +52,7 @@ kmem_zone_t *xfs_ifork_zone; kmem_zone_t *xfs_inode_zone; -kmem_zone_t *xfs_chashlist_zone; +kmem_zone_t *xfs_icluster_zone; /* * Used in xfs_itruncate(). This is the maximum number of extents @@ -3051,7 +3051,6 @@ xfs_iflush( int clcount; /* count of inodes clustered */ int bufwasdelwri; enum { INT_DELWRI = (1 << 0), INT_ASYNC = (1 << 1) }; - SPLDECL(s); XFS_STATS_INC(xs_iflush_count); @@ -3165,8 +3164,8 @@ xfs_iflush( * inode clustering: * see if other inodes can be gathered into this write */ - spin_lock(&ip->i_chash->chl_lock); - ip->i_chash->chl_buf = bp; + spin_lock(&ip->i_cluster->icl_lock); + ip->i_cluster->icl_buf = bp; clcount = 0; for (iq = ip->i_cnext; iq != ip; iq = iq->i_cnext) { @@ -3220,7 +3219,7 @@ xfs_iflush( xfs_iunlock(iq, XFS_ILOCK_SHARED); } } - spin_unlock(&ip->i_chash->chl_lock); + spin_unlock(&ip->i_cluster->icl_lock); if (clcount) { XFS_STATS_INC(xs_icluster_flushcnt); @@ -3257,7 +3256,7 @@ cluster_corrupt_out: /* Corruption detected in the clustering loop. Invalidate the * inode buffer and shut down the filesystem. */ - spin_unlock(&ip->i_chash->chl_lock); + spin_unlock(&ip->i_cluster->icl_lock); /* * Clean up the buffer. If it was B_DELWRI, just release it -- Index: 2.6.x-xfs-new/fs/xfs/xfs_vfsops.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_vfsops.c 2007-07-23 11:09:52.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_vfsops.c 2007-07-23 11:13:19.430232723 +1000 @@ -117,8 +117,8 @@ xfs_init(void) xfs_ili_zone = kmem_zone_init_flags(sizeof(xfs_inode_log_item_t), "xfs_ili", KM_ZONE_SPREAD, NULL); - xfs_chashlist_zone = - kmem_zone_init_flags(sizeof(xfs_chashlist_t), "xfs_chashlist", + xfs_icluster_zone = + kmem_zone_init_flags(sizeof(xfs_icluster_t), "xfs_icluster", KM_ZONE_SPREAD, NULL); /* @@ -163,7 +163,7 @@ xfs_cleanup(void) extern kmem_zone_t *xfs_efd_zone; extern kmem_zone_t *xfs_efi_zone; extern kmem_zone_t *xfs_buf_item_zone; - extern kmem_zone_t *xfs_chashlist_zone; + extern kmem_zone_t *xfs_icluster_zone; xfs_cleanup_procfs(); xfs_sysctl_unregister(); @@ -199,7 +199,7 @@ xfs_cleanup(void) kmem_zone_destroy(xfs_efi_zone); kmem_zone_destroy(xfs_ifork_zone); kmem_zone_destroy(xfs_ili_zone); - kmem_zone_destroy(xfs_chashlist_zone); + kmem_zone_destroy(xfs_icluster_zone); } /* Index: 2.6.x-xfs-new/fs/xfs/xfsidbg.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfsidbg.c 2007-07-23 11:11:10.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfsidbg.c 2007-07-23 11:13:19.434232200 +1000 @@ -135,8 +135,6 @@ static void xfsidbg_xbuf(xfs_buf_t *); static void xfsidbg_xbuf_real(xfs_buf_t *, int); static void xfsidbg_xarg(int); static void xfsidbg_xchksum(uint *); -static void xfsidbg_xchash(xfs_mount_t *mp); -static void xfsidbg_xchashlist(xfs_chashlist_t *chl); static void xfsidbg_xdaargs(xfs_da_args_t *); static void xfsidbg_xdabuf(xfs_dabuf_t *); static void xfsidbg_xdanode(xfs_da_intnode_t *); @@ -1020,46 +1018,6 @@ static int kdbm_xfs_xchksum( return 0; } - -static int kdbm_xfs_xchash( - int argc, - const char **argv) -{ - unsigned long addr; - int nextarg = 1; - long offset = 0; - int diag; - - if (argc != 1) - return KDB_ARGCOUNT; - diag = kdbgetaddrarg(argc, argv, &nextarg, &addr, &offset, NULL); - if (diag) - return diag; - - xfsidbg_xchash((xfs_mount_t *) addr); - return 0; -} - -static int kdbm_xfs_xchashlist( - int argc, - const char **argv) -{ - unsigned long addr; - int nextarg = 1; - long offset = 0; - int diag; - - if (argc != 1) - return KDB_ARGCOUNT; - diag = kdbgetaddrarg(argc, argv, &nextarg, &addr, &offset, NULL); - if (diag) - return diag; - - xfsidbg_xchashlist((xfs_chashlist_t *) addr); - return 0; -} - - static int kdbm_xfs_xdaargs( int argc, const char **argv) @@ -2670,10 +2628,6 @@ static struct xif xfsidbg_funcs[] = { { "xbxstrc", kdbm_xfs_xbxstrace, "", "Dump XFS bmap extent inode trace" }, #endif - { "xchash", kdbm_xfs_xchash, "", - "Dump XFS cluster hash"}, - { "xchlist", kdbm_xfs_xchashlist, "", - "Dump XFS cluster hash list"}, { "xchksum", kdbm_xfs_xchksum, "", "Dump chksum" }, #ifdef XFS_DIR2_TRACE { "xd2atrc", kdbm_xfs_xdir2atrace, "", @@ -6756,8 +6710,6 @@ xfsidbg_xmount(xfs_mount_t *mp) (xfs_dfiloff_t)mp->m_dirdatablk, (xfs_dfiloff_t)mp->m_dirleafblk, (xfs_dfiloff_t)mp->m_dirfreeblk); - kdb_printf("chsize %d chash 0x%p\n", - mp->m_chsize, mp->m_chash); if (mp->m_fsname != NULL) kdb_printf("mountpoint \"%s\"\n", mp->m_fsname); else @@ -6898,8 +6850,8 @@ xfsidbg_xnode(xfs_inode_t *ip) qprintf(" dir trace 0x%p\n", ip->i_dir_trace); #endif kdb_printf("\n"); - kdb_printf("chash 0x%p cnext 0x%p cprev 0x%p\n", - ip->i_chash, + kdb_printf("icluster 0x%p cnext 0x%p cprev 0x%p\n", + ip->i_cluster, ip->i_cnext, ip->i_cprev); xfs_xnode_fork("data", &ip->i_df); @@ -6917,50 +6869,6 @@ xfsidbg_xcore(xfs_iocore_t *io) } /* - * Command to print xfs inode cluster hash table: kp xchash - */ -static void -xfsidbg_xchash(xfs_mount_t *mp) -{ - int i; - xfs_chash_t *ch; - - kdb_printf("m_chash 0x%p size %d\n", - mp->m_chash, mp->m_chsize); - for (i = 0; i < mp->m_chsize; i++) { - ch = mp->m_chash + i; - kdb_printf("[%3d] ch 0x%p chashlist 0x%p\n", i, ch, ch->ch_list); - xfsidbg_xchashlist(ch->ch_list); - } -} - -/* - * Command to print xfs inode cluster hash list: kp xchashlist - */ -static void -xfsidbg_xchashlist(xfs_chashlist_t *chl) -{ - xfs_inode_t *ip; - - while (chl != NULL) { - kdb_printf("hashlist inode 0x%p blkno %lld buf 0x%p", - chl->chl_ip, (long long) chl->chl_blkno, chl->chl_buf); - - kdb_printf("\n"); - - /* print inodes on chashlist */ - ip = chl->chl_ip; - do { - kdb_printf("0x%p ", ip); - ip = ip->i_cnext; - } while (ip != chl->chl_ip); - kdb_printf("\n"); - - chl=chl->chl_next; - } -} - -/* * Print xfs per-ag data structures for filesystem. */ static void Index: 2.6.x-xfs-new/fs/xfs/xfs_mount.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_mount.c 2007-07-23 11:11:02.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_mount.c 2007-07-23 11:13:19.438231678 +1000 @@ -162,8 +162,6 @@ xfs_mount_free( { if (mp->m_ihash) xfs_ihash_free(mp); - if (mp->m_chash) - xfs_chash_free(mp); if (mp->m_perag) { int agno; @@ -1037,7 +1035,6 @@ xfs_mountfs( * file system. */ xfs_ihash_init(mp); - xfs_chash_init(mp); /* * Allocate and initialize the per-ag data. @@ -1191,7 +1188,6 @@ xfs_mountfs( xfs_log_unmount_dealloc(mp); error2: xfs_ihash_free(mp); - xfs_chash_free(mp); for (agno = 0; agno < sbp->sb_agcount; agno++) if (mp->m_perag[agno].pagb_list) kmem_free(mp->m_perag[agno].pagb_list, From owner-xfs@oss.sgi.com Wed Aug 8 16:13:19 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 16:13:22 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_43, J_CHICKENPOX_54,J_CHICKENPOX_75 autolearn=no version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l78NDDbm013676 for ; Wed, 8 Aug 2007 16:13:15 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id JAA28058; Thu, 9 Aug 2007 09:13:12 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l78NDBeW55202362; Thu, 9 Aug 2007 09:13:12 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l78NDAPX55606608; Thu, 9 Aug 2007 09:13:10 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Thu, 9 Aug 2007 09:13:10 +1000 From: David Chinner To: xfs-dev Cc: xfs-oss Subject: [PATCH 4 of 4] Per Allocation Group inode radix trees Message-ID: <20070808231310.GS12413810@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12531 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs One of the big problems with the hash of radix trees is that they require 64 bit inode number indexing and hence would prevent the use of 64 bit inodes on a 32 bit platform. Also, the hashing only provides limited parallelism as inodes in different allocation groups that can be operated on in parallel in all other might shared the same radix tree. The hash sizing is also uses relatively basic heuristics for sizing that were provided just to get "sufficient" trees rather than a more optimal number. By moving to a radix tree per AG, we can use the agino number as the index rather than the inode number, thereby rducing the radix tree key to 32 bits enabling this to be used for 64 bit inodes on 32 bit machines. In doing so, we also grately reduce the sparseness of the radix trees because the agino is a more compact representation of the inode location than the inode number. It also provides inherent parallelism in the same manner as the rest of XFS without the need for heuristics. i.e. we parallelise operations by keeping structures and operations within AGs. This removes the need for the ihashsize mount parameter altogether as the inode caches should never need size hints anymore. Signed-off-by: Dave Chinner --- fs/xfs/linux-2.6/xfs_export.c | 4 - fs/xfs/xfs_ag.h | 4 + fs/xfs/xfs_buf_item.c | 1 fs/xfs/xfs_clnt.h | 1 fs/xfs/xfs_dir2_block.c | 1 fs/xfs/xfs_dir2_data.c | 1 fs/xfs/xfs_dir2_node.c | 1 fs/xfs/xfs_dir2_sf.c | 1 fs/xfs/xfs_error.c | 1 fs/xfs/xfs_extfree_item.c | 1 fs/xfs/xfs_iget.c | 158 +++++++++++++++--------------------------- fs/xfs/xfs_inode.c | 18 ++-- fs/xfs/xfs_inode.h | 22 ----- fs/xfs/xfs_mount.c | 20 ++--- fs/xfs/xfs_mount.h | 22 ++++- fs/xfs/xfs_rename.c | 1 fs/xfs/xfs_trans_ail.c | 1 fs/xfs/xfs_trans_extfree.c | 1 fs/xfs/xfs_vfsops.c | 16 ---- fs/xfs/xfs_vnodeops.c | 9 +- fs/xfs/xfsidbg.c | 103 --------------------------- 21 files changed, 121 insertions(+), 266 deletions(-) Index: 2.6.x-xfs-new/fs/xfs/xfs_ag.h =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_ag.h 2007-08-01 10:36:25.763324913 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_ag.h 2007-08-01 15:43:34.078954812 +1000 @@ -197,6 +197,10 @@ typedef struct xfs_perag #endif xfs_perag_busy_t *pagb_list; /* unstable blocks */ atomic_t pagf_fstrms; /* # of filestreams active in this AG */ + + int pag_ici_init; /* incore inode cache initialised */ + rwlock_t pag_ici_lock; /* incore inode lock */ + struct radix_tree_root pag_ici_root; /* incore inode cache root */ } xfs_perag_t; #define XFS_AG_MAXLEVELS(mp) ((mp)->m_ag_maxlevels) Index: 2.6.x-xfs-new/fs/xfs/xfs_iget.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_iget.c 2007-08-01 15:43:30.375434934 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_iget.c 2007-08-01 15:43:34.078954812 +1000 @@ -40,60 +40,13 @@ #include "xfs_utils.h" /* - * Initialize the inode hash table for the newly mounted file system. - * Choose an initial table size based on user specified value, else - * use a simple algorithm using the maximum number of inodes as an - * indicator for table size, and clamp it between one and some large - * number of pages. - */ -void -xfs_ihash_init(xfs_mount_t *mp) -{ - uint i; - - if (!mp->m_ihsize || mp->m_ihsize > 128) { - /* default to (2*cpus) - 1 or 15. */ - mp->m_ihsize = (2 * num_online_cpus()) - 1; - mp->m_ihsize = min_t(size_t, 15, mp->m_ihsize); - printk("mp->m_ihsize %ld\n", mp->m_ihsize); - } - - mp->m_ihash = kmem_zalloc_greedy((size_t *)&mp->m_ihsize, - NBPC * sizeof(xfs_ihash_t), - mp->m_ihsize * sizeof(xfs_ihash_t), - KM_SLEEP | KM_MAYFAIL | KM_LARGE); - mp->m_ihsize /= sizeof(xfs_ihash_t); - for (i = 0; i < mp->m_ihsize; i++) { - rwlock_init(&(mp->m_ihash[i].ih_lock)); - INIT_RADIX_TREE(&(mp->m_ihash[i].ih_root), GFP_ATOMIC); - } -} - -/* - * Free up structures allocated by xfs_ihash_init, at unmount time. - */ -void -xfs_ihash_free(xfs_mount_t *mp) -{ - kmem_free(mp->m_ihash, mp->m_ihsize * sizeof(xfs_ihash_t)); - mp->m_ihash = NULL; -} - -/* * Look up an inode by number in the given file system. - * The inode is looked up in the hash table for the file system - * represented by the mount point parameter mp. Each bucket of - * the hash table is guarded by an individual semaphore. - * - * If the inode is found in the hash table, its corresponding vnode - * is obtained with a call to vn_get(). This call takes care of - * coordination with the reclamation of the inode and vnode. Note - * that the vmap structure is filled in while holding the hash lock. - * This gives us the state of the inode/vnode when we found it and - * is used for coordination in vn_get(). + * The inode is looked up in the cache held in each AG. + * If the inode is found in the cache, attach it to the provided + * vnode. * - * If it is not in core, read it in from the file system's device and - * add the inode into the hash table. + * If it is not in core, read it in from the file system's device, + * add it to the cache and attach the provided vnode. * * The inode is locked according to the value of the lock_flags parameter. * This flag parameter indicates how and if the inode's IO lock and inode lock @@ -121,29 +74,37 @@ xfs_iget_core( xfs_inode_t **ipp, xfs_daddr_t bno) { - xfs_ihash_t *ih; xfs_inode_t *ip; xfs_inode_t *iq; bhv_vnode_t *inode_vp; - ulong version; int error; xfs_icluster_t *icl, *new_icl = NULL; unsigned long first_index, mask; + xfs_perag_t *pag; + xfs_agino_t agino; - - ih = XFS_IHASH(mp, ino); + /* the radix tree exists only in inode capable AGs */ + if (XFS_INO_TO_AGNO(mp, ino) >= mp->m_maxagi) + return EINVAL; + + /* get the perag structure and ensure that it's inode capable */ + pag = xfs_get_perag(mp, ino); + if (!pag->pagi_inodeok) + return EINVAL; + ASSERT(pag->pag_ici_init); + agino = XFS_INO_TO_AGINO(mp, ino); again: - read_lock(&ih->ih_lock); + read_lock(&pag->pag_ici_lock); + ip = radix_tree_lookup(&pag->pag_ici_root, agino); - ip = (xfs_inode_t *)radix_tree_lookup(&ih->ih_root, (unsigned long)ino); if (ip != NULL) { /* * If INEW is set this inode is being set up * we need to pause and try again. */ if (xfs_iflags_test(ip, XFS_INEW)) { - read_unlock(&ih->ih_lock); + read_unlock(&pag->pag_ici_lock); delay(1); XFS_STATS_INC(xs_ig_frecycle); @@ -158,7 +119,7 @@ again: * we need to pause and try again. */ if (xfs_iflags_test(ip, XFS_IRECLAIM)) { - read_unlock(&ih->ih_lock); + read_unlock(&pag->pag_ici_lock); delay(1); XFS_STATS_INC(xs_ig_frecycle); @@ -174,7 +135,8 @@ again: */ if ((ip->i_d.di_mode == 0) && !(flags & XFS_IGET_CREATE)) { - read_unlock(&ih->ih_lock); + read_unlock(&pag->pag_ici_lock); + xfs_put_perag(mp, pag); return ENOENT; } @@ -188,7 +150,7 @@ again: * xfs_iunpin() */ if (xfs_ipincount(ip)) { - read_unlock(&ih->ih_lock); + read_unlock(&pag->pag_ici_lock); xfs_log_force(mp, 0, XFS_LOG_FORCE|XFS_LOG_SYNC); XFS_STATS_INC(xs_ig_frecycle); @@ -201,8 +163,7 @@ again: XFS_STATS_INC(xs_ig_found); xfs_iflags_clear(ip, XFS_IRECLAIMABLE); - version = ih->ih_version; - read_unlock(&ih->ih_lock); + read_unlock(&pag->pag_ici_lock); XFS_MOUNT_ILOCK(mp); list_del_init(&ip->i_reclaim); @@ -217,7 +178,7 @@ again: * try again. */ if (inode->i_state & (I_FREEING | I_CLEAR)) { - read_unlock(&ih->ih_lock); + read_unlock(&pag->pag_ici_lock); delay(1); XFS_STATS_INC(xs_ig_frecycle); @@ -233,19 +194,17 @@ again: } /* - * Inode cache hit: if ip is not at the front of - * its hash chain, move it there now. - * Do this with the lock held for update, but - * do statistics after releasing the lock. + * Inode cache hit */ - version = ih->ih_version; - read_unlock(&ih->ih_lock); + read_unlock(&pag->pag_ici_lock); XFS_STATS_INC(xs_ig_found); finish_inode: if (ip->i_d.di_mode == 0) { - if (!(flags & XFS_IGET_CREATE)) + if (!(flags & XFS_IGET_CREATE)) { + xfs_put_perag(mp, pag); return ENOENT; + } xfs_iocore_inode_reinit(ip); } @@ -259,11 +218,9 @@ finish_inode: } /* - * Inode cache miss: save the hash chain version stamp and unlock - * the chain, so we don't deadlock in vn_alloc. + * Inode cache miss */ - version = ih->ih_version; - read_unlock(&ih->ih_lock); + read_unlock(&pag->pag_ici_lock); XFS_STATS_INC(xs_ig_missed); /* @@ -272,25 +229,27 @@ finish_inode: */ error = xfs_iread(mp, tp, ino, &ip, bno, (flags & XFS_IGET_BULKSTAT) ? XFS_IMAP_BULKSTAT : 0); - if (error) + if (error) { + xfs_put_perag(mp, pag); return error; + } vn_trace_exit(vp, "xfs_iget.alloc", (inst_t *)__return_address); xfs_inode_lock_init(ip, vp); xfs_iocore_inode_init(ip); - if (lock_flags) xfs_ilock(ip, lock_flags); if ((ip->i_d.di_mode == 0) && !(flags & XFS_IGET_CREATE)) { xfs_idestroy(ip); + xfs_put_perag(mp, pag); return ENOENT; } /* * This is a bit messy - we preallocate everything we _might_ - * need before we pick up the hash lock. That way we donnn't have to + * need before we pick up the ici lock. That way we don't have to * juggle locks and go all the way back to the start. */ new_icl = (xfs_icluster_t *)kmem_zone_alloc(xfs_icluster_zone, KM_SLEEP); @@ -299,14 +258,15 @@ finish_inode: goto again; } mask = ~(((XFS_INODE_CLUSTER_SIZE(mp) >> mp->m_sb.sb_inodelog)) - 1); - first_index = ino & mask; - write_lock(&ih->ih_lock); + first_index = agino & mask; + write_lock(&pag->pag_ici_lock); /* * Find the cluster if it exists */ icl = NULL; - if (radix_tree_gang_lookup(&ih->ih_root, (void**)&iq, first_index, 1)) { + if (radix_tree_gang_lookup(&pag->pag_ici_root, (void**)&iq, + first_index, 1)) { if ((iq->i_ino & mask) == first_index) icl = iq->i_cluster; } @@ -314,13 +274,12 @@ finish_inode: /* * insert the new inode */ - error = radix_tree_insert(&ih->ih_root, (unsigned long)ino, (void *)ip); + error = radix_tree_insert(&pag->pag_ici_root, agino, ip); if (unlikely(error)) { BUG_ON(error != -EEXIST); - write_unlock(&ih->ih_lock); + write_unlock(&pag->pag_ici_lock); radix_tree_preload_end(); xfs_idestroy(ip); - ASSERT(ih->ih_version != version); XFS_STATS_INC(xs_ig_dup); goto again; } @@ -328,9 +287,7 @@ finish_inode: /* * These values _must_ be set before releasing ihlock! */ - ip->i_hash = ih; ip->i_udquot = ip->i_gdquot = NULL; - ih->ih_version++; xfs_iflags_set(ip, XFS_INEW); ASSERT(ip->i_cluster == NULL && ip->i_cprev == NULL && @@ -358,7 +315,7 @@ finish_inode: spin_lock_init(&new_icl->icl_lock); new_icl = NULL; } - write_unlock(&ih->ih_lock); + write_unlock(&pag->pag_ici_lock); radix_tree_preload_end(); if (new_icl) kmem_zone_free(xfs_icluster_zone, new_icl); @@ -380,6 +337,7 @@ finish_inode: mp->m_inodes = ip; XFS_MOUNT_IUNLOCK(mp); + xfs_put_perag(mp, pag); return_ip: ASSERT(ip->i_df.if_ext_max == @@ -489,13 +447,14 @@ xfs_inode_incore(xfs_mount_t *mp, xfs_ino_t ino, xfs_trans_t *tp) { - xfs_ihash_t *ih; xfs_inode_t *ip; + xfs_perag_t *pag; - ih = XFS_IHASH(mp, ino); - read_lock(&ih->ih_lock); - ip = (xfs_inode_t *) radix_tree_lookup(&ih->ih_root, (unsigned long)ino); - read_unlock(&ih->ih_lock); + pag = xfs_get_perag(mp, ino); + read_lock(&pag->pag_ici_lock); + ip = radix_tree_lookup(&pag->pag_ici_root, XFS_INO_TO_AGINO(mp, ino)); + read_unlock(&pag->pag_ici_lock); + xfs_put_perag(mp, pag); /* the returned inode must match the transaction */ if (ip && (ip->i_transp != tp)) @@ -606,15 +565,14 @@ void xfs_iextract( xfs_inode_t *ip) { - xfs_ihash_t *ih; + xfs_mount_t *mp = ip->i_mount; + xfs_perag_t *pag = xfs_get_perag(mp, ip->i_ino); xfs_inode_t *iq; - xfs_mount_t *mp; - ih = ip->i_hash; - write_lock(&ih->ih_lock); - radix_tree_delete(&ih->ih_root, ip->i_ino); - ih->ih_version++; - write_unlock(&ih->ih_lock); + write_lock(&pag->pag_ici_lock); + radix_tree_delete(&pag->pag_ici_root, XFS_INO_TO_AGINO(mp, ip->i_ino)); + write_unlock(&pag->pag_ici_lock); + xfs_put_perag(mp, pag); /* * Remove from cluster list Index: 2.6.x-xfs-new/fs/xfs/xfs_inode.h =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_inode.h 2007-08-01 15:43:30.379434415 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_inode.h 2007-08-01 15:43:34.082954293 +1000 @@ -168,24 +168,10 @@ typedef struct xfs_iocore { extern void xfs_iocore_inode_init(struct xfs_inode *); extern void xfs_iocore_inode_reinit(struct xfs_inode *); - /* - * This is the type used in the xfs inode hash table. - * An array of these is allocated for each mounted - * file system to hash the inodes for that file system. - */ -typedef struct xfs_ihash { - struct radix_tree_root ih_root; - rwlock_t ih_lock; - uint ih_version; -} xfs_ihash_t; - -#define XFS_IHASH(mp,ino) ((mp)->m_ihash + (((uint)((ino) >> 6)) % (mp)->m_ihsize)) - -/* - * This is the xfs inode cluster hash. This hash is used by xfs_iflush to - * find inodes that share a cluster and can be flushed to disk at the same - * time. + * This is the xfs inode cluster structure. This structure is used by + * xfs_iflush to find inodes that share a cluster and can be flushed to disk at + * the same time. */ typedef struct xfs_icluster { struct xfs_inode *icl_ip; @@ -219,7 +205,6 @@ typedef struct xfs_icluster { */ typedef struct { - struct xfs_ihash *ip_hash; /* pointer to hash header */ struct xfs_inode *ip_mnext; /* next inode in mount list */ struct xfs_inode *ip_mprev; /* ptr to prev inode */ struct xfs_mount *ip_mount; /* fs mount struct ptr */ @@ -227,7 +212,6 @@ typedef struct { typedef struct xfs_inode { /* Inode linking and identification information. */ - struct xfs_ihash *i_hash; /* pointer to hash header */ struct xfs_inode *i_mnext; /* next inode in mount list */ struct xfs_inode *i_mprev; /* ptr to prev inode */ struct xfs_mount *i_mount; /* fs mount struct ptr */ Index: 2.6.x-xfs-new/fs/xfs/xfs_mount.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_mount.c 2007-08-01 15:43:30.391432860 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_mount.c 2007-08-01 15:43:34.082954293 +1000 @@ -160,9 +160,6 @@ xfs_mount_free( xfs_mount_t *mp, int remove_bhv) { - if (mp->m_ihash) - xfs_ihash_free(mp); - if (mp->m_perag) { int agno; @@ -394,12 +391,22 @@ xfs_initialize_perag( pag->pagi_inodeok = 1; if (index < max_metadata) pag->pagf_metadata = 1; + if (!pag->pag_ici_init) { + rwlock_init(&pag->pag_ici_lock); + INIT_RADIX_TREE(&pag->pag_ici_root, GFP_ATOMIC); + pag->pag_ici_init = 1; + } } } else { /* Setup default behavior for smaller filesystems */ for (index = 0; index < agcount; index++) { pag = &mp->m_perag[index]; pag->pagi_inodeok = 1; + if (!pag->pag_ici_init) { + rwlock_init(&pag->pag_ici_lock); + INIT_RADIX_TREE(&pag->pag_ici_root, GFP_ATOMIC); + pag->pag_ici_init = 1; + } } } return index; @@ -1031,12 +1038,6 @@ xfs_mountfs( xfs_trans_init(mp); /* - * Allocate and initialize the inode hash table for this - * file system. - */ - xfs_ihash_init(mp); - - /* * Allocate and initialize the per-ag data. */ init_rwsem(&mp->m_peraglock); @@ -1187,7 +1188,6 @@ xfs_mountfs( error3: xfs_log_unmount_dealloc(mp); error2: - xfs_ihash_free(mp); for (agno = 0; agno < sbp->sb_agcount; agno++) if (mp->m_perag[agno].pagb_list) kmem_free(mp->m_perag[agno].pagb_list, Index: 2.6.x-xfs-new/fs/xfs/xfs_mount.h =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_mount.h 2007-08-01 10:43:15.490092795 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_mount.h 2007-08-01 15:43:34.082954293 +1000 @@ -57,10 +57,7 @@ struct log; struct bhv_vfs; struct bhv_vnode; struct xfs_mount_args; -struct xfs_ihash; -struct xfs_chash; struct xfs_inode; -struct xfs_perag; struct xfs_iocore; struct xfs_bmbt_irec; struct xfs_bmap_free; @@ -335,8 +332,6 @@ typedef struct xfs_mount { xfs_agnumber_t m_agirotor; /* last ag dir inode alloced */ lock_t m_agirotor_lock;/* .. and lock protecting it */ xfs_agnumber_t m_maxagi; /* highest inode alloc group */ - size_t m_ihsize; /* size of next field */ - struct xfs_ihash *m_ihash; /* fs private inode hash table*/ struct xfs_inode *m_inodes; /* active inode list */ struct list_head m_del_inodes; /* inodes to reclaim */ mutex_t m_ilock; /* inode list mutex */ @@ -458,7 +453,7 @@ typedef struct xfs_mount { #define XFS_MOUNT_IDELETE (1ULL << 18) /* delete empty inode clusters*/ #define XFS_MOUNT_SWALLOC (1ULL << 19) /* turn on stripe width * allocation */ -#define XFS_MOUNT_IHASHSIZE (1ULL << 20) /* inode hash table size */ + /* (1ULL << 20) -- currently unused */ #define XFS_MOUNT_DIRSYNC (1ULL << 21) /* synchronous directory ops */ #define XFS_MOUNT_COMPAT_IOSIZE (1ULL << 22) /* don't report large preferred * I/O size in stat() */ @@ -572,6 +567,21 @@ xfs_daddr_to_agbno(struct xfs_mount *mp, } /* + * perag get/put wrappers for eventual ref counting + */ +static inline xfs_perag_t * +xfs_get_perag(struct xfs_mount *mp, xfs_ino_t ino) +{ + return &mp->m_perag[XFS_INO_TO_AGNO(mp, ino)]; +} + +static inline void +xfs_put_perag(struct xfs_mount *mp, xfs_perag_t *pag) +{ + /* nothing to see here, move along */ +} + +/* * Per-cpu superblock locking functions */ #ifdef HAVE_PERCPU_SB Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_export.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/linux-2.6/xfs_export.c 2007-08-01 10:36:25.763324913 +1000 +++ 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_export.c 2007-08-01 15:43:34.094952738 +1000 @@ -17,10 +17,12 @@ */ #include "xfs.h" #include "xfs_types.h" -#include "xfs_dmapi.h" +#include "xfs_inum.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" +#include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_export.h" Index: 2.6.x-xfs-new/fs/xfs/xfs_buf_item.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_buf_item.c 2007-08-01 10:36:25.775323355 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_buf_item.c 2007-08-01 15:43:34.094952738 +1000 @@ -23,6 +23,7 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_buf_item.h" Index: 2.6.x-xfs-new/fs/xfs/xfs_dir2_block.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_dir2_block.c 2007-08-01 15:06:25.800906516 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_dir2_block.c 2007-08-01 15:43:34.102951701 +1000 @@ -22,6 +22,7 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" Index: 2.6.x-xfs-new/fs/xfs/xfs_dir2_data.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_dir2_data.c 2007-08-01 10:36:25.791321277 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_dir2_data.c 2007-08-01 15:43:34.106951182 +1000 @@ -22,6 +22,7 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" Index: 2.6.x-xfs-new/fs/xfs/xfs_dir2_node.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_dir2_node.c 2007-08-01 10:36:25.791321277 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_dir2_node.c 2007-08-01 15:43:34.114950145 +1000 @@ -22,6 +22,7 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" Index: 2.6.x-xfs-new/fs/xfs/xfs_dir2_sf.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_dir2_sf.c 2007-08-01 15:06:25.828902859 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_dir2_sf.c 2007-08-01 15:43:34.126948590 +1000 @@ -22,6 +22,7 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" Index: 2.6.x-xfs-new/fs/xfs/xfs_error.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_error.c 2007-08-01 10:36:25.791321277 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_error.c 2007-08-01 15:43:34.126948590 +1000 @@ -22,6 +22,7 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" Index: 2.6.x-xfs-new/fs/xfs/xfs_extfree_item.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_extfree_item.c 2007-08-01 10:36:25.791321277 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_extfree_item.c 2007-08-01 15:43:34.126948590 +1000 @@ -23,6 +23,7 @@ #include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_trans_priv.h" Index: 2.6.x-xfs-new/fs/xfs/xfs_inode.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_inode.c 2007-08-01 15:43:30.383433897 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_inode.c 2007-08-01 15:43:34.130948071 +1000 @@ -2182,10 +2182,10 @@ xfs_ifree_cluster( int i, j, found, pre_flushed; xfs_daddr_t blkno; xfs_buf_t *bp; - xfs_ihash_t *ih; xfs_inode_t *ip, **ip_found; xfs_inode_log_item_t *iip; xfs_log_item_t *lip; + xfs_perag_t *pag = xfs_get_perag(mp, inum); SPLDECL(s); if (mp->m_sb.sb_blocksize >= XFS_INODE_CLUSTER_SIZE(mp)) { @@ -2220,20 +2220,20 @@ xfs_ifree_cluster( */ found = 0; for (i = 0; i < ninodes; i++) { - ih = XFS_IHASH(mp, inum + i); - read_lock(&ih->ih_lock); - ip = (xfs_inode_t *)radix_tree_lookup(&ih->ih_root, inum + i); + read_lock(&pag->pag_ici_lock); + ip = radix_tree_lookup(&pag->pag_ici_root, + XFS_INO_TO_AGINO(mp, (inum + i))); /* Inode not in memory or we found it already, * nothing to do */ if (!ip || xfs_iflags_test(ip, XFS_ISTALE)) { - read_unlock(&ih->ih_lock); + read_unlock(&pag->pag_ici_lock); continue; } if (xfs_inode_clean(ip)) { - read_unlock(&ih->ih_lock); + read_unlock(&pag->pag_ici_lock); continue; } @@ -2256,7 +2256,7 @@ xfs_ifree_cluster( ip_found[found++] = ip; } } - read_unlock(&ih->ih_lock); + read_unlock(&pag->pag_ici_lock); continue; } @@ -2274,8 +2274,7 @@ xfs_ifree_cluster( xfs_iunlock(ip, XFS_ILOCK_EXCL); } } - - read_unlock(&ih->ih_lock); + read_unlock(&pag->pag_ici_lock); } bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, blkno, @@ -2330,6 +2329,7 @@ xfs_ifree_cluster( } kmem_free(ip_found, ninodes * sizeof(xfs_inode_t *)); + xfs_put_perag(mp, pag); } /* Index: 2.6.x-xfs-new/fs/xfs/xfs_rename.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_rename.c 2007-08-01 10:36:25.799320238 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_rename.c 2007-08-01 15:43:34.138947034 +1000 @@ -22,6 +22,7 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" Index: 2.6.x-xfs-new/fs/xfs/xfs_trans_ail.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_trans_ail.c 2007-08-01 10:36:25.915305171 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_trans_ail.c 2007-08-01 15:43:34.146945997 +1000 @@ -22,6 +22,7 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_trans_priv.h" Index: 2.6.x-xfs-new/fs/xfs/xfs_trans_extfree.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_trans_extfree.c 2007-08-01 10:36:25.915305171 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_trans_extfree.c 2007-08-01 15:43:34.150945479 +1000 @@ -22,6 +22,7 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_trans_priv.h" Index: 2.6.x-xfs-new/fs/xfs/xfs_vfsops.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_vfsops.c 2007-08-01 15:43:30.383433897 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_vfsops.c 2007-08-01 15:43:34.150945479 +1000 @@ -246,7 +246,6 @@ xfs_start_flags( ap->logbufsize); return XFS_ERROR(EINVAL); } - mp->m_ihsize = ap->ihashsize; mp->m_logbsize = ap->logbufsize; mp->m_fsname_len = strlen(ap->fsname) + 1; mp->m_fsname = kmem_alloc(mp->m_fsname_len, KM_SLEEP); @@ -293,8 +292,6 @@ xfs_start_flags( mp->m_readio_log = mp->m_writeio_log = ap->iosizelog; } - if (ap->flags & XFSMNT_IHASHSIZE) - mp->m_flags |= XFS_MOUNT_IHASHSIZE; if (ap->flags & XFSMNT_IDELETE) mp->m_flags |= XFS_MOUNT_IDELETE; if (ap->flags & XFSMNT_DIRSYNC) @@ -1693,7 +1690,6 @@ xfs_vget( #define MNTOPT_BSDGROUPS "bsdgroups" /* group-ID from parent directory */ #define MNTOPT_SYSVGROUPS "sysvgroups" /* group-ID from current process */ #define MNTOPT_ALLOCSIZE "allocsize" /* preferred allocation size */ -#define MNTOPT_IHASHSIZE "ihashsize" /* size of inode hash table */ #define MNTOPT_NORECOVERY "norecovery" /* don't run XFS recovery */ #define MNTOPT_BARRIER "barrier" /* use writer barriers for log write and * unwritten extent conversion */ @@ -1819,15 +1815,6 @@ xfs_parseargs( iosize = suffix_strtoul(value, &eov, 10); args->flags |= XFSMNT_IOSIZE; args->iosizelog = ffs(iosize) - 1; - } else if (!strcmp(this_char, MNTOPT_IHASHSIZE)) { - if (!value || !*value) { - cmn_err(CE_WARN, - "XFS: %s option requires an argument", - this_char); - return EINVAL; - } - args->flags |= XFSMNT_IHASHSIZE; - args->ihashsize = simple_strtoul(value, &eov, 10); } else if (!strcmp(this_char, MNTOPT_GRPID) || !strcmp(this_char, MNTOPT_BSDGROUPS)) { vfsp->vfs_flag |= VFS_GRPID; @@ -1986,9 +1973,6 @@ xfs_showargs( seq_puts(m, xfs_infop->str); } - if (mp->m_flags & XFS_MOUNT_IHASHSIZE) - seq_printf(m, "," MNTOPT_IHASHSIZE "=%d", (int)mp->m_ihsize); - if (mp->m_flags & XFS_MOUNT_DFLT_IOSIZE) seq_printf(m, "," MNTOPT_ALLOCSIZE "=%dk", (int)(1 << mp->m_writeio_log) >> 10); Index: 2.6.x-xfs-new/fs/xfs/xfs_vnodeops.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_vnodeops.c 2007-08-01 15:06:51.049608565 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_vnodeops.c 2007-08-01 15:43:34.166943405 +1000 @@ -3859,7 +3859,7 @@ xfs_finish_reclaim( int locked, int sync_mode) { - xfs_ihash_t *ih = ip->i_hash; + xfs_perag_t *pag = xfs_get_perag(ip->i_mount, ip->i_ino); bhv_vnode_t *vp = XFS_ITOV_NULL(ip); int error; @@ -3871,12 +3871,12 @@ xfs_finish_reclaim( * Once we have the XFS_IRECLAIM flag set it will not touch * us. */ - write_lock(&ih->ih_lock); + write_lock(&pag->pag_ici_lock); spin_lock(&ip->i_flags_lock); if (__xfs_iflags_test(ip, XFS_IRECLAIM) || (!__xfs_iflags_test(ip, XFS_IRECLAIMABLE) && vp == NULL)) { spin_unlock(&ip->i_flags_lock); - write_unlock(&ih->ih_lock); + write_unlock(&pag->pag_ici_lock); if (locked) { xfs_ifunlock(ip); xfs_iunlock(ip, XFS_ILOCK_EXCL); @@ -3885,7 +3885,8 @@ xfs_finish_reclaim( } __xfs_iflags_set(ip, XFS_IRECLAIM); spin_unlock(&ip->i_flags_lock); - write_unlock(&ih->ih_lock); + write_unlock(&pag->pag_ici_lock); + xfs_put_perag(ip->i_mount, pag); /* * If the inode is still dirty, then flush it out. If the inode Index: 2.6.x-xfs-new/fs/xfs/xfsidbg.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfsidbg.c 2007-08-01 15:43:30.387433378 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfsidbg.c 2007-08-01 15:43:34.170942886 +1000 @@ -147,7 +147,6 @@ static void xfsidbg_xhelp(void); static void xfsidbg_xiclog(xlog_in_core_t *); static void xfsidbg_xiclogall(xlog_in_core_t *); static void xfsidbg_xiclogcb(xlog_in_core_t *); -static void xfsidbg_xihash(xfs_mount_t *mp); static void xfsidbg_xinodes(xfs_mount_t *); static void xfsidbg_delayed_blocks(xfs_mount_t *); static void xfsidbg_xinodes_quiesce(xfs_mount_t *); @@ -1238,25 +1237,6 @@ static int kdbm_xfs_xiclogcb( return 0; } -static int kdbm_xfs_xihash( - int argc, - const char **argv) -{ - unsigned long addr; - int nextarg = 1; - long offset = 0; - int diag; - - if (argc != 1) - return KDB_ARGCOUNT; - diag = kdbgetaddrarg(argc, argv, &nextarg, &addr, &offset, NULL); - if (diag) - return diag; - - xfsidbg_xihash((xfs_mount_t *) addr); - return 0; -} - static int kdbm_xfs_xinodes( int argc, const char **argv) @@ -2131,15 +2111,11 @@ static void printinode(struct inode *ip) " i_mode = 0x%x i_nlink = %d i_rdev = 0x%x i_state = 0x%lx\n", ip->i_mode, ip->i_nlink, kdev_t_to_nr(ip->i_rdev), ip->i_state); - kdb_printf(" i_hash.nxt = 0x%p i_hash.pprv = 0x%p\n", - ip->i_hash.next, ip->i_hash.prev); #else kdb_printf( " i_mode = 0x%x i_nlink = %d i_rdev = 0x%x i_state = 0x%lx\n", ip->i_mode, ip->i_nlink, ip->i_rdev, ip->i_state); - kdb_printf(" i_hash.nxt = 0x%p i_hash.pprv = 0x%p\n", - ip->i_hash.next, ip->i_hash.pprev); #endif kdb_printf(" i_list.nxt = 0x%p i_list.prv = 0x%p\n", ip->i_list.next, ip->i_list.prev); @@ -2681,8 +2657,6 @@ static struct xif xfsidbg_funcs[] = { { "xictrc", kdbm_xfs_xiclogtrace, "", "Dump XFS in-core log trace" }, #endif - { "xihash", kdbm_xfs_xihash, "", - "Dump XFS inode hash statistics"}, #ifdef XFS_ILOCK_TRACE { "xilocktrc",kdbm_xfs_xilock_trace, "", "Dump XFS ilock trace" }, @@ -6610,7 +6584,7 @@ xfsidbg_xmount(xfs_mount_t *mp) "BARRIER", /* 0x20000 */ "IDELETE", /* 0x40000 */ "SWALLOC", /* 0x80000 */ - "IHASHSIZE", /* 0x100000 */ + "UNUSED_100000", /* 0x100000 */ "DIRSYNC", /* 0x200000 */ "COMPAT_IOSIZE",/* 0x400000 */ NULL @@ -6642,8 +6616,6 @@ xfsidbg_xmount(xfs_mount_t *mp) mp->m_rtdev_targp ? mp->m_rtdev_targp->bt_dev : 0); kdb_printf("bsize %d agfrotor %d xfs_rotorstep %d agirotor %d\n", mp->m_bsize, mp->m_agfrotor, xfs_rotorstep, mp->m_agirotor); - kdb_printf("ihash 0x%p ihsize %zu\n", - mp->m_ihash, mp->m_ihsize); kdb_printf("inodes 0x%p ilock 0x%p ireclaims 0x%x\n", mp->m_inodes, &mp->m_ilock, mp->m_ireclaims); kdb_printf("readio_log 0x%x readio_blocks 0x%x ", @@ -6717,73 +6689,6 @@ xfsidbg_xmount(xfs_mount_t *mp) } -static void -xfsidbg_xihash(xfs_mount_t *mp) -{ -#if 0 - xfs_ihash_t *ih; - int i; - int j; - int total; - int numzeros; - xfs_inode_t *ip; - int *hist; - int hist_bytes = mp->m_ihsize * sizeof(int); - int hist2[21]; - - hist = (int *) kmalloc(hist_bytes, GFP_KERNEL); - - if (hist == NULL) { - kdb_printf("xfsidbg_xihash: kmalloc(%d) failed!\n", - hist_bytes); - return; - } - - for (i = 0; i < mp->m_ihsize; i++) { - ih = mp->m_ihash + i; - j = 0; - for (ip = ih->ih_next; ip != NULL; ip = ip->i_next) - j++; - hist[i] = j; - } - - numzeros = total = 0; - - for (i = 0; i < 21; i++) - hist2[i] = 0; - - for (i = 0; i < mp->m_ihsize; i++) { - kdb_printf("%d ", hist[i]); - total += hist[i]; - numzeros += hist[i] == 0 ? 1 : 0; - if (hist[i] > 20) - j = 20; - else - j = hist[i]; - - if (! (j <= 20)) { - kdb_printf("xfsidbg_xihash: (j > 20)/%d @ line # %d\n", - j, __LINE__); - return; - } - - hist2[j]++; - } - - kdb_printf("\n"); - - kdb_printf("total inodes = %d, average length = %zu, adjusted average = %zu\n", - total, total / mp->m_ihsize, - total / (mp->m_ihsize - numzeros)); - - for (i = 0; i < 21; i++) { - kdb_printf("%d - %d , ", i, hist2[i]); - } - kdb_printf("\n"); - kfree(hist); -#endif -} - /* * Command to print xfs inodes: kp xnode */ @@ -6799,10 +6704,8 @@ xfsidbg_xnode(xfs_inode_t *ip) NULL }; - kdb_printf("hash 0x%p mount 0x%p\n", - ip->i_hash, - ip->i_mount); - kdb_printf("mnext 0x%p mprev 0x%p vnode 0x%p \n", + kdb_printf("mount 0x%p mnext 0x%p mprev 0x%p vnode 0x%p \n", + ip->i_mount, ip->i_mnext, ip->i_mprev, XFS_ITOV_NULL(ip)); Index: 2.6.x-xfs-new/fs/xfs/xfs_clnt.h =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_clnt.h 2007-08-01 10:36:25.915305171 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_clnt.h 2007-08-01 15:43:34.174942368 +1000 @@ -89,7 +89,6 @@ struct xfs_mount_args { #define XFSMNT_IDELETE 0x08000000 /* inode cluster delete */ #define XFSMNT_SWALLOC 0x10000000 /* turn on stripe width * allocation */ -#define XFSMNT_IHASHSIZE 0x20000000 /* inode hash table size */ #define XFSMNT_DIRSYNC 0x40000000 /* sync creat,link,unlink,rename * symlink,mkdir,rmdir,mknod */ #define XFSMNT_FLAGS2 0x80000000 /* more flags set in flags2 */ From owner-xfs@oss.sgi.com Wed Aug 8 16:40:52 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 16:40:55 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l78Nekbm025082 for ; Wed, 8 Aug 2007 16:40:49 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id JAA28901; Thu, 9 Aug 2007 09:40:45 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l78NeieW54421824; Thu, 9 Aug 2007 09:40:45 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l78Neiec55639575; Thu, 9 Aug 2007 09:40:44 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Thu, 9 Aug 2007 09:40:44 +1000 From: David Chinner To: xfs-dev Cc: xfs-oss Subject: Review: Factor some common freelist checks Message-ID: <20070808234043.GT12413810@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12532 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs Suggested by Tim - don't duplicate the code used to check the longest available extent on the freelist. [we've got to clean up this header include mess.] Signed-off-by: Dave Chinner --- fs/xfs/dmapi/xfs_dm.c | 2 +- fs/xfs/dmapi/xfs_dm_bhv.c | 2 +- fs/xfs/dmapi/xfs_dm_fsops.c | 2 +- fs/xfs/linux-2.6/xfs_ioctl.c | 2 +- fs/xfs/linux-2.6/xfs_iops.c | 2 +- fs/xfs/linux-2.6/xfs_ksyms.c | 2 +- fs/xfs/linux-2.6/xfs_lrw.c | 2 +- fs/xfs/linux-2.6/xfs_super.c | 2 +- fs/xfs/linux-2.6/xfs_vfs.c | 2 +- fs/xfs/quota/xfs_dquot.c | 2 +- fs/xfs/quota/xfs_dquot_item.c | 2 +- fs/xfs/quota/xfs_qm.c | 2 +- fs/xfs/quota/xfs_qm_bhv.c | 2 +- fs/xfs/quota/xfs_qm_ksyms.c | 2 +- fs/xfs/quota/xfs_qm_stats.c | 2 +- fs/xfs/quota/xfs_qm_syscalls.c | 2 +- fs/xfs/quota/xfs_trans_dquot.c | 2 +- fs/xfs/xfs_alloc.c | 7 ++----- fs/xfs/xfs_alloc.h | 19 +++++++++++++++++-- fs/xfs/xfs_bmap.c | 12 ++---------- fs/xfs/xfs_filestream.c | 9 ++------- fs/xfs/xfs_iomap.c | 2 +- 22 files changed, 41 insertions(+), 42 deletions(-) Index: 2.6.x-xfs-new/fs/xfs/xfs_alloc.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_alloc.c 2007-06-25 13:56:20.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_alloc.c 2007-06-25 14:06:05.123181552 +1000 @@ -1858,15 +1858,12 @@ xfs_alloc_fix_freelist( } if (!(flags & XFS_ALLOC_FLAG_FREEING)) { - need = XFS_MIN_FREELIST_PAG(pag, mp); - delta = need > pag->pagf_flcount ? need - pag->pagf_flcount : 0; /* * If it looks like there isn't a long enough extent, or enough * total blocks, reject it. */ - longest = (pag->pagf_longest > delta) ? - (pag->pagf_longest - delta) : - (pag->pagf_flcount > 0 || pag->pagf_longest > 0); + need = XFS_MIN_FREELIST_PAG(pag, mp); + xfs_alloc_min_freelist(mp, pag, &longest); if ((args->minlen + args->alignment + args->minalignslop - 1) > longest || ((int)(pag->pagf_freeblks + pag->pagf_flcount - Index: 2.6.x-xfs-new/fs/xfs/xfs_alloc.h =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_alloc.h 2007-05-22 19:04:51.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_alloc.h 2007-06-25 14:14:13.627226544 +1000 @@ -19,8 +19,6 @@ #define __XFS_ALLOC_H__ struct xfs_buf; -struct xfs_mount; -struct xfs_perag; struct xfs_trans; /* @@ -207,6 +205,23 @@ xfs_alloc_clear_busy(xfs_trans_t *tp, xfs_agnumber_t ag, int idx); +/* + * Determine the longest free extent available in the AG supplied + */ +STATIC_INLINE void +xfs_alloc_min_freelist( + xfs_mount_t *mp, + xfs_perag_t *pag, + xfs_extlen_t *longest) +{ + xfs_extlen_t need, delta; + + need = XFS_MIN_FREELIST_PAG(pag, mp); + delta = need > pag->pagf_flcount ? need - pag->pagf_flcount : 0; + *longest = (pag->pagf_longest > delta) ? + (pag->pagf_longest - delta) : + (pag->pagf_flcount > 0 || pag->pagf_longest > 0); +} #endif /* __KERNEL__ */ Index: 2.6.x-xfs-new/fs/xfs/xfs_bmap.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_bmap.c 2007-06-25 13:56:11.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_bmap.c 2007-06-25 14:11:19.905965882 +1000 @@ -2703,9 +2703,6 @@ xfs_bmap_btalloc( xfs_agnumber_t startag; xfs_alloc_arg_t args; xfs_extlen_t blen; - xfs_extlen_t delta; - xfs_extlen_t longest; - xfs_extlen_t need; xfs_extlen_t nextminlen = 0; xfs_perag_t *pag; int nullfb; /* true if ap->firstblock isn't set */ @@ -2787,13 +2784,8 @@ xfs_bmap_btalloc( * See xfs_alloc_fix_freelist... */ if (pag->pagf_init) { - need = XFS_MIN_FREELIST_PAG(pag, mp); - delta = need > pag->pagf_flcount ? - need - pag->pagf_flcount : 0; - longest = (pag->pagf_longest > delta) ? - (pag->pagf_longest - delta) : - (pag->pagf_flcount > 0 || - pag->pagf_longest > 0); + xfs_extlen_t longest; + xfs_alloc_min_freelist(mp, pag, &longest); if (blen < longest) blen = longest; } else Index: 2.6.x-xfs-new/fs/xfs/xfs_filestream.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_filestream.c 2007-06-22 18:07:15.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_filestream.c 2007-06-25 14:11:11.355085273 +1000 @@ -140,7 +140,7 @@ _xfs_filestream_pick_ag( xfs_extlen_t minlen) { int err, trylock, nscan; - xfs_extlen_t delta, longest, need, free, minfree, maxfree = 0; + xfs_extlen_t longest, free, minfree, maxfree = 0; xfs_agnumber_t ag, max_ag = NULLAGNUMBER; struct xfs_perag *pag; @@ -186,12 +186,7 @@ _xfs_filestream_pick_ag( goto next_ag; } - need = XFS_MIN_FREELIST_PAG(pag, mp); - delta = need > pag->pagf_flcount ? need - pag->pagf_flcount : 0; - longest = (pag->pagf_longest > delta) ? - (pag->pagf_longest - delta) : - (pag->pagf_flcount > 0 || pag->pagf_longest > 0); - + xfs_alloc_min_freelist(mp, pag, &longest); if (((minlen && longest >= minlen) || (!minlen && pag->pagf_freeblks >= minfree)) && (!pag->pagf_metadata || !(flags & XFS_PICK_USERDATA) || Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_ioctl.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/linux-2.6/xfs_ioctl.c 2007-06-20 17:59:36.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_ioctl.c 2007-06-25 14:13:21.298075718 +1000 @@ -24,9 +24,9 @@ #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir2.h" -#include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_mount.h" +#include "xfs_alloc.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_iops.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/linux-2.6/xfs_iops.c 2007-05-29 16:18:03.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_iops.c 2007-06-25 14:13:02.976473863 +1000 @@ -24,10 +24,10 @@ #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir2.h" -#include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" +#include "xfs_alloc.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_lrw.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/linux-2.6/xfs_lrw.c 2007-06-20 17:53:36.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_lrw.c 2007-06-25 14:14:30.457023840 +1000 @@ -24,10 +24,10 @@ #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir2.h" -#include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" +#include "xfs_alloc.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_super.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/linux-2.6/xfs_super.c 2007-06-20 17:53:35.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_super.c 2007-06-25 14:14:43.087370791 +1000 @@ -25,10 +25,10 @@ #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir2.h" -#include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" +#include "xfs_alloc.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_vfs.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/linux-2.6/xfs_vfs.c 2007-01-16 10:54:16.000000000 +1100 +++ 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_vfs.c 2007-06-25 14:14:56.941557595 +1000 @@ -25,9 +25,9 @@ #include "xfs_ag.h" #include "xfs_dir2.h" #include "xfs_imap.h" -#include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_mount.h" +#include "xfs_alloc.h" #include "xfs_quota.h" int Index: 2.6.x-xfs-new/fs/xfs/xfs_iomap.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_iomap.c 2007-06-08 21:36:26.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_iomap.c 2007-06-25 14:12:09.347493741 +1000 @@ -24,10 +24,10 @@ #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir2.h" -#include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" +#include "xfs_alloc.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" Index: 2.6.x-xfs-new/fs/xfs/dmapi/xfs_dm.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/dmapi/xfs_dm.c 2007-06-08 21:36:26.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/dmapi/xfs_dm.c 2007-06-25 14:19:43.936003898 +1000 @@ -26,9 +26,9 @@ #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir2.h" -#include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_mount.h" +#include "xfs_alloc.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" Index: 2.6.x-xfs-new/fs/xfs/dmapi/xfs_dm_bhv.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/dmapi/xfs_dm_bhv.c 2007-01-16 10:54:14.000000000 +1100 +++ 2.6.x-xfs-new/fs/xfs/dmapi/xfs_dm_bhv.c 2007-06-25 14:16:45.923295350 +1000 @@ -26,9 +26,9 @@ #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir2.h" -#include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_mount.h" +#include "xfs_alloc.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" Index: 2.6.x-xfs-new/fs/xfs/dmapi/xfs_dm_fsops.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/dmapi/xfs_dm_fsops.c 2007-01-16 10:54:14.000000000 +1100 +++ 2.6.x-xfs-new/fs/xfs/dmapi/xfs_dm_fsops.c 2007-06-25 14:18:12.523963285 +1000 @@ -26,9 +26,9 @@ #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir2.h" -#include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_mount.h" +#include "xfs_alloc.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_ksyms.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/linux-2.6/xfs_ksyms.c 2007-06-25 13:56:20.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_ksyms.c 2007-06-25 14:15:49.646659958 +1000 @@ -27,10 +27,10 @@ #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir2.h" -#include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" +#include "xfs_alloc.h" #include "xfs_da_btree.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" Index: 2.6.x-xfs-new/fs/xfs/quota/xfs_dquot.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/quota/xfs_dquot.c 2007-06-25 13:56:20.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/quota/xfs_dquot.c 2007-06-25 14:19:04.513160782 +1000 @@ -24,10 +24,10 @@ #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir2.h" -#include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" +#include "xfs_alloc.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" Index: 2.6.x-xfs-new/fs/xfs/quota/xfs_dquot_item.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/quota/xfs_dquot_item.c 2007-06-25 13:56:20.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/quota/xfs_dquot_item.c 2007-06-25 14:19:21.906884992 +1000 @@ -24,10 +24,10 @@ #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir2.h" -#include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" +#include "xfs_alloc.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" Index: 2.6.x-xfs-new/fs/xfs/quota/xfs_qm.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/quota/xfs_qm.c 2007-06-25 13:56:20.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/quota/xfs_qm.c 2007-06-25 14:21:29.450325544 +1000 @@ -25,10 +25,10 @@ #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir2.h" -#include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" +#include "xfs_alloc.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" Index: 2.6.x-xfs-new/fs/xfs/quota/xfs_qm_bhv.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/quota/xfs_qm_bhv.c 2007-02-07 13:24:32.000000000 +1100 +++ 2.6.x-xfs-new/fs/xfs/quota/xfs_qm_bhv.c 2007-06-25 14:20:21.775098823 +1000 @@ -25,10 +25,10 @@ #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir2.h" -#include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" +#include "xfs_alloc.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" Index: 2.6.x-xfs-new/fs/xfs/quota/xfs_qm_ksyms.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/quota/xfs_qm_ksyms.c 2007-01-16 10:54:16.000000000 +1100 +++ 2.6.x-xfs-new/fs/xfs/quota/xfs_qm_ksyms.c 2007-06-25 14:21:01.018011537 +1000 @@ -24,10 +24,10 @@ #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir2.h" -#include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" +#include "xfs_alloc.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" Index: 2.6.x-xfs-new/fs/xfs/quota/xfs_qm_stats.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/quota/xfs_qm_stats.c 2007-02-07 13:24:32.000000000 +1100 +++ 2.6.x-xfs-new/fs/xfs/quota/xfs_qm_stats.c 2007-06-25 14:21:14.844219110 +1000 @@ -24,10 +24,10 @@ #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir2.h" -#include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" +#include "xfs_alloc.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" Index: 2.6.x-xfs-new/fs/xfs/quota/xfs_qm_syscalls.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/quota/xfs_qm_syscalls.c 2007-03-29 19:03:30.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/quota/xfs_qm_syscalls.c 2007-06-25 14:18:28.637854830 +1000 @@ -27,10 +27,10 @@ #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir2.h" -#include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" +#include "xfs_alloc.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" Index: 2.6.x-xfs-new/fs/xfs/quota/xfs_trans_dquot.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/quota/xfs_trans_dquot.c 2007-03-29 19:03:30.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/quota/xfs_trans_dquot.c 2007-06-25 14:18:48.239290090 +1000 @@ -24,10 +24,10 @@ #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir2.h" -#include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" +#include "xfs_alloc.h" #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" From owner-xfs@oss.sgi.com Wed Aug 8 16:59:12 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 16:59:15 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l78Nx9bm030573 for ; Wed, 8 Aug 2007 16:59:11 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id JAA29301; Thu, 9 Aug 2007 09:59:08 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l78Nx6eW55611925; Thu, 9 Aug 2007 09:59:07 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l78Nx4uo55658847; Thu, 9 Aug 2007 09:59:04 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Thu, 9 Aug 2007 09:59:04 +1000 From: David Chinner To: Martin Steigerwald Cc: xfs@oss.sgi.com Subject: Re: Impact of atime updates on XFS Message-ID: <20070808235904.GS52011508@sgi.com> References: <200708081408.01817.ms@teamix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200708081408.01817.ms@teamix.de> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12533 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Wed, Aug 08, 2007 at 02:07:51PM +0200, Martin Steigerwald wrote: > > Hello! > > Today, I read about the impact of atime updates on ext3 and possible > approaches on how to reduce that impact by using relatime, a modified version > of relatime - Ingo Molnar posted a patch - or two different states of dirty > inodes, atime dirty inodes which do not need to be flushed soon and dirty > inodes with other changes which should be flushed soon[1]. Oh, that thread. Wake me when it's over, please? > What would be the impact of atime versus noatime on XFS? What is the > recommended setting for XFS? Are there any plans to implement relatime > logic - maybe even the improved one by Ingo Molnar - into XFS? relatime is a VFS layer construct - it should work with XFS right now. > I just remounted my partitions on the notebook and my workstation with noatime > for testing and I have the feeling that it indeed does help. It might feel that way, but if you can't quantify it, it doesn't exist. Joern Engel is the only person to present hard numbers in that thread, and they showed pretty much no difference to performance.... Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Wed Aug 8 17:14:27 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 17:14:31 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from postoffice.aconex.com (mail.app.aconex.com [203.89.192.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l790ENbm003032 for ; Wed, 8 Aug 2007 17:14:27 -0700 Received: from mail.aconex.com (castle.yarra.acx [192.168.3.3]) by postoffice.aconex.com (Postfix) with ESMTP id 75AFA127C55F; Thu, 9 Aug 2007 10:14:25 +1000 (EST) Received: from 192.168.3.1 (proxying for 211.28.181.43) (SquirrelMail authenticated user nscott) by mail.aconex.com with HTTP; Thu, 9 Aug 2007 10:14:40 +1000 (EST) Message-ID: <38891.192.168.3.1.1186618480.squirrel@mail.aconex.com> In-Reply-To: <20070808231310.GS12413810@sgi.com> References: <20070808231310.GS12413810@sgi.com> Date: Thu, 9 Aug 2007 10:14:40 +1000 (EST) Subject: Re: [PATCH 4 of 4] Per Allocation Group inode radix trees From: nscott@aconex.com To: "David Chinner" Cc: "xfs-dev" , "xfs-oss" User-Agent: SquirrelMail/1.4.8-4.el4.centos MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12534 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: nscott@aconex.com Precedence: bulk X-list: xfs > ... > operations by keeping structures and operations within AGs. This > removes the need for the ihashsize mount parameter altogether > as the inode caches should never need size hints anymore. >... > --- 2.6.x-xfs-new.orig/fs/xfs/xfs_vfsops.c 2007-08-01 15:43:30.383433897 > +1000 > +++ 2.6.x-xfs-new/fs/xfs/xfs_vfsops.c 2007-08-01 15:43:34.150945479 +1000 > ... > -#define MNTOPT_IHASHSIZE "ihashsize" /* size of inode hash table */ You probably want to keep this string & parsing for awhile (forever?), but move it to the end of the list with the other deprecated options - just so as to not fail mounts on kernel upgrades... and surprise/annoy sysadmins the world over. cheers. -- Nathan From owner-xfs@oss.sgi.com Wed Aug 8 18:14:02 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 18:14:05 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_26 autolearn=no version=3.2.0-pre1-r499012 Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l791Dvbm018645 for ; Wed, 8 Aug 2007 18:14:01 -0700 Received: from hch by pentafluge.infradead.org with local (Exim 4.63 #1 (Red Hat Linux)) id 1IIwHe-0002xF-NK; Thu, 09 Aug 2007 01:53:50 +0100 Date: Thu, 9 Aug 2007 01:53:50 +0100 From: Christoph Hellwig To: David Chinner Cc: xfs-dev , xfs-oss Subject: Re: Review: Factor some common freelist checks Message-ID: <20070809005350.GA11164@infradead.org> References: <20070808234043.GT12413810@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070808234043.GT12413810@sgi.com> User-Agent: Mutt/1.4.2.3i X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12535 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: xfs On Thu, Aug 09, 2007 at 09:40:44AM +1000, David Chinner wrote: > Suggested by Tim - don't duplicate the code used to check > the longest available extent on the freelist. > > [we've got to clean up this header include mess.] Just move it out of line, it'squite large anyway if you look at all the branches (and there's two more hidden behing XFS_MIN_FREELIST_PAG). Also I'd suggest returning longest from the function instead of using a pointer to return the value. in the end we'd have something like: xfs_extlen_t xfs_alloc_min_freelist( xfs_mount_t *mp, xfs_perag_t *pag) { xfs_extlen_t need, delta; need = XFS_MIN_FREELIST_PAG(pag, mp); if (need > pag->pagf_flcount) delta = need - pag->pagf_flcount; else delta = 0; if (pag->pagf_longest > delta) return pag->pagf_longest - delta; return pag->pagf_flcount > 0 || pag->pagf_longest > 0; } > > Signed-off-by: Dave Chinner > > --- > fs/xfs/dmapi/xfs_dm.c | 2 +- > fs/xfs/dmapi/xfs_dm_bhv.c | 2 +- > fs/xfs/dmapi/xfs_dm_fsops.c | 2 +- > fs/xfs/linux-2.6/xfs_ioctl.c | 2 +- > fs/xfs/linux-2.6/xfs_iops.c | 2 +- > fs/xfs/linux-2.6/xfs_ksyms.c | 2 +- > fs/xfs/linux-2.6/xfs_lrw.c | 2 +- > fs/xfs/linux-2.6/xfs_super.c | 2 +- > fs/xfs/linux-2.6/xfs_vfs.c | 2 +- > fs/xfs/quota/xfs_dquot.c | 2 +- > fs/xfs/quota/xfs_dquot_item.c | 2 +- > fs/xfs/quota/xfs_qm.c | 2 +- > fs/xfs/quota/xfs_qm_bhv.c | 2 +- > fs/xfs/quota/xfs_qm_ksyms.c | 2 +- > fs/xfs/quota/xfs_qm_stats.c | 2 +- > fs/xfs/quota/xfs_qm_syscalls.c | 2 +- > fs/xfs/quota/xfs_trans_dquot.c | 2 +- > fs/xfs/xfs_alloc.c | 7 ++----- > fs/xfs/xfs_alloc.h | 19 +++++++++++++++++-- > fs/xfs/xfs_bmap.c | 12 ++---------- > fs/xfs/xfs_filestream.c | 9 ++------- > fs/xfs/xfs_iomap.c | 2 +- > 22 files changed, 41 insertions(+), 42 deletions(-) > > Index: 2.6.x-xfs-new/fs/xfs/xfs_alloc.c > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/xfs_alloc.c 2007-06-25 13:56:20.000000000 +1000 > +++ 2.6.x-xfs-new/fs/xfs/xfs_alloc.c 2007-06-25 14:06:05.123181552 +1000 > @@ -1858,15 +1858,12 @@ xfs_alloc_fix_freelist( > } > > if (!(flags & XFS_ALLOC_FLAG_FREEING)) { > - need = XFS_MIN_FREELIST_PAG(pag, mp); > - delta = need > pag->pagf_flcount ? need - pag->pagf_flcount : 0; > /* > * If it looks like there isn't a long enough extent, or enough > * total blocks, reject it. > */ > - longest = (pag->pagf_longest > delta) ? > - (pag->pagf_longest - delta) : > - (pag->pagf_flcount > 0 || pag->pagf_longest > 0); > + need = XFS_MIN_FREELIST_PAG(pag, mp); > + xfs_alloc_min_freelist(mp, pag, &longest); > if ((args->minlen + args->alignment + args->minalignslop - 1) > > longest || > ((int)(pag->pagf_freeblks + pag->pagf_flcount - > Index: 2.6.x-xfs-new/fs/xfs/xfs_alloc.h > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/xfs_alloc.h 2007-05-22 19:04:51.000000000 +1000 > +++ 2.6.x-xfs-new/fs/xfs/xfs_alloc.h 2007-06-25 14:14:13.627226544 +1000 > @@ -19,8 +19,6 @@ > #define __XFS_ALLOC_H__ > > struct xfs_buf; > -struct xfs_mount; > -struct xfs_perag; > struct xfs_trans; > > /* > @@ -207,6 +205,23 @@ xfs_alloc_clear_busy(xfs_trans_t *tp, > xfs_agnumber_t ag, > int idx); > > +/* > + * Determine the longest free extent available in the AG supplied > + */ > +STATIC_INLINE void > +xfs_alloc_min_freelist( > + xfs_mount_t *mp, > + xfs_perag_t *pag, > + xfs_extlen_t *longest) > +{ > + xfs_extlen_t need, delta; > + > + need = XFS_MIN_FREELIST_PAG(pag, mp); > + delta = need > pag->pagf_flcount ? need - pag->pagf_flcount : 0; > + *longest = (pag->pagf_longest > delta) ? > + (pag->pagf_longest - delta) : > + (pag->pagf_flcount > 0 || pag->pagf_longest > 0); > +} > > #endif /* __KERNEL__ */ > > Index: 2.6.x-xfs-new/fs/xfs/xfs_bmap.c > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/xfs_bmap.c 2007-06-25 13:56:11.000000000 +1000 > +++ 2.6.x-xfs-new/fs/xfs/xfs_bmap.c 2007-06-25 14:11:19.905965882 +1000 > @@ -2703,9 +2703,6 @@ xfs_bmap_btalloc( > xfs_agnumber_t startag; > xfs_alloc_arg_t args; > xfs_extlen_t blen; > - xfs_extlen_t delta; > - xfs_extlen_t longest; > - xfs_extlen_t need; > xfs_extlen_t nextminlen = 0; > xfs_perag_t *pag; > int nullfb; /* true if ap->firstblock isn't set */ > @@ -2787,13 +2784,8 @@ xfs_bmap_btalloc( > * See xfs_alloc_fix_freelist... > */ > if (pag->pagf_init) { > - need = XFS_MIN_FREELIST_PAG(pag, mp); > - delta = need > pag->pagf_flcount ? > - need - pag->pagf_flcount : 0; > - longest = (pag->pagf_longest > delta) ? > - (pag->pagf_longest - delta) : > - (pag->pagf_flcount > 0 || > - pag->pagf_longest > 0); > + xfs_extlen_t longest; > + xfs_alloc_min_freelist(mp, pag, &longest); > if (blen < longest) > blen = longest; > } else > Index: 2.6.x-xfs-new/fs/xfs/xfs_filestream.c > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/xfs_filestream.c 2007-06-22 18:07:15.000000000 +1000 > +++ 2.6.x-xfs-new/fs/xfs/xfs_filestream.c 2007-06-25 14:11:11.355085273 +1000 > @@ -140,7 +140,7 @@ _xfs_filestream_pick_ag( > xfs_extlen_t minlen) > { > int err, trylock, nscan; > - xfs_extlen_t delta, longest, need, free, minfree, maxfree = 0; > + xfs_extlen_t longest, free, minfree, maxfree = 0; > xfs_agnumber_t ag, max_ag = NULLAGNUMBER; > struct xfs_perag *pag; > > @@ -186,12 +186,7 @@ _xfs_filestream_pick_ag( > goto next_ag; > } > > - need = XFS_MIN_FREELIST_PAG(pag, mp); > - delta = need > pag->pagf_flcount ? need - pag->pagf_flcount : 0; > - longest = (pag->pagf_longest > delta) ? > - (pag->pagf_longest - delta) : > - (pag->pagf_flcount > 0 || pag->pagf_longest > 0); > - > + xfs_alloc_min_freelist(mp, pag, &longest); > if (((minlen && longest >= minlen) || > (!minlen && pag->pagf_freeblks >= minfree)) && > (!pag->pagf_metadata || !(flags & XFS_PICK_USERDATA) || > Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_ioctl.c > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/linux-2.6/xfs_ioctl.c 2007-06-20 17:59:36.000000000 +1000 > +++ 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_ioctl.c 2007-06-25 14:13:21.298075718 +1000 > @@ -24,9 +24,9 @@ > #include "xfs_sb.h" > #include "xfs_ag.h" > #include "xfs_dir2.h" > -#include "xfs_alloc.h" > #include "xfs_dmapi.h" > #include "xfs_mount.h" > +#include "xfs_alloc.h" > #include "xfs_bmap_btree.h" > #include "xfs_alloc_btree.h" > #include "xfs_ialloc_btree.h" > Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_iops.c > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/linux-2.6/xfs_iops.c 2007-05-29 16:18:03.000000000 +1000 > +++ 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_iops.c 2007-06-25 14:13:02.976473863 +1000 > @@ -24,10 +24,10 @@ > #include "xfs_sb.h" > #include "xfs_ag.h" > #include "xfs_dir2.h" > -#include "xfs_alloc.h" > #include "xfs_dmapi.h" > #include "xfs_quota.h" > #include "xfs_mount.h" > +#include "xfs_alloc.h" > #include "xfs_bmap_btree.h" > #include "xfs_alloc_btree.h" > #include "xfs_ialloc_btree.h" > Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_lrw.c > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/linux-2.6/xfs_lrw.c 2007-06-20 17:53:36.000000000 +1000 > +++ 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_lrw.c 2007-06-25 14:14:30.457023840 +1000 > @@ -24,10 +24,10 @@ > #include "xfs_sb.h" > #include "xfs_ag.h" > #include "xfs_dir2.h" > -#include "xfs_alloc.h" > #include "xfs_dmapi.h" > #include "xfs_quota.h" > #include "xfs_mount.h" > +#include "xfs_alloc.h" > #include "xfs_bmap_btree.h" > #include "xfs_alloc_btree.h" > #include "xfs_ialloc_btree.h" > Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_super.c > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/linux-2.6/xfs_super.c 2007-06-20 17:53:35.000000000 +1000 > +++ 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_super.c 2007-06-25 14:14:43.087370791 +1000 > @@ -25,10 +25,10 @@ > #include "xfs_sb.h" > #include "xfs_ag.h" > #include "xfs_dir2.h" > -#include "xfs_alloc.h" > #include "xfs_dmapi.h" > #include "xfs_quota.h" > #include "xfs_mount.h" > +#include "xfs_alloc.h" > #include "xfs_bmap_btree.h" > #include "xfs_alloc_btree.h" > #include "xfs_ialloc_btree.h" > Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_vfs.c > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/linux-2.6/xfs_vfs.c 2007-01-16 10:54:16.000000000 +1100 > +++ 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_vfs.c 2007-06-25 14:14:56.941557595 +1000 > @@ -25,9 +25,9 @@ > #include "xfs_ag.h" > #include "xfs_dir2.h" > #include "xfs_imap.h" > -#include "xfs_alloc.h" > #include "xfs_dmapi.h" > #include "xfs_mount.h" > +#include "xfs_alloc.h" > #include "xfs_quota.h" > > int > Index: 2.6.x-xfs-new/fs/xfs/xfs_iomap.c > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/xfs_iomap.c 2007-06-08 21:36:26.000000000 +1000 > +++ 2.6.x-xfs-new/fs/xfs/xfs_iomap.c 2007-06-25 14:12:09.347493741 +1000 > @@ -24,10 +24,10 @@ > #include "xfs_sb.h" > #include "xfs_ag.h" > #include "xfs_dir2.h" > -#include "xfs_alloc.h" > #include "xfs_dmapi.h" > #include "xfs_quota.h" > #include "xfs_mount.h" > +#include "xfs_alloc.h" > #include "xfs_bmap_btree.h" > #include "xfs_alloc_btree.h" > #include "xfs_ialloc_btree.h" > Index: 2.6.x-xfs-new/fs/xfs/dmapi/xfs_dm.c > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/dmapi/xfs_dm.c 2007-06-08 21:36:26.000000000 +1000 > +++ 2.6.x-xfs-new/fs/xfs/dmapi/xfs_dm.c 2007-06-25 14:19:43.936003898 +1000 > @@ -26,9 +26,9 @@ > #include "xfs_sb.h" > #include "xfs_ag.h" > #include "xfs_dir2.h" > -#include "xfs_alloc.h" > #include "xfs_dmapi.h" > #include "xfs_mount.h" > +#include "xfs_alloc.h" > #include "xfs_da_btree.h" > #include "xfs_bmap_btree.h" > #include "xfs_alloc_btree.h" > Index: 2.6.x-xfs-new/fs/xfs/dmapi/xfs_dm_bhv.c > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/dmapi/xfs_dm_bhv.c 2007-01-16 10:54:14.000000000 +1100 > +++ 2.6.x-xfs-new/fs/xfs/dmapi/xfs_dm_bhv.c 2007-06-25 14:16:45.923295350 +1000 > @@ -26,9 +26,9 @@ > #include "xfs_sb.h" > #include "xfs_ag.h" > #include "xfs_dir2.h" > -#include "xfs_alloc.h" > #include "xfs_dmapi.h" > #include "xfs_mount.h" > +#include "xfs_alloc.h" > #include "xfs_bmap_btree.h" > #include "xfs_alloc_btree.h" > #include "xfs_ialloc_btree.h" > Index: 2.6.x-xfs-new/fs/xfs/dmapi/xfs_dm_fsops.c > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/dmapi/xfs_dm_fsops.c 2007-01-16 10:54:14.000000000 +1100 > +++ 2.6.x-xfs-new/fs/xfs/dmapi/xfs_dm_fsops.c 2007-06-25 14:18:12.523963285 +1000 > @@ -26,9 +26,9 @@ > #include "xfs_sb.h" > #include "xfs_ag.h" > #include "xfs_dir2.h" > -#include "xfs_alloc.h" > #include "xfs_dmapi.h" > #include "xfs_mount.h" > +#include "xfs_alloc.h" > #include "xfs_bmap_btree.h" > #include "xfs_alloc_btree.h" > #include "xfs_ialloc_btree.h" > Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_ksyms.c > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/linux-2.6/xfs_ksyms.c 2007-06-25 13:56:20.000000000 +1000 > +++ 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_ksyms.c 2007-06-25 14:15:49.646659958 +1000 > @@ -27,10 +27,10 @@ > #include "xfs_sb.h" > #include "xfs_ag.h" > #include "xfs_dir2.h" > -#include "xfs_alloc.h" > #include "xfs_dmapi.h" > #include "xfs_quota.h" > #include "xfs_mount.h" > +#include "xfs_alloc.h" > #include "xfs_da_btree.h" > #include "xfs_bmap_btree.h" > #include "xfs_alloc_btree.h" > Index: 2.6.x-xfs-new/fs/xfs/quota/xfs_dquot.c > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/quota/xfs_dquot.c 2007-06-25 13:56:20.000000000 +1000 > +++ 2.6.x-xfs-new/fs/xfs/quota/xfs_dquot.c 2007-06-25 14:19:04.513160782 +1000 > @@ -24,10 +24,10 @@ > #include "xfs_sb.h" > #include "xfs_ag.h" > #include "xfs_dir2.h" > -#include "xfs_alloc.h" > #include "xfs_dmapi.h" > #include "xfs_quota.h" > #include "xfs_mount.h" > +#include "xfs_alloc.h" > #include "xfs_bmap_btree.h" > #include "xfs_alloc_btree.h" > #include "xfs_ialloc_btree.h" > Index: 2.6.x-xfs-new/fs/xfs/quota/xfs_dquot_item.c > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/quota/xfs_dquot_item.c 2007-06-25 13:56:20.000000000 +1000 > +++ 2.6.x-xfs-new/fs/xfs/quota/xfs_dquot_item.c 2007-06-25 14:19:21.906884992 +1000 > @@ -24,10 +24,10 @@ > #include "xfs_sb.h" > #include "xfs_ag.h" > #include "xfs_dir2.h" > -#include "xfs_alloc.h" > #include "xfs_dmapi.h" > #include "xfs_quota.h" > #include "xfs_mount.h" > +#include "xfs_alloc.h" > #include "xfs_bmap_btree.h" > #include "xfs_alloc_btree.h" > #include "xfs_ialloc_btree.h" > Index: 2.6.x-xfs-new/fs/xfs/quota/xfs_qm.c > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/quota/xfs_qm.c 2007-06-25 13:56:20.000000000 +1000 > +++ 2.6.x-xfs-new/fs/xfs/quota/xfs_qm.c 2007-06-25 14:21:29.450325544 +1000 > @@ -25,10 +25,10 @@ > #include "xfs_sb.h" > #include "xfs_ag.h" > #include "xfs_dir2.h" > -#include "xfs_alloc.h" > #include "xfs_dmapi.h" > #include "xfs_quota.h" > #include "xfs_mount.h" > +#include "xfs_alloc.h" > #include "xfs_bmap_btree.h" > #include "xfs_alloc_btree.h" > #include "xfs_ialloc_btree.h" > Index: 2.6.x-xfs-new/fs/xfs/quota/xfs_qm_bhv.c > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/quota/xfs_qm_bhv.c 2007-02-07 13:24:32.000000000 +1100 > +++ 2.6.x-xfs-new/fs/xfs/quota/xfs_qm_bhv.c 2007-06-25 14:20:21.775098823 +1000 > @@ -25,10 +25,10 @@ > #include "xfs_sb.h" > #include "xfs_ag.h" > #include "xfs_dir2.h" > -#include "xfs_alloc.h" > #include "xfs_dmapi.h" > #include "xfs_quota.h" > #include "xfs_mount.h" > +#include "xfs_alloc.h" > #include "xfs_bmap_btree.h" > #include "xfs_alloc_btree.h" > #include "xfs_ialloc_btree.h" > Index: 2.6.x-xfs-new/fs/xfs/quota/xfs_qm_ksyms.c > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/quota/xfs_qm_ksyms.c 2007-01-16 10:54:16.000000000 +1100 > +++ 2.6.x-xfs-new/fs/xfs/quota/xfs_qm_ksyms.c 2007-06-25 14:21:01.018011537 +1000 > @@ -24,10 +24,10 @@ > #include "xfs_sb.h" > #include "xfs_ag.h" > #include "xfs_dir2.h" > -#include "xfs_alloc.h" > #include "xfs_dmapi.h" > #include "xfs_quota.h" > #include "xfs_mount.h" > +#include "xfs_alloc.h" > #include "xfs_bmap_btree.h" > #include "xfs_alloc_btree.h" > #include "xfs_ialloc_btree.h" > Index: 2.6.x-xfs-new/fs/xfs/quota/xfs_qm_stats.c > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/quota/xfs_qm_stats.c 2007-02-07 13:24:32.000000000 +1100 > +++ 2.6.x-xfs-new/fs/xfs/quota/xfs_qm_stats.c 2007-06-25 14:21:14.844219110 +1000 > @@ -24,10 +24,10 @@ > #include "xfs_sb.h" > #include "xfs_ag.h" > #include "xfs_dir2.h" > -#include "xfs_alloc.h" > #include "xfs_dmapi.h" > #include "xfs_quota.h" > #include "xfs_mount.h" > +#include "xfs_alloc.h" > #include "xfs_bmap_btree.h" > #include "xfs_alloc_btree.h" > #include "xfs_ialloc_btree.h" > Index: 2.6.x-xfs-new/fs/xfs/quota/xfs_qm_syscalls.c > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/quota/xfs_qm_syscalls.c 2007-03-29 19:03:30.000000000 +1000 > +++ 2.6.x-xfs-new/fs/xfs/quota/xfs_qm_syscalls.c 2007-06-25 14:18:28.637854830 +1000 > @@ -27,10 +27,10 @@ > #include "xfs_sb.h" > #include "xfs_ag.h" > #include "xfs_dir2.h" > -#include "xfs_alloc.h" > #include "xfs_dmapi.h" > #include "xfs_quota.h" > #include "xfs_mount.h" > +#include "xfs_alloc.h" > #include "xfs_bmap_btree.h" > #include "xfs_alloc_btree.h" > #include "xfs_ialloc_btree.h" > Index: 2.6.x-xfs-new/fs/xfs/quota/xfs_trans_dquot.c > =================================================================== > --- 2.6.x-xfs-new.orig/fs/xfs/quota/xfs_trans_dquot.c 2007-03-29 19:03:30.000000000 +1000 > +++ 2.6.x-xfs-new/fs/xfs/quota/xfs_trans_dquot.c 2007-06-25 14:18:48.239290090 +1000 > @@ -24,10 +24,10 @@ > #include "xfs_sb.h" > #include "xfs_ag.h" > #include "xfs_dir2.h" > -#include "xfs_alloc.h" > #include "xfs_dmapi.h" > #include "xfs_quota.h" > #include "xfs_mount.h" > +#include "xfs_alloc.h" > #include "xfs_bmap_btree.h" > #include "xfs_alloc_btree.h" > #include "xfs_ialloc_btree.h" > > ---end quoted text--- From owner-xfs@oss.sgi.com Wed Aug 8 18:54:51 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 18:54:53 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l791sJbm029348 for ; Wed, 8 Aug 2007 18:54:49 -0700 Received: from [134.14.55.89] (soarer.melbourne.sgi.com [134.14.55.89]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id LAA02467; Thu, 9 Aug 2007 11:54:19 +1000 Message-ID: <46BA7446.6060604@sgi.com> Date: Thu, 09 Aug 2007 11:56:22 +1000 From: Vlad Apostolov User-Agent: Thunderbird 1.5.0.12 (X11/20070509) MIME-Version: 1.0 To: Barry Naujok CC: "xfs@oss.sgi.com" , xfs-dev Subject: Re: REVIEW: xfs_repair doesn't handle fsblock != dirblock sizes properly References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12536 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: vapo@sgi.com Precedence: bulk X-list: xfs It is looking good Barry, Regards, Vlad Barry Naujok wrote: > Part of the improved xfs_repair performance speedups, the > prefetch/dir block handling code made sure the I/Os are the > same size between phases. Unfortunately, the blocks are > too small - directories were broken up into fsblock sizes > instead of dirblock sizes. > > The attached patch fixes this regression up. From owner-xfs@oss.sgi.com Wed Aug 8 23:20:58 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 08 Aug 2007 23:21:04 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail.lichtvoll.de (mondschein.lichtvoll.de [194.150.191.11]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l796Krbm031869 for ; Wed, 8 Aug 2007 23:20:58 -0700 Received: from localhost (dslb-084-056-096-011.pools.arcor-ip.net [84.56.96.11]) by mail.lichtvoll.de (Postfix) with ESMTP id 696EE5ADED for ; Thu, 9 Aug 2007 08:25:12 +0200 (CEST) From: Martin Steigerwald To: linux-xfs@oss.sgi.com Subject: Re: Impact of atime updates on XFS Date: Thu, 9 Aug 2007 08:20:55 +0200 User-Agent: KMail/1.9.7 References: <200708081408.01817.ms@teamix.de> <20070808235904.GS52011508@sgi.com> (sfid-20070809_081046_217631_CE3DEB23) In-Reply-To: <20070808235904.GS52011508@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708090820.55509.Martin@Lichtvoll.de> X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12537 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: Martin@Lichtvoll.de Precedence: bulk X-list: xfs Am Donnerstag 09 August 2007 schrieb David Chinner: > > What would be the impact of atime versus noatime on XFS? What is the > > recommended setting for XFS? Are there any plans to implement > > relatime logic - maybe even the improved one by Ingo Molnar - into > > XFS? > > relatime is a VFS layer construct - it should work with XFS right now. Thanks for your answer. XFS says: XFS: unknown mount option [relatime]. here with Linux shambala 2.6.21.6-tp42-cfs-v19-sws2-2.2.10 #1 PREEMPT Sun Jul 8 21:14:29 CEST 2007 i686 GNU/Linux > > I just remounted my partitions on the notebook and my workstation > > with noatime for testing and I have the feeling that it indeed does > > help. > > It might feel that way, but if you can't quantify it, it doesn't exist. > Joern Engel is the only person to present hard numbers in that thread, > and they showed pretty much no difference to performance.... Ok. I think I will try his benchmark and see whether it makes a difference here. Me just wonders why Ingo says it has the biggest performance impact ever when it doesn't. And he didn' t provide numbers. I think I will contact him directly about that. Regards, -- Martin 'Helios' Steigerwald - http://www.Lichtvoll.de GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7 From owner-xfs@oss.sgi.com Thu Aug 9 03:15:53 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 09 Aug 2007 03:15:59 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l79AFnbm010755 for ; Thu, 9 Aug 2007 03:15:52 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id UAA16143; Thu, 9 Aug 2007 20:15:48 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l79AFkeW56020375; Thu, 9 Aug 2007 20:15:47 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l79AFi8656006257; Thu, 9 Aug 2007 20:15:44 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Thu, 9 Aug 2007 20:15:44 +1000 From: David Chinner To: Martin Steigerwald Cc: linux-xfs@oss.sgi.com Subject: Re: Impact of atime updates on XFS Message-ID: <20070809101544.GZ12413810@sgi.com> References: <200708081408.01817.ms@teamix.de> <20070808235904.GS52011508@sgi.com> <200708090820.55509.Martin@Lichtvoll.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200708090820.55509.Martin@Lichtvoll.de> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12538 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Thu, Aug 09, 2007 at 08:20:55AM +0200, Martin Steigerwald wrote: > Am Donnerstag 09 August 2007 schrieb David Chinner: > > > > What would be the impact of atime versus noatime on XFS? What is the > > > recommended setting for XFS? Are there any plans to implement > > > relatime logic - maybe even the improved one by Ingo Molnar - into > > > XFS? > > > > relatime is a VFS layer construct - it should work with XFS right now. > > Thanks for your answer. > > XFS says: > > XFS: unknown mount option [relatime]. That's because it's supposed to be encoded in the mount flags (i.e. intercepted by the mount binary and not passed to the kernel directly). I think you need a more recent mount binary.... Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Thu Aug 9 04:03:39 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 09 Aug 2007 04:03:45 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l79B3Zbm023074 for ; Thu, 9 Aug 2007 04:03:38 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA17223; Thu, 9 Aug 2007 21:03:26 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l79B3PeW56004868; Thu, 9 Aug 2007 21:03:25 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l79B3MiK55919262; Thu, 9 Aug 2007 21:03:22 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Thu, 9 Aug 2007 21:03:22 +1000 From: David Chinner To: Andi Kleen Cc: David Chinner , xfs@oss.sgi.com Subject: Re: XFS thread inflation in 2.6.23rc Message-ID: <20070809110322.GA12413810@sgi.com> References: <200708081240.21548.ak@suse.de> <200708081422.10373.ak@suse.de> <20070808131404.GQ52011508@sgi.com> <200708081526.06860.ak@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200708081526.06860.ak@suse.de> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12539 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Wed, Aug 08, 2007 at 03:26:06PM +0200, Andi Kleen wrote: > On Wednesday 08 August 2007 15:14:04 David Chinner wrote: > > > Memory allocation failure + dirty transaction == filesystem shutdown. > > You mean if the workqueue creation would fail? Yeah. > Surely not having the MRU cache is not a catastrophe and would > allow the transaction to commit anyways? Right now the only errors that come from filestream association are fatal errors. i.e. they should force a shutdown if the transaction is dirty. One of these errors is already an ENOMEM. Now we'd have a case where we'd had a "error that is not an error" and handle that in some way. It gets complex and that's something I try to avoid if at all possible. > The other alternative would be to start it when a directory with > the flag is first seen. That should be before any transactions. On lookup? No thanks. On first create? Possible, but it's still painful and it introduces overhead into every single create operation. > > > > Besides, what's the point of having nice constructs like dedicated > > > > workqueues > > > It's a resource that shouldn't be overused. > > A workqueue + thread uses, what, 10-15k of memory? That's the cost of about > > 10 cached inodes. It is insignificant... > > A little bloat here and a little bloat there and soon we're talking > about serious memory. > > e.g. on a dual core box in a standard configuration we're going towards > ~50 kernel threads out of the box now and that's just too much IMNSHO. My idle desktop machine has 180 processes running on it, 60 of them kernel threads. It doesn't concern me one bit. Andi, you are complaining to the wrong person about thread counts. I live in the world of excessive parallelism and multithreaded I/O. I regularly see 4-8p boxes running hundreds to thousands of I/O threads on a single filesystem. These are the workloads XFS is designed for and we optimise for. A single extra thread is noise.... > > Hmmm. I guess you are really not going to like the patch I > > have that moves the AIL pushing to a new thread to solve > > some of scalability issues in the transaction subsystem...... > > Per CPU or single? Single. Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Thu Aug 9 04:06:13 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 09 Aug 2007 04:06:17 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail.lichtvoll.de (mondschein.lichtvoll.de [194.150.191.11]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l79B6Abm024093 for ; Thu, 9 Aug 2007 04:06:12 -0700 Received: from localhost (dslb-084-056-114-039.pools.arcor-ip.net [84.56.114.39]) by mail.lichtvoll.de (Postfix) with ESMTP id 73BC95ADED; Thu, 9 Aug 2007 13:10:32 +0200 (CEST) From: Martin Steigerwald To: linux-xfs@oss.sgi.com Subject: Re: Impact of atime updates on XFS Date: Thu, 9 Aug 2007 13:06:12 +0200 User-Agent: KMail/1.9.7 Cc: David Chinner References: <200708081408.01817.ms@teamix.de> <200708090820.55509.Martin@Lichtvoll.de> <20070809101544.GZ12413810@sgi.com> (sfid-20070809_125925_922049_8B1C4B50) In-Reply-To: <20070809101544.GZ12413810@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708091306.13011.Martin@lichtvoll.de> X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12540 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: Martin@lichtvoll.de Precedence: bulk X-list: xfs Am Donnerstag 09 August 2007 schrieb David Chinner: > On Thu, Aug 09, 2007 at 08:20:55AM +0200, Martin Steigerwald wrote: > > Am Donnerstag 09 August 2007 schrieb David Chinner: > > > > What would be the impact of atime versus noatime on XFS? What is > > > > the recommended setting for XFS? Are there any plans to implement > > > > relatime logic - maybe even the improved one by Ingo Molnar - > > > > into XFS? > > > > > > relatime is a VFS layer construct - it should work with XFS right > > > now. > > > > Thanks for your answer. > > > > XFS says: > > > > XFS: unknown mount option [relatime]. > > That's because it's supposed to be encoded in the mount flags (i.e. > intercepted by the mount binary and not passed to the kernel > directly). I think you need a more recent mount binary.... Exactly. After I upgraded mount debian package 2.12r-19 to 2.13~rc3-1 mount -o remount,relatime works. Thanks. I got a response back from Ingo and he said, that on ext3 atime updates are very visible while XFS does some journalling tricks to mitigate it. He doubts that I will see much difference on XFS as it has less strict synchronisation rules than ext3. -- Martin 'Helios' Steigerwald - http://www.Lichtvoll.de GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7 From owner-xfs@oss.sgi.com Thu Aug 9 04:34:12 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 09 Aug 2007 04:34:16 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l79BY6bm003760 for ; Thu, 9 Aug 2007 04:34:10 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA17947; Thu, 9 Aug 2007 21:34:06 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l79BY5eW55916593; Thu, 9 Aug 2007 21:34:06 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l79BY4Ei56059747; Thu, 9 Aug 2007 21:34:04 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Thu, 9 Aug 2007 21:34:04 +1000 From: David Chinner To: xfs-dev Cc: xfs-oss Subject: [PATCH 0 of 4] Radix tree based inode caching V2 Message-ID: <20070809113404.GC12413810@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12541 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs One of the perpetual scaling problems XFS has is indexing it's incore inodes. We currently uses hashes and the default hash sizes chosen can only ever be a tradeoff between memory consumption and the maximum realistic size of the cache. As a result, anyone who has millions of inodes cached on a filesystem needs to tunes the size of the cache via the ihashsize mount option to allow decent scalability with inode cache operations. A further problem is the separate inode cluster hash, whose size is based on the ihashsize but is smaller, and so under certain conditions (sparse cluster cache population) this can become a limitation long before the inode hash is causing issues. The following patchset removes the inode hash and cluster hash and replaces them with radix trees to avoid the scalability limitations of the hashes. It also reduces the size of the inodes by 3 pointers.... Version 2: o collapse the original 4 patches into one o factor per-ag radix tree intialisation o convert the xfs_icluster list to use list.h constructs o make ihashsize mount option output: "XFS: ihashsize no longer used, option is deprecated." o update ihashsize docco Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Thu Aug 9 04:38:16 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 09 Aug 2007 04:38:20 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_54, J_CHICKENPOX_66,J_CHICKENPOX_75 autolearn=no version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l79BcAbm004953 for ; Thu, 9 Aug 2007 04:38:12 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA18001; Thu, 9 Aug 2007 21:38:09 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l79Bc8eW56036977; Thu, 9 Aug 2007 21:38:09 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l79Bc75c56074502; Thu, 9 Aug 2007 21:38:07 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Thu, 9 Aug 2007 21:38:07 +1000 From: David Chinner To: xfs-dev Cc: xfs-oss Subject: [PATCH 1 of 4] Convert inode hash caches to radix trees Message-ID: <20070809113807.GD12413810@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12542 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs Convert the inode cache hash to a radix tree. A radix tree has been chosen to replace the hash because of a neat alignment of XFS inode structures and the kernel radix tree fanout. XFS allocates inodes in clusters of 64 inodes and the radix tree keeps 64 sequential entries per node. That means all fo the inodes in a cluster will always sit in the same node of the radix tree. A single radix tree with a read/write lock does not provide enough parallelism to prevent performance regressions on multi-processor machines, so we provide a radix tree per AG. By moving to a radix tree per AG, we can use the agino number as the index rather than the inode number, thereby reducing the radix tree key to 32 bits enabling this to be used for 64 bit inodes on 32 bit machines. In doing so, we also greatly reduce the sparseness of the radix trees because the agino is a more compact representation of the inode location than the inode number. It also provides inherent parallelism in the same manner as the rest of XFS without the need for heuristics. i.e. we parallelise operations by keeping structures and operations within AGs. This removes the need for the ihashsize mount parameter altogether as the inode caches should never need size hints anymore. Signed-off-by: Dave Chinner --- fs/xfs/linux-2.6/xfs_export.c | 4 fs/xfs/linux-2.6/xfs_ksyms.c | 2 fs/xfs/xfs_ag.h | 4 fs/xfs/xfs_buf_item.c | 1 fs/xfs/xfs_clnt.h | 1 fs/xfs/xfs_dir2_block.c | 1 fs/xfs/xfs_dir2_data.c | 1 fs/xfs/xfs_dir2_node.c | 1 fs/xfs/xfs_dir2_sf.c | 1 fs/xfs/xfs_error.c | 1 fs/xfs/xfs_extfree_item.c | 1 fs/xfs/xfs_iget.c | 606 +++++++++++++++--------------------------- fs/xfs/xfs_inode.c | 36 -- fs/xfs/xfs_inode.h | 59 ---- fs/xfs/xfs_mount.c | 24 - fs/xfs/xfs_mount.h | 22 + fs/xfs/xfs_rename.c | 1 fs/xfs/xfs_trans_ail.c | 1 fs/xfs/xfs_trans_extfree.c | 1 fs/xfs/xfs_vfsops.c | 24 - fs/xfs/xfs_vnodeops.c | 9 fs/xfs/xfsidbg.c | 199 ------------- 22 files changed, 307 insertions(+), 693 deletions(-) Index: 2.6.x-xfs-new/fs/xfs/xfs_iget.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_iget.c 2007-08-09 13:03:13.934083931 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_iget.c 2007-08-09 13:03:53.157036650 +1000 @@ -40,131 +40,13 @@ #include "xfs_utils.h" /* - * Initialize the inode hash table for the newly mounted file system. - * Choose an initial table size based on user specified value, else - * use a simple algorithm using the maximum number of inodes as an - * indicator for table size, and clamp it between one and some large - * number of pages. - */ -void -xfs_ihash_init(xfs_mount_t *mp) -{ - __uint64_t icount; - uint i; - - if (!mp->m_ihsize) { - icount = mp->m_maxicount ? mp->m_maxicount : - (mp->m_sb.sb_dblocks << mp->m_sb.sb_inopblog); - mp->m_ihsize = 1 << max_t(uint, 8, - (xfs_highbit64(icount) + 1) / 2); - mp->m_ihsize = min_t(uint, mp->m_ihsize, - (64 * NBPP) / sizeof(xfs_ihash_t)); - } - - mp->m_ihash = kmem_zalloc_greedy(&mp->m_ihsize, - NBPC * sizeof(xfs_ihash_t), - mp->m_ihsize * sizeof(xfs_ihash_t), - KM_SLEEP | KM_MAYFAIL | KM_LARGE); - mp->m_ihsize /= sizeof(xfs_ihash_t); - for (i = 0; i < mp->m_ihsize; i++) - rwlock_init(&(mp->m_ihash[i].ih_lock)); -} - -/* - * Free up structures allocated by xfs_ihash_init, at unmount time. - */ -void -xfs_ihash_free(xfs_mount_t *mp) -{ - kmem_free(mp->m_ihash, mp->m_ihsize * sizeof(xfs_ihash_t)); - mp->m_ihash = NULL; -} - -/* - * Initialize the inode cluster hash table for the newly mounted file system. - * Its size is derived from the ihash table size. - */ -void -xfs_chash_init(xfs_mount_t *mp) -{ - uint i; - - mp->m_chsize = max_t(uint, 1, mp->m_ihsize / - (XFS_INODE_CLUSTER_SIZE(mp) >> mp->m_sb.sb_inodelog)); - mp->m_chsize = min_t(uint, mp->m_chsize, mp->m_ihsize); - mp->m_chash = (xfs_chash_t *)kmem_zalloc(mp->m_chsize - * sizeof(xfs_chash_t), - KM_SLEEP | KM_LARGE); - for (i = 0; i < mp->m_chsize; i++) { - spinlock_init(&mp->m_chash[i].ch_lock,"xfshash"); - } -} - -/* - * Free up structures allocated by xfs_chash_init, at unmount time. - */ -void -xfs_chash_free(xfs_mount_t *mp) -{ - int i; - - for (i = 0; i < mp->m_chsize; i++) { - spinlock_destroy(&mp->m_chash[i].ch_lock); - } - - kmem_free(mp->m_chash, mp->m_chsize*sizeof(xfs_chash_t)); - mp->m_chash = NULL; -} - -/* - * Try to move an inode to the front of its hash list if possible - * (and if its not there already). Called right after obtaining - * the list version number and then dropping the read_lock on the - * hash list in question (which is done right after looking up the - * inode in question...). - */ -STATIC void -xfs_ihash_promote( - xfs_ihash_t *ih, - xfs_inode_t *ip, - ulong version) -{ - xfs_inode_t *iq; - - if ((ip->i_prevp != &ih->ih_next) && write_trylock(&ih->ih_lock)) { - if (likely(version == ih->ih_version)) { - /* remove from list */ - if ((iq = ip->i_next)) { - iq->i_prevp = ip->i_prevp; - } - *ip->i_prevp = iq; - - /* insert at list head */ - iq = ih->ih_next; - iq->i_prevp = &ip->i_next; - ip->i_next = iq; - ip->i_prevp = &ih->ih_next; - ih->ih_next = ip; - } - write_unlock(&ih->ih_lock); - } -} - -/* * Look up an inode by number in the given file system. - * The inode is looked up in the hash table for the file system - * represented by the mount point parameter mp. Each bucket of - * the hash table is guarded by an individual semaphore. - * - * If the inode is found in the hash table, its corresponding vnode - * is obtained with a call to vn_get(). This call takes care of - * coordination with the reclamation of the inode and vnode. Note - * that the vmap structure is filled in while holding the hash lock. - * This gives us the state of the inode/vnode when we found it and - * is used for coordination in vn_get(). + * The inode is looked up in the cache held in each AG. + * If the inode is found in the cache, attach it to the provided + * vnode. * - * If it is not in core, read it in from the file system's device and - * add the inode into the hash table. + * If it is not in core, read it in from the file system's device, + * add it to the cache and attach the provided vnode. * * The inode is locked according to the value of the lock_flags parameter. * This flag parameter indicates how and if the inode's IO lock and inode lock @@ -192,274 +74,251 @@ xfs_iget_core( xfs_inode_t **ipp, xfs_daddr_t bno) { - xfs_ihash_t *ih; xfs_inode_t *ip; xfs_inode_t *iq; bhv_vnode_t *inode_vp; - ulong version; int error; - /* REFERENCED */ - xfs_chash_t *ch; - xfs_chashlist_t *chl, *chlnew; - SPLDECL(s); + xfs_icluster_t *icl, *new_icl = NULL; + unsigned long first_index, mask; + xfs_perag_t *pag; + xfs_agino_t agino; + + /* the radix tree exists only in inode capable AGs */ + if (XFS_INO_TO_AGNO(mp, ino) >= mp->m_maxagi) + return EINVAL; + + /* get the perag structure and ensure that it's inode capable */ + pag = xfs_get_perag(mp, ino); + if (!pag->pagi_inodeok) + return EINVAL; + ASSERT(pag->pag_ici_init); + agino = XFS_INO_TO_AGINO(mp, ino); +again: + read_lock(&pag->pag_ici_lock); + ip = radix_tree_lookup(&pag->pag_ici_root, agino); - ih = XFS_IHASH(mp, ino); + if (ip != NULL) { + /* + * If INEW is set this inode is being set up + * we need to pause and try again. + */ + if (xfs_iflags_test(ip, XFS_INEW)) { + read_unlock(&pag->pag_ici_lock); + delay(1); + XFS_STATS_INC(xs_ig_frecycle); -again: - read_lock(&ih->ih_lock); + goto again; + } - for (ip = ih->ih_next; ip != NULL; ip = ip->i_next) { - if (ip->i_ino == ino) { + inode_vp = XFS_ITOV_NULL(ip); + if (inode_vp == NULL) { /* - * If INEW is set this inode is being set up + * If IRECLAIM is set this inode is + * on its way out of the system, * we need to pause and try again. */ - if (xfs_iflags_test(ip, XFS_INEW)) { - read_unlock(&ih->ih_lock); + if (xfs_iflags_test(ip, XFS_IRECLAIM)) { + read_unlock(&pag->pag_ici_lock); delay(1); XFS_STATS_INC(xs_ig_frecycle); goto again; } + ASSERT(xfs_iflags_test(ip, XFS_IRECLAIMABLE)); - inode_vp = XFS_ITOV_NULL(ip); - if (inode_vp == NULL) { - /* - * If IRECLAIM is set this inode is - * on its way out of the system, - * we need to pause and try again. - */ - if (xfs_iflags_test(ip, XFS_IRECLAIM)) { - read_unlock(&ih->ih_lock); - delay(1); - XFS_STATS_INC(xs_ig_frecycle); - - goto again; - } - ASSERT(xfs_iflags_test(ip, XFS_IRECLAIMABLE)); - - /* - * If lookup is racing with unlink, then we - * should return an error immediately so we - * don't remove it from the reclaim list and - * potentially leak the inode. - */ - if ((ip->i_d.di_mode == 0) && - !(flags & XFS_IGET_CREATE)) { - read_unlock(&ih->ih_lock); - return ENOENT; - } - - /* - * There may be transactions sitting in the - * incore log buffers or being flushed to disk - * at this time. We can't clear the - * XFS_IRECLAIMABLE flag until these - * transactions have hit the disk, otherwise we - * will void the guarantee the flag provides - * xfs_iunpin() - */ - if (xfs_ipincount(ip)) { - read_unlock(&ih->ih_lock); - xfs_log_force(mp, 0, - XFS_LOG_FORCE|XFS_LOG_SYNC); - XFS_STATS_INC(xs_ig_frecycle); - goto again; - } + /* + * If lookup is racing with unlink, then we + * should return an error immediately so we + * don't remove it from the reclaim list and + * potentially leak the inode. + */ + if ((ip->i_d.di_mode == 0) && + !(flags & XFS_IGET_CREATE)) { + read_unlock(&pag->pag_ici_lock); + xfs_put_perag(mp, pag); + return ENOENT; + } - vn_trace_exit(vp, "xfs_iget.alloc", - (inst_t *)__return_address); + /* + * There may be transactions sitting in the + * incore log buffers or being flushed to disk + * at this time. We can't clear the + * XFS_IRECLAIMABLE flag until these + * transactions have hit the disk, otherwise we + * will void the guarantee the flag provides + * xfs_iunpin() + */ + if (xfs_ipincount(ip)) { + read_unlock(&pag->pag_ici_lock); + xfs_log_force(mp, 0, + XFS_LOG_FORCE|XFS_LOG_SYNC); + XFS_STATS_INC(xs_ig_frecycle); + goto again; + } - XFS_STATS_INC(xs_ig_found); + vn_trace_exit(vp, "xfs_iget.alloc", + (inst_t *)__return_address); - xfs_iflags_clear(ip, XFS_IRECLAIMABLE); - version = ih->ih_version; - read_unlock(&ih->ih_lock); - xfs_ihash_promote(ih, ip, version); - - XFS_MOUNT_ILOCK(mp); - list_del_init(&ip->i_reclaim); - XFS_MOUNT_IUNLOCK(mp); - - goto finish_inode; - - } else if (vp != inode_vp) { - struct inode *inode = vn_to_inode(inode_vp); - - /* The inode is being torn down, pause and - * try again. - */ - if (inode->i_state & (I_FREEING | I_CLEAR)) { - read_unlock(&ih->ih_lock); - delay(1); - XFS_STATS_INC(xs_ig_frecycle); + XFS_STATS_INC(xs_ig_found); - goto again; - } -/* Chances are the other vnode (the one in the inode) is being torn - * down right now, and we landed on top of it. Question is, what do - * we do? Unhook the old inode and hook up the new one? - */ - cmn_err(CE_PANIC, - "xfs_iget_core: ambiguous vns: vp/0x%p, invp/0x%p", - inode_vp, vp); - } + xfs_iflags_clear(ip, XFS_IRECLAIMABLE); + read_unlock(&pag->pag_ici_lock); - /* - * Inode cache hit: if ip is not at the front of - * its hash chain, move it there now. - * Do this with the lock held for update, but - * do statistics after releasing the lock. + XFS_MOUNT_ILOCK(mp); + list_del_init(&ip->i_reclaim); + XFS_MOUNT_IUNLOCK(mp); + + goto finish_inode; + + } else if (vp != inode_vp) { + struct inode *inode = vn_to_inode(inode_vp); + + /* The inode is being torn down, pause and + * try again. */ - version = ih->ih_version; - read_unlock(&ih->ih_lock); - xfs_ihash_promote(ih, ip, version); - XFS_STATS_INC(xs_ig_found); + if (inode->i_state & (I_FREEING | I_CLEAR)) { + read_unlock(&pag->pag_ici_lock); + delay(1); + XFS_STATS_INC(xs_ig_frecycle); -finish_inode: - if (ip->i_d.di_mode == 0) { - if (!(flags & XFS_IGET_CREATE)) - return ENOENT; - xfs_iocore_inode_reinit(ip); + goto again; } +/* Chances are the other vnode (the one in the inode) is being torn +* down right now, and we landed on top of it. Question is, what do +* we do? Unhook the old inode and hook up the new one? +*/ + cmn_err(CE_PANIC, + "xfs_iget_core: ambiguous vns: vp/0x%p, invp/0x%p", + inode_vp, vp); + } - if (lock_flags != 0) - xfs_ilock(ip, lock_flags); + /* + * Inode cache hit + */ + read_unlock(&pag->pag_ici_lock); + XFS_STATS_INC(xs_ig_found); - xfs_iflags_clear(ip, XFS_ISTALE); - vn_trace_exit(vp, "xfs_iget.found", - (inst_t *)__return_address); - goto return_ip; +finish_inode: + if (ip->i_d.di_mode == 0) { + if (!(flags & XFS_IGET_CREATE)) { + xfs_put_perag(mp, pag); + return ENOENT; + } + xfs_iocore_inode_reinit(ip); } + + if (lock_flags != 0) + xfs_ilock(ip, lock_flags); + + xfs_iflags_clear(ip, XFS_ISTALE); + vn_trace_exit(vp, "xfs_iget.found", + (inst_t *)__return_address); + goto return_ip; } /* - * Inode cache miss: save the hash chain version stamp and unlock - * the chain, so we don't deadlock in vn_alloc. + * Inode cache miss */ + read_unlock(&pag->pag_ici_lock); XFS_STATS_INC(xs_ig_missed); - version = ih->ih_version; - - read_unlock(&ih->ih_lock); - /* * Read the disk inode attributes into a new inode structure and get * a new vnode for it. This should also initialize i_ino and i_mount. */ error = xfs_iread(mp, tp, ino, &ip, bno, (flags & XFS_IGET_BULKSTAT) ? XFS_IMAP_BULKSTAT : 0); - if (error) + if (error) { + xfs_put_perag(mp, pag); return error; + } vn_trace_exit(vp, "xfs_iget.alloc", (inst_t *)__return_address); xfs_inode_lock_init(ip, vp); xfs_iocore_inode_init(ip); - if (lock_flags) xfs_ilock(ip, lock_flags); if ((ip->i_d.di_mode == 0) && !(flags & XFS_IGET_CREATE)) { xfs_idestroy(ip); + xfs_put_perag(mp, pag); return ENOENT; } /* - * Put ip on its hash chain, unless someone else hashed a duplicate - * after we released the hash lock. + * This is a bit messy - we preallocate everything we _might_ + * need before we pick up the ici lock. That way we don't have to + * juggle locks and go all the way back to the start. */ - write_lock(&ih->ih_lock); + new_icl = (xfs_icluster_t *)kmem_zone_alloc(xfs_icluster_zone, KM_SLEEP); + if (radix_tree_preload(GFP_KERNEL)) { + delay(1); + goto again; + } + mask = ~(((XFS_INODE_CLUSTER_SIZE(mp) >> mp->m_sb.sb_inodelog)) - 1); + first_index = agino & mask; + write_lock(&pag->pag_ici_lock); - if (ih->ih_version != version) { - for (iq = ih->ih_next; iq != NULL; iq = iq->i_next) { - if (iq->i_ino == ino) { - write_unlock(&ih->ih_lock); - xfs_idestroy(ip); + /* + * Find the cluster if it exists + */ + icl = NULL; + if (radix_tree_gang_lookup(&pag->pag_ici_root, (void**)&iq, + first_index, 1)) { + if ((iq->i_ino & mask) == first_index) + icl = iq->i_cluster; + } - XFS_STATS_INC(xs_ig_dup); - goto again; - } - } + /* + * insert the new inode + */ + error = radix_tree_insert(&pag->pag_ici_root, agino, ip); + if (unlikely(error)) { + BUG_ON(error != -EEXIST); + write_unlock(&pag->pag_ici_lock); + radix_tree_preload_end(); + xfs_idestroy(ip); + XFS_STATS_INC(xs_ig_dup); + goto again; } /* * These values _must_ be set before releasing ihlock! */ - ip->i_hash = ih; - if ((iq = ih->ih_next)) { - iq->i_prevp = &ip->i_next; - } - ip->i_next = iq; - ip->i_prevp = &ih->ih_next; - ih->ih_next = ip; ip->i_udquot = ip->i_gdquot = NULL; - ih->ih_version++; xfs_iflags_set(ip, XFS_INEW); - write_unlock(&ih->ih_lock); - /* - * put ip on its cluster's hash chain - */ - ASSERT(ip->i_chash == NULL && ip->i_cprev == NULL && + ASSERT(ip->i_cluster == NULL && ip->i_cprev == NULL && ip->i_cnext == NULL); - chlnew = NULL; - ch = XFS_CHASH(mp, ip->i_blkno); - chlredo: - s = mutex_spinlock(&ch->ch_lock); - for (chl = ch->ch_list; chl != NULL; chl = chl->chl_next) { - if (chl->chl_blkno == ip->i_blkno) { - - /* insert this inode into the doubly-linked list - * where chl points */ - if ((iq = chl->chl_ip)) { - ip->i_cprev = iq->i_cprev; - iq->i_cprev->i_cnext = ip; - iq->i_cprev = ip; - ip->i_cnext = iq; - } else { - ip->i_cnext = ip; - ip->i_cprev = ip; - } - chl->chl_ip = ip; - ip->i_chash = chl; - break; - } - } - - /* no hash list found for this block; add a new hash list */ - if (chl == NULL) { - if (chlnew == NULL) { - mutex_spinunlock(&ch->ch_lock, s); - ASSERT(xfs_chashlist_zone != NULL); - chlnew = (xfs_chashlist_t *) - kmem_zone_alloc(xfs_chashlist_zone, - KM_SLEEP); - ASSERT(chlnew != NULL); - goto chlredo; - } else { - ip->i_cnext = ip; - ip->i_cprev = ip; - ip->i_chash = chlnew; - chlnew->chl_ip = ip; - chlnew->chl_blkno = ip->i_blkno; - if (ch->ch_list) - ch->ch_list->chl_prev = chlnew; - chlnew->chl_next = ch->ch_list; - chlnew->chl_prev = NULL; - ch->ch_list = chlnew; - chlnew = NULL; - } + if (icl) { + /* insert this inode into the doubly-linked list + * where icl points. lock the icl to protect against + * others traversing the icl list */ + spin_lock(&icl->icl_lock); + ASSERT(icl->icl_ip != NULL); + iq = icl->icl_ip; + ip->i_cprev = iq->i_cprev; + iq->i_cprev->i_cnext = ip; + iq->i_cprev = ip; + ip->i_cnext = iq; + icl->icl_ip = ip; + ip->i_cluster = icl; + spin_unlock(&icl->icl_lock); } else { - if (chlnew != NULL) { - kmem_zone_free(xfs_chashlist_zone, chlnew); - } - } - - mutex_spinunlock(&ch->ch_lock, s); - + ip->i_cnext = ip; + ip->i_cprev = ip; + ip->i_cluster = new_icl; + new_icl->icl_ip = ip; + spin_lock_init(&new_icl->icl_lock); + new_icl = NULL; + } + write_unlock(&pag->pag_ici_lock); + radix_tree_preload_end(); + if (new_icl) + kmem_zone_free(xfs_icluster_zone, new_icl); /* * Link ip to its mount and thread it on the mount's inode list. @@ -478,6 +337,7 @@ finish_inode: mp->m_inodes = ip; XFS_MOUNT_IUNLOCK(mp); + xfs_put_perag(mp, pag); return_ip: ASSERT(ip->i_df.if_ext_max == @@ -587,32 +447,19 @@ xfs_inode_incore(xfs_mount_t *mp, xfs_ino_t ino, xfs_trans_t *tp) { - xfs_ihash_t *ih; xfs_inode_t *ip; - ulong version; + xfs_perag_t *pag; - ih = XFS_IHASH(mp, ino); - read_lock(&ih->ih_lock); - for (ip = ih->ih_next; ip != NULL; ip = ip->i_next) { - if (ip->i_ino == ino) { - /* - * If we find it and tp matches, return it. - * Also move it to the front of the hash list - * if we find it and it is not already there. - * Otherwise break from the loop and return - * NULL. - */ - if (ip->i_transp == tp) { - version = ih->ih_version; - read_unlock(&ih->ih_lock); - xfs_ihash_promote(ih, ip, version); - return (ip); - } - break; - } - } - read_unlock(&ih->ih_lock); - return (NULL); + pag = xfs_get_perag(mp, ino); + read_lock(&pag->pag_ici_lock); + ip = radix_tree_lookup(&pag->pag_ici_root, XFS_INO_TO_AGINO(mp, ino)); + read_unlock(&pag->pag_ici_lock); + xfs_put_perag(mp, pag); + + /* the returned inode must match the transaction */ + if (ip && (ip->i_transp != tp)) + return NULL; + return ip; } /* @@ -718,58 +565,47 @@ void xfs_iextract( xfs_inode_t *ip) { - xfs_ihash_t *ih; + xfs_mount_t *mp = ip->i_mount; + xfs_perag_t *pag = xfs_get_perag(mp, ip->i_ino); xfs_inode_t *iq; - xfs_mount_t *mp; - xfs_chash_t *ch; - xfs_chashlist_t *chl, *chm; - SPLDECL(s); - - ih = ip->i_hash; - write_lock(&ih->ih_lock); - if ((iq = ip->i_next)) { - iq->i_prevp = ip->i_prevp; - } - *ip->i_prevp = iq; - ih->ih_version++; - write_unlock(&ih->ih_lock); - - /* - * Remove from cluster hash list - * 1) delete the chashlist if this is the last inode on the chashlist - * 2) unchain from list of inodes - * 3) point chashlist->chl_ip to 'chl_next' if to this inode. + + write_lock(&pag->pag_ici_lock); + radix_tree_delete(&pag->pag_ici_root, XFS_INO_TO_AGINO(mp, ip->i_ino)); + write_unlock(&pag->pag_ici_lock); + xfs_put_perag(mp, pag); + + /* + * Remove from cluster list */ mp = ip->i_mount; - ch = XFS_CHASH(mp, ip->i_blkno); - s = mutex_spinlock(&ch->ch_lock); - - if (ip->i_cnext == ip) { - /* Last inode on chashlist */ + spin_lock(&ip->i_cluster->icl_lock); + if (unlikely(ip->i_cnext == ip)) { + /* + * Last inode in cluster object. + * + * We've been removed from the inode radix tree, and + * we are the last inode to reference the cluster. + * We can simply drop our loks and free it at this point + * because nothing can find us or the cluster. + */ ASSERT(ip->i_cnext == ip && ip->i_cprev == ip); - ASSERT(ip->i_chash != NULL); - chm=NULL; - chl = ip->i_chash; - if (chl->chl_prev) - chl->chl_prev->chl_next = chl->chl_next; - else - ch->ch_list = chl->chl_next; - if (chl->chl_next) - chl->chl_next->chl_prev = chl->chl_prev; - kmem_zone_free(xfs_chashlist_zone, chl); + ASSERT(ip->i_cluster != NULL); + + spin_unlock(&ip->i_cluster->icl_lock); + kmem_zone_free(xfs_icluster_zone, ip->i_cluster); } else { /* delete one inode from a non-empty list */ iq = ip->i_cnext; iq->i_cprev = ip->i_cprev; ip->i_cprev->i_cnext = iq; - if (ip->i_chash->chl_ip == ip) { - ip->i_chash->chl_ip = iq; + if (ip->i_cluster->icl_ip == ip) { + ip->i_cluster->icl_ip = iq; } - ip->i_chash = __return_address; + spin_unlock(&ip->i_cluster->icl_lock); + ip->i_cluster = __return_address; ip->i_cprev = __return_address; ip->i_cnext = __return_address; } - mutex_spinunlock(&ch->ch_lock, s); /* * Remove from mount's inode list. Index: 2.6.x-xfs-new/fs/xfs/xfs_inode.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_inode.c 2007-08-09 13:03:13.934083931 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_inode.c 2007-08-09 13:03:53.181033562 +1000 @@ -52,7 +52,7 @@ kmem_zone_t *xfs_ifork_zone; kmem_zone_t *xfs_inode_zone; -kmem_zone_t *xfs_chashlist_zone; +kmem_zone_t *xfs_icluster_zone; /* * Used in xfs_itruncate(). This is the maximum number of extents @@ -2182,10 +2182,10 @@ xfs_ifree_cluster( int i, j, found, pre_flushed; xfs_daddr_t blkno; xfs_buf_t *bp; - xfs_ihash_t *ih; xfs_inode_t *ip, **ip_found; xfs_inode_log_item_t *iip; xfs_log_item_t *lip; + xfs_perag_t *pag = xfs_get_perag(mp, inum); SPLDECL(s); if (mp->m_sb.sb_blocksize >= XFS_INODE_CLUSTER_SIZE(mp)) { @@ -2220,23 +2220,20 @@ xfs_ifree_cluster( */ found = 0; for (i = 0; i < ninodes; i++) { - ih = XFS_IHASH(mp, inum + i); - read_lock(&ih->ih_lock); - for (ip = ih->ih_next; ip != NULL; ip = ip->i_next) { - if (ip->i_ino == inum + i) - break; - } + read_lock(&pag->pag_ici_lock); + ip = radix_tree_lookup(&pag->pag_ici_root, + XFS_INO_TO_AGINO(mp, (inum + i))); /* Inode not in memory or we found it already, * nothing to do */ if (!ip || xfs_iflags_test(ip, XFS_ISTALE)) { - read_unlock(&ih->ih_lock); + read_unlock(&pag->pag_ici_lock); continue; } if (xfs_inode_clean(ip)) { - read_unlock(&ih->ih_lock); + read_unlock(&pag->pag_ici_lock); continue; } @@ -2259,7 +2256,7 @@ xfs_ifree_cluster( ip_found[found++] = ip; } } - read_unlock(&ih->ih_lock); + read_unlock(&pag->pag_ici_lock); continue; } @@ -2277,8 +2274,7 @@ xfs_ifree_cluster( xfs_iunlock(ip, XFS_ILOCK_EXCL); } } - - read_unlock(&ih->ih_lock); + read_unlock(&pag->pag_ici_lock); } bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, blkno, @@ -2333,6 +2329,7 @@ xfs_ifree_cluster( } kmem_free(ip_found, ninodes * sizeof(xfs_inode_t *)); + xfs_put_perag(mp, pag); } /* @@ -3050,12 +3047,10 @@ xfs_iflush( xfs_mount_t *mp; int error; /* REFERENCED */ - xfs_chash_t *ch; xfs_inode_t *iq; int clcount; /* count of inodes clustered */ int bufwasdelwri; enum { INT_DELWRI = (1 << 0), INT_ASYNC = (1 << 1) }; - SPLDECL(s); XFS_STATS_INC(xs_iflush_count); @@ -3169,11 +3164,8 @@ xfs_iflush( * inode clustering: * see if other inodes can be gathered into this write */ - - ip->i_chash->chl_buf = bp; - - ch = XFS_CHASH(mp, ip->i_blkno); - s = mutex_spinlock(&ch->ch_lock); + spin_lock(&ip->i_cluster->icl_lock); + ip->i_cluster->icl_buf = bp; clcount = 0; for (iq = ip->i_cnext; iq != ip; iq = iq->i_cnext) { @@ -3227,7 +3219,7 @@ xfs_iflush( xfs_iunlock(iq, XFS_ILOCK_SHARED); } } - mutex_spinunlock(&ch->ch_lock, s); + spin_unlock(&ip->i_cluster->icl_lock); if (clcount) { XFS_STATS_INC(xs_icluster_flushcnt); @@ -3264,7 +3256,7 @@ cluster_corrupt_out: /* Corruption detected in the clustering loop. Invalidate the * inode buffer and shut down the filesystem. */ - mutex_spinunlock(&ch->ch_lock, s); + spin_unlock(&ip->i_cluster->icl_lock); /* * Clean up the buffer. If it was B_DELWRI, just release it -- Index: 2.6.x-xfs-new/fs/xfs/xfs_inode.h =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_inode.h 2007-08-09 13:03:13.934083931 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_inode.h 2007-08-09 13:03:53.157036650 +1000 @@ -172,41 +172,18 @@ typedef struct xfs_iocore { extern void xfs_iocore_inode_init(struct xfs_inode *); extern void xfs_iocore_inode_reinit(struct xfs_inode *); - /* - * This is the type used in the xfs inode hash table. - * An array of these is allocated for each mounted - * file system to hash the inodes for that file system. - */ -typedef struct xfs_ihash { - struct xfs_inode *ih_next; - rwlock_t ih_lock; - uint ih_version; -} xfs_ihash_t; - -#define XFS_IHASH(mp,ino) ((mp)->m_ihash + (((uint)(ino)) % (mp)->m_ihsize)) - -/* - * This is the xfs inode cluster hash. This hash is used by xfs_iflush to - * find inodes that share a cluster and can be flushed to disk at the same - * time. - */ -typedef struct xfs_chashlist { - struct xfs_chashlist *chl_next; - struct xfs_chashlist *chl_prev; - struct xfs_inode *chl_ip; - xfs_daddr_t chl_blkno; /* starting block number of + * This is the xfs inode cluster structure. This structure is used by + * xfs_iflush to find inodes that share a cluster and can be flushed to disk at + * the same time. + */ +typedef struct xfs_icluster { + struct xfs_inode *icl_ip; + xfs_daddr_t icl_blkno; /* starting block number of * the cluster */ - struct xfs_buf *chl_buf; /* the inode buffer */ -} xfs_chashlist_t; - -typedef struct xfs_chash { - xfs_chashlist_t *ch_list; - lock_t ch_lock; -} xfs_chash_t; - -#define XFS_CHASH(mp,blk) ((mp)->m_chash + (((uint)blk) % (mp)->m_chsize)) - + struct xfs_buf *icl_buf; /* the inode buffer */ + lock_t icl_lock; /* inode list lock */ +} xfs_icluster_t; /* * This is the xfs in-core inode structure. @@ -269,21 +246,15 @@ typedef struct xfs_icdinode { } xfs_icdinode_t; typedef struct { - struct xfs_ihash *ip_hash; /* pointer to hash header */ - struct xfs_inode *ip_next; /* inode hash link forw */ struct xfs_inode *ip_mnext; /* next inode in mount list */ struct xfs_inode *ip_mprev; /* ptr to prev inode */ - struct xfs_inode **ip_prevp; /* ptr to prev i_next */ struct xfs_mount *ip_mount; /* fs mount struct ptr */ } xfs_iptr_t; typedef struct xfs_inode { /* Inode linking and identification information. */ - struct xfs_ihash *i_hash; /* pointer to hash header */ - struct xfs_inode *i_next; /* inode hash link forw */ struct xfs_inode *i_mnext; /* next inode in mount list */ struct xfs_inode *i_mprev; /* ptr to prev inode */ - struct xfs_inode **i_prevp; /* ptr to prev i_next */ struct xfs_mount *i_mount; /* fs mount struct ptr */ struct list_head i_reclaim; /* reclaim list */ struct bhv_desc i_bhv_desc; /* inode behavior descriptor*/ @@ -324,9 +295,9 @@ typedef struct xfs_inode { unsigned int i_delayed_blks; /* count of delay alloc blks */ xfs_icdinode_t i_d; /* most of ondisk inode */ - xfs_chashlist_t *i_chash; /* cluster hash list header */ - struct xfs_inode *i_cnext; /* cluster hash link forward */ - struct xfs_inode *i_cprev; /* cluster hash link backward */ + xfs_icluster_t *i_cluster; /* cluster list header */ + struct xfs_inode *i_cnext; /* cluster link forward */ + struct xfs_inode *i_cprev; /* cluster link backward */ xfs_fsize_t i_size; /* in-memory size */ /* Trace buffers per inode. */ @@ -521,8 +492,6 @@ xfs_iflags_test(xfs_inode_t *ip, unsigne */ void xfs_ihash_init(struct xfs_mount *); void xfs_ihash_free(struct xfs_mount *); -void xfs_chash_init(struct xfs_mount *); -void xfs_chash_free(struct xfs_mount *); xfs_inode_t *xfs_inode_incore(struct xfs_mount *, xfs_ino_t, struct xfs_trans *); void xfs_inode_lock_init(xfs_inode_t *, struct bhv_vnode *); @@ -633,7 +602,7 @@ void xfs_inobp_check(struct xfs_mount * #define xfs_inobp_check(mp, bp) #endif /* DEBUG */ -extern struct kmem_zone *xfs_chashlist_zone; +extern struct kmem_zone *xfs_icluster_zone; extern struct kmem_zone *xfs_ifork_zone; extern struct kmem_zone *xfs_inode_zone; extern struct kmem_zone *xfs_ili_zone; Index: 2.6.x-xfs-new/fs/xfs/xfsidbg.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfsidbg.c 2007-08-09 13:03:13.938083417 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfsidbg.c 2007-08-09 13:03:53.193032018 +1000 @@ -135,8 +135,6 @@ static void xfsidbg_xbuf(xfs_buf_t *); static void xfsidbg_xbuf_real(xfs_buf_t *, int); static void xfsidbg_xarg(int); static void xfsidbg_xchksum(uint *); -static void xfsidbg_xchash(xfs_mount_t *mp); -static void xfsidbg_xchashlist(xfs_chashlist_t *chl); static void xfsidbg_xdaargs(xfs_da_args_t *); static void xfsidbg_xdabuf(xfs_dabuf_t *); static void xfsidbg_xdanode(xfs_da_intnode_t *); @@ -149,7 +147,6 @@ static void xfsidbg_xhelp(void); static void xfsidbg_xiclog(xlog_in_core_t *); static void xfsidbg_xiclogall(xlog_in_core_t *); static void xfsidbg_xiclogcb(xlog_in_core_t *); -static void xfsidbg_xihash(xfs_mount_t *mp); static void xfsidbg_xinodes(xfs_mount_t *); static void xfsidbg_delayed_blocks(xfs_mount_t *); static void xfsidbg_xinodes_quiesce(xfs_mount_t *); @@ -1020,46 +1017,6 @@ static int kdbm_xfs_xchksum( return 0; } - -static int kdbm_xfs_xchash( - int argc, - const char **argv) -{ - unsigned long addr; - int nextarg = 1; - long offset = 0; - int diag; - - if (argc != 1) - return KDB_ARGCOUNT; - diag = kdbgetaddrarg(argc, argv, &nextarg, &addr, &offset, NULL); - if (diag) - return diag; - - xfsidbg_xchash((xfs_mount_t *) addr); - return 0; -} - -static int kdbm_xfs_xchashlist( - int argc, - const char **argv) -{ - unsigned long addr; - int nextarg = 1; - long offset = 0; - int diag; - - if (argc != 1) - return KDB_ARGCOUNT; - diag = kdbgetaddrarg(argc, argv, &nextarg, &addr, &offset, NULL); - if (diag) - return diag; - - xfsidbg_xchashlist((xfs_chashlist_t *) addr); - return 0; -} - - static int kdbm_xfs_xdaargs( int argc, const char **argv) @@ -1280,25 +1237,6 @@ static int kdbm_xfs_xiclogcb( return 0; } -static int kdbm_xfs_xihash( - int argc, - const char **argv) -{ - unsigned long addr; - int nextarg = 1; - long offset = 0; - int diag; - - if (argc != 1) - return KDB_ARGCOUNT; - diag = kdbgetaddrarg(argc, argv, &nextarg, &addr, &offset, NULL); - if (diag) - return diag; - - xfsidbg_xihash((xfs_mount_t *) addr); - return 0; -} - static int kdbm_xfs_xinodes( int argc, const char **argv) @@ -2173,15 +2111,11 @@ static void printinode(struct inode *ip) " i_mode = 0x%x i_nlink = %d i_rdev = 0x%x i_state = 0x%lx\n", ip->i_mode, ip->i_nlink, kdev_t_to_nr(ip->i_rdev), ip->i_state); - kdb_printf(" i_hash.nxt = 0x%p i_hash.pprv = 0x%p\n", - ip->i_hash.next, ip->i_hash.prev); #else kdb_printf( " i_mode = 0x%x i_nlink = %d i_rdev = 0x%x i_state = 0x%lx\n", ip->i_mode, ip->i_nlink, ip->i_rdev, ip->i_state); - kdb_printf(" i_hash.nxt = 0x%p i_hash.pprv = 0x%p\n", - ip->i_hash.next, ip->i_hash.pprev); #endif kdb_printf(" i_list.nxt = 0x%p i_list.prv = 0x%p\n", ip->i_list.next, ip->i_list.prev); @@ -2670,10 +2604,6 @@ static struct xif xfsidbg_funcs[] = { { "xbxstrc", kdbm_xfs_xbxstrace, "", "Dump XFS bmap extent inode trace" }, #endif - { "xchash", kdbm_xfs_xchash, "", - "Dump XFS cluster hash"}, - { "xchlist", kdbm_xfs_xchashlist, "", - "Dump XFS cluster hash list"}, { "xchksum", kdbm_xfs_xchksum, "", "Dump chksum" }, #ifdef XFS_DIR2_TRACE { "xd2atrc", kdbm_xfs_xdir2atrace, "", @@ -2727,8 +2657,6 @@ static struct xif xfsidbg_funcs[] = { { "xictrc", kdbm_xfs_xiclogtrace, "", "Dump XFS in-core log trace" }, #endif - { "xihash", kdbm_xfs_xihash, "", - "Dump XFS inode hash statistics"}, #ifdef XFS_ILOCK_TRACE { "xilocktrc",kdbm_xfs_xilock_trace, "", "Dump XFS ilock trace" }, @@ -6656,7 +6584,7 @@ xfsidbg_xmount(xfs_mount_t *mp) "BARRIER", /* 0x20000 */ "IDELETE", /* 0x40000 */ "SWALLOC", /* 0x80000 */ - "IHASHSIZE", /* 0x100000 */ + "UNUSED_100000", /* 0x100000 */ "DIRSYNC", /* 0x200000 */ "COMPAT_IOSIZE",/* 0x400000 */ NULL @@ -6688,8 +6616,6 @@ xfsidbg_xmount(xfs_mount_t *mp) mp->m_rtdev_targp ? mp->m_rtdev_targp->bt_dev : 0); kdb_printf("bsize %d agfrotor %d xfs_rotorstep %d agirotor %d\n", mp->m_bsize, mp->m_agfrotor, xfs_rotorstep, mp->m_agirotor); - kdb_printf("ihash 0x%p ihsize %zu\n", - mp->m_ihash, mp->m_ihsize); kdb_printf("inodes 0x%p ilock 0x%p ireclaims 0x%x\n", mp->m_inodes, &mp->m_ilock, mp->m_ireclaims); kdb_printf("readio_log 0x%x readio_blocks 0x%x ", @@ -6756,8 +6682,6 @@ xfsidbg_xmount(xfs_mount_t *mp) (xfs_dfiloff_t)mp->m_dirdatablk, (xfs_dfiloff_t)mp->m_dirleafblk, (xfs_dfiloff_t)mp->m_dirfreeblk); - kdb_printf("chsize %d chash 0x%p\n", - mp->m_chsize, mp->m_chash); if (mp->m_fsname != NULL) kdb_printf("mountpoint \"%s\"\n", mp->m_fsname); else @@ -6765,71 +6689,6 @@ xfsidbg_xmount(xfs_mount_t *mp) } -static void -xfsidbg_xihash(xfs_mount_t *mp) -{ - xfs_ihash_t *ih; - int i; - int j; - int total; - int numzeros; - xfs_inode_t *ip; - int *hist; - int hist_bytes = mp->m_ihsize * sizeof(int); - int hist2[21]; - - hist = (int *) kmalloc(hist_bytes, GFP_KERNEL); - - if (hist == NULL) { - kdb_printf("xfsidbg_xihash: kmalloc(%d) failed!\n", - hist_bytes); - return; - } - - for (i = 0; i < mp->m_ihsize; i++) { - ih = mp->m_ihash + i; - j = 0; - for (ip = ih->ih_next; ip != NULL; ip = ip->i_next) - j++; - hist[i] = j; - } - - numzeros = total = 0; - - for (i = 0; i < 21; i++) - hist2[i] = 0; - - for (i = 0; i < mp->m_ihsize; i++) { - kdb_printf("%d ", hist[i]); - total += hist[i]; - numzeros += hist[i] == 0 ? 1 : 0; - if (hist[i] > 20) - j = 20; - else - j = hist[i]; - - if (! (j <= 20)) { - kdb_printf("xfsidbg_xihash: (j > 20)/%d @ line # %d\n", - j, __LINE__); - return; - } - - hist2[j]++; - } - - kdb_printf("\n"); - - kdb_printf("total inodes = %d, average length = %zu, adjusted average = %zu\n", - total, total / mp->m_ihsize, - total / (mp->m_ihsize - numzeros)); - - for (i = 0; i < 21; i++) { - kdb_printf("%d - %d , ", i, hist2[i]); - } - kdb_printf("\n"); - kfree(hist); -} - /* * Command to print xfs inodes: kp xnode */ @@ -6845,12 +6704,8 @@ xfsidbg_xnode(xfs_inode_t *ip) NULL }; - kdb_printf("hash 0x%p next 0x%p prevp 0x%p mount 0x%p\n", - ip->i_hash, - ip->i_next, - ip->i_prevp, - ip->i_mount); - kdb_printf("mnext 0x%p mprev 0x%p vnode 0x%p \n", + kdb_printf("mount 0x%p mnext 0x%p mprev 0x%p vnode 0x%p \n", + ip->i_mount, ip->i_mnext, ip->i_mprev, XFS_ITOV_NULL(ip)); @@ -6898,8 +6753,8 @@ xfsidbg_xnode(xfs_inode_t *ip) qprintf(" dir trace 0x%p\n", ip->i_dir_trace); #endif kdb_printf("\n"); - kdb_printf("chash 0x%p cnext 0x%p cprev 0x%p\n", - ip->i_chash, + kdb_printf("icluster 0x%p cnext 0x%p cprev 0x%p\n", + ip->i_cluster, ip->i_cnext, ip->i_cprev); xfs_xnode_fork("data", &ip->i_df); @@ -6917,50 +6772,6 @@ xfsidbg_xcore(xfs_iocore_t *io) } /* - * Command to print xfs inode cluster hash table: kp xchash - */ -static void -xfsidbg_xchash(xfs_mount_t *mp) -{ - int i; - xfs_chash_t *ch; - - kdb_printf("m_chash 0x%p size %d\n", - mp->m_chash, mp->m_chsize); - for (i = 0; i < mp->m_chsize; i++) { - ch = mp->m_chash + i; - kdb_printf("[%3d] ch 0x%p chashlist 0x%p\n", i, ch, ch->ch_list); - xfsidbg_xchashlist(ch->ch_list); - } -} - -/* - * Command to print xfs inode cluster hash list: kp xchashlist - */ -static void -xfsidbg_xchashlist(xfs_chashlist_t *chl) -{ - xfs_inode_t *ip; - - while (chl != NULL) { - kdb_printf("hashlist inode 0x%p blkno %lld buf 0x%p", - chl->chl_ip, (long long) chl->chl_blkno, chl->chl_buf); - - kdb_printf("\n"); - - /* print inodes on chashlist */ - ip = chl->chl_ip; - do { - kdb_printf("0x%p ", ip); - ip = ip->i_cnext; - } while (ip != chl->chl_ip); - kdb_printf("\n"); - - chl=chl->chl_next; - } -} - -/* * Print xfs per-ag data structures for filesystem. */ static void Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_export.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/linux-2.6/xfs_export.c 2007-08-09 13:00:12.373444776 +1000 +++ 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_export.c 2007-08-09 13:03:53.161036135 +1000 @@ -17,10 +17,12 @@ */ #include "xfs.h" #include "xfs_types.h" -#include "xfs_dmapi.h" +#include "xfs_inum.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" +#include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_export.h" Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_ksyms.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/linux-2.6/xfs_ksyms.c 2007-08-09 13:01:41.757944512 +1000 +++ 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_ksyms.c 2007-08-09 13:03:42.950350085 +1000 @@ -237,7 +237,7 @@ EXPORT_SYMBOL(xfs_bulkstat); EXPORT_SYMBOL(xfs_bunmapi); EXPORT_SYMBOL(xfs_bwrite); EXPORT_SYMBOL(xfs_change_file_space); -EXPORT_SYMBOL(xfs_chashlist_zone); +EXPORT_SYMBOL(xfs_icluster_zone); EXPORT_SYMBOL(xfs_dev_is_read_only); EXPORT_SYMBOL(xfs_dir_ialloc); EXPORT_SYMBOL(xfs_error_report); Index: 2.6.x-xfs-new/fs/xfs/xfs_ag.h =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_ag.h 2007-08-09 13:00:12.357446834 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_ag.h 2007-08-09 13:03:53.157036650 +1000 @@ -197,6 +197,10 @@ typedef struct xfs_perag #endif xfs_perag_busy_t *pagb_list; /* unstable blocks */ atomic_t pagf_fstrms; /* # of filestreams active in this AG */ + + int pag_ici_init; /* incore inode cache initialised */ + rwlock_t pag_ici_lock; /* incore inode lock */ + struct radix_tree_root pag_ici_root; /* incore inode cache root */ } xfs_perag_t; #define XFS_AG_MAXLEVELS(mp) ((mp)->m_ag_maxlevels) Index: 2.6.x-xfs-new/fs/xfs/xfs_buf_item.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_buf_item.c 2007-08-09 13:00:12.373444776 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_buf_item.c 2007-08-09 13:03:53.165035621 +1000 @@ -23,6 +23,7 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_buf_item.h" Index: 2.6.x-xfs-new/fs/xfs/xfs_clnt.h =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_clnt.h 2007-08-09 13:00:12.381443746 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_clnt.h 2007-08-09 13:03:53.193032018 +1000 @@ -89,7 +89,6 @@ struct xfs_mount_args { #define XFSMNT_IDELETE 0x08000000 /* inode cluster delete */ #define XFSMNT_SWALLOC 0x10000000 /* turn on stripe width * allocation */ -#define XFSMNT_IHASHSIZE 0x20000000 /* inode hash table size */ #define XFSMNT_DIRSYNC 0x40000000 /* sync creat,link,unlink,rename * symlink,mkdir,rmdir,mknod */ #define XFSMNT_FLAGS2 0x80000000 /* more flags set in flags2 */ Index: 2.6.x-xfs-new/fs/xfs/xfs_dir2_block.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_dir2_block.c 2007-08-09 13:01:41.733947600 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_dir2_block.c 2007-08-09 13:03:53.165035621 +1000 @@ -22,6 +22,7 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" Index: 2.6.x-xfs-new/fs/xfs/xfs_dir2_data.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_dir2_data.c 2007-08-09 13:00:12.373444776 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_dir2_data.c 2007-08-09 13:03:53.173034591 +1000 @@ -22,6 +22,7 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" Index: 2.6.x-xfs-new/fs/xfs/xfs_dir2_node.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_dir2_node.c 2007-08-09 13:00:12.373444776 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_dir2_node.c 2007-08-09 13:03:53.173034591 +1000 @@ -22,6 +22,7 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" Index: 2.6.x-xfs-new/fs/xfs/xfs_dir2_sf.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_dir2_sf.c 2007-08-09 13:01:41.753945027 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_dir2_sf.c 2007-08-09 13:03:53.177034077 +1000 @@ -22,6 +22,7 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" Index: 2.6.x-xfs-new/fs/xfs/xfs_error.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_error.c 2007-08-09 13:00:12.377444261 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_error.c 2007-08-09 13:03:53.177034077 +1000 @@ -22,6 +22,7 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" Index: 2.6.x-xfs-new/fs/xfs/xfs_extfree_item.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_extfree_item.c 2007-08-09 13:00:12.377444261 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_extfree_item.c 2007-08-09 13:03:53.177034077 +1000 @@ -23,6 +23,7 @@ #include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_trans_priv.h" Index: 2.6.x-xfs-new/fs/xfs/xfs_mount.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_mount.c 2007-08-09 13:01:41.685953775 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_mount.c 2007-08-09 13:03:53.161036135 +1000 @@ -160,11 +160,6 @@ xfs_mount_free( xfs_mount_t *mp, int remove_bhv) { - if (mp->m_ihash) - xfs_ihash_free(mp); - if (mp->m_chash) - xfs_chash_free(mp); - if (mp->m_perag) { int agno; @@ -396,12 +391,22 @@ xfs_initialize_perag( pag->pagi_inodeok = 1; if (index < max_metadata) pag->pagf_metadata = 1; + if (!pag->pag_ici_init) { + rwlock_init(&pag->pag_ici_lock); + INIT_RADIX_TREE(&pag->pag_ici_root, GFP_ATOMIC); + pag->pag_ici_init = 1; + } } } else { /* Setup default behavior for smaller filesystems */ for (index = 0; index < agcount; index++) { pag = &mp->m_perag[index]; pag->pagi_inodeok = 1; + if (!pag->pag_ici_init) { + rwlock_init(&pag->pag_ici_lock); + INIT_RADIX_TREE(&pag->pag_ici_root, GFP_ATOMIC); + pag->pag_ici_init = 1; + } } } return index; @@ -1033,13 +1038,6 @@ xfs_mountfs( xfs_trans_init(mp); /* - * Allocate and initialize the inode hash table for this - * file system. - */ - xfs_ihash_init(mp); - xfs_chash_init(mp); - - /* * Allocate and initialize the per-ag data. */ init_rwsem(&mp->m_peraglock); @@ -1190,8 +1188,6 @@ xfs_mountfs( error3: xfs_log_unmount_dealloc(mp); error2: - xfs_ihash_free(mp); - xfs_chash_free(mp); for (agno = 0; agno < sbp->sb_agcount; agno++) if (mp->m_perag[agno].pagb_list) kmem_free(mp->m_perag[agno].pagb_list, Index: 2.6.x-xfs-new/fs/xfs/xfs_mount.h =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_mount.h 2007-08-09 13:01:41.701951716 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_mount.h 2007-08-09 13:03:53.161036135 +1000 @@ -57,10 +57,7 @@ struct log; struct bhv_vfs; struct bhv_vnode; struct xfs_mount_args; -struct xfs_ihash; -struct xfs_chash; struct xfs_inode; -struct xfs_perag; struct xfs_iocore; struct xfs_bmbt_irec; struct xfs_bmap_free; @@ -335,8 +332,6 @@ typedef struct xfs_mount { xfs_agnumber_t m_agirotor; /* last ag dir inode alloced */ lock_t m_agirotor_lock;/* .. and lock protecting it */ xfs_agnumber_t m_maxagi; /* highest inode alloc group */ - size_t m_ihsize; /* size of next field */ - struct xfs_ihash *m_ihash; /* fs private inode hash table*/ struct xfs_inode *m_inodes; /* active inode list */ struct list_head m_del_inodes; /* inodes to reclaim */ mutex_t m_ilock; /* inode list mutex */ @@ -458,7 +453,7 @@ typedef struct xfs_mount { #define XFS_MOUNT_IDELETE (1ULL << 18) /* delete empty inode clusters*/ #define XFS_MOUNT_SWALLOC (1ULL << 19) /* turn on stripe width * allocation */ -#define XFS_MOUNT_IHASHSIZE (1ULL << 20) /* inode hash table size */ + /* (1ULL << 20) -- currently unused */ #define XFS_MOUNT_DIRSYNC (1ULL << 21) /* synchronous directory ops */ #define XFS_MOUNT_COMPAT_IOSIZE (1ULL << 22) /* don't report large preferred * I/O size in stat() */ @@ -572,6 +567,21 @@ xfs_daddr_to_agbno(struct xfs_mount *mp, } /* + * perag get/put wrappers for eventual ref counting + */ +static inline xfs_perag_t * +xfs_get_perag(struct xfs_mount *mp, xfs_ino_t ino) +{ + return &mp->m_perag[XFS_INO_TO_AGNO(mp, ino)]; +} + +static inline void +xfs_put_perag(struct xfs_mount *mp, xfs_perag_t *pag) +{ + /* nothing to see here, move along */ +} + +/* * Per-cpu superblock locking functions */ #ifdef HAVE_PERCPU_SB Index: 2.6.x-xfs-new/fs/xfs/xfs_rename.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_rename.c 2007-08-09 13:01:03.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_rename.c 2007-08-09 13:03:53.181033562 +1000 @@ -22,6 +22,7 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" Index: 2.6.x-xfs-new/fs/xfs/xfs_trans_ail.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_trans_ail.c 2007-08-09 13:00:12.381443746 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_trans_ail.c 2007-08-09 13:03:53.181033562 +1000 @@ -22,6 +22,7 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_trans_priv.h" Index: 2.6.x-xfs-new/fs/xfs/xfs_trans_extfree.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_trans_extfree.c 2007-08-09 13:00:12.381443746 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_trans_extfree.c 2007-08-09 13:03:53.181033562 +1000 @@ -22,6 +22,7 @@ #include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_trans_priv.h" Index: 2.6.x-xfs-new/fs/xfs/xfs_vfsops.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_vfsops.c 2007-08-09 13:01:10.829923854 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_vfsops.c 2007-08-09 13:03:53.185033047 +1000 @@ -117,8 +117,8 @@ xfs_init(void) xfs_ili_zone = kmem_zone_init_flags(sizeof(xfs_inode_log_item_t), "xfs_ili", KM_ZONE_SPREAD, NULL); - xfs_chashlist_zone = - kmem_zone_init_flags(sizeof(xfs_chashlist_t), "xfs_chashlist", + xfs_icluster_zone = + kmem_zone_init_flags(sizeof(xfs_icluster_t), "xfs_icluster", KM_ZONE_SPREAD, NULL); /* @@ -163,7 +163,7 @@ xfs_cleanup(void) extern kmem_zone_t *xfs_efd_zone; extern kmem_zone_t *xfs_efi_zone; extern kmem_zone_t *xfs_buf_item_zone; - extern kmem_zone_t *xfs_chashlist_zone; + extern kmem_zone_t *xfs_icluster_zone; xfs_cleanup_procfs(); xfs_sysctl_unregister(); @@ -199,7 +199,7 @@ xfs_cleanup(void) kmem_zone_destroy(xfs_efi_zone); kmem_zone_destroy(xfs_ifork_zone); kmem_zone_destroy(xfs_ili_zone); - kmem_zone_destroy(xfs_chashlist_zone); + kmem_zone_destroy(xfs_icluster_zone); } /* @@ -246,7 +246,6 @@ xfs_start_flags( ap->logbufsize); return XFS_ERROR(EINVAL); } - mp->m_ihsize = ap->ihashsize; mp->m_logbsize = ap->logbufsize; mp->m_fsname_len = strlen(ap->fsname) + 1; mp->m_fsname = kmem_alloc(mp->m_fsname_len, KM_SLEEP); @@ -293,8 +292,6 @@ xfs_start_flags( mp->m_readio_log = mp->m_writeio_log = ap->iosizelog; } - if (ap->flags & XFSMNT_IHASHSIZE) - mp->m_flags |= XFS_MOUNT_IHASHSIZE; if (ap->flags & XFSMNT_IDELETE) mp->m_flags |= XFS_MOUNT_IDELETE; if (ap->flags & XFSMNT_DIRSYNC) @@ -1693,7 +1690,6 @@ xfs_vget( #define MNTOPT_BSDGROUPS "bsdgroups" /* group-ID from parent directory */ #define MNTOPT_SYSVGROUPS "sysvgroups" /* group-ID from current process */ #define MNTOPT_ALLOCSIZE "allocsize" /* preferred allocation size */ -#define MNTOPT_IHASHSIZE "ihashsize" /* size of inode hash table */ #define MNTOPT_NORECOVERY "norecovery" /* don't run XFS recovery */ #define MNTOPT_BARRIER "barrier" /* use writer barriers for log write and * unwritten extent conversion */ @@ -1819,15 +1815,6 @@ xfs_parseargs( iosize = suffix_strtoul(value, &eov, 10); args->flags |= XFSMNT_IOSIZE; args->iosizelog = ffs(iosize) - 1; - } else if (!strcmp(this_char, MNTOPT_IHASHSIZE)) { - if (!value || !*value) { - cmn_err(CE_WARN, - "XFS: %s option requires an argument", - this_char); - return EINVAL; - } - args->flags |= XFSMNT_IHASHSIZE; - args->ihashsize = simple_strtoul(value, &eov, 10); } else if (!strcmp(this_char, MNTOPT_GRPID) || !strcmp(this_char, MNTOPT_BSDGROUPS)) { vfsp->vfs_flag |= VFS_GRPID; @@ -1986,9 +1973,6 @@ xfs_showargs( seq_puts(m, xfs_infop->str); } - if (mp->m_flags & XFS_MOUNT_IHASHSIZE) - seq_printf(m, "," MNTOPT_IHASHSIZE "=%d", (int)mp->m_ihsize); - if (mp->m_flags & XFS_MOUNT_DFLT_IOSIZE) seq_printf(m, "," MNTOPT_ALLOCSIZE "=%dk", (int)(1 << mp->m_writeio_log) >> 10); Index: 2.6.x-xfs-new/fs/xfs/xfs_vnodeops.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_vnodeops.c 2007-08-09 13:01:41.781941424 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_vnodeops.c 2007-08-09 13:03:53.185033047 +1000 @@ -3876,7 +3876,7 @@ xfs_finish_reclaim( int locked, int sync_mode) { - xfs_ihash_t *ih = ip->i_hash; + xfs_perag_t *pag = xfs_get_perag(ip->i_mount, ip->i_ino); bhv_vnode_t *vp = XFS_ITOV_NULL(ip); int error; @@ -3888,12 +3888,12 @@ xfs_finish_reclaim( * Once we have the XFS_IRECLAIM flag set it will not touch * us. */ - write_lock(&ih->ih_lock); + write_lock(&pag->pag_ici_lock); spin_lock(&ip->i_flags_lock); if (__xfs_iflags_test(ip, XFS_IRECLAIM) || (!__xfs_iflags_test(ip, XFS_IRECLAIMABLE) && vp == NULL)) { spin_unlock(&ip->i_flags_lock); - write_unlock(&ih->ih_lock); + write_unlock(&pag->pag_ici_lock); if (locked) { xfs_ifunlock(ip); xfs_iunlock(ip, XFS_ILOCK_EXCL); @@ -3902,7 +3902,8 @@ xfs_finish_reclaim( } __xfs_iflags_set(ip, XFS_IRECLAIM); spin_unlock(&ip->i_flags_lock); - write_unlock(&ih->ih_lock); + write_unlock(&pag->pag_ici_lock); + xfs_put_perag(ip->i_mount, pag); /* * If the inode is still dirty, then flush it out. If the inode From owner-xfs@oss.sgi.com Thu Aug 9 04:39:43 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 09 Aug 2007 04:39:47 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l79Bdcbm005510 for ; Thu, 9 Aug 2007 04:39:41 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA18033; Thu, 9 Aug 2007 21:39:39 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l79BdceW56044017; Thu, 9 Aug 2007 21:39:39 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l79Bdbmk54742521; Thu, 9 Aug 2007 21:39:37 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Thu, 9 Aug 2007 21:39:37 +1000 From: David Chinner To: xfs-dev Cc: xfs-oss Subject: [PATCH 2 of 4] Factor per-ag radix tree intialisation Message-ID: <20070809113937.GE12413810@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12543 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs Factor out common intialisation code. Signed-off-by: Dave Chinner --- fs/xfs/xfs_mount.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) Index: 2.6.x-xfs-new/fs/xfs/xfs_mount.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_mount.c 2007-08-09 13:03:53.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_mount.c 2007-08-09 13:07:53.410065825 +1000 @@ -337,6 +337,17 @@ xfs_mount_validate_sb( return 0; } +STATIC void +xfs_initialize_perag_icache( + xfs_perag_t *pag) +{ + if (!pag->pag_ici_init) { + rwlock_init(&pag->pag_ici_lock); + INIT_RADIX_TREE(&pag->pag_ici_root, GFP_ATOMIC); + pag->pag_ici_init = 1; + } +} + xfs_agnumber_t xfs_initialize_perag( bhv_vfs_t *vfs, @@ -391,22 +402,14 @@ xfs_initialize_perag( pag->pagi_inodeok = 1; if (index < max_metadata) pag->pagf_metadata = 1; - if (!pag->pag_ici_init) { - rwlock_init(&pag->pag_ici_lock); - INIT_RADIX_TREE(&pag->pag_ici_root, GFP_ATOMIC); - pag->pag_ici_init = 1; - } + xfs_initialize_perag_icache(pag); } } else { /* Setup default behavior for smaller filesystems */ for (index = 0; index < agcount; index++) { pag = &mp->m_perag[index]; pag->pagi_inodeok = 1; - if (!pag->pag_ici_init) { - rwlock_init(&pag->pag_ici_lock); - INIT_RADIX_TREE(&pag->pag_ici_root, GFP_ATOMIC); - pag->pag_ici_init = 1; - } + xfs_initialize_perag_icache(pag); } } return index; From owner-xfs@oss.sgi.com Thu Aug 9 04:42:11 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 09 Aug 2007 04:42:15 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l79Bg6bm006452 for ; Thu, 9 Aug 2007 04:42:09 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA18095; Thu, 9 Aug 2007 21:42:06 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l79Bg5eW55559214; Thu, 9 Aug 2007 21:42:05 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l79Bg4S555866904; Thu, 9 Aug 2007 21:42:04 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Thu, 9 Aug 2007 21:42:04 +1000 From: David Chinner To: xfs-dev Cc: xfs-oss Subject: [PATCH 3 of 4] Convert xfs_icluster lists to use list.h Message-ID: <20070809114204.GF12413810@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12544 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs Convert the xfs_icluster inode list to use hlist constructs. Use a hlist as we only need a single list head pointer and that keeps the memory usage of these structures down. Signed-off-by: Dave Chinner --- fs/xfs/xfs_iget.c | 61 +++++++++++++---------------------------------------- fs/xfs/xfs_inode.c | 6 ++++- fs/xfs/xfs_inode.h | 5 +--- fs/xfs/xfsidbg.c | 4 +-- 4 files changed, 24 insertions(+), 52 deletions(-) Index: 2.6.x-xfs-new/fs/xfs/xfs_inode.h =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_inode.h 2007-08-09 13:03:53.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_inode.h 2007-08-09 18:14:29.650646277 +1000 @@ -178,7 +178,7 @@ extern void xfs_iocore_inode_reinit(stru * the same time. */ typedef struct xfs_icluster { - struct xfs_inode *icl_ip; + struct hlist_head icl_inodes; /* list of inodes on cluster */ xfs_daddr_t icl_blkno; /* starting block number of * the cluster */ struct xfs_buf *icl_buf; /* the inode buffer */ @@ -296,8 +296,7 @@ typedef struct xfs_inode { xfs_icdinode_t i_d; /* most of ondisk inode */ xfs_icluster_t *i_cluster; /* cluster list header */ - struct xfs_inode *i_cnext; /* cluster link forward */ - struct xfs_inode *i_cprev; /* cluster link backward */ + struct hlist_node i_cnode; /* cluster link node */ xfs_fsize_t i_size; /* in-memory size */ /* Trace buffers per inode. */ Index: 2.6.x-xfs-new/fs/xfs/xfs_iget.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_iget.c 2007-08-09 13:03:53.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_iget.c 2007-08-09 18:15:16.832572205 +1000 @@ -290,31 +290,21 @@ finish_inode: ip->i_udquot = ip->i_gdquot = NULL; xfs_iflags_set(ip, XFS_INEW); - ASSERT(ip->i_cluster == NULL && ip->i_cprev == NULL && - ip->i_cnext == NULL); + ASSERT(ip->i_cluster == NULL); - if (icl) { - /* insert this inode into the doubly-linked list - * where icl points. lock the icl to protect against - * others traversing the icl list */ - spin_lock(&icl->icl_lock); - ASSERT(icl->icl_ip != NULL); - iq = icl->icl_ip; - ip->i_cprev = iq->i_cprev; - iq->i_cprev->i_cnext = ip; - iq->i_cprev = ip; - ip->i_cnext = iq; - icl->icl_ip = ip; - ip->i_cluster = icl; - spin_unlock(&icl->icl_lock); - } else { - ip->i_cnext = ip; - ip->i_cprev = ip; - ip->i_cluster = new_icl; - new_icl->icl_ip = ip; + if (!icl) { spin_lock_init(&new_icl->icl_lock); + INIT_HLIST_HEAD(&new_icl->icl_inodes); + icl = new_icl; new_icl = NULL; + } else { + ASSERT(!hlist_empty(&icl->icl_inodes)); } + spin_lock(&icl->icl_lock); + hlist_add_head(&ip->i_cnode, &icl->icl_inodes); + ip->i_cluster = icl; + spin_unlock(&icl->icl_lock); + write_unlock(&pag->pag_ici_lock); radix_tree_preload_end(); if (new_icl) @@ -579,33 +569,12 @@ xfs_iextract( */ mp = ip->i_mount; spin_lock(&ip->i_cluster->icl_lock); - if (unlikely(ip->i_cnext == ip)) { - /* - * Last inode in cluster object. - * - * We've been removed from the inode radix tree, and - * we are the last inode to reference the cluster. - * We can simply drop our loks and free it at this point - * because nothing can find us or the cluster. - */ - ASSERT(ip->i_cnext == ip && ip->i_cprev == ip); - ASSERT(ip->i_cluster != NULL); + hlist_del(&ip->i_cnode); + spin_unlock(&ip->i_cluster->icl_lock); - spin_unlock(&ip->i_cluster->icl_lock); + /* was last inode in cluster? */ + if (hlist_empty(&ip->i_cluster->icl_inodes)) kmem_zone_free(xfs_icluster_zone, ip->i_cluster); - } else { - /* delete one inode from a non-empty list */ - iq = ip->i_cnext; - iq->i_cprev = ip->i_cprev; - ip->i_cprev->i_cnext = iq; - if (ip->i_cluster->icl_ip == ip) { - ip->i_cluster->icl_ip = iq; - } - spin_unlock(&ip->i_cluster->icl_lock); - ip->i_cluster = __return_address; - ip->i_cprev = __return_address; - ip->i_cnext = __return_address; - } /* * Remove from mount's inode list. Index: 2.6.x-xfs-new/fs/xfs/xfs_inode.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_inode.c 2007-08-09 13:03:53.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_inode.c 2007-08-09 18:11:14.059874991 +1000 @@ -3050,6 +3050,7 @@ xfs_iflush( xfs_inode_t *iq; int clcount; /* count of inodes clustered */ int bufwasdelwri; + struct hlist_node *entry; enum { INT_DELWRI = (1 << 0), INT_ASYNC = (1 << 1) }; XFS_STATS_INC(xs_iflush_count); @@ -3168,7 +3169,10 @@ xfs_iflush( ip->i_cluster->icl_buf = bp; clcount = 0; - for (iq = ip->i_cnext; iq != ip; iq = iq->i_cnext) { + hlist_for_each_entry(iq, entry, &ip->i_cluster->icl_inodes, i_cnode) { + if (iq == ip) + continue; + /* * Do an un-protected check to see if the inode is dirty and * is a candidate for flushing. These checks will be repeated Index: 2.6.x-xfs-new/fs/xfs/xfsidbg.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfsidbg.c 2007-08-09 13:03:53.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfsidbg.c 2007-08-09 18:16:46.581017645 +1000 @@ -6755,8 +6755,8 @@ xfsidbg_xnode(xfs_inode_t *ip) kdb_printf("\n"); kdb_printf("icluster 0x%p cnext 0x%p cprev 0x%p\n", ip->i_cluster, - ip->i_cnext, - ip->i_cprev); + ip->i_cnode.next, + ip->i_cnode.pprev); xfs_xnode_fork("data", &ip->i_df); xfs_xnode_fork("attr", ip->i_afp); kdb_printf("\n"); From owner-xfs@oss.sgi.com Thu Aug 9 04:45:58 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 09 Aug 2007 04:46:02 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l79Bjtbm007742 for ; Thu, 9 Aug 2007 04:45:57 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA18306; Thu, 9 Aug 2007 21:45:52 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l79BjneW56062213; Thu, 9 Aug 2007 21:45:52 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l79BjmP156017062; Thu, 9 Aug 2007 21:45:48 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Thu, 9 Aug 2007 21:45:48 +1000 From: David Chinner To: xfs-dev Cc: xfs-oss Subject: [PATCH 4 of 4] Restore ihashsize mount option as deprecated Message-ID: <20070809114548.GG12413810@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12545 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs The ihashsize option should remain so that filesystems with this set don't fail to mount. Ignore the mount option value and issue a deprecation warning to syslog. Update the ihashsize mount option documentation to indicate this behaviour. Update the ikeep/noikeep mount option documentation while we are there. Signed-off-by: Dave Chinner --- Documentation/filesystems/xfs.txt | 14 ++++++-------- fs/xfs/xfs_vfsops.c | 3 +++ 2 files changed, 9 insertions(+), 8 deletions(-) Index: 2.6.x-xfs-new/fs/xfs/xfs_vfsops.c =================================================================== --- 2.6.x-xfs-new.orig/fs/xfs/xfs_vfsops.c 2007-08-09 13:03:53.000000000 +1000 +++ 2.6.x-xfs-new/fs/xfs/xfs_vfsops.c 2007-08-09 18:27:39.740905512 +1000 @@ -1883,6 +1883,9 @@ xfs_parseargs( args->flags &= ~XFSMNT_ATTR2; } else if (!strcmp(this_char, MNTOPT_FILESTREAM)) { args->flags2 |= XFSMNT2_FILESTREAMS; + } else if (!strcmp(this_char, "ihashsize")) { + cmn_err(CE_WARN, + "XFS: ihashsize no longer used, option is deprecated."); } else if (!strcmp(this_char, "osyncisdsync")) { /* no-op, this is now the default */ cmn_err(CE_WARN, Index: 2.6.x-xfs-new/Documentation/filesystems/xfs.txt =================================================================== --- 2.6.x-xfs-new.orig/Documentation/filesystems/xfs.txt 2007-08-09 13:00:11.000000000 +1000 +++ 2.6.x-xfs-new/Documentation/filesystems/xfs.txt 2007-08-09 18:35:57.300771335 +1000 @@ -52,16 +52,14 @@ When mounting an XFS filesystem, the fol and also gets the setgid bit set if it is a directory itself. ihashsize=value - Sets the number of hash buckets available for hashing the - in-memory inodes of the specified mount point. If a value - of zero is used, the value selected by the default algorithm - will be displayed in /proc/mounts. + In memory inode hashes have been removed, so this option has + no function as of August 2007. Option is deprecated. ikeep/noikeep - When inode clusters are emptied of inodes, keep them around - on the disk (ikeep) - this is the traditional XFS behaviour - and is still the default for now. Using the noikeep option, - inode clusters are returned to the free space pool. + When ikeep is specified, XFS does not delete empty inode clusters + and keeps them around on disk. ikeep is the traditional XFS + behaviour. When noikeep is specified, empty inode clusters + are returned to the free space pool. The default is noikeep. inode64 Indicates that XFS is allowed to create inodes at any location From owner-xfs@oss.sgi.com Thu Aug 9 04:55:54 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 09 Aug 2007 04:56:05 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-6.2 required=5.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_MED,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l79Btqbm010404 for ; Thu, 9 Aug 2007 04:55:53 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l79Bt7c2023718; Thu, 9 Aug 2007 07:55:07 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l79Bt68l021755; Thu, 9 Aug 2007 07:55:06 -0400 Received: from tleilax.poochiereds.net (vpn-14-89.rdu.redhat.com [10.11.14.89]) by pobox.corp.redhat.com (8.13.1/8.13.1) with SMTP id l79Bt3IN012387; Thu, 9 Aug 2007 07:55:03 -0400 Date: Thu, 9 Aug 2007 07:55:02 -0400 From: Jeff Layton To: Jan Engelhardt Cc: Andrew Morton , codalist@TELEMANN.coda.cs.cmu.edu, cluster-devel@redhat.com, jfs-discussion@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, reiserfs-devel@vger.kernel.org, zippel@linux-m68k.org, xfs@oss.sgi.com, linux-kernel@vger.kernel.org, wli@holomorphy.com, joel.becker@oracle.com, dhowells@redhat.com, fuse-devel@lists.sourceforge.net, jffs-dev@axis.com, user-mode-linux-user@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, linux-ext4@vger.kernel.org, linux-cifs-client@lists.samba.org, ocfs2-devel@oss.oracle.com, bfennema@falcon.csc.calpoly.edu Subject: Re: [fuse-devel] [PATCH 00/25] move handling of setuid/gid bits from VFS into individual setattr functions (RESEND) Message-Id: <20070809075502.b3426ce9.jlayton@redhat.com> In-Reply-To: References: <200708061354.l76Ds3mU002255@dantu.rdu.redhat.com> <20070807171501.e31c4a97.akpm@linux-foundation.org> <20070808085435.722f2b10.jlayton@redhat.com> <20070808094853.8c27450c.akpm@linux-foundation.org> X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.14; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12546 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jlayton@redhat.com Precedence: bulk X-list: xfs On Wed, 8 Aug 2007 22:05:13 +0200 (CEST) Jan Engelhardt wrote: > > On Aug 8 2007 09:48, Andrew Morton wrote: > >> > On Mon, 6 Aug 2007 09:54:03 -0400 > >> > Jeff Layton wrote: > >> > > >> > Is there any way in which we can prevent these problems? Say > >> > > >> > - rename something so that unconverted filesystems will reliably fail to > >> > compile? > >> > > >> > >> I suppose we could rename the .setattr inode operation to something > >> else, but then we'll be stuck with it for at least a while. That seems > >> sort of kludgey too... > > > >Sure. We're changing the required behaviour of .setattr. Changing its > >name is a fine and reasonably reliable way to communicate that fact. > > Maybe ->chattr/->chgattr? > > That seems like a good replacement name. :-) Now that I think on this further though, maybe Trond's suggestion to change how the return code works is the best one. That would (hopefully) catch this problem at runtime, so if someone is using a precompiled but unconverted module then that would be detected too. -- Jeff Layton From owner-xfs@oss.sgi.com Thu Aug 9 13:38:23 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 09 Aug 2007 13:38:29 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: **** X-Spam-Status: No, score=4.0 required=5.0 tests=BAYES_99 autolearn=no version=3.2.0-pre1-r499012 Received: from smtp-out4.libero.it (smtp-out4.libero.it [212.52.84.46]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l79KcKbm014523; Thu, 9 Aug 2007 13:38:22 -0700 Received: from localhost (172.31.0.42) by smtp-out4.libero.it (7.3.120) id 4688F3500382C080; Thu, 9 Aug 2007 22:13:46 +0200 Received: from smtp-out4.libero.it ([172.31.0.40]) by localhost (asav-out2.libero.it [192.168.32.30]) (amavisd-new, port 10024) with ESMTP id Gzg-pVF5krfp; Thu, 9 Aug 2007 22:13:46 +0200 (CEST) Received: from MailRelay10.libero.it (192.168.32.119) by smtp-out4.libero.it (7.3.120) id 4611FEBC0A302E91; Thu, 9 Aug 2007 22:13:46 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AswMAHYRu0bAqBEL/2dsb2JhbAANigKgbw Received: from unknown (HELO libero.it) ([192.168.17.11]) by outrelay10.libero.it with ESMTP; 09 Aug 2007 22:13:46 +0200 Date: Thu, 9 Aug 2007 22:13:46 +0200 Message-Id: Subject: Contact Mrs.Zaa Gourk MIME-Version: 1.0 X-Sensitivity: 3 Content-Type: text/plain; charset=iso-8859-1 From: "infoswisss" X-XaM3-API-Version: 4.3 (R1) (B3pl19) X-SenderIP: 194.178.109.250 To: undisclosed-recipients:; X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id l79KcNbm014535 X-archive-position: 12547 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: infoswisss@libero.it Precedence: bulk X-list: xfs Contact Mrs.Zaa Gourk Award Notice!!!Ref No(871),Ticket number 7766,serial number9900,luckynumbers 7622, batch number BL 7701 Do Clarification and Claim of US$ 400.000.00 won in Email Lottery.Contact Ms.Zaa Gourk Email:incorpuration@aim.com Tel:+31-642-658-452 Regards, Ms.Sodic Lasy From owner-xfs@oss.sgi.com Thu Aug 9 14:12:27 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 09 Aug 2007 14:12:30 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.181]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l79LCQbm021601 for ; Thu, 9 Aug 2007 14:12:27 -0700 Received: by wa-out-1112.google.com with SMTP id k22so726550waf for ; Thu, 09 Aug 2007 14:12:30 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=FiSgtiJb0Sgzhv5q3vK60/Ac7fug2nFu2cagjVWyseEXoY1oZw/5EkWwrGa0GH7q2uYanylbsAl2sA7HGqevBz/LM4pT+zSHqpACnqE/zlhWLNXglwNgZoTBGQ0BtHBHcYk+N7YnQE88N27wDt7BtVdysBZjxrD67JcGORHzVDg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=DsQrZcYl0QjnhLbrBCRyVQBn6daRBtJpwC79lT4EzPi3gXyoUqkXeZTF2gFDrL6nxfnbAfoURg5XGqKjvBrcY4lzTWJ9aN9wpwTjvMnEyVJexCKodksWeVsBSqG4y8lugRsTHPBMQa7jX7Vk9UQQe8nyRQZWevlHiJbHvJAtq0w= Received: by 10.115.14.1 with SMTP id r1mr1831407wai.1186693950844; Thu, 09 Aug 2007 14:12:30 -0700 (PDT) Received: by 10.114.13.15 with HTTP; Thu, 9 Aug 2007 14:12:30 -0700 (PDT) Message-ID: <5d96567b0708091412y2ea0df38x9a73da6dcac3e962@mail.gmail.com> Date: Fri, 10 Aug 2007 00:12:30 +0300 From: Raz To: linux-xfs@oss.sgi.com Subject: corruption of xfs over sw raid5 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12548 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: raziebe@gmail.com Precedence: bulk X-list: xfs We are getting xfs corruption ( see bellow ) when deleting from a file system. deletion is done while the file system is filling other files and deleting other files. the bellow is the block device configuration and xfs_info conf. Question: I am using 2.6.17.7 , should I upgrade to 2.6.2x.x ? # cat /proc/mdstat Personalities : [raid5] [raid4] [raid1] [raid0] md1 : active raid5 sda3[0] sdd3[3] sdc3[2] sdb3[1] 1462380288 blocks level 5, 256k chunk, algorithm 2 [4/4] [UUUU] md0 : active raid5 sda2[0] sdd2[3] sdc2[2] sdb2[1] 1589760 blocks level 5, 256k chunk, algorithm 2 [4/4] [UUUU] # xfs_info /d1 meta-data=/dev/md1 isize=256 agcount=349, agsize=1048572 blks = sectsz=512 attr=0 data = bsize=4096 blocks=365595072, imaxpct=25 = sunit=4 swidth=32 blks, unwritten=1 naming =version 2 bsize=4096 log =internal bsize=4096 blocks=32768, version=1 = sectsz=512 sunit=0 blks realtime =none extsz=786432 blocks=0, rtextents=0 [4305465.579000] XFS internal error XFS_WANT_CORRUPTED_GOTO at line 1590 of file fs/xfs/xfs_alloc.c. Caller 0xc10c3eba [4305465.601000] xfs_free_ag_extent+0x372/0x73d xfs_free_extent+0x10d/0x111 [4305465.618000] xfs_free_extent+0x10d/0x111 kmem_zone_alloc+0x57/0xc5 [4305465.636000] xfs_trans_get_efd+0x38/0x46 xfs_bmap_finish+0x146/0x1e5 [4305465.653000] xfs_itruncate_finish+0x22a/0x453 xfs_inactive+0x559/0x5c0 [4305465.671000] xfs_fs_clear_inode+0x8a/0x98 clear_inode+0xa8/0xeb [4305465.687000] generic_delete_inode+0x106/0x115 iput+0x62/0x7c [4305465.703000] do_unlinkat+0xf7/0x121 sys_socketcall+0x163/0x280 [4305465.720000] sys_unlink+0x17/0x1b syscall_call+0x7/0xb [4305465.735000] xfs_force_shutdown(md1,0x8) called from line 4091 of file fs/xfs/xfs_bmap.c. Return address = 0xc1131b5c [4305465.763000] Filesystem "md1": Corruption of in-memory data detected. Shutting down filesystem: md1 [4305465.782000] Please umount the filesystem, and rectify the problem(s) [4305529.751000] xfs_force_shutdown(md1,0x1) called from line 338 of file fs/xfs/xfs_rw.c. Return address = 0xc1131b5c [4305535.773000] xfs_force_shutdown(md1,0x1) called from line 338 of file fs/xfs/xfs_rw.c. Return address = 0xc1131b5c -- Raz From owner-xfs@oss.sgi.com Thu Aug 9 23:08:48 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 09 Aug 2007 23:08:54 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=AWL,BAYES_50 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7A68ibm014782 for ; Thu, 9 Aug 2007 23:08:47 -0700 Received: from boing.melbourne.sgi.com (boing.melbourne.sgi.com [134.14.55.141]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id QAA22658; Fri, 10 Aug 2007 16:08:45 +1000 Message-ID: <46BC00ED.1010201@sgi.com> Date: Fri, 10 Aug 2007 16:08:45 +1000 From: Timothy Shimmin User-Agent: Thunderbird 2.0.0.5 (Macintosh/20070716) MIME-Version: 1.0 To: Barry Naujok CC: "xfs@oss.sgi.com" , xfs-dev Subject: Re: REVIEW: fix xfs_repair phase 4 ag_stride with prefetch References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12549 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: tes@sgi.com Precedence: bulk X-list: xfs Barry Naujok wrote: > > AG stride testing was performed on a system with ample amounts > of memory, so prefetching with AG stride during Phase 4 was > missed. The attached patch fixes this. > > 32 AGs, ag_stride = 4: > > Phase 3 - for each AG... > - scan and clear agi unlinked lists... > - process known inodes and perform inode discovery... > - agno = 0 > - agno = 4 > - agno = 8 > - agno = 12 > - agno = 16 > - agno = 20 > - agno = 24 > - agno = 28 > > which is correct... but in Phase 4: > > Phase 4 - check for duplicate blocks... > - setting up duplicate extent list... > - check for inodes claiming duplicate blocks... > - agno = 0 > - agno = 1 > - agno = 2 > - agno = 5 > - agno = 6 > - agno = 4 > - agno = 7 > - agno = 3 Okay I replied to this in the bug but forgot about the review email request so I will reply here too:) ========================== ADDITIONAL INFORMATION (ADD) From: timothy shimmin Date: Aug 09 2007 10:59:01PM [BugWorks mailnews processor v1.7.1] ========================== bnaujok@sgi.com via BugWorks wrote: > > [ EXCESSIVE QUOTED TEXT DELETED ] > > - 12:00:16: setting up duplicate extent list - 32 of 32 allocation groups done > - check for inodes claiming duplicate blocks... > - agno = 0 > - agno = 1 > - agno = 2 > - agno = 5 > - agno = 6 > - agno = 4 > - agno = 7 > - agno = 3 So you need to replicate the logic/code you used in phase 3 and put it into phase4 I presume. And the changes are in phase4.c/process_ags() (like in phase3.c/process_ags). So previously it would iterate thru the thread-count and then prefetch and queue up to the ag-count stepping by the ag-stride. And now we go thru each AG but only do an ag-stride worth at a time for a thread. So each thread will get an ag-stride worth of ags to deal with: Fixed code: Thread 0 - gets ag 0-3 (go thru a loop doing a fetch & queue work on ag 0-3) Thread 1 - gets ag 4-7 Thread 2 - gets ag 8-11 etc... Okay, starting to get it now :) So previously (broken code) it would do: Thread 0 - gets ag 0,4,8,12,16,... Thread 1 - gets ag 1,5,9,13,17,... Thread 2 - gets ag 2,6,10,14,18,... I presume the bad phase 4 msgs above are coming out in a different order than what I said above just because of the threading. Or did I make a mistake in my reading of the code. Pity we couldn't share some code there between the phases but I haven't looked to see the difficulties with that are - do tell me. Would be nice to guarantee handling the striding/threading the same in both phases by both using the same iterator code - particularly if it needs to be changed in the future etc. But whatever. And I presume the fix is so that the prefetching for a thread is done in ag-order (and they are just given a chunks worth) instead of the old bad way where the prefetching would be done with a jump over AGs by the stride instead of in order. So it looks fine if my understanding is correct. Cheers, Tim. From owner-xfs@oss.sgi.com Thu Aug 9 23:24:09 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 09 Aug 2007 23:24:13 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7A6O5bm022068 for ; Thu, 9 Aug 2007 23:24:08 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id QAA23182; Fri, 10 Aug 2007 16:24:05 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l7A6O4eW53458112; Fri, 10 Aug 2007 16:24:04 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l7A6O2AZ57231723; Fri, 10 Aug 2007 16:24:02 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Fri, 10 Aug 2007 16:24:02 +1000 From: David Chinner To: Martin Steigerwald Cc: linux-xfs@oss.sgi.com, David Chinner Subject: Re: Impact of atime updates on XFS Message-ID: <20070810062402.GU52011508@sgi.com> References: <200708081408.01817.ms@teamix.de> <200708090820.55509.Martin@Lichtvoll.de> <20070809101544.GZ12413810@sgi.com> <200708091306.13011.Martin@lichtvoll.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200708091306.13011.Martin@lichtvoll.de> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12550 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Thu, Aug 09, 2007 at 01:06:12PM +0200, Martin Steigerwald wrote: > Am Donnerstag 09 August 2007 schrieb David Chinner: > > On Thu, Aug 09, 2007 at 08:20:55AM +0200, Martin Steigerwald wrote: > > > Am Donnerstag 09 August 2007 schrieb David Chinner: > > > > > What would be the impact of atime versus noatime on XFS? What is > > > > > the recommended setting for XFS? Are there any plans to implement > > > > > relatime logic - maybe even the improved one by Ingo Molnar - > > > > > into XFS? > > > > > > > > relatime is a VFS layer construct - it should work with XFS right > > > > now. > > > > > > Thanks for your answer. > > > > > > XFS says: > > > > > > XFS: unknown mount option [relatime]. > > > > That's because it's supposed to be encoded in the mount flags (i.e. > > intercepted by the mount binary and not passed to the kernel > > directly). I think you need a more recent mount binary.... > > Exactly. After I upgraded mount debian package 2.12r-19 to 2.13~rc3-1 > mount -o remount,relatime works. Cool. > I got a response back from Ingo and he said, that on ext3 atime updates > are very visible while XFS does some journalling tricks to mitigate it. Sure. If we can do it with XFS, why can't ext3? Doesn't this point out to you that Ingo is really complaining aout a design deficiency with ext3, not a generic "atime is bad" problem? > He doubts that I will see much difference on XFS as it has less strict > synchronisation rules than ext3. Ah, yes. That would be a reference to ext3 ordered mode where data and metadata I/O is strictly ordered. XFS uses the equivalent of ext3 writeback mode and so doesn't provide this strict ordering. This has long been XFS's main weakness e.g. data I/Os vs file size updates resulting in files full of NULLs. However, we've fixed that particular problem without requiring strict ordering across the entire filesystem and without introducing new performance regressions or quirks. We're solving these issues on a case by case basis via a different mechanisms to provide efficient data/metadata ordering where it is needed rather than enforcing it globally through the journal. I think that we are starting to see the problems with the global ordered mode model that is implemented in ext3 - fsync, flush latency, atime updates, etc. I don't see how they can be easily fixed without compromising the model and its guarantees. IOWs, XFS's less strict synchronisation rules can be seen as a distinct advantage over ext3 ordered mode due to the flexibility they allow us in solving I/O ordering issues without needing to compromise performance. Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Fri Aug 10 12:34:09 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 10 Aug 2007 12:34:14 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_50,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7AJY6bm012960 for ; Fri, 10 Aug 2007 12:34:08 -0700 Received: from [192.168.254.4] (dsl-dynamic-209-50-31-245.inebraska.com [209.50.31.245]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 878681807E35C; Fri, 10 Aug 2007 14:34:09 -0500 (CDT) Message-ID: <46BCBDB2.6070703@sandeen.net> Date: Fri, 10 Aug 2007 14:34:10 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: David Chinner CC: Andi Kleen , xfs@oss.sgi.com Subject: Re: XFS thread inflation in 2.6.23rc References: <200708081240.21548.ak@suse.de> <200708081422.10373.ak@suse.de> <20070808131404.GQ52011508@sgi.com> <200708081526.06860.ak@suse.de> <20070809110322.GA12413810@sgi.com> In-Reply-To: <20070809110322.GA12413810@sgi.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12551 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs David Chinner wrote: > Andi, you are complaining to the wrong person about thread counts. I > live in the world of excessive parallelism and multithreaded I/O. I > regularly see 4-8p boxes running hundreds to thousands of I/O > threads on a single filesystem. These are the workloads XFS is > designed for and we optimise for. A single extra thread is noise.... The other thing this is doing, though, is having an impact on power usage, I think. Fedora is trying to identify things which wake the CPU in an effort to reduce power usage if possible. See for example: http://article.gmane.org/gmane.linux.redhat.fedora.testers/50480 quoting: "One of the biggest power problems is apps that wake up the CPU unnecessarily. With the tickless kernel for x86 (and soon x86_64), every time this happens it's a chance for power savings lost. HOW YOU CAN HELP ---------------- We'd like to get as many reports of misbehaving apps as possible. 1) Install the 'powertop' package 2) Run it in a terminal window on a reasonably idle system with your normal combination of apps. (If you run it when you're actively compiling a kernel, watching a movie, or doing other CPU-intensive things, the results aren't as useful.) 3) Note the results..." and here are the results w/ xfs mounted: < Detailed C-state information is only available on Mobile CPUs (laptops) > P-states (frequencies) 2.21 Ghz 0.0% 2.00 Ghz 0.0% 1.80 Ghz 100.0% Wakeups-from-idle per second : 31.7 no ACPI power usage estimate available Top causes for wakeups: 37.0% ( 20.0) mount : xfs_mru_cache_create ... looks like having this running (note: i'm not using filestreams on this mounted filesystem) may be impacting the power usage of the CPU? Or maybe SGI doesn' care about that, if the goal is 100% utilization of these machines on altixes etc... but still - something to consider I think. Thanks, -Eric From owner-xfs@oss.sgi.com Fri Aug 10 13:49:54 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 10 Aug 2007 13:50:06 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-6.2 required=5.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_MED,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7AKnpbm002847 for ; Fri, 10 Aug 2007 13:49:54 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l7AKm0Q3030064; Fri, 10 Aug 2007 16:48:01 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7AKlwev018483; Fri, 10 Aug 2007 16:47:58 -0400 Received: from tleilax.poochiereds.net (vpn-14-55.rdu.redhat.com [10.11.14.55]) by pobox.corp.redhat.com (8.13.1/8.13.1) with SMTP id l7AKlq9u028806; Fri, 10 Aug 2007 16:47:53 -0400 Date: Fri, 10 Aug 2007 16:47:52 -0400 From: Jeff Layton To: Trond Myklebust Cc: Andrew Morton , Jeff Layton , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com Subject: Re: [PATCH 00/25] move handling of setuid/gid bits from VFS into individual setattr functions (RESEND) Message-Id: <20070810164752.23117e0e.jlayton@redhat.com> In-Reply-To: <1186533934.6625.91.camel@heimdal.trondhjem.org> References: <200708061354.l76Ds3mU002255@dantu.rdu.redhat.com> <20070807171501.e31c4a97.akpm@linux-foundation.org> <1186533934.6625.91.camel@heimdal.trondhjem.org> X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.14; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12552 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jlayton@redhat.com Precedence: bulk X-list: xfs On Tue, 07 Aug 2007 20:45:34 -0400 Trond Myklebust wrote: > > - rename something so that unconverted filesystems will reliably fail to > > compile? > > > > - leave existing filesystems alone, but add a new > > inode_operations.setattr_jeff, which the networked filesytems can > > implement, and teach core vfs to call setattr_jeff in preference to > > setattr? > > If you really need to know that the filesystem is handling the flags, > then how about instead having ->setattr() return something which > indicates which flags it actually handled? That is likely to be a far > more intrusive change, but it is one which is future-proof. > One thing that we could do here is have notify_change check attr->ia_valid after the setattr operation returns. If either ATTR_KILL_* bit is set then BUG(). The helper function already clears those bits so anything using it should automatically be ok. We'd have to fix up NFS and a few others that don't implement suid/sgid. This is not as certain as changing the name of the inode operation. It would only pop when someone is attempting to change a setuid/setgid file on these filesystems. Still, it should conceivably catch most if not all offenders. Would that be sufficient to take care of everyone's concerns? -- Jeff Layton From owner-xfs@oss.sgi.com Fri Aug 10 16:49:47 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 10 Aug 2007 16:49:50 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7ANnhbm017980 for ; Fri, 10 Aug 2007 16:49:46 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id JAA23552; Sat, 11 Aug 2007 09:49:44 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l7ANnheW58516141; Sat, 11 Aug 2007 09:49:43 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l7ANnfbq58441594; Sat, 11 Aug 2007 09:49:41 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Sat, 11 Aug 2007 09:49:41 +1000 From: David Chinner To: Eric Sandeen Cc: David Chinner , Andi Kleen , xfs@oss.sgi.com Subject: Re: XFS thread inflation in 2.6.23rc Message-ID: <20070810234940.GO12413810@sgi.com> References: <200708081240.21548.ak@suse.de> <200708081422.10373.ak@suse.de> <20070808131404.GQ52011508@sgi.com> <200708081526.06860.ak@suse.de> <20070809110322.GA12413810@sgi.com> <46BCBDB2.6070703@sandeen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46BCBDB2.6070703@sandeen.net> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12553 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Fri, Aug 10, 2007 at 02:34:10PM -0500, Eric Sandeen wrote: > David Chinner wrote: > > > Andi, you are complaining to the wrong person about thread counts. I > > live in the world of excessive parallelism and multithreaded I/O. I > > regularly see 4-8p boxes running hundreds to thousands of I/O > > threads on a single filesystem. These are the workloads XFS is > > designed for and we optimise for. A single extra thread is noise.... > > > The other thing this is doing, though, is having an impact on power > usage, I think. Fedora is trying to identify things which wake the CPU > in an effort to reduce power usage if possible. Sure, but an idle thread doesn't use any power, and the workqueue is now only used when there are streams active. > and here are the results w/ xfs mounted: > > < Detailed C-state information is only available on Mobile CPUs (laptops) > > P-states (frequencies) > 2.21 Ghz 0.0% > 2.00 Ghz 0.0% > 1.80 Ghz 100.0% > Wakeups-from-idle per second : 31.7 > no ACPI power usage estimate available > Top causes for wakeups: > 37.0% ( 20.0) mount : xfs_mru_cache_create http://oss.sgi.com/archives/xfs/2007-08/msg00009.html "On-demand reaping of the MRU cache Instead of running the mru cache reaper all the time based on a timeout, we should only run it when the cache has active objects. This allows CPUs to sleep when there is no activity rather than be woken repeatedly just to check if there is anything to do." Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Fri Aug 10 18:21:49 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 10 Aug 2007 18:21:53 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7B1Llbm006615 for ; Fri, 10 Aug 2007 18:21:49 -0700 Received: from [192.168.254.4] (dsl-dynamic-209-50-31-245.inebraska.com [209.50.31.245]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 0EEB91807DF04; Fri, 10 Aug 2007 20:21:51 -0500 (CDT) Message-ID: <46BD0F30.6080306@sandeen.net> Date: Fri, 10 Aug 2007 20:21:52 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: David Chinner CC: Andi Kleen , xfs@oss.sgi.com Subject: Re: XFS thread inflation in 2.6.23rc References: <200708081240.21548.ak@suse.de> <200708081422.10373.ak@suse.de> <20070808131404.GQ52011508@sgi.com> <200708081526.06860.ak@suse.de> <20070809110322.GA12413810@sgi.com> <46BCBDB2.6070703@sandeen.net> <20070810234940.GO12413810@sgi.com> In-Reply-To: <20070810234940.GO12413810@sgi.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12554 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs David Chinner wrote: > http://oss.sgi.com/archives/xfs/2007-08/msg00009.html > > "On-demand reaping of the MRU cache > > Instead of running the mru cache reaper all the time based on a > timeout, we should only run it when the cache has active objects. > This allows CPUs to sleep when there is no activity rather than > be woken repeatedly just to check if there is anything to do." Ah, cool. Missed that, sorry. Will re-run powertop with that just to keep you on your toes. ;-) -Eric From owner-xfs@oss.sgi.com Fri Aug 10 20:29:00 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 10 Aug 2007 20:29:09 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7B3Swbm005468 for ; Fri, 10 Aug 2007 20:29:00 -0700 Received: from hch by pentafluge.infradead.org with local (Exim 4.63 #1 (Red Hat Linux)) id 1IJhAa-0005XS-26; Sat, 11 Aug 2007 03:57:40 +0100 Date: Sat, 11 Aug 2007 03:57:39 +0100 From: Christoph Hellwig To: Jeff Layton Cc: Trond Myklebust , Andrew Morton , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com Subject: Re: [PATCH 00/25] move handling of setuid/gid bits from VFS into individual setattr functions (RESEND) Message-ID: <20070811025739.GA21244@infradead.org> Mail-Followup-To: Christoph Hellwig , Jeff Layton , Trond Myklebust , Andrew Morton , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com References: <200708061354.l76Ds3mU002255@dantu.rdu.redhat.com> <20070807171501.e31c4a97.akpm@linux-foundation.org> <1186533934.6625.91.camel@heimdal.trondhjem.org> <20070810164752.23117e0e.jlayton@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070810164752.23117e0e.jlayton@redhat.com> User-Agent: Mutt/1.4.2.3i X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12555 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: xfs On Fri, Aug 10, 2007 at 04:47:52PM -0400, Jeff Layton wrote: > attr->ia_valid after the setattr operation returns. If either ATTR_KILL_* > bit is set then BUG(). The helper function already clears those bits > so anything using it should automatically be ok. We'd have to fix > up NFS and a few others that don't implement suid/sgid. > > This is not as certain as changing the name of the inode operation. It > would only pop when someone is attempting to change a setuid/setgid > file on these filesystems. Still, it should conceivably catch most if > not all offenders. Would that be sufficient to take care of everyone's > concerns? I like the idea of checking ia_valid after return a lot. But instead of going BUG() it should just do the default action, that we can avoid touching all the filesystem and only need to change those that need special care. I also have plans to add some new AT_ flags for implementing some filesystem ioctl in generic code that would benefit greatly from the ia_valid checkin after return to return ENOTTY fr filesystems not implementing those ioctls. From owner-xfs@oss.sgi.com Sun Aug 12 13:29:39 2007 Received: with ECARTIS (v1.0.0; list xfs); Sun, 12 Aug 2007 13:29:42 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: * X-Spam-Status: No, score=1.2 required=5.0 tests=AWL,BAYES_20,J_CHICKENPOX_66 autolearn=no version=3.2.0-pre1-r499012 Received: from mail.lichtvoll.de (mondschein.lichtvoll.de [194.150.191.11]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7CKTabm001462 for ; Sun, 12 Aug 2007 13:29:39 -0700 Received: from localhost (dslb-084-056-127-119.pools.arcor-ip.net [84.56.127.119]) by mail.lichtvoll.de (Postfix) with ESMTP id F002F5ADEE; Sun, 12 Aug 2007 22:34:50 +0200 (CEST) From: Martin Steigerwald To: linux-xfs@oss.sgi.com Subject: Re: xfs_fsr and null byte areas in files Date: Sun, 12 Aug 2007 22:29:40 +0200 User-Agent: KMail/1.9.7 Cc: David Chinner , Timothy Shimmin , ck@vds.kolivas.org References: <200707092313.48876.Martin@lichtvoll.de> <20070710005030.GQ31489@sgi.com> <200707262309.24012.Martin@lichtvoll.de> (sfid-20070726_234346_745054_05940549) In-Reply-To: <200707262309.24012.Martin@lichtvoll.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708122229.40400.Martin@lichtvoll.de> X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12556 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: Martin@lichtvoll.de Precedence: bulk X-list: xfs Am Donnerstag 26 Juli 2007 schrieb Martin Steigerwald: > Am Dienstag 10 Juli 2007 schrieb David Chinner: > > > 1) Is there an XFS qa test available for xfs_fsr? If so I could use > > > that one. Are there some hints on how to get started on XFS qa? > > > > Yes, test 042. Download it from CVS, build it (installing all the > > bits it asks for ;), edit common.config to add your test and scratch > > partitions (both volatile) and the 'check -l 042' to run test 042. > > Hi! > > I ran test 42 and it completes successfully. Hello, I now read a post from someone who faced null byte areas in files after xfs_fsr as well[1]. And he writes that this problem is related to the ck patchset: http://bhhdoa.org.au/pipermail/ck/2007-August/008433.html It may well be that it is related to the ck patchset in my case as well. I did not know the exact kernel version anymore when I was using xfs_fsr, since it took me 2 weeks to actually find about this corruption. Well and when I ran xfsqa test I had a slighly newer kernel was using the CFS scheduler instead of the ck patchset. Actually I thought the other was using the CFS scheduler as well I didn't think of it as having any relevance so I didn't look into that direction. But now it seems that the problem actually is related ck patchset and that I was using a kernel with ck patchset as well. I try to find the time to run xfsqa test 42 for my latest ck patchset kernel to know for sure. I just wanted you to know. It seems to me that this may well not been a problem with XFS at all. [1] http://oss.sgi.com/archives/xfs/2007-07/msg00038.html Regards, -- Martin 'Helios' Steigerwald - http://www.Lichtvoll.de GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7 From owner-xfs@oss.sgi.com Mon Aug 13 05:02:34 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 13 Aug 2007 05:02:45 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-6.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_46, RCVD_IN_DNSWL_MED,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7DC2Ubm026311 for ; Mon, 13 Aug 2007 05:02:34 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l7DC1cSc000427; Mon, 13 Aug 2007 08:01:38 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7DC1b3i021055; Mon, 13 Aug 2007 08:01:37 -0400 Received: from tleilax.poochiereds.net (vpn-14-148.rdu.redhat.com [10.11.14.148]) by pobox.corp.redhat.com (8.13.1/8.13.1) with SMTP id l7DC1ZLp030642; Mon, 13 Aug 2007 08:01:35 -0400 Date: Mon, 13 Aug 2007 08:01:34 -0400 From: Jeff Layton To: Christoph Hellwig Cc: Trond Myklebust , Andrew Morton , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com Subject: Re: [PATCH 00/25] move handling of setuid/gid bits from VFS into individual setattr functions (RESEND) Message-Id: <20070813080134.f770814b.jlayton@redhat.com> In-Reply-To: <20070811025739.GA21244@infradead.org> References: <200708061354.l76Ds3mU002255@dantu.rdu.redhat.com> <20070807171501.e31c4a97.akpm@linux-foundation.org> <1186533934.6625.91.camel@heimdal.trondhjem.org> <20070810164752.23117e0e.jlayton@redhat.com> <20070811025739.GA21244@infradead.org> X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.14; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12557 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jlayton@redhat.com Precedence: bulk X-list: xfs On Sat, 11 Aug 2007 03:57:39 +0100 Christoph Hellwig wrote: > > I like the idea of checking ia_valid after return a lot. But instead of > going BUG() it should just do the default action, that we can avoid > touching all the filesystem and only need to change those that need > special care. I also have plans to add some new AT_ flags for implementing > some filesystem ioctl in generic code that would benefit greatly from > the ia_valid checkin after return to return ENOTTY fr filesystems not > implementing those ioctls. That sounds good (if I follow your meaning correctly). How about something like the patch below? If either ATTR_KILL bit is set after the setattr, try to handle them in the "standard" way with a second setattr call. It also does a printk in this situation to alert filesystem developers that they should convert to the "new" scheme, so they can avoid this second setattr call. If this idea seems sound then I'll start the grunt work to fix up the in-tree filesystems so that they don't need the second setattr call. Signed-off-by: Jeff Layton commit 521ada37ab165d9d0a12dfb59a631a2ec58a8f84 Author: Jeff Layton Date: Mon Aug 13 07:43:56 2007 -0400 VFS: move ATTR_KILL handling from notify_change into helper function Separate the handling of the local ia_valid bitmask from the one in attr->ia_valid. This allows us to hand off the actual handling of the ATTR_KILL_* flags to the .setattr i_op when one is defined. notify_change still needs to process those flags for the local ia_valid variable, since it uses that to decide whether to return early, and to pass a (hopefully) appropriate bitmask to fsnotify_change. Also, check the ia_valid after the setattr op returns and see if either ATTR_KILL_* bit is set. If so, then throw a warning and try to clear the bits in the "standard" way. This should help us to catch filesystems that don't handle these bits correctly without breaking them outright. diff --git a/fs/attr.c b/fs/attr.c index f8dfc22..7cbb883 100644 --- a/fs/attr.c +++ b/fs/attr.c @@ -100,15 +100,53 @@ int inode_setattr(struct inode * inode, struct iattr * attr) } EXPORT_SYMBOL(inode_setattr); +/** + * generic_attrkill - helper to convert ATTR_KILL_* bits into mode change + * @mode: current mode of inode + * @attr: inode attribute changes requested by VFS + * Context: anywhere + * + * This is a helper function to convert ATTR_KILL_SUID and ATTR_KILL_SGID + * into a mode change. Filesystems should call this from their setattr + * inode op when they want "conventional" setuid-clearing behavior. + * + * Filesystems that declare a setattr inode operation are now expected to + * handle the ATTR_KILL_SUID and ATTR_KILL_SGID bits appropriately. The VFS + * no longer automatically converts these bits to a mode change for + * inodes that have their own setattr operation. + **/ +void generic_attrkill(mode_t mode, struct iattr *attr) +{ + if (attr->ia_valid & ATTR_KILL_SUID) { + attr->ia_valid &= ~ATTR_KILL_SUID; + if (mode & S_ISUID) { + if (!(attr->ia_valid & ATTR_MODE)) { + attr->ia_valid |= ATTR_MODE; + attr->ia_mode = mode; + } + attr->ia_mode &= ~S_ISUID; + } + } + if (attr->ia_valid & ATTR_KILL_SGID) { + attr->ia_valid &= ~ATTR_KILL_SGID; + if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) { + if (!(attr->ia_valid & ATTR_MODE)) { + attr->ia_valid |= ATTR_MODE; + attr->ia_mode = mode; + } + attr->ia_mode &= ~S_ISGID; + } + } +} +EXPORT_SYMBOL(generic_attrkill); + int notify_change(struct dentry * dentry, struct iattr * attr) { struct inode *inode = dentry->d_inode; - mode_t mode; - int error; + int error, once = 0; struct timespec now; unsigned int ia_valid = attr->ia_valid; - mode = inode->i_mode; now = current_fs_time(inode->i_sb); attr->ia_ctime = now; @@ -117,36 +155,48 @@ int notify_change(struct dentry * dentry, struct iattr * attr) if (!(ia_valid & ATTR_MTIME_SET)) attr->ia_mtime = now; if (ia_valid & ATTR_KILL_SUID) { - attr->ia_valid &= ~ATTR_KILL_SUID; - if (mode & S_ISUID) { - if (!(ia_valid & ATTR_MODE)) { - ia_valid = attr->ia_valid |= ATTR_MODE; - attr->ia_mode = inode->i_mode; - } - attr->ia_mode &= ~S_ISUID; - } + ia_valid &= ~ATTR_KILL_SUID; + if (inode->i_mode & S_ISUID) + ia_valid |= ATTR_MODE; } if (ia_valid & ATTR_KILL_SGID) { - attr->ia_valid &= ~ ATTR_KILL_SGID; - if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) { - if (!(ia_valid & ATTR_MODE)) { - ia_valid = attr->ia_valid |= ATTR_MODE; - attr->ia_mode = inode->i_mode; - } - attr->ia_mode &= ~S_ISGID; - } + ia_valid &= ~ATTR_KILL_SGID; + if ((inode->i_mode & (S_ISGID | S_IXGRP)) == + (S_ISGID | S_IXGRP)) + ia_valid |= ATTR_MODE; } - if (!attr->ia_valid) + if (!ia_valid) return 0; if (ia_valid & ATTR_SIZE) down_write(&dentry->d_inode->i_alloc_sem); if (inode->i_op && inode->i_op->setattr) { +try_again: error = security_inode_setattr(dentry, attr); if (!error) error = inode->i_op->setattr(dentry, attr); + /* + * if ATTR_KILL_SUID or ATTR_KILL_SGID is still set, then + * assume that the setattr inode op didn't handle them + * correctly. Try to clear these bits the standard way + * and throw a warning. + */ + if (!error && !once && unlikely(attr->ia_valid & + (ATTR_KILL_SUID|ATTR_KILL_SGID))) { + attr->ia_valid &= + (ATTR_MODE|ATTR_KILL_SUID|ATTR_KILL_SGID); + generic_attrkill(inode->i_mode, attr); + once = 1; + if (printk_ratelimit()) + printk(KERN_ERR "%s: %s doesn't seem to " + "handle setuid/setgid bit clearing " + "correctly.\n" + __func__, inode->i_sb->s_type->name); + goto try_again; + } } else { + generic_attrkill(inode->i_mode, attr); error = inode_change_ok(inode, attr); if (!error) error = security_inode_setattr(dentry, attr); diff --git a/include/linux/fs.h b/include/linux/fs.h index 6bf1395..daac0e5 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1561,6 +1561,7 @@ extern int do_remount_sb(struct super_block *sb, int flags, #ifdef CONFIG_BLOCK extern sector_t bmap(struct inode *, sector_t); #endif +extern void generic_attrkill(mode_t mode, struct iattr *attr); extern int notify_change(struct dentry *, struct iattr *); extern int permission(struct inode *, int, struct nameidata *); extern int generic_permission(struct inode *, int, From owner-xfs@oss.sgi.com Mon Aug 13 05:37:07 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 13 Aug 2007 05:37:16 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-6.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_46, RCVD_IN_DNSWL_MED,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7DCb6bm001844 for ; Mon, 13 Aug 2007 05:37:06 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l7DCaJ7n021638; Mon, 13 Aug 2007 08:36:19 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7DCaIL8001567; Mon, 13 Aug 2007 08:36:18 -0400 Received: from tleilax.poochiereds.net (vpn-14-148.rdu.redhat.com [10.11.14.148]) by pobox.corp.redhat.com (8.13.1/8.13.1) with SMTP id l7DCaHif005013; Mon, 13 Aug 2007 08:36:17 -0400 Date: Mon, 13 Aug 2007 08:36:16 -0400 From: Jeff Layton To: Jeff Layton Cc: Christoph Hellwig , Trond Myklebust , Andrew Morton , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com Subject: Re: [PATCH 00/25] move handling of setuid/gid bits from VFS into individual setattr functions (RESEND) Message-Id: <20070813083616.642c7f27.jlayton@redhat.com> In-Reply-To: <20070813080134.f770814b.jlayton@redhat.com> References: <200708061354.l76Ds3mU002255@dantu.rdu.redhat.com> <20070807171501.e31c4a97.akpm@linux-foundation.org> <1186533934.6625.91.camel@heimdal.trondhjem.org> <20070810164752.23117e0e.jlayton@redhat.com> <20070811025739.GA21244@infradead.org> <20070813080134.f770814b.jlayton@redhat.com> X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.14; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12558 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jlayton@redhat.com Precedence: bulk X-list: xfs On Mon, 13 Aug 2007 08:01:34 -0400 Jeff Layton wrote: > On Sat, 11 Aug 2007 03:57:39 +0100 > Christoph Hellwig wrote: > > > > I like the idea of checking ia_valid after return a lot. But instead of > > going BUG() it should just do the default action, that we can avoid > > touching all the filesystem and only need to change those that need > > special care. I also have plans to add some new AT_ flags for implementing > > some filesystem ioctl in generic code that would benefit greatly from > > the ia_valid checkin after return to return ENOTTY fr filesystems not > > implementing those ioctls. > > That sounds good (if I follow your meaning correctly). How about > something like the patch below? If either ATTR_KILL bit is set after > the setattr, try to handle them in the "standard" way with a second > setattr call. It also does a printk in this situation to alert > filesystem developers that they should convert to the "new" scheme, > so they can avoid this second setattr call. > > If this idea seems sound then I'll start the grunt work to fix up the > in-tree filesystems so that they don't need the second setattr call. > The earlier patch has a misplaced comma and won't build. This one builds. This should be considered an RFC, as I've not yet done any real testing of this patch: Signed-off-by: Jeff Layton commit ad00450c4532da32718efe39e27d99060f04e396 Author: Jeff Layton Date: Mon Aug 13 08:33:10 2007 -0400 VFS: move ATTR_KILL handling from notify_change into helper function Separate the handling of the local ia_valid bitmask from the one in attr->ia_valid. This allows us to hand off the actual handling of the ATTR_KILL_* flags to the .setattr i_op when one is defined. notify_change still needs to process those flags for the local ia_valid variable, since it uses that to decide whether to return early, and to pass a (hopefully) appropriate bitmask to fsnotify_change. Also, check the ia_valid after the setattr op returns and see if either ATTR_KILL_* bit is set. If so, then throw a warning and try to clear the bits in the "standard" way. This should help us to catch filesystems that don't handle these bits correctly without breaking them outright. diff --git a/fs/attr.c b/fs/attr.c index f8dfc22..9585e45 100644 --- a/fs/attr.c +++ b/fs/attr.c @@ -100,15 +100,53 @@ int inode_setattr(struct inode * inode, struct iattr * attr) } EXPORT_SYMBOL(inode_setattr); +/** + * generic_attrkill - helper to convert ATTR_KILL_* bits into mode change + * @mode: current mode of inode + * @attr: inode attribute changes requested by VFS + * Context: anywhere + * + * This is a helper function to convert ATTR_KILL_SUID and ATTR_KILL_SGID + * into a mode change. Filesystems should call this from their setattr + * inode op when they want "conventional" setuid-clearing behavior. + * + * Filesystems that declare a setattr inode operation are now expected to + * handle the ATTR_KILL_SUID and ATTR_KILL_SGID bits appropriately. The VFS + * no longer automatically converts these bits to a mode change for + * inodes that have their own setattr operation. + **/ +void generic_attrkill(mode_t mode, struct iattr *attr) +{ + if (attr->ia_valid & ATTR_KILL_SUID) { + attr->ia_valid &= ~ATTR_KILL_SUID; + if (mode & S_ISUID) { + if (!(attr->ia_valid & ATTR_MODE)) { + attr->ia_valid |= ATTR_MODE; + attr->ia_mode = mode; + } + attr->ia_mode &= ~S_ISUID; + } + } + if (attr->ia_valid & ATTR_KILL_SGID) { + attr->ia_valid &= ~ATTR_KILL_SGID; + if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) { + if (!(attr->ia_valid & ATTR_MODE)) { + attr->ia_valid |= ATTR_MODE; + attr->ia_mode = mode; + } + attr->ia_mode &= ~S_ISGID; + } + } +} +EXPORT_SYMBOL(generic_attrkill); + int notify_change(struct dentry * dentry, struct iattr * attr) { struct inode *inode = dentry->d_inode; - mode_t mode; - int error; + int error, once = 0; struct timespec now; unsigned int ia_valid = attr->ia_valid; - mode = inode->i_mode; now = current_fs_time(inode->i_sb); attr->ia_ctime = now; @@ -117,36 +155,48 @@ int notify_change(struct dentry * dentry, struct iattr * attr) if (!(ia_valid & ATTR_MTIME_SET)) attr->ia_mtime = now; if (ia_valid & ATTR_KILL_SUID) { - attr->ia_valid &= ~ATTR_KILL_SUID; - if (mode & S_ISUID) { - if (!(ia_valid & ATTR_MODE)) { - ia_valid = attr->ia_valid |= ATTR_MODE; - attr->ia_mode = inode->i_mode; - } - attr->ia_mode &= ~S_ISUID; - } + ia_valid &= ~ATTR_KILL_SUID; + if (inode->i_mode & S_ISUID) + ia_valid |= ATTR_MODE; } if (ia_valid & ATTR_KILL_SGID) { - attr->ia_valid &= ~ ATTR_KILL_SGID; - if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) { - if (!(ia_valid & ATTR_MODE)) { - ia_valid = attr->ia_valid |= ATTR_MODE; - attr->ia_mode = inode->i_mode; - } - attr->ia_mode &= ~S_ISGID; - } + ia_valid &= ~ATTR_KILL_SGID; + if ((inode->i_mode & (S_ISGID | S_IXGRP)) == + (S_ISGID | S_IXGRP)) + ia_valid |= ATTR_MODE; } - if (!attr->ia_valid) + if (!ia_valid) return 0; if (ia_valid & ATTR_SIZE) down_write(&dentry->d_inode->i_alloc_sem); if (inode->i_op && inode->i_op->setattr) { +try_again: error = security_inode_setattr(dentry, attr); if (!error) error = inode->i_op->setattr(dentry, attr); + /* + * if ATTR_KILL_SUID or ATTR_KILL_SGID is still set, then + * assume that the setattr inode op didn't handle them + * correctly. Try to clear these bits the standard way + * and throw a warning. + */ + if (!error && !once && unlikely(attr->ia_valid & + (ATTR_KILL_SUID|ATTR_KILL_SGID))) { + attr->ia_valid &= + (ATTR_MODE|ATTR_KILL_SUID|ATTR_KILL_SGID); + generic_attrkill(inode->i_mode, attr); + once = 1; + if (printk_ratelimit()) + printk(KERN_ERR "%s: %s doesn't seem to " + "handle setuid/setgid bit clearing " + "correctly.\n", __func__, + inode->i_sb->s_type->name); + goto try_again; + } } else { + generic_attrkill(inode->i_mode, attr); error = inode_change_ok(inode, attr); if (!error) error = security_inode_setattr(dentry, attr); diff --git a/include/linux/fs.h b/include/linux/fs.h index 6bf1395..daac0e5 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1561,6 +1561,7 @@ extern int do_remount_sb(struct super_block *sb, int flags, #ifdef CONFIG_BLOCK extern sector_t bmap(struct inode *, sector_t); #endif +extern void generic_attrkill(mode_t mode, struct iattr *attr); extern int notify_change(struct dentry *, struct iattr *); extern int permission(struct inode *, int, struct nameidata *); extern int generic_permission(struct inode *, int, From owner-xfs@oss.sgi.com Mon Aug 13 10:25:35 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 13 Aug 2007 10:25:39 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=AWL,BAYES_05 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail.lichtvoll.de (mondschein.lichtvoll.de [194.150.191.11]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7DHPWbm031654 for ; Mon, 13 Aug 2007 10:25:35 -0700 Received: from localhost (dslb-084-056-067-250.pools.arcor-ip.net [84.56.67.250]) by mail.lichtvoll.de (Postfix) with ESMTP id CC89C5ADF2; Mon, 13 Aug 2007 19:30:59 +0200 (CEST) From: Martin Steigerwald To: linux-xfs@oss.sgi.com Subject: Re: xfs_fsr and null byte areas in files Date: Mon, 13 Aug 2007 19:25:35 +0200 User-Agent: KMail/1.9.7 Cc: ck@vds.kolivas.org References: <200707092313.48876.Martin@lichtvoll.de> <200707262309.24012.Martin@lichtvoll.de> <200708122229.40400.Martin@lichtvoll.de> (sfid-20070812_231250_500144_C3F8EC69) In-Reply-To: <200708122229.40400.Martin@lichtvoll.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708131925.35824.Martin@lichtvoll.de> X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12559 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: Martin@lichtvoll.de Precedence: bulk X-list: xfs Am Sonntag 12 August 2007 schrieb Martin Steigerwald: > > Hi! > > > > I ran test 42 and it completes successfully. > > Hello, > > I now read a post from someone who faced null byte areas in files after > xfs_fsr as well[1]. And he writes that this problem is related to the > ck patchset: > > http://bhhdoa.org.au/pipermail/ck/2007-August/008433.html > > It may well be that it is related to the ck patchset in my case as > well. I did not know the exact kernel version anymore when I was using > xfs_fsr, since it took me 2 weeks to actually find about this > corruption. Well and when I ran xfsqa test I had a slighly newer kernel > was using the CFS scheduler instead of the ck patchset. Actually I > thought the other was using the CFS scheduler as well I didn't think > of it as having any relevance so I didn't look into that direction. > > But now it seems that the problem actually is related ck patchset and > that I was using a kernel with ck patchset as well. I try to find the > time to run xfsqa test 42 for my latest ck patchset kernel to know for > sure. I ran test 42 on my last kernel with ck patchset - 2.6.21.3-tp42-ck2-sws2-2.2.10 - about 20 times, but it did not show any problem. Maybe I have to run it about a 1000 times, since about 0,1-0.5% of my files were affected when it failed and as it seems to me the tests only generates one fragmented file. Could it generate and check more fragmented files in one ago without to much work? Ciao, -- Martin 'Helios' Steigerwald - http://www.Lichtvoll.de GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7 From owner-xfs@oss.sgi.com Mon Aug 13 11:10:01 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 13 Aug 2007 11:10:05 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, FROM_STARTS_WITH_NUMS autolearn=no version=3.2.0-pre1-r499012 Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.191]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7DI9xbm012269 for ; Mon, 13 Aug 2007 11:10:01 -0700 Received: by rv-out-0910.google.com with SMTP id k20so973581rvb for ; Mon, 13 Aug 2007 11:10:04 -0700 (PDT) Received: by 10.140.207.2 with SMTP id e2mr2623391rvg.1187027131918; Mon, 13 Aug 2007 10:45:31 -0700 (PDT) Received: by 10.141.128.16 with HTTP; Mon, 13 Aug 2007 10:45:31 -0700 (PDT) Message-ID: Date: Mon, 13 Aug 2007 17:45:31 +0000 From: "Felix X" <01001101@femail.mine.nu> To: "Martin Steigerwald" Subject: Re: [ck] Re: xfs_fsr and null byte areas in files Cc: linux-xfs@oss.sgi.com, ck@vds.kolivas.org In-Reply-To: <200708131925.35824.Martin@lichtvoll.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200707092313.48876.Martin@lichtvoll.de> <200707262309.24012.Martin@lichtvoll.de> <200708122229.40400.Martin@lichtvoll.de> <200708131925.35824.Martin@lichtvoll.de> X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12560 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: 01001101@femail.mine.nu Precedence: bulk X-list: xfs Try my test procedure described at http://bugs.archlinux.org/task/7778 ; see if you can get it to happen with that. Running that procedure on a virtual machine with the -ck kernel version 2.6.22.1.ck1-2 got it to happen every time. ~Felix. On 8/13/07, Martin Steigerwald wrote: > Am Sonntag 12 August 2007 schrieb Martin Steigerwald: > > > > Hi! > > > > > > I ran test 42 and it completes successfully. > > > > Hello, > > > > I now read a post from someone who faced null byte areas in files after > > xfs_fsr as well[1]. And he writes that this problem is related to the > > ck patchset: > > > > http://bhhdoa.org.au/pipermail/ck/2007-August/008433.html > > > > It may well be that it is related to the ck patchset in my case as > > well. I did not know the exact kernel version anymore when I was using > > xfs_fsr, since it took me 2 weeks to actually find about this > > corruption. Well and when I ran xfsqa test I had a slighly newer kernel > > was using the CFS scheduler instead of the ck patchset. Actually I > > thought the other was using the CFS scheduler as well I didn't think > > of it as having any relevance so I didn't look into that direction. > > > > But now it seems that the problem actually is related ck patchset and > > that I was using a kernel with ck patchset as well. I try to find the > > time to run xfsqa test 42 for my latest ck patchset kernel to know for > > sure. > > I ran test 42 on my last kernel with ck patchset - > 2.6.21.3-tp42-ck2-sws2-2.2.10 - about 20 times, but it did not show any > problem. Maybe I have to run it about a 1000 times, since about 0,1-0.5% > of my files were affected when it failed and as it seems to me the tests > only generates one fragmented file. Could it generate and check more > fragmented files in one ago without to much work? > > Ciao, > -- > Martin 'Helios' Steigerwald - http://www.Lichtvoll.de > GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7 > _______________________________________________ > http://ck.kolivas.org/faqs/replying-to-mailing-list.txt > ck mailing list - mailto: ck@vds.kolivas.org > http://vds.kolivas.org/mailman/listinfo/ck > From owner-xfs@oss.sgi.com Mon Aug 13 18:05:41 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 13 Aug 2007 18:05:47 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-3.8 required=5.0 tests=ANY_BOUNCE_MESSAGE,BAYES_50, CRBOUNCE_MESSAGE,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.0-pre1-r499012 Received: from atlas.jabber.org (atlas.jabber.org [208.245.212.69]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7E15cbm026161 for ; Mon, 13 Aug 2007 18:05:40 -0700 Received: by atlas.jabber.org (Postfix, from userid 1005) id 3936921B1AC; Mon, 13 Aug 2007 19:48:29 -0500 (CDT) From: "Peter Saint-Andre" To: xfs@oss.sgi.com Subject: Please confirm (conf#317f31c5d92da0ad31f3e9fa6c2ef386) Date: Mon, 13 Aug 2007 19:48:29 CDT X-AskVersion: 2.5.2 (http://www.paganini.net/ask) X-ASK-Auth: 1187052509-bbc31fc9a7ded0e90ea0f25e1f4063b1 Precedence: bulk Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit In-Reply-To: <20070814004822.12DB421AA2A@atlas.jabber.org> Message-Id: <20070814004829.3936921B1AC@atlas.jabber.org> X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12561 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: stpeter@jabber.org Precedence: bulk X-list: xfs << IMPORTANT INFORMATION! >> This is an automated message. The message you sent (attached below) requires confirmation before it can be delivered. To confirm that you sent the message below, just hit the "R"eply button and send this message back (you don't need to edit anything). Once this is done, no more confirmations will be necessary. This email account is protected by: Active Spam Killer (ASK) V2.5.2 - (C) 2001-2004 by Marco Paganini For more information visit http://www.paganini.net/ask --- Original Message Follows --- From: xfs@oss.sgi.com To: stpeter@jabber.org Subject: Returned mail: Data format error (Original message truncated) From owner-xfs@oss.sgi.com Tue Aug 14 00:53:55 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 14 Aug 2007 00:53:59 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: **** X-Spam-Status: No, score=4.0 required=5.0 tests=BAYES_99 autolearn=no version=3.2.0-pre1-r499012 Received: from siliconindia.org (mail.siliconindia.org [72.52.77.20]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7E7rsbm001640 for ; Tue, 14 Aug 2007 00:53:55 -0700 Received: from siliconindia.org (localhost.localdomain [127.0.0.1]) by siliconindia.org (Postfix) with ESMTP id 8FDF7C45B for ; Mon, 13 Aug 2007 23:41:17 -0700 (PDT) Received: (from suresh@localhost) by siliconindia.org (8.13.1/8.13.1/Submit) id l7E6fHdW032270; Mon, 13 Aug 2007 23:41:17 -0700 X-Authentication-Warning: siliconindia.org: suresh set sender to sinet@siliconindia.net using -f To: linux-xfs@oss.sgi.com Subject: Invitation to join my SI network Date: Mon, 13 Aug 2007 23:41:17 -0700 From: Shruti Das Reply-to: sinet@siliconindia.org Message-ID: X-Priority: 3 X-Mailer: PHPMailer [version 1.73] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="iso-8859-1" X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12562 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sinet@siliconindia.net Precedence: bulk X-list: xfs Hi , I'd like to add you to my network on SiliconIndia. Once you join, you can see all my connections online and can contact them directly. It is a business network for your carrier, if you are thinking about your future and opportunities just pay a look, it’s easy to register and it can give you an edge that other don't have. Regards, Shruti Click on the link below to join the network of Shruti Das and start your own network: http://www.siliconindia.com/register.php?id=QlrCSUgo (Please note: Membership is through invitation only) Your Invitation ID: QlrCSUgo Note: If you encounter any problem while registration, please send an email to sinet@siliconindia.com. To subscribe to SI Dailydose e-newsletter click here http://www.siliconindia.com/newsletter/shownews.php ----------------------------------------------------------------------------------------- To unsubscribe from future mailing from SI, click here http://www.siliconindia.com/invitation/remove.php From owner-xfs@oss.sgi.com Tue Aug 14 18:48:36 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 14 Aug 2007 18:48:39 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7F1mWbm008772 for ; Tue, 14 Aug 2007 18:48:35 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id LAA01102; Wed, 15 Aug 2007 11:48:30 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 1161) id 73E3C58C1767; Wed, 15 Aug 2007 11:48:30 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: TAKE 968615 - xfs_repair - ag_stride not working as designed in Phase 4 Message-Id: <20070815014830.73E3C58C1767@chook.melbourne.sgi.com> Date: Wed, 15 Aug 2007 11:48:30 +1000 (EST) From: bnaujok@sgi.com (Barry Naujok) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12563 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: bnaujok@sgi.com Precedence: bulk X-list: xfs Fix up AG queuing order in phase 4 Date: Wed Aug 15 11:47:56 AEST 2007 Workarea: chook.melbourne.sgi.com:/home/bnaujok/isms/xfs-cmds Inspected by: tes@sgi.com The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/xfs-cmds/master-melb Modid: master-melb:xfs-cmds:29388a xfsprogs/repair/phase4.c - 1.24 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfsprogs/repair/phase4.c.diff?r1=text&tr1=1.24&r2=text&tr2=1.23&f=h - Fix up AG queuing order for prefetch in phase 4 From owner-xfs@oss.sgi.com Tue Aug 14 19:04:06 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 14 Aug 2007 19:04:08 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7F240bm013217 for ; Tue, 14 Aug 2007 19:04:04 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id MAA01484; Wed, 15 Aug 2007 12:04:00 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 1161) id 90ED858C1767; Wed, 15 Aug 2007 12:04:00 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: TAKE 968090 - xfs_repair fails when fsblock size is different do dir block size Message-Id: <20070815020400.90ED858C1767@chook.melbourne.sgi.com> Date: Wed, 15 Aug 2007 12:04:00 +1000 (EST) From: bnaujok@sgi.com (Barry Naujok) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12564 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: bnaujok@sgi.com Precedence: bulk X-list: xfs Fixed up I/O size when doing da_reads for directories Date: Wed Aug 15 12:03:26 AEST 2007 Workarea: chook.melbourne.sgi.com:/home/bnaujok/isms/xfs-cmds Inspected by: vapo@sgi.com The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/xfs-cmds/master-melb Modid: master-melb:xfs-cmds:29390a xfsprogs/repair/dir2.c - 1.24 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfsprogs/repair/dir2.c.diff?r1=text&tr1=1.24&r2=text&tr2=1.23&f=h xfsprogs/repair/prefetch.c - 1.5 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfsprogs/repair/prefetch.c.diff?r1=text&tr1=1.5&r2=text&tr2=1.4&f=h - Fixed up I/O size for directory blocks. From owner-xfs@oss.sgi.com Tue Aug 14 21:20:03 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 14 Aug 2007 21:20:18 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,BAYES_05,J_CHICKENPOX_65, SPF_HELO_PASS autolearn=no version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7F4K0bm016532 for ; Tue, 14 Aug 2007 21:20:03 -0700 Received: from Liberator.local (unknown [10.0.0.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 4EE1B1806FDB9 for ; Tue, 14 Aug 2007 23:20:03 -0500 (CDT) Message-ID: <46C27EF8.2020004@sandeen.net> Date: Tue, 14 Aug 2007 23:20:08 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: xfs-oss Subject: [PATCH] remove unused BULKSTAT_FG_INLINE Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12565 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs I was looking at xfs_bulkstat with an eye towards stack reduction, and came across this... doesn't help stack, but it doesn't appear that the BULKSTAT_FG_INLINE bulkstat is ever used... Is it there for a reason? If not here's a patch. Thanks, -Eric xfs_itable.c | 31 ++++++------------------------- xfs_itable.h | 1 - 2 files changed, 6 insertions(+), 26 deletions(-) ---- Remove unused BULKSTAT_FG_INLINE flag & associated code. Signed-off-by: Eric Sandeen di_core.di_version, ARCH_CONVERT))) return 0; - if (flags & BULKSTAT_FG_QUICK) { - *dipp = dip; - return 1; - } - /* BULKSTAT_FG_INLINE: if attr fork is local, or not there, use it */ - aformat = INT_GET(dip->di_core.di_aformat, ARCH_CONVERT); - if ((XFS_CFORK_Q(&dip->di_core) == 0) || - (aformat == XFS_DINODE_FMT_LOCAL) || - (aformat == XFS_DINODE_FMT_EXTENTS && !dip->di_core.di_anextents)) { - *dipp = dip; - return 1; - } + + /* BULKSTAT_FG_QUICK */ + *dipp = dip; return 1; } @@ -566,8 +559,7 @@ xfs_bulkstat( ((chunkidx & nimask) >> mp->m_sb.sb_inopblog); - if (flags & (BULKSTAT_FG_QUICK | - BULKSTAT_FG_INLINE)) { + if (flags & BULKSTAT_FG_QUICK) { ino = XFS_AGINO_TO_INO(mp, agno, agino); bno = XFS_AGB_TO_DADDR(mp, agno, @@ -615,22 +607,11 @@ xfs_bulkstat( if (!xfs_bulkstat_use_dinode(mp, flags, bp, clustidx, &dip)) continue; - /* - * If we need to do an iget, cannot hold bp. - * Drop it, until starting the next cluster. - */ - if ((flags & BULKSTAT_FG_INLINE) && !dip) { - if (bp) - xfs_buf_relse(bp); - bp = NULL; - } /* * Get the inode and fill in a single buffer. * BULKSTAT_FG_QUICK uses dip to fill it in. * BULKSTAT_FG_IGET uses igets. - * BULKSTAT_FG_INLINE uses dip if we have an - * inline attr fork, else igets. * See: xfs_bulkstat_one & xfs_dm_bulkstat_one. * This is also used to count inodes/blks, etc * in xfs_qm_quotacheck. Index: linux-2.6.22-rc4/fs/xfs/xfs_itable.h =================================================================== --- linux-2.6.22-rc4.orig/fs/xfs/xfs_itable.h +++ linux-2.6.22-rc4/fs/xfs/xfs_itable.h @@ -45,7 +45,6 @@ typedef int (*bulkstat_one_pf)(struct xf */ #define BULKSTAT_FG_IGET 0x1 /* Go through the buffer cache */ #define BULKSTAT_FG_QUICK 0x2 /* No iget, walk the dinode cluster */ -#define BULKSTAT_FG_INLINE 0x4 /* No iget if inline attrs */ /* * Return stat information in bulk (by-inode) for the filesystem. From owner-xfs@oss.sgi.com Tue Aug 14 21:47:51 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 14 Aug 2007 21:47:54 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,BAYES_05,J_CHICKENPOX_65, SPF_HELO_PASS autolearn=no version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7F4labm023136 for ; Tue, 14 Aug 2007 21:47:51 -0700 Received: from Liberator.local (unknown [10.0.0.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 2DDB61806FDB9 for ; Tue, 14 Aug 2007 23:47:41 -0500 (CDT) Message-ID: <46C28571.2060206@sandeen.net> Date: Tue, 14 Aug 2007 23:47:45 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: xfs-oss Subject: [PATCH V2] remove unused BULKSTAT_FG_INLINE References: <46C27EF8.2020004@sandeen.net> In-Reply-To: <46C27EF8.2020004@sandeen.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12566 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Eric Sandeen wrote: > I was looking at xfs_bulkstat with an eye towards stack reduction, > and came across this... doesn't help stack, but it doesn't appear > that the BULKSTAT_FG_INLINE bulkstat is ever used... > > Is it there for a reason? If not here's a patch. > > Thanks, > -Eric > > xfs_itable.c | 31 ++++++------------------------- > xfs_itable.h | 1 - > 2 files changed, 6 insertions(+), 26 deletions(-) > Oops, missed a now-unused var. --- Remove unused BULKSTAT_FG_INLINE flag & associated code. Signed-off-by: Eric Sandeen Index: linux-2.6.22-rc4/fs/xfs/xfs_itable.c =================================================================== --- linux-2.6.22-rc4.orig/fs/xfs/xfs_itable.c +++ linux-2.6.22-rc4/fs/xfs/xfs_itable.c @@ -271,7 +271,8 @@ xfs_bulkstat_use_dinode( xfs_dinode_t **dipp) { xfs_dinode_t *dip; - unsigned int aformat; + + ASSERT(flags & (BULKSTAT_FG_QUICK|BULKSTAT_FG_IGET)); *dipp = NULL; if (!bp || (flags & BULKSTAT_FG_IGET)) @@ -282,18 +283,9 @@ xfs_bulkstat_use_dinode( !XFS_DINODE_GOOD_VERSION( INT_GET(dip->di_core.di_version, ARCH_CONVERT))) return 0; - if (flags & BULKSTAT_FG_QUICK) { - *dipp = dip; - return 1; - } - /* BULKSTAT_FG_INLINE: if attr fork is local, or not there, use it */ - aformat = INT_GET(dip->di_core.di_aformat, ARCH_CONVERT); - if ((XFS_CFORK_Q(&dip->di_core) == 0) || - (aformat == XFS_DINODE_FMT_LOCAL) || - (aformat == XFS_DINODE_FMT_EXTENTS && !dip->di_core.di_anextents)) { - *dipp = dip; - return 1; - } + + /* BULKSTAT_FG_QUICK */ + *dipp = dip; return 1; } @@ -566,8 +558,7 @@ xfs_bulkstat( ((chunkidx & nimask) >> mp->m_sb.sb_inopblog); - if (flags & (BULKSTAT_FG_QUICK | - BULKSTAT_FG_INLINE)) { + if (flags & BULKSTAT_FG_QUICK) { ino = XFS_AGINO_TO_INO(mp, agno, agino); bno = XFS_AGB_TO_DADDR(mp, agno, @@ -615,22 +606,11 @@ xfs_bulkstat( if (!xfs_bulkstat_use_dinode(mp, flags, bp, clustidx, &dip)) continue; - /* - * If we need to do an iget, cannot hold bp. - * Drop it, until starting the next cluster. - */ - if ((flags & BULKSTAT_FG_INLINE) && !dip) { - if (bp) - xfs_buf_relse(bp); - bp = NULL; - } /* * Get the inode and fill in a single buffer. * BULKSTAT_FG_QUICK uses dip to fill it in. * BULKSTAT_FG_IGET uses igets. - * BULKSTAT_FG_INLINE uses dip if we have an - * inline attr fork, else igets. * See: xfs_bulkstat_one & xfs_dm_bulkstat_one. * This is also used to count inodes/blks, etc * in xfs_qm_quotacheck. Index: linux-2.6.22-rc4/fs/xfs/xfs_itable.h =================================================================== --- linux-2.6.22-rc4.orig/fs/xfs/xfs_itable.h +++ linux-2.6.22-rc4/fs/xfs/xfs_itable.h @@ -45,7 +45,6 @@ typedef int (*bulkstat_one_pf)(struct xf */ #define BULKSTAT_FG_IGET 0x1 /* Go through the buffer cache */ #define BULKSTAT_FG_QUICK 0x2 /* No iget, walk the dinode cluster */ -#define BULKSTAT_FG_INLINE 0x4 /* No iget if inline attrs */ /* * Return stat information in bulk (by-inode) for the filesystem. From owner-xfs@oss.sgi.com Tue Aug 14 22:06:51 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 14 Aug 2007 22:06:53 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_20,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7F56nbm027580 for ; Tue, 14 Aug 2007 22:06:51 -0700 Received: from Liberator.local (unknown [10.0.0.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id D24481806FDAE for ; Wed, 15 Aug 2007 00:06:54 -0500 (CDT) Message-ID: <46C289F4.1070502@sandeen.net> Date: Wed, 15 Aug 2007 00:07:00 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: xfs-oss Subject: Re: [PATCH V2] remove unused BULKSTAT_FG_INLINE References: <46C27EF8.2020004@sandeen.net> <46C28571.2060206@sandeen.net> In-Reply-To: <46C28571.2060206@sandeen.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12567 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Eric Sandeen wrote: > Eric Sandeen wrote: > >> I was looking at xfs_bulkstat with an eye towards stack reduction, >> and came across this... doesn't help stack, but it doesn't appear >> that the BULKSTAT_FG_INLINE bulkstat is ever used... >> >> Is it there for a reason? If not here's a patch. Ah hell. dmapi uses it in cvs... drat, foiled again. (there's also some stack savings to be had by removing the private_data bulkstat field... but dmapi uses that too) -Eric From owner-xfs@oss.sgi.com Wed Aug 15 00:25:06 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 15 Aug 2007 00:25:12 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7F7Oxbm004071 for ; Wed, 15 Aug 2007 00:25:05 -0700 Received: from linuxbuild.melbourne.sgi.com (linuxbuild.melbourne.sgi.com [134.14.54.115]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id RAA07778; Wed, 15 Aug 2007 17:24:59 +1000 From: donaldd@sgi.com Received: by linuxbuild.melbourne.sgi.com (Postfix, from userid 16365) id 061C52759E21; Wed, 15 Aug 2007 17:24:58 +1000 (EST) To: xfs@oss.sgi.com, sgi.bugs.xfs@engr.sgi.com Subject: TAKE 969187 - Fix xfs_quota disable, enable, off and remove commands Message-Id: <20070815072459.061C52759E21@linuxbuild.melbourne.sgi.com> Date: Wed, 15 Aug 2007 17:24:58 +1000 (EST) X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12568 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: donaldd@sgi.com Precedence: bulk X-list: xfs Fix xfs_quota disable, enable, off and remove commands. Fix provided by Utako Kusaka. Date: Wed Aug 15 17:23:44 AEST 2007 Workarea: linuxbuild.melbourne.sgi.com:/home/donaldd/isms/xfs-cmds Inspected by: utako@tnes.nec.co.jp The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/xfs-cmds/master-melb Modid: master-melb:xfs-cmds:29395a xfsprogs/doc/CHANGES - 1.245 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfsprogs/doc/CHANGES.diff?r1=text&tr1=1.245&r2=text&tr2=1.244&f=h xfsprogs/quota/state.c - 1.7 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfsprogs/quota/state.c.diff?r1=text&tr1=1.7&r2=text&tr2=1.6&f=h From owner-xfs@oss.sgi.com Wed Aug 15 16:33:53 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 15 Aug 2007 16:33:55 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: **** X-Spam-Status: No, score=4.5 required=5.0 tests=BAYES_99,J_CHICKENPOX_21, J_CHICKENPOX_47,J_CHICKENPOX_64,J_CHICKENPOX_82,RDNS_DYNAMIC autolearn=no version=3.2.0-pre1-r499012 Received: from jupiter.dnsdc9.com (62.72.232.72.static.reverse.ltdomains.com [72.232.72.62] (may be forged)) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7FNXpbm027895 for ; Wed, 15 Aug 2007 16:33:53 -0700 Received: from frozen89 by jupiter.dnsdc9.com with local (Exim 4.63) (envelope-from ) id 1ILTeU-00073Z-TN; Wed, 15 Aug 2007 20:55:54 -0400 Received: from 216.93.169.31 ([216.93.169.31]) (SquirrelMail authenticated user frozen89) by myspacetop5.com with HTTP; Wed, 15 Aug 2007 20:55:54 -0400 (EDT) Message-ID: <45394.216.93.169.31.1187225754.squirrel@myspacetop5.com> Date: Wed, 15 Aug 2007 20:55:54 -0400 (EDT) Subject: Job Proposal From: "Daniel Gerrad" Reply-To: danielgerrad@aol.com User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - jupiter.dnsdc9.com X-AntiAbuse: Original Domain - oss.sgi.com X-AntiAbuse: Originator/Caller UID/GID - [32300 32002] / [47 12] X-AntiAbuse: Sender Address Domain - gmail.com X-Source: /usr/local/cpanel/3rdparty/bin/php X-Source-Args: /usr/local/cpanel/3rdparty/bin/php /usr/local/cpanel/base/3rdparty/squirrelmail/src/compose.php X-Source-Dir: :/base/3rdparty/squirrelmail/src To: undisclosed-recipients:; X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12569 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: danielgerrad1@gmail.com Precedence: bulk X-list: xfs Good day, I'm Mr Daniel Gerrad and I own a company Based on Chinese and African textile and fabric material in the UK,I'm in search for a trustworthy representative in Canada that can help as a link between me and my clients over there.I just reviewed your email through my email search I would like to know if your are interested to work from home for us DL ARTS COMPANY LIMITED . I Urgently need a representative in Canada,work online from home and get paid weekly without leaving or affecting your present job? My Company produces various clothing materials, batiks,assorted fabrics and traditional costumes.We have clients we supply weekly in the UK and my clients make payments for our supplies every week in form of online transfer which will take 45days to be credited here if it is transferred here directly,so I need a honest and sincere individual in the UK to work as my representative and assist me in processing the payments from our clients and I will pay him/her 10% per each payment recieved on my behalf,your likely to recieve 6 payments per week,minimum of 4. HAVE AN IDEA OF WHAT YOUR EXPECTED TO TAKE CARE OFF ----------------------------------------------------- Receive payments from my patronizing customers in Canada on my behalf i, then deduct 10% from the total funds received as your workmanship and forward the balance to me Via Western Union Money Transfer.(the transfer charges should also be deducted from the total amount your sending to me). Sheryl Shavers (my former representative has moved to Germany with her family) Our payments will be issued out in your name and sent to your address. So all I need is to forward your information to my numerous customers in Canada and I will contact you before they issue payment to you. Hope to get a favourable reply, if accepted to be my rep and get back to me with the following informations in this format. Full: Name : full Address : Tel number : Sex : Age : <> I will need this informations from you for my record,also if you require more information, do not hesitate to contact me,i will give you a call asap. Thanks. MR. Daniel Gerrad Managing Director DL ARTS LIMITED. From owner-xfs@oss.sgi.com Wed Aug 15 16:45:50 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 15 Aug 2007 16:45:52 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: **** X-Spam-Status: No, score=4.5 required=5.0 tests=BAYES_99,J_CHICKENPOX_21, J_CHICKENPOX_47,J_CHICKENPOX_64,J_CHICKENPOX_82,RDNS_DYNAMIC autolearn=no version=3.2.0-pre1-r499012 Received: from jupiter.dnsdc9.com (62.72.232.72.static.reverse.ltdomains.com [72.232.72.62] (may be forged)) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7FNjmbm031402 for ; Wed, 15 Aug 2007 16:45:49 -0700 Received: from frozen89 by jupiter.dnsdc9.com with local (Exim 4.63) (envelope-from ) id 1ILT5e-0003Th-0b; Wed, 15 Aug 2007 20:19:54 -0400 Received: from 216.93.169.31 ([216.93.169.31]) (SquirrelMail authenticated user frozen89) by myspacetop5.com with HTTP; Wed, 15 Aug 2007 20:19:54 -0400 (EDT) Message-ID: <33638.216.93.169.31.1187223594.squirrel@myspacetop5.com> Date: Wed, 15 Aug 2007 20:19:54 -0400 (EDT) Subject: Job Proposal From: "Daniel Gerrad" Reply-To: danielgerrad@aol.com User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - jupiter.dnsdc9.com X-AntiAbuse: Original Domain - oss.sgi.com X-AntiAbuse: Originator/Caller UID/GID - [32300 32002] / [47 12] X-AntiAbuse: Sender Address Domain - gmail.com X-Source: /usr/local/cpanel/3rdparty/bin/php X-Source-Args: /usr/local/cpanel/3rdparty/bin/php /usr/local/cpanel/base/3rdparty/squirrelmail/src/compose.php X-Source-Dir: :/base/3rdparty/squirrelmail/src To: undisclosed-recipients:; X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12570 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: danielgerrad1@gmail.com Precedence: bulk X-list: xfs Good day, I'm Mr Daniel Gerrad and I own a company Based on Chinese and African textile and fabric material in the UK,I'm in search for a trustworthy representative in Canada that can help as a link between me and my clients over there.I just reviewed your email through my email search I would like to know if your are interested to work from home for us DL ARTS COMPANY LIMITED . I Urgently need a representative in Canada,work online from home and get paid weekly without leaving or affecting your present job? My Company produces various clothing materials, batiks,assorted fabrics and traditional costumes.We have clients we supply weekly in the UK and my clients make payments for our supplies every week in form of online transfer which will take 45days to be credited here if it is transferred here directly,so I need a honest and sincere individual in the UK to work as my representative and assist me in processing the payments from our clients and I will pay him/her 10% per each payment recieved on my behalf,your likely to recieve 6 payments per week,minimum of 4. HAVE AN IDEA OF WHAT YOUR EXPECTED TO TAKE CARE OFF ----------------------------------------------------- Receive payments from my patronizing customers in Canada on my behalf i, then deduct 10% from the total funds received as your workmanship and forward the balance to me Via Western Union Money Transfer.(the transfer charges should also be deducted from the total amount your sending to me). Sheryl Shavers (my former representative has moved to Germany with her family) Our payments will be issued out in your name and sent to your address. So all I need is to forward your information to my numerous customers in Canada and I will contact you before they issue payment to you. Hope to get a favourable reply, if accepted to be my rep and get back to me with the following informations in this format. Full: Name : full Address : Tel number : Sex : Age : <> I will need this informations from you for my record,also if you require more information, do not hesitate to contact me,i will give you a call asap. Thanks. MR. Daniel Gerrad Managing Director DL ARTS LIMITED. From owner-xfs@oss.sgi.com Wed Aug 15 21:31:22 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 15 Aug 2007 21:31:25 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_MED, SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7G4VJbm004337 for ; Wed, 15 Aug 2007 21:31:22 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l7G428X1030225 for ; Thu, 16 Aug 2007 00:02:08 -0400 Received: from pobox-2.corp.redhat.com (pobox-2.corp.redhat.com [10.11.255.15]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7G428rQ027228 for ; Thu, 16 Aug 2007 00:02:08 -0400 Received: from Liberator.local (sebastian-int.corp.redhat.com [172.16.52.221]) by pobox-2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7G427us016409 for ; Thu, 16 Aug 2007 00:02:08 -0400 Message-ID: <46C3CC46.8030005@redhat.com> Date: Wed, 15 Aug 2007 23:02:14 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: xfs-oss Subject: xfsprogs/xfsdump: what flavor of GPL...? Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12571 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@redhat.com Precedence: bulk X-list: xfs Fedora is making a push to clarify licensing on all packages - GPL+, GPLv2, GPLv2+, GPLv3, GPLv3+, LGPLv2, LGPLv2+, LGPLv3, LGPLv3+ are the acceptable license tags for rpm packaging at this point. ("+" means "or later"). Looking, for example, at mkfs/xfs_mkfs.c: * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. it makes no mention of GPL _version_. With all the ruckus lately over GPLv3, could sgi please clarify? Since the included COPYING file says LGPL 2.1 and GPL2, I assume that LGPLv2 and GPLv2 are appropriate for the package. It'd be tedious, but you may wish to specify exactly which version of the license in the actual source files... Thanks, -Eric From owner-xfs@oss.sgi.com Thu Aug 16 13:04:18 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 16 Aug 2007 13:04:22 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL,BAYES_50,J_BACKHAIR_13, RCVD_IN_DNSWL_MED,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7GK4Gbm005200 for ; Thu, 16 Aug 2007 13:04:17 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l7GJM6pm009528; Thu, 16 Aug 2007 15:22:06 -0400 Received: from lacrosse.corp.redhat.com (lacrosse.corp.redhat.com [172.16.52.154]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7GJM6xU005654; Thu, 16 Aug 2007 15:22:06 -0400 Received: from [10.15.80.10] (neon.msp.redhat.com [10.15.80.10]) by lacrosse.corp.redhat.com (8.12.11.20060308/8.11.6) with ESMTP id l7GJM3r9008752; Thu, 16 Aug 2007 15:22:06 -0400 Message-ID: <46C4A33C.9000701@sandeen.net> Date: Thu, 16 Aug 2007 14:19:24 -0500 From: Eric Sandeen User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: xfs mailing list CC: Vlad Apostolov Subject: [PATCH] (fill-in-the-blank) : missing modes on O_CREAT opens Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12572 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs F8 now refuses to build anything that does an open("foo", O_CREAT); with no mode specified... Vlad, could you please fill in the /* mode */ blanks below? :) I think I caught them all... Thanks, -Eric Index: xfsdump-2.2.45/inventory/inv_fstab.c =================================================================== --- xfsdump-2.2.45.orig/inventory/inv_fstab.c +++ xfsdump-2.2.45/inventory/inv_fstab.c @@ -96,7 +96,7 @@ fstab_put_entry( uuid_t *fsidp, char *mn if ( errno != ENOENT ) { return -1; } - if ((fd = open( INV_FSTAB, INV_OFLAG(forwhat) | O_CREAT )) + if ((fd = open( INV_FSTAB, INV_OFLAG(forwhat) | O_CREAT, /* mode */ )) < 0 ) { INV_PERROR ( INV_FSTAB ); return -1; Index: xfsdump-2.2.45/inventory/inv_idx.c =================================================================== --- xfsdump-2.2.45.orig/inventory/inv_idx.c +++ xfsdump-2.2.45/inventory/inv_idx.c @@ -257,7 +257,7 @@ idx_create( char *fname, inv_oflag_t for the db for SEARCH_ONLY. */ ASSERT( forwhat != INV_SEARCH_ONLY ); - if ((fd = open ( fname , INV_OFLAG(forwhat) | O_CREAT ) ) < 0 ) { + if ((fd = open ( fname , INV_OFLAG(forwhat) | O_CREAT, /* mode */ ) ) < 0 ) { INV_PERROR ( fname ); return INV_TOKEN_NULL; } Index: xfsdump-2.2.45/inventory/inv_mgr.c =================================================================== --- xfsdump-2.2.45.orig/inventory/inv_mgr.c +++ xfsdump-2.2.45/inventory/inv_mgr.c @@ -692,7 +692,7 @@ invmgr_lockinit( void ) { if ( invlock_fd == -1 ) { if (( invlock_fd = open( INV_LOCKFILE, - O_RDONLY | O_CREAT )) < 0 ) { + O_RDONLY | O_CREAT, /* mode */ )) < 0 ) { INV_PERROR( INV_LOCKFILE ); return BOOL_FALSE; } Index: xfsdump-2.2.45/inventory/inv_oref.c =================================================================== --- xfsdump-2.2.45.orig/inventory/inv_oref.c +++ xfsdump-2.2.45/inventory/inv_oref.c @@ -429,7 +429,7 @@ oref_resolve_new_invidx( int stobjfd, fd; inv_idbtoken_t tok; - if ((fd = open ( fname , O_RDWR | O_CREAT ) ) < 0 ) { + if ((fd = open ( fname , O_RDWR | O_CREAT, /* mode */ ) ) < 0 ) { INV_PERROR ( fname ); return INV_ERR; } Index: xfsdump-2.2.45/inventory/inv_stobj.c =================================================================== --- xfsdump-2.2.45.orig/inventory/inv_stobj.c +++ xfsdump-2.2.45/inventory/inv_stobj.c @@ -527,7 +527,7 @@ stobj_create( char *fname ) #endif /* create the new storage object */ - if (( fd = open( fname, INV_OFLAG(forwhat) | O_EXCL | O_CREAT )) < 0 ) { + if (( fd = open( fname, INV_OFLAG(forwhat) | O_EXCL | O_CREAT, /* mode */ )) < 0 ) { INV_PERROR ( fname ); memset( fname, 0, INV_STRLEN ); return -1; @@ -1083,7 +1083,7 @@ stobj_unpack_sessinfo( #ifdef INVT_DELETION { - int tmpfd = open( "moids", O_RDWR | O_CREAT ); + int tmpfd = open( "moids", O_RDWR | O_CREAT, /* mode */ ); u_int j; invt_mediafile_t *mmf = s->mfiles; for (i=0; i< s->ses->s_cur_nstreams; i++ ) { Index: xfsdump-2.2.45/invutil/invidx.c =================================================================== --- xfsdump-2.2.45.orig/invutil/invidx.c +++ xfsdump-2.2.45/invutil/invidx.c @@ -275,7 +275,7 @@ invidx_commit(WINDOW *win, node_t *curre return 0; } - new_fd = open(dst_idxfile, O_CREAT|O_RDWR); + new_fd = open(dst_idxfile, O_CREAT|O_RDWR, /* mode */); if(new_fd < 0) { put_error("Error: unable to open inventory index file"); return 0; @@ -616,7 +616,7 @@ stobj_create( char *fname ) invt_sescounter_t sescnt; /* create the new storage object */ - if (( fd = open( fname, O_RDWR | O_EXCL | O_CREAT )) < 0 ) { + if (( fd = open( fname, O_RDWR | O_EXCL | O_CREAT, /* mode */ )) < 0 ) { return -1; } From owner-xfs@oss.sgi.com Fri Aug 17 06:44:20 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 17 Aug 2007 06:44:23 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7HDiJbm021242 for ; Fri, 17 Aug 2007 06:44:20 -0700 Received: from Liberator.local (unknown [10.0.0.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 0A3221806FDB9; Fri, 17 Aug 2007 08:44:24 -0500 (CDT) Message-ID: <46C5A63E.5070906@sandeen.net> Date: Fri, 17 Aug 2007 08:44:30 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Eric Sandeen CC: xfs-oss Subject: Re: xfsprogs/xfsdump: what flavor of GPL...? References: <46C3CC46.8030005@redhat.com> In-Reply-To: <46C3CC46.8030005@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12573 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Eric Sandeen wrote: > Fedora is making a push to clarify licensing on all packages - > > GPL+, GPLv2, GPLv2+, GPLv3, GPLv3+, LGPLv2, LGPLv2+, LGPLv3, LGPLv3+ > > are the acceptable license tags for rpm packaging at this point. ("+" > means "or later"). Of course, the tag I put on the package is in no way binding for sgi - it's just supposed to reflect the license inside. But it does point out a bit of confusion now that gplv3 is on the scene. I'll follow fedora guidelines & put GPL+ and LGPLv2+ in the field for now; when I get clarification from SGI I'll fix up if needed. Thanks, -Eric > Looking, for example, at mkfs/xfs_mkfs.c: > > * This program is free software; you can redistribute it and/or > * modify it under the terms of the GNU General Public License as > * published by the Free Software Foundation. > > it makes no mention of GPL _version_. > > With all the ruckus lately over GPLv3, could sgi please clarify? Since > the included COPYING file says LGPL 2.1 and GPL2, I assume that LGPLv2 > and GPLv2 are appropriate for the package. > > It'd be tedious, but you may wish to specify exactly which version of > the license in the actual source files... > > Thanks, > > -Eric > > From owner-xfs@oss.sgi.com Sat Aug 18 13:04:15 2007 Received: with ECARTIS (v1.0.0; list xfs); Sat, 18 Aug 2007 13:04:18 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=AWL,BAYES_50,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7IK4Ebm027875 for ; Sat, 18 Aug 2007 13:04:15 -0700 Received: from Liberator.local (unknown [10.0.0.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 18D1618DF93B1 for ; Sat, 18 Aug 2007 15:04:19 -0500 (CDT) Message-ID: <46C750C9.8040604@sandeen.net> Date: Sat, 18 Aug 2007 15:04:25 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: xfs-oss Subject: [PATCH] make xfs stats Kconfigurable Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12574 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Hey guys, what do you think, is it worth doing this for when space is tight: xfs stats are already optional based on CONFIG_PROC_FS, and there is already a (never-set) macro XFS_STATS_OFF which can turn them off. Making it a configurable option, if I turn them off I can get a little stack savings on x86, gcc 4.1: xfs_attr_list -8 xfs_bmap_rtalloc -16 xfs_bmap_search_extents -8 xfs_buf_find +8 (not sure why) xfs_iflush -4 xfs_imap -12 xfs_log_reserve -4 xfs_log_sync -8 It'd reduce the size of the binary a bit too. Signed-off-by: Eric Sandeen Index: linux-2.6.22.i386/fs/xfs/Kconfig =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/Kconfig +++ linux-2.6.22.i386/fs/xfs/Kconfig @@ -59,6 +59,17 @@ config XFS_POSIX_ACL If you don't know what Access Control Lists are, say N. + config XFS_STATS + bool "XFS statistics" + depends on XFS_FS && PROC_FS + help + If you say Y here xfs will gather detailed statistics during + its operation, and present them in /proc/fs/xfs/stat and + (CONFIG_XFS_QUOTA is enabled) /proc/fs/xfs/xqmstat. Disabling + this will make the compiled code and stack usage slightly smaller. + + If unsure, say Y. + config XFS_RT bool "XFS Realtime subvolume support" depends on XFS_FS Index: linux-2.6.22.i386/fs/xfs/Makefile-linux-2.6 =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/Makefile-linux-2.6 +++ linux-2.6.22.i386/fs/xfs/Makefile-linux-2.6 @@ -35,12 +35,12 @@ xfs-$(CONFIG_XFS_QUOTA) += $(addprefix xfs_qm.o) ifeq ($(CONFIG_XFS_QUOTA),y) -xfs-$(CONFIG_PROC_FS) += quota/xfs_qm_stats.o +xfs-$(CONFIG_XFS_STAT) += quota/xfs_qm_stats.o endif xfs-$(CONFIG_XFS_RT) += xfs_rtalloc.o xfs-$(CONFIG_XFS_POSIX_ACL) += xfs_acl.o -xfs-$(CONFIG_PROC_FS) += $(XFS_LINUX)/xfs_stats.o +xfs-$(CONFIG_XFS_STATS) += $(XFS_LINUX)/xfs_stats.o xfs-$(CONFIG_SYSCTL) += $(XFS_LINUX)/xfs_sysctl.o xfs-$(CONFIG_COMPAT) += $(XFS_LINUX)/xfs_ioctl32.o Index: linux-2.6.22.i386/fs/xfs/linux-2.6/xfs_stats.h =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/linux-2.6/xfs_stats.h +++ linux-2.6.22.i386/fs/xfs/linux-2.6/xfs_stats.h @@ -19,7 +19,7 @@ #define __XFS_STATS_H__ -#if defined(CONFIG_PROC_FS) && !defined(XFS_STATS_OFF) +#if defined(CONFIG_XFS_STATS) #include @@ -137,8 +137,7 @@ DECLARE_PER_CPU(struct xfsstats, xfsstat extern void xfs_init_procfs(void); extern void xfs_cleanup_procfs(void); - -#else /* !CONFIG_PROC_FS */ +#else /* !CONFIG_XFS_STATS */ # define XFS_STATS_INC(count) # define XFS_STATS_DEC(count) @@ -147,6 +146,6 @@ extern void xfs_cleanup_procfs(void); static __inline void xfs_init_procfs(void) { }; static __inline void xfs_cleanup_procfs(void) { }; -#endif /* !CONFIG_PROC_FS */ +#endif /* !CONFIG_XFS_STATS */ #endif /* __XFS_STATS_H__ */ Index: linux-2.6.22.i386/fs/xfs/linux-2.6/xfs_sysctl.c =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/linux-2.6/xfs_sysctl.c +++ linux-2.6.22.i386/fs/xfs/linux-2.6/xfs_sysctl.c @@ -21,7 +21,7 @@ static struct ctl_table_header *xfs_table_header; -#ifdef CONFIG_PROC_FS +#ifdef CONFIG_XFS_STATS STATIC int xfs_stats_clear_proc_handler( ctl_table *ctl, @@ -52,7 +52,7 @@ xfs_stats_clear_proc_handler( return ret; } -#endif /* CONFIG_PROC_FS */ +#endif /* CONFIG_XFS_STATS */ static ctl_table xfs_table[] = { { @@ -222,7 +222,7 @@ static ctl_table xfs_table[] = { .extra2 = &xfs_params.fstrm_timer.max, }, /* please keep this the last entry */ -#ifdef CONFIG_PROC_FS +#ifdef CONFIG_XFS_STATS { .ctl_name = XFS_STATS_CLEAR, .procname = "stats_clear", Index: linux-2.6.22.i386/fs/xfs/quota/xfs_qm_stats.h =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/quota/xfs_qm_stats.h +++ linux-2.6.22.i386/fs/xfs/quota/xfs_qm_stats.h @@ -18,7 +18,7 @@ #ifndef __XFS_QM_STATS_H__ #define __XFS_QM_STATS_H__ -#if defined(CONFIG_PROC_FS) && !defined(XFS_STATS_OFF) +#ifdef CONFIG_XFS_STATS /* * XQM global statistics From owner-xfs@oss.sgi.com Sat Aug 18 14:19:43 2007 Received: with ECARTIS (v1.0.0; list xfs); Sat, 18 Aug 2007 14:19:47 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7ILJebm009572 for ; Sat, 18 Aug 2007 14:19:42 -0700 Received: from Liberator.local (unknown [10.0.0.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 184BE18DF93BA for ; Sat, 18 Aug 2007 16:19:46 -0500 (CDT) Message-ID: <46C7627A.60503@sandeen.net> Date: Sat, 18 Aug 2007 16:19:54 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: xfs-oss Subject: [PATCH] optimize XFS_IS_REALTIME_INODE w/o realtime config Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12575 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Use XFS_IS_REALTIME_INODE in more places, and #define it to 0 if CONFIG_XFS_RT is off. This should be safe because mount checks in xfs_rtmount_init: # define xfs_rtmount_init(m) (((mp)->m_sb.sb_rblocks == 0)? 0 : (ENOSYS)) so if we get mounted w/o CONFIG_XFS_RT, no realtime inodes should be encountered after that. Defining XFS_IS_REALTIME_INODE to 0 saves a bit of stack space, presumeably gcc can optimize around the various "if (0)" type checks: xfs_alloc_file_space -8 xfs_bmap_adjacent -16 xfs_bmapi -8 xfs_bmap_rtalloc -16 xfs_bunmapi -28 xfs_free_file_space -64 xfs_imap +8 <-- ? hmm. xfs_iomap_write_direct -12 xfs_qm_dqusage_adjust -4 xfs_qm_vop_chown_reserve -4 Compile tested only at this point. Signed-off-by: Eric Sandeen Index: linux-2.6.22.i386/fs/xfs/xfs_rtalloc.h =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/xfs_rtalloc.h +++ linux-2.6.22.i386/fs/xfs/xfs_rtalloc.h @@ -21,8 +21,6 @@ struct xfs_mount; struct xfs_trans; -#define XFS_IS_REALTIME_INODE(ip) ((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME) - /* Min and max rt extent sizes, specified in bytes */ #define XFS_MAX_RTEXTSIZE (1024 * 1024 * 1024) /* 1GB */ #define XFS_DFL_RTEXTSIZE (64 * 1024) /* 64KB */ Index: linux-2.6.22.i386/fs/xfs/linux-2.6/xfs_ioctl.c =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/linux-2.6/xfs_ioctl.c +++ linux-2.6.22.i386/fs/xfs/linux-2.6/xfs_ioctl.c @@ -736,7 +736,7 @@ xfs_ioctl( case XFS_IOC_DIOINFO: { struct dioattr da; xfs_buftarg_t *target = - (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) ? + XFS_IS_REALTIME_INODE(ip) ? mp->m_rtdev_targp : mp->m_ddev_targp; da.d_mem = da.d_miniosz = 1 << target->bt_sshift; Index: linux-2.6.22.i386/fs/xfs/linux-2.6/xfs_lrw.c =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/linux-2.6/xfs_lrw.c +++ linux-2.6.22.i386/fs/xfs/linux-2.6/xfs_lrw.c @@ -220,7 +220,7 @@ xfs_read( if (unlikely(ioflags & IO_ISDIRECT)) { xfs_buftarg_t *target = - (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) ? + XFS_IS_REALTIME_INODE(ip) ? mp->m_rtdev_targp : mp->m_ddev_targp; if ((*offset & target->bt_smask) || (size & target->bt_smask)) { @@ -694,7 +694,7 @@ start: if (ioflags & IO_ISDIRECT) { xfs_buftarg_t *target = - (xip->i_d.di_flags & XFS_DIFLAG_REALTIME) ? + XFS_IS_REALTIME_INODE(xip) ? mp->m_rtdev_targp : mp->m_ddev_targp; if ((pos & target->bt_smask) || (count & target->bt_smask)) { Index: linux-2.6.22.i386/fs/xfs/xfs_dfrag.c =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/xfs_dfrag.c +++ linux-2.6.22.i386/fs/xfs/xfs_dfrag.c @@ -184,8 +184,7 @@ xfs_swap_extents( } /* Verify both files are either real-time or non-realtime */ - if ((ip->i_d.di_flags & XFS_DIFLAG_REALTIME) != - (tip->i_d.di_flags & XFS_DIFLAG_REALTIME)) { + if (XFS_IS_REALTIME_INODE(ip) != XFS_IS_REALTIME_INODE(tip)) { error = XFS_ERROR(EINVAL); goto error0; } Index: linux-2.6.22.i386/fs/xfs/xfs_iocore.c =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/xfs_iocore.c +++ linux-2.6.22.i386/fs/xfs/xfs_iocore.c @@ -94,7 +94,7 @@ xfs_iocore_inode_reinit( xfs_iocore_t *io = &ip->i_iocore; io->io_flags = 0; - if (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) + if (XFS_IS_REALTIME_INODE(ip)) io->io_flags |= XFS_IOCORE_RT; io->io_dmevmask = ip->i_d.di_dmevmask; io->io_dmstate = ip->i_d.di_dmstate; Index: linux-2.6.22.i386/fs/xfs/xfs_rw.h =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/xfs_rw.h +++ linux-2.6.22.i386/fs/xfs/xfs_rw.h @@ -58,7 +58,7 @@ struct xfs_mount; static inline xfs_daddr_t xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb) { - return (((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME) ? \ + return (XFS_IS_REALTIME_INODE(ip) ? \ (xfs_daddr_t)XFS_FSB_TO_BB((ip)->i_mount, (fsb)) : \ XFS_FSB_TO_DADDR((ip)->i_mount, (fsb))); } @@ -87,7 +87,7 @@ xfs_get_extsz_hint( { xfs_extlen_t extsz; - if (unlikely(ip->i_d.di_flags & XFS_DIFLAG_REALTIME)) { + if (unlikely(XFS_IS_REALTIME_INODE(ip))) { extsz = (ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE) ? ip->i_d.di_extsize : ip->i_mount->m_sb.sb_rextsize; Index: linux-2.6.22.i386/fs/xfs/xfs_vnodeops.c =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/xfs_vnodeops.c +++ linux-2.6.22.i386/fs/xfs/xfs_vnodeops.c @@ -144,7 +144,7 @@ xfs_getattr( default: vap->va_rdev = 0; - if (!(ip->i_d.di_flags & XFS_DIFLAG_REALTIME)) { + if (!(XFS_IS_REALTIME_INODE(ip))) { vap->va_blocksize = xfs_preferred_iosize(mp); } else { @@ -521,7 +521,7 @@ xfs_setattr( */ if ((ip->i_d.di_nextents || ip->i_delayed_blks) && (mask & XFS_AT_XFLAGS) && - (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) != + (XFS_IS_REALTIME_INODE(ip)) != (vap->va_xflags & XFS_XFLAG_REALTIME)) { code = XFS_ERROR(EINVAL); /* EFBIG? */ goto error_return; @@ -533,7 +533,7 @@ xfs_setattr( if ((mask & XFS_AT_EXTSIZE) && vap->va_extsize != 0) { xfs_extlen_t size; - if ((ip->i_d.di_flags & XFS_DIFLAG_REALTIME) || + if (XFS_IS_REALTIME_INODE(ip) || ((mask & XFS_AT_XFLAGS) && (vap->va_xflags & XFS_XFLAG_REALTIME))) { size = mp->m_sb.sb_rextsize << @@ -1188,7 +1188,7 @@ xfs_fsync( * If this inode is on the RT dev we need to flush that * cache as well. */ - if (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) + if (XFS_IS_REALTIME_INODE(ip)) xfs_blkdev_issue_flush(ip->i_mount->m_rtdev_targp); } @@ -4263,7 +4263,7 @@ xfs_zero_remaining_bytes( int error = 0; bp = xfs_buf_get_noaddr(mp->m_sb.sb_blocksize, - ip->i_d.di_flags & XFS_DIFLAG_REALTIME ? + XFS_IS_REALTIME_INODE(ip) ? mp->m_rtdev_targp : mp->m_ddev_targp); for (offset = startoff; offset <= endoff; offset = lastoffset + 1) { @@ -4360,7 +4360,7 @@ xfs_free_file_space( error = 0; if (len <= 0) /* if nothing being freed */ return error; - rt = (ip->i_d.di_flags & XFS_DIFLAG_REALTIME); + rt = XFS_IS_REALTIME_INODE(ip); startoffset_fsb = XFS_B_TO_FSB(mp, offset); end_dmi_offset = offset + len; endoffset_fsb = XFS_B_TO_FSBT(mp, end_dmi_offset); Index: linux-2.6.22.i386/fs/xfs/xfs_dinode.h =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/xfs_dinode.h +++ linux-2.6.22.i386/fs/xfs/xfs_dinode.h @@ -274,6 +274,12 @@ typedef enum xfs_dinode_fmt #define XFS_DIFLAG_NODEFRAG (1 << XFS_DIFLAG_NODEFRAG_BIT) #define XFS_DIFLAG_FILESTREAM (1 << XFS_DIFLAG_FILESTREAM_BIT) +#ifdef CONFIG_XFS_RT +#define XFS_IS_REALTIME_INODE(ip) ((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME) +#else +#define XFS_IS_REALTIME_INODE(ip) (0) +#endif + #define XFS_DIFLAG_ANY \ (XFS_DIFLAG_REALTIME | XFS_DIFLAG_PREALLOC | XFS_DIFLAG_NEWRTBM | \ XFS_DIFLAG_IMMUTABLE | XFS_DIFLAG_APPEND | XFS_DIFLAG_SYNC | \ From owner-xfs@oss.sgi.com Sat Aug 18 23:04:58 2007 Received: with ECARTIS (v1.0.0; list xfs); Sat, 18 Aug 2007 23:05:01 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7J64vbm017531 for ; Sat, 18 Aug 2007 23:04:58 -0700 Received: from Liberator.local (unknown [10.0.0.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id D439B18DF93BD for ; Sun, 19 Aug 2007 01:05:01 -0500 (CDT) Message-ID: <46C7DD96.6030001@sandeen.net> Date: Sun, 19 Aug 2007 01:05:10 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: xfs-oss Subject: [PATCH] optimize dmapi event tests w/o dmapi config Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12576 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Defining XFS_DM_EVENT* macros to 0 in the absence of CONFIG_XFS_DMAPI allows gcc to optimize away tests that should never be true. Also wrap one hunk of xfs_unmount in #ifdef CONFIG_XFS_DMAPI Stack deltas on x86, gcc 4.1: xfs_create -16 xfs_free_file_space -4 xfs_getbmap +4 xfs_link -8 xfs_mkidr -20 xfs_read -24 xfs_remove -12 xfs_rename -8 xfs_rmdir -16 xfs_setattr -20 xfs_splice_read -20 xfs_splice_write -20 xfs_unmount -48 xfs_write -20 Signed-off-by: Eric Sandeen Index: linux-2.6.22.i386/fs/xfs/xfs_dmapi.h =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/xfs_dmapi.h +++ linux-2.6.22.i386/fs/xfs/xfs_dmapi.h @@ -66,6 +66,7 @@ typedef enum { } dm_right_t; #define HAVE_DM_RIGHT_T +#ifdef CONFIG_XFS_DMAPI /* Defines for determining if an event message should be sent. */ #define DM_EVENT_ENABLED(vfsp, ip, event) ( \ unlikely ((vfsp)->vfs_flag & VFS_DMI) && \ @@ -78,6 +79,11 @@ typedef enum { ( ((io)->io_dmevmask & (1 << event)) || \ ((io)->io_mount->m_dmevmask & (1 << event)) ) \ ) +#else +#define DM_EVENT_ENABLED(vfsp, ip, event) (0) +#define DM_EVENT_ENABLED_IO(vfsp, io, event) (0) +#endif + #define DM_XFS_VALID_FS_EVENTS ( \ (1 << DM_EVENT_PREUNMOUNT) | \ Index: linux-2.6.22.i386/fs/xfs/xfs_vfsops.c =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/xfs_vfsops.c +++ linux-2.6.22.i386/fs/xfs/xfs_vfsops.c @@ -568,6 +568,7 @@ xfs_unmount( rip = mp->m_rootip; rvp = XFS_ITOV(rip); +#ifdef CONFIG_XFS_DMAPI if (vfsp->vfs_flag & VFS_DMI) { error = XFS_SEND_PREUNMOUNT(mp, vfsp, rvp, DM_RIGHT_NULL, rvp, DM_RIGHT_NULL, @@ -580,7 +581,7 @@ xfs_unmount( unmount_event_flags = (mp->m_dmevmask & (1<; Sun, 19 Aug 2007 10:20:57 -0700 Received: from Liberator.local (unknown [10.0.0.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 6F6F218DF93BB for ; Sun, 19 Aug 2007 12:21:00 -0500 (CDT) Message-ID: <46C87C05.5040905@sandeen.net> Date: Sun, 19 Aug 2007 12:21:09 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: xfs-oss Subject: [PATCH V2] make xfs stats Kconfigurable References: <46C750C9.8040604@sandeen.net> In-Reply-To: <46C750C9.8040604@sandeen.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12577 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Oops, typo in Makefile (CONFIG_XFS_STAT vs _STATS). ---- xfs stats are already optional based on CONFIG_PROC_FS, and there is already a (never-set) macro XFS_STATS_OFF which can turn them off. Making it a configurable option, if I turn them off I can get a little stack savings on x86, gcc 4.1: xfs_attr_list -8 xfs_bmap_rtalloc -16 xfs_bmap_search_extents -8 xfs_buf_find +8 (not sure why) xfs_iflush -4 xfs_imap -12 xfs_log_reserve -4 xfs_log_sync -8 It'd reduce the size of the binary a bit too. Signed-off-by: Eric Sandeen Index: linux-2.6.22.i386/fs/xfs/Kconfig =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/Kconfig +++ linux-2.6.22.i386/fs/xfs/Kconfig @@ -59,6 +59,17 @@ config XFS_POSIX_ACL If you don't know what Access Control Lists are, say N. + config XFS_STATS + bool "XFS statistics" + depends on XFS_FS && PROC_FS + help + If you say Y here xfs will gather detailed statistics during + its operation, and present them in /proc/fs/xfs/stat and + (CONFIG_XFS_QUOTA is enabled) /proc/fs/xfs/xqmstat. Disabling + this will make the compiled code and stack usage slightly smaller. + + If unsure, say Y. + config XFS_RT bool "XFS Realtime subvolume support" depends on XFS_FS Index: linux-2.6.22.i386/fs/xfs/Makefile-linux-2.6 =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/Makefile-linux-2.6 +++ linux-2.6.22.i386/fs/xfs/Makefile-linux-2.6 @@ -35,12 +35,12 @@ xfs-$(CONFIG_XFS_QUOTA) += $(addprefix xfs_qm.o) ifeq ($(CONFIG_XFS_QUOTA),y) -xfs-$(CONFIG_PROC_FS) += quota/xfs_qm_stats.o +xfs-$(CONFIG_XFS_STATS) += quota/xfs_qm_stats.o endif xfs-$(CONFIG_XFS_RT) += xfs_rtalloc.o xfs-$(CONFIG_XFS_POSIX_ACL) += xfs_acl.o -xfs-$(CONFIG_PROC_FS) += $(XFS_LINUX)/xfs_stats.o +xfs-$(CONFIG_XFS_STATS) += $(XFS_LINUX)/xfs_stats.o xfs-$(CONFIG_SYSCTL) += $(XFS_LINUX)/xfs_sysctl.o xfs-$(CONFIG_COMPAT) += $(XFS_LINUX)/xfs_ioctl32.o Index: linux-2.6.22.i386/fs/xfs/linux-2.6/xfs_stats.h =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/linux-2.6/xfs_stats.h +++ linux-2.6.22.i386/fs/xfs/linux-2.6/xfs_stats.h @@ -19,7 +19,7 @@ #define __XFS_STATS_H__ -#if defined(CONFIG_PROC_FS) && !defined(XFS_STATS_OFF) +#if defined(CONFIG_XFS_STATS) #include @@ -137,8 +137,7 @@ DECLARE_PER_CPU(struct xfsstats, xfsstat extern void xfs_init_procfs(void); extern void xfs_cleanup_procfs(void); - -#else /* !CONFIG_PROC_FS */ +#else /* !CONFIG_XFS_STATS */ # define XFS_STATS_INC(count) # define XFS_STATS_DEC(count) @@ -147,6 +146,6 @@ extern void xfs_cleanup_procfs(void); static __inline void xfs_init_procfs(void) { }; static __inline void xfs_cleanup_procfs(void) { }; -#endif /* !CONFIG_PROC_FS */ +#endif /* !CONFIG_XFS_STATS */ #endif /* __XFS_STATS_H__ */ Index: linux-2.6.22.i386/fs/xfs/linux-2.6/xfs_sysctl.c =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/linux-2.6/xfs_sysctl.c +++ linux-2.6.22.i386/fs/xfs/linux-2.6/xfs_sysctl.c @@ -21,7 +21,7 @@ static struct ctl_table_header *xfs_table_header; -#ifdef CONFIG_PROC_FS +#ifdef CONFIG_XFS_STATS STATIC int xfs_stats_clear_proc_handler( ctl_table *ctl, @@ -52,7 +52,7 @@ xfs_stats_clear_proc_handler( return ret; } -#endif /* CONFIG_PROC_FS */ +#endif /* CONFIG_XFS_STATS */ static ctl_table xfs_table[] = { { @@ -222,7 +222,7 @@ static ctl_table xfs_table[] = { .extra2 = &xfs_params.fstrm_timer.max, }, /* please keep this the last entry */ -#ifdef CONFIG_PROC_FS +#ifdef CONFIG_XFS_STATS { .ctl_name = XFS_STATS_CLEAR, .procname = "stats_clear", Index: linux-2.6.22.i386/fs/xfs/quota/xfs_qm_stats.h =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/quota/xfs_qm_stats.h +++ linux-2.6.22.i386/fs/xfs/quota/xfs_qm_stats.h @@ -18,7 +18,7 @@ #ifndef __XFS_QM_STATS_H__ #define __XFS_QM_STATS_H__ -#if defined(CONFIG_PROC_FS) && !defined(XFS_STATS_OFF) +#ifdef CONFIG_XFS_STATS /* * XQM global statistics From owner-xfs@oss.sgi.com Sun Aug 19 11:33:51 2007 Received: with ECARTIS (v1.0.0; list xfs); Sun, 19 Aug 2007 11:33:53 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7JIXnbm002471 for ; Sun, 19 Aug 2007 11:33:51 -0700 Received: from Liberator.local (unknown [10.0.0.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id EEA6D18DF93B1 for ; Sun, 19 Aug 2007 13:33:54 -0500 (CDT) Message-ID: <46C88D1A.1020709@sandeen.net> Date: Sun, 19 Aug 2007 13:34:02 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: xfs-oss Subject: Re: [PATCH V2] make xfs stats Kconfigurable References: <46C750C9.8040604@sandeen.net> <46C87C05.5040905@sandeen.net> In-Reply-To: <46C87C05.5040905@sandeen.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12578 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Eric Sandeen wrote: > Oops, typo in Makefile (CONFIG_XFS_STAT vs _STATS). > > ---- > > > xfs stats are already optional based on CONFIG_PROC_FS, and there > is already a (never-set) macro XFS_STATS_OFF which can turn them > off. Making it a configurable option, if I turn them off I can > get a little stack savings on x86, gcc 4.1: This causes feature -q in xfsqa to report no quotas, because /proc/fs/xfs/xqm isn't present, but I think that check should just be removed...? -Eric From owner-xfs@oss.sgi.com Sun Aug 19 12:10:39 2007 Received: with ECARTIS (v1.0.0; list xfs); Sun, 19 Aug 2007 12:10:42 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7JJAbbm007860 for ; Sun, 19 Aug 2007 12:10:39 -0700 Received: from Liberator.local (unknown [10.0.0.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 0291C18DF93B1; Sun, 19 Aug 2007 14:10:43 -0500 (CDT) Message-ID: <46C895BB.2000004@sandeen.net> Date: Sun, 19 Aug 2007 14:10:51 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Christoph Hellwig CC: xfs-oss Subject: Re: [PATCH] optimize XFS_IS_REALTIME_INODE w/o realtime config References: <46C7627A.60503@sandeen.net> <20070819190847.GB2929@infradead.org> In-Reply-To: <20070819190847.GB2929@infradead.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12579 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Christoph Hellwig wrote: > On Sat, Aug 18, 2007 at 04:19:54PM -0500, Eric Sandeen wrote: >> Use XFS_IS_REALTIME_INODE in more places, and #define it to >> 0 if CONFIG_XFS_RT is off. This should be safe because mount >> checks in xfs_rtmount_init: >> >> # define xfs_rtmount_init(m) (((mp)->m_sb.sb_rblocks == 0)? 0 : (ENOSYS)) >> >> so if we get mounted w/o CONFIG_XFS_RT, no realtime inodes should >> be encountered after that. >> >> Defining XFS_IS_REALTIME_INODE to 0 saves a bit of stack space, >> presumeably gcc can optimize around the various "if (0)" type >> checks: > > Looks good to me. > > Not sure if anyone disables the rt volume, but as long as it's a config > option we should try to avoid as much as possible away if it's not enabled. > Fedora does :) -Eric From owner-xfs@oss.sgi.com Sun Aug 19 12:13:39 2007 Received: with ECARTIS (v1.0.0; list xfs); Sun, 19 Aug 2007 12:13:41 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_05,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7JJDbbm008518 for ; Sun, 19 Aug 2007 12:13:38 -0700 Received: from Liberator.local (unknown [10.0.0.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 707BA18DF93BB; Sun, 19 Aug 2007 14:13:43 -0500 (CDT) Message-ID: <46C89670.6050101@sandeen.net> Date: Sun, 19 Aug 2007 14:13:52 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Christoph Hellwig CC: xfs-oss Subject: Re: [PATCH V2] make xfs stats Kconfigurable References: <46C750C9.8040604@sandeen.net> <46C87C05.5040905@sandeen.net> <20070819191010.GC2929@infradead.org> In-Reply-To: <20070819191010.GC2929@infradead.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12580 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Christoph Hellwig wrote: > On Sun, Aug 19, 2007 at 12:21:09PM -0500, Eric Sandeen wrote: >> Oops, typo in Makefile (CONFIG_XFS_STAT vs _STATS). >> >> ---- >> >> >> xfs stats are already optional based on CONFIG_PROC_FS, and there >> is already a (never-set) macro XFS_STATS_OFF which can turn them >> off. Making it a configurable option, if I turn them off I can >> get a little stack savings on x86, gcc 4.1: > > Why would we want to disable the statistics? To save a little stack space. :) *shrug* This one's not so critical. FWIW, JFS has configurable stats, and I think an upcoming jbd patch adds (config-optional) stats. OTOH when are stats really used outside of sgi? Though I suppose occasionally they'd be useful in field debugging. *shrug* this one may not be worth it; I won't be heartbroken if it doesn't go in... it helps a tiny bit on the stack side. -Eric >> + config XFS_STATS > > Everywhere else the config statement is not indented, so it probably > shouldn't be here either. > From owner-xfs@oss.sgi.com Sun Aug 19 12:29:11 2007 Received: with ECARTIS (v1.0.0; list xfs); Sun, 19 Aug 2007 12:29:13 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7JJT9bm014263 for ; Sun, 19 Aug 2007 12:29:10 -0700 Received: from hch by pentafluge.infradead.org with local (Exim 4.63 #1 (Red Hat Linux)) id 1IMq7Y-0000m2-7F; Sun, 19 Aug 2007 20:07:32 +0100 Date: Sun, 19 Aug 2007 20:07:32 +0100 From: Christoph Hellwig To: Eric Sandeen Cc: xfs-oss Subject: Re: [PATCH] optimize dmapi event tests w/o dmapi config Message-ID: <20070819190732.GA2929@infradead.org> References: <46C7DD96.6030001@sandeen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46C7DD96.6030001@sandeen.net> User-Agent: Mutt/1.4.2.3i X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12583 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: xfs On Sun, Aug 19, 2007 at 01:05:10AM -0500, Eric Sandeen wrote: > Defining XFS_DM_EVENT* macros to 0 in the absence of > CONFIG_XFS_DMAPI allows gcc to optimize away tests that > should never be true. Also wrap one hunk of xfs_unmount > in #ifdef CONFIG_XFS_DMAPI Sounds useful, especially as dmapi is not in mainline at all. From owner-xfs@oss.sgi.com Sun Aug 19 12:29:08 2007 Received: with ECARTIS (v1.0.0; list xfs); Sun, 19 Aug 2007 12:29:11 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7JJT7bm014256 for ; Sun, 19 Aug 2007 12:29:08 -0700 Received: from hch by pentafluge.infradead.org with local (Exim 4.63 #1 (Red Hat Linux)) id 1IMqA6-0000nc-LR; Sun, 19 Aug 2007 20:10:10 +0100 Date: Sun, 19 Aug 2007 20:10:10 +0100 From: Christoph Hellwig To: Eric Sandeen Cc: xfs-oss Subject: Re: [PATCH V2] make xfs stats Kconfigurable Message-ID: <20070819191010.GC2929@infradead.org> References: <46C750C9.8040604@sandeen.net> <46C87C05.5040905@sandeen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46C87C05.5040905@sandeen.net> User-Agent: Mutt/1.4.2.3i X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12582 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: xfs On Sun, Aug 19, 2007 at 12:21:09PM -0500, Eric Sandeen wrote: > Oops, typo in Makefile (CONFIG_XFS_STAT vs _STATS). > > ---- > > > xfs stats are already optional based on CONFIG_PROC_FS, and there > is already a (never-set) macro XFS_STATS_OFF which can turn them > off. Making it a configurable option, if I turn them off I can > get a little stack savings on x86, gcc 4.1: Why would we want to disable the statistics? > + config XFS_STATS Everywhere else the config statement is not indented, so it probably shouldn't be here either. From owner-xfs@oss.sgi.com Sun Aug 19 12:29:06 2007 Received: with ECARTIS (v1.0.0; list xfs); Sun, 19 Aug 2007 12:29:09 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7JJT4bm014235 for ; Sun, 19 Aug 2007 12:29:06 -0700 Received: from hch by pentafluge.infradead.org with local (Exim 4.63 #1 (Red Hat Linux)) id 1IMq8l-0000mP-Ns; Sun, 19 Aug 2007 20:08:47 +0100 Date: Sun, 19 Aug 2007 20:08:47 +0100 From: Christoph Hellwig To: Eric Sandeen Cc: xfs-oss Subject: Re: [PATCH] optimize XFS_IS_REALTIME_INODE w/o realtime config Message-ID: <20070819190847.GB2929@infradead.org> References: <46C7627A.60503@sandeen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46C7627A.60503@sandeen.net> User-Agent: Mutt/1.4.2.3i X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12581 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: xfs On Sat, Aug 18, 2007 at 04:19:54PM -0500, Eric Sandeen wrote: > Use XFS_IS_REALTIME_INODE in more places, and #define it to > 0 if CONFIG_XFS_RT is off. This should be safe because mount > checks in xfs_rtmount_init: > > # define xfs_rtmount_init(m) (((mp)->m_sb.sb_rblocks == 0)? 0 : (ENOSYS)) > > so if we get mounted w/o CONFIG_XFS_RT, no realtime inodes should > be encountered after that. > > Defining XFS_IS_REALTIME_INODE to 0 saves a bit of stack space, > presumeably gcc can optimize around the various "if (0)" type > checks: Looks good to me. Not sure if anyone disables the rt volume, but as long as it's a config option we should try to avoid as much as possible away if it's not enabled. From owner-xfs@oss.sgi.com Sun Aug 19 12:40:20 2007 Received: with ECARTIS (v1.0.0; list xfs); Sun, 19 Aug 2007 12:40:23 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7JJeIbm016778 for ; Sun, 19 Aug 2007 12:40:20 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7JJeNA5002257 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sun, 19 Aug 2007 21:40:23 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7JJeNBl002255 for xfs@oss.sgi.com; Sun, 19 Aug 2007 21:40:23 +0200 Date: Sun, 19 Aug 2007 21:40:23 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH] kill unused IOMAP_EOF flag Message-ID: <20070819194023.GB2185@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12585 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/xfs_iomap.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_iomap.c 2007-08-13 18:34:23.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_iomap.c 2007-08-13 18:34:49.000000000 +0200 @@ -135,14 +135,10 @@ xfs_imap_to_bmap( int flags) { xfs_mount_t *mp; - xfs_fsize_t nisize; int pbm; xfs_fsblock_t start_block; mp = io->io_mount; - nisize = XFS_SIZE(mp, io); - if (io->io_new_size > nisize) - nisize = io->io_new_size; for (pbm = 0; imaps && pbm < iomaps; imaps--, iomapp++, imap++, pbm++) { iomapp->iomap_offset = XFS_FSB_TO_B(mp, imap->br_startoff); @@ -169,10 +165,6 @@ xfs_imap_to_bmap( iomapp->iomap_flags |= IOMAP_UNWRITTEN; } - if ((iomapp->iomap_offset + iomapp->iomap_bsize) >= nisize) { - iomapp->iomap_flags |= IOMAP_EOF; - } - offset += iomapp->iomap_bsize - iomapp->iomap_delta; } return pbm; /* Return the number filled */ Index: linux-2.6-xfs/fs/xfs/xfs_iomap.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_iomap.h 2007-08-13 18:34:23.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_iomap.h 2007-08-13 18:34:29.000000000 +0200 @@ -23,7 +23,6 @@ typedef enum { /* iomap_flags values */ IOMAP_READ = 0, /* mapping for a read */ - IOMAP_EOF = 0x01, /* mapping contains EOF */ IOMAP_HOLE = 0x02, /* mapping covers a hole */ IOMAP_DELAY = 0x04, /* mapping covers delalloc region */ IOMAP_REALTIME = 0x10, /* mapping on the realtime device */ From owner-xfs@oss.sgi.com Sun Aug 19 12:39:42 2007 Received: with ECARTIS (v1.0.0; list xfs); Sun, 19 Aug 2007 12:39:46 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_05 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7JJdcbm016630 for ; Sun, 19 Aug 2007 12:39:42 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7JJdhA5002236 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sun, 19 Aug 2007 21:39:43 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7JJdhTR002234 for xfs@oss.sgi.com; Sun, 19 Aug 2007 21:39:43 +0200 Date: Sun, 19 Aug 2007 21:39:43 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH] m_growlock should be a mutex Message-ID: <20070819193943.GA2185@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12584 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs m_growlock only needs plain binary mutex semantics, so use a struct mutex instead of a semaphore for it. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/xfs_fsops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_fsops.c 2007-08-13 18:04:18.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_fsops.c 2007-08-13 18:04:26.000000000 +0200 @@ -433,10 +433,10 @@ xfs_growfs_data( xfs_growfs_data_t *in) { int error; - if (!cpsema(&mp->m_growlock)) + if (!mutex_trylock(&mp->m_growlock)) return XFS_ERROR(EWOULDBLOCK); error = xfs_growfs_data_private(mp, in); - vsema(&mp->m_growlock); + mutex_unlock(&mp->m_growlock); return error; } @@ -446,10 +446,10 @@ xfs_growfs_log( xfs_growfs_log_t *in) { int error; - if (!cpsema(&mp->m_growlock)) + if (!mutex_trylock(&mp->m_growlock)) return XFS_ERROR(EWOULDBLOCK); error = xfs_growfs_log_private(mp, in); - vsema(&mp->m_growlock); + mutex_unlock(&mp->m_growlock); return error; } Index: linux-2.6-xfs/fs/xfs/xfs_mount.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_mount.c 2007-08-13 18:04:18.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_mount.c 2007-08-13 18:04:26.000000000 +0200 @@ -139,7 +139,7 @@ xfs_mount_init(void) AIL_LOCKINIT(&mp->m_ail_lock, "xfs_ail"); spinlock_init(&mp->m_sb_lock, "xfs_sb"); mutex_init(&mp->m_ilock); - initnsema(&mp->m_growlock, 1, "xfs_grow"); + mutex_init(&mp->m_growlock); /* * Initialize the AIL. */ @@ -180,7 +180,7 @@ xfs_mount_free( AIL_LOCK_DESTROY(&mp->m_ail_lock); spinlock_destroy(&mp->m_sb_lock); mutex_destroy(&mp->m_ilock); - freesema(&mp->m_growlock); + mutex_destroy(&mp->m_growlock); if (mp->m_quotainfo) XFS_QM_DONE(mp); Index: linux-2.6-xfs/fs/xfs/xfs_mount.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_mount.h 2007-08-13 18:04:18.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_mount.h 2007-08-13 18:04:26.000000000 +0200 @@ -377,7 +377,7 @@ typedef struct xfs_mount { uint m_in_maxlevels; /* XFS_IN_MAXLEVELS */ struct xfs_perag *m_perag; /* per-ag accounting info */ struct rw_semaphore m_peraglock; /* lock for m_perag (pointer) */ - sema_t m_growlock; /* growfs mutex */ + struct mutex m_growlock; /* growfs mutex */ int m_fixedfsid[2]; /* unchanged for life of FS */ uint m_dmevmask; /* DMI events for this FS */ __uint64_t m_flags; /* global mount flags */ From owner-xfs@oss.sgi.com Sun Aug 19 16:47:03 2007 Received: with ECARTIS (v1.0.0; list xfs); Sun, 19 Aug 2007 16:47:06 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7JNkvbm020526 for ; Sun, 19 Aug 2007 16:47:01 -0700 Received: from [134.14.55.89] (soarer.melbourne.sgi.com [134.14.55.89]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id JAA22339; Mon, 20 Aug 2007 09:46:57 +1000 Message-ID: <46C8D6E8.2080500@sgi.com> Date: Mon, 20 Aug 2007 09:48:56 +1000 From: Vlad Apostolov User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: Eric Sandeen CC: xfs-oss Subject: Re: [PATCH] optimize dmapi event tests w/o dmapi config References: <46C7DD96.6030001@sandeen.net> In-Reply-To: <46C7DD96.6030001@sandeen.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12586 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: vapo@sgi.com Precedence: bulk X-list: xfs Eric Sandeen wrote: > Defining XFS_DM_EVENT* macros to 0 in the absence of > CONFIG_XFS_DMAPI allows gcc to optimize away tests that > should never be true. Also wrap one hunk of xfs_unmount > in #ifdef CONFIG_XFS_DMAPI > Good idea Eric. A few remarks and a question below. > > +#ifdef CONFIG_XFS_DMAPI > CONFIG_XFS_DMAPI is only defined when the DMAPI is statically linked to the kernel. When DMAPI is configured as a module, CONFIG_XFS_DMAPI_MODULE is defined. The HAVE_DMAPI is defined for both, static and module DMAPI configurations. > /* Defines for determining if an event message should be sent. */ > #define DM_EVENT_ENABLED(vfsp, ip, event) ( \ > unlikely ((vfsp)->vfs_flag & VFS_DMI) && \ > @@ -78,6 +79,11 @@ typedef enum { > ( ((io)->io_dmevmask & (1 << event)) || \ > ((io)->io_mount->m_dmevmask & (1 << event)) ) \ > ) > +#else > +#define DM_EVENT_ENABLED(vfsp, ip, event) (0) > The above should use the new two arguments DM_EVENT_ENABLED macro. > +#define DM_EVENT_ENABLED_IO(vfsp, io, event) (0) > What is this DM_EVENT_ENABLE_IO macro for? > > +#ifdef CONFIG_XFS_DMAPI The same, use HAVE_DMAPI instead of CONFIG_XFS_DMAPI. Otherwise it is looking good. Regards, Vlad From owner-xfs@oss.sgi.com Sun Aug 19 20:37:16 2007 Received: with ECARTIS (v1.0.0; list xfs); Sun, 19 Aug 2007 20:37:19 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7K3bEbm023586 for ; Sun, 19 Aug 2007 20:37:15 -0700 Received: from Liberator.local (unknown [10.0.0.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 152C618DF93BF; Sun, 19 Aug 2007 22:37:19 -0500 (CDT) Message-ID: <46C90C77.5070502@sandeen.net> Date: Sun, 19 Aug 2007 22:37:27 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Vlad Apostolov CC: xfs-oss Subject: Re: [PATCH] optimize dmapi event tests w/o dmapi config References: <46C7DD96.6030001@sandeen.net> <46C8D6E8.2080500@sgi.com> In-Reply-To: <46C8D6E8.2080500@sgi.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12587 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Vlad Apostolov wrote: > Eric Sandeen wrote: > >> Defining XFS_DM_EVENT* macros to 0 in the absence of >> CONFIG_XFS_DMAPI allows gcc to optimize away tests that >> should never be true. Also wrap one hunk of xfs_unmount >> in #ifdef CONFIG_XFS_DMAPI >> >> > Good idea Eric. A few remarks and a question below. > >> >> +#ifdef CONFIG_XFS_DMAPI >> >> > CONFIG_XFS_DMAPI is only defined when the DMAPI is statically linked > to the kernel. When DMAPI is configured as a module, > CONFIG_XFS_DMAPI_MODULE > is defined. The HAVE_DMAPI is defined for both, static and module DMAPI > configurations. > Hmm... ok. kernel.org doesn't have that so you'll need to take care moving this patch to the kernel.org tree I guess. >> /* Defines for determining if an event message should be sent. */ >> #define DM_EVENT_ENABLED(vfsp, ip, event) ( \ >> unlikely ((vfsp)->vfs_flag & VFS_DMI) && \ >> @@ -78,6 +79,11 @@ typedef enum { >> ( ((io)->io_dmevmask & (1 << event)) || \ >> ((io)->io_mount->m_dmevmask & (1 << event)) ) \ >> ) >> +#else >> +#define DM_EVENT_ENABLED(vfsp, ip, event) (0) >> >> > The above should use the new two arguments DM_EVENT_ENABLED macro. > >> +#define DM_EVENT_ENABLED_IO(vfsp, io, event) (0) >> >> > What is this DM_EVENT_ENABLE_IO macro for? > Ah, this is just the differernce between kernel.org & CVS I guess. I'm just re-defining existing macros in 2.6.22.1 to no-ops. DM_EVENT_ENABLE_IO must have been removed from CVS w/o removing from kernel.org (yet) - and I guess same goes for the argument count. Anyway here's a CVS patch, sorry: ------ Defining XFS_DM_EVENT* macros to 0 in the absence of CONFIG_XFS_DMAPI allows gcc to optimize away tests that should never be true. Also wrap one hunk of xfs_unmount in #ifdef CONFIG_XFS_DMAPI Stack deltas on x86, gcc 4.1: xfs_create -16 xfs_free_file_space -4 xfs_getbmap +4 xfs_link -8 xfs_mkidr -20 xfs_read -24 xfs_remove -12 xfs_rename -8 xfs_rmdir -16 xfs_setattr -20 xfs_splice_read -20 xfs_splice_write -20 xfs_unmount -48 xfs_write -20 Signed-off-by: Eric Sandeen Index: linux.orig/fs/xfs/xfs_dmapi.h =================================================================== --- linux.orig/fs/xfs/xfs_dmapi.h +++ linux/fs/xfs/xfs_dmapi.h @@ -67,11 +67,15 @@ typedef enum { #define HAVE_DM_RIGHT_T /* Defines for determining if an event message should be sent. */ +#ifdef HAVE_DMAPI #define DM_EVENT_ENABLED(ip, event) ( \ unlikely (XFS_MTOVFS((ip)->i_mount)->vfs_flag & VFS_DMI) && \ ( ((ip)->i_d.di_dmevmask & (1 << event)) || \ ((ip)->i_mount->m_dmevmask & (1 << event)) ) \ ) +#else +#define DM_EVENT_ENABLED(ip, event) (0) +#endif #define DM_XFS_VALID_FS_EVENTS ( \ (1 << DM_EVENT_PREUNMOUNT) | \ Index: linux.orig/fs/xfs/xfs_vfsops.c =================================================================== --- linux.orig/fs/xfs/xfs_vfsops.c +++ linux/fs/xfs/xfs_vfsops.c @@ -572,6 +572,7 @@ xfs_unmount( rip = mp->m_rootip; rvp = XFS_ITOV(rip); +#ifdef HAVE_DMAPI if (vfsp->vfs_flag & VFS_DMI) { error = XFS_SEND_PREUNMOUNT(mp, vfsp, rvp, DM_RIGHT_NULL, rvp, DM_RIGHT_NULL, @@ -584,7 +585,7 @@ xfs_unmount( unmount_event_flags = (mp->m_dmevmask & (1<; Sun, 19 Aug 2007 22:01:27 -0700 Received: from Liberator.local (unknown [10.0.0.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 5FD7118DF93BB for ; Mon, 20 Aug 2007 00:01:32 -0500 (CDT) Message-ID: <46C92035.6040504@sandeen.net> Date: Mon, 20 Aug 2007 00:01:41 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: xfs-oss Subject: upstream changes missing from cvs? Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12588 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Hi sgi folks - Noticed that upstream calls to generic_segment_checks() in xfs_lrw.c seem to be missing from cvs/ptools. Was this on purpose or are changes pushed directly to upstream getting lost in cvs? -Eric From owner-xfs@oss.sgi.com Sun Aug 19 22:20:50 2007 Received: with ECARTIS (v1.0.0; list xfs); Sun, 19 Aug 2007 22:20:52 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7K5Kkbm005538 for ; Sun, 19 Aug 2007 22:20:48 -0700 Received: from [134.14.55.89] (soarer.melbourne.sgi.com [134.14.55.89]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id PAA29017; Mon, 20 Aug 2007 15:20:44 +1000 Message-ID: <46C92524.7000207@sgi.com> Date: Mon, 20 Aug 2007 15:22:44 +1000 From: Vlad Apostolov User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: Eric Sandeen CC: xfs-oss Subject: Re: [PATCH] optimize dmapi event tests w/o dmapi config References: <46C7DD96.6030001@sandeen.net> <46C8D6E8.2080500@sgi.com> <46C90C77.5070502@sandeen.net> In-Reply-To: <46C90C77.5070502@sandeen.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12589 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: vapo@sgi.com Precedence: bulk X-list: xfs I ran the DMAPI QA with the updated patch and it was working fine. I will push it in the XFS development tree. Thanks Eric. Regards, Vlad Eric Sandeen wrote: > Vlad Apostolov wrote: > > >> Eric Sandeen wrote: >> >> >>> Defining XFS_DM_EVENT* macros to 0 in the absence of >>> CONFIG_XFS_DMAPI allows gcc to optimize away tests that >>> should never be true. Also wrap one hunk of xfs_unmount >>> in #ifdef CONFIG_XFS_DMAPI >>> >>> >>> >> Good idea Eric. A few remarks and a question below. >> >> >>> >>> +#ifdef CONFIG_XFS_DMAPI >>> >>> >>> >> CONFIG_XFS_DMAPI is only defined when the DMAPI is statically linked >> to the kernel. When DMAPI is configured as a module, >> CONFIG_XFS_DMAPI_MODULE >> is defined. The HAVE_DMAPI is defined for both, static and module DMAPI >> configurations. >> >> > Hmm... ok. kernel.org doesn't have that so you'll need to take care moving this > > patch to the kernel.org tree I guess. > > >>> /* Defines for determining if an event message should be sent. */ >>> #define DM_EVENT_ENABLED(vfsp, ip, event) ( \ >>> unlikely ((vfsp)->vfs_flag & VFS_DMI) && \ >>> @@ -78,6 +79,11 @@ typedef enum { >>> ( ((io)->io_dmevmask & (1 << event)) || \ >>> ((io)->io_mount->m_dmevmask & (1 << event)) ) \ >>> ) >>> +#else >>> +#define DM_EVENT_ENABLED(vfsp, ip, event) (0) >>> >>> >>> >> The above should use the new two arguments DM_EVENT_ENABLED macro. >> >> >>> +#define DM_EVENT_ENABLED_IO(vfsp, io, event) (0) >>> >>> >>> >> What is this DM_EVENT_ENABLE_IO macro for? >> >> > Ah, this is just the differernce between kernel.org & CVS I guess. > I'm just re-defining existing macros in 2.6.22.1 to no-ops. > > DM_EVENT_ENABLE_IO must have been removed from CVS w/o removing from > kernel.org (yet) - and I guess same goes for the argument count. > > Anyway here's a CVS patch, sorry: > > ------ > > Defining XFS_DM_EVENT* macros to 0 in the absence of > CONFIG_XFS_DMAPI allows gcc to optimize away tests that > should never be true. Also wrap one hunk of xfs_unmount > in #ifdef CONFIG_XFS_DMAPI > > Stack deltas on x86, gcc 4.1: > > xfs_create -16 > xfs_free_file_space -4 > xfs_getbmap +4 > xfs_link -8 > xfs_mkidr -20 > xfs_read -24 > xfs_remove -12 > xfs_rename -8 > xfs_rmdir -16 > xfs_setattr -20 > xfs_splice_read -20 > xfs_splice_write -20 > xfs_unmount -48 > xfs_write -20 > > Signed-off-by: Eric Sandeen > > Index: linux.orig/fs/xfs/xfs_dmapi.h > =================================================================== > --- linux.orig/fs/xfs/xfs_dmapi.h > +++ linux/fs/xfs/xfs_dmapi.h > @@ -67,11 +67,15 @@ typedef enum { > #define HAVE_DM_RIGHT_T > > /* Defines for determining if an event message should be sent. */ > +#ifdef HAVE_DMAPI > #define DM_EVENT_ENABLED(ip, event) ( \ > unlikely (XFS_MTOVFS((ip)->i_mount)->vfs_flag & VFS_DMI) && \ > ( ((ip)->i_d.di_dmevmask & (1 << event)) || \ > ((ip)->i_mount->m_dmevmask & (1 << event)) ) \ > ) > +#else > +#define DM_EVENT_ENABLED(ip, event) (0) > +#endif > > #define DM_XFS_VALID_FS_EVENTS ( \ > (1 << DM_EVENT_PREUNMOUNT) | \ > Index: linux.orig/fs/xfs/xfs_vfsops.c > =================================================================== > --- linux.orig/fs/xfs/xfs_vfsops.c > +++ linux/fs/xfs/xfs_vfsops.c > @@ -572,6 +572,7 @@ xfs_unmount( > rip = mp->m_rootip; > rvp = XFS_ITOV(rip); > > +#ifdef HAVE_DMAPI > if (vfsp->vfs_flag & VFS_DMI) { > error = XFS_SEND_PREUNMOUNT(mp, vfsp, > rvp, DM_RIGHT_NULL, rvp, DM_RIGHT_NULL, > @@ -584,7 +585,7 @@ xfs_unmount( > unmount_event_flags = (mp->m_dmevmask & (1< 0 : DM_FLAGS_UNWANTED; > } > - > +#endif > /* > * First blow any referenced inode from this file system > * out of the reference cache, and delete the timer. > > > From owner-xfs@oss.sgi.com Sun Aug 19 22:42:50 2007 Received: with ECARTIS (v1.0.0; list xfs); Sun, 19 Aug 2007 22:42:54 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7K5glbm009021 for ; Sun, 19 Aug 2007 22:42:48 -0700 Received: from [134.14.55.89] (soarer.melbourne.sgi.com [134.14.55.89]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id PAA29378; Mon, 20 Aug 2007 15:42:46 +1000 Message-ID: <46C92A4D.6010201@sgi.com> Date: Mon, 20 Aug 2007 15:44:45 +1000 From: Vlad Apostolov User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: sgi.bugs.xfs@engr.sgi.com CC: linux-xfs@oss.sgi.com Subject: TAKE 969372 - [PATCH] optimize dmapi event tests w/o dmapi config Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12590 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: vapo@sgi.com Precedence: bulk X-list: xfs optimize dmapi event tests w/o dmapi config Signed-off-by: Eric Sandeen Date: Mon Aug 20 15:39:31 AEST 2007 Workarea: soarer.melbourne.sgi.com:/home/vapo/isms/linux-xfs-patch-reviews Inspected by: vapo The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29444a fs/xfs/xfs_dmapi.h - 1.60 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dmapi.h.diff?r1=text&tr1=1.60&r2=text&tr2=1.59&f=h - pv 969372, rv vapo - optimize dmapi event tests w/o dmapi config fs/xfs/xfs_vfsops.c - 1.525 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vfsops.c.diff?r1=text&tr1=1.525&r2=text&tr2=1.524&f=h - pv 969372, rv vapo - optimize dmapi event tests w/o dmapi config From owner-xfs@oss.sgi.com Mon Aug 20 13:53:38 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 20 Aug 2007 13:53:44 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-6.3 required=5.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_MED,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7KKrbbm006672 for ; Mon, 20 Aug 2007 13:53:38 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l7KKrBQI013553; Mon, 20 Aug 2007 16:53:11 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7KKrB7S016724; Mon, 20 Aug 2007 16:53:11 -0400 Received: from dantu.rdu.redhat.com (dantu.rdu.redhat.com [172.16.57.196]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7KKrAvm027787; Mon, 20 Aug 2007 16:53:10 -0400 Received: from dantu.rdu.redhat.com (localhost.localdomain [127.0.0.1]) by dantu.rdu.redhat.com (8.14.1/8.13.8) with ESMTP id l7KKrAv6017754; Mon, 20 Aug 2007 16:53:10 -0400 Received: (from jlayton@localhost) by dantu.rdu.redhat.com (8.14.1/8.14.1/Submit) id l7KKr9eE017753; Mon, 20 Aug 2007 16:53:09 -0400 Date: Mon, 20 Aug 2007 16:53:09 -0400 Message-Id: <200708202053.l7KKr9eE017753@dantu.rdu.redhat.com> From: Jeff Layton Subject: [PATCH 0/4] move handling of setuid/gid bits from VFS into individual setattr functions (try 2) To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com, nfs@lists.sourceforge.net X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12591 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jlayton@redhat.com Precedence: bulk X-list: xfs When an unprivileged process attempts to modify a file that has the setuid or setgid bits set, the VFS will attempt to clear these bits. The VFS will set the ATTR_KILL_SUID or ATTR_KILL_SGID bits in the ia_valid mask, and then call notify_change to clear these bits and set the mode accordingly. With a networked filesystem (NFS and CIFS in particular but likely others), the client machine may not have credentials that allow for setting the mode. In some situations, this can lead to file corruption, an operation failing outright because the setattr fails, or to races that lead to a mode change being reverted. In this situation, we'd like to just leave the handling of this to the server and ignore these bits. The problem is that by the time the setattr op is called, the VFS has already reinterpreted the ATTR_KILL_* bits into a mode change. We can't fix this in the filesystems where this is a problem, as doing so would leave us having to second-guess what the VFS wants us to do. So we need to change it so that filesystems have more flexibility in how to interpret the ATTR_KILL_* bits. The first patch in the following patchset moves this logic out of notify_change and into a helper function. It then has notify_change call this helper function for inodes that do not have a setattr operation defined. The other patches fix up the individual filesystems for the new scheme, mostly by having them call the new helper. Changing this abruptly could introduce security issues for filesystems that live out-of-tree or if an in-tree filesystem is missed. As a precaution, the patchset has notify_change check the ia_valid in the iattr struct after the setattr call returns. If any ATTR_KILL_* bits are still set, then notify_change assumes that the filesystem didn't handle these bits correctly. It printk's a warning and attempts to clear them the with another setattr call. The upshot of this is that with this change, filesystems that define a setattr inode operation are now responsible for handling the ATTR_KILL bits as well. They can trivially do so by calling the helper, but they should be converted to do so as soon as possible. Some of the follow-on patches may not be strictly necessary, but I decided that it was better to take the conservative approach and call the helper when I wasn't sure. I've tried to CC the maintainers for the individual filesystems where I could find them. Please let me know if there are others who should be informed. This patchset should apply cleanly to the current -mm tree. I've rolled the patches that fix individual filesystems together per Christoph's suggestion, though I can also provide them broken out individually again if needed. Comments and suggestions appreciated. Also, please let me know if I've missed any filesystems that need to be converted... Signed-off-by: Jeff Layton From owner-xfs@oss.sgi.com Mon Aug 20 13:54:24 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 20 Aug 2007 13:54:30 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-6.3 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_54, RCVD_IN_DNSWL_MED,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7KKsNbm006887 for ; Mon, 20 Aug 2007 13:54:24 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l7KKrNuP013702; Mon, 20 Aug 2007 16:53:23 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7KKrNGK016789; Mon, 20 Aug 2007 16:53:23 -0400 Received: from dantu.rdu.redhat.com (dantu.rdu.redhat.com [172.16.57.196]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7KKrNIW027816; Mon, 20 Aug 2007 16:53:23 -0400 Received: from dantu.rdu.redhat.com (localhost.localdomain [127.0.0.1]) by dantu.rdu.redhat.com (8.14.1/8.13.8) with ESMTP id l7KKrMwe017764; Mon, 20 Aug 2007 16:53:22 -0400 Received: (from jlayton@localhost) by dantu.rdu.redhat.com (8.14.1/8.14.1/Submit) id l7KKrMYv017763; Mon, 20 Aug 2007 16:53:22 -0400 Date: Mon, 20 Aug 2007 16:53:22 -0400 Message-Id: <200708202053.l7KKrMYv017763@dantu.rdu.redhat.com> From: Jeff Layton Subject: [PATCH 2/4] Fix mainline filesystems to handle ATTR_KILL_ bits correctly To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12593 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jlayton@redhat.com Precedence: bulk X-list: xfs This should fix all of the filesystems in the mainline kernels to handle ATTR_KILL_SUID and ATTR_KILL_SGID correctly. For most of them, this is just a matter of making sure that they call generic_attrkill early in the setattr inode op. Signed-off-by: Jeff Layton --- arch/powerpc/platforms/cell/spufs/inode.c | 1 + fs/9p/vfs_inode.c | 1 + fs/affs/inode.c | 1 + fs/afs/inode.c | 3 +++ fs/coda/inode.c | 1 + fs/configfs/inode.c | 4 +++- fs/ext2/inode.c | 1 + fs/ext3/inode.c | 5 ++++- fs/ext4/inode.c | 5 ++++- fs/fuse/dir.c | 2 ++ fs/gfs2/ops_inode.c | 2 ++ fs/hostfs/hostfs_kern.c | 2 ++ fs/hpfs/inode.c | 1 + fs/hugetlbfs/inode.c | 5 ++++- fs/jffs2/fs.c | 1 + fs/jfs/acl.c | 2 ++ fs/ocfs2/file.c | 2 ++ fs/proc/base.c | 3 +++ fs/proc/generic.c | 3 +++ fs/proc/proc_sysctl.c | 3 +++ fs/ramfs/file-nommu.c | 5 ++++- fs/reiserfs/inode.c | 6 +++++- fs/smbfs/inode.c | 2 ++ fs/sysfs/inode.c | 5 ++++- fs/ufs/truncate.c | 5 ++++- fs/xfs/linux-2.6/xfs_iops.c | 5 ++++- mm/shmem.c | 2 ++ 27 files changed, 69 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index b3d0dd1..66144a1 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c @@ -97,6 +97,7 @@ spufs_setattr(struct dentry *dentry, struct iattr *attr) { struct inode *inode = dentry->d_inode; + generic_attrkill(inode->i_mode, attr); if ((attr->ia_valid & ATTR_SIZE) && (attr->ia_size != inode->i_size)) return -EINVAL; diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index e5c45ee..a90ebf1 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -756,6 +756,7 @@ static int v9fs_vfs_setattr(struct dentry *dentry, struct iattr *iattr) return PTR_ERR(fid); v9fs_blank_wstat(&wstat); + generic_attrkill(dentry->d_inode->i_mode, iattr); if (iattr->ia_valid & ATTR_MODE) wstat.mode = unixmode2p9mode(v9ses, iattr->ia_mode); diff --git a/fs/affs/inode.c b/fs/affs/inode.c index 4609a6c..e8dbedf 100644 --- a/fs/affs/inode.c +++ b/fs/affs/inode.c @@ -218,6 +218,7 @@ affs_notify_change(struct dentry *dentry, struct iattr *attr) pr_debug("AFFS: notify_change(%lu,0x%x)\n",inode->i_ino,attr->ia_valid); + generic_attrkill(inode->i_mode, attr); error = inode_change_ok(inode,attr); if (error) goto out; diff --git a/fs/afs/inode.c b/fs/afs/inode.c index 84750c8..8c43c93 100644 --- a/fs/afs/inode.c +++ b/fs/afs/inode.c @@ -371,6 +371,9 @@ int afs_setattr(struct dentry *dentry, struct iattr *attr) vnode->fid.vid, vnode->fid.vnode, dentry->d_name.name, attr->ia_valid); + /* FIXME: is this necessary? */ + generic_attrkill(dentry->d_inode->i_mode, attr); + if (!(attr->ia_valid & (ATTR_SIZE | ATTR_MODE | ATTR_UID | ATTR_GID | ATTR_MTIME))) { _leave(" = 0 [unsupported]"); diff --git a/fs/coda/inode.c b/fs/coda/inode.c index 342f4e0..7dec870 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c @@ -239,6 +239,7 @@ int coda_setattr(struct dentry *de, struct iattr *iattr) memset(&vattr, 0, sizeof(vattr)); inode->i_ctime = CURRENT_TIME_SEC; + generic_attrkill(inode->i_mode, iattr); coda_iattr_to_vattr(iattr, &vattr); vattr.va_type = C_VNON; /* cannot set type */ diff --git a/fs/configfs/inode.c b/fs/configfs/inode.c index dbd257d..d3d6637 100644 --- a/fs/configfs/inode.c +++ b/fs/configfs/inode.c @@ -59,7 +59,7 @@ int configfs_setattr(struct dentry * dentry, struct iattr * iattr) struct inode * inode = dentry->d_inode; struct configfs_dirent * sd = dentry->d_fsdata; struct iattr * sd_iattr; - unsigned int ia_valid = iattr->ia_valid; + unsigned int ia_valid; int error; if (!sd) @@ -67,6 +67,7 @@ int configfs_setattr(struct dentry * dentry, struct iattr * iattr) sd_iattr = sd->s_iattr; + generic_attrkill(inode->i_mode, iattr); error = inode_change_ok(inode, iattr); if (error) return error; @@ -90,6 +91,7 @@ int configfs_setattr(struct dentry * dentry, struct iattr * iattr) /* attributes were changed atleast once in past */ + ia_valid = iattr->ia_valid; if (ia_valid & ATTR_UID) sd_iattr->ia_uid = iattr->ia_uid; if (ia_valid & ATTR_GID) diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index c1dcb68..353472c 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c @@ -1405,6 +1405,7 @@ int ext2_setattr(struct dentry *dentry, struct iattr *iattr) struct inode *inode = dentry->d_inode; int error; + generic_attrkill(inode->i_mode, iattr); error = inode_change_ok(inode, iattr); if (error) return error; diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c index 2d6324a..cabb57b 100644 --- a/fs/ext3/inode.c +++ b/fs/ext3/inode.c @@ -2989,7 +2989,10 @@ int ext3_setattr(struct dentry *dentry, struct iattr *attr) { struct inode *inode = dentry->d_inode; int error, rc = 0; - const unsigned int ia_valid = attr->ia_valid; + unsigned int ia_valid; + + generic_attrkill(inode->i_mode, attr); + ia_valid = attr->ia_valid; error = inode_change_ok(inode, attr); if (error) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index a49bb00..c39f472 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3047,7 +3047,10 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr) { struct inode *inode = dentry->d_inode; int error, rc = 0; - const unsigned int ia_valid = attr->ia_valid; + unsigned int ia_valid; + + generic_attrkill(inode->i_mode, attr); + ia_valid = attr->ia_valid; error = inode_change_ok(inode, attr); if (error) diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index d1acab9..df6a911 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -1005,6 +1005,8 @@ static int fuse_setattr(struct dentry *entry, struct iattr *attr) struct fuse_attr_out outarg; int err; + generic_attrkill(inode->i_mode, attr); + if (fc->flags & FUSE_DEFAULT_PERMISSIONS) { err = inode_change_ok(inode, attr); if (err) diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index 5b8b994..f0d8532 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c @@ -994,6 +994,8 @@ static int gfs2_setattr(struct dentry *dentry, struct iattr *attr) if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) goto out; + generic_attrkill(inode->i_mode, attr); + error = inode_change_ok(inode, attr); if (error) goto out; diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 4880256..370f71e 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -821,6 +821,8 @@ int hostfs_setattr(struct dentry *dentry, struct iattr *attr) int fd = HOSTFS_I(dentry->d_inode)->fd; + generic_attrkill(dentry->d_inode->i_mode, attr); + err = inode_change_ok(dentry->d_inode, attr); if (err) return err; diff --git a/fs/hpfs/inode.c b/fs/hpfs/inode.c index 85d3e1d..1387839 100644 --- a/fs/hpfs/inode.c +++ b/fs/hpfs/inode.c @@ -265,6 +265,7 @@ int hpfs_notify_change(struct dentry *dentry, struct iattr *attr) struct inode *inode = dentry->d_inode; int error=0; lock_kernel(); + generic_attrkill(inode->i_mode, attr); if ( ((attr->ia_valid & ATTR_SIZE) && attr->ia_size > inode->i_size) || (hpfs_sb(inode->i_sb)->sb_root == inode->i_ino) ) { error = -EINVAL; diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index b35a298..fde0875 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c @@ -452,10 +452,13 @@ static int hugetlbfs_setattr(struct dentry *dentry, struct iattr *attr) { struct inode *inode = dentry->d_inode; int error; - unsigned int ia_valid = attr->ia_valid; + unsigned int ia_valid; BUG_ON(!inode); + generic_attrkill(inode->i_mode, attr); + ia_valid = attr->ia_valid; + error = inode_change_ok(inode, attr); if (error) goto out; diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c index 1d3b7a9..597f903 100644 --- a/fs/jffs2/fs.c +++ b/fs/jffs2/fs.c @@ -37,6 +37,7 @@ static int jffs2_do_setattr (struct inode *inode, struct iattr *iattr) uint32_t alloclen; int ret; D1(printk(KERN_DEBUG "jffs2_setattr(): ino #%lu\n", inode->i_ino)); + generic_attrkill(inode->i_mode, iattr); ret = inode_change_ok(inode, iattr); if (ret) return ret; diff --git a/fs/jfs/acl.c b/fs/jfs/acl.c index 4d84bdc..1630ba0 100644 --- a/fs/jfs/acl.c +++ b/fs/jfs/acl.c @@ -227,6 +227,8 @@ int jfs_setattr(struct dentry *dentry, struct iattr *iattr) struct inode *inode = dentry->d_inode; int rc; + generic_attrkill(inode->i_mode, iattr); + rc = inode_change_ok(inode, iattr); if (rc) return rc; diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 0d9f96e..d48c83d 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -989,6 +989,8 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr) mlog_entry("(0x%p, '%.*s')\n", dentry, dentry->d_name.len, dentry->d_name.name); + generic_attrkill(inode->i_mode, attr); + if (attr->ia_valid & ATTR_MODE) mlog(0, "mode change: %d\n", attr->ia_mode); if (attr->ia_valid & ATTR_UID) diff --git a/fs/proc/base.c b/fs/proc/base.c index 614851a..3b0f6c1 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -349,6 +349,9 @@ static int proc_setattr(struct dentry *dentry, struct iattr *attr) int error; struct inode *inode = dentry->d_inode; + /* FIXME: is this necessary? */ + generic_attrkill(inode->i_mode, attr); + if (attr->ia_valid & ATTR_MODE) return -EPERM; diff --git a/fs/proc/generic.c b/fs/proc/generic.c index 1bdb624..1e31ae7 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c @@ -239,6 +239,9 @@ static int proc_notify_change(struct dentry *dentry, struct iattr *iattr) struct proc_dir_entry *de = PDE(inode); int error; + /* FIXME: is this necessary? */ + generic_attrkill(inode->i_mode, iattr); + error = inode_change_ok(inode, iattr); if (error) goto out; diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 680c429..7b50364 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c @@ -425,6 +425,9 @@ static int proc_sys_setattr(struct dentry *dentry, struct iattr *attr) struct inode *inode = dentry->d_inode; int error; + /* FIXME: is this necessary */ + generic_attrkill(inode->i_mode, attr); + if (attr->ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID)) return -EPERM; diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c index 0989bc2..a3ff4b3 100644 --- a/fs/ramfs/file-nommu.c +++ b/fs/ramfs/file-nommu.c @@ -192,9 +192,12 @@ static int ramfs_nommu_resize(struct inode *inode, loff_t newsize, loff_t size) static int ramfs_nommu_setattr(struct dentry *dentry, struct iattr *ia) { struct inode *inode = dentry->d_inode; - unsigned int old_ia_valid = ia->ia_valid; + unsigned int old_ia_valid; int ret = 0; + generic_attrkill(inode->i_mode, ia); + old_ia_valid = ia->ia_valid; + /* POSIX UID/GID verification for setting inode attributes */ ret = inode_change_ok(inode, ia); if (ret) diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 9525f9f..48db0df 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c @@ -3062,7 +3062,11 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr) { struct inode *inode = dentry->d_inode; int error; - unsigned int ia_valid = attr->ia_valid; + unsigned int ia_valid; + + generic_attrkill(inode->i_mode, attr); + ia_valid = attr->ia_valid; + reiserfs_write_lock(inode->i_sb); if (attr->ia_valid & ATTR_SIZE) { /* version 2 items will be caught by the s_maxbytes check diff --git a/fs/smbfs/inode.c b/fs/smbfs/inode.c index ed851e6..98c4158 100644 --- a/fs/smbfs/inode.c +++ b/fs/smbfs/inode.c @@ -682,6 +682,8 @@ smb_notify_change(struct dentry *dentry, struct iattr *attr) if (error) goto out; + generic_attrkill(inode->i_mode, attr); + if ((error = inode_change_ok(inode, attr)) < 0) goto out; diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index 782c480..e9a6dfb 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c @@ -38,7 +38,7 @@ int sysfs_setattr(struct dentry * dentry, struct iattr * iattr) struct inode * inode = dentry->d_inode; struct sysfs_dirent * sd = dentry->d_fsdata; struct iattr * sd_iattr; - unsigned int ia_valid = iattr->ia_valid; + unsigned int ia_valid; int error; if (!sd) @@ -46,6 +46,9 @@ int sysfs_setattr(struct dentry * dentry, struct iattr * iattr) sd_iattr = sd->s_iattr; + generic_attrkill(inode->i_mode, iattr); + ia_valid = iattr->ia_valid; + error = inode_change_ok(inode, iattr); if (error) return error; diff --git a/fs/ufs/truncate.c b/fs/ufs/truncate.c index 311ded3..28cb078 100644 --- a/fs/ufs/truncate.c +++ b/fs/ufs/truncate.c @@ -510,9 +510,12 @@ out: static int ufs_setattr(struct dentry *dentry, struct iattr *attr) { struct inode *inode = dentry->d_inode; - unsigned int ia_valid = attr->ia_valid; + unsigned int ia_valid; int error; + generic_attrkill(inode->i_mode, attr); + ia_valid = attr->ia_valid; + error = inode_change_ok(inode, attr); if (error) return error; diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index e0e06dd..cfbed9e 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c @@ -651,12 +651,15 @@ xfs_vn_setattr( struct iattr *attr) { struct inode *inode = dentry->d_inode; - unsigned int ia_valid = attr->ia_valid; + unsigned int ia_valid; bhv_vnode_t *vp = vn_from_inode(inode); bhv_vattr_t vattr = { 0 }; int flags = 0; int error; + generic_attrkill(inode->i_mode, attr); + ia_valid = attr->ia_valid; + if (ia_valid & ATTR_UID) { vattr.va_mask |= XFS_AT_UID; vattr.va_uid = attr->ia_uid; diff --git a/mm/shmem.c b/mm/shmem.c index 29f8d07..de54808 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -718,6 +718,8 @@ static int shmem_notify_change(struct dentry *dentry, struct iattr *attr) struct page *page = NULL; int error; + generic_attrkill(inode->i_mode, attr); + if (S_ISREG(inode->i_mode) && (attr->ia_valid & ATTR_SIZE)) { if (attr->ia_size < inode->i_size) { /* -- 1.5.2.2 From owner-xfs@oss.sgi.com Mon Aug 20 13:53:36 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 20 Aug 2007 13:53:52 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-6.3 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_46, RCVD_IN_DNSWL_MED,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7KKrXbm006662 for ; Mon, 20 Aug 2007 13:53:36 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l7KKrJw8013648; Mon, 20 Aug 2007 16:53:19 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7KKrI8F016765; Mon, 20 Aug 2007 16:53:18 -0400 Received: from dantu.rdu.redhat.com (dantu.rdu.redhat.com [172.16.57.196]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7KKrHKE027796; Mon, 20 Aug 2007 16:53:17 -0400 Received: from dantu.rdu.redhat.com (localhost.localdomain [127.0.0.1]) by dantu.rdu.redhat.com (8.14.1/8.13.8) with ESMTP id l7KKrHfr017759; Mon, 20 Aug 2007 16:53:17 -0400 Received: (from jlayton@localhost) by dantu.rdu.redhat.com (8.14.1/8.14.1/Submit) id l7KKrFVx017758; Mon, 20 Aug 2007 16:53:15 -0400 Date: Mon, 20 Aug 2007 16:53:15 -0400 Message-Id: <200708202053.l7KKrFVx017758@dantu.rdu.redhat.com> From: Jeff Layton Subject: [PATCH 1/4] VFS: move ATTR_KILL handling from notify_change into helper function To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: v9fs-developer@lists.sourceforge.net, zippel@linux-m68k.org, dhowells@redhat.com, linux-cifs-client@lists.samba.org, codalist@TELEMANN.coda.cs.cmu.edu, joel.becker@oracle.com, linux-ext4@vger.kernel.org, fuse-devel@lists.sourceforge.net, cluster-devel@redhat.com, user-mode-linux-user@lists.sourceforge.net, mikulas@artax.karlin.mff.cuni.cz, wli@holomorphy.com, jffs-dev@axis.com, jfs-discussion@lists.sourceforge.net, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu, xfs@oss.sgi.com, nfs@lists.sourceforge.net X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12592 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jlayton@redhat.com Precedence: bulk X-list: xfs Separate the handling of the local ia_valid bitmask from the one in attr->ia_valid. This allows us to hand off the actual handling of the ATTR_KILL_* flags to the .setattr i_op when one is defined. notify_change still needs to process those flags for the local ia_valid variable, since it uses that to decide whether to return early, and to pass a (hopefully) appropriate bitmask to fsnotify_change. Also, check the ia_valid after the setattr op returns and see if either ATTR_KILL_* bit is set. If so, then throw a warning and try to clear the bits in the "standard" way. This should help us to catch filesystems that don't handle these bits correctly without breaking them outright. Signed-off-by: Jeff Layton --- fs/attr.c | 91 ++++++++++++++++++++++++++++++++++++++++----------- include/linux/fs.h | 1 + 2 files changed, 72 insertions(+), 20 deletions(-) diff --git a/fs/attr.c b/fs/attr.c index ae58bd3..50c8ce4 100644 --- a/fs/attr.c +++ b/fs/attr.c @@ -100,15 +100,53 @@ int inode_setattr(struct inode * inode, struct iattr * attr) } EXPORT_SYMBOL(inode_setattr); +/** + * generic_attrkill - helper to convert ATTR_KILL_* bits into mode change + * @mode: current mode of inode + * @attr: inode attribute changes requested by VFS + * Context: anywhere + * + * This is a helper function to convert ATTR_KILL_SUID and ATTR_KILL_SGID + * into a mode change. Filesystems should call this from their setattr + * inode op when they want "conventional" setuid-clearing behavior. + * + * Filesystems that declare a setattr inode operation are now expected to + * handle the ATTR_KILL_SUID and ATTR_KILL_SGID bits appropriately. The VFS + * no longer automatically converts these bits to a mode change for + * inodes that have their own setattr operation. + **/ +void generic_attrkill(mode_t mode, struct iattr *attr) +{ + if (attr->ia_valid & ATTR_KILL_SUID) { + attr->ia_valid &= ~ATTR_KILL_SUID; + if (mode & S_ISUID) { + if (!(attr->ia_valid & ATTR_MODE)) { + attr->ia_valid |= ATTR_MODE; + attr->ia_mode = mode; + } + attr->ia_mode &= ~S_ISUID; + } + } + if (attr->ia_valid & ATTR_KILL_SGID) { + attr->ia_valid &= ~ATTR_KILL_SGID; + if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) { + if (!(attr->ia_valid & ATTR_MODE)) { + attr->ia_valid |= ATTR_MODE; + attr->ia_mode = mode; + } + attr->ia_mode &= ~S_ISGID; + } + } +} +EXPORT_SYMBOL(generic_attrkill); + int notify_change(struct dentry * dentry, struct iattr * attr) { struct inode *inode = dentry->d_inode; - mode_t mode; - int error; + int error, once = 0; struct timespec now; unsigned int ia_valid = attr->ia_valid; - mode = inode->i_mode; now = current_fs_time(inode->i_sb); attr->ia_ctime = now; @@ -126,36 +164,49 @@ int notify_change(struct dentry * dentry, struct iattr * attr) return error; } if (ia_valid & ATTR_KILL_SUID) { - attr->ia_valid &= ~ATTR_KILL_SUID; - if (mode & S_ISUID) { - if (!(ia_valid & ATTR_MODE)) { - ia_valid = attr->ia_valid |= ATTR_MODE; - attr->ia_mode = inode->i_mode; - } - attr->ia_mode &= ~S_ISUID; - } + ia_valid &= ~ATTR_KILL_SUID; + if (inode->i_mode & S_ISUID) + ia_valid |= ATTR_MODE; } if (ia_valid & ATTR_KILL_SGID) { - attr->ia_valid &= ~ ATTR_KILL_SGID; - if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) { - if (!(ia_valid & ATTR_MODE)) { - ia_valid = attr->ia_valid |= ATTR_MODE; - attr->ia_mode = inode->i_mode; - } - attr->ia_mode &= ~S_ISGID; - } + ia_valid &= ~ATTR_KILL_SGID; + if ((inode->i_mode & (S_ISGID | S_IXGRP)) == + (S_ISGID | S_IXGRP)) + ia_valid |= ATTR_MODE; } - if (!attr->ia_valid) + if (!ia_valid) return 0; if (ia_valid & ATTR_SIZE) down_write(&dentry->d_inode->i_alloc_sem); if (inode->i_op && inode->i_op->setattr) { +retry: error = security_inode_setattr(dentry, attr); if (!error) error = inode->i_op->setattr(dentry, attr); + /* + * if ATTR_KILL_SUID or ATTR_KILL_SGID is still set, then + * assume that the setattr inode op didn't handle them + * correctly. Try to clear these bits the standard way + * with a second setattr call and printk a warning. + */ + if (!error && !once && unlikely(attr->ia_valid & + (ATTR_KILL_SUID|ATTR_KILL_SGID))) { + attr->ia_valid &= + (ATTR_FORCE|ATTR_KILL_SUID|ATTR_KILL_SGID); + generic_attrkill(inode->i_mode, attr); + ++once; + if (printk_ratelimit()) + printk(KERN_ERR "%s: %s doesn't seem to " + "handle setuid/setgid bit killing " + "correctly. Report this to filesystem " + "maintainer.\n", __func__, + inode->i_sb->s_type->name); + goto retry; + } } else { + generic_attrkill(inode->i_mode, attr); error = inode_change_ok(inode, attr); if (!error) error = security_inode_setattr(dentry, attr); diff --git a/include/linux/fs.h b/include/linux/fs.h index 30eb32f..6ba6830 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1679,6 +1679,7 @@ extern int do_remount_sb(struct super_block *sb, int flags, #ifdef CONFIG_BLOCK extern sector_t bmap(struct inode *, sector_t); #endif +extern void generic_attrkill(mode_t mode, struct iattr *attr); extern int notify_change(struct dentry *, struct iattr *); extern int permission(struct inode *, int, struct nameidata *); extern int generic_permission(struct inode *, int, -- 1.5.2.2 From owner-xfs@oss.sgi.com Mon Aug 20 22:35:12 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 20 Aug 2007 22:35:17 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7L5Z8bm025022 for ; Mon, 20 Aug 2007 22:35:11 -0700 Received: from boing.melbourne.sgi.com (boing.melbourne.sgi.com [134.14.55.141]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id PAA02986; Tue, 21 Aug 2007 15:35:09 +1000 Message-ID: <46CA798C.1020101@sgi.com> Date: Tue, 21 Aug 2007 15:35:08 +1000 From: Timothy Shimmin User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Jeff Layton CC: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, xfs-oss Subject: Re: [PATCH 2/4] Fix mainline filesystems to handle ATTR_KILL_ bits correctly References: <200708202053.l7KKrMYv017763@dantu.rdu.redhat.com> In-Reply-To: <200708202053.l7KKrMYv017763@dantu.rdu.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12594 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: tes@sgi.com Precedence: bulk X-list: xfs Jeff Layton wrote: > This should fix all of the filesystems in the mainline kernels to handle > ATTR_KILL_SUID and ATTR_KILL_SGID correctly. For most of them, this is > just a matter of making sure that they call generic_attrkill early in > the setattr inode op. > > Signed-off-by: Jeff Layton > --- > fs/xfs/linux-2.6/xfs_iops.c | 5 ++++- > --- a/fs/xfs/linux-2.6/xfs_iops.c > +++ b/fs/xfs/linux-2.6/xfs_iops.c > @@ -651,12 +651,15 @@ xfs_vn_setattr( > struct iattr *attr) > { > struct inode *inode = dentry->d_inode; > - unsigned int ia_valid = attr->ia_valid; > + unsigned int ia_valid; > bhv_vnode_t *vp = vn_from_inode(inode); > bhv_vattr_t vattr = { 0 }; > int flags = 0; > int error; > > + generic_attrkill(inode->i_mode, attr); > + ia_valid = attr->ia_valid; > + > if (ia_valid & ATTR_UID) { > vattr.va_mask |= XFS_AT_UID; > vattr.va_uid = attr->ia_uid; Looks reasonable to me for XFS. Acked-by: Tim Shimmin So before, this clearing would happen directly in notify_change() and now this won't happen until notify_change() calls i_op->setattr which for a particular fs it can call generic_attrkill() to do it. So I guess for the cases where i_op->setattr is called outside of via notify_change, we don't normally have ATTR_KILL_SUID/SGID set so that nothing will happen there? I guess just wondering the effect with having the code on all setattr's. (I'm not familiar with the code path) --Tim From owner-xfs@oss.sgi.com Tue Aug 21 04:35:49 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 21 Aug 2007 04:35:53 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_MED,SPF_HELO_PASS autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7LBZlbm004959 for ; Tue, 21 Aug 2007 04:35:49 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l7LBZqsG022064; Tue, 21 Aug 2007 07:35:52 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7LBZq51032389; Tue, 21 Aug 2007 07:35:52 -0400 Received: from tleilax.poochiereds.net (vpn-14-128.rdu.redhat.com [10.11.14.128]) by pobox.corp.redhat.com (8.13.1/8.13.1) with SMTP id l7LBZpG3001906; Tue, 21 Aug 2007 07:35:51 -0400 Date: Tue, 21 Aug 2007 07:35:51 -0400 From: Jeff Layton To: Timothy Shimmin Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, xfs-oss Subject: Re: [PATCH 2/4] Fix mainline filesystems to handle ATTR_KILL_ bits correctly Message-Id: <20070821073551.dac4a5dd.jlayton@redhat.com> In-Reply-To: <46CA798C.1020101@sgi.com> References: <200708202053.l7KKrMYv017763@dantu.rdu.redhat.com> <46CA798C.1020101@sgi.com> X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.14; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12595 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jlayton@redhat.com Precedence: bulk X-list: xfs On Tue, 21 Aug 2007 15:35:08 +1000 Timothy Shimmin wrote: > Jeff Layton wrote: > > This should fix all of the filesystems in the mainline kernels to handle > > ATTR_KILL_SUID and ATTR_KILL_SGID correctly. For most of them, this is > > just a matter of making sure that they call generic_attrkill early in > > the setattr inode op. > > > > Signed-off-by: Jeff Layton > > --- > > fs/xfs/linux-2.6/xfs_iops.c | 5 ++++- > > --- a/fs/xfs/linux-2.6/xfs_iops.c > > +++ b/fs/xfs/linux-2.6/xfs_iops.c > > @@ -651,12 +651,15 @@ xfs_vn_setattr( > > struct iattr *attr) > > { > > struct inode *inode = dentry->d_inode; > > - unsigned int ia_valid = attr->ia_valid; > > + unsigned int ia_valid; > > bhv_vnode_t *vp = vn_from_inode(inode); > > bhv_vattr_t vattr = { 0 }; > > int flags = 0; > > int error; > > > > + generic_attrkill(inode->i_mode, attr); > > + ia_valid = attr->ia_valid; > > + > > if (ia_valid & ATTR_UID) { > > vattr.va_mask |= XFS_AT_UID; > > vattr.va_uid = attr->ia_uid; > > Looks reasonable to me for XFS. > Acked-by: Tim Shimmin > > So before, this clearing would happen directly in notify_change() > and now this won't happen until notify_change() calls i_op->setattr > which for a particular fs it can call generic_attrkill() to do it. > So I guess for the cases where i_op->setattr is called outside of > via notify_change, we don't normally have ATTR_KILL_SUID/SGID > set so that nothing will happen there? Right. If neither ATTR_KILL bit is set then generic_attrkill is a noop. > I guess just wondering the effect with having the code on all > setattr's. (I'm not familiar with the code path) > These bits are referenced in very few places in the current kernel tree -- mostly in the VFS layer. The *only* place I see that they actually get interpreted into a mode change is in notify_change. So places that call setattr ops w/o going through notify_change are not likely to have those bits set. But hypothetically, if a fs did set ATTR_KILL_* and call setattr directly, then the setattr would now include a mode change that clears setuid or setgid bits where it may not have before. -- Jeff Layton From owner-xfs@oss.sgi.com Tue Aug 21 09:29:39 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 21 Aug 2007 09:29:43 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_50 autolearn=ham version=3.2.0-pre1-r499012 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.243]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7LGTabm007579 for ; Tue, 21 Aug 2007 09:29:39 -0700 Received: by an-out-0708.google.com with SMTP id c38so174734ana for ; Tue, 21 Aug 2007 09:29:41 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=pl3hSM9H+Gpv1zSBYQ2Ez+8ickPJapVzgRhlUDyF/ycpHJ65am/+EY7WJyKsuzz9vahh8d0+nrhEx5jhmcjJS3OtaddTA2BKShCtcwrsV1FuUywVhhg1JogSMfbUr6vGNV2MlwQlrrp0YC5dFHEoqizdEjoJeau7Ojn90V7gWnw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=HVAK4wZsclkBioyxj4QDW/ylib9sVscRGnBoiZPOOokG72j93p2Df6un1F4v6jBpWY7GdgtVEWy+RihIKm4/oX/oOWnUurq+STapse5ezDtdu7oRhF/R57qjJRzbNIaJ1QmwBELquIaqmpw6VvWWH/aMKRjwOukw+lsrNb6QREo= Received: by 10.90.81.14 with SMTP id e14mr2145095agb.1187710016215; Tue, 21 Aug 2007 08:26:56 -0700 (PDT) Received: by 10.90.34.5 with HTTP; Tue, 21 Aug 2007 08:26:56 -0700 (PDT) Message-ID: <9ee2fe770708210826n5952e727od0df16a5a7b267f0@mail.gmail.com> Date: Tue, 21 Aug 2007 21:11:56 +0545 From: "kanishk rastogi" To: xfs@oss.sgi.com Subject: Need of inode->i_mutex in xfs_write() MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: ClamAV version 0.90, clamav-milter version devel-120207 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 12596 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: kanishk.85@gmail.com Precedence: bulk X-list: xfs I was looking at the xfs_write code path in kernel 2.6.20 ....... I saw it acquiring inode->i_mutex . Whats the need ? What are we safegaurding inode for. AFAIK its used for protecting the incode inode. (CMIIW) regards kanishk From owner-xfs@oss.sgi.com Wed Aug 22 04:22:25 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 22 Aug 2007 04:22:32 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7MBMM4p000485 for ; Wed, 22 Aug 2007 04:22:25 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l7LMN7TB031775; Tue, 21 Aug 2007 18:23:07 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7LMN6wh020834; Tue, 21 Aug 2007 18:23:06 -0400 Received: from tleilax.poochiereds.net (vpn-14-18.rdu.redhat.com [10.11.14.18]) by pobox.corp.redhat.com (8.13.1/8.13.1) with SMTP id l7LMN5TQ017211; Tue, 21 Aug 2007 18:23:06 -0400 Date: Tue, 21 Aug 2007 18:23:05 -0400 From: Jeff Layton To: Josef Sipek Cc: Timothy Shimmin , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, xfs-oss Subject: Re: [PATCH 2/4] Fix mainline filesystems to handle ATTR_KILL_ bits correctly Message-Id: <20070821182305.7c0cb135.jlayton@redhat.com> In-Reply-To: <20070821212128.GC1741@filer.fsl.cs.sunysb.edu> References: <200708202053.l7KKrMYv017763@dantu.rdu.redhat.com> <46CA798C.1020101@sgi.com> <20070821073551.dac4a5dd.jlayton@redhat.com> <20070821212128.GC1741@filer.fsl.cs.sunysb.edu> X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.14; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 12597 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jlayton@redhat.com Precedence: bulk X-list: xfs On Tue, 21 Aug 2007 17:21:28 -0400 Josef Sipek wrote: > On Tue, Aug 21, 2007 at 07:35:51AM -0400, Jeff Layton wrote: > > On Tue, 21 Aug 2007 15:35:08 +1000 > > Timothy Shimmin wrote: > > > > > Jeff Layton wrote: > > > > This should fix all of the filesystems in the mainline kernels to handle > > > > ATTR_KILL_SUID and ATTR_KILL_SGID correctly. For most of them, this is > > > > just a matter of making sure that they call generic_attrkill early in > > > > the setattr inode op. > > > > > > > > Signed-off-by: Jeff Layton > > > > --- > > > > fs/xfs/linux-2.6/xfs_iops.c | 5 ++++- > > > > --- a/fs/xfs/linux-2.6/xfs_iops.c > > > > +++ b/fs/xfs/linux-2.6/xfs_iops.c > > > > @@ -651,12 +651,15 @@ xfs_vn_setattr( > > > > struct iattr *attr) > > > > { > > > > struct inode *inode = dentry->d_inode; > > > > - unsigned int ia_valid = attr->ia_valid; > > > > + unsigned int ia_valid; > > > > bhv_vnode_t *vp = vn_from_inode(inode); > > > > bhv_vattr_t vattr = { 0 }; > > > > int flags = 0; > > > > int error; > > > > > > > > + generic_attrkill(inode->i_mode, attr); > > > > + ia_valid = attr->ia_valid; > > > > + > > > > if (ia_valid & ATTR_UID) { > > > > vattr.va_mask |= XFS_AT_UID; > > > > vattr.va_uid = attr->ia_uid; > > > > > > Looks reasonable to me for XFS. > > > Acked-by: Tim Shimmin > > > > > > So before, this clearing would happen directly in notify_change() > > > and now this won't happen until notify_change() calls i_op->setattr > > > which for a particular fs it can call generic_attrkill() to do it. > > > So I guess for the cases where i_op->setattr is called outside of > > > via notify_change, we don't normally have ATTR_KILL_SUID/SGID > > > set so that nothing will happen there? > > > > Right. If neither ATTR_KILL bit is set then generic_attrkill is a > > noop. > > > > > I guess just wondering the effect with having the code on all > > > setattr's. (I'm not familiar with the code path) > > > > > > > These bits are referenced in very few places in the current kernel > > tree -- mostly in the VFS layer. The *only* place I see that they > > actually get interpreted into a mode change is in notify_change. So > > places that call setattr ops w/o going through notify_change are > > not likely to have those bits set. > > > > But hypothetically, if a fs did set ATTR_KILL_* and call setattr > > directly, then the setattr would now include a mode change that > > clears setuid or setgid bits where it may not have before. > I should probably clarify -- in the hypothetical situation above, the setattr function would have to call generic_attrkill (as most filesystems should do with this change). > It almost sounds like an argument for a new inode op (NULL would use > generic_attr_kill). > That's not a bad idea at all. I suppose that would be easier than modifying every fs like this, and it does seem like it might be cleaner. I need to mull it over, but that might be the best solution. -- Jeff Layton From owner-xfs@oss.sgi.com Wed Aug 22 05:13:04 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 22 Aug 2007 05:13:06 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from filer.fsl.cs.sunysb.edu (filer.fsl.cs.sunysb.edu [130.245.126.2]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7MCD14p007647 for ; Wed, 22 Aug 2007 05:13:04 -0700 Received: from filer.fsl.cs.sunysb.edu (localhost.localdomain [127.0.0.1]) by filer.fsl.cs.sunysb.edu (8.12.11.20060308/8.13.1) with ESMTP id l7LLLSps003107; Tue, 21 Aug 2007 17:21:28 -0400 Received: (from jsipek@localhost) by filer.fsl.cs.sunysb.edu (8.12.11.20060308/8.13.1/Submit) id l7LLLSkt003105; Tue, 21 Aug 2007 17:21:28 -0400 X-Authentication-Warning: filer.fsl.cs.sunysb.edu: jsipek set sender to jsipek@fsl.cs.sunysb.edu using -f Date: Tue, 21 Aug 2007 17:21:28 -0400 From: Josef Sipek To: Jeff Layton Cc: Timothy Shimmin , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, xfs-oss Subject: Re: [PATCH 2/4] Fix mainline filesystems to handle ATTR_KILL_ bits correctly Message-ID: <20070821212128.GC1741@filer.fsl.cs.sunysb.edu> References: <200708202053.l7KKrMYv017763@dantu.rdu.redhat.com> <46CA798C.1020101@sgi.com> <20070821073551.dac4a5dd.jlayton@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070821073551.dac4a5dd.jlayton@redhat.com> User-Agent: Mutt/1.5.16 (2007-07-16) X-archive-position: 12598 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jsipek@fsl.cs.sunysb.edu Precedence: bulk X-list: xfs On Tue, Aug 21, 2007 at 07:35:51AM -0400, Jeff Layton wrote: > On Tue, 21 Aug 2007 15:35:08 +1000 > Timothy Shimmin wrote: > > > Jeff Layton wrote: > > > This should fix all of the filesystems in the mainline kernels to handle > > > ATTR_KILL_SUID and ATTR_KILL_SGID correctly. For most of them, this is > > > just a matter of making sure that they call generic_attrkill early in > > > the setattr inode op. > > > > > > Signed-off-by: Jeff Layton > > > --- > > > fs/xfs/linux-2.6/xfs_iops.c | 5 ++++- > > > --- a/fs/xfs/linux-2.6/xfs_iops.c > > > +++ b/fs/xfs/linux-2.6/xfs_iops.c > > > @@ -651,12 +651,15 @@ xfs_vn_setattr( > > > struct iattr *attr) > > > { > > > struct inode *inode = dentry->d_inode; > > > - unsigned int ia_valid = attr->ia_valid; > > > + unsigned int ia_valid; > > > bhv_vnode_t *vp = vn_from_inode(inode); > > > bhv_vattr_t vattr = { 0 }; > > > int flags = 0; > > > int error; > > > > > > + generic_attrkill(inode->i_mode, attr); > > > + ia_valid = attr->ia_valid; > > > + > > > if (ia_valid & ATTR_UID) { > > > vattr.va_mask |= XFS_AT_UID; > > > vattr.va_uid = attr->ia_uid; > > > > Looks reasonable to me for XFS. > > Acked-by: Tim Shimmin > > > > So before, this clearing would happen directly in notify_change() > > and now this won't happen until notify_change() calls i_op->setattr > > which for a particular fs it can call generic_attrkill() to do it. > > So I guess for the cases where i_op->setattr is called outside of > > via notify_change, we don't normally have ATTR_KILL_SUID/SGID > > set so that nothing will happen there? > > Right. If neither ATTR_KILL bit is set then generic_attrkill is a > noop. > > > I guess just wondering the effect with having the code on all > > setattr's. (I'm not familiar with the code path) > > > > These bits are referenced in very few places in the current kernel > tree -- mostly in the VFS layer. The *only* place I see that they > actually get interpreted into a mode change is in notify_change. So > places that call setattr ops w/o going through notify_change are > not likely to have those bits set. > > But hypothetically, if a fs did set ATTR_KILL_* and call setattr > directly, then the setattr would now include a mode change that > clears setuid or setgid bits where it may not have before. It almost sounds like an argument for a new inode op (NULL would use generic_attr_kill). Josef 'Jeff' Sipek. -- A CRAY is the only computer that runs an endless loop in just 4 hours... From owner-xfs@oss.sgi.com Wed Aug 22 15:56:26 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 22 Aug 2007 15:56:28 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_50 autolearn=ham version=3.2.0-pre1-r499012 Received: from oth.net (mail.oth.net [209.173.220.26]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7MMuM4p017484 for ; Wed, 22 Aug 2007 15:56:26 -0700 Received: from localhost (r6@localhost) by oth.net (8.9.3/8.9.3) with ESMTP id RAA11768 for ; Wed, 22 Aug 2007 17:17:33 -0500 Date: Wed, 22 Aug 2007 17:17:33 -0500 (CDT) From: Chris Pearson X-Sender: r6@orbis.oth.net To: xfs@oss.sgi.com Subject: sb_ifree and sb_fdblocks are unequal Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 12599 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: kermit4@gmail.com Precedence: bulk X-list: xfs I have the same problem as posted in: http://oss.sgi.com/archives/xfs/2006-02/msg00091.html using xfsprogs-2.9.3 in linux 2.4.29 after running xfs_repair on a read-only mounted root filesystem, xfs_check still shows errors: # ./xfs_check.sh -f /dev/md1 sb_ifree 993009, counted 993008 sb_fdblocks 3119630, counted 3119633 # ./xfs_info.sh / meta-data=/ isize=256 agcount=56, agsize=1048576 blks = sectsz=512 data = bsize=4096 blocks=58587014, imaxpct=25 = sunit=0 swidth=0 blks, unwritten=0 naming =version 2 bsize=4096 log =internal bsize=4096 blocks=2382, version=1 = sectsz=512 sunit=0 blks realtime =none extsz=65536 blocks=0, rtextents=0 It's possible, even likely, I had corruption due to a power outtage and Seagate ATAPI drives that had write caching enabled by default. From owner-xfs@oss.sgi.com Thu Aug 23 04:53:42 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 04:53:44 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7NBrd4p018792 for ; Thu, 23 Aug 2007 04:53:41 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA24100; Thu, 23 Aug 2007 21:53:34 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 5164858C38F1; Thu, 23 Aug 2007 21:53:34 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - dinode endianess annotations Message-Id: <20070823115334.5164858C38F1@chook.melbourne.sgi.com> Date: Thu, 23 Aug 2007 21:53:34 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12600 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs dinode endianess annotations Biggest bit is duplicating the dinode structure so we have one annoted for native endianess and one for disk endianess. The other significant change is that xfs_xlate_dinode_core is split into one helper per direction to allow for proper annotations, everything else is trivial. As a sidenode splitting out the incore dinode means we can move it into xfs_inode.h in a later patch and severly improving on the include hell in xfs. Signed-off-by: Christoph Hellwig Date: Thu Aug 23 21:53:01 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29476a fs/xfs/xfsidbg.c - 1.321 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfsidbg.c.diff?r1=text&tr1=1.321&r2=text&tr2=1.320&f=h - add endian notations for the dinode. fs/xfs/xfs_ialloc.c - 1.195 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_ialloc.c.diff?r1=text&tr1=1.195&r2=text&tr2=1.194&f=h - add endian notations for the dinode. fs/xfs/xfs_itable.c - 1.153 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_itable.c.diff?r1=text&tr1=1.153&r2=text&tr2=1.152&f=h - add endian notations for the dinode. fs/xfs/xfs_log_recover.c - 1.321 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_log_recover.c.diff?r1=text&tr1=1.321&r2=text&tr2=1.320&f=h - add endian notations for the dinode. fs/xfs/xfs_inode.c - 1.471 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.c.diff?r1=text&tr1=1.471&r2=text&tr2=1.470&f=h - add endian notations for the dinode. fs/xfs/xfs_inode.h - 1.224 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.h.diff?r1=text&tr1=1.224&r2=text&tr2=1.223&f=h - add endian notations for the dinode. fs/xfs/xfs_dinode.h - 1.82 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dinode.h.diff?r1=text&tr1=1.82&r2=text&tr2=1.81&f=h - add endian notations for the dinode. fs/xfs/linux-2.6/xfs_ksyms.c - 1.61 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_ksyms.c.diff?r1=text&tr1=1.61&r2=text&tr2=1.60&f=h - add endian notations for the dinode. fs/xfs/dmapi/xfs_dm.c - 1.42 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm.c.diff?r1=text&tr1=1.42&r2=text&tr2=1.41&f=h - add endian notations for the dinode. From owner-xfs@oss.sgi.com Thu Aug 23 05:03:24 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 05:03:26 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7NC3K4p020901 for ; Thu, 23 Aug 2007 05:03:23 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id WAA24483; Thu, 23 Aug 2007 22:03:16 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 6FDBD58C38F1; Thu, 23 Aug 2007 22:03:16 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - superblock endianess annotations Message-Id: <20070823120316.6FDBD58C38F1@chook.melbourne.sgi.com> Date: Thu, 23 Aug 2007 22:03:16 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12601 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs superblock endianess annotations Creates a new xfs_dsb_t that is __be annotated and keeps xfs_sb_t for the incore one. xfs_xlatesb is renamed to xfs_sb_to_disk and only handles the incore -> disk conversion. A new helper xfs_sb_from_disk handles the other direction and doesn't need the slightly hacky table-driven approach because we only ever read the full sb from disk. The handling of shared r/o filesystems has been buggy on little endian system and fixing this required shuffling around of some code in that area. Signed-off-by: Christoph Hellwig Date: Thu Aug 23 22:02:37 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29477a fs/xfs/xfsidbg.c - 1.322 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfsidbg.c.diff?r1=text&tr1=1.322&r2=text&tr2=1.321&f=h - Add superblock endian notations. fs/xfs/xfs_sb.h - 1.69 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_sb.h.diff?r1=text&tr1=1.69&r2=text&tr2=1.68&f=h - Add superblock endian notations. fs/xfs/xfs_log_recover.c - 1.322 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_log_recover.c.diff?r1=text&tr1=1.322&r2=text&tr2=1.321&f=h - Add superblock endian notations. fs/xfs/xfs_mount.h - 1.239 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.h.diff?r1=text&tr1=1.239&r2=text&tr2=1.238&f=h - Add superblock endian notations. fs/xfs/xfs_mount.c - 1.402 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.c.diff?r1=text&tr1=1.402&r2=text&tr2=1.401&f=h - Add superblock endian notations. fs/xfs/xfs_trans.c - 1.182 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_trans.c.diff?r1=text&tr1=1.182&r2=text&tr2=1.181&f=h - Add superblock endian notations. fs/xfs/xfs_fsops.c - 1.128 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_fsops.c.diff?r1=text&tr1=1.128&r2=text&tr2=1.127&f=h - Add superblock endian notations. fs/xfs/linux-2.6/xfs_ksyms.c - 1.62 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_ksyms.c.diff?r1=text&tr1=1.62&r2=text&tr2=1.61&f=h - Add superblock endian notations. From owner-xfs@oss.sgi.com Thu Aug 23 05:22:17 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 05:22:19 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7NCMD4p024232 for ; Thu, 23 Aug 2007 05:22:15 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id WAA24976; Thu, 23 Aug 2007 22:22:08 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 6416058C38F1; Thu, 23 Aug 2007 22:22:08 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - use filldir internally Message-Id: <20070823122208.6416058C38F1@chook.melbourne.sgi.com> Date: Thu, 23 Aug 2007 22:22:08 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12602 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs use filldir internally Currently xfs has a rather complicated internal scheme to allow for different directory formats in IRIX. This patch rips all code related to this out and pushes useage of the Linux filldir callback into the lowlevel directory code. This does not make the code any less portable because filldir can be used to create dirents of all possible variations (including the IRIX ones as proved by the IRIX binary emulation code under arch/mips/). This patch get rid of an unessecary copy in the readdir path, about 400 lines of code and one of the last two users of the uio structure. This version is updated to deal with dmapi aswell which greatly simplifies the get_dirattrs code. The dmapi part has been tested using the get_dirattrs tools from the xfstest dmapi suite1 with various small and large directories. Signed-off-by: Christoph Hellwig Date: Thu Aug 23 22:21:37 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29478a fs/xfs/xfs_vnodeops.c - 1.706 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vnodeops.c.diff?r1=text&tr1=1.706&r2=text&tr2=1.705&f=h - Use the generic filldir directory formatter callbacks rather than the complex xfs_uio_move based implementation. Removes a copy and simplifies the code greatly. fs/xfs/xfs_dir2_block.c - 1.56 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dir2_block.c.diff?r1=text&tr1=1.56&r2=text&tr2=1.55&f=h - Use the generic filldir directory formatter callbacks rather than the complex xfs_uio_move based implementation. Removes a copy and simplifies the code greatly. fs/xfs/xfs_dir2_block.h - 1.19 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dir2_block.h.diff?r1=text&tr1=1.19&r2=text&tr2=1.18&f=h - Use the generic filldir directory formatter callbacks rather than the complex xfs_uio_move based implementation. Removes a copy and simplifies the code greatly. fs/xfs/xfs_dir2_sf.h - 1.24 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dir2_sf.h.diff?r1=text&tr1=1.24&r2=text&tr2=1.23&f=h - Use the generic filldir directory formatter callbacks rather than the complex xfs_uio_move based implementation. Removes a copy and simplifies the code greatly. fs/xfs/xfs_dir2_sf.c - 1.48 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dir2_sf.c.diff?r1=text&tr1=1.48&r2=text&tr2=1.47&f=h - Use the generic filldir directory formatter callbacks rather than the complex xfs_uio_move based implementation. Removes a copy and simplifies the code greatly. fs/xfs/xfs_dir2_leaf.c - 1.59 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dir2_leaf.c.diff?r1=text&tr1=1.59&r2=text&tr2=1.58&f=h - Use the generic filldir directory formatter callbacks rather than the complex xfs_uio_move based implementation. Removes a copy and simplifies the code greatly. fs/xfs/xfs_dir2_leaf.h - 1.25 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dir2_leaf.h.diff?r1=text&tr1=1.25&r2=text&tr2=1.24&f=h - Use the generic filldir directory formatter callbacks rather than the complex xfs_uio_move based implementation. Removes a copy and simplifies the code greatly. fs/xfs/xfs_types.h - 1.80 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_types.h.diff?r1=text&tr1=1.80&r2=text&tr2=1.79&f=h - Use the generic filldir directory formatter callbacks rather than the complex xfs_uio_move based implementation. Removes a copy and simplifies the code greatly. fs/xfs/xfs_dir2.h - 1.20 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dir2.h.diff?r1=text&tr1=1.20&r2=text&tr2=1.19&f=h - Use the generic filldir directory formatter callbacks rather than the complex xfs_uio_move based implementation. Removes a copy and simplifies the code greatly. fs/xfs/xfs_dir2.c - 1.57 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dir2.c.diff?r1=text&tr1=1.57&r2=text&tr2=1.56&f=h - Use the generic filldir directory formatter callbacks rather than the complex xfs_uio_move based implementation. Removes a copy and simplifies the code greatly. fs/xfs/linux-2.6/xfs_file.c - 1.152 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_file.c.diff?r1=text&tr1=1.152&r2=text&tr2=1.151&f=h - Use the generic filldir directory formatter callbacks rather than the complex xfs_uio_move based implementation. Removes a copy and simplifies the code greatly. fs/xfs/linux-2.6/xfs_vnode.h - 1.129 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vnode.h.diff?r1=text&tr1=1.129&r2=text&tr2=1.128&f=h - Use the generic filldir directory formatter callbacks rather than the complex xfs_uio_move based implementation. Removes a copy and simplifies the code greatly. fs/xfs/linux-2.6/xfs_ksyms.c - 1.63 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_ksyms.c.diff?r1=text&tr1=1.63&r2=text&tr2=1.62&f=h - Use the generic filldir directory formatter callbacks rather than the complex xfs_uio_move based implementation. Removes a copy and simplifies the code greatly. fs/xfs/dmapi/xfs_dm.c - 1.43 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm.c.diff?r1=text&tr1=1.43&r2=text&tr2=1.42&f=h - Use the generic filldir directory formatter callbacks rather than the complex xfs_uio_move based implementation. Removes a copy and simplifies the code greatly. From owner-xfs@oss.sgi.com Thu Aug 23 05:44:33 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 05:44:35 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7NCiS4p027257 for ; Thu, 23 Aug 2007 05:44:32 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id WAA25540; Thu, 23 Aug 2007 22:44:24 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 99C7858C38F1; Thu, 23 Aug 2007 22:44:24 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - stop using uio in the readlink code Message-Id: <20070823124424.99C7858C38F1@chook.melbourne.sgi.com> Date: Thu, 23 Aug 2007 22:44:24 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12603 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs stop using uio in the readlink code Simplify the readlink code to get rid of the last user of uio. Signed-off-by: Christoph Hellwig Date: Thu Aug 23 22:43:50 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29479a fs/xfs/xfs_vnodeops.c - 1.707 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vnodeops.c.diff?r1=text&tr1=1.707&r2=text&tr2=1.706&f=h - stop using uio in the readlink code. fs/xfs/linux-2.6/xfs_ioctl.c - 1.146 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_ioctl.c.diff?r1=text&tr1=1.146&r2=text&tr2=1.145&f=h - stop using uio in the readlink code. fs/xfs/linux-2.6/xfs_vnode.h - 1.130 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vnode.h.diff?r1=text&tr1=1.130&r2=text&tr2=1.129&f=h - stop using uio in the readlink code. fs/xfs/linux-2.6/xfs_iops.c - 1.259 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_iops.c.diff?r1=text&tr1=1.259&r2=text&tr2=1.258&f=h - stop using uio in the readlink code. From owner-xfs@oss.sgi.com Thu Aug 23 05:49:51 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 05:49:53 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7NCnm4p028316 for ; Thu, 23 Aug 2007 05:49:50 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id WAA25724; Thu, 23 Aug 2007 22:49:44 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 33A4E58C38F1; Thu, 23 Aug 2007 22:49:44 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - kill move.[ch] Message-Id: <20070823124944.33A4E58C38F1@chook.melbourne.sgi.com> Date: Thu, 23 Aug 2007 22:49:44 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12604 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs kill move.[ch] Kill uio related functions and defines now that they're unused. Signed-off-by: Christoph Hellwig Date: Thu Aug 23 22:49:17 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29480a fs/xfs/support/move.h - 1.20 - deleted http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/support/move.h.diff?r1=text&tr1=1.20&r2=text&tr2=1.19&f=h - kill move.[ch] now they are unused. fs/xfs/support/move.c - 1.19 - deleted http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/support/move.c.diff?r1=text&tr1=1.19&r2=text&tr2=1.18&f=h - kill move.[ch] now they are unused. fs/xfs/Makefile-linux-2.6 - 1.208 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/Makefile-linux-2.6.diff?r1=text&tr1=1.208&r2=text&tr2=1.207&f=h - kill move.[ch] now they are unused. fs/xfs/linux-2.6/xfs_linux.h - 1.156 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_linux.h.diff?r1=text&tr1=1.156&r2=text&tr2=1.155&f=h - kill move.[ch] now they are unused. From owner-xfs@oss.sgi.com Thu Aug 23 06:02:12 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 06:02:14 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7ND264p030174 for ; Thu, 23 Aug 2007 06:02:10 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id XAA26077; Thu, 23 Aug 2007 23:02:00 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 7A4CD58C38F1; Thu, 23 Aug 2007 23:02:00 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: TAKE 969561 - Radix tree based inode caching Message-Id: <20070823130200.7A4CD58C38F1@chook.melbourne.sgi.com> Date: Thu, 23 Aug 2007 23:02:00 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12605 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs Radix tree based inode caching One of the perpetual scaling problems XFS has is indexing it's incore inodes. We currently uses hashes and the default hash sizes chosen can only ever be a tradeoff between memory consumption and the maximum realistic size of the cache. As a result, anyone who has millions of inodes cached on a filesystem needs to tunes the size of the cache via the ihashsize mount option to allow decent scalability with inode cache operations. A further problem is the separate inode cluster hash, whose size is based on the ihashsize but is smaller, and so under certain conditions (sparse cluster cache population) this can become a limitation long before the inode hash is causing issues. The following patchset removes the inode hash and cluster hash and replaces them with radix trees to avoid the scalability limitations of the hashes. It also reduces the size of the inodes by 3 pointers.... Date: Thu Aug 23 23:01:35 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29481a fs/xfs/xfsidbg.c - 1.323 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfsidbg.c.diff?r1=text&tr1=1.323&r2=text&tr2=1.322&f=h - Convert xfs inode caches from hashes to radix trees. fs/xfs/xfs_ag.h - 1.61 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_ag.h.diff?r1=text&tr1=1.61&r2=text&tr2=1.60&f=h - Convert xfs inode caches from hashes to radix trees. fs/xfs/xfs_extfree_item.c - 1.67 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_extfree_item.c.diff?r1=text&tr1=1.67&r2=text&tr2=1.66&f=h - Convert xfs inode caches from hashes to radix trees. fs/xfs/xfs_buf_item.c - 1.163 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_buf_item.c.diff?r1=text&tr1=1.163&r2=text&tr2=1.162&f=h - Convert xfs inode caches from hashes to radix trees. fs/xfs/xfs_trans_ail.c - 1.81 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_trans_ail.c.diff?r1=text&tr1=1.81&r2=text&tr2=1.80&f=h - Convert xfs inode caches from hashes to radix trees. fs/xfs/xfs_vnodeops.c - 1.708 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vnodeops.c.diff?r1=text&tr1=1.708&r2=text&tr2=1.707&f=h - Convert xfs inode caches from hashes to radix trees. fs/xfs/xfs_dir2_block.c - 1.57 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dir2_block.c.diff?r1=text&tr1=1.57&r2=text&tr2=1.56&f=h - Convert xfs inode caches from hashes to radix trees. fs/xfs/xfs_vfsops.c - 1.526 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vfsops.c.diff?r1=text&tr1=1.526&r2=text&tr2=1.525&f=h - Convert xfs inode caches from hashes to radix trees. fs/xfs/xfs_iget.c - 1.226 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_iget.c.diff?r1=text&tr1=1.226&r2=text&tr2=1.225&f=h - Convert xfs inode caches from hashes to radix trees. fs/xfs/xfs_clnt.h - 1.56 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_clnt.h.diff?r1=text&tr1=1.56&r2=text&tr2=1.55&f=h - Convert xfs inode caches from hashes to radix trees. fs/xfs/xfs_dir2_sf.c - 1.49 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dir2_sf.c.diff?r1=text&tr1=1.49&r2=text&tr2=1.48&f=h - Convert xfs inode caches from hashes to radix trees. fs/xfs/xfs_mount.h - 1.240 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.h.diff?r1=text&tr1=1.240&r2=text&tr2=1.239&f=h - Convert xfs inode caches from hashes to radix trees. fs/xfs/xfs_mount.c - 1.403 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.c.diff?r1=text&tr1=1.403&r2=text&tr2=1.402&f=h - Convert xfs inode caches from hashes to radix trees. fs/xfs/xfs_dir2_data.c - 1.39 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dir2_data.c.diff?r1=text&tr1=1.39&r2=text&tr2=1.38&f=h - Convert xfs inode caches from hashes to radix trees. fs/xfs/xfs_trans_extfree.c - 1.28 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_trans_extfree.c.diff?r1=text&tr1=1.28&r2=text&tr2=1.27&f=h - Convert xfs inode caches from hashes to radix trees. fs/xfs/xfs_inode.c - 1.472 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.c.diff?r1=text&tr1=1.472&r2=text&tr2=1.471&f=h - Convert xfs inode caches from hashes to radix trees. fs/xfs/xfs_inode.h - 1.225 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.h.diff?r1=text&tr1=1.225&r2=text&tr2=1.224&f=h - Convert xfs inode caches from hashes to radix trees. fs/xfs/xfs_error.c - 1.57 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_error.c.diff?r1=text&tr1=1.57&r2=text&tr2=1.56&f=h - Convert xfs inode caches from hashes to radix trees. fs/xfs/xfs_dir2_node.c - 1.60 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dir2_node.c.diff?r1=text&tr1=1.60&r2=text&tr2=1.59&f=h - Convert xfs inode caches from hashes to radix trees. fs/xfs/xfs_rename.c - 1.72 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_rename.c.diff?r1=text&tr1=1.72&r2=text&tr2=1.71&f=h - Convert xfs inode caches from hashes to radix trees. fs/xfs/linux-2.6/xfs_ksyms.c - 1.64 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_ksyms.c.diff?r1=text&tr1=1.64&r2=text&tr2=1.63&f=h - Convert xfs inode caches from hashes to radix trees. fs/xfs/linux-2.6/xfs_export.c - 1.13 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_export.c.diff?r1=text&tr1=1.13&r2=text&tr2=1.12&f=h - Convert xfs inode caches from hashes to radix trees. Modid: 2.6.x-xfs-melb:linux:29481b Documentation/filesystems/xfs.txt - 1.19 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/linux-2.6-xfs/Documentation/filesystems/xfs.txt.diff?r1=text&tr1=1.19&r2=text&tr2=1.18&f=h - Update ihashsize mount option as deprecated. From owner-xfs@oss.sgi.com Thu Aug 23 12:38:11 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 12:38:15 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_20 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7NJc94p003015 for ; Thu, 23 Aug 2007 12:38:10 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7NJc7A5008515 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 23 Aug 2007 21:38:07 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7NJc7Ts008513 for xfs@oss.sgi.com; Thu, 23 Aug 2007 21:38:07 +0200 Date: Thu, 23 Aug 2007 21:38:07 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH 4/17] kill the v_flag member in struct bhv_vnode Message-ID: <20070823193807.GE8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12610 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs All flags previous handled at the vnode level are not in the xfs_inode where we already have a flags mechanisms and free bits for flags previously in the vnode. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm.c 2007-08-13 18:00:49.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c 2007-08-13 18:00:51.000000000 +0200 @@ -2599,7 +2599,7 @@ xfs_dm_punch_hole( /* Let threads in send_data_event know we punched the file. */ ip->i_iocore.io_dmstate++; xfs_iunlock(ip, XFS_IOLOCK_EXCL); - VMODIFY(vp); + xfs_iflags_set(ip, XFS_IMODIFIED); up_and_out: up_rw_sems(inode, DM_SEM_FLAG_WR); @@ -2988,7 +2988,7 @@ xfs_dm_sync_by_handle( dm_right_t right) { int err, ret; - bhv_vnode_t *vp = vn_from_inode(inode); + xfs_inode_t *ip = XFS_I(inode); /* Returns negative errors to DMAPI */ if (right < DM_RIGHT_EXCL) @@ -2997,7 +2997,7 @@ xfs_dm_sync_by_handle( /* We need to protect against concurrent writers.. */ ret = filemap_fdatawrite(inode->i_mapping); down_rw_sems(inode, DM_FLAGS_IMUX); - err = xfs_fsync(XFS_I(inode), FSYNC_WAIT, 0, -1); + err = xfs_fsync(ip, FSYNC_WAIT, 0, -1); if (!ret) ret = err; up_rw_sems(inode, DM_FLAGS_IMUX); @@ -3005,9 +3005,7 @@ xfs_dm_sync_by_handle( if (!ret) ret = err; - if (VN_TRUNC(vp)) - VUNTRUNCATE(vp); - + xfs_iflags_clear(ip, XFS_ITRUNCATED); if (ret > 0) ret = -ret; /* Return negative errors to DMAPI */ Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_aops.c 2007-08-13 18:00:46.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c 2007-08-13 18:00:51.000000000 +0200 @@ -303,13 +303,13 @@ xfs_map_blocks( xfs_iomap_t *mapp, int flags) { - bhv_vnode_t *vp = vn_from_inode(inode); + xfs_inode_t *ip = XFS_I(inode); int error, nmaps = 1; - error = xfs_bmap(xfs_vtoi(vp), offset, count, + error = xfs_bmap(ip, offset, count, flags, mapp, &nmaps); if (!error && (flags & (BMAPI_WRITE|BMAPI_ALLOCATE))) - VMODIFY(vp); + xfs_iflags_set(ip, XFS_IMODIFIED); return -error; } @@ -1245,10 +1245,7 @@ xfs_vm_writepages( struct address_space *mapping, struct writeback_control *wbc) { - struct bhv_vnode *vp = vn_from_inode(mapping->host); - - if (VN_TRUNC(vp)) - VUNTRUNCATE(vp); + xfs_iflags_clear(XFS_I(mapping->host), XFS_ITRUNCATED); return generic_writepages(mapping, wbc); } Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_file.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_file.c 2007-08-13 18:00:49.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_file.c 2007-08-13 18:00:51.000000000 +0200 @@ -217,13 +217,11 @@ xfs_file_fsync( struct dentry *dentry, int datasync) { - bhv_vnode_t *vp = vn_from_inode(dentry->d_inode); int flags = FSYNC_WAIT; if (datasync) flags |= FSYNC_DATA; - if (VN_TRUNC(vp)) - VUNTRUNCATE(vp); + xfs_iflags_clear(XFS_I(dentry->d_inode), XFS_ITRUNCATED); return -xfs_fsync(XFS_I(dentry->d_inode), flags, (xfs_off_t)0, (xfs_off_t)-1); } @@ -300,10 +298,9 @@ xfs_file_ioctl( { int error; struct inode *inode = filp->f_path.dentry->d_inode; - bhv_vnode_t *vp = vn_from_inode(inode); error = xfs_ioctl(XFS_I(inode), filp, 0, cmd, (void __user *)p); - VMODIFY(vp); + xfs_iflags_set(XFS_I(inode), XFS_IMODIFIED); /* NOTE: some of the ioctl's return positive #'s as a * byte count indicating success, such as @@ -322,10 +319,9 @@ xfs_file_ioctl_invis( { int error; struct inode *inode = filp->f_path.dentry->d_inode; - bhv_vnode_t *vp = vn_from_inode(inode); error = xfs_ioctl(XFS_I(inode), filp, IO_INVIS, cmd, (void __user *)p); - VMODIFY(vp); + xfs_iflags_set(XFS_I(inode), XFS_IMODIFIED); /* NOTE: some of the ioctl's return positive #'s as a * byte count indicating success, such as Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_fs_subr.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_fs_subr.c 2007-08-13 18:00:41.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_fs_subr.c 2007-08-13 18:00:51.000000000 +0200 @@ -61,8 +61,7 @@ xfs_flushinval_pages( int ret = 0; if (VN_CACHED(vp)) { - if (VN_TRUNC(vp)) - VUNTRUNCATE(vp); + xfs_iflags_clear(ip, XFS_ITRUNCATED); ret = filemap_write_and_wait(inode->i_mapping); if (!ret) truncate_inode_pages(inode->i_mapping, first); @@ -84,8 +83,7 @@ xfs_flush_pages( int ret2; if (VN_DIRTY(vp)) { - if (VN_TRUNC(vp)) - VUNTRUNCATE(vp); + xfs_iflags_clear(ip, XFS_ITRUNCATED); ret = filemap_fdatawrite(inode->i_mapping); if (flags & XFS_B_ASYNC) return ret; Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl32.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_ioctl32.c 2007-08-13 18:00:46.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl32.c 2007-08-13 18:00:51.000000000 +0200 @@ -371,7 +371,6 @@ xfs_compat_ioctl( unsigned long arg) { struct inode *inode = file->f_path.dentry->d_inode; - bhv_vnode_t *vp = vn_from_inode(inode); int error; switch (cmd) { @@ -459,7 +458,7 @@ xfs_compat_ioctl( } error = xfs_ioctl(XFS_I(inode), file, mode, cmd, (void __user *)arg); - VMODIFY(vp); + xfs_iflags_set(XFS_I(inode), XFS_IMODIFIED); return error; } Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_iops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_iops.c 2007-08-13 18:00:46.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_iops.c 2007-08-13 18:00:51.000000000 +0200 @@ -221,7 +221,7 @@ xfs_init_security( error = xfs_attr_set(XFS_I(ip), name, value, length, ATTR_SECURE); if (!error) - VMODIFY(vp); + xfs_iflags_set(XFS_I(ip), XFS_IMODIFIED); kfree(name); kfree(value); @@ -327,7 +327,7 @@ xfs_vn_mknod( if (!error) { error = _ACL_INHERIT(vp, &vattr, default_acl); if (!error) - VMODIFY(vp); + xfs_iflags_set(XFS_I(&vp->v_inode), XFS_IMODIFIED); else xfs_cleanup_inode(dir, vp, dentry, mode); } @@ -409,7 +409,7 @@ xfs_vn_link( if (unlikely(error)) { VN_RELE(vp); } else { - VMODIFY(vn_from_inode(dir)); + xfs_iflags_set(XFS_I(dir), XFS_IMODIFIED); xfs_validate_fields(ip, &vattr); d_instantiate(dentry, ip); } Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_super.c 2007-08-13 18:00:49.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c 2007-08-13 18:00:51.000000000 +0200 @@ -197,7 +197,7 @@ xfs_revalidate_inode( inode->i_flags |= S_NOATIME; else inode->i_flags &= ~S_NOATIME; - vp->v_flag &= ~VMODIFIED; + xfs_iflags_clear(ip, XFS_IMODIFIED); } void @@ -448,13 +448,12 @@ xfs_fs_clear_inode( if (XFS_I(inode)) xfs_inactive(XFS_I(inode)); - VN_LOCK(vp); - vp->v_flag &= ~VMODIFIED; - VN_UNLOCK(vp, 0); - if (XFS_I(inode)) + if (XFS_I(inode)) { + xfs_iflags_clear(XFS_I(inode), XFS_IMODIFIED); if (xfs_reclaim(XFS_I(inode))) panic("%s: cannot reclaim 0x%p\n", __FUNCTION__, vp); + } ASSERT(XFS_I(inode) == NULL); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vnode.c 2007-08-13 18:00:49.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c 2007-08-13 18:00:51.000000000 +0200 @@ -84,9 +84,6 @@ vn_initialize( XFS_STATS_INC(vn_active); XFS_STATS_INC(vn_alloc); - vp->v_flag = VMODIFIED; - spinlock_init(&vp->v_lock, "v_lock"); - spin_lock(&vnumber_lock); if (!++vn_generation) /* v_number shouldn't be zero */ vn_generation++; @@ -157,7 +154,7 @@ __vn_revalidate( error = xfs_getattr(xfs_vtoi(vp), vattr, 0); if (likely(!error)) { vn_revalidate_core(vp, vattr); - VUNMODIFY(vp); + xfs_iflags_clear(xfs_vtoi(vp), XFS_IMODIFIED); } return -error; } @@ -182,10 +179,8 @@ vn_hold( XFS_STATS_INC(vn_hold); - VN_LOCK(vp); inode = igrab(vn_to_inode(vp)); ASSERT(inode); - VN_UNLOCK(vp, 0); return vp; } @@ -199,7 +194,7 @@ vn_hold( /* 2 */ (void *)(__psint_t) line, \ /* 3 */ (void *)(__psint_t)(vn_count(vp)), \ /* 4 */ (void *)(ra), \ -/* 5 */ (void *)(__psunsigned_t)(vp)->v_flag, \ +/* 5 */ NULL, \ /* 6 */ (void *)(__psint_t)current_cpu(), \ /* 7 */ (void *)(__psint_t)current_pid(), \ /* 8 */ (void *)__return_address, \ Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vnode.h 2007-08-13 18:00:49.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.h 2007-08-13 18:00:51.000000000 +0200 @@ -27,20 +27,8 @@ struct attrlist_cursor_kern; typedef struct dentry bhv_vname_t; typedef __u64 bhv_vnumber_t; -typedef enum bhv_vflags { - VMODIFIED = 0x08, /* XFS inode state possibly differs */ - /* to the Linux inode state. */ - VTRUNCATED = 0x40, /* truncated down so flush-on-close */ -} bhv_vflags_t; - -/* - * MP locking protocols: - * v_flag, VN_LOCK/VN_UNLOCK - */ typedef struct bhv_vnode { - bhv_vflags_t v_flag; /* vnode flags (see above) */ bhv_vnumber_t v_number; /* in-core vnode number */ - spinlock_t v_lock; /* VN_LOCK/VN_UNLOCK */ atomic_t v_iocount; /* outstanding I/O count */ #ifdef XFS_VNODE_TRACE struct ktrace *v_trace; /* trace header structure */ @@ -255,35 +243,6 @@ static inline struct bhv_vnode *vn_grab( #define VNAME_TO_VNODE(dentry) (vn_from_inode((dentry)->d_inode)) /* - * Vnode spinlock manipulation. - */ -#define VN_LOCK(vp) mutex_spinlock(&(vp)->v_lock) -#define VN_UNLOCK(vp, s) mutex_spinunlock(&(vp)->v_lock, s) - -STATIC_INLINE void vn_flagset(struct bhv_vnode *vp, uint flag) -{ - spin_lock(&vp->v_lock); - vp->v_flag |= flag; - spin_unlock(&vp->v_lock); -} - -STATIC_INLINE uint vn_flagclr(struct bhv_vnode *vp, uint flag) -{ - uint cleared; - - spin_lock(&vp->v_lock); - cleared = (vp->v_flag & flag); - vp->v_flag &= ~flag; - spin_unlock(&vp->v_lock); - return cleared; -} - -#define VMODIFY(vp) vn_flagset(vp, VMODIFIED) -#define VUNMODIFY(vp) vn_flagclr(vp, VMODIFIED) -#define VTRUNCATE(vp) vn_flagset(vp, VTRUNCATED) -#define VUNTRUNCATE(vp) vn_flagclr(vp, VTRUNCATED) - -/* * Dealing with bad inodes */ static inline void vn_mark_bad(struct bhv_vnode *vp) @@ -322,7 +281,6 @@ static inline void vn_atime_to_time_t(bh #define VN_CACHED(vp) (vn_to_inode(vp)->i_mapping->nrpages) #define VN_DIRTY(vp) mapping_tagged(vn_to_inode(vp)->i_mapping, \ PAGECACHE_TAG_DIRTY) -#define VN_TRUNC(vp) ((vp)->v_flag & VTRUNCATED) /* * Flags to vop_setattr/getattr. Index: linux-2.6-xfs/fs/xfs/xfs_iget.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_iget.c 2007-08-13 18:00:46.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_iget.c 2007-08-13 18:00:51.000000000 +0200 @@ -346,6 +346,7 @@ finish_inode: ASSERT(((ip->i_d.di_flags & XFS_DIFLAG_REALTIME) != 0) == ((ip->i_iocore.io_flags & XFS_IOCORE_RT) != 0)); + xfs_iflags_set(ip, XFS_IMODIFIED); *ipp = ip; /* Index: linux-2.6-xfs/fs/xfs/xfs_inode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_inode.h 2007-08-13 18:00:46.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_inode.h 2007-08-13 18:00:51.000000000 +0200 @@ -392,6 +392,9 @@ xfs_iflags_test(xfs_inode_t *ip, unsigne #define XFS_IRECLAIMABLE 0x0020 /* inode can be reclaimed */ #define XFS_INEW 0x0040 #define XFS_IFILESTREAM 0x0080 /* inode is in a filestream directory */ +#define XFS_IMODIFIED 0x0100 /* XFS inode state possibly differs */ + /* to the Linux inode state. */ +#define XFS_ITRUNCATED 0x0200 /* truncated down so flush-on-close */ /* * Flags for inode locking. Index: linux-2.6-xfs/fs/xfs/xfs_vnodeops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vnodeops.c 2007-08-13 18:00:49.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vnodeops.c 2007-08-13 18:00:51.000000000 +0200 @@ -660,7 +660,7 @@ xfs_setattr( * vnode and flush it when the file is closed, and * do not wait the usual (long) time for writeout. */ - VTRUNCATE(vp); + xfs_iflags_set(ip, XFS_ITRUNCATED); } /* * Have to do this even if the file's size doesn't change. @@ -1516,6 +1516,8 @@ xfs_release( return 0; if (!XFS_FORCED_SHUTDOWN(mp)) { + int truncated; + /* * If we are using filestreams, and we have an unlinked * file that we are processing the last close on, then nothing @@ -1536,7 +1538,13 @@ xfs_release( * significantly reducing the time window where we'd otherwise * be exposed to that problem. */ - if (VUNTRUNCATE(vp) && VN_DIRTY(vp) && ip->i_delayed_blks > 0) + spin_lock(&ip->i_flags_lock); + truncated = __xfs_iflags_test(ip, XFS_ITRUNCATED); + if (truncated) + ip->i_flags &= ~XFS_ITRUNCATED; + spin_unlock(&ip->i_flags_lock); + + if (truncated && VN_DIRTY(vp) && ip->i_delayed_blks > 0) xfs_flush_pages(ip, 0, -1, XFS_B_ASYNC, FI_NONE); } Index: linux-2.6-xfs/fs/xfs/xfsidbg.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfsidbg.c 2007-08-13 18:00:49.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfsidbg.c 2007-08-13 18:00:51.000000000 +0200 @@ -1701,47 +1701,6 @@ static int kdbm_xfs_xtrans_res( return 0; } -/* - * Vnode descriptor dump. - * This table is a string version of all the flags defined in vnode.h. - */ -char *tab_vflags[] = { - /* local only flags */ - "VINACT", /* 0x01 */ - "VRECLM", /* 0x02 */ - "VWAIT", /* 0x04 */ - "VMODIFIED", /* 0x08 */ - "INVALID0x10", /* 0x10 */ - "INVALID0x20", /* 0x20 */ - "INVALID0x40", /* 0x40 */ - "INVALID0x80", /* 0x80 */ - "INVALID0x100", /* 0x100 */ - "INVALID0x200", /* 0x200 */ - "INVALID0x400", /* 0x400 */ - "INVALID0x800", /* 0x800 */ - "INVALID0x1000", /* 0x1000 */ - "INVALID0x2000", /* 0x2000 */ - "INVALID0x4000", /* 0x4000 */ - "INVALID0x8000", /* 0x8000 */ - "INVALID0x10000", /* 0x10000 */ - "INVALID0x20000", /* 0x20000 */ - "INVALID0x40000", /* 0x40000 */ - "INVALID0x80000", /* 0x80000 */ - "VROOT", /* 0x100000 */ - "INVALID0x200000", /* 0x200000 */ - "INVALID00x400000", /* 0x400000 */ - "INVALID0x800000", /* 0x800000 */ - "INVALID0x1000000", /* 0x1000000 */ - "INVALID0x2000000", /* 0x2000000 */ - "VSHARE", /* 0x4000000 */ - "INVALID0x8000000", /* 0x8000000 */ - "VENF_LOCKING", /* 0x10000000 */ - "VOPLOCK", /* 0x20000000 */ - "VPURGE", /* 0x40000000 */ - "INVALID0x80000000", /* 0x80000000 */ - NULL -}; - static void printflags(register uint64_t flags, register char **strings, @@ -1797,7 +1756,6 @@ static void printvnode(bhv_vnode_t *vp, { kdb_printf("vnode: 0x%lx\n", addr); - printflags((__psunsigned_t)vp->v_flag, tab_vflags, "flag ="); kdb_printf("\n"); #ifdef XFS_VNODE_TRACE @@ -1986,8 +1944,6 @@ vn_trace_pr_entry(ktrace_entry_t *ktep) kdb_printf(" cpu = %ld pid = %d ", (long)ktep->val[6], (pid_t)ktep->val[7]); - printflags((__psunsigned_t)ktep->val[5], tab_vflags, "flag ="); - if (kdbnearsym((unsigned int)ktep->val[4], &symtab)) { unsigned long offval; @@ -6697,6 +6653,8 @@ xfsidbg_xnode(xfs_inode_t *ip) "quiesce", /* XFS_IQUIESCE */ "reclaim", /* XFS_IRECLAIM */ "stale", /* XFS_ISTALE */ + "modified", /* XFS_IMODIFIED */ + "truncated", /* XFS_ITRUNCATED */ NULL }; From owner-xfs@oss.sgi.com Thu Aug 23 12:38:38 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 12:38:41 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_65 autolearn=no version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7NJca4p003408 for ; Thu, 23 Aug 2007 12:38:37 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7NJcYA5008558 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 23 Aug 2007 21:38:34 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7NJcYva008556 for xfs@oss.sgi.com; Thu, 23 Aug 2007 21:38:34 +0200 Date: Thu, 23 Aug 2007 21:38:34 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH 6/17] move v_trace from bhv_vnode to xfs_inode Message-ID: <20070823193834.GG8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12612 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs struct bhv_vnode is on it's way out, so move the trace buffer to the XFS inode. Note that this makes the tracing macros rather misnamed, but this kind of fallout will be fixed up incrementally later on. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_aops.c 2007-08-23 14:51:38.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c 2007-08-23 14:53:52.000000000 +0200 @@ -1525,7 +1525,7 @@ xfs_vm_bmap( struct inode *inode = (struct inode *)mapping->host; struct xfs_inode *ip = XFS_I(inode); - vn_trace_entry(vn_from_inode(inode), __FUNCTION__, + vn_trace_entry(XFS_I(inode), __FUNCTION__, (inst_t *)__return_address); xfs_rwlock(ip, VRWLOCK_READ); xfs_flush_pages(ip, (xfs_off_t)0, -1, 0, FI_REMAPF); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_ioctl.c 2007-08-23 14:51:38.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c 2007-08-23 14:53:52.000000000 +0200 @@ -733,7 +733,7 @@ xfs_ioctl( xfs_mount_t *mp = ip->i_mount; int error; - vn_trace_entry(vp, "xfs_ioctl", (inst_t *)__return_address); + vn_trace_entry(XFS_I(inode), "xfs_ioctl", (inst_t *)__return_address); switch (cmd) { Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_super.c 2007-08-23 14:51:37.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c 2007-08-23 14:53:52.000000000 +0200 @@ -412,7 +412,7 @@ xfs_fs_write_inode( { int error = 0, flags = FLUSH_INODE; - vn_trace_entry(vn_from_inode(inode), __FUNCTION__, + vn_trace_entry(XFS_I(inode), __FUNCTION__, (inst_t *)__return_address); if (sync) flags |= FLUSH_SYNC; @@ -432,34 +432,27 @@ STATIC void xfs_fs_clear_inode( struct inode *inode) { - bhv_vnode_t *vp = vn_from_inode(inode); - - vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); - - XFS_STATS_INC(vn_rele); - XFS_STATS_INC(vn_remove); - XFS_STATS_INC(vn_reclaim); - XFS_STATS_DEC(vn_active); + xfs_inode_t *ip = XFS_I(inode); /* - * This can happen because xfs_iget_core calls xfs_idestroy if we + * ip can be null when xfs_iget_core calls xfs_idestroy if we * find an inode with di_mode == 0 but without IGET_CREATE set. */ - if (XFS_I(inode)) - xfs_inactive(XFS_I(inode)); - + if (ip) { + vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); - if (XFS_I(inode)) { - xfs_iflags_clear(XFS_I(inode), XFS_IMODIFIED); - if (xfs_reclaim(XFS_I(inode))) - panic("%s: cannot reclaim 0x%p\n", __FUNCTION__, vp); + XFS_STATS_INC(vn_rele); + XFS_STATS_INC(vn_remove); + XFS_STATS_INC(vn_reclaim); + XFS_STATS_DEC(vn_active); + + xfs_inactive(ip); + xfs_iflags_clear(ip, XFS_IMODIFIED); + if (xfs_reclaim(ip)) + panic("%s: cannot reclaim 0x%p\n", __FUNCTION__, inode); } ASSERT(XFS_I(inode) == NULL); - -#ifdef XFS_VNODE_TRACE - ktrace_free(vp->v_trace); -#endif } /* @@ -846,7 +839,8 @@ xfs_fs_fill_super( } if ((error = xfs_fs_start_syncd(vfsp))) goto fail_vnrele; - vn_trace_exit(rootvp, __FUNCTION__, (inst_t *)__return_address); + vn_trace_exit(XFS_I(sb->s_root->d_inode), __FUNCTION__, + (inst_t *)__return_address); kmem_free(args, sizeof(*args)); return 0; Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vnode.c 2007-08-23 14:53:07.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c 2007-08-23 14:53:56.000000000 +0200 @@ -103,11 +103,6 @@ vn_initialize( ASSERT(VN_CACHED(vp) == 0); -#ifdef XFS_VNODE_TRACE - vp->v_trace = ktrace_alloc(VNODE_TRACE_SIZE, KM_SLEEP); -#endif /* XFS_VNODE_TRACE */ - - vn_trace_exit(vp, __FUNCTION__, (inst_t *)__return_address); return vp; } @@ -158,7 +153,7 @@ __vn_revalidate( { int error; - vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(xfs_vtoi(vp), __FUNCTION__, (inst_t *)__return_address); vattr->va_mask = XFS_AT_STAT | XFS_AT_XFLAGS; error = xfs_getattr(xfs_vtoi(vp), vattr, 0); if (likely(!error)) { @@ -197,11 +192,11 @@ vn_hold( #ifdef XFS_VNODE_TRACE #define KTRACE_ENTER(vp, vk, s, line, ra) \ - ktrace_enter( (vp)->v_trace, \ + ktrace_enter( (ip)->i_trace, \ /* 0 */ (void *)(__psint_t)(vk), \ /* 1 */ (void *)(s), \ /* 2 */ (void *)(__psint_t) line, \ -/* 3 */ (void *)(__psint_t)(vn_count(vp)), \ +/* 3 */ NULL, \ /* 4 */ (void *)(ra), \ /* 5 */ NULL, \ /* 6 */ (void *)(__psint_t)current_cpu(), \ @@ -213,32 +208,32 @@ vn_hold( * Vnode tracing code. */ void -vn_trace_entry(bhv_vnode_t *vp, const char *func, inst_t *ra) +vn_trace_entry(xfs_inode_t *ip, const char *func, inst_t *ra) { - KTRACE_ENTER(vp, VNODE_KTRACE_ENTRY, func, 0, ra); + KTRACE_ENTER(ip, VNODE_KTRACE_ENTRY, func, 0, ra); } void -vn_trace_exit(bhv_vnode_t *vp, const char *func, inst_t *ra) +vn_trace_exit(xfs_inode_t *ip, const char *func, inst_t *ra) { - KTRACE_ENTER(vp, VNODE_KTRACE_EXIT, func, 0, ra); + KTRACE_ENTER(ip, VNODE_KTRACE_EXIT, func, 0, ra); } void -vn_trace_hold(bhv_vnode_t *vp, char *file, int line, inst_t *ra) +vn_trace_hold(xfs_inode_t *ip, char *file, int line, inst_t *ra) { - KTRACE_ENTER(vp, VNODE_KTRACE_HOLD, file, line, ra); + KTRACE_ENTER(ip, VNODE_KTRACE_HOLD, file, line, ra); } void -vn_trace_ref(bhv_vnode_t *vp, char *file, int line, inst_t *ra) +vn_trace_ref(xfs_inode_t *ip, char *file, int line, inst_t *ra) { - KTRACE_ENTER(vp, VNODE_KTRACE_REF, file, line, ra); + KTRACE_ENTER(ip, VNODE_KTRACE_REF, file, line, ra); } void -vn_trace_rele(bhv_vnode_t *vp, char *file, int line, inst_t *ra) +vn_trace_rele(xfs_inode_t *ip, char *file, int line, inst_t *ra) { - KTRACE_ENTER(vp, VNODE_KTRACE_RELE, file, line, ra); + KTRACE_ENTER(ip, VNODE_KTRACE_RELE, file, line, ra); } #endif /* XFS_VNODE_TRACE */ Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vnode.h 2007-08-23 14:51:37.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.h 2007-08-23 14:53:56.000000000 +0200 @@ -29,9 +29,6 @@ typedef __u64 bhv_vnumber_t; typedef struct bhv_vnode { bhv_vnumber_t v_number; /* in-core vnode number */ -#ifdef XFS_VNODE_TRACE - struct ktrace *v_trace; /* trace header structure */ -#endif struct inode v_inode; /* Linux inode */ /* inode MUST be last */ } bhv_vnode_t; @@ -222,9 +219,9 @@ extern bhv_vnode_t *vn_hold(struct bhv_v #if defined(XFS_VNODE_TRACE) #define VN_HOLD(vp) \ ((void)vn_hold(vp), \ - vn_trace_hold(vp, __FILE__, __LINE__, (inst_t *)__return_address)) + vn_trace_hold(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address)) #define VN_RELE(vp) \ - (vn_trace_rele(vp, __FILE__, __LINE__, (inst_t *)__return_address), \ + (vn_trace_rele(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address), \ iput(vn_to_inode(vp))) #else #define VN_HOLD(vp) ((void)vn_hold(vp)) @@ -314,21 +311,17 @@ static inline void vn_atime_to_time_t(bh #define VNODE_KTRACE_REF 4 #define VNODE_KTRACE_RELE 5 -extern void vn_trace_entry(struct bhv_vnode *, const char *, inst_t *); -extern void vn_trace_exit(struct bhv_vnode *, const char *, inst_t *); -extern void vn_trace_hold(struct bhv_vnode *, char *, int, inst_t *); -extern void vn_trace_ref(struct bhv_vnode *, char *, int, inst_t *); -extern void vn_trace_rele(struct bhv_vnode *, char *, int, inst_t *); - -#define VN_TRACE(vp) \ - vn_trace_ref(vp, __FILE__, __LINE__, (inst_t *)__return_address) +extern void vn_trace_entry(struct xfs_inode *, const char *, inst_t *); +extern void vn_trace_exit(struct xfs_inode *, const char *, inst_t *); +extern void vn_trace_hold(struct xfs_inode *, char *, int, inst_t *); +extern void vn_trace_ref(struct xfs_inode *, char *, int, inst_t *); +extern void vn_trace_rele(struct xfs_inode *, char *, int, inst_t *); #else #define vn_trace_entry(a,b,c) #define vn_trace_exit(a,b,c) #define vn_trace_hold(a,b,c,d) #define vn_trace_ref(a,b,c,d) #define vn_trace_rele(a,b,c,d) -#define VN_TRACE(vp) #endif #endif /* __XFS_VNODE_H__ */ Index: linux-2.6-xfs/fs/xfs/xfs_dir2.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_dir2.c 2007-08-23 14:51:38.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_dir2.c 2007-08-23 14:53:52.000000000 +0200 @@ -301,7 +301,7 @@ xfs_readdir( int rval; /* return value */ int v; /* type-checking value */ - vn_trace_entry(XFS_ITOV(dp), __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); if (XFS_FORCED_SHUTDOWN(dp->i_mount)) return XFS_ERROR(EIO); Index: linux-2.6-xfs/fs/xfs/xfs_iget.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_iget.c 2007-08-23 14:51:38.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_iget.c 2007-08-23 14:53:56.000000000 +0200 @@ -157,7 +157,7 @@ again: goto again; } - vn_trace_exit(vp, "xfs_iget.alloc", + vn_trace_exit(ip, "xfs_iget.alloc", (inst_t *)__return_address); XFS_STATS_INC(xs_ig_found); @@ -212,7 +212,7 @@ finish_inode: xfs_ilock(ip, lock_flags); xfs_iflags_clear(ip, XFS_ISTALE); - vn_trace_exit(vp, "xfs_iget.found", + vn_trace_exit(ip, "xfs_iget.found", (inst_t *)__return_address); goto return_ip; } @@ -234,7 +234,7 @@ finish_inode: return error; } - vn_trace_exit(vp, "xfs_iget.alloc", (inst_t *)__return_address); + vn_trace_exit(ip, "xfs_iget.alloc", (inst_t *)__return_address); xfs_inode_lock_init(ip, vp); xfs_iocore_inode_init(ip); @@ -477,7 +477,7 @@ xfs_iput(xfs_inode_t *ip, { bhv_vnode_t *vp = XFS_ITOV(ip); - vn_trace_entry(vp, "xfs_iput", (inst_t *)__return_address); + vn_trace_entry(ip, "xfs_iput", (inst_t *)__return_address); xfs_iunlock(ip, lock_flags); VN_RELE(vp); } @@ -492,7 +492,7 @@ xfs_iput_new(xfs_inode_t *ip, bhv_vnode_t *vp = XFS_ITOV(ip); struct inode *inode = vn_to_inode(vp); - vn_trace_entry(vp, "xfs_iput_new", (inst_t *)__return_address); + vn_trace_entry(ip, "xfs_iput_new", (inst_t *)__return_address); if ((ip->i_d.di_mode == 0)) { ASSERT(!xfs_iflags_test(ip, XFS_IRECLAIMABLE)); Index: linux-2.6-xfs/fs/xfs/xfs_inode.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_inode.c 2007-08-23 14:51:38.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_inode.c 2007-08-23 14:53:52.000000000 +0200 @@ -884,6 +884,9 @@ xfs_iread( * Initialize inode's trace buffers. * Do this before xfs_iformat in case it adds entries. */ +#ifdef XFS_VNODE_TRACE + ip->i_trace = ktrace_alloc(VNODE_TRACE_SIZE, KM_SLEEP); +#endif #ifdef XFS_BMAP_TRACE ip->i_xtrace = ktrace_alloc(XFS_BMAP_KTRACE_SIZE, KM_SLEEP); #endif @@ -2729,6 +2732,10 @@ xfs_idestroy( mrfree(&ip->i_lock); mrfree(&ip->i_iolock); freesema(&ip->i_flock); + +#ifdef XFS_VNODE_TRACE + ktrace_free(ip->i_trace); +#endif #ifdef XFS_BMAP_TRACE ktrace_free(ip->i_xtrace); #endif Index: linux-2.6-xfs/fs/xfs/xfs_inode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_inode.h 2007-08-23 14:51:38.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_inode.h 2007-08-23 14:53:52.000000000 +0200 @@ -302,6 +302,9 @@ typedef struct xfs_inode { xfs_fsize_t i_size; /* in-memory size */ atomic_t i_iocount; /* outstanding I/O count */ /* Trace buffers per inode. */ +#ifdef XFS_VNODE_TRACE + struct ktrace *i_trace; /* general inode trace */ +#endif #ifdef XFS_BMAP_TRACE struct ktrace *i_xtrace; /* inode extent list trace */ #endif Index: linux-2.6-xfs/fs/xfs/xfs_rename.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_rename.c 2007-08-23 14:51:38.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_rename.c 2007-08-23 14:53:52.000000000 +0200 @@ -247,8 +247,8 @@ xfs_rename( int src_namelen = VNAMELEN(src_vname); int target_namelen = VNAMELEN(target_vname); - vn_trace_entry(src_dir_vp, "xfs_rename", (inst_t *)__return_address); - vn_trace_entry(target_dir_vp, "xfs_rename", (inst_t *)__return_address); + vn_trace_entry(src_dp, "xfs_rename", (inst_t *)__return_address); + vn_trace_entry(xfs_vtoi(target_dir_vp), "xfs_rename", (inst_t *)__return_address); /* * Find the XFS behavior descriptor for the target directory Index: linux-2.6-xfs/fs/xfs/xfs_utils.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_utils.c 2007-08-23 14:51:38.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_utils.c 2007-08-23 14:53:52.000000000 +0200 @@ -73,7 +73,7 @@ xfs_dir_lookup_int( { int error; - vn_trace_entry(XFS_ITOV(dp), __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); error = xfs_dir_lookup(NULL, dp, VNAME(dentry), VNAMELEN(dentry), inum); if (!error) { Index: linux-2.6-xfs/fs/xfs/xfs_utils.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_utils.h 2007-08-23 14:51:38.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_utils.h 2007-08-23 14:53:52.000000000 +0200 @@ -20,7 +20,7 @@ #define IRELE(ip) VN_RELE(XFS_ITOV(ip)) #define IHOLD(ip) VN_HOLD(XFS_ITOV(ip)) -#define ITRACE(ip) vn_trace_ref(XFS_ITOV(ip), __FILE__, __LINE__, \ +#define ITRACE(ip) vn_trace_ref(ip, __FILE__, __LINE__, \ (inst_t *)__return_address) extern int xfs_get_dir_entry (bhv_vname_t *, xfs_inode_t **); Index: linux-2.6-xfs/fs/xfs/xfs_vnodeops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vnodeops.c 2007-08-23 14:51:38.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vnodeops.c 2007-08-23 14:53:52.000000000 +0200 @@ -88,7 +88,7 @@ xfs_getattr( bhv_vnode_t *vp = XFS_ITOV(ip); xfs_mount_t *mp = ip->i_mount; - vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -228,7 +228,7 @@ xfs_setattr( int file_owner; int need_iolock = 1; - vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); if (XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY) return XFS_ERROR(EROFS); @@ -915,7 +915,7 @@ xfs_access( { int error; - vn_trace_entry(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); xfs_ilock(ip, XFS_ILOCK_SHARED); error = xfs_iaccess(ip, mode, credp); @@ -987,7 +987,7 @@ xfs_readlink( int pathlen; int error = 0; - vn_trace_entry(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -1033,7 +1033,7 @@ xfs_fsync( int error; int log_flushed = 0, changed = 1; - vn_trace_entry(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); ASSERT(start >= 0 && stop >= -1); @@ -1594,7 +1594,7 @@ xfs_inactive( int error; int truncate; - vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); /* * If the inode is already free, then there can be nothing @@ -1807,7 +1807,7 @@ xfs_lookup( int error; uint lock_mode; - vn_trace_entry(XFS_ITOV(dp), __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); if (XFS_FORCED_SHUTDOWN(dp->i_mount)) return XFS_ERROR(EIO); @@ -1851,7 +1851,7 @@ xfs_create( int namelen; ASSERT(!*vpp); - vn_trace_entry(dir_vp, __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); dm_di_mode = vap->va_mode; namelen = VNAMELEN(dentry); @@ -2328,7 +2328,7 @@ xfs_remove( uint resblks; int namelen; - vn_trace_entry(dir_vp, __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -2371,7 +2371,7 @@ xfs_remove( dm_di_mode = ip->i_d.di_mode; - vn_trace_entry(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); ITRACE(ip); @@ -2505,7 +2505,7 @@ xfs_remove( if (link_zero && xfs_inode_is_filestream(ip)) xfs_filestream_deassociate(ip); - vn_trace_exit(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address); + vn_trace_exit(ip, __FUNCTION__, (inst_t *)__return_address); IRELE(ip); @@ -2569,8 +2569,8 @@ xfs_link( char *target_name = VNAME(dentry); int target_namelen; - vn_trace_entry(target_dir_vp, __FUNCTION__, (inst_t *)__return_address); - vn_trace_entry(src_vp, __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(tdp, __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(xfs_vtoi(src_vp), __FUNCTION__, (inst_t *)__return_address); target_namelen = VNAMELEN(dentry); ASSERT(!VN_ISDIR(src_vp)); @@ -2753,7 +2753,7 @@ xfs_mkdir( /* Return through std_return after this point. */ - vn_trace_entry(dir_vp, __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); mp = dp->i_mount; udqp = gdqp = NULL; @@ -2947,7 +2947,7 @@ xfs_rmdir( int last_cdp_link; uint resblks; - vn_trace_entry(dir_vp, __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -3200,7 +3200,7 @@ xfs_symlink( ip = NULL; tp = NULL; - vn_trace_entry(dir_vp, __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); if (XFS_FORCED_SHUTDOWN(mp)) @@ -3492,7 +3492,7 @@ xfs_fid2( { xfs_fid2_t *xfid = (xfs_fid2_t *)fidp; - vn_trace_entry(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); ASSERT(sizeof(fid_t) >= sizeof(xfs_fid2_t)); xfid->fid_len = sizeof(xfs_fid2_t) - sizeof(xfid->fid_len); @@ -3674,7 +3674,7 @@ xfs_reclaim( { bhv_vnode_t *vp = XFS_ITOV(ip); - vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); ASSERT(!VN_MAPPED(vp)); @@ -3892,7 +3892,7 @@ xfs_alloc_file_space( int committed; int error; - vn_trace_entry(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -4162,7 +4162,7 @@ xfs_free_file_space( vp = XFS_ITOV(ip); mp = ip->i_mount; - vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); if ((error = XFS_QM_DQATTACH(mp, ip, 0))) return error; @@ -4368,7 +4368,7 @@ xfs_change_file_space( xfs_trans_t *tp; bhv_vattr_t va; - vn_trace_entry(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); /* * must be a regular file and have write permission Index: linux-2.6-xfs/fs/xfs/xfsidbg.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfsidbg.c 2007-08-23 14:51:38.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfsidbg.c 2007-08-23 14:53:56.000000000 +0200 @@ -113,6 +113,12 @@ static void xfsidbg_xqm_dqtrace(xfs_dquo #ifdef XFS_FILESTREAMS_TRACE static void xfsidbg_filestreams_trace(int); #endif +#ifdef XFS_VNODE_TRACE +/* + * Print a vnode trace entry. + */ +static int vn_trace_pr_entry(ktrace_entry_t *ktep); +#endif /* @@ -1432,18 +1438,37 @@ static int kdbm_xfs_xnode( int argc, const char **argv) { + xfs_inode_t *ip; unsigned long addr; int nextarg = 1; long offset = 0; int diag; +#ifdef XFS_VNODE_TRACE + ktrace_entry_t *ktep; + ktrace_snap_t kts; +#endif if (argc != 1) return KDB_ARGCOUNT; diag = kdbgetaddrarg(argc, argv, &nextarg, &addr, &offset, NULL); if (diag) return diag; + ip = (xfs_inode_t *)addr; + + xfsidbg_xnode(ip); - xfsidbg_xnode((xfs_inode_t *) addr); +#ifdef XFS_VNODE_TRACE + kdb_printf("--> itrace @ 0x%lx/0x%p\n", addr, ip->i_trace); + if (ip->i_trace == NULL) + return 0; + ktep = ktrace_first(ip->i_trace, &kts); + while (ktep != NULL) { + if (vn_trace_pr_entry(ktep)) + kdb_printf("\n"); + + ktep = ktrace_next(ip->i_trace, &kts); + } +#endif /* XFS_VNODE_TRACE */ return 0; } @@ -1758,10 +1783,6 @@ static void printvnode(bhv_vnode_t *vp, kdb_printf("\n"); -#ifdef XFS_VNODE_TRACE - kdb_printf(" v_trace 0x%p\n", vp->v_trace); -#endif /* XFS_VNODE_TRACE */ - kdb_printf(" v_number 0x%llx\n", (unsigned long long)vp->v_number); } @@ -1971,7 +1992,7 @@ static int kdbm_vntrace( int nextarg = 1; long offset = 0; unsigned long addr; - bhv_vnode_t *vp; + xfs_inode_t *ip; ktrace_entry_t *ktep; ktrace_snap_t kts; @@ -1984,23 +2005,23 @@ static int kdbm_vntrace( if (diag) return diag; - vp = (bhv_vnode_t *)addr; + ip = (xfs_inode_t *)addr; - if (vp->v_trace == NULL) { + if (ip->i_trace == NULL) { kdb_printf("The vnode trace buffer is not initialized\n"); return 0; } - kdb_printf("vntrace vp 0x%p\n", vp); + kdb_printf("vntrace ip 0x%p\n", ip); - ktep = ktrace_first(vp->v_trace, &kts); + ktep = ktrace_first(ip->i_trace, &kts); while (ktep != NULL) { if (vn_trace_pr_entry(ktep)) kdb_printf("\n"); - ktep = ktrace_next(vp->v_trace, &kts); + ktep = ktrace_next(ip->i_trace, &kts); } return 0; @@ -2096,10 +2117,6 @@ static int kdbm_vn( unsigned long addr; struct inode *ip; bhv_vnode_t vp; -#ifdef XFS_VNODE_TRACE - ktrace_entry_t *ktep; - ktrace_snap_t kts; -#endif if (argc != 1) return KDB_ARGCOUNT; @@ -2117,19 +2134,6 @@ static int kdbm_vn( kdb_printf("--> Vnode @ 0x%lx\n", addr); printvnode(&vp, addr); - -#ifdef XFS_VNODE_TRACE - kdb_printf("--> Vntrace @ 0x%lx/0x%p\n", addr, vp.v_trace); - if (vp.v_trace == NULL) - return 0; - ktep = ktrace_first(vp.v_trace, &kts); - while (ktep != NULL) { - if (vn_trace_pr_entry(ktep)) - kdb_printf("\n"); - - ktep = ktrace_next(vp.v_trace, &kts); - } -#endif /* XFS_VNODE_TRACE */ return 0; } @@ -6691,6 +6695,10 @@ xfsidbg_xnode(xfs_inode_t *ip) ip->i_delayed_blks); kdb_printf("size %lld\n", ip->i_size); + +#ifdef XFS_VNODE_TRACE + qprintf(" trace 0x%p\n", ip->i_trace); +#endif #ifdef XFS_BMAP_TRACE qprintf(" bmap_trace 0x%p\n", ip->i_xtrace); #endif From owner-xfs@oss.sgi.com Thu Aug 23 12:37:55 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 12:37:57 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_65, J_CHICKENPOX_66 autolearn=no version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7NJbp4p002841 for ; Thu, 23 Aug 2007 12:37:54 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7NJboA5008491 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 23 Aug 2007 21:37:50 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7NJboLG008489 for xfs@oss.sgi.com; Thu, 23 Aug 2007 21:37:50 +0200 Date: Thu, 23 Aug 2007 21:37:50 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH 3/17] kill v_vfsp member from struct bhv_vnode Message-ID: <20070823193750.GD8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12609 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs We can easily get at the vfsp through the super_block but it will soon be gone anyway. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_file.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_file.c 2007-08-23 19:00:43.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_file.c 2007-08-23 19:03:03.000000000 +0200 @@ -236,10 +236,10 @@ xfs_vm_nopage( int *type) { struct inode *inode = area->vm_file->f_path.dentry->d_inode; - bhv_vnode_t *vp = vn_from_inode(inode); + bhv_vfs_t *vfsp = vfs_from_sb(inode->i_sb); - ASSERT_ALWAYS(vp->v_vfsp->vfs_flag & VFS_DMI); - if (XFS_SEND_MMAP(XFS_VFSTOM(vp->v_vfsp), area, 0)) + ASSERT_ALWAYS(vfsp->vfs_flag & VFS_DMI); + if (XFS_SEND_MMAP(XFS_VFSTOM(vfsp), area, 0)) return NULL; return filemap_nopage(area, address, type); } @@ -285,7 +285,7 @@ xfs_file_mmap( vma->vm_ops = &xfs_file_vm_ops; #ifdef HAVE_DMAPI - if (vn_from_inode(filp->f_path.dentry->d_inode)->v_vfsp->vfs_flag & VFS_DMI) + if (vfs_from_sb(filp->f_path.dentry->d_inode->i_sb)->vfs_flag & VFS_DMI) vma->vm_ops = &xfs_dmapi_file_vm_ops; #endif /* HAVE_DMAPI */ @@ -344,16 +344,14 @@ xfs_vm_mprotect( struct vm_area_struct *vma, unsigned int newflags) { - bhv_vnode_t *vp = vn_from_inode(vma->vm_file->f_path.dentry->d_inode); + struct inode *inode = vma->vm_file->f_path.dentry->d_inode; + bhv_vfs_t *vfsp = vfs_from_sb(inode->i_sb); int error = 0; - if (vp->v_vfsp->vfs_flag & VFS_DMI) { + if (vfsp->vfs_flag & VFS_DMI) { if ((vma->vm_flags & VM_MAYSHARE) && - (newflags & VM_WRITE) && !(vma->vm_flags & VM_WRITE)) { - xfs_mount_t *mp = XFS_VFSTOM(vp->v_vfsp); - - error = XFS_SEND_MMAP(mp, vma, VM_WRITE); - } + (newflags & VM_WRITE) && !(vma->vm_flags & VM_WRITE)) + error = XFS_SEND_MMAP(XFS_VFSTOM(vfsp), vma, VM_WRITE); } return error; } @@ -370,18 +368,17 @@ STATIC int xfs_file_open_exec( struct inode *inode) { - bhv_vnode_t *vp = vn_from_inode(inode); + bhv_vfs_t *vfsp = vfs_from_sb(inode->i_sb); - if (unlikely(vp->v_vfsp->vfs_flag & VFS_DMI)) { - xfs_mount_t *mp = XFS_VFSTOM(vp->v_vfsp); - xfs_inode_t *ip = xfs_vtoi(vp); - - if (!ip) - return -EINVAL; - if (DM_EVENT_ENABLED(ip, DM_EVENT_READ)) - return -XFS_SEND_DATA(mp, DM_EVENT_READ, vp, - 0, 0, 0, NULL); + if (unlikely(vfsp->vfs_flag & VFS_DMI)) { + if (DM_EVENT_ENABLED(XFS_I(inode), DM_EVENT_READ)) { + bhv_vnode_t *vp = vn_from_inode(inode); + + return -XFS_SEND_DATA(XFS_VFSTOM(vfsp), DM_EVENT_READ, + vp, 0, 0, 0, NULL); + } } + return 0; } #endif /* HAVE_FOP_OPEN_EXEC */ Index: linux-2.6-xfs/fs/xfs/xfs_acl.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_acl.c 2007-08-23 18:58:43.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_acl.c 2007-08-23 19:03:03.000000000 +0200 @@ -372,6 +372,7 @@ xfs_acl_allow_set( bhv_vnode_t *vp, int kind) { + xfs_inode_t *ip = xfs_vtoi(vp); bhv_vattr_t va; int error; @@ -379,10 +380,10 @@ xfs_acl_allow_set( return EPERM; if (kind == _ACL_TYPE_DEFAULT && !VN_ISDIR(vp)) return ENOTDIR; - if (vp->v_vfsp->vfs_flag & VFS_RDONLY) + if (vp->v_inode.i_sb->s_flags & MS_RDONLY) return EROFS; va.va_mask = XFS_AT_UID; - error = xfs_getattr(xfs_vtoi(vp), &va, 0); + error = xfs_getattr(ip, &va, 0); if (error) return error; if (va.va_uid != current->fsuid && !capable(CAP_FOWNER)) Index: linux-2.6-xfs/fs/xfs/xfs_inode.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_inode.c 2007-08-23 18:58:43.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_inode.c 2007-08-23 19:03:03.000000000 +0200 @@ -1154,7 +1154,7 @@ xfs_ialloc( if ((prid != 0) && (ip->i_d.di_version == XFS_DINODE_VERSION_1)) xfs_bump_ino_vers2(tp, ip); - if (pip && XFS_INHERIT_GID(pip, vp->v_vfsp)) { + if (pip && XFS_INHERIT_GID(pip, XFS_MTOVFS(pip->i_mount))) { ip->i_d.di_gid = pip->i_d.di_gid; if ((pip->i_d.di_mode & S_ISGID) && (mode & S_IFMT) == S_IFDIR) { ip->i_d.di_mode |= S_ISGID; Index: linux-2.6-xfs/fs/xfs/xfs_vnodeops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vnodeops.c 2007-08-23 18:58:43.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vnodeops.c 2007-08-23 19:03:03.000000000 +0200 @@ -230,7 +230,7 @@ xfs_setattr( vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); - if (vp->v_vfsp->vfs_flag & VFS_RDONLY) + if (XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY) return XFS_ERROR(EROFS); /* @@ -1512,7 +1512,7 @@ xfs_release( return 0; /* If this is a read-only mount, don't do this (would generate I/O) */ - if (vp->v_vfsp->vfs_flag & VFS_RDONLY) + if (XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY) return 0; if (!XFS_FORCED_SHUTDOWN(mp)) { @@ -1618,7 +1618,7 @@ xfs_inactive( error = 0; /* If this is a read-only mount, don't do this (would generate I/O) */ - if (vp->v_vfsp->vfs_flag & VFS_RDONLY) + if (XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY) goto out; if (ip->i_d.di_nlink != 0) { Index: linux-2.6-xfs/fs/xfs/xfsidbg.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfsidbg.c 2007-08-23 18:58:43.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfsidbg.c 2007-08-23 19:03:03.000000000 +0200 @@ -1804,8 +1804,7 @@ static void printvnode(bhv_vnode_t *vp, kdb_printf(" v_trace 0x%p\n", vp->v_trace); #endif /* XFS_VNODE_TRACE */ - kdb_printf(" v_vfsp 0x%p v_number 0x%llx\n", - vp->v_vfsp, (unsigned long long)vp->v_number); + kdb_printf(" v_number 0x%llx\n", (unsigned long long)vp->v_number); } static int kdbm_vnode( Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm.c 2007-08-23 18:58:43.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c 2007-08-23 19:06:12.000000000 +0200 @@ -1452,7 +1452,7 @@ xfs_dm_get_bulkall_rvp( int nelems; u_int statstruct_sz; dm_attrloc_t loc; - bhv_vnode_t *vp = vn_from_inode(inode); + xfs_mount_t *mp = XFS_I(inode)->i_mount; dm_attrname_t attrname; dm_bulkstat_one_t dmb; @@ -1501,8 +1501,8 @@ xfs_dm_get_bulkall_rvp( */ dmb.laststruct = NULL; - memcpy(&dmb.fsid, vp->v_vfsp->vfs_altfsid, sizeof(dm_fsid_t)); - error = xfs_bulkstat(xfs_vfstom(vp->v_vfsp), (xfs_ino_t *)&loc, &nelems, + memcpy(&dmb.fsid, XFS_MTOVFS(mp)->vfs_altfsid, sizeof(dm_fsid_t)); + error = xfs_bulkstat(mp, (xfs_ino_t *)&loc, &nelems, xfs_dm_bulkall_one, (void*)&dmb, statstruct_sz, bufp, BULKSTAT_FG_INLINE, &done); if (error) @@ -1566,7 +1566,7 @@ xfs_dm_get_bulkattr_rvp( int nelems; u_int statstruct_sz; dm_attrloc_t loc; - bhv_vnode_t *vp = vn_from_inode(inode); + xfs_mount_t *mp = XFS_I(inode)->i_mount; dm_bulkstat_one_t dmb; /* Returns negative errors to DMAPI */ @@ -1597,8 +1597,8 @@ xfs_dm_get_bulkattr_rvp( } dmb.laststruct = NULL; - memcpy(&dmb.fsid, vp->v_vfsp->vfs_altfsid, sizeof(dm_fsid_t)); - error = xfs_bulkstat(xfs_vfstom(vp->v_vfsp), (xfs_ino_t *)&loc, &nelems, + memcpy(&dmb.fsid, XFS_MTOVFS(mp)->vfs_altfsid, sizeof(dm_fsid_t)); + error = xfs_bulkstat(mp, (xfs_ino_t *)&loc, &nelems, xfs_dm_bulkattr_one, (void*)&dmb, statstruct_sz, bufp, BULKSTAT_FG_INLINE, &done); if (error) @@ -1925,9 +1925,8 @@ xfs_dm_get_dirattrs_rvp( size_t __user *rlenp, int *rvp) { - bhv_vnode_t *vp = vn_from_inode(inode); - xfs_inode_t *dp = xfs_vtoi(vp); - xfs_mount_t *mp = xfs_vfstom(vp->v_vfsp); + xfs_inode_t *dp = XFS_I(inode); + xfs_mount_t *mp = dp->i_mount; dm_readdir_cb_t *cb; dm_attrloc_t loc; int error; @@ -3198,11 +3197,12 @@ xfs_dm_send_mmap_event( if (!vma->vm_file) return 0; + ip = XFS_I(vma->vm_file->f_dentry->d_inode); vp = vn_from_inode(vma->vm_file->f_dentry->d_inode); ASSERT(vp); if (!S_ISREG(vma->vm_file->f_dentry->d_inode->i_mode) || - !(vp->v_vfsp->vfs_flag & VFS_DMI)) + !(XFS_MTOVFS(ip->i_mount)->vfs_flag & VFS_DMI)) return 0; /* If they specifically asked for 'read', then give it to them. @@ -3220,8 +3220,6 @@ xfs_dm_send_mmap_event( return -EACCES; } - ip = xfs_vtoi(vp); - /* Figure out how much of the file is being requested by the user. */ offset = 0; /* beginning of file, for now */ length = 0; /* whole file, for now */ Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm_fsops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm_fsops.c 2007-08-23 18:58:43.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm_fsops.c 2007-08-23 19:03:03.000000000 +0200 @@ -89,20 +89,21 @@ xfs_dm_inode_to_fh( dm_fid_t *dmfid, dm_fsid_t *dmfsid) { - bhv_vnode_t *vp = vn_from_inode(inode); - int error; - fid_t fid; + xfs_inode_t *ip = XFS_I(inode); + bhv_vfs_t *vfsp = XFS_MTOVFS(ip->i_mount); + int error; + fid_t fid; /* Returns negative errors to DMAPI */ - if (vp->v_vfsp->vfs_altfsid == NULL) + if (vfsp->vfs_altfsid == NULL) return -EINVAL; - error = xfs_fid2(XFS_I(inode), &fid); + error = xfs_fid2(ip, &fid); if (error) return -error; /* Return negative error to DMAPI */ memcpy(dmfid, &fid, sizeof(*dmfid)); - memcpy(dmfsid, vp->v_vfsp->vfs_altfsid, sizeof(*dmfsid)); + memcpy(dmfsid, vfsp->vfs_altfsid, sizeof(*dmfsid)); return 0; } Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_ioctl.c 2007-08-23 18:58:43.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c 2007-08-23 19:03:03.000000000 +0200 @@ -138,7 +138,8 @@ xfs_find_handle( vp = vn_from_inode(inode); /* now we can grab the fsid */ - memcpy(&handle.ha_fsid, vp->v_vfsp->vfs_altfsid, sizeof(xfs_fsid_t)); + memcpy(&handle.ha_fsid, XFS_MTOVFS(XFS_I(inode)->i_mount)->vfs_altfsid, + sizeof(xfs_fsid_t)); hsize = sizeof(xfs_fsid_t); if (cmd != XFS_IOC_PATH_TO_FSHANDLE) { Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_lrw.c 2007-08-23 18:58:43.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c 2007-08-23 19:03:03.000000000 +0200 @@ -678,7 +678,7 @@ xfs_write( io = &xip->i_iocore; mp = io->io_mount; - vfs_wait_for_freeze(vp->v_vfsp, SB_FREEZE_WRITE); + vfs_wait_for_freeze(XFS_MTOVFS(mp), SB_FREEZE_WRITE); if (XFS_FORCED_SHUTDOWN(mp)) return -EIO; Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_super.c 2007-08-23 18:58:43.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c 2007-08-23 19:03:03.000000000 +0200 @@ -210,7 +210,6 @@ xfs_initialize_vnode( struct inode *inode = vn_to_inode(vp); if (!ip->i_vnode) { - vp->v_vfsp = bhvtovfs(bdp); ip->i_vnode = vp; inode->i_private = ip; } Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vnode.c 2007-08-23 18:58:43.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c 2007-08-23 19:03:03.000000000 +0200 @@ -69,8 +69,10 @@ vn_ioerror( char *f, int l) { + bhv_vfs_t *vfsp = vfs_from_sb(vp->v_inode.i_sb); + if (unlikely(error == -ENODEV)) - bhv_vfs_force_shutdown(vp->v_vfsp, SHUTDOWN_DEVICE_REQ, f, l); + bhv_vfs_force_shutdown(vfsp, SHUTDOWN_DEVICE_REQ, f, l); } bhv_vnode_t * Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vnode.h 2007-08-23 18:58:43.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.h 2007-08-23 19:03:03.000000000 +0200 @@ -35,11 +35,10 @@ typedef enum bhv_vflags { /* * MP locking protocols: - * v_flag, v_vfsp VN_LOCK/VN_UNLOCK + * v_flag, VN_LOCK/VN_UNLOCK */ typedef struct bhv_vnode { bhv_vflags_t v_flag; /* vnode flags (see above) */ - bhv_vfs_t *v_vfsp; /* ptr to containing VFS */ bhv_vnumber_t v_number; /* in-core vnode number */ spinlock_t v_lock; /* VN_LOCK/VN_UNLOCK */ atomic_t v_iocount; /* outstanding I/O count */ From owner-xfs@oss.sgi.com Thu Aug 23 12:37:37 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 12:37:43 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_31, J_CHICKENPOX_32,J_CHICKENPOX_82 autolearn=no version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7NJbW4p002653 for ; Thu, 23 Aug 2007 12:37:35 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7NJbQA5008460 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 23 Aug 2007 21:37:27 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7NJbQY8008458 for xfs@oss.sgi.com; Thu, 23 Aug 2007 21:37:26 +0200 Date: Thu, 23 Aug 2007 21:37:26 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH 2/17] call common xfs vnode-level helpers directly and remove vnode operations Message-ID: <20070823193726.GC8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12608 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_file.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_file.c 2007-08-23 18:52:50.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_file.c 2007-08-23 19:00:43.000000000 +0200 @@ -37,6 +37,7 @@ #include "xfs_error.h" #include "xfs_rw.h" #include "xfs_ioctl32.h" +#include "xfs_vnodeops.h" #include #include @@ -55,13 +56,12 @@ __xfs_file_read( loff_t pos) { struct file *file = iocb->ki_filp; - bhv_vnode_t *vp = vn_from_inode(file->f_path.dentry->d_inode); BUG_ON(iocb->ki_pos != pos); if (unlikely(file->f_flags & O_DIRECT)) ioflags |= IO_ISDIRECT; - return bhv_vop_read(vp, iocb, iov, nr_segs, &iocb->ki_pos, - ioflags, NULL); + return xfs_read(XFS_I(file->f_path.dentry->d_inode), iocb, iov, + nr_segs, &iocb->ki_pos, ioflags); } STATIC ssize_t @@ -93,14 +93,12 @@ __xfs_file_write( loff_t pos) { struct file *file = iocb->ki_filp; - struct inode *inode = file->f_mapping->host; - bhv_vnode_t *vp = vn_from_inode(inode); BUG_ON(iocb->ki_pos != pos); if (unlikely(file->f_flags & O_DIRECT)) ioflags |= IO_ISDIRECT; - return bhv_vop_write(vp, iocb, iov, nr_segs, &iocb->ki_pos, - ioflags, NULL); + return xfs_write(XFS_I(file->f_mapping->host), iocb, iov, nr_segs, + &iocb->ki_pos, ioflags); } STATIC ssize_t @@ -131,8 +129,8 @@ xfs_file_sendfile( read_actor_t actor, void *target) { - return bhv_vop_sendfile(vn_from_inode(filp->f_path.dentry->d_inode), - filp, pos, 0, count, actor, target, NULL); + return xfs_sendfile(XFS_I(filp->f_path.dentry->d_inode), + filp, pos, 0, count, actor, target); } STATIC ssize_t @@ -143,8 +141,8 @@ xfs_file_sendfile_invis( read_actor_t actor, void *target) { - return bhv_vop_sendfile(vn_from_inode(filp->f_path.dentry->d_inode), - filp, pos, IO_INVIS, count, actor, target, NULL); + return xfs_sendfile(XFS_I(filp->f_path.dentry->d_inode), + filp, pos, IO_INVIS, count, actor, target); } STATIC ssize_t @@ -155,8 +153,8 @@ xfs_file_splice_read( size_t len, unsigned int flags) { - return bhv_vop_splice_read(vn_from_inode(infilp->f_path.dentry->d_inode), - infilp, ppos, pipe, len, flags, 0, NULL); + return xfs_splice_read(XFS_I(infilp->f_path.dentry->d_inode), + infilp, ppos, pipe, len, flags, 0); } STATIC ssize_t @@ -167,9 +165,8 @@ xfs_file_splice_read_invis( size_t len, unsigned int flags) { - return bhv_vop_splice_read(vn_from_inode(infilp->f_path.dentry->d_inode), - infilp, ppos, pipe, len, flags, IO_INVIS, - NULL); + return xfs_splice_read(XFS_I(infilp->f_path.dentry->d_inode), + infilp, ppos, pipe, len, flags, IO_INVIS); } STATIC ssize_t @@ -180,8 +177,8 @@ xfs_file_splice_write( size_t len, unsigned int flags) { - return bhv_vop_splice_write(vn_from_inode(outfilp->f_path.dentry->d_inode), - pipe, outfilp, ppos, len, flags, 0, NULL); + return xfs_splice_write(XFS_I(outfilp->f_path.dentry->d_inode), + pipe, outfilp, ppos, len, flags, 0); } STATIC ssize_t @@ -192,9 +189,8 @@ xfs_file_splice_write_invis( size_t len, unsigned int flags) { - return bhv_vop_splice_write(vn_from_inode(outfilp->f_path.dentry->d_inode), - pipe, outfilp, ppos, len, flags, IO_INVIS, - NULL); + return xfs_splice_write(XFS_I(outfilp->f_path.dentry->d_inode), + pipe, outfilp, ppos, len, flags, IO_INVIS); } STATIC int @@ -204,7 +200,7 @@ xfs_file_open( { if (!(filp->f_flags & O_LARGEFILE) && i_size_read(inode) > MAX_NON_LFS) return -EFBIG; - return -bhv_vop_open(vn_from_inode(inode), NULL); + return -xfs_open(XFS_I(inode)); } STATIC int @@ -212,11 +208,7 @@ xfs_file_release( struct inode *inode, struct file *filp) { - bhv_vnode_t *vp = vn_from_inode(inode); - - if (vp) - return -bhv_vop_release(vp); - return 0; + return -xfs_release(XFS_I(inode)); } STATIC int @@ -232,7 +224,8 @@ xfs_file_fsync( flags |= FSYNC_DATA; if (VN_TRUNC(vp)) VUNTRUNCATE(vp); - return -bhv_vop_fsync(vp, flags, NULL, (xfs_off_t)0, (xfs_off_t)-1); + return -xfs_fsync(XFS_I(dentry->d_inode), flags, + (xfs_off_t)0, (xfs_off_t)-1); } #ifdef HAVE_DMAPI @@ -259,7 +252,7 @@ xfs_file_readdir( filldir_t filldir) { struct inode *inode = filp->f_path.dentry->d_inode; - bhv_vnode_t *vp = vn_from_inode(inode); + xfs_inode_t *ip = XFS_I(inode); int error; size_t bufsize; @@ -277,7 +270,7 @@ xfs_file_readdir( */ bufsize = (size_t)min_t(loff_t, PAGE_SIZE, inode->i_size); - error = bhv_vop_readdir(vp, dirent, bufsize, + error = xfs_readdir(ip, dirent, bufsize, (xfs_off_t *)&filp->f_pos, filldir); if (error) return -error; @@ -310,7 +303,7 @@ xfs_file_ioctl( struct inode *inode = filp->f_path.dentry->d_inode; bhv_vnode_t *vp = vn_from_inode(inode); - error = bhv_vop_ioctl(vp, inode, filp, 0, cmd, (void __user *)p); + error = xfs_ioctl(XFS_I(inode), filp, 0, cmd, (void __user *)p); VMODIFY(vp); /* NOTE: some of the ioctl's return positive #'s as a @@ -332,7 +325,7 @@ xfs_file_ioctl_invis( struct inode *inode = filp->f_path.dentry->d_inode; bhv_vnode_t *vp = vn_from_inode(inode); - error = bhv_vop_ioctl(vp, inode, filp, IO_INVIS, cmd, (void __user *)p); + error = xfs_ioctl(XFS_I(inode), filp, IO_INVIS, cmd, (void __user *)p); VMODIFY(vp); /* NOTE: some of the ioctl's return positive #'s as a Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_iops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_iops.c 2007-08-23 18:52:50.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_iops.c 2007-08-23 18:58:43.000000000 +0200 @@ -46,6 +46,7 @@ #include "xfs_attr.h" #include "xfs_buf_item.h" #include "xfs_utils.h" +#include "xfs_vnodeops.h" #include #include @@ -53,22 +54,6 @@ #include /* - * Get a XFS inode from a given vnode. - */ -xfs_inode_t * -xfs_vtoi( - bhv_vnode_t *vp) -{ - bhv_desc_t *bdp; - - bdp = bhv_lookup_range(VN_BHV_HEAD(vp), - VNODE_POSITION_XFS, VNODE_POSITION_XFS); - if (unlikely(bdp == NULL)) - return NULL; - return XFS_BHVTOI(bdp); -} - -/* * Bring the atime in the XFS inode uptodate. * Used before logging the inode to disk or when the Linux inode goes away. */ @@ -199,7 +184,7 @@ xfs_validate_fields( bhv_vattr_t *vattr) { vattr->va_mask = XFS_AT_NLINK|XFS_AT_SIZE|XFS_AT_NBLOCKS; - if (!bhv_vop_getattr(vn_from_inode(ip), vattr, ATTR_LAZY, NULL)) { + if (!xfs_getattr(XFS_I(ip), vattr, ATTR_LAZY)) { ip->i_nlink = vattr->va_nlink; ip->i_blocks = vattr->va_nblocks; @@ -233,7 +218,8 @@ xfs_init_security( return -error; } - error = bhv_vop_attr_set(vp, name, value, length, ATTR_SECURE, NULL); + error = xfs_attr_set(XFS_I(ip), name, value, + length, ATTR_SECURE); if (!error) VMODIFY(vp); @@ -256,7 +242,7 @@ xfs_has_fs_struct(struct task_struct *ta STATIC void xfs_cleanup_inode( - bhv_vnode_t *dvp, + struct inode *dir, bhv_vnode_t *vp, struct dentry *dentry, int mode) @@ -272,9 +258,9 @@ xfs_cleanup_inode( teardown.d_name = dentry->d_name; if (S_ISDIR(mode)) - bhv_vop_rmdir(dvp, &teardown, NULL); + xfs_rmdir(XFS_I(dir), &teardown); else - bhv_vop_remove(dvp, &teardown, NULL); + xfs_remove(XFS_I(dir), &teardown); VN_RELE(vp); } @@ -321,10 +307,10 @@ xfs_vn_mknod( vattr.va_mask |= XFS_AT_RDEV; /*FALLTHROUGH*/ case S_IFREG: - error = bhv_vop_create(dvp, dentry, &vattr, &vp, NULL); + error = xfs_create(XFS_I(dir), dentry, &vattr, &vp, NULL); break; case S_IFDIR: - error = bhv_vop_mkdir(dvp, dentry, &vattr, &vp, NULL); + error = xfs_mkdir(XFS_I(dir), dentry, &vattr, &vp, NULL); break; default: error = EINVAL; @@ -334,7 +320,7 @@ xfs_vn_mknod( if (unlikely(!error)) { error = xfs_init_security(vp, dir); if (error) - xfs_cleanup_inode(dvp, vp, dentry, mode); + xfs_cleanup_inode(dir, vp, dentry, mode); } if (unlikely(default_acl)) { @@ -343,7 +329,7 @@ xfs_vn_mknod( if (!error) VMODIFY(vp); else - xfs_cleanup_inode(dvp, vp, dentry, mode); + xfs_cleanup_inode(dir, vp, dentry, mode); } _ACL_FREE(default_acl); } @@ -387,13 +373,13 @@ xfs_vn_lookup( struct dentry *dentry, struct nameidata *nd) { - bhv_vnode_t *vp = vn_from_inode(dir), *cvp; + bhv_vnode_t *cvp; int error; if (dentry->d_name.len >= MAXNAMELEN) return ERR_PTR(-ENAMETOOLONG); - error = bhv_vop_lookup(vp, dentry, &cvp, 0, NULL, NULL); + error = xfs_lookup(XFS_I(dir), dentry, &cvp); if (unlikely(error)) { if (unlikely(error != ENOENT)) return ERR_PTR(-error); @@ -411,21 +397,19 @@ xfs_vn_link( struct dentry *dentry) { struct inode *ip; /* inode of guy being linked to */ - bhv_vnode_t *tdvp; /* target directory for new name/link */ bhv_vnode_t *vp; /* vp of name being linked */ bhv_vattr_t vattr; int error; ip = old_dentry->d_inode; /* inode being linked to */ - tdvp = vn_from_inode(dir); vp = vn_from_inode(ip); VN_HOLD(vp); - error = bhv_vop_link(tdvp, vp, dentry, NULL); + error = xfs_link(XFS_I(dir), vp, dentry); if (unlikely(error)) { VN_RELE(vp); } else { - VMODIFY(tdvp); + VMODIFY(vn_from_inode(dir)); xfs_validate_fields(ip, &vattr); d_instantiate(dentry, ip); } @@ -438,14 +422,12 @@ xfs_vn_unlink( struct dentry *dentry) { struct inode *inode; - bhv_vnode_t *dvp; /* directory containing name to remove */ bhv_vattr_t vattr; int error; inode = dentry->d_inode; - dvp = vn_from_inode(dir); - error = bhv_vop_remove(dvp, dentry, NULL); + error = xfs_remove(XFS_I(dir), dentry); if (likely(!error)) { xfs_validate_fields(dir, &vattr); /* size needs update */ xfs_validate_fields(inode, &vattr); @@ -461,18 +443,17 @@ xfs_vn_symlink( { struct inode *ip; bhv_vattr_t va = { 0 }; - bhv_vnode_t *dvp; /* directory containing name of symlink */ bhv_vnode_t *cvp; /* used to lookup symlink to put in dentry */ int error; - dvp = vn_from_inode(dir); cvp = NULL; va.va_mode = S_IFLNK | (irix_symlink_mode ? 0777 & ~current->fs->umask : S_IRWXUGO); va.va_mask = XFS_AT_TYPE|XFS_AT_MODE; - error = bhv_vop_symlink(dvp, dentry, &va, (char *)symname, &cvp, NULL); + error = xfs_symlink(XFS_I(dir), dentry, &va, + (char *)symname, &cvp, NULL); if (likely(!error && cvp)) { error = xfs_init_security(cvp, dir); if (likely(!error)) { @@ -481,7 +462,7 @@ xfs_vn_symlink( xfs_validate_fields(dir, &va); xfs_validate_fields(ip, &va); } else { - xfs_cleanup_inode(dvp, cvp, dentry, 0); + xfs_cleanup_inode(dir, cvp, dentry, 0); } } return -error; @@ -493,11 +474,10 @@ xfs_vn_rmdir( struct dentry *dentry) { struct inode *inode = dentry->d_inode; - bhv_vnode_t *dvp = vn_from_inode(dir); bhv_vattr_t vattr; int error; - error = bhv_vop_rmdir(dvp, dentry, NULL); + error = xfs_rmdir(XFS_I(dir), dentry); if (likely(!error)) { xfs_validate_fields(inode, &vattr); xfs_validate_fields(dir, &vattr); @@ -513,15 +493,13 @@ xfs_vn_rename( struct dentry *ndentry) { struct inode *new_inode = ndentry->d_inode; - bhv_vnode_t *fvp; /* from directory */ bhv_vnode_t *tvp; /* target directory */ bhv_vattr_t vattr; int error; - fvp = vn_from_inode(odir); tvp = vn_from_inode(ndir); - error = bhv_vop_rename(fvp, odentry, tvp, ndentry, NULL); + error = xfs_rename(XFS_I(odir), odentry, tvp, ndentry); if (likely(!error)) { if (new_inode) xfs_validate_fields(new_inode, &vattr); @@ -542,7 +520,6 @@ xfs_vn_follow_link( struct dentry *dentry, struct nameidata *nd) { - bhv_vnode_t *vp = vn_from_inode(dentry->d_inode); char *link; int error = -ENOMEM; @@ -550,7 +527,7 @@ xfs_vn_follow_link( if (!link) goto out_err; - error = -bhv_vop_readlink(vp, link); + error = -xfs_readlink(XFS_I(dentry->d_inode), link); if (unlikely(error)) goto out_kfree; @@ -583,7 +560,7 @@ xfs_vn_permission( int mode, struct nameidata *nd) { - return -bhv_vop_access(vn_from_inode(inode), mode << 6, NULL); + return -xfs_access(XFS_I(inode), mode << 6, NULL); } #else #define xfs_vn_permission NULL @@ -596,11 +573,10 @@ xfs_vn_getattr( struct kstat *stat) { struct inode *inode = dentry->d_inode; - bhv_vnode_t *vp = vn_from_inode(inode); bhv_vattr_t vattr = { .va_mask = XFS_AT_STAT }; int error; - error = bhv_vop_getattr(vp, &vattr, ATTR_LAZY, NULL); + error = xfs_getattr(XFS_I(inode), &vattr, ATTR_LAZY); if (likely(!error)) { stat->size = i_size_read(inode); stat->dev = inode->i_sb->s_dev; @@ -628,7 +604,6 @@ xfs_vn_setattr( { struct inode *inode = dentry->d_inode; unsigned int ia_valid = attr->ia_valid; - bhv_vnode_t *vp = vn_from_inode(inode); bhv_vattr_t vattr = { 0 }; int flags = 0; int error; @@ -672,9 +647,9 @@ xfs_vn_setattr( flags |= ATTR_NONBLOCK; #endif - error = bhv_vop_setattr(vp, &vattr, flags, NULL); + error = xfs_setattr(XFS_I(inode), &vattr, flags, NULL); if (likely(!error)) - __vn_revalidate(vp, &vattr); + __vn_revalidate(vn_from_inode(inode), &vattr); return -error; } Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_iops.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_iops.h 2007-08-23 18:58:28.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_iops.h 2007-08-23 18:58:43.000000000 +0200 @@ -31,4 +31,10 @@ struct xfs_inode; extern void xfs_ichgtime(struct xfs_inode *, int); extern void xfs_ichgtime_fast(struct xfs_inode *, struct inode *, int); +#define xfs_vtoi(vp) \ + ((struct xfs_inode *)vn_to_inode(vp)->i_private) + +#define XFS_I(inode) \ + ((struct xfs_inode *)(inode)->i_private) + #endif /* __XFS_IOPS_H__ */ Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_ioctl.c 2007-08-23 18:58:28.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c 2007-08-23 18:58:43.000000000 +0200 @@ -413,7 +413,7 @@ xfs_readlink_by_handle( if (!link) goto out_iput; - error = -bhv_vop_readlink(vp, link); + error = -xfs_readlink(XFS_I(inode), link); if (error) goto out_kfree; error = do_readlink(hreq.ohandle, olen, link); @@ -497,8 +497,8 @@ xfs_attrlist_by_handle( goto out_vn_rele; cursor = (attrlist_cursor_kern_t *)&al_hreq.pos; - error = bhv_vop_attr_list(vp, kbuf, al_hreq.buflen, al_hreq.flags, - cursor, NULL); + error = xfs_attr_list(XFS_I(inode), kbuf, al_hreq.buflen, + al_hreq.flags, cursor); if (error) goto out_kfree; @@ -515,7 +515,7 @@ xfs_attrlist_by_handle( STATIC int xfs_attrmulti_attr_get( - bhv_vnode_t *vp, + struct inode *inode, char *name, char __user *ubuf, __uint32_t *len, @@ -530,7 +530,7 @@ xfs_attrmulti_attr_get( if (!kbuf) return ENOMEM; - error = bhv_vop_attr_get(vp, name, kbuf, len, flags, NULL); + error = xfs_attr_get(XFS_I(inode), name, kbuf, len, flags, NULL); if (error) goto out_kfree; @@ -544,7 +544,7 @@ xfs_attrmulti_attr_get( STATIC int xfs_attrmulti_attr_set( - bhv_vnode_t *vp, + struct inode *inode, char *name, const char __user *ubuf, __uint32_t len, @@ -553,9 +553,9 @@ xfs_attrmulti_attr_set( char *kbuf; int error = EFAULT; - if (IS_RDONLY(&vp->v_inode)) + if (IS_RDONLY(inode)) return -EROFS; - if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode)) + if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) return EPERM; if (len > XATTR_SIZE_MAX) return EINVAL; @@ -567,7 +567,7 @@ xfs_attrmulti_attr_set( if (copy_from_user(kbuf, ubuf, len)) goto out_kfree; - error = bhv_vop_attr_set(vp, name, kbuf, len, flags, NULL); + error = xfs_attr_set(XFS_I(inode), name, kbuf, len, flags); out_kfree: kfree(kbuf); @@ -576,15 +576,15 @@ xfs_attrmulti_attr_set( STATIC int xfs_attrmulti_attr_remove( - bhv_vnode_t *vp, + struct inode *inode, char *name, __uint32_t flags) { - if (IS_RDONLY(&vp->v_inode)) + if (IS_RDONLY(inode)) return -EROFS; - if (IS_IMMUTABLE(&vp->v_inode) || IS_APPEND(&vp->v_inode)) + if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) return EPERM; - return bhv_vop_attr_remove(vp, name, flags, NULL); + return xfs_attr_remove(XFS_I(inode), name, flags); } STATIC int @@ -640,17 +640,17 @@ xfs_attrmulti_by_handle( switch (ops[i].am_opcode) { case ATTR_OP_GET: - ops[i].am_error = xfs_attrmulti_attr_get(vp, + ops[i].am_error = xfs_attrmulti_attr_get(inode, attr_name, ops[i].am_attrvalue, &ops[i].am_length, ops[i].am_flags); break; case ATTR_OP_SET: - ops[i].am_error = xfs_attrmulti_attr_set(vp, + ops[i].am_error = xfs_attrmulti_attr_set(inode, attr_name, ops[i].am_attrvalue, ops[i].am_length, ops[i].am_flags); break; case ATTR_OP_REMOVE: - ops[i].am_error = xfs_attrmulti_attr_remove(vp, + ops[i].am_error = xfs_attrmulti_attr_remove(inode, attr_name, ops[i].am_flags); break; default: @@ -1182,7 +1182,7 @@ xfs_ioc_xattr( case XFS_IOC_FSGETXATTR: { vattr->va_mask = XFS_AT_XFLAGS | XFS_AT_EXTSIZE | \ XFS_AT_NEXTENTS | XFS_AT_PROJID; - error = bhv_vop_getattr(vp, vattr, 0, NULL); + error = xfs_getattr(ip, vattr, 0); if (unlikely(error)) { error = -error; break; @@ -1215,7 +1215,7 @@ xfs_ioc_xattr( vattr->va_extsize = fa.fsx_extsize; vattr->va_projid = fa.fsx_projid; - error = bhv_vop_setattr(vp, vattr, attr_flags, NULL); + error = xfs_setattr(ip, vattr, attr_flags, NULL); if (likely(!error)) __vn_revalidate(vp, vattr); /* update flags */ error = -error; @@ -1225,7 +1225,7 @@ xfs_ioc_xattr( case XFS_IOC_FSGETXATTRA: { vattr->va_mask = XFS_AT_XFLAGS | XFS_AT_EXTSIZE | \ XFS_AT_ANEXTENTS | XFS_AT_PROJID; - error = bhv_vop_getattr(vp, vattr, 0, NULL); + error = xfs_getattr(ip, vattr, 0); if (unlikely(error)) { error = -error; break; @@ -1271,7 +1271,7 @@ xfs_ioc_xattr( vattr->va_xflags = xfs_merge_ioc_xflags(flags, xfs_ip2xflags(ip)); - error = bhv_vop_setattr(vp, vattr, attr_flags, NULL); + error = xfs_setattr(ip, vattr, attr_flags, NULL); if (likely(!error)) __vn_revalidate(vp, vattr); /* update flags */ error = -error; Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_aops.c 2007-08-23 16:57:17.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c 2007-08-23 18:58:43.000000000 +0200 @@ -37,6 +37,7 @@ #include "xfs_error.h" #include "xfs_rw.h" #include "xfs_iomap.h" +#include "xfs_vnodeops.h" #include #include #include @@ -231,7 +232,8 @@ xfs_end_bio_unwritten( size_t size = ioend->io_size; if (likely(!ioend->io_error)) { - bhv_vop_bmap(vp, offset, size, BMAPI_UNWRITTEN, NULL, NULL); + xfs_bmap(xfs_vtoi(vp), offset, size, + BMAPI_UNWRITTEN, NULL, NULL); xfs_setfilesize(ioend); } xfs_destroy_ioend(ioend); @@ -304,7 +306,8 @@ xfs_map_blocks( bhv_vnode_t *vp = vn_from_inode(inode); int error, nmaps = 1; - error = bhv_vop_bmap(vp, offset, count, flags, mapp, &nmaps); + error = xfs_bmap(xfs_vtoi(vp), offset, count, + flags, mapp, &nmaps); if (!error && (flags & (BMAPI_WRITE|BMAPI_ALLOCATE))) VMODIFY(vp); return -error; @@ -1322,7 +1325,6 @@ __xfs_get_blocks( int direct, bmapi_flags_t flags) { - bhv_vnode_t *vp = vn_from_inode(inode); xfs_iomap_t iomap; xfs_off_t offset; ssize_t size; @@ -1332,7 +1334,7 @@ __xfs_get_blocks( offset = (xfs_off_t)iblock << inode->i_blkbits; ASSERT(bh_result->b_size >= (1 << inode->i_blkbits)); size = bh_result->b_size; - error = bhv_vop_bmap(vp, offset, size, + error = xfs_bmap(XFS_I(inode), offset, size, create ? flags : BMAPI_READ, &iomap, &niomap); if (error) return -error; @@ -1480,13 +1482,13 @@ xfs_vm_direct_IO( { struct file *file = iocb->ki_filp; struct inode *inode = file->f_mapping->host; - bhv_vnode_t *vp = vn_from_inode(inode); xfs_iomap_t iomap; int maps = 1; int error; ssize_t ret; - error = bhv_vop_bmap(vp, offset, 0, BMAPI_DEVICE, &iomap, &maps); + error = xfs_bmap(XFS_I(inode), offset, 0, + BMAPI_DEVICE, &iomap, &maps); if (error) return -error; @@ -1527,12 +1529,13 @@ xfs_vm_bmap( sector_t block) { struct inode *inode = (struct inode *)mapping->host; - bhv_vnode_t *vp = vn_from_inode(inode); + struct xfs_inode *ip = XFS_I(inode); - vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); - bhv_vop_rwlock(vp, VRWLOCK_READ); - bhv_vop_flush_pages(vp, (xfs_off_t)0, -1, 0, FI_REMAPF); - bhv_vop_rwunlock(vp, VRWLOCK_READ); + vn_trace_entry(vn_from_inode(inode), __FUNCTION__, + (inst_t *)__return_address); + xfs_rwlock(ip, VRWLOCK_READ); + xfs_flush_pages(ip, (xfs_off_t)0, -1, 0, FI_REMAPF); + xfs_rwunlock(ip, VRWLOCK_READ); return generic_block_bmap(mapping, block, xfs_get_blocks); } Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_export.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_export.c 2007-08-23 18:52:50.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_export.c 2007-08-23 18:58:43.000000000 +0200 @@ -25,6 +25,9 @@ #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_export.h" +#include "xfs_vnodeops.h" +#include "xfs_bmap_btree.h" +#include "xfs_inode.h" static struct dentry dotdot = { .d_name.name = "..", .d_name.len = 2, }; @@ -161,12 +164,11 @@ xfs_fs_get_parent( struct dentry *child) { int error; - bhv_vnode_t *vp, *cvp; + bhv_vnode_t *cvp; struct dentry *parent; cvp = NULL; - vp = vn_from_inode(child->d_inode); - error = bhv_vop_lookup(vp, &dotdot, &cvp, 0, NULL, NULL); + error = xfs_lookup(XFS_I(child->d_inode), &dotdot, &cvp); if (unlikely(error)) return ERR_PTR(-error); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl32.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_ioctl32.c 2007-08-23 16:57:17.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl32.c 2007-08-23 18:58:43.000000000 +0200 @@ -43,6 +43,7 @@ #include "xfs_itable.h" #include "xfs_error.h" #include "xfs_dfrag.h" +#include "xfs_vnodeops.h" #define _NATIVE_IOC(cmd, type) \ _IOC(_IOC_DIR(cmd), _IOC_TYPE(cmd), _IOC_NR(cmd), sizeof(type)) @@ -443,7 +444,7 @@ xfs_compat_ioctl( case XFS_IOC_FSBULKSTAT_SINGLE_32: case XFS_IOC_FSINUMBERS_32: cmd = _NATIVE_IOC(cmd, struct xfs_fsop_bulkreq); - return xfs_ioc_bulkstat_compat(XFS_BHVTOI(VNHEAD(vp))->i_mount, + return xfs_ioc_bulkstat_compat(XFS_I(inode)->i_mount, cmd, (void*)arg); case XFS_IOC_FD_TO_HANDLE_32: case XFS_IOC_PATH_TO_HANDLE_32: @@ -457,7 +458,7 @@ xfs_compat_ioctl( return -ENOIOCTLCMD; } - error = bhv_vop_ioctl(vp, inode, file, mode, cmd, (void __user *)arg); + error = xfs_ioctl(XFS_I(inode), file, mode, cmd, (void __user *)arg); VMODIFY(vp); return error; Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_lrw.c 2007-08-23 18:58:28.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c 2007-08-23 18:58:43.000000000 +0200 @@ -257,8 +257,9 @@ xfs_read( if (unlikely(ioflags & IO_ISDIRECT)) { if (VN_CACHED(vp)) - ret = bhv_vop_flushinval_pages(vp, ctooff(offtoct(*offset)), - -1, FI_REMAPF_LOCKED); + ret = xfs_flushinval_pages(ip, + ctooff(offtoct(*offset)), + -1, FI_REMAPF_LOCKED); mutex_unlock(&inode->i_mutex); if (ret) { xfs_iunlock(ip, XFS_IOLOCK_SHARED); @@ -809,7 +810,8 @@ retry: WARN_ON(need_i_mutex == 0); xfs_inval_cached_trace(io, pos, -1, ctooff(offtoct(pos)), -1); - error = bhv_vop_flushinval_pages(vp, ctooff(offtoct(pos)), + error = xfs_flushinval_pages(xip, + ctooff(offtoct(pos)), -1, FI_REMAPF_LOCKED); if (error) goto out_unlock_internal; Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vnode.c 2007-08-23 16:57:17.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c 2007-08-23 18:58:43.000000000 +0200 @@ -16,6 +16,9 @@ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" +#include "xfs_vnodeops.h" +#include "xfs_bmap_btree.h" +#include "xfs_inode.h" uint64_t vn_generation; /* vnode generation number */ DEFINE_SPINLOCK(vnumber_lock); @@ -90,9 +93,6 @@ vn_initialize( ASSERT(VN_CACHED(vp) == 0); - /* Initialize the first behavior and the behavior chain head. */ - vn_bhv_head_init(VN_BHV_HEAD(vp), "vnode"); - atomic_set(&vp->v_iocount, 0); #ifdef XFS_VNODE_TRACE @@ -152,7 +152,7 @@ __vn_revalidate( vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); vattr->va_mask = XFS_AT_STAT | XFS_AT_XFLAGS; - error = bhv_vop_getattr(vp, vattr, 0, NULL); + error = xfs_getattr(xfs_vtoi(vp), vattr, 0); if (likely(!error)) { vn_revalidate_core(vp, vattr); VUNMODIFY(vp); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_super.c 2007-08-23 16:57:17.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c 2007-08-23 18:58:43.000000000 +0200 @@ -46,6 +46,7 @@ #include "xfs_attr.h" #include "xfs_buf_item.h" #include "xfs_utils.h" +#include "xfs_vnodeops.h" #include "xfs_version.h" #include @@ -203,16 +204,15 @@ void xfs_initialize_vnode( bhv_desc_t *bdp, bhv_vnode_t *vp, - bhv_desc_t *inode_bhv, + struct xfs_inode *ip, int unlock) { - xfs_inode_t *ip = XFS_BHVTOI(inode_bhv); struct inode *inode = vn_to_inode(vp); - if (!inode_bhv->bd_vobj) { + if (!ip->i_vnode) { vp->v_vfsp = bhvtovfs(bdp); - bhv_desc_init(inode_bhv, ip, vp, &xfs_vnodeops); - bhv_insert(VN_BHV_HEAD(vp), inode_bhv); + ip->i_vnode = vp; + inode->i_private = ip; } /* @@ -411,17 +411,21 @@ xfs_fs_write_inode( struct inode *inode, int sync) { - bhv_vnode_t *vp = vn_from_inode(inode); int error = 0, flags = FLUSH_INODE; - if (vp) { - vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); + vn_trace_entry(vn_from_inode(inode), __FUNCTION__, + (inst_t *)__return_address); + if (sync) + flags |= FLUSH_SYNC; + error = xfs_inode_flush(XFS_I(inode), flags); + if (error == EAGAIN) { if (sync) - flags |= FLUSH_SYNC; - error = bhv_vop_iflush(vp, flags); - if (error == EAGAIN) - error = sync? bhv_vop_iflush(vp, flags | FLUSH_LOG) : 0; + error = xfs_inode_flush(XFS_I(inode), + flags | FLUSH_LOG); + else + error = 0; } + return -error; } @@ -442,18 +446,18 @@ xfs_fs_clear_inode( * This can happen because xfs_iget_core calls xfs_idestroy if we * find an inode with di_mode == 0 but without IGET_CREATE set. */ - if (VNHEAD(vp)) - bhv_vop_inactive(vp, NULL); + if (XFS_I(inode)) + xfs_inactive(XFS_I(inode)); VN_LOCK(vp); vp->v_flag &= ~VMODIFIED; VN_UNLOCK(vp, 0); - if (VNHEAD(vp)) - if (bhv_vop_reclaim(vp)) + if (XFS_I(inode)) + if (xfs_reclaim(XFS_I(inode))) panic("%s: cannot reclaim 0x%p\n", __FUNCTION__, vp); - ASSERT(VNHEAD(vp) == NULL); + ASSERT(XFS_I(inode) == NULL); #ifdef XFS_VNODE_TRACE ktrace_free(vp->v_trace); Index: linux-2.6-xfs/fs/xfs/xfs_acl.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_acl.c 2007-08-23 16:57:17.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_acl.c 2007-08-23 18:58:43.000000000 +0200 @@ -32,6 +32,7 @@ #include "xfs_btree.h" #include "xfs_acl.h" #include "xfs_attr.h" +#include "xfs_vnodeops.h" #include #include @@ -241,7 +242,7 @@ xfs_acl_vget( bhv_vattr_t va; va.va_mask = XFS_AT_MODE; - error = bhv_vop_getattr(vp, &va, 0, sys_cred); + error = xfs_getattr(xfs_vtoi(vp), &va, 0); if (error) goto out; xfs_acl_sync_mode(va.va_mode, xfs_acl); @@ -265,9 +266,10 @@ xfs_acl_vremove( VN_HOLD(vp); error = xfs_acl_allow_set(vp, kind); if (!error) { - error = bhv_vop_attr_remove(vp, kind == _ACL_TYPE_DEFAULT? + error = xfs_attr_remove(xfs_vtoi(vp), + kind == _ACL_TYPE_DEFAULT? SGI_ACL_DEFAULT: SGI_ACL_FILE, - ATTR_ROOT, sys_cred); + ATTR_ROOT); if (error == ENOATTR) error = 0; /* 'scool */ } @@ -380,7 +382,7 @@ xfs_acl_allow_set( if (vp->v_vfsp->vfs_flag & VFS_RDONLY) return EROFS; va.va_mask = XFS_AT_UID; - error = bhv_vop_getattr(vp, &va, 0, NULL); + error = xfs_getattr(xfs_vtoi(vp), &va, 0); if (error) return error; if (va.va_uid != current->fsuid && !capable(CAP_FOWNER)) @@ -614,7 +616,8 @@ xfs_acl_get_attr( ASSERT((flags & ATTR_KERNOVAL) ? (aclp == NULL) : 1); flags |= ATTR_ROOT; - *error = bhv_vop_attr_get(vp, kind == _ACL_TYPE_ACCESS ? + *error = xfs_attr_get(xfs_vtoi(vp), + kind == _ACL_TYPE_ACCESS ? SGI_ACL_FILE : SGI_ACL_DEFAULT, (char *)aclp, &len, flags, sys_cred); if (*error || (flags & ATTR_KERNOVAL)) @@ -652,9 +655,10 @@ xfs_acl_set_attr( INT_SET(newace->ae_perm, ARCH_CONVERT, ace->ae_perm); } INT_SET(newacl->acl_cnt, ARCH_CONVERT, aclp->acl_cnt); - *error = bhv_vop_attr_set(vp, kind == _ACL_TYPE_ACCESS ? + *error = xfs_attr_set(xfs_vtoi(vp), + kind == _ACL_TYPE_ACCESS ? SGI_ACL_FILE: SGI_ACL_DEFAULT, - (char *)newacl, len, ATTR_ROOT, sys_cred); + (char *)newacl, len, ATTR_ROOT); _ACL_FREE(newacl); } @@ -676,7 +680,7 @@ xfs_acl_vtoacl( if (!error) { /* Got the ACL, need the mode... */ va.va_mask = XFS_AT_MODE; - error = bhv_vop_getattr(vp, &va, 0, sys_cred); + error = xfs_getattr(xfs_vtoi(vp), &va, 0); } if (error) @@ -774,7 +778,7 @@ xfs_acl_setmode( * mode. The m:: bits take precedence over the g:: bits. */ va.va_mask = XFS_AT_MODE; - error = bhv_vop_getattr(vp, &va, 0, sys_cred); + error = xfs_getattr(xfs_vtoi(vp), &va, 0); if (error) return error; @@ -808,7 +812,7 @@ xfs_acl_setmode( if (gap && nomask) va.va_mode |= gap->ae_perm << 3; - return bhv_vop_setattr(vp, &va, 0, sys_cred); + return xfs_setattr(xfs_vtoi(vp), &va, 0, sys_cred); } /* Index: linux-2.6-xfs/fs/xfs/xfs_attr.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_attr.c 2007-08-23 18:58:28.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_attr.c 2007-08-23 18:58:43.000000000 +0200 @@ -49,6 +49,7 @@ #include "xfs_trans_space.h" #include "xfs_acl.h" #include "xfs_rw.h" +#include "xfs_vnodeops.h" /* * xfs_attr.c @@ -2512,7 +2513,7 @@ STATIC int attr_generic_set( bhv_vnode_t *vp, char *name, void *data, size_t size, int xflags) { - return -bhv_vop_attr_set(vp, name, data, size, xflags, NULL); + return -xfs_attr_set(xfs_vtoi(vp), name, data, size, xflags); } STATIC int @@ -2521,7 +2522,8 @@ attr_generic_get( { int error, asize = size; - error = bhv_vop_attr_get(vp, name, data, &asize, xflags, NULL); + error = xfs_attr_get(xfs_vtoi(vp), name, data, + &asize, xflags, NULL); if (!error) return asize; return -error; @@ -2531,7 +2533,7 @@ STATIC int attr_generic_remove( bhv_vnode_t *vp, char *name, int xflags) { - return -bhv_vop_attr_remove(vp, name, xflags, NULL); + return -xfs_attr_remove(xfs_vtoi(vp), name, xflags); } STATIC int @@ -2586,7 +2588,7 @@ attr_generic_list( attrlist_cursor_kern_t cursor = { 0 }; int error; - error = bhv_vop_attr_list(vp, data, size, xflags, &cursor, NULL); + error = xfs_attr_list(xfs_vtoi(vp), data, size, xflags, &cursor); if (error > 0) return -error; *result = -error; Index: linux-2.6-xfs/fs/xfs/xfs_bmap.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_bmap.c 2007-08-23 18:58:28.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_bmap.c 2007-08-23 18:58:43.000000000 +0200 @@ -53,6 +53,7 @@ #include "xfs_trans_space.h" #include "xfs_buf_item.h" #include "xfs_filestream.h" +#include "xfs_vnodeops.h" #ifdef DEBUG @@ -5868,7 +5869,8 @@ xfs_getbmap( if (whichfork == XFS_DATA_FORK && (ip->i_delayed_blks || ip->i_size > ip->i_d.di_size)) { /* xfs_fsize_t last_byte = xfs_file_last_byte(ip); */ - error = bhv_vop_flush_pages(vp, (xfs_off_t)0, -1, 0, FI_REMAPF); + error = xfs_flush_pages(ip, (xfs_off_t)0, + -1, 0, FI_REMAPF); } ASSERT(whichfork == XFS_ATTR_FORK || ip->i_delayed_blks == 0); Index: linux-2.6-xfs/fs/xfs/xfs_dfrag.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_dfrag.c 2007-08-23 16:57:17.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_dfrag.c 2007-08-23 18:58:43.000000000 +0200 @@ -42,6 +42,7 @@ #include "xfs_dfrag.h" #include "xfs_error.h" #include "xfs_rw.h" +#include "xfs_vnodeops.h" /* * Syssgi interface for swapext @@ -199,7 +200,8 @@ xfs_swap_extents( if (VN_CACHED(tvp) != 0) { xfs_inval_cached_trace(&tip->i_iocore, 0, -1, 0, -1); - error = bhv_vop_flushinval_pages(tvp, 0, -1, FI_REMAPF_LOCKED); + error = xfs_flushinval_pages(tip, 0, -1, + FI_REMAPF_LOCKED); if (error) goto error0; } @@ -265,7 +267,7 @@ xfs_swap_extents( * fields change. */ - bhv_vop_toss_pages(vp, 0, -1, FI_REMAPF); + xfs_tosspages(ip, 0, -1, FI_REMAPF); tp = xfs_trans_alloc(mp, XFS_TRANS_SWAPEXT); if ((error = xfs_trans_reserve(tp, 0, Index: linux-2.6-xfs/fs/xfs/xfs_inode.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_inode.c 2007-08-23 18:52:50.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_inode.c 2007-08-23 18:58:43.000000000 +0200 @@ -49,6 +49,7 @@ #include "xfs_quota.h" #include "xfs_acl.h" #include "xfs_filestream.h" +#include "xfs_vnodeops.h" kmem_zone_t *xfs_ifork_zone; kmem_zone_t *xfs_inode_zone; @@ -1267,7 +1268,7 @@ xfs_ialloc( xfs_trans_log_inode(tp, ip, flags); /* now that we have an i_mode we can setup inode ops and unlock */ - bhv_vfs_init_vnode(XFS_MTOVFS(tp->t_mountp), vp, XFS_ITOBHV(ip), 1); + bhv_vfs_init_vnode(XFS_MTOVFS(tp->t_mountp), vp, ip, 1); *ipp = ip; return 0; @@ -1489,9 +1490,11 @@ xfs_itruncate_start( last_byte); if (last_byte > toss_start) { if (flags & XFS_ITRUNC_DEFINITE) { - bhv_vop_toss_pages(vp, toss_start, -1, FI_REMAPF_LOCKED); + xfs_tosspages(ip, toss_start, + -1, FI_REMAPF_LOCKED); } else { - error = bhv_vop_flushinval_pages(vp, toss_start, -1, FI_REMAPF_LOCKED); + error = xfs_flushinval_pages(ip, toss_start, + -1, FI_REMAPF_LOCKED); } } Index: linux-2.6-xfs/fs/xfs/xfs_rename.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_rename.c 2007-08-23 18:58:28.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_rename.c 2007-08-23 18:58:43.000000000 +0200 @@ -586,11 +586,8 @@ xfs_rename( /* * Let interposed file systems know about removed links. */ - if (target_ip_dropped) { - bhv_vop_link_removed(XFS_ITOV(target_ip), target_dir_vp, - target_link_zero); + if (target_ip_dropped) IRELE(target_ip); - } IRELE(src_ip); Index: linux-2.6-xfs/fs/xfs/xfs_vfsops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vfsops.c 2007-08-23 18:52:50.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vfsops.c 2007-08-23 18:58:43.000000000 +0200 @@ -54,6 +54,8 @@ #include "xfs_mru_cache.h" #include "xfs_filestream.h" #include "xfs_fsops.h" +#include "xfs_vnodeops.h" + STATIC int xfs_sync(bhv_desc_t *, int, cred_t *); @@ -1191,12 +1193,13 @@ xfs_sync_inodes( if (flags & SYNC_CLOSE) { /* Shutdown case. Flush and invalidate. */ if (XFS_FORCED_SHUTDOWN(mp)) - bhv_vop_toss_pages(vp, 0, -1, FI_REMAPF); + xfs_tosspages(ip, 0, -1, + FI_REMAPF); else - error = bhv_vop_flushinval_pages(vp, 0, - -1, FI_REMAPF); + error = xfs_flushinval_pages(ip, + 0, -1, FI_REMAPF); } else if ((flags & SYNC_DELWRI) && VN_DIRTY(vp)) { - error = bhv_vop_flush_pages(vp, (xfs_off_t)0, + error = xfs_flush_pages(ip, 0, -1, fflag, FI_NONE); } Index: linux-2.6-xfs/fs/xfs/xfs_vnodeops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vnodeops.c 2007-08-23 18:58:28.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vnodeops.c 2007-08-23 18:58:43.000000000 +0200 @@ -592,7 +592,7 @@ xfs_setattr( if (!code && (ip->i_size != ip->i_d.di_size) && (vap->va_size > ip->i_d.di_size)) { - code = bhv_vop_flush_pages(XFS_ITOV(ip), + code = xfs_flush_pages(ip, ip->i_d.di_size, vap->va_size, XFS_B_ASYNC, FI_NONE); } @@ -864,10 +864,6 @@ xfs_setattr( * racing calls to vop_vnode_change. */ mandlock_after = MANDLOCK(vp, ip->i_d.di_mode); - if (mandlock_before != mandlock_after) { - bhv_vop_vnode_change(vp, VCHANGE_FLAGS_ENF_LOCKING, - mandlock_after); - } xfs_iunlock(ip, lock_flags); @@ -1541,7 +1537,7 @@ xfs_release( * be exposed to that problem. */ if (VUNTRUNCATE(vp) && VN_DIRTY(vp) && ip->i_delayed_blks > 0) - bhv_vop_flush_pages(vp, 0, -1, XFS_B_ASYNC, FI_NONE); + xfs_flush_pages(ip, 0, -1, XFS_B_ASYNC, FI_NONE); } #ifdef HAVE_REFCACHE @@ -2005,12 +2001,6 @@ xfs_create( XFS_QM_DQRELE(mp, udqp); XFS_QM_DQRELE(mp, gdqp); - /* - * Propagate the fact that the vnode changed after the - * xfs_inode locks have been released. - */ - bhv_vop_vnode_change(vp, VCHANGE_FLAGS_TRUNCATED, 3); - *vpp = vp; /* Fallthrough to std_return with error = 0 */ @@ -2509,11 +2499,6 @@ xfs_remove( vn_trace_exit(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address); - /* - * Let interposed file systems know about removed links. - */ - bhv_vop_link_removed(XFS_ITOV(ip), dir_vp, link_zero); - IRELE(ip); /* Fall through to std_return with error = 0 */ @@ -3143,11 +3128,6 @@ xfs_rmdir( } - /* - * Let interposed file systems know about removed links. - */ - bhv_vop_link_removed(XFS_ITOV(cdp), dir_vp, last_cdp_link); - IRELE(cdp); /* Fall through to std_return with error = 0 or the errno @@ -3728,7 +3708,8 @@ xfs_reclaim( XFS_MOUNT_ILOCK(mp); spin_lock(&ip->i_flags_lock); __xfs_iflags_set(ip, XFS_IRECLAIMABLE); - vn_bhv_remove(VN_BHV_HEAD(vp), XFS_ITOBHV(ip)); + vn_to_inode(vp)->i_private = NULL; + ip->i_vnode = NULL; spin_unlock(&ip->i_flags_lock); list_add_tail(&ip->i_reclaim, &mp->m_del_inodes); XFS_MOUNT_IUNLOCK(mp); @@ -4210,7 +4191,8 @@ xfs_free_file_space( if (VN_CACHED(vp) != 0) { xfs_inval_cached_trace(&ip->i_iocore, ioffset, -1, ctooff(offtoct(ioffset)), -1); - error = bhv_vop_flushinval_pages(vp, ctooff(offtoct(ioffset)), + error = xfs_flushinval_pages(ip, + ctooff(offtoct(ioffset)), -1, FI_REMAPF_LOCKED); if (error) goto out_unlock_iolock; Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vnode.h 2007-08-23 18:52:50.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.h 2007-08-23 18:58:43.000000000 +0200 @@ -41,7 +41,6 @@ typedef struct bhv_vnode { bhv_vflags_t v_flag; /* vnode flags (see above) */ bhv_vfs_t *v_vfsp; /* ptr to containing VFS */ bhv_vnumber_t v_number; /* in-core vnode number */ - bhv_head_t v_bh; /* behavior head */ spinlock_t v_lock; /* VN_LOCK/VN_UNLOCK */ atomic_t v_iocount; /* outstanding I/O count */ #ifdef XFS_VNODE_TRACE @@ -57,34 +56,6 @@ typedef struct bhv_vnode { #define VN_ISCHR(vp) S_ISCHR((vp)->v_inode.i_mode) #define VN_ISBLK(vp) S_ISBLK((vp)->v_inode.i_mode) -#define VNODE_POSITION_BASE BHV_POSITION_BASE /* chain bottom */ -#define VNODE_POSITION_TOP BHV_POSITION_TOP /* chain top */ -#define VNODE_POSITION_INVALID BHV_POSITION_INVALID /* invalid pos. num */ - -typedef enum { - VN_BHV_UNKNOWN, /* not specified */ - VN_BHV_XFS, /* xfs */ - VN_BHV_DM, /* data migration */ - VN_BHV_QM, /* quota manager */ - VN_BHV_IO, /* IO path */ - VN_BHV_END /* housekeeping end-of-range */ -} vn_bhv_t; - -#define VNODE_POSITION_XFS (VNODE_POSITION_BASE) -#define VNODE_POSITION_DM (VNODE_POSITION_BASE+10) -#define VNODE_POSITION_QM (VNODE_POSITION_BASE+20) -#define VNODE_POSITION_IO (VNODE_POSITION_BASE+30) - -/* - * Macros for dealing with the behavior descriptor inside of the vnode. - */ -#define BHV_TO_VNODE(bdp) ((bhv_vnode_t *)BHV_VOBJ(bdp)) -#define BHV_TO_VNODE_NULL(bdp) ((bhv_vnode_t *)BHV_VOBJNULL(bdp)) - -#define VN_BHV_HEAD(vp) ((bhv_head_t *)(&((vp)->v_bh))) -#define vn_bhv_head_init(bhp,name) bhv_head_init(bhp,name) -#define vn_bhv_remove(bhp,bdp) bhv_remove(bhp,bdp) - /* * Vnode to Linux inode mapping. */ @@ -110,7 +81,7 @@ typedef enum bhv_vrwlock { } bhv_vrwlock_t; /* - * Return values for bhv_vop_inactive. A return value of + * Return values for xfs_inactive. A return value of * VN_INACTIVE_NOCACHE implies that the file system behavior * has disassociated its state and bhv_desc_t from the vnode. */ @@ -118,201 +89,6 @@ typedef enum bhv_vrwlock { #define VN_INACTIVE_NOCACHE 1 /* - * Values for the cmd code given to vop_vnode_change. - */ -typedef enum bhv_vchange { - VCHANGE_FLAGS_FRLOCKS = 0, - VCHANGE_FLAGS_ENF_LOCKING = 1, - VCHANGE_FLAGS_TRUNCATED = 2, - VCHANGE_FLAGS_PAGE_DIRTY = 3, - VCHANGE_FLAGS_IOEXCL_COUNT = 4 -} bhv_vchange_t; - -typedef int (*vop_open_t)(bhv_desc_t *, struct cred *); -typedef ssize_t (*vop_read_t)(bhv_desc_t *, struct kiocb *, - const struct iovec *, unsigned int, - loff_t *, int, struct cred *); -typedef ssize_t (*vop_write_t)(bhv_desc_t *, struct kiocb *, - const struct iovec *, unsigned int, - loff_t *, int, struct cred *); -typedef ssize_t (*vop_sendfile_t)(bhv_desc_t *, struct file *, - loff_t *, int, size_t, read_actor_t, - void *, struct cred *); -typedef ssize_t (*vop_splice_read_t)(bhv_desc_t *, struct file *, loff_t *, - struct pipe_inode_info *, size_t, int, int, - struct cred *); -typedef ssize_t (*vop_splice_write_t)(bhv_desc_t *, struct pipe_inode_info *, - struct file *, loff_t *, size_t, int, int, - struct cred *); -typedef int (*vop_ioctl_t)(bhv_desc_t *, struct inode *, struct file *, - int, unsigned int, void __user *); -typedef int (*vop_getattr_t)(bhv_desc_t *, struct bhv_vattr *, int, - struct cred *); -typedef int (*vop_setattr_t)(bhv_desc_t *, struct bhv_vattr *, int, - struct cred *); -typedef int (*vop_access_t)(bhv_desc_t *, int, struct cred *); -typedef int (*vop_lookup_t)(bhv_desc_t *, bhv_vname_t *, bhv_vnode_t **, - int, bhv_vnode_t *, struct cred *); -typedef int (*vop_create_t)(bhv_desc_t *, bhv_vname_t *, struct bhv_vattr *, - bhv_vnode_t **, struct cred *); -typedef int (*vop_remove_t)(bhv_desc_t *, bhv_vname_t *, struct cred *); -typedef int (*vop_link_t)(bhv_desc_t *, bhv_vnode_t *, bhv_vname_t *, - struct cred *); -typedef int (*vop_rename_t)(bhv_desc_t *, bhv_vname_t *, bhv_vnode_t *, - bhv_vname_t *, struct cred *); -typedef int (*vop_mkdir_t)(bhv_desc_t *, bhv_vname_t *, struct bhv_vattr *, - bhv_vnode_t **, struct cred *); -typedef int (*vop_rmdir_t)(bhv_desc_t *, bhv_vname_t *, struct cred *); -typedef int (*vop_readdir_t)(bhv_desc_t *, void *dirent, size_t bufsize, - xfs_off_t *offset, filldir_t filldir); -typedef int (*vop_symlink_t)(bhv_desc_t *, bhv_vname_t *, struct bhv_vattr*, - char *, bhv_vnode_t **, struct cred *); -typedef int (*vop_readlink_t)(bhv_desc_t *, char *); -typedef int (*vop_fsync_t)(bhv_desc_t *, int, struct cred *, - xfs_off_t, xfs_off_t); -typedef int (*vop_inactive_t)(bhv_desc_t *, struct cred *); -typedef int (*vop_fid2_t)(bhv_desc_t *, struct fid *); -typedef int (*vop_release_t)(bhv_desc_t *); -typedef int (*vop_rwlock_t)(bhv_desc_t *, bhv_vrwlock_t); -typedef void (*vop_rwunlock_t)(bhv_desc_t *, bhv_vrwlock_t); -typedef int (*vop_frlock_t)(bhv_desc_t *, int, struct file_lock *,int, - xfs_off_t, struct cred *); -typedef int (*vop_bmap_t)(bhv_desc_t *, xfs_off_t, ssize_t, int, - struct xfs_iomap *, int *); -typedef int (*vop_reclaim_t)(bhv_desc_t *); -typedef int (*vop_attr_get_t)(bhv_desc_t *, const char *, char *, int *, - int, struct cred *); -typedef int (*vop_attr_set_t)(bhv_desc_t *, const char *, char *, int, - int, struct cred *); -typedef int (*vop_attr_remove_t)(bhv_desc_t *, const char *, - int, struct cred *); -typedef int (*vop_attr_list_t)(bhv_desc_t *, char *, int, int, - struct attrlist_cursor_kern *, struct cred *); -typedef void (*vop_link_removed_t)(bhv_desc_t *, bhv_vnode_t *, int); -typedef void (*vop_vnode_change_t)(bhv_desc_t *, bhv_vchange_t, __psint_t); -typedef void (*vop_ptossvp_t)(bhv_desc_t *, xfs_off_t, xfs_off_t, int); -typedef int (*vop_pflushinvalvp_t)(bhv_desc_t *, xfs_off_t, xfs_off_t, int); -typedef int (*vop_pflushvp_t)(bhv_desc_t *, xfs_off_t, xfs_off_t, - uint64_t, int); -typedef int (*vop_iflush_t)(bhv_desc_t *, int); - - -typedef struct bhv_vnodeops { - bhv_position_t vn_position; /* position within behavior chain */ - vop_open_t vop_open; - vop_read_t vop_read; - vop_write_t vop_write; - vop_sendfile_t vop_sendfile; - vop_splice_read_t vop_splice_read; - vop_splice_write_t vop_splice_write; - vop_ioctl_t vop_ioctl; - vop_getattr_t vop_getattr; - vop_setattr_t vop_setattr; - vop_access_t vop_access; - vop_lookup_t vop_lookup; - vop_create_t vop_create; - vop_remove_t vop_remove; - vop_link_t vop_link; - vop_rename_t vop_rename; - vop_mkdir_t vop_mkdir; - vop_rmdir_t vop_rmdir; - vop_readdir_t vop_readdir; - vop_symlink_t vop_symlink; - vop_readlink_t vop_readlink; - vop_fsync_t vop_fsync; - vop_inactive_t vop_inactive; - vop_fid2_t vop_fid2; - vop_rwlock_t vop_rwlock; - vop_rwunlock_t vop_rwunlock; - vop_frlock_t vop_frlock; - vop_bmap_t vop_bmap; - vop_reclaim_t vop_reclaim; - vop_attr_get_t vop_attr_get; - vop_attr_set_t vop_attr_set; - vop_attr_remove_t vop_attr_remove; - vop_attr_list_t vop_attr_list; - vop_link_removed_t vop_link_removed; - vop_vnode_change_t vop_vnode_change; - vop_ptossvp_t vop_tosspages; - vop_pflushinvalvp_t vop_flushinval_pages; - vop_pflushvp_t vop_flush_pages; - vop_release_t vop_release; - vop_iflush_t vop_iflush; -} bhv_vnodeops_t; - -/* - * Virtual node operations, operating from head bhv. - */ -#define VNHEAD(vp) ((vp)->v_bh.bh_first) -#define VOP(op, vp) (*((bhv_vnodeops_t *)VNHEAD(vp)->bd_ops)->op) -#define bhv_vop_open(vp, cr) VOP(vop_open, vp)(VNHEAD(vp),cr) -#define bhv_vop_read(vp,file,iov,segs,offset,ioflags,cr) \ - VOP(vop_read, vp)(VNHEAD(vp),file,iov,segs,offset,ioflags,cr) -#define bhv_vop_write(vp,file,iov,segs,offset,ioflags,cr) \ - VOP(vop_write, vp)(VNHEAD(vp),file,iov,segs,offset,ioflags,cr) -#define bhv_vop_sendfile(vp,f,off,ioflags,cnt,act,targ,cr) \ - VOP(vop_sendfile, vp)(VNHEAD(vp),f,off,ioflags,cnt,act,targ,cr) -#define bhv_vop_splice_read(vp,f,o,pipe,cnt,fl,iofl,cr) \ - VOP(vop_splice_read, vp)(VNHEAD(vp),f,o,pipe,cnt,fl,iofl,cr) -#define bhv_vop_splice_write(vp,f,o,pipe,cnt,fl,iofl,cr) \ - VOP(vop_splice_write, vp)(VNHEAD(vp),f,o,pipe,cnt,fl,iofl,cr) -#define bhv_vop_bmap(vp,of,sz,rw,b,n) \ - VOP(vop_bmap, vp)(VNHEAD(vp),of,sz,rw,b,n) -#define bhv_vop_getattr(vp, vap,f,cr) \ - VOP(vop_getattr, vp)(VNHEAD(vp), vap,f,cr) -#define bhv_vop_setattr(vp, vap,f,cr) \ - VOP(vop_setattr, vp)(VNHEAD(vp), vap,f,cr) -#define bhv_vop_access(vp, mode,cr) VOP(vop_access, vp)(VNHEAD(vp), mode,cr) -#define bhv_vop_lookup(vp,d,vpp,f,rdir,cr) \ - VOP(vop_lookup, vp)(VNHEAD(vp),d,vpp,f,rdir,cr) -#define bhv_vop_create(dvp,d,vap,vpp,cr) \ - VOP(vop_create, dvp)(VNHEAD(dvp),d,vap,vpp,cr) -#define bhv_vop_remove(dvp,d,cr) VOP(vop_remove, dvp)(VNHEAD(dvp),d,cr) -#define bhv_vop_link(dvp,fvp,d,cr) VOP(vop_link, dvp)(VNHEAD(dvp),fvp,d,cr) -#define bhv_vop_rename(fvp,fnm,tdvp,tnm,cr) \ - VOP(vop_rename, fvp)(VNHEAD(fvp),fnm,tdvp,tnm,cr) -#define bhv_vop_mkdir(dp,d,vap,vpp,cr) \ - VOP(vop_mkdir, dp)(VNHEAD(dp),d,vap,vpp,cr) -#define bhv_vop_rmdir(dp,d,cr) VOP(vop_rmdir, dp)(VNHEAD(dp),d,cr) -#define bhv_vop_readdir(vp,dirent,bufsize,offset,filldir) \ - VOP(vop_readdir, vp)(VNHEAD(vp),dirent,bufsize,offset,filldir) -#define bhv_vop_symlink(dvp,d,vap,tnm,vpp,cr) \ - VOP(vop_symlink, dvp)(VNHEAD(dvp),d,vap,tnm,vpp,cr) -#define bhv_vop_readlink(vp,link) \ - VOP(vop_readlink, vp)(VNHEAD(vp), link) -#define bhv_vop_fsync(vp,f,cr,b,e) VOP(vop_fsync, vp)(VNHEAD(vp),f,cr,b,e) -#define bhv_vop_inactive(vp,cr) VOP(vop_inactive, vp)(VNHEAD(vp),cr) -#define bhv_vop_release(vp) VOP(vop_release, vp)(VNHEAD(vp)) -#define bhv_vop_fid2(vp,fidp) VOP(vop_fid2, vp)(VNHEAD(vp),fidp) -#define bhv_vop_rwlock(vp,i) VOP(vop_rwlock, vp)(VNHEAD(vp),i) -#define bhv_vop_rwlock_try(vp,i) VOP(vop_rwlock, vp)(VNHEAD(vp),i) -#define bhv_vop_rwunlock(vp,i) VOP(vop_rwunlock, vp)(VNHEAD(vp),i) -#define bhv_vop_frlock(vp,c,fl,flags,offset,fr) \ - VOP(vop_frlock, vp)(VNHEAD(vp),c,fl,flags,offset,fr) -#define bhv_vop_reclaim(vp) VOP(vop_reclaim, vp)(VNHEAD(vp)) -#define bhv_vop_attr_get(vp, name, val, vallenp, fl, cred) \ - VOP(vop_attr_get, vp)(VNHEAD(vp),name,val,vallenp,fl,cred) -#define bhv_vop_attr_set(vp, name, val, vallen, fl, cred) \ - VOP(vop_attr_set, vp)(VNHEAD(vp),name,val,vallen,fl,cred) -#define bhv_vop_attr_remove(vp, name, flags, cred) \ - VOP(vop_attr_remove, vp)(VNHEAD(vp),name,flags,cred) -#define bhv_vop_attr_list(vp, buf, buflen, fl, cursor, cred) \ - VOP(vop_attr_list, vp)(VNHEAD(vp),buf,buflen,fl,cursor,cred) -#define bhv_vop_link_removed(vp, dvp, linkzero) \ - VOP(vop_link_removed, vp)(VNHEAD(vp), dvp, linkzero) -#define bhv_vop_vnode_change(vp, cmd, val) \ - VOP(vop_vnode_change, vp)(VNHEAD(vp), cmd, val) -#define bhv_vop_toss_pages(vp, first, last, fiopt) \ - VOP(vop_tosspages, vp)(VNHEAD(vp), first, last, fiopt) -#define bhv_vop_flushinval_pages(vp, first, last, fiopt) \ - VOP(vop_flushinval_pages, vp)(VNHEAD(vp),first,last,fiopt) -#define bhv_vop_flush_pages(vp, first, last, flags, fiopt) \ - VOP(vop_flush_pages, vp)(VNHEAD(vp),first,last,flags,fiopt) -#define bhv_vop_ioctl(vp, inode, filp, fl, cmd, arg) \ - VOP(vop_ioctl, vp)(VNHEAD(vp),inode,filp,fl,cmd,arg) -#define bhv_vop_iflush(vp, flags) VOP(vop_iflush, vp)(VNHEAD(vp), flags) - -/* * Flags for read/write calls - same values as IRIX */ #define IO_ISAIO 0x00001 /* don't wait for completion */ Index: linux-2.6-xfs/fs/xfs/xfs_vnodeops_bhv.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vnodeops_bhv.c 2007-08-23 18:58:28.000000000 +0200 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -1,438 +0,0 @@ - -#include "xfs_linux.h" -#include "xfs_vnodeops.h" - -#include "xfs_bmap_btree.h" -#include "xfs_inode.h" - -STATIC int -xfs_bhv_open( - bhv_desc_t *bdp, - cred_t *credp) -{ - return xfs_open(XFS_BHVTOI(bdp)); -} - -STATIC int -xfs_bhv_getattr( - bhv_desc_t *bdp, - bhv_vattr_t *vap, - int flags, - cred_t *credp) -{ - return xfs_getattr(XFS_BHVTOI(bdp), vap, flags); -} - -int -xfs_bhv_setattr( - bhv_desc_t *bdp, - bhv_vattr_t *vap, - int flags, - cred_t *credp) -{ - return xfs_setattr(XFS_BHVTOI(bdp), vap, flags, credp); -} - -STATIC int -xfs_bhv_access( - bhv_desc_t *bdp, - int mode, - cred_t *credp) -{ - return xfs_access(XFS_BHVTOI(bdp), mode, credp); -} - -STATIC int -xfs_bhv_readlink( - bhv_desc_t *bdp, - char *link) -{ - return xfs_readlink(XFS_BHVTOI(bdp), link); -} - -STATIC int -xfs_bhv_fsync( - bhv_desc_t *bdp, - int flag, - cred_t *credp, - xfs_off_t start, - xfs_off_t stop) -{ - return xfs_fsync(XFS_BHVTOI(bdp), flag, start, stop); -} - -STATIC int -xfs_bhv_release( - bhv_desc_t *bdp) -{ - return xfs_release(XFS_BHVTOI(bdp)); -} - -STATIC int -xfs_bhv_inactive( - bhv_desc_t *bdp, - cred_t *credp) -{ - return xfs_inactive(XFS_BHVTOI(bdp)); -} - -STATIC int -xfs_bhv_lookup( - bhv_desc_t *dir_bdp, - bhv_vname_t *dentry, - bhv_vnode_t **vpp, - int flags, - bhv_vnode_t *rdir, - cred_t *credp) -{ - return xfs_lookup(XFS_BHVTOI(dir_bdp), dentry, vpp); -} - -STATIC int -xfs_bhv_create( - bhv_desc_t *dir_bdp, - bhv_vname_t *dentry, - bhv_vattr_t *vap, - bhv_vnode_t **vpp, - cred_t *credp) -{ - return xfs_create(XFS_BHVTOI(dir_bdp), dentry, vap, vpp, credp); -} - -STATIC int -xfs_bhv_remove( - bhv_desc_t *dir_bdp, - bhv_vname_t *dentry, - cred_t *credp) -{ - return xfs_remove(XFS_BHVTOI(dir_bdp), dentry); -} - -STATIC int -xfs_bhv_link( - bhv_desc_t *target_dir_bdp, - bhv_vnode_t *src_vp, - bhv_vname_t *dentry, - cred_t *credp) -{ - return xfs_link(XFS_BHVTOI(target_dir_bdp), src_vp, dentry); -} - -STATIC int -xfs_bhv_mkdir( - bhv_desc_t *dir_bdp, - bhv_vname_t *dentry, - bhv_vattr_t *vap, - bhv_vnode_t **vpp, - cred_t *credp) -{ - return xfs_mkdir(XFS_BHVTOI(dir_bdp), dentry, vap, vpp, credp); -} - -STATIC int -xfs_bhv_rmdir( - bhv_desc_t *dir_bdp, - bhv_vname_t *dentry, - cred_t *credp) -{ - return xfs_rmdir(XFS_BHVTOI(dir_bdp), dentry); -} - -STATIC int -xfs_bhv_readdir( - bhv_desc_t *dir_bdp, - void *dirent, - size_t bufsize, - xfs_off_t *offset, - filldir_t filldir) -{ - return xfs_readdir(XFS_BHVTOI(dir_bdp), dirent, bufsize, offset, filldir); -} - -STATIC int -xfs_bhv_symlink( - bhv_desc_t *dir_bdp, - bhv_vname_t *dentry, - bhv_vattr_t *vap, - char *target_path, - bhv_vnode_t **vpp, - cred_t *credp) -{ - return xfs_symlink(XFS_BHVTOI(dir_bdp), dentry, vap, target_path, vpp, credp); -} - -STATIC int -xfs_bhv_fid2( - bhv_desc_t *bdp, - fid_t *fidp) -{ - return xfs_fid2(XFS_BHVTOI(bdp), fidp); -} - -STATIC int -xfs_bhv_rwlock( - bhv_desc_t *bdp, - bhv_vrwlock_t locktype) -{ - return xfs_rwlock(XFS_BHVTOI(bdp), locktype); -} - -STATIC void -xfs_bhv_rwunlock( - bhv_desc_t *bdp, - bhv_vrwlock_t locktype) -{ - xfs_rwunlock(XFS_BHVTOI(bdp), locktype); -} - -STATIC int -xfs_bhv_inode_flush( - bhv_desc_t *bdp, - int flags) -{ - return xfs_inode_flush(XFS_BHVTOI(bdp), flags); -} - -STATIC int -xfs_bhv_reclaim( - bhv_desc_t *bdp) -{ - return xfs_reclaim(XFS_BHVTOI(bdp)); -} - -STATIC int -xfs_bhv_rename( - bhv_desc_t *src_dir_bdp, - bhv_vname_t *src_vname, - bhv_vnode_t *target_dir_vp, - bhv_vname_t *target_vname, - cred_t *credp) -{ - return xfs_rename(XFS_BHVTOI(src_dir_bdp), src_vname, - target_dir_vp, target_vname); -} - -STATIC int -xfs_bhv_attr_get( - bhv_desc_t *bdp, - const char *name, - char *value, - int *valuelenp, - int flags, - cred_t *cred) -{ - return xfs_attr_get(XFS_BHVTOI(bdp), name, value, valuelenp, - flags, cred); -} - -STATIC int -xfs_bhv_attr_set( - bhv_desc_t *bdp, - const char *name, - char *value, - int valuelen, - int flags, - cred_t *cred) -{ - return xfs_attr_set(XFS_BHVTOI(bdp), name, value, valuelen, - flags); -} - -STATIC int -xfs_bhv_attr_remove( - bhv_desc_t *bdp, - const char *name, - int flags, - cred_t *cred) -{ - return xfs_attr_remove(XFS_BHVTOI(bdp), name, flags); -} - -STATIC int -xfs_bhv_attr_list( - bhv_desc_t *bdp, - char *buffer, - int bufsize, - int flags, - struct attrlist_cursor_kern *cursor, - cred_t *cred) -{ - return xfs_attr_list(XFS_BHVTOI(bdp), buffer, bufsize, flags, - cursor); -} - -STATIC int -xfs_bhv_ioctl( - bhv_desc_t *bdp, - struct inode *inode, - struct file *filp, - int ioflags, - unsigned int cmd, - void __user *arg) -{ - return xfs_ioctl(XFS_BHVTOI(bdp), filp, ioflags, cmd, arg); -} - -STATIC ssize_t -xfs_bhv_read( - bhv_desc_t *bdp, - struct kiocb *iocb, - const struct iovec *iovp, - unsigned int segs, - loff_t *offset, - int ioflags, - cred_t *credp) -{ - return xfs_read(XFS_BHVTOI(bdp), iocb, iovp, segs, - offset, ioflags); -} - -STATIC ssize_t -xfs_bhv_sendfile( - bhv_desc_t *bdp, - struct file *filp, - loff_t *offset, - int ioflags, - size_t count, - read_actor_t actor, - void *target, - cred_t *credp) -{ - return xfs_sendfile(XFS_BHVTOI(bdp), filp, offset, ioflags, - count, actor, target); -} - -STATIC ssize_t -xfs_bhv_splice_read( - bhv_desc_t *bdp, - struct file *infilp, - loff_t *ppos, - struct pipe_inode_info *pipe, - size_t count, - int flags, - int ioflags, - cred_t *credp) -{ - return xfs_splice_read(XFS_BHVTOI(bdp), infilp, ppos, pipe, - count, flags, ioflags); -} - -STATIC ssize_t -xfs_bhv_splice_write( - bhv_desc_t *bdp, - struct pipe_inode_info *pipe, - struct file *outfilp, - loff_t *ppos, - size_t count, - int flags, - int ioflags, - cred_t *credp) -{ - return xfs_splice_write(XFS_BHVTOI(bdp), pipe, outfilp, ppos, - count, flags, ioflags); -} - -STATIC ssize_t -xfs_bhv_write( - bhv_desc_t *bdp, - struct kiocb *iocb, - const struct iovec *iovp, - unsigned int nsegs, - loff_t *offset, - int ioflags, - cred_t *credp) -{ - return xfs_write(XFS_BHVTOI(bdp), iocb, iovp, nsegs, offset, - ioflags); -} - -STATIC int -xfs_bhv_bmap(bhv_desc_t *bdp, - xfs_off_t offset, - ssize_t count, - int flags, - struct xfs_iomap *iomapp, - int *niomaps) -{ - return xfs_bmap(XFS_BHVTOI(bdp), offset, count, flags, - iomapp, niomaps); -} - -STATIC void -fs_tosspages( - bhv_desc_t *bdp, - xfs_off_t first, - xfs_off_t last, - int fiopt) -{ - xfs_tosspages(XFS_BHVTOI(bdp), first, last, fiopt); -} - -STATIC int -fs_flushinval_pages( - bhv_desc_t *bdp, - xfs_off_t first, - xfs_off_t last, - int fiopt) -{ - return xfs_flushinval_pages(XFS_BHVTOI(bdp), first, last, - fiopt); -} - -STATIC int -fs_flush_pages( - bhv_desc_t *bdp, - xfs_off_t first, - xfs_off_t last, - uint64_t flags, - int fiopt) -{ - return xfs_flush_pages(XFS_BHVTOI(bdp), first, last, flags, - fiopt); -} - -bhv_vnodeops_t xfs_vnodeops = { - BHV_IDENTITY_INIT(VN_BHV_XFS,VNODE_POSITION_XFS), - .vop_open = xfs_bhv_open, - .vop_read = xfs_bhv_read, -#ifdef HAVE_SENDFILE - .vop_sendfile = xfs_bhv_sendfile, -#endif -#ifdef HAVE_SPLICE - .vop_splice_read = xfs_bhv_splice_read, - .vop_splice_write = xfs_bhv_splice_write, -#endif - .vop_write = xfs_bhv_write, - .vop_ioctl = xfs_bhv_ioctl, - .vop_getattr = xfs_bhv_getattr, - .vop_setattr = xfs_bhv_setattr, - .vop_access = xfs_bhv_access, - .vop_lookup = xfs_bhv_lookup, - .vop_create = xfs_bhv_create, - .vop_remove = xfs_bhv_remove, - .vop_link = xfs_bhv_link, - .vop_rename = xfs_bhv_rename, - .vop_mkdir = xfs_bhv_mkdir, - .vop_rmdir = xfs_bhv_rmdir, - .vop_readdir = xfs_bhv_readdir, - .vop_symlink = xfs_bhv_symlink, - .vop_readlink = xfs_bhv_readlink, - .vop_fsync = xfs_bhv_fsync, - .vop_inactive = xfs_bhv_inactive, - .vop_fid2 = xfs_bhv_fid2, - .vop_rwlock = xfs_bhv_rwlock, - .vop_rwunlock = xfs_bhv_rwunlock, - .vop_bmap = xfs_bhv_bmap, - .vop_reclaim = xfs_bhv_reclaim, - .vop_attr_get = xfs_bhv_attr_get, - .vop_attr_set = xfs_bhv_attr_set, - .vop_attr_remove = xfs_bhv_attr_remove, - .vop_attr_list = xfs_bhv_attr_list, - .vop_link_removed = (vop_link_removed_t)fs_noval, - .vop_vnode_change = (vop_vnode_change_t)fs_noval, - .vop_tosspages = fs_tosspages, - .vop_flushinval_pages = fs_flushinval_pages, - .vop_flush_pages = fs_flush_pages, - .vop_release = xfs_bhv_release, - .vop_iflush = xfs_bhv_inode_flush, -}; Index: linux-2.6-xfs/fs/xfs/xfs_inode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_inode.h 2007-08-23 18:52:50.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_inode.h 2007-08-23 18:58:43.000000000 +0200 @@ -257,7 +257,7 @@ typedef struct xfs_inode { struct xfs_inode *i_mprev; /* ptr to prev inode */ struct xfs_mount *i_mount; /* fs mount struct ptr */ struct list_head i_reclaim; /* reclaim list */ - struct bhv_desc i_bhv_desc; /* inode behavior descriptor*/ + struct bhv_vnode *i_vnode; /* vnode backpointer */ struct xfs_dquot *i_udquot; /* user dquot */ struct xfs_dquot *i_gdquot; /* group dquot */ @@ -465,12 +465,8 @@ xfs_iflags_test(xfs_inode_t *ip, unsigne #define XFS_ITRUNC_DEFINITE 0x1 #define XFS_ITRUNC_MAYBE 0x2 -#define XFS_ITOV(ip) BHV_TO_VNODE(XFS_ITOBHV(ip)) -#define XFS_ITOV_NULL(ip) BHV_TO_VNODE_NULL(XFS_ITOBHV(ip)) -#define XFS_ITOBHV(ip) ((struct bhv_desc *)(&((ip)->i_bhv_desc))) -#define XFS_BHVTOI(bhvp) ((xfs_inode_t *)((char *)(bhvp) - \ - (char *)&(((xfs_inode_t *)0)->i_bhv_desc))) -#define BHV_IS_XFS(bdp) (BHV_OPS(bdp) == &xfs_vnodeops) +#define XFS_ITOV(ip) ((ip)->i_vnode) +#define XFS_ITOV_NULL(ip) ((ip)->i_vnode) /* * For multiple groups support: if S_ISGID bit is set in the parent @@ -557,8 +553,6 @@ void xfs_ichgtime(xfs_inode_t *, int); xfs_fsize_t xfs_file_last_byte(xfs_inode_t *); void xfs_lock_inodes(xfs_inode_t **, int, int, uint); -xfs_inode_t *xfs_vtoi(struct bhv_vnode *vp); - void xfs_synchronize_atime(xfs_inode_t *); xfs_bmbt_rec_host_t *xfs_iext_get_ext(xfs_ifork_t *, xfs_extnum_t); Index: linux-2.6-xfs/fs/xfs/Makefile-linux-2.6 =================================================================== --- linux-2.6-xfs.orig/fs/xfs/Makefile-linux-2.6 2007-08-23 18:58:28.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/Makefile-linux-2.6 2007-08-23 18:58:43.000000000 +0200 @@ -79,7 +79,6 @@ xfs-y += xfs_alloc.o \ xfs_utils.o \ xfs_vfsops.o \ xfs_vnodeops.o \ - xfs_vnodeops_bhv.o \ xfs_rw.o \ xfs_dmops.o \ xfs_qmops.o Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vfs.h 2007-08-23 16:57:17.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.h 2007-08-23 18:58:43.000000000 +0200 @@ -28,6 +28,7 @@ struct fid; struct cred; struct seq_file; struct super_block; +struct xfs_inode; struct xfs_mount_args; typedef struct kstatfs bhv_statvfs_t; @@ -131,7 +132,7 @@ typedef int (*vfs_vget_t)(bhv_desc_t *, typedef int (*vfs_dmapiops_t)(bhv_desc_t *, caddr_t); typedef int (*vfs_quotactl_t)(bhv_desc_t *, int, int, caddr_t); typedef void (*vfs_init_vnode_t)(bhv_desc_t *, - struct bhv_vnode *, bhv_desc_t *, int); + struct bhv_vnode *, struct xfs_inode *, int); typedef void (*vfs_force_shutdown_t)(bhv_desc_t *, int, char *, int); typedef void (*vfs_freeze_t)(bhv_desc_t *); typedef struct inode * (*vfs_get_inode_t)(bhv_desc_t *, xfs_ino_t, int); @@ -206,7 +207,7 @@ extern int vfs_vget(bhv_desc_t *, struct extern int vfs_dmapiops(bhv_desc_t *, caddr_t); extern int vfs_quotactl(bhv_desc_t *, int, int, caddr_t); extern struct inode *vfs_get_inode(bhv_desc_t *, xfs_ino_t, int); -extern void vfs_init_vnode(bhv_desc_t *, struct bhv_vnode *, bhv_desc_t *, int); +extern void vfs_init_vnode(bhv_desc_t *, struct bhv_vnode *, struct xfs_inode *, int); extern void vfs_force_shutdown(bhv_desc_t *, int, char *, int); extern void vfs_freeze(bhv_desc_t *); Index: linux-2.6-xfs/fs/xfs/xfs_iget.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_iget.c 2007-08-23 18:52:50.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_iget.c 2007-08-23 18:58:43.000000000 +0200 @@ -342,7 +342,7 @@ finish_inode: * If we have a real type for an on-disk inode, we can set ops(&unlock) * now. If it's a new inode being created, xfs_ialloc will handle it. */ - bhv_vfs_init_vnode(XFS_MTOVFS(mp), vp, XFS_ITOBHV(ip), 1); + bhv_vfs_init_vnode(XFS_MTOVFS(mp), vp, ip, 1); return 0; } @@ -536,7 +536,8 @@ xfs_ireclaim(xfs_inode_t *ip) */ vp = XFS_ITOV_NULL(ip); if (vp) { - vn_bhv_remove(VN_BHV_HEAD(vp), XFS_ITOBHV(ip)); + vn_to_inode(vp)->i_private = NULL; + ip->i_vnode = NULL; } /* Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_super.h 2007-08-23 16:57:17.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.h 2007-08-23 18:58:43.000000000 +0200 @@ -77,7 +77,7 @@ struct block_device; extern __uint64_t xfs_max_file_offset(unsigned int); extern struct inode *xfs_get_inode(bhv_desc_t *, xfs_ino_t, int); -extern void xfs_initialize_vnode(bhv_desc_t *, bhv_vnode_t *, bhv_desc_t *, int); +extern void xfs_initialize_vnode(bhv_desc_t *, bhv_vnode_t *, struct xfs_inode *, int); extern void xfs_flush_inode(struct xfs_inode *); extern void xfs_flush_device(struct xfs_inode *); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vfs.c 2007-08-23 16:57:17.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.c 2007-08-23 18:58:43.000000000 +0200 @@ -200,7 +200,7 @@ void vfs_init_vnode( struct bhv_desc *bdp, struct bhv_vnode *vp, - struct bhv_desc *bp, + struct xfs_inode *ip, int unlock) { struct bhv_desc *next = bdp; @@ -208,7 +208,7 @@ vfs_init_vnode( ASSERT(next); while (! (bhvtovfsops(next))->vfs_init_vnode) next = BHV_NEXT(next); - ((*bhvtovfsops(next)->vfs_init_vnode)(next, vp, bp, unlock)); + ((*bhvtovfsops(next)->vfs_init_vnode)(next, vp, ip, unlock)); } void Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm.c 2007-08-23 18:58:28.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c 2007-08-23 18:58:43.000000000 +0200 @@ -575,11 +575,11 @@ xfs_dm_bulkall_iget_one( dm_ip_to_handle(vn_to_inode(vp), &handle); xfs_dm_handle_to_xstat(xbuf, xstat_sz, &handle, sizeof(handle)); - /* Drop ILOCK_SHARED for call to bhv_vop_attr_get */ + /* Drop ILOCK_SHARED for call to xfs_attr_get */ xfs_iunlock(ip, XFS_ILOCK_SHARED); memset(&xbuf->dx_attrdata, 0, sizeof(dm_vardata_t)); - error = bhv_vop_attr_get(vp, attr_name, attr_buf, + error = xfs_attr_get(ip, attr_name, attr_buf, &value_len, ATTR_ROOT, sys_cred); VN_RELE(vp); @@ -1736,7 +1736,6 @@ xfs_dm_get_destroy_dmattr( int value_len; char *value; int error; - bhv_vnode_t *vp = vn_from_inode(inode); /* Returns negative errors to DMAPI */ @@ -1752,7 +1751,7 @@ xfs_dm_get_destroy_dmattr( (char *)attrnamep->an_chars, DM_ATTR_NAME_SIZE + 1); dkattrname.dan_chars[sizeof(dkattrname.dan_chars) - 1] = '\0'; - /* bhv_vop_attr_get will not return anything if the buffer is too small, + /* xfs_attr_get will not return anything if the buffer is too small, and we don't know how big to make the buffer, so this may take two tries to get it right. The initial try must use a buffer of at least XFS_BUG_KLUDGE bytes to prevent buffer overflow because @@ -1764,7 +1763,7 @@ xfs_dm_get_destroy_dmattr( if (value == NULL) return(-ENOMEM); - error = bhv_vop_attr_get(vp, dkattrname.dan_chars, value, &value_len, + error = xfs_attr_get(XFS_I(inode), dkattrname.dan_chars, value, &value_len, ATTR_ROOT, sys_cred); if (error == ERANGE) { kfree(value); @@ -1773,7 +1772,7 @@ xfs_dm_get_destroy_dmattr( if (value == NULL) return(-ENOMEM); - error = bhv_vop_attr_get(vp, dkattrname.dan_chars, value, + error = xfs_attr_get(XFS_I(inode), dkattrname.dan_chars, value, &value_len, ATTR_ROOT, sys_cred); } if (error) { @@ -1970,7 +1969,7 @@ xfs_dm_get_dirattrs_rvp( mutex_lock(&inode->i_mutex); error = -ENOENT; if (!IS_DEADDIR(inode)) { - error = -bhv_vop_readdir(vp, cb, dp->i_size, + error = -xfs_readdir(dp, cb, dp->i_size, (xfs_off_t *)&loc, dm_filldir); } mutex_unlock(&inode->i_mutex); @@ -2017,7 +2016,6 @@ xfs_dm_get_dmattr( int value_len; int alloc_size; int error; - bhv_vnode_t *vp = vn_from_inode(inode); /* Returns negative errors to DMAPI */ @@ -2050,7 +2048,7 @@ xfs_dm_get_dmattr( value_len = alloc_size; /* in/out parameter */ - error = bhv_vop_attr_get(vp, name.dan_chars, value, &value_len, + error = xfs_attr_get(XFS_I(inode), name.dan_chars, value, &value_len, ATTR_ROOT, NULL); DM_EA_XLATE_ERR(error); @@ -2202,7 +2200,6 @@ xfs_dm_getall_dmattr( int total_size; int list_size = 8192; /* should be big enough */ int error; - bhv_vnode_t *vp = vn_from_inode(inode); /* Returns negative errors to DMAPI */ @@ -2243,8 +2240,8 @@ xfs_dm_getall_dmattr( more or if we encounter an error, then finish up. */ - error = bhv_vop_attr_list(vp, (char *)attrlist, list_size, - ATTR_ROOT, &cursor, NULL); + error = xfs_attr_list(XFS_I(inode), (char *)attrlist, list_size, + ATTR_ROOT, &cursor); DM_EA_XLATE_ERR(error); if (error || attrlist->al_count == 0) @@ -2302,7 +2299,7 @@ xfs_dm_getall_dmattr( value_len = entry->a_valuelen; - error = bhv_vop_attr_get(vp, entry->a_name, + error = xfs_attr_get(XFS_I(inode), entry->a_name, (void *)(ulist + 1), &value_len, ATTR_ROOT, NULL); DM_EA_XLATE_ERR(error); @@ -2665,7 +2662,6 @@ xfs_dm_remove_dmattr( { dm_dkattrname_t name; int error; - bhv_vnode_t *vp = vn_from_inode(inode); /* Returns negative errors to DMAPI */ @@ -2677,8 +2673,8 @@ xfs_dm_remove_dmattr( /* Remove the attribute from the object. */ - error = bhv_vop_attr_remove(vp, name.dan_chars, setdtime ? - ATTR_ROOT : (ATTR_ROOT|ATTR_KERNOTIME), NULL); + error = xfs_attr_remove(XFS_I(inode), name.dan_chars, setdtime ? + ATTR_ROOT : (ATTR_ROOT|ATTR_KERNOTIME)); DM_EA_XLATE_ERR(error); if (error == ENOATTR) @@ -2725,7 +2721,6 @@ xfs_dm_set_dmattr( char *value; int alloc_size; int error; - bhv_vnode_t *vp = vn_from_inode(inode); /* Returns negative errors to DMAPI */ @@ -2748,9 +2743,9 @@ xfs_dm_set_dmattr( if (copy_from_user( value, bufp, buflen)) { error = EFAULT; } else { - error = bhv_vop_attr_set(vp, name.dan_chars, value, buflen, + error = xfs_attr_set(XFS_I(inode), name.dan_chars, value, buflen, setdtime ? ATTR_ROOT : - (ATTR_ROOT|ATTR_KERNOTIME), NULL); + (ATTR_ROOT|ATTR_KERNOTIME)); DM_EA_XLATE_ERR(error); } kmem_free(value, alloc_size); @@ -2849,7 +2844,7 @@ xfs_dm_set_fileattr( vat.va_size = stat.fa_size; } - error = bhv_vop_setattr(vp, &vat, ATTR_DMI, NULL); + error = xfs_setattr(XFS_I(inode), &vat, ATTR_DMI, NULL); if (!error) vn_revalidate(vp); /* update Linux inode flags */ return(-error); /* Return negative error to DMAPI */ @@ -3003,7 +2998,7 @@ xfs_dm_sync_by_handle( /* We need to protect against concurrent writers.. */ ret = filemap_fdatawrite(inode->i_mapping); down_rw_sems(inode, DM_FLAGS_IMUX); - err = bhv_vop_fsync(vp, FSYNC_WAIT, NULL, (xfs_off_t)0,(xfs_off_t)-1); + err = xfs_fsync(XFS_I(inode), FSYNC_WAIT, 0, -1); if (!ret) ret = err; up_rw_sems(inode, DM_FLAGS_IMUX); Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm_bhv.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm_bhv.c 2007-08-23 16:57:17.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm_bhv.c 2007-08-23 18:58:43.000000000 +0200 @@ -72,14 +72,14 @@ xfs_dm_mount( error = bhv_vfs_root(vfsp, &rootvp); if (error) return error; - if (bhv_lookup_range(VN_BHV_HEAD(rootvp), - VNODE_POSITION_XFS, VNODE_POSITION_XFS)) { - vfsp->vfs_flag |= VFS_DMI; - error = dm_send_mount_event(vfsp->vfs_super, - DM_RIGHT_NULL, NULL, DM_RIGHT_NULL, - vn_to_inode(rootvp), - DM_RIGHT_NULL, args->mtpt, args->fsname); - } + + + vfsp->vfs_flag |= VFS_DMI; + error = dm_send_mount_event(vfsp->vfs_super, + DM_RIGHT_NULL, NULL, DM_RIGHT_NULL, + vn_to_inode(rootvp), + DM_RIGHT_NULL, args->mtpt, args->fsname); + VN_RELE(rootvp); if (error) error = -error; /* DMAPI returns negative errs */ Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm_fsops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm_fsops.c 2007-08-23 16:57:17.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm_fsops.c 2007-08-23 18:58:43.000000000 +0200 @@ -44,6 +44,7 @@ #include "xfs_acl.h" #include "xfs_attr.h" #include "xfs_inode_item.h" +#include "xfs_vnodeops.h" #include #include #include "xfs_dm.h" @@ -84,11 +85,11 @@ xfs_dm_fh_to_inode( STATIC int xfs_dm_inode_to_fh( - struct inode *ip, + struct inode *inode, dm_fid_t *dmfid, dm_fsid_t *dmfsid) { - bhv_vnode_t *vp = vn_from_inode(ip); + bhv_vnode_t *vp = vn_from_inode(inode); int error; fid_t fid; @@ -96,7 +97,7 @@ xfs_dm_inode_to_fh( if (vp->v_vfsp->vfs_altfsid == NULL) return -EINVAL; - error = bhv_vop_fid2(vp, &fid); + error = xfs_fid2(XFS_I(inode), &fid); if (error) return -error; /* Return negative error to DMAPI */ Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ksyms.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_ksyms.c 2007-08-23 18:58:28.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ksyms.c 2007-08-23 18:58:43.000000000 +0200 @@ -298,6 +298,13 @@ EXPORT_SYMBOL(xfs_read_buf); EXPORT_SYMBOL(xfs_rwlock); EXPORT_SYMBOL(xfs_rwunlock); EXPORT_SYMBOL(xfs_setattr); +EXPORT_SYMBOL(xfs_fid2); +EXPORT_SYMBOL(xfs_attr_get); +EXPORT_SYMBOL(xfs_attr_set); +EXPORT_SYMBOL(xfs_fsync); +EXPORT_SYMBOL(xfs_attr_remove); +EXPORT_SYMBOL(xfs_attr_list); +EXPORT_SYMBOL(xfs_readdir); EXPORT_SYMBOL(xfs_setsize_buftarg); EXPORT_SYMBOL(xfs_syncsub); EXPORT_SYMBOL(xfs_sync_inodes); @@ -326,8 +333,6 @@ EXPORT_SYMBOL(xfs_truncate_file); EXPORT_SYMBOL(xfs_unmount_flush); EXPORT_SYMBOL(xfs_unmountfs_writesb); EXPORT_SYMBOL(xfs_vfsops); -EXPORT_SYMBOL(xfs_vnodeops); -EXPORT_SYMBOL(xfs_vtoi); EXPORT_SYMBOL(xfs_write_clear_setuid); EXPORT_SYMBOL(xfs_dinode_from_disk); EXPORT_SYMBOL(xfs_sb_from_disk); Index: linux-2.6-xfs/fs/xfs/xfsidbg.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfsidbg.c 2007-08-23 18:52:50.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfsidbg.c 2007-08-23 18:58:43.000000000 +0200 @@ -1796,9 +1796,6 @@ static void printbhv(bhv_desc_t *bdp) static void printvnode(bhv_vnode_t *vp, unsigned long addr) { kdb_printf("vnode: 0x%lx\n", addr); - kdb_printf(" v_bh 0x%p\n", &vp->v_bh); - - printbhv(VNHEAD(vp)); printflags((__psunsigned_t)vp->v_flag, tab_vflags, "flag ="); kdb_printf("\n"); Index: linux-2.6-xfs/fs/xfs/xfs_mount.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_mount.h 2007-08-23 18:52:50.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_mount.h 2007-08-23 18:58:43.000000000 +0200 @@ -66,7 +66,6 @@ struct xfs_swapext; struct xfs_mru_cache; extern struct bhv_vfsops xfs_vfsops; -extern struct bhv_vnodeops xfs_vnodeops; #define AIL_LOCK_T lock_t #define AIL_LOCKINIT(x,y) spinlock_init(x,y) From owner-xfs@oss.sgi.com Thu Aug 23 12:37:12 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 12:37:16 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_24, J_CHICKENPOX_65,J_CHICKENPOX_72,J_CHICKENPOX_75 autolearn=no version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7NJb84p002540 for ; Thu, 23 Aug 2007 12:37:11 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7NJb4A5008432 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 23 Aug 2007 21:37:04 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7NJb4NB008430 for xfs@oss.sgi.com; Thu, 23 Aug 2007 21:37:04 +0200 Date: Thu, 23 Aug 2007 21:37:04 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH 1/17] decontaminate vnode operations from behavior details Message-ID: <20070823193704.GB8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12607 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs All vnode ops now take struct xfs_inode pointers and the behaviour related glue is split out into methods of it's own. This required fixing xfs_create/mkdir/symlink to not mess with the inode pointer but rather use a separate boolean for error handling. Thanks to Dave Chinner for that fix. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/xfs_vnodeops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vnodeops.c 2007-08-23 14:40:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vnodeops.c 2007-08-23 14:41:01.000000000 +0200 @@ -52,15 +52,13 @@ #include "xfs_trans_space.h" #include "xfs_log_priv.h" #include "xfs_filestream.h" +#include "xfs_vnodeops.h" -STATIC int +int xfs_open( - bhv_desc_t *bdp, - cred_t *credp) + xfs_inode_t *ip) { int mode; - bhv_vnode_t *vp = BHV_TO_VNODE(bdp); - xfs_inode_t *ip = XFS_BHVTOI(bdp); if (XFS_FORCED_SHUTDOWN(ip->i_mount)) return XFS_ERROR(EIO); @@ -69,7 +67,7 @@ xfs_open( * If it's a directory with any blocks, read-ahead block 0 * as we're almost certain to have the next operation be a read there. */ - if (VN_ISDIR(vp) && ip->i_d.di_nextents > 0) { + if (S_ISDIR(ip->i_d.di_mode) && ip->i_d.di_nextents > 0) { mode = xfs_ilock_map_shared(ip); if (ip->i_d.di_nextents > 0) (void)xfs_da_reada_buf(NULL, ip, 0, XFS_DATA_FORK); @@ -81,23 +79,17 @@ xfs_open( /* * xfs_getattr */ -STATIC int +int xfs_getattr( - bhv_desc_t *bdp, + xfs_inode_t *ip, bhv_vattr_t *vap, - int flags, - cred_t *credp) + int flags) { - xfs_inode_t *ip; - xfs_mount_t *mp; - bhv_vnode_t *vp; + bhv_vnode_t *vp = XFS_ITOV(ip); + xfs_mount_t *mp = ip->i_mount; - vp = BHV_TO_VNODE(bdp); vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); - ip = XFS_BHVTOI(bdp); - mp = ip->i_mount; - if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -215,14 +207,14 @@ xfs_getattr( */ int xfs_setattr( - bhv_desc_t *bdp, + xfs_inode_t *ip, bhv_vattr_t *vap, int flags, cred_t *credp) { - xfs_inode_t *ip; + bhv_vnode_t *vp = XFS_ITOV(ip); + xfs_mount_t *mp = ip->i_mount; xfs_trans_t *tp; - xfs_mount_t *mp; int mask; int code; uint lock_flags; @@ -230,14 +222,12 @@ xfs_setattr( uid_t uid=0, iuid=0; gid_t gid=0, igid=0; int timeflags = 0; - bhv_vnode_t *vp; xfs_prid_t projid=0, iprojid=0; int mandlock_before, mandlock_after; struct xfs_dquot *udqp, *gdqp, *olddquot1, *olddquot2; int file_owner; int need_iolock = 1; - vp = BHV_TO_VNODE(bdp); vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); if (vp->v_vfsp->vfs_flag & VFS_RDONLY) @@ -251,9 +241,6 @@ xfs_setattr( return XFS_ERROR(EINVAL); } - ip = XFS_BHVTOI(bdp); - mp = ip->i_mount; - if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -924,19 +911,16 @@ xfs_setattr( * xfs_access * Null conversion from vnode mode bits to inode mode bits, as in efs. */ -STATIC int +int xfs_access( - bhv_desc_t *bdp, + xfs_inode_t *ip, int mode, cred_t *credp) { - xfs_inode_t *ip; int error; - vn_trace_entry(BHV_TO_VNODE(bdp), __FUNCTION__, - (inst_t *)__return_address); + vn_trace_entry(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address); - ip = XFS_BHVTOI(bdp); xfs_ilock(ip, XFS_ILOCK_SHARED); error = xfs_iaccess(ip, mode, credp); xfs_iunlock(ip, XFS_ILOCK_SHARED); @@ -998,16 +982,11 @@ xfs_readlink_bmap( return error; } -/* - * xfs_readlink - * - */ -STATIC int +int xfs_readlink( - bhv_desc_t *bdp, + xfs_inode_t *ip, char *link) { - xfs_inode_t *ip = XFS_BHVTOI(bdp); xfs_mount_t *mp = ip->i_mount; int pathlen; int error = 0; @@ -1047,23 +1026,18 @@ xfs_readlink( * be held while flushing the data, so acquire after we're done * with that. */ -STATIC int +int xfs_fsync( - bhv_desc_t *bdp, + xfs_inode_t *ip, int flag, - cred_t *credp, xfs_off_t start, xfs_off_t stop) { - xfs_inode_t *ip; xfs_trans_t *tp; int error; int log_flushed = 0, changed = 1; - vn_trace_entry(BHV_TO_VNODE(bdp), - __FUNCTION__, (inst_t *)__return_address); - - ip = XFS_BHVTOI(bdp); + vn_trace_entry(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address); ASSERT(start >= 0 && stop >= -1); @@ -1530,19 +1504,14 @@ xfs_inactive_attrs( return 0; } -STATIC int +int xfs_release( - bhv_desc_t *bdp) + xfs_inode_t *ip) { - xfs_inode_t *ip; - bhv_vnode_t *vp; - xfs_mount_t *mp; + bhv_vnode_t *vp = XFS_ITOV(ip); + xfs_mount_t *mp = ip->i_mount; int error; - vp = BHV_TO_VNODE(bdp); - ip = XFS_BHVTOI(bdp); - mp = ip->i_mount; - if (!VN_ISREG(vp) || (ip->i_d.di_mode == 0)) return 0; @@ -1608,13 +1577,11 @@ xfs_release( * now be truncated. Also, we clear all of the read-ahead state * kept for the inode here since the file is now closed. */ -STATIC int +int xfs_inactive( - bhv_desc_t *bdp, - cred_t *credp) + xfs_inode_t *ip) { - xfs_inode_t *ip; - bhv_vnode_t *vp; + bhv_vnode_t *vp = XFS_ITOV(ip); xfs_bmap_free_t free_list; xfs_fsblock_t first_block; int committed; @@ -1623,11 +1590,8 @@ xfs_inactive( int error; int truncate; - vp = BHV_TO_VNODE(bdp); vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); - ip = XFS_BHVTOI(bdp); - /* * If the inode is already free, then there can be nothing * to clean up here. @@ -1828,34 +1792,24 @@ xfs_inactive( } -/* - * xfs_lookup - */ -STATIC int +int xfs_lookup( - bhv_desc_t *dir_bdp, + xfs_inode_t *dp, bhv_vname_t *dentry, - bhv_vnode_t **vpp, - int flags, - bhv_vnode_t *rdir, - cred_t *credp) + bhv_vnode_t **vpp) { - xfs_inode_t *dp, *ip; + xfs_inode_t *ip; xfs_ino_t e_inum; int error; uint lock_mode; - bhv_vnode_t *dir_vp; - - dir_vp = BHV_TO_VNODE(dir_bdp); - vn_trace_entry(dir_vp, __FUNCTION__, (inst_t *)__return_address); - dp = XFS_BHVTOI(dir_bdp); + vn_trace_entry(XFS_ITOV(dp), __FUNCTION__, (inst_t *)__return_address); if (XFS_FORCED_SHUTDOWN(dp->i_mount)) return XFS_ERROR(EIO); lock_mode = xfs_ilock_map_shared(dp); - error = xfs_dir_lookup_int(dir_bdp, lock_mode, dentry, &e_inum, &ip); + error = xfs_dir_lookup_int(dp, lock_mode, dentry, &e_inum, &ip); if (!error) { *vpp = XFS_ITOV(ip); ITRACE(ip); @@ -1864,29 +1818,25 @@ xfs_lookup( return error; } - -/* - * xfs_create (create a new file). - */ -STATIC int +int xfs_create( - bhv_desc_t *dir_bdp, + xfs_inode_t *dp, bhv_vname_t *dentry, bhv_vattr_t *vap, bhv_vnode_t **vpp, cred_t *credp) { char *name = VNAME(dentry); - bhv_vnode_t *dir_vp; - xfs_inode_t *dp, *ip; + xfs_mount_t *mp = dp->i_mount; + bhv_vnode_t *dir_vp = XFS_ITOV(dp); + xfs_inode_t *ip; bhv_vnode_t *vp = NULL; xfs_trans_t *tp; - xfs_mount_t *mp; xfs_dev_t rdev; int error; xfs_bmap_free_t free_list; xfs_fsblock_t first_block; - boolean_t dp_joined_to_trans; + boolean_t unlock_dp_on_error = B_FALSE; int dm_event_sent = 0; uint cancel_flags; int committed; @@ -1897,12 +1847,8 @@ xfs_create( int namelen; ASSERT(!*vpp); - dir_vp = BHV_TO_VNODE(dir_bdp); vn_trace_entry(dir_vp, __FUNCTION__, (inst_t *)__return_address); - dp = XFS_BHVTOI(dir_bdp); - mp = dp->i_mount; - dm_di_mode = vap->va_mode; namelen = VNAMELEN(dentry); @@ -1940,7 +1886,6 @@ xfs_create( goto std_return; ip = NULL; - dp_joined_to_trans = B_FALSE; tp = xfs_trans_alloc(mp, XFS_TRANS_CREATE); cancel_flags = XFS_TRANS_RELEASE_LOG_RES; @@ -1960,11 +1905,11 @@ xfs_create( } if (error) { cancel_flags = 0; - dp = NULL; goto error_return; } xfs_ilock(dp, XFS_ILOCK_EXCL | XFS_ILOCK_PARENT); + unlock_dp_on_error = B_TRUE; XFS_BMAP_INIT(&free_list, &first_block); @@ -1998,15 +1943,15 @@ xfs_create( ASSERT(ismrlocked (&ip->i_lock, MR_UPDATE)); /* - * Now we join the directory inode to the transaction. - * We do not do it earlier because xfs_dir_ialloc - * might commit the previous transaction (and release - * all the locks). + * Now we join the directory inode to the transaction. We do not do it + * earlier because xfs_dir_ialloc might commit the previous transaction + * (and release all the locks). An error from here on will result in + * the transaction cancel unlocking dp so don't do it explicitly in the + * error path. */ - VN_HOLD(dir_vp); xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL); - dp_joined_to_trans = B_TRUE; + unlock_dp_on_error = B_FALSE; error = xfs_dir_createname(tp, dp, name, namelen, ip->i_ino, &first_block, &free_list, resblks ? @@ -2072,7 +2017,7 @@ xfs_create( std_return: if ((*vpp || (error != 0 && dm_event_sent != 0)) && - DM_EVENT_ENABLED(XFS_BHVTOI(dir_bdp), DM_EVENT_POSTCREATE)) { + DM_EVENT_ENABLED(dp, DM_EVENT_POSTCREATE)) { (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTCREATE, dir_vp, DM_RIGHT_NULL, *vpp ? vp:NULL, @@ -2089,11 +2034,12 @@ std_return: if (tp != NULL) xfs_trans_cancel(tp, cancel_flags); - if (!dp_joined_to_trans && (dp != NULL)) - xfs_iunlock(dp, XFS_ILOCK_EXCL); XFS_QM_DQRELE(mp, udqp); XFS_QM_DQRELE(mp, gdqp); + if (unlock_dp_on_error) + xfs_iunlock(dp, XFS_ILOCK_EXCL); + goto std_return; abort_rele: @@ -2364,22 +2310,16 @@ int remove_which_error_return = 0; #define REMOVE_DEBUG_TRACE(x) #endif /* ! DEBUG */ - -/* - * xfs_remove - * - */ -STATIC int +int xfs_remove( - bhv_desc_t *dir_bdp, - bhv_vname_t *dentry, - cred_t *credp) + xfs_inode_t *dp, + bhv_vname_t *dentry) { - bhv_vnode_t *dir_vp; + bhv_vnode_t *dir_vp = XFS_ITOV(dp); char *name = VNAME(dentry); - xfs_inode_t *dp, *ip; + xfs_mount_t *mp = dp->i_mount; + xfs_inode_t *ip; xfs_trans_t *tp = NULL; - xfs_mount_t *mp; int error = 0; xfs_bmap_free_t free_list; xfs_fsblock_t first_block; @@ -2390,12 +2330,8 @@ xfs_remove( uint resblks; int namelen; - dir_vp = BHV_TO_VNODE(dir_bdp); vn_trace_entry(dir_vp, __FUNCTION__, (inst_t *)__return_address); - dp = XFS_BHVTOI(dir_bdp); - mp = dp->i_mount; - if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -2620,42 +2556,32 @@ xfs_remove( goto std_return; } - -/* - * xfs_link - * - */ -STATIC int +int xfs_link( - bhv_desc_t *target_dir_bdp, + xfs_inode_t *tdp, bhv_vnode_t *src_vp, - bhv_vname_t *dentry, - cred_t *credp) + bhv_vname_t *dentry) { - xfs_inode_t *tdp, *sip; + bhv_vnode_t *target_dir_vp = XFS_ITOV(tdp); + xfs_mount_t *mp = tdp->i_mount; + xfs_inode_t *sip = xfs_vtoi(src_vp); xfs_trans_t *tp; - xfs_mount_t *mp; xfs_inode_t *ips[2]; int error; xfs_bmap_free_t free_list; xfs_fsblock_t first_block; int cancel_flags; int committed; - bhv_vnode_t *target_dir_vp; int resblks; char *target_name = VNAME(dentry); int target_namelen; - target_dir_vp = BHV_TO_VNODE(target_dir_bdp); vn_trace_entry(target_dir_vp, __FUNCTION__, (inst_t *)__return_address); vn_trace_entry(src_vp, __FUNCTION__, (inst_t *)__return_address); target_namelen = VNAMELEN(dentry); ASSERT(!VN_ISDIR(src_vp)); - sip = xfs_vtoi(src_vp); - tdp = XFS_BHVTOI(target_dir_bdp); - mp = tdp->i_mount; if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -2788,50 +2714,38 @@ std_return: } -/* - * xfs_mkdir - * - */ -STATIC int +int xfs_mkdir( - bhv_desc_t *dir_bdp, + xfs_inode_t *dp, bhv_vname_t *dentry, bhv_vattr_t *vap, bhv_vnode_t **vpp, cred_t *credp) { + bhv_vnode_t *dir_vp = XFS_ITOV(dp); char *dir_name = VNAME(dentry); - xfs_inode_t *dp; + int dir_namelen = VNAMELEN(dentry); + xfs_mount_t *mp = dp->i_mount; xfs_inode_t *cdp; /* inode of created dir */ bhv_vnode_t *cvp; /* vnode of created dir */ xfs_trans_t *tp; - xfs_mount_t *mp; int cancel_flags; int error; int committed; xfs_bmap_free_t free_list; xfs_fsblock_t first_block; - bhv_vnode_t *dir_vp; - boolean_t dp_joined_to_trans; + boolean_t unlock_dp_on_error = B_FALSE; boolean_t created = B_FALSE; int dm_event_sent = 0; xfs_prid_t prid; struct xfs_dquot *udqp, *gdqp; uint resblks; int dm_di_mode; - int dir_namelen; - - dir_vp = BHV_TO_VNODE(dir_bdp); - dp = XFS_BHVTOI(dir_bdp); - mp = dp->i_mount; if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); - dir_namelen = VNAMELEN(dentry); - tp = NULL; - dp_joined_to_trans = B_FALSE; dm_di_mode = vap->va_mode; if (DM_EVENT_ENABLED(dp, DM_EVENT_CREATE)) { @@ -2879,11 +2793,11 @@ xfs_mkdir( } if (error) { cancel_flags = 0; - dp = NULL; goto error_return; } xfs_ilock(dp, XFS_ILOCK_EXCL | XFS_ILOCK_PARENT); + unlock_dp_on_error = B_TRUE; /* * Check for directory link count overflow. @@ -2920,11 +2834,13 @@ xfs_mkdir( * Now we add the directory inode to the transaction. * We waited until now since xfs_dir_ialloc might start * a new transaction. Had we joined the transaction - * earlier, the locks might have gotten released. + * earlier, the locks might have gotten released. An error + * from here on will result in the transaction cancel + * unlocking dp so don't do it explicitly in the error path. */ VN_HOLD(dir_vp); xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL); - dp_joined_to_trans = B_TRUE; + unlock_dp_on_error = B_FALSE; XFS_BMAP_INIT(&free_list, &first_block); @@ -2992,7 +2908,7 @@ xfs_mkdir( std_return: if ((created || (error != 0 && dm_event_sent != 0)) && - DM_EVENT_ENABLED(XFS_BHVTOI(dir_bdp), DM_EVENT_POSTCREATE)) { + DM_EVENT_ENABLED(dp, DM_EVENT_POSTCREATE)) { (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTCREATE, dir_vp, DM_RIGHT_NULL, created ? XFS_ITOV(cdp):NULL, @@ -3012,49 +2928,36 @@ std_return: XFS_QM_DQRELE(mp, udqp); XFS_QM_DQRELE(mp, gdqp); - if (!dp_joined_to_trans && (dp != NULL)) { + if (unlock_dp_on_error) xfs_iunlock(dp, XFS_ILOCK_EXCL); - } goto std_return; } - -/* - * xfs_rmdir - * - */ -STATIC int +int xfs_rmdir( - bhv_desc_t *dir_bdp, - bhv_vname_t *dentry, - cred_t *credp) + xfs_inode_t *dp, + bhv_vname_t *dentry) { + bhv_vnode_t *dir_vp = XFS_ITOV(dp); char *name = VNAME(dentry); - xfs_inode_t *dp; - xfs_inode_t *cdp; /* child directory */ + int namelen = VNAMELEN(dentry); + xfs_mount_t *mp = dp->i_mount; + xfs_inode_t *cdp; /* child directory */ xfs_trans_t *tp; - xfs_mount_t *mp; int error; xfs_bmap_free_t free_list; xfs_fsblock_t first_block; int cancel_flags; int committed; - bhv_vnode_t *dir_vp; int dm_di_mode = S_IFDIR; int last_cdp_link; - int namelen; uint resblks; - dir_vp = BHV_TO_VNODE(dir_bdp); - dp = XFS_BHVTOI(dir_bdp); - mp = dp->i_mount; - vn_trace_entry(dir_vp, __FUNCTION__, (inst_t *)__return_address); - if (XFS_FORCED_SHUTDOWN(XFS_BHVTOI(dir_bdp)->i_mount)) + if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); - namelen = VNAMELEN(dentry); if (!xfs_get_dir_entry(dentry, &cdp)) { dm_di_mode = cdp->i_d.di_mode; @@ -3269,25 +3172,24 @@ xfs_rmdir( goto std_return; } -STATIC int +int xfs_symlink( - bhv_desc_t *dir_bdp, + xfs_inode_t *dp, bhv_vname_t *dentry, bhv_vattr_t *vap, char *target_path, bhv_vnode_t **vpp, cred_t *credp) { + bhv_vnode_t *dir_vp = XFS_ITOV(dp); + xfs_mount_t *mp = dp->i_mount; xfs_trans_t *tp; - xfs_mount_t *mp; - xfs_inode_t *dp; xfs_inode_t *ip; int error; int pathlen; xfs_bmap_free_t free_list; xfs_fsblock_t first_block; - boolean_t dp_joined_to_trans; - bhv_vnode_t *dir_vp; + boolean_t unlock_dp_on_error = B_FALSE; uint cancel_flags; int committed; xfs_fileoff_t first_fsb; @@ -3306,16 +3208,12 @@ xfs_symlink( int link_namelen; *vpp = NULL; - dir_vp = BHV_TO_VNODE(dir_bdp); - dp = XFS_BHVTOI(dir_bdp); - dp_joined_to_trans = B_FALSE; error = 0; ip = NULL; tp = NULL; vn_trace_entry(dir_vp, __FUNCTION__, (inst_t *)__return_address); - mp = dp->i_mount; if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -3401,11 +3299,11 @@ xfs_symlink( } if (error) { cancel_flags = 0; - dp = NULL; goto error_return; } xfs_ilock(dp, XFS_ILOCK_EXCL | XFS_ILOCK_PARENT); + unlock_dp_on_error = B_TRUE; /* * Check whether the directory allows new symlinks or not. @@ -3446,9 +3344,14 @@ xfs_symlink( } ITRACE(ip); + /* + * An error after we've joined dp to the transaction will result in the + * transaction cancel unlocking dp so don't do it explicitly in the + * error path. + */ VN_HOLD(dir_vp); xfs_trans_ijoin(tp, dp, XFS_ILOCK_EXCL); - dp_joined_to_trans = B_TRUE; + unlock_dp_on_error = B_FALSE; /* * Also attach the dquot(s) to it, if applicable. @@ -3554,7 +3457,7 @@ xfs_symlink( /* Fall through to std_return with error = 0 or errno from * xfs_trans_commit */ std_return: - if (DM_EVENT_ENABLED(XFS_BHVTOI(dir_bdp), DM_EVENT_POSTSYMLINK)) { + if (DM_EVENT_ENABLED(dp, DM_EVENT_POSTSYMLINK)) { (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTSYMLINK, dir_vp, DM_RIGHT_NULL, error ? NULL : XFS_ITOV(ip), @@ -3581,9 +3484,8 @@ std_return: XFS_QM_DQRELE(mp, udqp); XFS_QM_DQRELE(mp, gdqp); - if (!dp_joined_to_trans && (dp != NULL)) { + if (unlock_dp_on_error) xfs_iunlock(dp, XFS_ILOCK_EXCL); - } goto std_return; } @@ -3595,20 +3497,16 @@ std_return: * A fid routine that takes a pointer to a previously allocated * fid structure (like xfs_fast_fid) but uses a 64 bit inode number. */ -STATIC int +int xfs_fid2( - bhv_desc_t *bdp, + xfs_inode_t *ip, fid_t *fidp) { - xfs_inode_t *ip; - xfs_fid2_t *xfid; + xfs_fid2_t *xfid = (xfs_fid2_t *)fidp; - vn_trace_entry(BHV_TO_VNODE(bdp), __FUNCTION__, - (inst_t *)__return_address); + vn_trace_entry(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address); ASSERT(sizeof(fid_t) >= sizeof(xfs_fid2_t)); - xfid = (xfs_fid2_t *)fidp; - ip = XFS_BHVTOI(bdp); xfid->fid_len = sizeof(xfs_fid2_t) - sizeof(xfid->fid_len); xfid->fid_pad = 0; /* @@ -3622,21 +3520,13 @@ xfs_fid2( } -/* - * xfs_rwlock - */ int xfs_rwlock( - bhv_desc_t *bdp, + xfs_inode_t *ip, bhv_vrwlock_t locktype) { - xfs_inode_t *ip; - bhv_vnode_t *vp; - - vp = BHV_TO_VNODE(bdp); - if (VN_ISDIR(vp)) + if (S_ISDIR(ip->i_d.di_mode)) return 1; - ip = XFS_BHVTOI(bdp); if (locktype == VRWLOCK_WRITE) { xfs_ilock(ip, XFS_IOLOCK_EXCL); } else if (locktype == VRWLOCK_TRY_READ) { @@ -3653,21 +3543,13 @@ xfs_rwlock( } -/* - * xfs_rwunlock - */ void xfs_rwunlock( - bhv_desc_t *bdp, + xfs_inode_t *ip, bhv_vrwlock_t locktype) { - xfs_inode_t *ip; - bhv_vnode_t *vp; - - vp = BHV_TO_VNODE(bdp); - if (VN_ISDIR(vp)) - return; - ip = XFS_BHVTOI(bdp); + if (S_ISDIR(ip->i_d.di_mode)) + return; if (locktype == VRWLOCK_WRITE) { /* * In the write case, we may have added a new entry to @@ -3685,20 +3567,16 @@ xfs_rwunlock( return; } -STATIC int + +int xfs_inode_flush( - bhv_desc_t *bdp, + xfs_inode_t *ip, int flags) { - xfs_inode_t *ip; - xfs_mount_t *mp; - xfs_inode_log_item_t *iip; + xfs_mount_t *mp = ip->i_mount; + xfs_inode_log_item_t *iip = ip->i_itemp; int error = 0; - ip = XFS_BHVTOI(bdp); - mp = ip->i_mount; - iip = ip->i_itemp; - if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -3766,24 +3644,20 @@ xfs_inode_flush( return error; } + int -xfs_set_dmattrs ( - bhv_desc_t *bdp, +xfs_set_dmattrs( + xfs_inode_t *ip, u_int evmask, - u_int16_t state, - cred_t *credp) + u_int16_t state) { - xfs_inode_t *ip; + xfs_mount_t *mp = ip->i_mount; xfs_trans_t *tp; - xfs_mount_t *mp; int error; if (!capable(CAP_SYS_ADMIN)) return XFS_ERROR(EPERM); - ip = XFS_BHVTOI(bdp); - mp = ip->i_mount; - if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -3806,15 +3680,11 @@ xfs_set_dmattrs ( return error; } -STATIC int +int xfs_reclaim( - bhv_desc_t *bdp) + xfs_inode_t *ip) { - xfs_inode_t *ip; - bhv_vnode_t *vp; - - vp = BHV_TO_VNODE(bdp); - ip = XFS_BHVTOI(bdp); + bhv_vnode_t *vp = XFS_ITOV(ip); vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); @@ -4491,35 +4361,29 @@ xfs_free_file_space( */ int xfs_change_file_space( - bhv_desc_t *bdp, + xfs_inode_t *ip, int cmd, xfs_flock64_t *bf, xfs_off_t offset, cred_t *credp, int attr_flags) { + xfs_mount_t *mp = ip->i_mount; int clrprealloc; int error; xfs_fsize_t fsize; - xfs_inode_t *ip; - xfs_mount_t *mp; int setprealloc; xfs_off_t startoffset; xfs_off_t llen; xfs_trans_t *tp; bhv_vattr_t va; - bhv_vnode_t *vp; - vp = BHV_TO_VNODE(bdp); - vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); - - ip = XFS_BHVTOI(bdp); - mp = ip->i_mount; + vn_trace_entry(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address); /* * must be a regular file and have write permission */ - if (!VN_ISREG(vp)) + if (!S_ISREG(ip->i_d.di_mode)) return XFS_ERROR(EINVAL); xfs_ilock(ip, XFS_ILOCK_SHARED); @@ -4601,7 +4465,7 @@ xfs_change_file_space( va.va_mask = XFS_AT_SIZE; va.va_size = startoffset; - error = xfs_setattr(bdp, &va, attr_flags, credp); + error = xfs_setattr(ip, &va, attr_flags, credp); if (error) return error; @@ -4660,49 +4524,3 @@ xfs_change_file_space( return error; } - -bhv_vnodeops_t xfs_vnodeops = { - BHV_IDENTITY_INIT(VN_BHV_XFS,VNODE_POSITION_XFS), - .vop_open = xfs_open, - .vop_read = xfs_read, -#ifdef HAVE_SENDFILE - .vop_sendfile = xfs_sendfile, -#endif -#ifdef HAVE_SPLICE - .vop_splice_read = xfs_splice_read, - .vop_splice_write = xfs_splice_write, -#endif - .vop_write = xfs_write, - .vop_ioctl = xfs_ioctl, - .vop_getattr = xfs_getattr, - .vop_setattr = xfs_setattr, - .vop_access = xfs_access, - .vop_lookup = xfs_lookup, - .vop_create = xfs_create, - .vop_remove = xfs_remove, - .vop_link = xfs_link, - .vop_rename = xfs_rename, - .vop_mkdir = xfs_mkdir, - .vop_rmdir = xfs_rmdir, - .vop_readdir = xfs_readdir, - .vop_symlink = xfs_symlink, - .vop_readlink = xfs_readlink, - .vop_fsync = xfs_fsync, - .vop_inactive = xfs_inactive, - .vop_fid2 = xfs_fid2, - .vop_rwlock = xfs_rwlock, - .vop_rwunlock = xfs_rwunlock, - .vop_bmap = xfs_bmap, - .vop_reclaim = xfs_reclaim, - .vop_attr_get = xfs_attr_get, - .vop_attr_set = xfs_attr_set, - .vop_attr_remove = xfs_attr_remove, - .vop_attr_list = xfs_attr_list, - .vop_link_removed = (vop_link_removed_t)fs_noval, - .vop_vnode_change = (vop_vnode_change_t)fs_noval, - .vop_tosspages = fs_tosspages, - .vop_flushinval_pages = fs_flushinval_pages, - .vop_flush_pages = fs_flush_pages, - .vop_release = xfs_release, - .vop_iflush = xfs_inode_flush, -}; Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_ioctl.c 2007-08-23 14:40:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c 2007-08-23 14:41:01.000000000 +0200 @@ -47,6 +47,7 @@ #include "xfs_utils.h" #include "xfs_dfrag.h" #include "xfs_fsops.h" +#include "xfs_vnodeops.h" #include #include @@ -436,7 +437,6 @@ xfs_fssetdm_by_handle( struct fsdmidata fsd; xfs_fsop_setdm_handlereq_t dmhreq; struct inode *inode; - bhv_desc_t *bdp; bhv_vnode_t *vp; if (!capable(CAP_MKNOD)) @@ -458,8 +458,8 @@ xfs_fssetdm_by_handle( return -XFS_ERROR(EFAULT); } - bdp = bhv_base_unlocked(VN_BHV_HEAD(vp)); - error = xfs_set_dmattrs(bdp, fsd.fsd_dmevmask, fsd.fsd_dmstate, NULL); + error = xfs_set_dmattrs(xfs_vtoi(vp), + fsd.fsd_dmevmask, fsd.fsd_dmstate); VN_RELE(vp); if (error) @@ -676,7 +676,7 @@ xfs_attrmulti_by_handle( STATIC int xfs_ioc_space( - bhv_desc_t *bdp, + struct xfs_inode *ip, struct inode *inode, struct file *filp, int flags, @@ -709,37 +709,31 @@ xfs_ioc_xattr( STATIC int xfs_ioc_getbmap( - bhv_desc_t *bdp, + struct xfs_inode *ip, int flags, unsigned int cmd, void __user *arg); STATIC int xfs_ioc_getbmapx( - bhv_desc_t *bdp, + struct xfs_inode *ip, void __user *arg); int xfs_ioctl( - bhv_desc_t *bdp, - struct inode *inode, + xfs_inode_t *ip, struct file *filp, int ioflags, unsigned int cmd, void __user *arg) { + struct inode *inode = filp->f_path.dentry->d_inode; + bhv_vnode_t *vp = vn_from_inode(inode); + xfs_mount_t *mp = ip->i_mount; int error; - bhv_vnode_t *vp; - xfs_inode_t *ip; - xfs_mount_t *mp; - - vp = vn_from_inode(inode); vn_trace_entry(vp, "xfs_ioctl", (inst_t *)__return_address); - ip = XFS_BHVTOI(bdp); - mp = ip->i_mount; - switch (cmd) { case XFS_IOC_ALLOCSP: @@ -758,7 +752,7 @@ xfs_ioctl( !capable(CAP_SYS_ADMIN)) return -EPERM; - return xfs_ioc_space(bdp, inode, filp, ioflags, cmd, arg); + return xfs_ioc_space(ip, inode, filp, ioflags, cmd, arg); case XFS_IOC_DIOINFO: { struct dioattr da; @@ -801,17 +795,17 @@ xfs_ioctl( if (copy_from_user(&dmi, arg, sizeof(dmi))) return -XFS_ERROR(EFAULT); - error = xfs_set_dmattrs(bdp, dmi.fsd_dmevmask, dmi.fsd_dmstate, - NULL); + error = xfs_set_dmattrs(ip, dmi.fsd_dmevmask, + dmi.fsd_dmstate); return -error; } case XFS_IOC_GETBMAP: case XFS_IOC_GETBMAPA: - return xfs_ioc_getbmap(bdp, ioflags, cmd, arg); + return xfs_ioc_getbmap(ip, ioflags, cmd, arg); case XFS_IOC_GETBMAPX: - return xfs_ioc_getbmapx(bdp, arg); + return xfs_ioc_getbmapx(ip, arg); case XFS_IOC_FD_TO_HANDLE: case XFS_IOC_PATH_TO_HANDLE: @@ -981,7 +975,7 @@ xfs_ioctl( STATIC int xfs_ioc_space( - bhv_desc_t *bdp, + struct xfs_inode *ip, struct inode *inode, struct file *filp, int ioflags, @@ -1009,7 +1003,7 @@ xfs_ioc_space( if (ioflags & IO_INVIS) attr_flags |= ATTR_DMI; - error = xfs_change_file_space(bdp, cmd, &bf, filp->f_pos, + error = xfs_change_file_space(ip, cmd, &bf, filp->f_pos, NULL, attr_flags); return -error; } @@ -1295,7 +1289,7 @@ xfs_ioc_xattr( STATIC int xfs_ioc_getbmap( - bhv_desc_t *bdp, + struct xfs_inode *ip, int ioflags, unsigned int cmd, void __user *arg) @@ -1314,7 +1308,7 @@ xfs_ioc_getbmap( if (ioflags & IO_INVIS) iflags |= BMV_IF_NO_DMAPI_READ; - error = xfs_getbmap(bdp, &bm, (struct getbmap __user *)arg+1, iflags); + error = xfs_getbmap(ip, &bm, (struct getbmap __user *)arg+1, iflags); if (error) return -error; @@ -1325,7 +1319,7 @@ xfs_ioc_getbmap( STATIC int xfs_ioc_getbmapx( - bhv_desc_t *bdp, + struct xfs_inode *ip, void __user *arg) { struct getbmapx bmx; @@ -1352,7 +1346,7 @@ xfs_ioc_getbmapx( iflags |= BMV_IF_EXTENDED; - error = xfs_getbmap(bdp, &bm, (struct getbmapx __user *)arg+1, iflags); + error = xfs_getbmap(ip, &bm, (struct getbmapx __user *)arg+1, iflags); if (error) return -error; Index: linux-2.6-xfs/fs/xfs/xfs_rename.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_rename.c 2007-08-23 14:40:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_rename.c 2007-08-23 14:41:01.000000000 +0200 @@ -129,8 +129,7 @@ xfs_lock_for_rename( lock_mode = xfs_ilock_map_shared(dp2); } - error = xfs_dir_lookup_int(XFS_ITOBHV(dp2), lock_mode, - vname2, &inum2, &ip2); + error = xfs_dir_lookup_int(dp2, lock_mode, vname2, &inum2, &ip2); if (error == ENOENT) { /* target does not need to exist. */ inum2 = 0; } else if (error) { @@ -222,15 +221,15 @@ xfs_lock_for_rename( */ int xfs_rename( - bhv_desc_t *src_dir_bdp, + xfs_inode_t *src_dp, bhv_vname_t *src_vname, bhv_vnode_t *target_dir_vp, - bhv_vname_t *target_vname, - cred_t *credp) + bhv_vname_t *target_vname) { + bhv_vnode_t *src_dir_vp = XFS_ITOV(src_dp); xfs_trans_t *tp; - xfs_inode_t *src_dp, *target_dp, *src_ip, *target_ip; - xfs_mount_t *mp; + xfs_inode_t *target_dp, *src_ip, *target_ip; + xfs_mount_t *mp = src_dp->i_mount; int new_parent; /* moving to a new dir */ int src_is_directory; /* src_name is a directory */ int error; @@ -240,7 +239,6 @@ xfs_rename( int committed; xfs_inode_t *inodes[4]; int target_ip_dropped = 0; /* dropped target_ip link? */ - bhv_vnode_t *src_dir_vp; int spaceres; int target_link_zero = 0; int num_inodes; @@ -249,7 +247,6 @@ xfs_rename( int src_namelen = VNAMELEN(src_vname); int target_namelen = VNAMELEN(target_vname); - src_dir_vp = BHV_TO_VNODE(src_dir_bdp); vn_trace_entry(src_dir_vp, "xfs_rename", (inst_t *)__return_address); vn_trace_entry(target_dir_vp, "xfs_rename", (inst_t *)__return_address); @@ -262,9 +259,6 @@ xfs_rename( return XFS_ERROR(EXDEV); } - src_dp = XFS_BHVTOI(src_dir_bdp); - mp = src_dp->i_mount; - if (DM_EVENT_ENABLED(src_dp, DM_EVENT_RENAME) || DM_EVENT_ENABLED(target_dp, DM_EVENT_RENAME)) { error = XFS_SEND_NAMESP(mp, DM_EVENT_RENAME, Index: linux-2.6-xfs/fs/xfs/xfs_rw.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_rw.h 2007-08-23 14:40:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_rw.h 2007-08-23 14:41:01.000000000 +0200 @@ -90,14 +90,6 @@ extern void xfs_ioerror_alert(char *func /* * Prototypes for functions in xfs_vnodeops.c. */ -extern int xfs_rwlock(bhv_desc_t *bdp, bhv_vrwlock_t write_lock); -extern void xfs_rwunlock(bhv_desc_t *bdp, bhv_vrwlock_t write_lock); -extern int xfs_setattr(bhv_desc_t *, bhv_vattr_t *vap, int flags, - cred_t *credp); -extern int xfs_change_file_space(bhv_desc_t *bdp, int cmd, xfs_flock64_t *bf, - xfs_off_t offset, cred_t *credp, int flags); -extern int xfs_set_dmattrs(bhv_desc_t *bdp, u_int evmask, u_int16_t state, - cred_t *credp); extern int xfs_free_eofblocks(struct xfs_mount *mp, struct xfs_inode *ip, int flags); Index: linux-2.6-xfs/fs/xfs/xfs_utils.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_utils.c 2007-08-23 14:40:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_utils.c 2007-08-23 14:41:01.000000000 +0200 @@ -65,20 +65,15 @@ xfs_get_dir_entry( int xfs_dir_lookup_int( - bhv_desc_t *dir_bdp, + xfs_inode_t *dp, uint lock_mode, bhv_vname_t *dentry, xfs_ino_t *inum, xfs_inode_t **ipp) { - bhv_vnode_t *dir_vp; - xfs_inode_t *dp; int error; - dir_vp = BHV_TO_VNODE(dir_bdp); - vn_trace_entry(dir_vp, __FUNCTION__, (inst_t *)__return_address); - - dp = XFS_BHVTOI(dir_bdp); + vn_trace_entry(XFS_ITOV(dp), __FUNCTION__, (inst_t *)__return_address); error = xfs_dir_lookup(NULL, dp, VNAME(dentry), VNAMELEN(dentry), inum); if (!error) { Index: linux-2.6-xfs/fs/xfs/xfs_utils.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_utils.h 2007-08-23 14:40:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_utils.h 2007-08-23 14:41:01.000000000 +0200 @@ -23,10 +23,8 @@ #define ITRACE(ip) vn_trace_ref(XFS_ITOV(ip), __FILE__, __LINE__, \ (inst_t *)__return_address) -extern int xfs_rename (bhv_desc_t *, bhv_vname_t *, bhv_vnode_t *, - bhv_vname_t *, cred_t *); extern int xfs_get_dir_entry (bhv_vname_t *, xfs_inode_t **); -extern int xfs_dir_lookup_int (bhv_desc_t *, uint, bhv_vname_t *, xfs_ino_t *, +extern int xfs_dir_lookup_int (xfs_inode_t *, uint, bhv_vname_t *, xfs_ino_t *, xfs_inode_t **); extern int xfs_truncate_file (xfs_mount_t *, xfs_inode_t *); extern int xfs_dir_ialloc (xfs_trans_t **, xfs_inode_t *, mode_t, xfs_nlink_t, Index: linux-2.6-xfs/fs/xfs/Makefile-linux-2.6 =================================================================== --- linux-2.6-xfs.orig/fs/xfs/Makefile-linux-2.6 2007-08-23 14:40:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/Makefile-linux-2.6 2007-08-23 14:41:01.000000000 +0200 @@ -79,6 +79,7 @@ xfs-y += xfs_alloc.o \ xfs_utils.o \ xfs_vfsops.o \ xfs_vnodeops.o \ + xfs_vnodeops_bhv.o \ xfs_rw.o \ xfs_dmops.o \ xfs_qmops.o Index: linux-2.6-xfs/fs/xfs/xfs_vnodeops.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.6-xfs/fs/xfs/xfs_vnodeops.h 2007-08-23 14:41:01.000000000 +0200 @@ -0,0 +1,86 @@ +#ifndef _XFS_VNODEOPS_H +#define _XFS_VNODEOPS_H 1 + +struct attrlist_cursor_kern; +struct bhv_vattr; +struct cred; +struct file; +struct inode; +struct iovec; +struct kiocb; +struct pipe_inode_info; +struct uio; +struct xfs_inode; +struct xfs_iomap; + + +int xfs_open(struct xfs_inode *ip); +int xfs_getattr(struct xfs_inode *ip, struct bhv_vattr *vap, int flags); +int xfs_setattr(struct xfs_inode *ip, struct bhv_vattr *vap, int flags, + struct cred *credp); +int xfs_access(struct xfs_inode *ip, int mode, struct cred *credp); +int xfs_readlink(struct xfs_inode *ip, char *link); +int xfs_fsync(struct xfs_inode *ip, int flag, xfs_off_t start, + xfs_off_t stop); +int xfs_release(struct xfs_inode *ip); +int xfs_inactive(struct xfs_inode *ip); +int xfs_lookup(struct xfs_inode *dp, bhv_vname_t *dentry, + bhv_vnode_t **vpp); +int xfs_create(struct xfs_inode *dp, bhv_vname_t *dentry, + struct bhv_vattr *vap, bhv_vnode_t **vpp, struct cred *credp); +int xfs_remove(struct xfs_inode *dp, bhv_vname_t *dentry); +int xfs_link(struct xfs_inode *tdp, bhv_vnode_t *src_vp, + bhv_vname_t *dentry); +int xfs_mkdir(struct xfs_inode *dp, bhv_vname_t *dentry, + struct bhv_vattr *vap, bhv_vnode_t **vpp, struct cred *credp); +int xfs_rmdir(struct xfs_inode *dp, bhv_vname_t *dentry); +int xfs_readdir(struct xfs_inode *dp, void *dirent, size_t bufsize, + xfs_off_t *offset, filldir_t filldir); +int xfs_symlink(struct xfs_inode *dp, bhv_vname_t *dentry, + struct bhv_vattr *vap, char *target_path, + bhv_vnode_t **vpp, struct cred *credp); +int xfs_fid2(struct xfs_inode *ip, fid_t *fidp); +int xfs_rwlock(struct xfs_inode *ip, bhv_vrwlock_t locktype); +void xfs_rwunlock(struct xfs_inode *ip, bhv_vrwlock_t locktype); +int xfs_inode_flush(struct xfs_inode *ip, int flags); +int xfs_set_dmattrs(struct xfs_inode *ip, u_int evmask, u_int16_t state); +int xfs_reclaim(struct xfs_inode *ip); +int xfs_change_file_space(struct xfs_inode *ip, int cmd, + xfs_flock64_t *bf, xfs_off_t offset, + struct cred *credp, int attr_flags); +int xfs_rename(struct xfs_inode *src_dp, bhv_vname_t *src_vname, + bhv_vnode_t *target_dir_vp, bhv_vname_t *target_vname); +int xfs_attr_get(struct xfs_inode *ip, const char *name, char *value, + int *valuelenp, int flags, cred_t *cred); +int xfs_attr_set(struct xfs_inode *dp, const char *name, char *value, + int valuelen, int flags); +int xfs_attr_remove(struct xfs_inode *dp, const char *name, int flags); +int xfs_attr_list(struct xfs_inode *dp, char *buffer, int bufsize, + int flags, struct attrlist_cursor_kern *cursor); +int xfs_ioctl(struct xfs_inode *ip, struct file *filp, + int ioflags, unsigned int cmd, void __user *arg); +ssize_t xfs_read(struct xfs_inode *ip, struct kiocb *iocb, + const struct iovec *iovp, unsigned int segs, + loff_t *offset, int ioflags); +ssize_t xfs_sendfile(struct xfs_inode *ip, struct file *filp, + loff_t *offset, int ioflags, size_t count, + read_actor_t actor, void *target); +ssize_t xfs_splice_read(struct xfs_inode *ip, struct file *infilp, + loff_t *ppos, struct pipe_inode_info *pipe, size_t count, + int flags, int ioflags); +ssize_t xfs_splice_write(struct xfs_inode *ip, + struct pipe_inode_info *pipe, struct file *outfilp, + loff_t *ppos, size_t count, int flags, int ioflags); +ssize_t xfs_write(struct xfs_inode *xip, struct kiocb *iocb, + const struct iovec *iovp, unsigned int nsegs, + loff_t *offset, int ioflags); +int xfs_bmap(struct xfs_inode *ip, xfs_off_t offset, ssize_t count, + int flags, struct xfs_iomap *iomapp, int *niomaps); +void xfs_tosspages(struct xfs_inode *inode, xfs_off_t first, + xfs_off_t last, int fiopt); +int xfs_flushinval_pages(struct xfs_inode *ip, xfs_off_t first, + xfs_off_t last, int fiopt); +int xfs_flush_pages(struct xfs_inode *ip, xfs_off_t first, + xfs_off_t last, uint64_t flags, int fiopt); + +#endif /* _XFS_VNODEOPS_H */ Index: linux-2.6-xfs/fs/xfs/xfs_vnodeops_bhv.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.6-xfs/fs/xfs/xfs_vnodeops_bhv.c 2007-08-23 14:41:01.000000000 +0200 @@ -0,0 +1,438 @@ + +#include "xfs_linux.h" +#include "xfs_vnodeops.h" + +#include "xfs_bmap_btree.h" +#include "xfs_inode.h" + +STATIC int +xfs_bhv_open( + bhv_desc_t *bdp, + cred_t *credp) +{ + return xfs_open(XFS_BHVTOI(bdp)); +} + +STATIC int +xfs_bhv_getattr( + bhv_desc_t *bdp, + bhv_vattr_t *vap, + int flags, + cred_t *credp) +{ + return xfs_getattr(XFS_BHVTOI(bdp), vap, flags); +} + +int +xfs_bhv_setattr( + bhv_desc_t *bdp, + bhv_vattr_t *vap, + int flags, + cred_t *credp) +{ + return xfs_setattr(XFS_BHVTOI(bdp), vap, flags, credp); +} + +STATIC int +xfs_bhv_access( + bhv_desc_t *bdp, + int mode, + cred_t *credp) +{ + return xfs_access(XFS_BHVTOI(bdp), mode, credp); +} + +STATIC int +xfs_bhv_readlink( + bhv_desc_t *bdp, + char *link) +{ + return xfs_readlink(XFS_BHVTOI(bdp), link); +} + +STATIC int +xfs_bhv_fsync( + bhv_desc_t *bdp, + int flag, + cred_t *credp, + xfs_off_t start, + xfs_off_t stop) +{ + return xfs_fsync(XFS_BHVTOI(bdp), flag, start, stop); +} + +STATIC int +xfs_bhv_release( + bhv_desc_t *bdp) +{ + return xfs_release(XFS_BHVTOI(bdp)); +} + +STATIC int +xfs_bhv_inactive( + bhv_desc_t *bdp, + cred_t *credp) +{ + return xfs_inactive(XFS_BHVTOI(bdp)); +} + +STATIC int +xfs_bhv_lookup( + bhv_desc_t *dir_bdp, + bhv_vname_t *dentry, + bhv_vnode_t **vpp, + int flags, + bhv_vnode_t *rdir, + cred_t *credp) +{ + return xfs_lookup(XFS_BHVTOI(dir_bdp), dentry, vpp); +} + +STATIC int +xfs_bhv_create( + bhv_desc_t *dir_bdp, + bhv_vname_t *dentry, + bhv_vattr_t *vap, + bhv_vnode_t **vpp, + cred_t *credp) +{ + return xfs_create(XFS_BHVTOI(dir_bdp), dentry, vap, vpp, credp); +} + +STATIC int +xfs_bhv_remove( + bhv_desc_t *dir_bdp, + bhv_vname_t *dentry, + cred_t *credp) +{ + return xfs_remove(XFS_BHVTOI(dir_bdp), dentry); +} + +STATIC int +xfs_bhv_link( + bhv_desc_t *target_dir_bdp, + bhv_vnode_t *src_vp, + bhv_vname_t *dentry, + cred_t *credp) +{ + return xfs_link(XFS_BHVTOI(target_dir_bdp), src_vp, dentry); +} + +STATIC int +xfs_bhv_mkdir( + bhv_desc_t *dir_bdp, + bhv_vname_t *dentry, + bhv_vattr_t *vap, + bhv_vnode_t **vpp, + cred_t *credp) +{ + return xfs_mkdir(XFS_BHVTOI(dir_bdp), dentry, vap, vpp, credp); +} + +STATIC int +xfs_bhv_rmdir( + bhv_desc_t *dir_bdp, + bhv_vname_t *dentry, + cred_t *credp) +{ + return xfs_rmdir(XFS_BHVTOI(dir_bdp), dentry); +} + +STATIC int +xfs_bhv_readdir( + bhv_desc_t *dir_bdp, + void *dirent, + size_t bufsize, + xfs_off_t *offset, + filldir_t filldir) +{ + return xfs_readdir(XFS_BHVTOI(dir_bdp), dirent, bufsize, offset, filldir); +} + +STATIC int +xfs_bhv_symlink( + bhv_desc_t *dir_bdp, + bhv_vname_t *dentry, + bhv_vattr_t *vap, + char *target_path, + bhv_vnode_t **vpp, + cred_t *credp) +{ + return xfs_symlink(XFS_BHVTOI(dir_bdp), dentry, vap, target_path, vpp, credp); +} + +STATIC int +xfs_bhv_fid2( + bhv_desc_t *bdp, + fid_t *fidp) +{ + return xfs_fid2(XFS_BHVTOI(bdp), fidp); +} + +STATIC int +xfs_bhv_rwlock( + bhv_desc_t *bdp, + bhv_vrwlock_t locktype) +{ + return xfs_rwlock(XFS_BHVTOI(bdp), locktype); +} + +STATIC void +xfs_bhv_rwunlock( + bhv_desc_t *bdp, + bhv_vrwlock_t locktype) +{ + xfs_rwunlock(XFS_BHVTOI(bdp), locktype); +} + +STATIC int +xfs_bhv_inode_flush( + bhv_desc_t *bdp, + int flags) +{ + return xfs_inode_flush(XFS_BHVTOI(bdp), flags); +} + +STATIC int +xfs_bhv_reclaim( + bhv_desc_t *bdp) +{ + return xfs_reclaim(XFS_BHVTOI(bdp)); +} + +STATIC int +xfs_bhv_rename( + bhv_desc_t *src_dir_bdp, + bhv_vname_t *src_vname, + bhv_vnode_t *target_dir_vp, + bhv_vname_t *target_vname, + cred_t *credp) +{ + return xfs_rename(XFS_BHVTOI(src_dir_bdp), src_vname, + target_dir_vp, target_vname); +} + +STATIC int +xfs_bhv_attr_get( + bhv_desc_t *bdp, + const char *name, + char *value, + int *valuelenp, + int flags, + cred_t *cred) +{ + return xfs_attr_get(XFS_BHVTOI(bdp), name, value, valuelenp, + flags, cred); +} + +STATIC int +xfs_bhv_attr_set( + bhv_desc_t *bdp, + const char *name, + char *value, + int valuelen, + int flags, + cred_t *cred) +{ + return xfs_attr_set(XFS_BHVTOI(bdp), name, value, valuelen, + flags); +} + +STATIC int +xfs_bhv_attr_remove( + bhv_desc_t *bdp, + const char *name, + int flags, + cred_t *cred) +{ + return xfs_attr_remove(XFS_BHVTOI(bdp), name, flags); +} + +STATIC int +xfs_bhv_attr_list( + bhv_desc_t *bdp, + char *buffer, + int bufsize, + int flags, + struct attrlist_cursor_kern *cursor, + cred_t *cred) +{ + return xfs_attr_list(XFS_BHVTOI(bdp), buffer, bufsize, flags, + cursor); +} + +STATIC int +xfs_bhv_ioctl( + bhv_desc_t *bdp, + struct inode *inode, + struct file *filp, + int ioflags, + unsigned int cmd, + void __user *arg) +{ + return xfs_ioctl(XFS_BHVTOI(bdp), filp, ioflags, cmd, arg); +} + +STATIC ssize_t +xfs_bhv_read( + bhv_desc_t *bdp, + struct kiocb *iocb, + const struct iovec *iovp, + unsigned int segs, + loff_t *offset, + int ioflags, + cred_t *credp) +{ + return xfs_read(XFS_BHVTOI(bdp), iocb, iovp, segs, + offset, ioflags); +} + +STATIC ssize_t +xfs_bhv_sendfile( + bhv_desc_t *bdp, + struct file *filp, + loff_t *offset, + int ioflags, + size_t count, + read_actor_t actor, + void *target, + cred_t *credp) +{ + return xfs_sendfile(XFS_BHVTOI(bdp), filp, offset, ioflags, + count, actor, target); +} + +STATIC ssize_t +xfs_bhv_splice_read( + bhv_desc_t *bdp, + struct file *infilp, + loff_t *ppos, + struct pipe_inode_info *pipe, + size_t count, + int flags, + int ioflags, + cred_t *credp) +{ + return xfs_splice_read(XFS_BHVTOI(bdp), infilp, ppos, pipe, + count, flags, ioflags); +} + +STATIC ssize_t +xfs_bhv_splice_write( + bhv_desc_t *bdp, + struct pipe_inode_info *pipe, + struct file *outfilp, + loff_t *ppos, + size_t count, + int flags, + int ioflags, + cred_t *credp) +{ + return xfs_splice_write(XFS_BHVTOI(bdp), pipe, outfilp, ppos, + count, flags, ioflags); +} + +STATIC ssize_t +xfs_bhv_write( + bhv_desc_t *bdp, + struct kiocb *iocb, + const struct iovec *iovp, + unsigned int nsegs, + loff_t *offset, + int ioflags, + cred_t *credp) +{ + return xfs_write(XFS_BHVTOI(bdp), iocb, iovp, nsegs, offset, + ioflags); +} + +STATIC int +xfs_bhv_bmap(bhv_desc_t *bdp, + xfs_off_t offset, + ssize_t count, + int flags, + struct xfs_iomap *iomapp, + int *niomaps) +{ + return xfs_bmap(XFS_BHVTOI(bdp), offset, count, flags, + iomapp, niomaps); +} + +STATIC void +fs_tosspages( + bhv_desc_t *bdp, + xfs_off_t first, + xfs_off_t last, + int fiopt) +{ + xfs_tosspages(XFS_BHVTOI(bdp), first, last, fiopt); +} + +STATIC int +fs_flushinval_pages( + bhv_desc_t *bdp, + xfs_off_t first, + xfs_off_t last, + int fiopt) +{ + return xfs_flushinval_pages(XFS_BHVTOI(bdp), first, last, + fiopt); +} + +STATIC int +fs_flush_pages( + bhv_desc_t *bdp, + xfs_off_t first, + xfs_off_t last, + uint64_t flags, + int fiopt) +{ + return xfs_flush_pages(XFS_BHVTOI(bdp), first, last, flags, + fiopt); +} + +bhv_vnodeops_t xfs_vnodeops = { + BHV_IDENTITY_INIT(VN_BHV_XFS,VNODE_POSITION_XFS), + .vop_open = xfs_bhv_open, + .vop_read = xfs_bhv_read, +#ifdef HAVE_SENDFILE + .vop_sendfile = xfs_bhv_sendfile, +#endif +#ifdef HAVE_SPLICE + .vop_splice_read = xfs_bhv_splice_read, + .vop_splice_write = xfs_bhv_splice_write, +#endif + .vop_write = xfs_bhv_write, + .vop_ioctl = xfs_bhv_ioctl, + .vop_getattr = xfs_bhv_getattr, + .vop_setattr = xfs_bhv_setattr, + .vop_access = xfs_bhv_access, + .vop_lookup = xfs_bhv_lookup, + .vop_create = xfs_bhv_create, + .vop_remove = xfs_bhv_remove, + .vop_link = xfs_bhv_link, + .vop_rename = xfs_bhv_rename, + .vop_mkdir = xfs_bhv_mkdir, + .vop_rmdir = xfs_bhv_rmdir, + .vop_readdir = xfs_bhv_readdir, + .vop_symlink = xfs_bhv_symlink, + .vop_readlink = xfs_bhv_readlink, + .vop_fsync = xfs_bhv_fsync, + .vop_inactive = xfs_bhv_inactive, + .vop_fid2 = xfs_bhv_fid2, + .vop_rwlock = xfs_bhv_rwlock, + .vop_rwunlock = xfs_bhv_rwunlock, + .vop_bmap = xfs_bhv_bmap, + .vop_reclaim = xfs_bhv_reclaim, + .vop_attr_get = xfs_bhv_attr_get, + .vop_attr_set = xfs_bhv_attr_set, + .vop_attr_remove = xfs_bhv_attr_remove, + .vop_attr_list = xfs_bhv_attr_list, + .vop_link_removed = (vop_link_removed_t)fs_noval, + .vop_vnode_change = (vop_vnode_change_t)fs_noval, + .vop_tosspages = fs_tosspages, + .vop_flushinval_pages = fs_flushinval_pages, + .vop_flush_pages = fs_flush_pages, + .vop_release = xfs_bhv_release, + .vop_iflush = xfs_bhv_inode_flush, +}; Index: linux-2.6-xfs/fs/xfs/xfs_attr.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_attr.c 2007-08-23 14:40:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_attr.c 2007-08-23 14:41:01.000000000 +0200 @@ -156,10 +156,14 @@ xfs_attr_fetch(xfs_inode_t *ip, const ch } int -xfs_attr_get(bhv_desc_t *bdp, const char *name, char *value, int *valuelenp, - int flags, struct cred *cred) +xfs_attr_get( + xfs_inode_t *ip, + const char *name, + char *value, + int *valuelenp, + int flags, + cred_t *cred) { - xfs_inode_t *ip = XFS_BHVTOI(bdp); int error, namelen; XFS_STATS_INC(xs_attr_get); @@ -417,10 +421,13 @@ out: } int -xfs_attr_set(bhv_desc_t *bdp, const char *name, char *value, int valuelen, int flags, - struct cred *cred) +xfs_attr_set( + xfs_inode_t *dp, + const char *name, + char *value, + int valuelen, + int flags) { - xfs_inode_t *dp; int namelen; namelen = strlen(name); @@ -429,7 +436,6 @@ xfs_attr_set(bhv_desc_t *bdp, const char XFS_STATS_INC(xs_attr_set); - dp = XFS_BHVTOI(bdp); if (XFS_FORCED_SHUTDOWN(dp->i_mount)) return (EIO); @@ -563,10 +569,12 @@ out: } int -xfs_attr_remove(bhv_desc_t *bdp, const char *name, int flags, struct cred *cred) +xfs_attr_remove( + xfs_inode_t *dp, + const char *name, + int flags) { - xfs_inode_t *dp; - int namelen; + int namelen; namelen = strlen(name); if (namelen >= MAXNAMELEN) @@ -574,7 +582,6 @@ xfs_attr_remove(bhv_desc_t *bdp, const c XFS_STATS_INC(xs_attr_remove); - dp = XFS_BHVTOI(bdp); if (XFS_FORCED_SHUTDOWN(dp->i_mount)) return (EIO); @@ -702,11 +709,14 @@ xfs_attr_kern_list_sizes(xfs_attr_list_c * success. */ int -xfs_attr_list(bhv_desc_t *bdp, char *buffer, int bufsize, int flags, - attrlist_cursor_kern_t *cursor, struct cred *cred) +xfs_attr_list( + xfs_inode_t *dp, + char *buffer, + int bufsize, + int flags, + attrlist_cursor_kern_t *cursor) { xfs_attr_list_context_t context; - xfs_inode_t *dp; int error; XFS_STATS_INC(xs_attr_list); @@ -731,7 +741,7 @@ xfs_attr_list(bhv_desc_t *bdp, char *buf /* * Initialize the output buffer. */ - context.dp = dp = XFS_BHVTOI(bdp); + context.dp = dp; context.cursor = cursor; context.count = 0; context.dupcnt = 0; Index: linux-2.6-xfs/fs/xfs/xfs_attr.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_attr.h 2007-08-23 14:40:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_attr.h 2007-08-23 14:41:01.000000000 +0200 @@ -159,12 +159,8 @@ struct xfs_da_args; /* * Overall external interface routines. */ -int xfs_attr_get(bhv_desc_t *, const char *, char *, int *, int, struct cred *); -int xfs_attr_set(bhv_desc_t *, const char *, char *, int, int, struct cred *); int xfs_attr_set_int(struct xfs_inode *, const char *, int, char *, int, int); -int xfs_attr_remove(bhv_desc_t *, const char *, int, struct cred *); int xfs_attr_remove_int(struct xfs_inode *, const char *, int, int); -int xfs_attr_list(bhv_desc_t *, char *, int, int, struct attrlist_cursor_kern *, struct cred *); int xfs_attr_list_int(struct xfs_attr_list_context *); int xfs_attr_inactive(struct xfs_inode *dp); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_iops.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_iops.h 2007-08-23 14:40:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_iops.h 2007-08-23 14:41:01.000000000 +0200 @@ -26,8 +26,6 @@ extern const struct file_operations xfs_ extern const struct file_operations xfs_dir_file_operations; extern const struct file_operations xfs_invis_file_operations; -extern int xfs_ioctl(struct bhv_desc *, struct inode *, struct file *, - int, unsigned int, void __user *); struct xfs_inode; extern void xfs_ichgtime(struct xfs_inode *, int); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_lrw.c 2007-08-23 14:40:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c 2007-08-23 14:41:01.000000000 +0200 @@ -48,6 +48,7 @@ #include "xfs_buf_item.h" #include "xfs_utils.h" #include "xfs_iomap.h" +#include "xfs_vnodeops.h" #include #include @@ -180,27 +181,22 @@ unlock: ssize_t /* bytes read, or (-) error */ xfs_read( - bhv_desc_t *bdp, + xfs_inode_t *ip, struct kiocb *iocb, const struct iovec *iovp, unsigned int segs, loff_t *offset, - int ioflags, - cred_t *credp) + int ioflags) { struct file *file = iocb->ki_filp; struct inode *inode = file->f_mapping->host; + bhv_vnode_t *vp = XFS_ITOV(ip); + xfs_mount_t *mp = ip->i_mount; size_t size = 0; ssize_t ret = 0; xfs_fsize_t n; - xfs_inode_t *ip; - xfs_mount_t *mp; - bhv_vnode_t *vp; unsigned long seg; - ip = XFS_BHVTOI(bdp); - vp = BHV_TO_VNODE(bdp); - mp = ip->i_mount; XFS_STATS_INC(xs_read_calls); @@ -249,8 +245,7 @@ xfs_read( bhv_vrwlock_t locktype = VRWLOCK_READ; int dmflags = FILP_DELAY_FLAG(file) | DM_SEM_FLAG_RD(ioflags); - ret = -XFS_SEND_DATA(mp, DM_EVENT_READ, - BHV_TO_VNODE(bdp), *offset, size, + ret = -XFS_SEND_DATA(mp, DM_EVENT_READ, vp, *offset, size, dmflags, &locktype); if (ret) { xfs_iunlock(ip, XFS_IOLOCK_SHARED); @@ -287,16 +282,15 @@ xfs_read( ssize_t xfs_sendfile( - bhv_desc_t *bdp, + xfs_inode_t *ip, struct file *filp, loff_t *offset, int ioflags, size_t count, read_actor_t actor, - void *target, - cred_t *credp) + void *target) { - xfs_inode_t *ip = XFS_BHVTOI(bdp); + bhv_vnode_t *vp = XFS_ITOV(ip); xfs_mount_t *mp = ip->i_mount; ssize_t ret; @@ -310,8 +304,7 @@ xfs_sendfile( bhv_vrwlock_t locktype = VRWLOCK_READ; int error; - error = XFS_SEND_DATA(mp, DM_EVENT_READ, BHV_TO_VNODE(bdp), - *offset, count, + error = XFS_SEND_DATA(mp, DM_EVENT_READ, vp, *offset, count, FILP_DELAY_FLAG(filp), &locktype); if (error) { xfs_iunlock(ip, XFS_IOLOCK_SHARED); @@ -330,16 +323,15 @@ xfs_sendfile( ssize_t xfs_splice_read( - bhv_desc_t *bdp, + xfs_inode_t *ip, struct file *infilp, loff_t *ppos, struct pipe_inode_info *pipe, size_t count, int flags, - int ioflags, - cred_t *credp) + int ioflags) { - xfs_inode_t *ip = XFS_BHVTOI(bdp); + bhv_vnode_t *vp = XFS_ITOV(ip); xfs_mount_t *mp = ip->i_mount; ssize_t ret; @@ -353,8 +345,7 @@ xfs_splice_read( bhv_vrwlock_t locktype = VRWLOCK_READ; int error; - error = XFS_SEND_DATA(mp, DM_EVENT_READ, BHV_TO_VNODE(bdp), - *ppos, count, + error = XFS_SEND_DATA(mp, DM_EVENT_READ, vp, *ppos, count, FILP_DELAY_FLAG(infilp), &locktype); if (error) { xfs_iunlock(ip, XFS_IOLOCK_SHARED); @@ -373,16 +364,15 @@ xfs_splice_read( ssize_t xfs_splice_write( - bhv_desc_t *bdp, + xfs_inode_t *ip, struct pipe_inode_info *pipe, struct file *outfilp, loff_t *ppos, size_t count, int flags, - int ioflags, - cred_t *credp) + int ioflags) { - xfs_inode_t *ip = XFS_BHVTOI(bdp); + bhv_vnode_t *vp = XFS_ITOV(ip); xfs_mount_t *mp = ip->i_mount; xfs_iocore_t *io = &ip->i_iocore; ssize_t ret; @@ -399,8 +389,7 @@ xfs_splice_write( bhv_vrwlock_t locktype = VRWLOCK_WRITE; int error; - error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, BHV_TO_VNODE(bdp), - *ppos, count, + error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, vp, *ppos, count, FILP_DELAY_FLAG(outfilp), &locktype); if (error) { xfs_iunlock(ip, XFS_IOLOCK_EXCL); @@ -634,24 +623,22 @@ out_lock: ssize_t /* bytes written, or (-) error */ xfs_write( - bhv_desc_t *bdp, + struct xfs_inode *xip, struct kiocb *iocb, const struct iovec *iovp, unsigned int nsegs, loff_t *offset, - int ioflags, - cred_t *credp) + int ioflags) { struct file *file = iocb->ki_filp; struct address_space *mapping = file->f_mapping; struct inode *inode = mapping->host; + bhv_vnode_t *vp = XFS_ITOV(xip); unsigned long segs = nsegs; - xfs_inode_t *xip; xfs_mount_t *mp; ssize_t ret = 0, error = 0; xfs_fsize_t isize, new_size; xfs_iocore_t *io; - bhv_vnode_t *vp; unsigned long seg; int iolock; int eventsent = 0; @@ -662,9 +649,6 @@ xfs_write( XFS_STATS_INC(xs_write_calls); - vp = BHV_TO_VNODE(bdp); - xip = XFS_BHVTOI(bdp); - for (seg = 0; seg < segs; seg++) { const struct iovec *iv = &iovp[seg]; @@ -789,7 +773,7 @@ start: */ if (pos > xip->i_size) { - error = xfs_zero_eof(BHV_TO_VNODE(bdp), io, pos, xip->i_size); + error = xfs_zero_eof(vp, io, pos, xip->i_size); if (error) { xfs_iunlock(xip, XFS_ILOCK_EXCL); goto out_unlock_internal; @@ -874,7 +858,7 @@ retry: if (ret == -ENOSPC && DM_EVENT_ENABLED(xip, DM_EVENT_NOSPACE) && !(ioflags & IO_INVIS)) { - xfs_rwunlock(bdp, locktype); + xfs_rwunlock(xip, locktype); if (need_i_mutex) mutex_unlock(&inode->i_mutex); error = XFS_SEND_NAMESP(xip->i_mount, DM_EVENT_NOSPACE, vp, @@ -882,7 +866,7 @@ retry: 0, 0, 0); /* Delay flag intentionally unused */ if (need_i_mutex) mutex_lock(&inode->i_mutex); - xfs_rwlock(bdp, locktype); + xfs_rwlock(xip, locktype); if (error) goto out_unlock_internal; pos = xip->i_size; @@ -913,7 +897,7 @@ retry: if (error) goto out_unlock_internal; - xfs_rwunlock(bdp, locktype); + xfs_rwunlock(xip, locktype); if (need_i_mutex) mutex_unlock(&inode->i_mutex); @@ -922,7 +906,7 @@ retry: error = -ret; if (need_i_mutex) mutex_lock(&inode->i_mutex); - xfs_rwlock(bdp, locktype); + xfs_rwlock(xip, locktype); } out_unlock_internal: @@ -940,7 +924,7 @@ retry: xip->i_d.di_size = xip->i_size; xfs_iunlock(xip, XFS_ILOCK_EXCL); } - xfs_rwunlock(bdp, locktype); + xfs_rwunlock(xip, locktype); out_unlock_mutex: if (need_i_mutex) mutex_unlock(&inode->i_mutex); @@ -979,14 +963,14 @@ xfs_bdstrat_cb(struct xfs_buf *bp) int -xfs_bmap(bhv_desc_t *bdp, +xfs_bmap( + xfs_inode_t *ip, xfs_off_t offset, ssize_t count, int flags, xfs_iomap_t *iomapp, int *niomaps) { - xfs_inode_t *ip = XFS_BHVTOI(bdp); xfs_iocore_t *io = &ip->i_iocore; ASSERT((ip->i_d.di_mode & S_IFMT) == S_IFREG); Index: linux-2.6-xfs/fs/xfs/xfs_bmap.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_bmap.c 2007-08-23 14:40:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_bmap.c 2007-08-23 14:41:01.000000000 +0200 @@ -5764,7 +5764,7 @@ xfs_getbmapx_fix_eof_hole( */ int /* error code */ xfs_getbmap( - bhv_desc_t *bdp, /* XFS behavior descriptor*/ + xfs_inode_t *ip, struct getbmap *bmv, /* user bmap structure */ void __user *ap, /* pointer to user's array */ int interface) /* interface flags */ @@ -5773,7 +5773,6 @@ xfs_getbmap( int error; /* return value */ __int64_t fixlen; /* length for -1 case */ int i; /* extent number */ - xfs_inode_t *ip; /* xfs incore inode pointer */ bhv_vnode_t *vp; /* corresponding vnode */ int lock; /* lock state */ xfs_bmbt_irec_t *map; /* buffer for user's data */ @@ -5791,8 +5790,7 @@ xfs_getbmap( int bmapi_flags; /* flags for xfs_bmapi */ __int32_t oflags; /* getbmapx bmv_oflags field */ - vp = BHV_TO_VNODE(bdp); - ip = XFS_BHVTOI(bdp); + vp = XFS_ITOV(ip); mp = ip->i_mount; whichfork = interface & BMV_IF_ATTRFORK ? XFS_ATTR_FORK : XFS_DATA_FORK; Index: linux-2.6-xfs/fs/xfs/xfs_bmap.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_bmap.h 2007-08-23 14:40:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_bmap.h 2007-08-23 14:41:01.000000000 +0200 @@ -335,7 +335,7 @@ xfs_bunmapi( */ int /* error code */ xfs_getbmap( - bhv_desc_t *bdp, /* XFS behavior descriptor*/ + xfs_inode_t *ip, struct getbmap *bmv, /* user bmap structure */ void __user *ap, /* pointer to user's array */ int iflags); /* interface flags */ Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_lrw.h 2007-08-23 14:40:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.h 2007-08-23 14:41:01.000000000 +0200 @@ -71,28 +71,11 @@ extern void xfs_inval_cached_trace(struc #define xfs_inval_cached_trace(io, offset, len, first, last) #endif -extern int xfs_bmap(struct bhv_desc *, xfs_off_t, ssize_t, int, - struct xfs_iomap *, int *); extern int xfsbdstrat(struct xfs_mount *, struct xfs_buf *); extern int xfs_bdstrat_cb(struct xfs_buf *); extern int xfs_dev_is_read_only(struct xfs_mount *, char *); extern int xfs_zero_eof(struct bhv_vnode *, struct xfs_iocore *, xfs_off_t, xfs_fsize_t); -extern ssize_t xfs_read(struct bhv_desc *, struct kiocb *, - const struct iovec *, unsigned int, - loff_t *, int, struct cred *); -extern ssize_t xfs_write(struct bhv_desc *, struct kiocb *, - const struct iovec *, unsigned int, - loff_t *, int, struct cred *); -extern ssize_t xfs_sendfile(struct bhv_desc *, struct file *, - loff_t *, int, size_t, read_actor_t, - void *, struct cred *); -extern ssize_t xfs_splice_read(struct bhv_desc *, struct file *, loff_t *, - struct pipe_inode_info *, size_t, int, int, - struct cred *); -extern ssize_t xfs_splice_write(struct bhv_desc *, struct pipe_inode_info *, - struct file *, loff_t *, size_t, int, int, - struct cred *); #endif /* __XFS_LRW_H__ */ Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_fs_subr.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_fs_subr.c 2007-08-23 14:40:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_fs_subr.c 2007-08-23 14:41:01.000000000 +0200 @@ -16,66 +16,80 @@ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" +#include "xfs_vnodeops.h" + +/* + * The following six includes are needed so that we can include + * xfs_inode.h. What a mess.. + */ +#include "xfs_bmap_btree.h" +#include "xfs_inum.h" +#include "xfs_dir2.h" +#include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" +#include "xfs_dinode.h" + +#include "xfs_inode.h" int fs_noerr(void) { return 0; } int fs_nosys(void) { return ENOSYS; } void fs_noval(void) { return; } void -fs_tosspages( - bhv_desc_t *bdp, +xfs_tosspages( + xfs_inode_t *ip, xfs_off_t first, xfs_off_t last, int fiopt) { - bhv_vnode_t *vp = BHV_TO_VNODE(bdp); - struct inode *ip = vn_to_inode(vp); + bhv_vnode_t *vp = XFS_ITOV(ip); + struct inode *inode = vn_to_inode(vp); if (VN_CACHED(vp)) - truncate_inode_pages(ip->i_mapping, first); + truncate_inode_pages(inode->i_mapping, first); } int -fs_flushinval_pages( - bhv_desc_t *bdp, +xfs_flushinval_pages( + xfs_inode_t *ip, xfs_off_t first, xfs_off_t last, int fiopt) { - bhv_vnode_t *vp = BHV_TO_VNODE(bdp); - struct inode *ip = vn_to_inode(vp); + bhv_vnode_t *vp = XFS_ITOV(ip); + struct inode *inode = vn_to_inode(vp); int ret = 0; if (VN_CACHED(vp)) { if (VN_TRUNC(vp)) VUNTRUNCATE(vp); - ret = filemap_write_and_wait(ip->i_mapping); + ret = filemap_write_and_wait(inode->i_mapping); if (!ret) - truncate_inode_pages(ip->i_mapping, first); + truncate_inode_pages(inode->i_mapping, first); } return ret; } int -fs_flush_pages( - bhv_desc_t *bdp, +xfs_flush_pages( + xfs_inode_t *ip, xfs_off_t first, xfs_off_t last, uint64_t flags, int fiopt) { - bhv_vnode_t *vp = BHV_TO_VNODE(bdp); - struct inode *ip = vn_to_inode(vp); + bhv_vnode_t *vp = XFS_ITOV(ip); + struct inode *inode = vn_to_inode(vp); int ret = 0; int ret2; if (VN_DIRTY(vp)) { if (VN_TRUNC(vp)) VUNTRUNCATE(vp); - ret = filemap_fdatawrite(ip->i_mapping); + ret = filemap_fdatawrite(inode->i_mapping); if (flags & XFS_B_ASYNC) return ret; - ret2 = filemap_fdatawait(ip->i_mapping); + ret2 = filemap_fdatawait(inode->i_mapping); if (!ret) ret = ret2; } Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_fs_subr.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_fs_subr.h 2007-08-23 14:40:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_fs_subr.h 2007-08-23 14:41:01.000000000 +0200 @@ -18,12 +18,8 @@ #ifndef __XFS_FS_SUBR_H__ #define __XFS_FS_SUBR_H__ -struct cred; extern int fs_noerr(void); extern int fs_nosys(void); extern void fs_noval(void); -extern void fs_tosspages(bhv_desc_t *, xfs_off_t, xfs_off_t, int); -extern int fs_flushinval_pages(bhv_desc_t *, xfs_off_t, xfs_off_t, int); -extern int fs_flush_pages(bhv_desc_t *, xfs_off_t, xfs_off_t, uint64_t, int); #endif /* __XFS_FS_SUBR_H__ */ Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm.c 2007-08-23 14:40:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c 2007-08-23 14:41:01.000000000 +0200 @@ -46,6 +46,7 @@ #include "xfs_attr.h" #include "xfs_attr_leaf.h" #include "xfs_inode_item.h" +#include "xfs_vnodeops.h" #include #include #include "xfs_dm.h" @@ -178,22 +179,17 @@ xfs_dm_send_data_event( bhv_vrwlock_t *locktype) { int error; - bhv_desc_t *bdp; xfs_inode_t *ip; uint16_t dmstate; struct inode *inode = vn_to_inode(vp); /* Returns positive errors to XFS */ - bdp = bhv_lookup_range(VN_BHV_HEAD(vp), - VNODE_POSITION_XFS, VNODE_POSITION_XFS); - ASSERT(bdp); - ip = xfs_vtoi(vp); do { dmstate = ip->i_iocore.io_dmstate; if (locktype) - xfs_rwunlock(bdp, *locktype); + xfs_rwunlock(ip, *locktype); up_rw_sems(inode, flags); @@ -204,7 +200,7 @@ xfs_dm_send_data_event( down_rw_sems(inode, flags); if (locktype) - xfs_rwlock(bdp, *locktype); + xfs_rwlock(ip, *locktype); } while (!error && (ip->i_iocore.io_dmstate != dmstate)); return error; @@ -2506,7 +2502,6 @@ xfs_dm_punch_hole( { xfs_flock64_t bf; int error = 0; - bhv_desc_t *xbdp; xfs_inode_t *ip; xfs_mount_t *mp; dm_size_t align; @@ -2529,10 +2524,6 @@ xfs_dm_punch_hole( if (error) return -EBUSY; - xbdp = bhv_lookup_range(VN_BHV_HEAD(vp), - VNODE_POSITION_XFS, VNODE_POSITION_XFS); - ASSERT(xbdp); - ip = xfs_vtoi(vp); mp = ip->i_mount; @@ -2585,7 +2576,7 @@ xfs_dm_punch_hole( off, len, align); #endif - error = xfs_change_file_space(xbdp, XFS_IOC_UNRESVSP, &bf, + error = xfs_change_file_space(ip, XFS_IOC_UNRESVSP, &bf, (xfs_off_t)off, sys_cred, ATTR_DMI|ATTR_NOLOCK); /* Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ksyms.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_ksyms.c 2007-08-23 14:40:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ksyms.c 2007-08-23 14:41:01.000000000 +0200 @@ -64,6 +64,7 @@ #include "xfs_utils.h" #include "xfs_iomap.h" #include "xfs_filestream.h" +#include "xfs_vnodeops.h" #include "support/ktrace.h" @@ -150,9 +151,9 @@ EXPORT_SYMBOL(bhv_module_exit); EXPORT_SYMBOL(bhv_remove_vfsops); EXPORT_SYMBOL(bhv_remove_all_vfsops); EXPORT_SYMBOL(bhv_remove_not_first); -EXPORT_SYMBOL(fs_flush_pages); -EXPORT_SYMBOL(fs_flushinval_pages); -EXPORT_SYMBOL(fs_tosspages); +EXPORT_SYMBOL(xfs_flush_pages); +EXPORT_SYMBOL(xfs_flushinval_pages); +EXPORT_SYMBOL(xfs_tosspages); EXPORT_SYMBOL(fs_noval); EXPORT_SYMBOL(icmn_err); EXPORT_SYMBOL(kmem_alloc); Index: linux-2.6-xfs/fs/xfs/xfs_dir2.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_dir2.c 2007-08-23 14:40:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_dir2.c 2007-08-23 14:41:01.000000000 +0200 @@ -292,18 +292,16 @@ xfs_dir_removename( */ int xfs_readdir( - bhv_desc_t *dir_bdp, + xfs_inode_t *dp, void *dirent, size_t bufsize, xfs_off_t *offset, filldir_t filldir) { - xfs_inode_t *dp = XFS_BHVTOI(dir_bdp); int rval; /* return value */ int v; /* type-checking value */ - vn_trace_entry(BHV_TO_VNODE(dir_bdp), __FUNCTION__, - (inst_t *)__return_address); + vn_trace_entry(XFS_ITOV(dp), __FUNCTION__, (inst_t *)__return_address); if (XFS_FORCED_SHUTDOWN(dp->i_mount)) return XFS_ERROR(EIO); Index: linux-2.6-xfs/fs/xfs/xfs_dir2.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_dir2.h 2007-08-23 14:40:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_dir2.h 2007-08-23 14:41:01.000000000 +0200 @@ -84,8 +84,6 @@ extern int xfs_dir_replace(struct xfs_tr extern int xfs_dir_canenter(struct xfs_trans *tp, struct xfs_inode *dp, char *name, int namelen); extern int xfs_dir_ino_validate(struct xfs_mount *mp, xfs_ino_t ino); -extern int xfs_readdir(bhv_desc_t *dir_bdp, void *dirent, size_t bufsize, - xfs_off_t *offset, filldir_t filldir); /* * Utility routines for v2 directories. From owner-xfs@oss.sgi.com Thu Aug 23 12:38:24 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 12:38:28 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7NJcK4p003159 for ; Thu, 23 Aug 2007 12:38:23 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7NJcJA5008538 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 23 Aug 2007 21:38:19 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7NJcJsk008536 for xfs@oss.sgi.com; Thu, 23 Aug 2007 21:38:19 +0200 Date: Thu, 23 Aug 2007 21:38:18 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH 5/17] move v_iocount from bhv_vnode to xfs_inode Message-ID: <20070823193818.GF8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12611 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs struct bhv_vnode is on it's way out, so move the I/O count to the XFS inode. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_aops.c 2007-08-23 14:46:18.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c 2007-08-23 14:51:38.000000000 +0200 @@ -140,9 +140,11 @@ xfs_destroy_ioend( next = bh->b_private; bh->b_end_io(bh, !ioend->io_error); } - if (unlikely(ioend->io_error)) - vn_ioerror(ioend->io_vnode, ioend->io_error, __FILE__,__LINE__); - vn_iowake(ioend->io_vnode); + if (unlikely(ioend->io_error)) { + vn_ioerror(XFS_I(ioend->io_inode), ioend->io_error, + __FILE__,__LINE__); + } + vn_iowake(XFS_I(ioend->io_inode)); mempool_free(ioend, xfs_ioend_pool); } @@ -157,14 +159,10 @@ STATIC void xfs_setfilesize( xfs_ioend_t *ioend) { - xfs_inode_t *ip; + xfs_inode_t *ip = XFS_I(ioend->io_inode); xfs_fsize_t isize; xfs_fsize_t bsize; - ip = xfs_vtoi(ioend->io_vnode); - if (!ip) - return; - ASSERT((ip->i_d.di_mode & S_IFMT) == S_IFREG); ASSERT(ioend->io_type != IOMAP_READ); @@ -227,12 +225,11 @@ xfs_end_bio_unwritten( { xfs_ioend_t *ioend = container_of(work, xfs_ioend_t, io_work); - bhv_vnode_t *vp = ioend->io_vnode; xfs_off_t offset = ioend->io_offset; size_t size = ioend->io_size; if (likely(!ioend->io_error)) { - xfs_bmap(xfs_vtoi(vp), offset, size, + xfs_bmap(XFS_I(ioend->io_inode), offset, size, BMAPI_UNWRITTEN, NULL, NULL); xfs_setfilesize(ioend); } @@ -276,10 +273,10 @@ xfs_alloc_ioend( ioend->io_error = 0; ioend->io_list = NULL; ioend->io_type = type; - ioend->io_vnode = vn_from_inode(inode); + ioend->io_inode = inode; ioend->io_buffer_head = NULL; ioend->io_buffer_tail = NULL; - atomic_inc(&ioend->io_vnode->v_iocount); + atomic_inc(&XFS_I(ioend->io_inode)->i_iocount); ioend->io_offset = 0; ioend->io_size = 0; @@ -505,7 +502,7 @@ xfs_cancel_ioend( unlock_buffer(bh); } while ((bh = next_bh) != NULL); - vn_iowake(ioend->io_vnode); + vn_iowake(XFS_I(ioend->io_inode)); mempool_free(ioend, xfs_ioend_pool); } while ((ioend = next) != NULL); } Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_aops.h 2007-08-23 14:46:18.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.h 2007-08-23 14:50:38.000000000 +0200 @@ -32,7 +32,7 @@ typedef struct xfs_ioend { unsigned int io_type; /* delalloc / unwritten */ int io_error; /* I/O error code */ atomic_t io_remaining; /* hold count */ - struct bhv_vnode *io_vnode; /* file being written to */ + struct inode *io_inode; /* file being written to */ struct buffer_head *io_buffer_head;/* buffer linked list head */ struct buffer_head *io_buffer_tail;/* buffer linked list tail */ size_t io_size; /* size of the extent */ Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vnode.c 2007-08-23 14:46:18.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c 2007-08-23 14:53:07.000000000 +0200 @@ -20,6 +20,17 @@ #include "xfs_bmap_btree.h" #include "xfs_inode.h" +/* + * And this gunk is needed for xfs_mount.h" + */ +#include "xfs_log.h" +#include "xfs_trans.h" +#include "xfs_sb.h" +#include "xfs_dmapi.h" +#include "xfs_inum.h" +#include "xfs_ag.h" +#include "xfs_mount.h" + uint64_t vn_generation; /* vnode generation number */ DEFINE_SPINLOCK(vnumber_lock); @@ -42,19 +53,19 @@ vn_init(void) void vn_iowait( - bhv_vnode_t *vp) + xfs_inode_t *ip) { - wait_queue_head_t *wq = vptosync(vp); + wait_queue_head_t *wq = vptosync(ip); - wait_event(*wq, (atomic_read(&vp->v_iocount) == 0)); + wait_event(*wq, (atomic_read(&ip->i_iocount) == 0)); } void vn_iowake( - bhv_vnode_t *vp) + xfs_inode_t *ip) { - if (atomic_dec_and_test(&vp->v_iocount)) - wake_up(vptosync(vp)); + if (atomic_dec_and_test(&ip->i_iocount)) + wake_up(vptosync(ip)); } /* @@ -64,12 +75,12 @@ vn_iowake( */ void vn_ioerror( - bhv_vnode_t *vp, + xfs_inode_t *ip, int error, char *f, int l) { - bhv_vfs_t *vfsp = vfs_from_sb(vp->v_inode.i_sb); + bhv_vfs_t *vfsp = XFS_MTOVFS(ip->i_mount); if (unlikely(error == -ENODEV)) bhv_vfs_force_shutdown(vfsp, SHUTDOWN_DEVICE_REQ, f, l); @@ -92,8 +103,6 @@ vn_initialize( ASSERT(VN_CACHED(vp) == 0); - atomic_set(&vp->v_iocount, 0); - #ifdef XFS_VNODE_TRACE vp->v_trace = ktrace_alloc(VNODE_TRACE_SIZE, KM_SLEEP); #endif /* XFS_VNODE_TRACE */ Index: linux-2.6-xfs/fs/xfs/xfs_inode.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_inode.c 2007-08-23 14:46:18.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_inode.c 2007-08-23 14:51:38.000000000 +0200 @@ -864,6 +864,7 @@ xfs_iread( ip = kmem_zone_zalloc(xfs_inode_zone, KM_SLEEP); ip->i_ino = ino; ip->i_mount = mp; + atomic_set(&ip->i_iocount, 0); spin_lock_init(&ip->i_flags_lock); /* @@ -1455,7 +1456,7 @@ xfs_itruncate_start( mp = ip->i_mount; vp = XFS_ITOV(ip); - vn_iowait(vp); /* wait for the completion of any pending DIOs */ + vn_iowait(ip); /* wait for the completion of any pending DIOs */ /* * Call toss_pages or flushinval_pages to get rid of pages Index: linux-2.6-xfs/fs/xfs/xfs_vfsops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vfsops.c 2007-08-23 14:46:18.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vfsops.c 2007-08-23 14:50:38.000000000 +0200 @@ -1209,7 +1209,7 @@ xfs_sync_inodes( * place after this point */ if (flags & SYNC_IOWAIT) - vn_iowait(vp); + vn_iowait(ip); xfs_ilock(ip, XFS_ILOCK_SHARED); } Index: linux-2.6-xfs/fs/xfs/xfs_vnodeops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vnodeops.c 2007-08-23 14:46:18.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vnodeops.c 2007-08-23 14:51:38.000000000 +0200 @@ -598,7 +598,7 @@ xfs_setattr( } /* wait for all I/O to complete */ - vn_iowait(vp); + vn_iowait(ip); if (!code) code = xfs_itruncate_data(ip, vap->va_size); @@ -3684,7 +3684,7 @@ xfs_reclaim( return 0; } - vn_iowait(vp); + vn_iowait(ip); ASSERT(XFS_FORCED_SHUTDOWN(ip->i_mount) || ip->i_delayed_blks == 0); @@ -4190,7 +4190,7 @@ xfs_free_file_space( need_iolock = 0; if (need_iolock) { xfs_ilock(ip, XFS_IOLOCK_EXCL); - vn_iowait(vp); /* wait for the completion of any pending DIOs */ + vn_iowait(ip); /* wait for the completion of any pending DIOs */ } rounding = max_t(uint, 1 << mp->m_sb.sb_blocklog, NBPP); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vnode.h 2007-08-23 14:46:18.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.h 2007-08-23 14:51:37.000000000 +0200 @@ -29,7 +29,6 @@ typedef __u64 bhv_vnumber_t; typedef struct bhv_vnode { bhv_vnumber_t v_number; /* in-core vnode number */ - atomic_t v_iocount; /* outstanding I/O count */ #ifdef XFS_VNODE_TRACE struct ktrace *v_trace; /* trace header structure */ #endif @@ -202,10 +201,13 @@ extern int vn_revalidate(struct bhv_vnod extern int __vn_revalidate(struct bhv_vnode *, bhv_vattr_t *); extern void vn_revalidate_core(struct bhv_vnode *, bhv_vattr_t *); -extern void vn_iowait(struct bhv_vnode *vp); -extern void vn_iowake(struct bhv_vnode *vp); - -extern void vn_ioerror(struct bhv_vnode *vp, int error, char *f, int l); +/* + * Yeah, these don't take vnode anymore at all, all this should be + * cleaned up at some point. + */ +extern void vn_iowait(struct xfs_inode *ip); +extern void vn_iowake(struct xfs_inode *ip); +extern void vn_ioerror(struct xfs_inode *ip, int error, char *f, int l); static inline int vn_count(struct bhv_vnode *vp) { Index: linux-2.6-xfs/fs/xfs/xfs_inode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_inode.h 2007-08-23 14:46:18.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_inode.h 2007-08-23 14:51:38.000000000 +0200 @@ -300,6 +300,7 @@ typedef struct xfs_inode { struct xfs_inode *i_cprev; /* cluster link backward */ xfs_fsize_t i_size; /* in-memory size */ + atomic_t i_iocount; /* outstanding I/O count */ /* Trace buffers per inode. */ #ifdef XFS_BMAP_TRACE struct ktrace *i_xtrace; /* inode extent list trace */ From owner-xfs@oss.sgi.com Thu Aug 23 12:39:00 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 12:39:03 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7NJct4p003784 for ; Thu, 23 Aug 2007 12:39:00 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7NJcsA5008601 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 23 Aug 2007 21:38:54 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7NJcs37008599 for xfs@oss.sgi.com; Thu, 23 Aug 2007 21:38:54 +0200 Date: Thu, 23 Aug 2007 21:38:54 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH 7/17] kill the v_number member in struct bhv_vnode Message-ID: <20070823193854.GH8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12613 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs It's entirely unused except for ignored arguments in the mrlock initialization, so remove it. Note that Dave wanted to keep it last time I posted this, but there is no chance for that as struct bhv_vnode is going away. If you really need it I offer to write a patch that adds a debug-only i_sequence to struct xfs_inode when needed. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vnode.c 2007-08-23 14:54:01.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c 2007-08-23 14:54:02.000000000 +0200 @@ -31,8 +31,6 @@ #include "xfs_ag.h" #include "xfs_mount.h" -uint64_t vn_generation; /* vnode generation number */ -DEFINE_SPINLOCK(vnumber_lock); /* * Dedicated vnode inactive/reclaim sync semaphores. @@ -95,12 +93,6 @@ vn_initialize( XFS_STATS_INC(vn_active); XFS_STATS_INC(vn_alloc); - spin_lock(&vnumber_lock); - if (!++vn_generation) /* v_number shouldn't be zero */ - vn_generation++; - vp->v_number = vn_generation; - spin_unlock(&vnumber_lock); - ASSERT(VN_CACHED(vp) == 0); return vp; Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vnode.h 2007-08-23 14:54:01.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.h 2007-08-23 14:54:02.000000000 +0200 @@ -28,7 +28,6 @@ typedef struct dentry bhv_vname_t; typedef __u64 bhv_vnumber_t; typedef struct bhv_vnode { - bhv_vnumber_t v_number; /* in-core vnode number */ struct inode v_inode; /* Linux inode */ /* inode MUST be last */ } bhv_vnode_t; Index: linux-2.6-xfs/fs/xfs/xfs_iget.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_iget.c 2007-08-23 14:54:01.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_iget.c 2007-08-23 14:54:02.000000000 +0200 @@ -431,8 +431,8 @@ xfs_inode_lock_init( bhv_vnode_t *vp) { mrlock_init(&ip->i_lock, MRLOCK_ALLOW_EQUAL_PRI|MRLOCK_BARRIER, - "xfsino", (long)vp->v_number); - mrlock_init(&ip->i_iolock, MRLOCK_BARRIER, "xfsio", vp->v_number); + "xfsino", ip->i_ino); + mrlock_init(&ip->i_iolock, MRLOCK_BARRIER, "xfsio", ip->i_ino); init_waitqueue_head(&ip->i_ipin_wait); atomic_set(&ip->i_pincount, 0); initnsema(&ip->i_flock, 1, "xfsfino"); Index: linux-2.6-xfs/fs/xfs/xfsidbg.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfsidbg.c 2007-08-23 14:54:01.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfsidbg.c 2007-08-23 14:54:02.000000000 +0200 @@ -1780,10 +1780,7 @@ static void printbhv(bhv_desc_t *bdp) static void printvnode(bhv_vnode_t *vp, unsigned long addr) { kdb_printf("vnode: 0x%lx\n", addr); - kdb_printf("\n"); - - kdb_printf(" v_number 0x%llx\n", (unsigned long long)vp->v_number); } static int kdbm_vnode( From owner-xfs@oss.sgi.com Thu Aug 23 12:36:39 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 12:36:41 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_20 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7NJaZ4p002444 for ; Thu, 23 Aug 2007 12:36:38 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7NJaXA5008373 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 23 Aug 2007 21:36:33 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7NJaX0t008371 for xfs@oss.sgi.com; Thu, 23 Aug 2007 21:36:33 +0200 Date: Thu, 23 Aug 2007 21:36:33 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH 0/17] vnode/vfs and vnode/vfs operations removal Message-ID: <20070823193633.GA8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12606 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs XFS has long carried around some baggage left from IRIX, and the vnodes and vfs objects aswell as the associated operation vectors re probably the worst, both in their impact in size aswell as in maintainability of the code. This patchset removes all this cruft, and allow at the same time to do a more clear split between the generic and the linux-specific parts of the current XFS codebase. The patchseries allows for some quite nice reduction in size of both the source an binary code: 113 files changed, 2114 insertions(+), 4002 deletions(-) -rw-r--r-- 1 hch hch 9394858 2007-08-23 19:43 xfs.ko.new -rw-r--r-- 1 hch hch 9660812 2007-08-23 19:13 xfs.ko.old From owner-xfs@oss.sgi.com Thu Aug 23 12:39:11 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 12:39:16 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7NJd74p003969 for ; Thu, 23 Aug 2007 12:39:09 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7NJd5A5008625 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 23 Aug 2007 21:39:05 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7NJd5u7008623 for xfs@oss.sgi.com; Thu, 23 Aug 2007 21:39:05 +0200 Date: Thu, 23 Aug 2007 21:39:05 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH 8/17] kill struct bhv_vnode Message-ID: <20070823193905.GI8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12614 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs Now that struct bhv_vnode is empty we can just kill it. Retain bhv_vattr_t as a typedef for struct inode for the time beeing until all the fallout is cleaned up. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm_bhv.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm_bhv.c 2007-08-13 18:07:34.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm_bhv.c 2007-08-13 18:07:43.000000000 +0200 @@ -58,7 +58,7 @@ xfs_dm_mount( struct xfs_mount_args *args, struct cred *cr) { - struct bhv_vnode *rootvp; + bhv_vnode_t *rootvp; struct bhv_vfs *vfsp = bhvtovfs(bhv); int error = 0; Index: linux-2.6-xfs/fs/xfs/quota/xfs_qm_bhv.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/quota/xfs_qm_bhv.c 2007-08-13 17:59:08.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/quota/xfs_qm_bhv.c 2007-08-13 18:07:43.000000000 +0200 @@ -188,7 +188,7 @@ STATIC int xfs_qm_statvfs( struct bhv_desc *bhv, bhv_statvfs_t *statp, - struct bhv_vnode *vnode) + bhv_vnode_t *vnode) { xfs_mount_t *mp; xfs_inode_t *ip; Index: linux-2.6-xfs/fs/xfs/xfs_acl.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_acl.h 2007-08-13 17:59:08.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_acl.h 2007-08-13 18:07:43.000000000 +0200 @@ -50,7 +50,6 @@ typedef struct xfs_acl { #ifdef CONFIG_XFS_POSIX_ACL struct vattr; -struct bhv_vnode; struct xfs_inode; extern struct kmem_zone *xfs_acl_zone; @@ -58,14 +57,14 @@ extern struct kmem_zone *xfs_acl_zone; (zone) = kmem_zone_init(sizeof(xfs_acl_t), (name)) #define xfs_acl_zone_destroy(zone) kmem_zone_destroy(zone) -extern int xfs_acl_inherit(struct bhv_vnode *, struct bhv_vattr *, xfs_acl_t *); +extern int xfs_acl_inherit(bhv_vnode_t *, struct bhv_vattr *, xfs_acl_t *); extern int xfs_acl_iaccess(struct xfs_inode *, mode_t, cred_t *); -extern int xfs_acl_vtoacl(struct bhv_vnode *, xfs_acl_t *, xfs_acl_t *); -extern int xfs_acl_vhasacl_access(struct bhv_vnode *); -extern int xfs_acl_vhasacl_default(struct bhv_vnode *); -extern int xfs_acl_vset(struct bhv_vnode *, void *, size_t, int); -extern int xfs_acl_vget(struct bhv_vnode *, void *, size_t, int); -extern int xfs_acl_vremove(struct bhv_vnode *, int); +extern int xfs_acl_vtoacl(bhv_vnode_t *, xfs_acl_t *, xfs_acl_t *); +extern int xfs_acl_vhasacl_access(bhv_vnode_t *); +extern int xfs_acl_vhasacl_default(bhv_vnode_t *); +extern int xfs_acl_vset(bhv_vnode_t *, void *, size_t, int); +extern int xfs_acl_vget(bhv_vnode_t *, void *, size_t, int); +extern int xfs_acl_vremove(bhv_vnode_t *, int); #define _ACL_TYPE_ACCESS 1 #define _ACL_TYPE_DEFAULT 2 Index: linux-2.6-xfs/fs/xfs/xfs_attr.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_attr.h 2007-08-13 18:07:33.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_attr.h 2007-08-13 18:07:43.000000000 +0200 @@ -36,14 +36,13 @@ *========================================================================*/ struct cred; -struct bhv_vnode; struct xfs_attr_list_context; -typedef int (*attrset_t)(struct bhv_vnode *, char *, void *, size_t, int); -typedef int (*attrget_t)(struct bhv_vnode *, char *, void *, size_t, int); -typedef int (*attrremove_t)(struct bhv_vnode *, char *, int); -typedef int (*attrexists_t)(struct bhv_vnode *); -typedef int (*attrcapable_t)(struct bhv_vnode *, struct cred *); +typedef int (*attrset_t)(bhv_vnode_t *, char *, void *, size_t, int); +typedef int (*attrget_t)(bhv_vnode_t *, char *, void *, size_t, int); +typedef int (*attrremove_t)(bhv_vnode_t *, char *, int); +typedef int (*attrexists_t)(bhv_vnode_t *); +typedef int (*attrcapable_t)(bhv_vnode_t *, struct cred *); typedef struct attrnames { char * attr_name; @@ -64,7 +63,7 @@ extern struct attrnames attr_trusted; extern struct attrnames *attr_namespaces[ATTR_NAMECOUNT]; extern attrnames_t *attr_lookup_namespace(char *, attrnames_t **, int); -extern int attr_generic_list(struct bhv_vnode *, void *, size_t, int, ssize_t *); +extern int attr_generic_list(bhv_vnode_t *, void *, size_t, int, ssize_t *); #define ATTR_DONTFOLLOW 0x0001 /* -- unused, from IRIX -- */ #define ATTR_ROOT 0x0002 /* use attrs in root (trusted) namespace */ Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm.c 2007-08-13 18:07:36.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c 2007-08-13 18:07:43.000000000 +0200 @@ -474,7 +474,7 @@ xfs_ip_to_stat( buf->dt_uid = dic->di_uid; buf->dt_gid = dic->di_gid; buf->dt_size = XFS_ISIZE(ip); - buf->dt_dev = new_encode_dev(vp->v_inode.i_sb->s_dev); + buf->dt_dev = new_encode_dev(vp->i_sb->s_dev); vn_atime_to_time_t(vp, &buf->dt_atime); buf->dt_mtime = dic->di_mtime.t_sec; buf->dt_ctime = dic->di_ctime.t_sec; Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_iops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_iops.c 2007-08-13 18:07:36.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_iops.c 2007-08-13 18:07:43.000000000 +0200 @@ -65,9 +65,8 @@ xfs_synchronize_atime( vp = XFS_ITOV_NULL(ip); if (vp) { - struct inode *inode = &vp->v_inode; - ip->i_d.di_atime.t_sec = (__int32_t)inode->i_atime.tv_sec; - ip->i_d.di_atime.t_nsec = (__int32_t)inode->i_atime.tv_nsec; + ip->i_d.di_atime.t_sec = (__int32_t)vp->i_atime.tv_sec; + ip->i_d.di_atime.t_nsec = (__int32_t)vp->i_atime.tv_nsec; } } @@ -327,7 +326,7 @@ xfs_vn_mknod( if (!error) { error = _ACL_INHERIT(vp, &vattr, default_acl); if (!error) - xfs_iflags_set(XFS_I(&vp->v_inode), XFS_IMODIFIED); + xfs_iflags_set(XFS_I(vp), XFS_IMODIFIED); else xfs_cleanup_inode(dir, vp, dentry, mode); } Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_lrw.h 2007-08-13 18:07:33.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.h 2007-08-13 18:07:43.000000000 +0200 @@ -19,7 +19,6 @@ #define __XFS_LRW_H__ struct bhv_desc; -struct bhv_vnode; struct xfs_mount; struct xfs_iocore; struct xfs_inode; @@ -75,7 +74,7 @@ extern int xfsbdstrat(struct xfs_mount * extern int xfs_bdstrat_cb(struct xfs_buf *); extern int xfs_dev_is_read_only(struct xfs_mount *, char *); -extern int xfs_zero_eof(struct bhv_vnode *, struct xfs_iocore *, xfs_off_t, +extern int xfs_zero_eof(struct inode *, struct xfs_iocore *, xfs_off_t, xfs_fsize_t); #endif /* __XFS_LRW_H__ */ Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_super.c 2007-08-13 18:07:37.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c 2007-08-13 18:07:43.000000000 +0200 @@ -787,7 +787,7 @@ xfs_fs_fill_super( void *data, int silent) { - struct bhv_vnode *rootvp; + struct inode *rootvp; struct bhv_vfs *vfsp = vfs_allocate(sb); struct xfs_mount_args *args = xfs_args_allocate(sb, silent); struct kstatfs statvfs; Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vfs.c 2007-08-13 18:07:34.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.c 2007-08-13 18:07:48.000000000 +0200 @@ -103,7 +103,7 @@ vfs_mntupdate( int vfs_root( struct bhv_desc *bdp, - struct bhv_vnode **vpp) + bhv_vnode_t **vpp) { struct bhv_desc *next = bdp; @@ -117,7 +117,7 @@ int vfs_statvfs( struct bhv_desc *bdp, bhv_statvfs_t *statp, - struct bhv_vnode *vp) + bhv_vnode_t *vp) { struct bhv_desc *next = bdp; @@ -144,7 +144,7 @@ vfs_sync( int vfs_vget( struct bhv_desc *bdp, - struct bhv_vnode **vpp, + bhv_vnode_t **vpp, struct fid *fidp) { struct bhv_desc *next = bdp; @@ -199,7 +199,7 @@ vfs_get_inode( void vfs_init_vnode( struct bhv_desc *bdp, - struct bhv_vnode *vp, + bhv_vnode_t *vp, struct xfs_inode *ip, int unlock) { Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vfs.h 2007-08-13 18:07:34.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.h 2007-08-13 18:07:43.000000000 +0200 @@ -22,7 +22,7 @@ #include "xfs_fs.h" struct bhv_vfs; -struct bhv_vnode; +struct inode; struct fid; struct cred; @@ -124,15 +124,15 @@ typedef int (*vfs_showargs_t)(bhv_desc_t typedef int (*vfs_unmount_t)(bhv_desc_t *, int, struct cred *); typedef int (*vfs_mntupdate_t)(bhv_desc_t *, int *, struct xfs_mount_args *); -typedef int (*vfs_root_t)(bhv_desc_t *, struct bhv_vnode **); +typedef int (*vfs_root_t)(bhv_desc_t *, struct inode **); typedef int (*vfs_statvfs_t)(bhv_desc_t *, bhv_statvfs_t *, - struct bhv_vnode *); + struct inode *); typedef int (*vfs_sync_t)(bhv_desc_t *, int, struct cred *); -typedef int (*vfs_vget_t)(bhv_desc_t *, struct bhv_vnode **, struct fid *); +typedef int (*vfs_vget_t)(bhv_desc_t *, struct inode **, struct fid *); typedef int (*vfs_dmapiops_t)(bhv_desc_t *, caddr_t); typedef int (*vfs_quotactl_t)(bhv_desc_t *, int, int, caddr_t); typedef void (*vfs_init_vnode_t)(bhv_desc_t *, - struct bhv_vnode *, struct xfs_inode *, int); + struct inode *, struct xfs_inode *, int); typedef void (*vfs_force_shutdown_t)(bhv_desc_t *, int, char *, int); typedef void (*vfs_freeze_t)(bhv_desc_t *); typedef struct inode * (*vfs_get_inode_t)(bhv_desc_t *, xfs_ino_t, int); @@ -200,14 +200,14 @@ extern int vfs_parseargs(bhv_desc_t *, c extern int vfs_showargs(bhv_desc_t *, struct seq_file *); extern int vfs_unmount(bhv_desc_t *, int, struct cred *); extern int vfs_mntupdate(bhv_desc_t *, int *, struct xfs_mount_args *); -extern int vfs_root(bhv_desc_t *, struct bhv_vnode **); -extern int vfs_statvfs(bhv_desc_t *, bhv_statvfs_t *, struct bhv_vnode *); +extern int vfs_root(bhv_desc_t *, struct inode **); +extern int vfs_statvfs(bhv_desc_t *, bhv_statvfs_t *, struct inode *); extern int vfs_sync(bhv_desc_t *, int, struct cred *); -extern int vfs_vget(bhv_desc_t *, struct bhv_vnode **, struct fid *); +extern int vfs_vget(bhv_desc_t *, struct inode **, struct fid *); extern int vfs_dmapiops(bhv_desc_t *, caddr_t); extern int vfs_quotactl(bhv_desc_t *, int, int, caddr_t); extern struct inode *vfs_get_inode(bhv_desc_t *, xfs_ino_t, int); -extern void vfs_init_vnode(bhv_desc_t *, struct bhv_vnode *, struct xfs_inode *, int); +extern void vfs_init_vnode(bhv_desc_t *, struct inode *, struct xfs_inode *, int); extern void vfs_force_shutdown(bhv_desc_t *, int, char *, int); extern void vfs_freeze(bhv_desc_t *); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vnode.h 2007-08-13 18:07:39.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.h 2007-08-13 18:07:43.000000000 +0200 @@ -26,28 +26,24 @@ struct attrlist_cursor_kern; typedef struct dentry bhv_vname_t; typedef __u64 bhv_vnumber_t; +typedef struct inode bhv_vnode_t; -typedef struct bhv_vnode { - struct inode v_inode; /* Linux inode */ - /* inode MUST be last */ -} bhv_vnode_t; - -#define VN_ISLNK(vp) S_ISLNK((vp)->v_inode.i_mode) -#define VN_ISREG(vp) S_ISREG((vp)->v_inode.i_mode) -#define VN_ISDIR(vp) S_ISDIR((vp)->v_inode.i_mode) -#define VN_ISCHR(vp) S_ISCHR((vp)->v_inode.i_mode) -#define VN_ISBLK(vp) S_ISBLK((vp)->v_inode.i_mode) +#define VN_ISLNK(vp) S_ISLNK((vp)->i_mode) +#define VN_ISREG(vp) S_ISREG((vp)->i_mode) +#define VN_ISDIR(vp) S_ISDIR((vp)->i_mode) +#define VN_ISCHR(vp) S_ISCHR((vp)->i_mode) +#define VN_ISBLK(vp) S_ISBLK((vp)->i_mode) /* * Vnode to Linux inode mapping. */ -static inline struct bhv_vnode *vn_from_inode(struct inode *inode) +static inline bhv_vnode_t *vn_from_inode(struct inode *inode) { - return container_of(inode, bhv_vnode_t, v_inode); + return inode; } -static inline struct inode *vn_to_inode(struct bhv_vnode *vnode) +static inline struct inode *vn_to_inode(bhv_vnode_t *vnode) { - return &vnode->v_inode; + return vnode; } /* @@ -193,9 +189,9 @@ typedef struct bhv_vattr { extern void vn_init(void); extern bhv_vnode_t *vn_initialize(struct inode *); -extern int vn_revalidate(struct bhv_vnode *); -extern int __vn_revalidate(struct bhv_vnode *, bhv_vattr_t *); -extern void vn_revalidate_core(struct bhv_vnode *, bhv_vattr_t *); +extern int vn_revalidate(bhv_vnode_t *); +extern int __vn_revalidate(bhv_vnode_t *, bhv_vattr_t *); +extern void vn_revalidate_core(bhv_vnode_t *, bhv_vattr_t *); /* * Yeah, these don't take vnode anymore at all, all this should be @@ -205,7 +201,7 @@ extern void vn_iowait(struct xfs_inode * extern void vn_iowake(struct xfs_inode *ip); extern void vn_ioerror(struct xfs_inode *ip, int error, char *f, int l); -static inline int vn_count(struct bhv_vnode *vp) +static inline int vn_count(bhv_vnode_t *vp) { return atomic_read(&vn_to_inode(vp)->i_count); } @@ -213,7 +209,7 @@ static inline int vn_count(struct bhv_vn /* * Vnode reference counting functions (and macros for compatibility). */ -extern bhv_vnode_t *vn_hold(struct bhv_vnode *); +extern bhv_vnode_t *vn_hold(bhv_vnode_t *); #if defined(XFS_VNODE_TRACE) #define VN_HOLD(vp) \ @@ -227,7 +223,7 @@ extern bhv_vnode_t *vn_hold(struct bhv_v #define VN_RELE(vp) (iput(vn_to_inode(vp))) #endif -static inline struct bhv_vnode *vn_grab(struct bhv_vnode *vp) +static inline bhv_vnode_t *vn_grab(bhv_vnode_t *vp) { struct inode *inode = igrab(vn_to_inode(vp)); return inode ? vn_from_inode(inode) : NULL; @@ -243,12 +239,12 @@ static inline struct bhv_vnode *vn_grab( /* * Dealing with bad inodes */ -static inline void vn_mark_bad(struct bhv_vnode *vp) +static inline void vn_mark_bad(bhv_vnode_t *vp) { make_bad_inode(vn_to_inode(vp)); } -static inline int VN_BAD(struct bhv_vnode *vp) +static inline int VN_BAD(bhv_vnode_t *vp) { return is_bad_inode(vn_to_inode(vp)); } @@ -258,18 +254,18 @@ static inline int VN_BAD(struct bhv_vnod */ static inline void vn_atime_to_bstime(bhv_vnode_t *vp, xfs_bstime_t *bs_atime) { - bs_atime->tv_sec = vp->v_inode.i_atime.tv_sec; - bs_atime->tv_nsec = vp->v_inode.i_atime.tv_nsec; + bs_atime->tv_sec = vp->i_atime.tv_sec; + bs_atime->tv_nsec = vp->i_atime.tv_nsec; } static inline void vn_atime_to_timespec(bhv_vnode_t *vp, struct timespec *ts) { - *ts = vp->v_inode.i_atime; + *ts = vp->i_atime; } static inline void vn_atime_to_time_t(bhv_vnode_t *vp, time_t *tt) { - *tt = vp->v_inode.i_atime.tv_sec; + *tt = vp->i_atime.tv_sec; } /* Index: linux-2.6-xfs/fs/xfs/xfs_acl.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_acl.c 2007-08-13 18:07:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_acl.c 2007-08-13 18:07:43.000000000 +0200 @@ -376,11 +376,11 @@ xfs_acl_allow_set( bhv_vattr_t va; int error; - if (vp->v_inode.i_flags & (S_IMMUTABLE|S_APPEND)) + if (vp->i_flags & (S_IMMUTABLE|S_APPEND)) return EPERM; if (kind == _ACL_TYPE_DEFAULT && !VN_ISDIR(vp)) return ENOTDIR; - if (vp->v_inode.i_sb->s_flags & MS_RDONLY) + if (vp->i_sb->s_flags & MS_RDONLY) return EROFS; va.va_mask = XFS_AT_UID; error = xfs_getattr(ip, &va, 0); Index: linux-2.6-xfs/fs/xfs/xfs_inode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_inode.h 2007-08-13 18:07:37.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_inode.h 2007-08-13 18:07:43.000000000 +0200 @@ -106,7 +106,6 @@ typedef struct xfs_ifork { #ifdef __KERNEL__ struct bhv_desc; -struct bhv_vnode; struct cred; struct ktrace; struct xfs_buf; @@ -257,7 +256,7 @@ typedef struct xfs_inode { struct xfs_inode *i_mprev; /* ptr to prev inode */ struct xfs_mount *i_mount; /* fs mount struct ptr */ struct list_head i_reclaim; /* reclaim list */ - struct bhv_vnode *i_vnode; /* vnode backpointer */ + bhv_vnode_t *i_vnode; /* vnode backpointer */ struct xfs_dquot *i_udquot; /* user dquot */ struct xfs_dquot *i_gdquot; /* group dquot */ @@ -497,7 +496,7 @@ void xfs_ihash_init(struct xfs_mount *) void xfs_ihash_free(struct xfs_mount *); xfs_inode_t *xfs_inode_incore(struct xfs_mount *, xfs_ino_t, struct xfs_trans *); -void xfs_inode_lock_init(xfs_inode_t *, struct bhv_vnode *); +void xfs_inode_lock_init(xfs_inode_t *, bhv_vnode_t *); int xfs_iget(struct xfs_mount *, struct xfs_trans *, xfs_ino_t, uint, uint, xfs_inode_t **, xfs_daddr_t); void xfs_iput(xfs_inode_t *, uint); Index: linux-2.6-xfs/fs/xfs/xfs_mount.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_mount.h 2007-08-13 18:07:34.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_mount.h 2007-08-13 18:07:43.000000000 +0200 @@ -55,7 +55,6 @@ typedef struct xfs_trans_reservations { struct cred; struct log; struct bhv_vfs; -struct bhv_vnode; struct xfs_mount_args; struct xfs_inode; struct xfs_iocore; @@ -78,15 +77,15 @@ extern struct bhv_vfsops xfs_vfsops; * Prototypes and functions for the Data Migration subsystem. */ -typedef int (*xfs_send_data_t)(int, struct bhv_vnode *, +typedef int (*xfs_send_data_t)(int, bhv_vnode_t *, xfs_off_t, size_t, int, bhv_vrwlock_t *); typedef int (*xfs_send_mmap_t)(struct vm_area_struct *, uint); -typedef int (*xfs_send_destroy_t)(struct bhv_vnode *, dm_right_t); +typedef int (*xfs_send_destroy_t)(bhv_vnode_t *, dm_right_t); typedef int (*xfs_send_namesp_t)(dm_eventtype_t, struct bhv_vfs *, - struct bhv_vnode *, - dm_right_t, struct bhv_vnode *, dm_right_t, + bhv_vnode_t *, + dm_right_t, bhv_vnode_t *, dm_right_t, char *, char *, mode_t, int, int); -typedef void (*xfs_send_unmount_t)(struct bhv_vfs *, struct bhv_vnode *, +typedef void (*xfs_send_unmount_t)(struct bhv_vfs *, bhv_vnode_t *, dm_right_t, mode_t, int, int); typedef struct xfs_dmops { From owner-xfs@oss.sgi.com Thu Aug 23 12:39:19 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 12:39:22 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7NJdG4p004121 for ; Thu, 23 Aug 2007 12:39:18 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7NJdFA5008646 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 23 Aug 2007 21:39:15 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7NJdFaH008641 for xfs@oss.sgi.com; Thu, 23 Aug 2007 21:39:15 +0200 Date: Thu, 23 Aug 2007 21:39:15 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH 9/17] move freeing the mount structure from xfs_mount_free into the callers Message-ID: <20070823193915.GJ8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12615 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs In the next patch we need to look at the mount structure until just before it's freed, so we need to be able to free it as the very last thing in xfs_unmount. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/xfs_mount.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_mount.c 2007-08-13 18:07:48.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_mount.c 2007-08-13 18:07:51.000000000 +0200 @@ -194,7 +194,6 @@ xfs_mount_free( } xfs_icsb_destroy_counters(mp); - kmem_free(mp, sizeof(xfs_mount_t)); } /* Index: linux-2.6-xfs/fs/xfs/xfs_vfsops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vfsops.c 2007-08-13 18:07:48.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vfsops.c 2007-08-13 18:07:51.000000000 +0200 @@ -639,6 +639,7 @@ out: * and free the super block buffer & mount structures. */ xfs_unmountfs(mp, credp); + kmem_free(mp, sizeof(xfs_mount_t)); } return XFS_ERROR(error); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vfs.c 2007-08-13 18:07:48.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.c 2007-08-13 18:07:51.000000000 +0200 @@ -411,6 +411,7 @@ bhv_remove_all_vfsops( mp = XFS_VFSTOM(vfsp); VFS_REMOVEBHV(vfsp, &mp->m_bhv); xfs_mount_free(mp, 0); + kmem_free(mp, sizeof(xfs_mount_t)); } void From owner-xfs@oss.sgi.com Thu Aug 23 12:39:33 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 12:39:36 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_12, J_CHICKENPOX_21,J_CHICKENPOX_22,J_CHICKENPOX_42 autolearn=no version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7NJdS4p004404 for ; Thu, 23 Aug 2007 12:39:32 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7NJdQA5008670 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 23 Aug 2007 21:39:26 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7NJdQ1Q008668 for xfs@oss.sgi.com; Thu, 23 Aug 2007 21:39:26 +0200 Date: Thu, 23 Aug 2007 21:39:26 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH 10/17 remove dependency of the dmapi module on behaviors. Message-ID: <20070823193926.GK8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12616 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs Mount options are now parsed by the main XFS module and rejected if dmapi support is not available, and there is a new dm operation to send the mount event. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm.c 2007-08-23 19:06:32.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c 2007-08-23 19:06:36.000000000 +0200 @@ -3073,7 +3073,6 @@ static fsys_function_vector_t xfs_fsys_v int xfs_dm_get_fsys_vector( - bhv_desc_t *bdp, caddr_t addr) { static int initialized = 0; @@ -3316,6 +3315,20 @@ xfs_dm_send_namesp_event( return error; /* Return positive error to XFS */ } +STATIC int +xfs_dm_send_mount_event( + struct xfs_mount *mp, + dm_right_t root_right, + char *mtpt, + char *fsname) +{ + struct bhv_vfs *vfsp = XFS_MTOVFS(mp); + + return dm_send_mount_event(vfsp->vfs_super, root_right, + NULL, DM_RIGHT_NULL, + mp->m_rootip ? XFS_ITOV(mp->m_rootip) : NULL, + DM_RIGHT_NULL, mtpt, fsname); +} STATIC void xfs_dm_send_unmount_event( @@ -3341,5 +3354,25 @@ xfs_dmops_t xfs_dmcore_xfs = { .xfs_send_mmap = xfs_dm_send_mmap_event, .xfs_send_destroy = xfs_dm_send_destroy_event, .xfs_send_namesp = xfs_dm_send_namesp_event, + .xfs_send_mount = xfs_dm_send_mount_event, .xfs_send_unmount = xfs_dm_send_unmount_event, }; +EXPORT_SYMBOL(xfs_dmcore_xfs); + +static int __init +xfs_dm_init(void) +{ + printk(KERN_INFO "SGI XFS Data Management API subsystem\n"); + + dmapi_register(&xfs_fs_type, &xfs_dmapiops); + return 0; +} + +static void __exit +xfs_dm_exit(void) +{ + dmapi_unregister(&xfs_fs_type); +} + +module_init(xfs_dm_init); +module_exit(xfs_dm_exit); Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm.h 2007-08-23 16:57:13.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.h 2007-08-23 19:06:36.000000000 +0200 @@ -18,9 +18,8 @@ #ifndef __XFS_DM_H__ #define __XFS_DM_H__ -extern int xfs_dm_get_fsys_vector(bhv_desc_t *, caddr_t); +extern int xfs_dm_get_fsys_vector(caddr_t); -extern xfs_dmops_t xfs_dmcore_xfs; extern struct file_system_type xfs_fs_type; extern struct filesystem_dmapi_operations xfs_dmapiops; Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm_bhv.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm_bhv.c 2007-08-23 19:06:32.000000000 +0200 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -1,179 +0,0 @@ -/* - * Copyright (c) 2000-2006 Silicon Graphics, Inc. - * All Rights Reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -#include "xfs.h" -#include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_inum.h" -#include "xfs_clnt.h" -#include "xfs_trans.h" -#include "xfs_sb.h" -#include "xfs_ag.h" -#include "xfs_dir2.h" -#include "xfs_alloc.h" -#include "xfs_dmapi.h" -#include "xfs_mount.h" -#include "xfs_bmap_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_dir2_sf.h" -#include "xfs_attr_sf.h" -#include "xfs_dinode.h" -#include "xfs_inode.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_itable.h" -#include "xfs_bmap.h" -#include "xfs_rw.h" -#include "xfs_acl.h" -#include "xfs_attr.h" -#include "xfs_inode_item.h" -#include -#include -#include "xfs_dm.h" - -/* - * DMAPI behavior module routines - */ - -STATIC int -xfs_dm_mount( - struct bhv_desc *bhv, - struct xfs_mount_args *args, - struct cred *cr) -{ - bhv_vnode_t *rootvp; - struct bhv_vfs *vfsp = bhvtovfs(bhv); - int error = 0; - - /* Returns positive errors to XFS */ - - error = bhv_next_vfs_mount(BHV_NEXT(bhv), args, cr); - if (error) - return error; - if (!(args->flags & XFSMNT_DMAPI)) - return 0; - error = bhv_vfs_root(vfsp, &rootvp); - if (error) - return error; - - - vfsp->vfs_flag |= VFS_DMI; - error = dm_send_mount_event(vfsp->vfs_super, - DM_RIGHT_NULL, NULL, DM_RIGHT_NULL, - vn_to_inode(rootvp), - DM_RIGHT_NULL, args->mtpt, args->fsname); - - VN_RELE(rootvp); - if (error) - error = -error; /* DMAPI returns negative errs */ - return error; -} - -#define MNTOPT_DMAPI "dmapi" /* DMI enabled (DMAPI / XDSM) */ -#define MNTOPT_XDSM "xdsm" /* DMI enabled (DMAPI / XDSM) */ -#define MNTOPT_DMI "dmi" /* DMI enabled (DMAPI / XDSM) */ - -STATIC int -xfs_dm_parseargs( - struct bhv_desc *bhv, - char *options, - struct xfs_mount_args *args, - int update) -{ - size_t length; - char *local_options = options; - char *this_char; - int error; - - /* Returns positive errors to XFS */ - - while ((this_char = strsep(&local_options, ",")) != NULL) { - length = strlen(this_char); - if (local_options) - length++; - - if (!strcmp(this_char, MNTOPT_DMAPI)) { - args->flags |= XFSMNT_DMAPI; - } else if (!strcmp(this_char, MNTOPT_XDSM)) { - args->flags |= XFSMNT_DMAPI; - } else if (!strcmp(this_char, MNTOPT_DMI)) { - args->flags |= XFSMNT_DMAPI; - } else { - if (local_options) - *(local_options-1) = ','; - continue; - } - - while (length--) - *this_char++ = ','; - } - - error = bhv_next_vfs_parseargs(BHV_NEXT(bhv), options, args, update); - if (!error && (args->flags & XFSMNT_DMAPI) && (*args->mtpt == '\0')) { - printk("XFS: %s option needs the mount point option as well\n", - MNTOPT_DMAPI); - error = EINVAL; - } - if (!error && !update && !(args->flags & XFSMNT_DMAPI)) - bhv_remove_vfsops(bhvtovfs(bhv), VFS_POSITION_DM); - return error; -} - -STATIC int -xfs_dm_showargs( - struct bhv_desc *bhv, - struct seq_file *m) -{ - if (bhvtovfs(bhv)->vfs_flag & VFS_DMI) - seq_puts(m, "," MNTOPT_DMAPI); - return bhv_next_vfs_showargs(BHV_NEXT(bhv), m); -} - -struct bhv_module_vfsops xfs_dmops = { { - BHV_IDENTITY_INIT(VFS_BHV_DM, VFS_POSITION_DM), - .vfs_mount = xfs_dm_mount, - .vfs_parseargs = xfs_dm_parseargs, - .vfs_showargs = xfs_dm_showargs, - .vfs_dmapiops = xfs_dm_get_fsys_vector, }, -}; - -static int __init -xfs_dm_init(void) -{ - static char message[] __initdata = - KERN_INFO "SGI XFS Data Management API subsystem\n"; - - printk(message); - vfs_bhv_set_custom(&xfs_dmops, &xfs_dmcore_xfs); - bhv_module_init(XFS_DMOPS, THIS_MODULE, &xfs_dmops); - dmapi_register(&xfs_fs_type, &xfs_dmapiops); - return 0; -} - -static void __exit -xfs_dm_exit(void) -{ - dmapi_unregister(&xfs_fs_type); - bhv_module_exit(XFS_DMOPS); - vfs_bhv_clr_custom(&xfs_dmops); -} - -module_init(xfs_dm_init); -module_exit(xfs_dm_exit); Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm_fsops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm_fsops.c 2007-08-23 19:03:03.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm_fsops.c 2007-08-23 19:06:36.000000000 +0200 @@ -112,7 +112,7 @@ xfs_dm_get_dmapiops( struct super_block *sb, void *addr) { - return -bhv_vfs_dmapiops(vfs_from_sb(sb), (caddr_t)addr); + return -xfs_dm_get_fsys_vector(addr); } STATIC void Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ksyms.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_ksyms.c 2007-08-23 18:58:43.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ksyms.c 2007-08-23 19:06:36.000000000 +0200 @@ -199,7 +199,6 @@ EXPORT_SYMBOL(vfs_root); EXPORT_SYMBOL(vfs_statvfs); EXPORT_SYMBOL(vfs_sync); EXPORT_SYMBOL(vfs_vget); -EXPORT_SYMBOL(vfs_dmapiops); EXPORT_SYMBOL(vfs_quotactl); EXPORT_SYMBOL(vfs_get_inode); EXPORT_SYMBOL(vfs_init_vnode); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vfs.c 2007-08-23 19:06:33.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.c 2007-08-23 19:06:36.000000000 +0200 @@ -156,19 +156,6 @@ vfs_vget( } int -vfs_dmapiops( - struct bhv_desc *bdp, - caddr_t addr) -{ - struct bhv_desc *next = bdp; - - ASSERT(next); - while (! (bhvtovfsops(next))->vfs_dmapiops) - next = BHV_NEXT(next); - return ((*bhvtovfsops(next)->vfs_dmapiops)(next, addr)); -} - -int vfs_quotactl( struct bhv_desc *bdp, int cmd, @@ -404,7 +391,6 @@ bhv_remove_all_vfsops( struct xfs_mount *mp; bhv_remove_vfsops(vfsp, VFS_POSITION_QM); - bhv_remove_vfsops(vfsp, VFS_POSITION_DM); bhv_remove_vfsops(vfsp, VFS_POSITION_IO); if (!freebase) return; Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vfs.h 2007-08-23 19:06:32.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.h 2007-08-23 19:06:36.000000000 +0200 @@ -66,14 +66,12 @@ typedef struct bhv_vfs { typedef enum { VFS_BHV_UNKNOWN, /* not specified */ VFS_BHV_XFS, /* xfs */ - VFS_BHV_DM, /* data migration */ VFS_BHV_QM, /* quota manager */ VFS_BHV_IO, /* IO path */ VFS_BHV_END /* housekeeping end-of-range */ } bhv_vfs_type_t; #define VFS_POSITION_XFS (BHV_POSITION_BASE) -#define VFS_POSITION_DM (VFS_POSITION_BASE+10) #define VFS_POSITION_QM (VFS_POSITION_BASE+20) #define VFS_POSITION_IO (VFS_POSITION_BASE+30) @@ -129,7 +127,6 @@ typedef int (*vfs_statvfs_t)(bhv_desc_t struct inode *); typedef int (*vfs_sync_t)(bhv_desc_t *, int, struct cred *); typedef int (*vfs_vget_t)(bhv_desc_t *, struct inode **, struct fid *); -typedef int (*vfs_dmapiops_t)(bhv_desc_t *, caddr_t); typedef int (*vfs_quotactl_t)(bhv_desc_t *, int, int, caddr_t); typedef void (*vfs_init_vnode_t)(bhv_desc_t *, struct inode *, struct xfs_inode *, int); @@ -148,7 +145,6 @@ typedef struct bhv_vfsops { vfs_statvfs_t vfs_statvfs; /* file system statistics */ vfs_sync_t vfs_sync; /* flush files */ vfs_vget_t vfs_vget; /* get vnode from fid */ - vfs_dmapiops_t vfs_dmapiops; /* data migration */ vfs_quotactl_t vfs_quotactl; /* disk quota */ vfs_get_inode_t vfs_get_inode; /* bhv specific iget */ vfs_init_vnode_t vfs_init_vnode; /* initialize a new vnode */ @@ -169,7 +165,6 @@ typedef struct bhv_vfsops { #define bhv_vfs_statvfs(v, sp,vp) vfs_statvfs(VFSHEAD(v), sp,vp) #define bhv_vfs_sync(v, flag,cr) vfs_sync(VFSHEAD(v), flag,cr) #define bhv_vfs_vget(v, vpp,fidp) vfs_vget(VFSHEAD(v), vpp,fidp) -#define bhv_vfs_dmapiops(v, p) vfs_dmapiops(VFSHEAD(v), p) #define bhv_vfs_quotactl(v, c,id,p) vfs_quotactl(VFSHEAD(v), c,id,p) #define bhv_vfs_get_inode(v, ino, fl) vfs_get_inode(VFSHEAD(v), ino,fl) #define bhv_vfs_init_vnode(v, vp,b,ul) vfs_init_vnode(VFSHEAD(v), vp,b,ul) @@ -188,7 +183,6 @@ typedef struct bhv_vfsops { #define bhv_next_vfs_statvfs(b, sp,vp) vfs_statvfs(b, sp,vp) #define bhv_next_vfs_sync(b, flag,cr) vfs_sync(b, flag,cr) #define bhv_next_vfs_vget(b, vpp,fidp) vfs_vget(b, vpp,fidp) -#define bhv_next_vfs_dmapiops(b, p) vfs_dmapiops(b, p) #define bhv_next_vfs_quotactl(b, c,id,p) vfs_quotactl(b, c,id,p) #define bhv_next_vfs_get_inode(b, ino,fl) vfs_get_inode(b, ino,fl) #define bhv_next_vfs_init_vnode(b, vp,b2,ul) vfs_init_vnode(b, vp,b2,ul) @@ -204,7 +198,6 @@ extern int vfs_root(bhv_desc_t *, struct extern int vfs_statvfs(bhv_desc_t *, bhv_statvfs_t *, struct inode *); extern int vfs_sync(bhv_desc_t *, int, struct cred *); extern int vfs_vget(bhv_desc_t *, struct inode **, struct fid *); -extern int vfs_dmapiops(bhv_desc_t *, caddr_t); extern int vfs_quotactl(bhv_desc_t *, int, int, caddr_t); extern struct inode *vfs_get_inode(bhv_desc_t *, xfs_ino_t, int); extern void vfs_init_vnode(bhv_desc_t *, struct inode *, struct xfs_inode *, int); Index: linux-2.6-xfs/fs/xfs/xfs_vfsops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vfsops.c 2007-08-23 19:06:33.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vfsops.c 2007-08-23 19:07:10.000000000 +0200 @@ -326,6 +326,8 @@ xfs_start_flags( if (ap->flags2 & XFSMNT2_FILESTREAMS) mp->m_flags |= XFS_MOUNT_FILESTREAMS; + if (ap->flags & XFSMNT_DMAPI) + vfs->vfs_flag |= VFS_DMI; return 0; } @@ -430,11 +432,13 @@ xfs_mount( ddev = vfsp->vfs_super->s_bdev; logdev = rtdev = NULL; + error = xfs_dmops_get(mp, args); + if (error) + return error; + /* * Setup xfs_mount function vectors from available behaviors */ - p = vfs_bhv_lookup(vfsp, VFS_POSITION_DM); - mp->m_dm_ops = p ? *(xfs_dmops_t *) vfs_bhv_custom(p) : xfs_dmcore_stub; p = vfs_bhv_lookup(vfsp, VFS_POSITION_QM); mp->m_qm_ops = p ? *(xfs_qmops_t *) vfs_bhv_custom(p) : xfs_qmcore_stub; p = vfs_bhv_lookup(vfsp, VFS_POSITION_IO); @@ -537,6 +541,8 @@ xfs_mount( if (error) goto error2; + XFS_SEND_MOUNT(mp, DM_RIGHT_NULL, args->mtpt, args->fsname); + return 0; error2: @@ -550,6 +556,7 @@ error1: xfs_binval(mp->m_rtdev_targp); error0: xfs_unmountfs_close(mp, credp); + xfs_dmops_put(mp); return error; } @@ -640,6 +647,7 @@ out: * and free the super block buffer & mount structures. */ xfs_unmountfs(mp, credp); + xfs_dmops_put(mp); kmem_free(mp, sizeof(xfs_mount_t)); } @@ -1688,6 +1696,9 @@ xfs_vget( #define MNTOPT_ATTR2 "attr2" /* do use attr2 attribute format */ #define MNTOPT_NOATTR2 "noattr2" /* do not use attr2 attribute format */ #define MNTOPT_FILESTREAM "filestreams" /* use filestreams allocator */ +#define MNTOPT_DMAPI "dmapi" /* DMI enabled (DMAPI / XDSM) */ +#define MNTOPT_XDSM "xdsm" /* DMI enabled (DMAPI / XDSM) */ +#define MNTOPT_DMI "dmi" /* DMI enabled (DMAPI / XDSM) */ STATIC unsigned long suffix_strtoul(char *s, char **endp, unsigned int base) @@ -1867,6 +1878,12 @@ xfs_parseargs( args->flags &= ~XFSMNT_ATTR2; } else if (!strcmp(this_char, MNTOPT_FILESTREAM)) { args->flags2 |= XFSMNT2_FILESTREAMS; + } else if (!strcmp(this_char, MNTOPT_DMAPI)) { + args->flags |= XFSMNT_DMAPI; + } else if (!strcmp(this_char, MNTOPT_XDSM)) { + args->flags |= XFSMNT_DMAPI; + } else if (!strcmp(this_char, MNTOPT_DMI)) { + args->flags |= XFSMNT_DMAPI; } else if (!strcmp(this_char, "ihashsize")) { cmn_err(CE_WARN, "XFS: ihashsize no longer used, option is deprecated."); @@ -1898,6 +1915,12 @@ xfs_parseargs( return EINVAL; } + if ((args->flags & XFSMNT_DMAPI) && *args->mtpt == '\0') { + printk("XFS: %s option needs the mount point option as well\n", + MNTOPT_DMAPI); + return EINVAL; + } + if ((dsunit && !dswidth) || (!dsunit && dswidth)) { cmn_err(CE_WARN, "XFS: sunit and swidth must be specified together"); @@ -1991,6 +2014,9 @@ xfs_showargs( if (vfsp->vfs_flag & VFS_GRPID) seq_printf(m, "," MNTOPT_GRPID); + if (vfsp->vfs_flag & VFS_DMI) + seq_puts(m, "," MNTOPT_DMAPI); + return 0; } @@ -2021,7 +2047,6 @@ bhv_vfsops_t xfs_vfsops = { .vfs_statvfs = xfs_statvfs, .vfs_sync = xfs_sync, .vfs_vget = xfs_vget, - .vfs_dmapiops = (vfs_dmapiops_t)fs_nosys, .vfs_quotactl = (vfs_quotactl_t)fs_nosys, .vfs_get_inode = xfs_get_inode, .vfs_init_vnode = xfs_initialize_vnode, Index: linux-2.6-xfs/fs/xfs/dmapi/Makefile-linux-2.6 =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/Makefile-linux-2.6 2007-08-23 16:57:13.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/Makefile-linux-2.6 2007-08-23 19:06:36.000000000 +0200 @@ -25,6 +25,5 @@ endif obj-$(CONFIG_XFS_DMAPI) += xfs_dmapi.o -xfs_dmapi-y += xfs_dm_bhv.o \ - xfs_dm_fsops.o \ +xfs_dmapi-y += xfs_dm_fsops.o \ xfs_dm.o Index: linux-2.6-xfs/fs/xfs/xfs_mount.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_mount.h 2007-08-23 19:06:32.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_mount.h 2007-08-23 19:06:36.000000000 +0200 @@ -85,6 +85,8 @@ typedef int (*xfs_send_namesp_t)(dm_even bhv_vnode_t *, dm_right_t, bhv_vnode_t *, dm_right_t, char *, char *, mode_t, int, int); +typedef int (*xfs_send_mount_t)(struct xfs_mount *, dm_right_t, + char *, char *); typedef void (*xfs_send_unmount_t)(struct bhv_vfs *, bhv_vnode_t *, dm_right_t, mode_t, int, int); @@ -93,21 +95,24 @@ typedef struct xfs_dmops { xfs_send_mmap_t xfs_send_mmap; xfs_send_destroy_t xfs_send_destroy; xfs_send_namesp_t xfs_send_namesp; + xfs_send_mount_t xfs_send_mount; xfs_send_unmount_t xfs_send_unmount; } xfs_dmops_t; #define XFS_SEND_DATA(mp, ev,vp,off,len,fl,lock) \ - (*(mp)->m_dm_ops.xfs_send_data)(ev,vp,off,len,fl,lock) + (*(mp)->m_dm_ops->xfs_send_data)(ev,vp,off,len,fl,lock) #define XFS_SEND_MMAP(mp, vma,fl) \ - (*(mp)->m_dm_ops.xfs_send_mmap)(vma,fl) + (*(mp)->m_dm_ops->xfs_send_mmap)(vma,fl) #define XFS_SEND_DESTROY(mp, vp,right) \ - (*(mp)->m_dm_ops.xfs_send_destroy)(vp,right) + (*(mp)->m_dm_ops->xfs_send_destroy)(vp,right) #define XFS_SEND_NAMESP(mp, ev,b1,r1,b2,r2,n1,n2,mode,rval,fl) \ - (*(mp)->m_dm_ops.xfs_send_namesp)(ev,NULL,b1,r1,b2,r2,n1,n2,mode,rval,fl) + (*(mp)->m_dm_ops->xfs_send_namesp)(ev,NULL,b1,r1,b2,r2,n1,n2,mode,rval,fl) #define XFS_SEND_PREUNMOUNT(mp, vfs,b1,r1,b2,r2,n1,n2,mode,rval,fl) \ - (*(mp)->m_dm_ops.xfs_send_namesp)(DM_EVENT_PREUNMOUNT,vfs,b1,r1,b2,r2,n1,n2,mode,rval,fl) + (*(mp)->m_dm_ops->xfs_send_namesp)(DM_EVENT_PREUNMOUNT,vfs,b1,r1,b2,r2,n1,n2,mode,rval,fl) +#define XFS_SEND_MOUNT(mp,right,path,name) \ + (*(mp)->m_dm_ops->xfs_send_mount)(mp,right,path,name) #define XFS_SEND_UNMOUNT(mp, vfsp,vp,right,mode,rval,fl) \ - (*(mp)->m_dm_ops.xfs_send_unmount)(vfsp,vp,right,mode,rval,fl) + (*(mp)->m_dm_ops->xfs_send_unmount)(vfsp,vp,right,mode,rval,fl) /* @@ -407,7 +412,7 @@ typedef struct xfs_mount { uint m_chsize; /* size of next field */ struct xfs_chash *m_chash; /* fs private inode per-cluster * hash table */ - struct xfs_dmops m_dm_ops; /* vector of DMI ops */ + struct xfs_dmops *m_dm_ops; /* vector of DMI ops */ struct xfs_qmops m_qm_ops; /* vector of XQM ops */ struct xfs_ioops m_io_ops; /* vector of I/O ops */ atomic_t m_active_trans; /* number trans frozen */ @@ -642,7 +647,10 @@ extern void xfs_sb_from_disk(struct xfs_ extern void xfs_sb_to_disk(struct xfs_dsb *, struct xfs_sb *, __int64_t); extern int xfs_sb_validate_fsb_count(struct xfs_sb *, __uint64_t); -extern struct xfs_dmops xfs_dmcore_stub; +extern int xfs_dmops_get(struct xfs_mount *, struct xfs_mount_args *); +extern void xfs_dmops_put(struct xfs_mount *); + +extern struct xfs_dmops xfs_dmcore_xfs; extern struct xfs_qmops xfs_qmcore_stub; extern struct xfs_ioops xfs_iocore_xfs; Index: linux-2.6-xfs/fs/xfs/xfs_dmapi.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_dmapi.h 2007-08-23 16:57:13.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_dmapi.h 2007-08-23 19:06:36.000000000 +0200 @@ -168,7 +168,4 @@ typedef enum { DM_FLAGS_NDELAY : 0) #define AT_DELAY_FLAG(f) ((f&ATTR_NONBLOCK) ? DM_FLAGS_NDELAY : 0) - -extern struct bhv_module_vfsops xfs_dmops; - #endif /* __XFS_DMAPI_H__ */ Index: linux-2.6-xfs/fs/xfs/xfs_dmops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_dmops.c 2007-08-23 16:57:13.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_dmops.c 2007-08-23 19:06:36.000000000 +0200 @@ -19,18 +19,51 @@ #include "xfs_fs.h" #include "xfs_types.h" #include "xfs_log.h" -#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" -#include "xfs_ag.h" -#include "xfs_dir2.h" #include "xfs_dmapi.h" +#include "xfs_inum.h" +#include "xfs_ag.h" #include "xfs_mount.h" +#include "xfs_clnt.h" + -xfs_dmops_t xfs_dmcore_stub = { +static struct xfs_dmops xfs_dmcore_stub = { .xfs_send_data = (xfs_send_data_t)fs_nosys, .xfs_send_mmap = (xfs_send_mmap_t)fs_noerr, .xfs_send_destroy = (xfs_send_destroy_t)fs_nosys, .xfs_send_namesp = (xfs_send_namesp_t)fs_nosys, - .xfs_send_unmount = (xfs_send_unmount_t)fs_noval, + .xfs_send_mount = (xfs_send_mount_t)fs_nosys, + .xfs_send_unmount = (xfs_send_unmount_t)fs_noerr, }; + +int +xfs_dmops_get(struct xfs_mount *mp, struct xfs_mount_args *args) +{ + if (args->flags & XFSMNT_DMAPI) { + struct xfs_dmops *ops; + + ops = symbol_get(xfs_dmcore_xfs); + if (!ops) { + request_module("xfs_dmapi"); + ops = symbol_get(xfs_dmcore_xfs); + } + + if (!ops) { + cmn_err(CE_WARN, "XFS: no dmapi support available."); + return EINVAL; + } + mp->m_dm_ops = ops; + } else { + mp->m_dm_ops = &xfs_dmcore_stub; + } + + return 0; +} + +void +xfs_dmops_put(struct xfs_mount *mp) +{ + if (mp->m_dm_ops != &xfs_dmcore_stub) + symbol_put(xfs_dmcore_xfs); +} From owner-xfs@oss.sgi.com Thu Aug 23 12:39:41 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 12:39:45 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_12, J_CHICKENPOX_21,J_CHICKENPOX_64,J_CHICKENPOX_65 autolearn=no version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7NJdc4p004571 for ; Thu, 23 Aug 2007 12:39:40 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7NJdZA5008686 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 23 Aug 2007 21:39:35 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7NJdZgj008684 for xfs@oss.sgi.com; Thu, 23 Aug 2007 21:39:35 +0200 Date: Thu, 23 Aug 2007 21:39:35 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH 11/17] remove dependency of the quota module on behaviors. Message-ID: <20070823193935.GL8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12617 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs Mount options are now parsed by the main XFS module and rejected if quota support is not available, and there are some new quota operation for the quotactl syscall and calls to quote in the mount, unmount and sync callchains. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/quota/xfs_qm_bhv.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/quota/xfs_qm_bhv.c 2007-08-23 14:54:05.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/quota/xfs_qm_bhv.c 2007-08-23 14:57:38.000000000 +0200 @@ -48,172 +48,13 @@ #include "xfs_buf_item.h" #include "xfs_qm.h" -#define MNTOPT_QUOTA "quota" /* disk quotas (user) */ -#define MNTOPT_NOQUOTA "noquota" /* no quotas */ -#define MNTOPT_USRQUOTA "usrquota" /* user quota enabled */ -#define MNTOPT_GRPQUOTA "grpquota" /* group quota enabled */ -#define MNTOPT_PRJQUOTA "prjquota" /* project quota enabled */ -#define MNTOPT_UQUOTA "uquota" /* user quota (IRIX variant) */ -#define MNTOPT_GQUOTA "gquota" /* group quota (IRIX variant) */ -#define MNTOPT_PQUOTA "pquota" /* project quota (IRIX variant) */ -#define MNTOPT_UQUOTANOENF "uqnoenforce"/* user quota limit enforcement */ -#define MNTOPT_GQUOTANOENF "gqnoenforce"/* group quota limit enforcement */ -#define MNTOPT_PQUOTANOENF "pqnoenforce"/* project quota limit enforcement */ -#define MNTOPT_QUOTANOENF "qnoenforce" /* same as uqnoenforce */ -STATIC int -xfs_qm_parseargs( - struct bhv_desc *bhv, - char *options, - struct xfs_mount_args *args, - int update) -{ - size_t length; - char *local_options = options; - char *this_char; - int error; - int referenced = update; - - while ((this_char = strsep(&local_options, ",")) != NULL) { - length = strlen(this_char); - if (local_options) - length++; - - if (!strcmp(this_char, MNTOPT_NOQUOTA)) { - args->flags &= ~(XFSMNT_UQUOTAENF|XFSMNT_UQUOTA); - args->flags &= ~(XFSMNT_GQUOTAENF|XFSMNT_GQUOTA); - referenced = update; - } else if (!strcmp(this_char, MNTOPT_QUOTA) || - !strcmp(this_char, MNTOPT_UQUOTA) || - !strcmp(this_char, MNTOPT_USRQUOTA)) { - args->flags |= XFSMNT_UQUOTA | XFSMNT_UQUOTAENF; - referenced = 1; - } else if (!strcmp(this_char, MNTOPT_QUOTANOENF) || - !strcmp(this_char, MNTOPT_UQUOTANOENF)) { - args->flags |= XFSMNT_UQUOTA; - args->flags &= ~XFSMNT_UQUOTAENF; - referenced = 1; - } else if (!strcmp(this_char, MNTOPT_PQUOTA) || - !strcmp(this_char, MNTOPT_PRJQUOTA)) { - args->flags |= XFSMNT_PQUOTA | XFSMNT_PQUOTAENF; - referenced = 1; - } else if (!strcmp(this_char, MNTOPT_PQUOTANOENF)) { - args->flags |= XFSMNT_PQUOTA; - args->flags &= ~XFSMNT_PQUOTAENF; - referenced = 1; - } else if (!strcmp(this_char, MNTOPT_GQUOTA) || - !strcmp(this_char, MNTOPT_GRPQUOTA)) { - args->flags |= XFSMNT_GQUOTA | XFSMNT_GQUOTAENF; - referenced = 1; - } else if (!strcmp(this_char, MNTOPT_GQUOTANOENF)) { - args->flags |= XFSMNT_GQUOTA; - args->flags &= ~XFSMNT_GQUOTAENF; - referenced = 1; - } else { - if (local_options) - *(local_options-1) = ','; - continue; - } - - while (length--) - *this_char++ = ','; - } - - if ((args->flags & XFSMNT_GQUOTA) && (args->flags & XFSMNT_PQUOTA)) { - cmn_err(CE_WARN, - "XFS: cannot mount with both project and group quota"); - return XFS_ERROR(EINVAL); - } - - error = bhv_next_vfs_parseargs(BHV_NEXT(bhv), options, args, update); - if (!error && !referenced) - bhv_remove_vfsops(bhvtovfs(bhv), VFS_POSITION_QM); - return error; -} - -STATIC int -xfs_qm_showargs( - struct bhv_desc *bhv, - struct seq_file *m) -{ - struct bhv_vfs *vfsp = bhvtovfs(bhv); - struct xfs_mount *mp = XFS_VFSTOM(vfsp); - - if (mp->m_qflags & XFS_UQUOTA_ACCT) { - (mp->m_qflags & XFS_UQUOTA_ENFD) ? - seq_puts(m, "," MNTOPT_USRQUOTA) : - seq_puts(m, "," MNTOPT_UQUOTANOENF); - } - - if (mp->m_qflags & XFS_PQUOTA_ACCT) { - (mp->m_qflags & XFS_OQUOTA_ENFD) ? - seq_puts(m, "," MNTOPT_PRJQUOTA) : - seq_puts(m, "," MNTOPT_PQUOTANOENF); - } - - if (mp->m_qflags & XFS_GQUOTA_ACCT) { - (mp->m_qflags & XFS_OQUOTA_ENFD) ? - seq_puts(m, "," MNTOPT_GRPQUOTA) : - seq_puts(m, "," MNTOPT_GQUOTANOENF); - } - - if (!(mp->m_qflags & XFS_ALL_QUOTA_ACCT)) - seq_puts(m, "," MNTOPT_NOQUOTA); - - return bhv_next_vfs_showargs(BHV_NEXT(bhv), m); -} - -STATIC int -xfs_qm_mount( - struct bhv_desc *bhv, - struct xfs_mount_args *args, - struct cred *cr) -{ - struct bhv_vfs *vfsp = bhvtovfs(bhv); - struct xfs_mount *mp = XFS_VFSTOM(vfsp); - - if (args->flags & (XFSMNT_UQUOTA | XFSMNT_GQUOTA | XFSMNT_PQUOTA)) - xfs_qm_mount_quotainit(mp, args->flags); - return bhv_next_vfs_mount(BHV_NEXT(bhv), args, cr); -} - -/* - * Directory tree accounting is implemented using project quotas, where - * the project identifier is inherited from parent directories. - * A statvfs (df, etc.) of a directory that is using project quota should - * return a statvfs of the project, not the entire filesystem. - * This makes such trees appear as if they are filesystems in themselves. - */ -STATIC int -xfs_qm_statvfs( - struct bhv_desc *bhv, +STATIC void +xfs_fill_statvfs_from_dquot( bhv_statvfs_t *statp, - bhv_vnode_t *vnode) + xfs_disk_dquot_t *dp) { - xfs_mount_t *mp; - xfs_inode_t *ip; - xfs_dquot_t *dqp; - xfs_disk_dquot_t *dp; __uint64_t limit; - int error; - - error = bhv_next_vfs_statvfs(BHV_NEXT(bhv), statp, vnode); - if (error || !vnode) - return error; - - mp = xfs_vfstom(bhvtovfs(bhv)); - ip = xfs_vtoi(vnode); - - if (!(ip->i_d.di_flags & XFS_DIFLAG_PROJINHERIT)) - return 0; - if (!(mp->m_qflags & XFS_PQUOTA_ACCT)) - return 0; - if (!(mp->m_qflags & XFS_OQUOTA_ENFD)) - return 0; - - if (xfs_qm_dqget(mp, NULL, ip->i_d.di_projid, XFS_DQ_PROJ, 0, &dqp)) - return 0; - dp = &dqp->q_core; limit = dp->d_blk_softlimit ? be64_to_cpu(dp->d_blk_softlimit) : @@ -234,37 +75,35 @@ xfs_qm_statvfs( (statp->f_files > be64_to_cpu(dp->d_icount)) ? (statp->f_ffree - be64_to_cpu(dp->d_icount)) : 0; } - - xfs_qm_dqput(dqp); - return 0; } -STATIC int -xfs_qm_syncall( - struct bhv_desc *bhv, - int flags, - cred_t *credp) + +/* + * Directory tree accounting is implemented using project quotas, where + * the project identifier is inherited from parent directories. + * A statvfs (df, etc.) of a directory that is using project quota should + * return a statvfs of the project, not the entire filesystem. + * This makes such trees appear as if they are filesystems in themselves. + */ +STATIC void +xfs_qm_statvfs( + xfs_inode_t *ip, + bhv_statvfs_t *statp) { - struct bhv_vfs *vfsp = bhvtovfs(bhv); - struct xfs_mount *mp = XFS_VFSTOM(vfsp); - int error; + xfs_mount_t *mp = ip->i_mount; + xfs_dquot_t *dqp; - /* - * Get the Quota Manager to flush the dquots. - */ - if (XFS_IS_QUOTA_ON(mp)) { - if ((error = xfs_qm_sync(mp, flags))) { - /* - * If we got an IO error, we will be shutting down. - * So, there's nothing more for us to do here. - */ - ASSERT(error != EIO || XFS_FORCED_SHUTDOWN(mp)); - if (XFS_FORCED_SHUTDOWN(mp)) { - return XFS_ERROR(error); - } - } + if (!(ip->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) || + !((mp->m_qflags & (XFS_PQUOTA_ACCT|XFS_OQUOTA_ENFD))) == + (XFS_PQUOTA_ACCT|XFS_OQUOTA_ENFD)) + return; + + if (!xfs_qm_dqget(mp, NULL, ip->i_d.di_projid, XFS_DQ_PROJ, 0, &dqp)) { + xfs_disk_dquot_t *dp = &dqp->q_core; + + xfs_fill_statvfs_from_dquot(statp, dp); + xfs_qm_dqput(dqp); } - return bhv_next_vfs_sync(BHV_NEXT(bhv), flags, credp); } STATIC int @@ -382,7 +221,7 @@ xfs_qm_dqrele_null( } -static struct xfs_qmops xfs_qmcore_xfs = { +struct xfs_qmops xfs_qmcore_xfs = { .xfs_qminit = xfs_qm_newmount, .xfs_qmdone = xfs_qm_unmount_quotadestroy, .xfs_qmmount = xfs_qm_endmount, @@ -396,30 +235,18 @@ static struct xfs_qmops xfs_qmcore_xfs = .xfs_dqvoprename = xfs_qm_vop_rename_dqattach, .xfs_dqvopchown = xfs_qm_vop_chown, .xfs_dqvopchownresv = xfs_qm_vop_chown_reserve, + .xfs_dqstatvfs = xfs_qm_statvfs, + .xfs_dqsync = xfs_qm_sync, + .xfs_quotactl = xfs_qm_quotactl, .xfs_dqtrxops = &xfs_trans_dquot_ops, }; - -struct bhv_module_vfsops xfs_qmops = { { - BHV_IDENTITY_INIT(VFS_BHV_QM, VFS_POSITION_QM), - .vfs_parseargs = xfs_qm_parseargs, - .vfs_showargs = xfs_qm_showargs, - .vfs_mount = xfs_qm_mount, - .vfs_statvfs = xfs_qm_statvfs, - .vfs_sync = xfs_qm_syncall, - .vfs_quotactl = xfs_qm_quotactl, }, -}; - +EXPORT_SYMBOL(xfs_qmcore_xfs); static int __init xfs_qm_init(void) { - static char message[] __initdata = - KERN_INFO "SGI XFS Quota Management subsystem\n"; - - printk(message); + printk(KERN_INFO "SGI XFS Quota Management subsystem\n"); mutex_init(&xfs_Gqm_lock); - vfs_bhv_set_custom(&xfs_qmops, &xfs_qmcore_xfs); - bhv_module_init(XFS_QMOPS, THIS_MODULE, &xfs_qmops); xfs_qm_init_procfs(); return 0; } @@ -428,8 +255,6 @@ static void __exit xfs_qm_exit(void) { xfs_qm_cleanup_procfs(); - bhv_module_exit(XFS_QMOPS); - vfs_bhv_clr_custom(&xfs_qmops); if (qm_dqzone) kmem_zone_destroy(qm_dqzone); if (qm_dqtrxzone) Index: linux-2.6-xfs/fs/xfs/xfs_mount.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_mount.h 2007-08-23 14:54:07.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_mount.h 2007-08-23 14:57:38.000000000 +0200 @@ -142,6 +142,9 @@ typedef struct xfs_dquot * (*xfs_dqvopch struct xfs_dquot **, struct xfs_dquot *); typedef int (*xfs_dqvopchownresv_t)(struct xfs_trans *, struct xfs_inode *, struct xfs_dquot *, struct xfs_dquot *, uint); +typedef void (*xfs_dqstatvfs_t)(struct xfs_inode *, bhv_statvfs_t *); +typedef int (*xfs_dqsync_t)(struct xfs_mount *, int flags); +typedef int (*xfs_quotactl_t)(struct xfs_mount *, int, int, xfs_caddr_t); typedef struct xfs_qmops { xfs_qminit_t xfs_qminit; @@ -157,35 +160,44 @@ typedef struct xfs_qmops { xfs_dqvoprename_t xfs_dqvoprename; xfs_dqvopchown_t xfs_dqvopchown; xfs_dqvopchownresv_t xfs_dqvopchownresv; + xfs_dqstatvfs_t xfs_dqstatvfs; + xfs_dqsync_t xfs_dqsync; + xfs_quotactl_t xfs_quotactl; struct xfs_dqtrxops *xfs_dqtrxops; } xfs_qmops_t; #define XFS_QM_INIT(mp, mnt, fl) \ - (*(mp)->m_qm_ops.xfs_qminit)(mp, mnt, fl) + (*(mp)->m_qm_ops->xfs_qminit)(mp, mnt, fl) #define XFS_QM_MOUNT(mp, mnt, fl, mfsi_flags) \ - (*(mp)->m_qm_ops.xfs_qmmount)(mp, mnt, fl, mfsi_flags) + (*(mp)->m_qm_ops->xfs_qmmount)(mp, mnt, fl, mfsi_flags) #define XFS_QM_UNMOUNT(mp) \ - (*(mp)->m_qm_ops.xfs_qmunmount)(mp) + (*(mp)->m_qm_ops->xfs_qmunmount)(mp) #define XFS_QM_DONE(mp) \ - (*(mp)->m_qm_ops.xfs_qmdone)(mp) + (*(mp)->m_qm_ops->xfs_qmdone)(mp) #define XFS_QM_DQRELE(mp, dq) \ - (*(mp)->m_qm_ops.xfs_dqrele)(dq) + (*(mp)->m_qm_ops->xfs_dqrele)(dq) #define XFS_QM_DQATTACH(mp, ip, fl) \ - (*(mp)->m_qm_ops.xfs_dqattach)(ip, fl) + (*(mp)->m_qm_ops->xfs_dqattach)(ip, fl) #define XFS_QM_DQDETACH(mp, ip) \ - (*(mp)->m_qm_ops.xfs_dqdetach)(ip) + (*(mp)->m_qm_ops->xfs_dqdetach)(ip) #define XFS_QM_DQPURGEALL(mp, fl) \ - (*(mp)->m_qm_ops.xfs_dqpurgeall)(mp, fl) + (*(mp)->m_qm_ops->xfs_dqpurgeall)(mp, fl) #define XFS_QM_DQVOPALLOC(mp, ip, uid, gid, prid, fl, dq1, dq2) \ - (*(mp)->m_qm_ops.xfs_dqvopalloc)(mp, ip, uid, gid, prid, fl, dq1, dq2) + (*(mp)->m_qm_ops->xfs_dqvopalloc)(mp, ip, uid, gid, prid, fl, dq1, dq2) #define XFS_QM_DQVOPCREATE(mp, tp, ip, dq1, dq2) \ - (*(mp)->m_qm_ops.xfs_dqvopcreate)(tp, ip, dq1, dq2) + (*(mp)->m_qm_ops->xfs_dqvopcreate)(tp, ip, dq1, dq2) #define XFS_QM_DQVOPRENAME(mp, ip) \ - (*(mp)->m_qm_ops.xfs_dqvoprename)(ip) + (*(mp)->m_qm_ops->xfs_dqvoprename)(ip) #define XFS_QM_DQVOPCHOWN(mp, tp, ip, dqp, dq) \ - (*(mp)->m_qm_ops.xfs_dqvopchown)(tp, ip, dqp, dq) + (*(mp)->m_qm_ops->xfs_dqvopchown)(tp, ip, dqp, dq) #define XFS_QM_DQVOPCHOWNRESV(mp, tp, ip, dq1, dq2, fl) \ - (*(mp)->m_qm_ops.xfs_dqvopchownresv)(tp, ip, dq1, dq2, fl) + (*(mp)->m_qm_ops->xfs_dqvopchownresv)(tp, ip, dq1, dq2, fl) +#define XFS_QM_DQSTATVFS(ip, statp) \ + (*(ip)->i_mount->m_qm_ops->xfs_dqstatvfs)(ip, statp) +#define XFS_QM_DQSYNC(mp, flags) \ + (*(mp)->m_qm_ops->xfs_dqsync)(mp, flags) +#define XFS_QM_QUOTACTL(mp, cmd, id, addr) \ + (*(mp)->m_qm_ops->xfs_quotactl)(mp, cmd, id, addr) /* @@ -413,7 +425,7 @@ typedef struct xfs_mount { struct xfs_chash *m_chash; /* fs private inode per-cluster * hash table */ struct xfs_dmops *m_dm_ops; /* vector of DMI ops */ - struct xfs_qmops m_qm_ops; /* vector of XQM ops */ + struct xfs_qmops *m_qm_ops; /* vector of XQM ops */ struct xfs_ioops m_io_ops; /* vector of I/O ops */ atomic_t m_active_trans; /* number trans frozen */ #ifdef HAVE_PERCPU_SB @@ -649,9 +661,10 @@ extern int xfs_sb_validate_fsb_count(str extern int xfs_dmops_get(struct xfs_mount *, struct xfs_mount_args *); extern void xfs_dmops_put(struct xfs_mount *); +extern int xfs_qmops_get(struct xfs_mount *, struct xfs_mount_args *); +extern void xfs_qmops_put(struct xfs_mount *); extern struct xfs_dmops xfs_dmcore_xfs; -extern struct xfs_qmops xfs_qmcore_stub; extern struct xfs_ioops xfs_iocore_xfs; extern int xfs_init(void); Index: linux-2.6-xfs/fs/xfs/xfs_quota.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_quota.h 2007-08-23 02:29:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_quota.h 2007-08-23 14:57:38.000000000 +0200 @@ -330,12 +330,12 @@ typedef struct xfs_dqtrxops { } xfs_dqtrxops_t; #define XFS_DQTRXOP(mp, tp, op, args...) \ - ((mp)->m_qm_ops.xfs_dqtrxops ? \ - ((mp)->m_qm_ops.xfs_dqtrxops->op)(tp, ## args) : 0) + ((mp)->m_qm_ops->xfs_dqtrxops ? \ + ((mp)->m_qm_ops->xfs_dqtrxops->op)(tp, ## args) : 0) #define XFS_DQTRXOP_VOID(mp, tp, op, args...) \ - ((mp)->m_qm_ops.xfs_dqtrxops ? \ - ((mp)->m_qm_ops.xfs_dqtrxops->op)(tp, ## args) : (void)0) + ((mp)->m_qm_ops->xfs_dqtrxops ? \ + ((mp)->m_qm_ops->xfs_dqtrxops->op)(tp, ## args) : (void)0) #define XFS_TRANS_DUP_DQINFO(mp, otp, ntp) \ XFS_DQTRXOP_VOID(mp, otp, qo_dup_dqinfo, ntp) @@ -364,7 +364,7 @@ typedef struct xfs_dqtrxops { extern int xfs_qm_dqcheck(xfs_disk_dquot_t *, xfs_dqid_t, uint, uint, char *); extern int xfs_mount_reset_sbqflags(struct xfs_mount *); -extern struct bhv_module_vfsops xfs_qmops; +extern struct xfs_qmops xfs_qmcore_xfs; #endif /* __KERNEL__ */ Index: linux-2.6-xfs/fs/xfs/xfs_vfsops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vfsops.c 2007-08-23 14:54:07.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vfsops.c 2007-08-23 14:57:38.000000000 +0200 @@ -402,6 +402,22 @@ xfs_finish_flags( return XFS_ERROR(EINVAL); } + if (ap->flags & XFSMNT_UQUOTA) { + mp->m_qflags |= (XFS_UQUOTA_ACCT | XFS_UQUOTA_ACTIVE); + if (ap->flags & XFSMNT_UQUOTAENF) + mp->m_qflags |= XFS_UQUOTA_ENFD; + } + + if (ap->flags & XFSMNT_GQUOTA) { + mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE); + if (ap->flags & XFSMNT_GQUOTAENF) + mp->m_qflags |= XFS_OQUOTA_ENFD; + } else if (ap->flags & XFSMNT_PQUOTA) { + mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE); + if (ap->flags & XFSMNT_PQUOTAENF) + mp->m_qflags |= XFS_OQUOTA_ENFD; + } + return 0; } @@ -435,12 +451,13 @@ xfs_mount( error = xfs_dmops_get(mp, args); if (error) return error; + error = xfs_qmops_get(mp, args); + if (error) + return error; /* * Setup xfs_mount function vectors from available behaviors */ - p = vfs_bhv_lookup(vfsp, VFS_POSITION_QM); - mp->m_qm_ops = p ? *(xfs_qmops_t *) vfs_bhv_custom(p) : xfs_qmcore_stub; p = vfs_bhv_lookup(vfsp, VFS_POSITION_IO); mp->m_io_ops = p ? *(xfs_ioops_t *) vfs_bhv_custom(p) : xfs_iocore_xfs; @@ -556,6 +573,7 @@ error1: xfs_binval(mp->m_rtdev_targp); error0: xfs_unmountfs_close(mp, credp); + xfs_qmops_put(mp); xfs_dmops_put(mp); return error; } @@ -647,6 +665,7 @@ out: * and free the super block buffer & mount structures. */ xfs_unmountfs(mp, credp); + xfs_qmops_put(mp); xfs_dmops_put(mp); kmem_free(mp, sizeof(xfs_mount_t)); } @@ -887,6 +906,8 @@ xfs_statvfs( xfs_statvfs_fsid(statp, mp); statp->f_namelen = MAXNAMELEN - 1; + if (vp) + XFS_QM_DQSTATVFS(xfs_vtoi(vp), statp); return 0; } @@ -941,6 +962,21 @@ xfs_sync( cred_t *credp) { xfs_mount_t *mp = XFS_BHVTOM(bdp); + int error; + + /* + * Get the Quota Manager to flush the dquots. + */ + error = XFS_QM_DQSYNC(mp, flags); + if (error) { + /* + * If we got an IO error, we will be shutting down. + * So, there's nothing more for us to do here. + */ + ASSERT(error != EIO || XFS_FORCED_SHUTDOWN(mp)); + if (XFS_FORCED_SHUTDOWN(mp)) + return XFS_ERROR(error); + } if (flags & SYNC_IOWAIT) xfs_filestream_flush(mp); @@ -1696,6 +1732,18 @@ xfs_vget( #define MNTOPT_ATTR2 "attr2" /* do use attr2 attribute format */ #define MNTOPT_NOATTR2 "noattr2" /* do not use attr2 attribute format */ #define MNTOPT_FILESTREAM "filestreams" /* use filestreams allocator */ +#define MNTOPT_QUOTA "quota" /* disk quotas (user) */ +#define MNTOPT_NOQUOTA "noquota" /* no quotas */ +#define MNTOPT_USRQUOTA "usrquota" /* user quota enabled */ +#define MNTOPT_GRPQUOTA "grpquota" /* group quota enabled */ +#define MNTOPT_PRJQUOTA "prjquota" /* project quota enabled */ +#define MNTOPT_UQUOTA "uquota" /* user quota (IRIX variant) */ +#define MNTOPT_GQUOTA "gquota" /* group quota (IRIX variant) */ +#define MNTOPT_PQUOTA "pquota" /* project quota (IRIX variant) */ +#define MNTOPT_UQUOTANOENF "uqnoenforce"/* user quota limit enforcement */ +#define MNTOPT_GQUOTANOENF "gqnoenforce"/* group quota limit enforcement */ +#define MNTOPT_PQUOTANOENF "pqnoenforce"/* project quota limit enforcement */ +#define MNTOPT_QUOTANOENF "qnoenforce" /* same as uqnoenforce */ #define MNTOPT_DMAPI "dmapi" /* DMI enabled (DMAPI / XDSM) */ #define MNTOPT_XDSM "xdsm" /* DMI enabled (DMAPI / XDSM) */ #define MNTOPT_DMI "dmi" /* DMI enabled (DMAPI / XDSM) */ @@ -1878,6 +1926,29 @@ xfs_parseargs( args->flags &= ~XFSMNT_ATTR2; } else if (!strcmp(this_char, MNTOPT_FILESTREAM)) { args->flags2 |= XFSMNT2_FILESTREAMS; + } else if (!strcmp(this_char, MNTOPT_NOQUOTA)) { + args->flags &= ~(XFSMNT_UQUOTAENF|XFSMNT_UQUOTA); + args->flags &= ~(XFSMNT_GQUOTAENF|XFSMNT_GQUOTA); + } else if (!strcmp(this_char, MNTOPT_QUOTA) || + !strcmp(this_char, MNTOPT_UQUOTA) || + !strcmp(this_char, MNTOPT_USRQUOTA)) { + args->flags |= XFSMNT_UQUOTA | XFSMNT_UQUOTAENF; + } else if (!strcmp(this_char, MNTOPT_QUOTANOENF) || + !strcmp(this_char, MNTOPT_UQUOTANOENF)) { + args->flags |= XFSMNT_UQUOTA; + args->flags &= ~XFSMNT_UQUOTAENF; + } else if (!strcmp(this_char, MNTOPT_PQUOTA) || + !strcmp(this_char, MNTOPT_PRJQUOTA)) { + args->flags |= XFSMNT_PQUOTA | XFSMNT_PQUOTAENF; + } else if (!strcmp(this_char, MNTOPT_PQUOTANOENF)) { + args->flags |= XFSMNT_PQUOTA; + args->flags &= ~XFSMNT_PQUOTAENF; + } else if (!strcmp(this_char, MNTOPT_GQUOTA) || + !strcmp(this_char, MNTOPT_GRPQUOTA)) { + args->flags |= XFSMNT_GQUOTA | XFSMNT_GQUOTAENF; + } else if (!strcmp(this_char, MNTOPT_GQUOTANOENF)) { + args->flags |= XFSMNT_GQUOTA; + args->flags &= ~XFSMNT_GQUOTAENF; } else if (!strcmp(this_char, MNTOPT_DMAPI)) { args->flags |= XFSMNT_DMAPI; } else if (!strcmp(this_char, MNTOPT_XDSM)) { @@ -1912,6 +1983,12 @@ xfs_parseargs( return EINVAL; } + if ((args->flags & XFSMNT_GQUOTA) && (args->flags & XFSMNT_PQUOTA)) { + cmn_err(CE_WARN, + "XFS: cannot mount with both project and group quota"); + return EINVAL; + } + if ((args->flags & XFSMNT_DMAPI) && *args->mtpt == '\0') { printk("XFS: %s option needs the mount point option as well\n", MNTOPT_DMAPI); @@ -2011,9 +2088,32 @@ xfs_showargs( if (vfsp->vfs_flag & VFS_GRPID) seq_printf(m, "," MNTOPT_GRPID); + if (mp->m_qflags & XFS_UQUOTA_ACCT) { + if (mp->m_qflags & XFS_UQUOTA_ENFD) + seq_puts(m, "," MNTOPT_USRQUOTA); + else + seq_puts(m, "," MNTOPT_UQUOTANOENF); + } + + if (mp->m_qflags & XFS_PQUOTA_ACCT) { + if (mp->m_qflags & XFS_OQUOTA_ENFD) + seq_puts(m, "," MNTOPT_PRJQUOTA); + else + seq_puts(m, "," MNTOPT_PQUOTANOENF); + } + + if (mp->m_qflags & XFS_GQUOTA_ACCT) { + if (mp->m_qflags & XFS_OQUOTA_ENFD) + seq_puts(m, "," MNTOPT_GRPQUOTA); + else + seq_puts(m, "," MNTOPT_GQUOTANOENF); + } + + if (!(mp->m_qflags & XFS_ALL_QUOTA_ACCT)) + seq_puts(m, "," MNTOPT_NOQUOTA); + if (vfsp->vfs_flag & VFS_DMI) seq_puts(m, "," MNTOPT_DMAPI); - return 0; } @@ -2044,7 +2144,6 @@ bhv_vfsops_t xfs_vfsops = { .vfs_statvfs = xfs_statvfs, .vfs_sync = xfs_sync, .vfs_vget = xfs_vget, - .vfs_quotactl = (vfs_quotactl_t)fs_nosys, .vfs_get_inode = xfs_get_inode, .vfs_init_vnode = xfs_initialize_vnode, .vfs_force_shutdown = xfs_do_force_shutdown, Index: linux-2.6-xfs/fs/xfs/quota/xfs_qm.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/quota/xfs_qm.c 2007-08-23 02:29:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/quota/xfs_qm.c 2007-08-23 14:57:38.000000000 +0200 @@ -284,45 +284,6 @@ xfs_qm_rele_quotafs_ref( } /* - * This is called at mount time from xfs_mountfs to initialize the quotainfo - * structure and start the global quota manager (xfs_Gqm) if it hasn't done - * so already. Note that the superblock has not been read in yet. - */ -void -xfs_qm_mount_quotainit( - xfs_mount_t *mp, - uint flags) -{ - /* - * User, projects or group quotas has to be on. - */ - ASSERT(flags & (XFSMNT_UQUOTA | XFSMNT_PQUOTA | XFSMNT_GQUOTA)); - - /* - * Initialize the flags in the mount structure. From this point - * onwards we look at m_qflags to figure out if quotas's ON/OFF, etc. - * Note that we enforce nothing if accounting is off. - * ie. XFSMNT_*QUOTA must be ON for XFSMNT_*QUOTAENF. - * It isn't necessary to take the quotaoff lock to do this; this is - * called from mount. - */ - if (flags & XFSMNT_UQUOTA) { - mp->m_qflags |= (XFS_UQUOTA_ACCT | XFS_UQUOTA_ACTIVE); - if (flags & XFSMNT_UQUOTAENF) - mp->m_qflags |= XFS_UQUOTA_ENFD; - } - if (flags & XFSMNT_GQUOTA) { - mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE); - if (flags & XFSMNT_GQUOTAENF) - mp->m_qflags |= XFS_OQUOTA_ENFD; - } else if (flags & XFSMNT_PQUOTA) { - mp->m_qflags |= (XFS_PQUOTA_ACCT | XFS_PQUOTA_ACTIVE); - if (flags & XFSMNT_PQUOTAENF) - mp->m_qflags |= XFS_OQUOTA_ENFD; - } -} - -/* * Just destroy the quotainfo structure. */ void @@ -1035,7 +996,7 @@ xfs_qm_dqdetach( int xfs_qm_sync( xfs_mount_t *mp, - short flags) + int flags) { int recl, restarts; xfs_dquot_t *dqp; Index: linux-2.6-xfs/fs/xfs/quota/xfs_qm.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/quota/xfs_qm.h 2007-08-23 02:29:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/quota/xfs_qm.h 2007-08-23 14:57:38.000000000 +0200 @@ -166,12 +166,11 @@ typedef struct xfs_dquot_acct { extern void xfs_qm_destroy_quotainfo(xfs_mount_t *); extern int xfs_qm_mount_quotas(xfs_mount_t *, int); -extern void xfs_qm_mount_quotainit(xfs_mount_t *, uint); extern int xfs_qm_quotacheck(xfs_mount_t *); extern void xfs_qm_unmount_quotadestroy(xfs_mount_t *); extern int xfs_qm_unmount_quotas(xfs_mount_t *); extern int xfs_qm_write_sb_changes(xfs_mount_t *, __int64_t); -extern int xfs_qm_sync(xfs_mount_t *, short); +extern int xfs_qm_sync(xfs_mount_t *, int); /* dquot stuff */ extern boolean_t xfs_qm_dqalloc_incore(xfs_dquot_t **); @@ -199,7 +198,8 @@ extern void xfs_qm_freelist_unlink(xfs_ extern int xfs_qm_freelist_lock_nowait(xfs_qm_t *); /* system call interface */ -extern int xfs_qm_quotactl(bhv_desc_t *, int, int, xfs_caddr_t); +extern int xfs_qm_quotactl(struct xfs_mount *, int, int, + xfs_caddr_t); #ifdef DEBUG extern int xfs_qm_internalqcheck(xfs_mount_t *); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_super.h 2007-08-23 14:42:53.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.h 2007-08-23 14:57:38.000000000 +0200 @@ -89,4 +89,7 @@ extern void xfs_blkdev_issue_flush(struc extern struct export_operations xfs_export_operations; +#define XFS_M(sb) \ + XFS_VFSTOM(vfs_from_sb(sb)) + #endif /* __XFS_SUPER_H__ */ Index: linux-2.6-xfs/fs/xfs/quota/xfs_qm_syscalls.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/quota/xfs_qm_syscalls.c 2007-08-23 02:29:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/quota/xfs_qm_syscalls.c 2007-08-23 14:57:38.000000000 +0200 @@ -81,17 +81,14 @@ STATIC void xfs_qm_export_dquot(xfs_moun */ int xfs_qm_quotactl( - struct bhv_desc *bdp, + xfs_mount_t *mp, int cmd, int id, xfs_caddr_t addr) { - xfs_mount_t *mp; - bhv_vfs_t *vfsp; + bhv_vfs_t *vfsp = XFS_MTOVFS(mp); int error; - vfsp = bhvtovfs(bdp); - mp = XFS_VFSTOM(vfsp); ASSERT(addr != NULL || cmd == Q_XQUOTASYNC); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ksyms.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_ksyms.c 2007-08-23 14:54:07.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ksyms.c 2007-08-23 14:57:38.000000000 +0200 @@ -199,7 +199,6 @@ EXPORT_SYMBOL(vfs_root); EXPORT_SYMBOL(vfs_statvfs); EXPORT_SYMBOL(vfs_sync); EXPORT_SYMBOL(vfs_vget); -EXPORT_SYMBOL(vfs_quotactl); EXPORT_SYMBOL(vfs_get_inode); EXPORT_SYMBOL(vfs_init_vnode); EXPORT_SYMBOL(vfs_force_shutdown); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vfs.c 2007-08-23 14:54:07.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.c 2007-08-23 14:57:38.000000000 +0200 @@ -155,21 +155,6 @@ vfs_vget( return ((*bhvtovfsops(next)->vfs_vget)(next, vpp, fidp)); } -int -vfs_quotactl( - struct bhv_desc *bdp, - int cmd, - int id, - caddr_t addr) -{ - struct bhv_desc *next = bdp; - - ASSERT(next); - while (! (bhvtovfsops(next))->vfs_quotactl) - next = BHV_NEXT(next); - return ((*bhvtovfsops(next)->vfs_quotactl)(next, cmd, id, addr)); -} - struct inode * vfs_get_inode( struct bhv_desc *bdp, Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vfs.h 2007-08-23 14:54:07.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.h 2007-08-23 14:57:38.000000000 +0200 @@ -127,7 +127,6 @@ typedef int (*vfs_statvfs_t)(bhv_desc_t struct inode *); typedef int (*vfs_sync_t)(bhv_desc_t *, int, struct cred *); typedef int (*vfs_vget_t)(bhv_desc_t *, struct inode **, struct fid *); -typedef int (*vfs_quotactl_t)(bhv_desc_t *, int, int, caddr_t); typedef void (*vfs_init_vnode_t)(bhv_desc_t *, struct inode *, struct xfs_inode *, int); typedef void (*vfs_force_shutdown_t)(bhv_desc_t *, int, char *, int); @@ -145,7 +144,6 @@ typedef struct bhv_vfsops { vfs_statvfs_t vfs_statvfs; /* file system statistics */ vfs_sync_t vfs_sync; /* flush files */ vfs_vget_t vfs_vget; /* get vnode from fid */ - vfs_quotactl_t vfs_quotactl; /* disk quota */ vfs_get_inode_t vfs_get_inode; /* bhv specific iget */ vfs_init_vnode_t vfs_init_vnode; /* initialize a new vnode */ vfs_force_shutdown_t vfs_force_shutdown; /* crash and burn */ @@ -165,7 +163,6 @@ typedef struct bhv_vfsops { #define bhv_vfs_statvfs(v, sp,vp) vfs_statvfs(VFSHEAD(v), sp,vp) #define bhv_vfs_sync(v, flag,cr) vfs_sync(VFSHEAD(v), flag,cr) #define bhv_vfs_vget(v, vpp,fidp) vfs_vget(VFSHEAD(v), vpp,fidp) -#define bhv_vfs_quotactl(v, c,id,p) vfs_quotactl(VFSHEAD(v), c,id,p) #define bhv_vfs_get_inode(v, ino, fl) vfs_get_inode(VFSHEAD(v), ino,fl) #define bhv_vfs_init_vnode(v, vp,b,ul) vfs_init_vnode(VFSHEAD(v), vp,b,ul) #define bhv_vfs_force_shutdown(v,u,f,l) vfs_force_shutdown(VFSHEAD(v), u,f,l) @@ -183,7 +180,6 @@ typedef struct bhv_vfsops { #define bhv_next_vfs_statvfs(b, sp,vp) vfs_statvfs(b, sp,vp) #define bhv_next_vfs_sync(b, flag,cr) vfs_sync(b, flag,cr) #define bhv_next_vfs_vget(b, vpp,fidp) vfs_vget(b, vpp,fidp) -#define bhv_next_vfs_quotactl(b, c,id,p) vfs_quotactl(b, c,id,p) #define bhv_next_vfs_get_inode(b, ino,fl) vfs_get_inode(b, ino,fl) #define bhv_next_vfs_init_vnode(b, vp,b2,ul) vfs_init_vnode(b, vp,b2,ul) #define bhv_next_force_shutdown(b, fl,f,l) vfs_force_shutdown(b, fl,f,l) @@ -198,7 +194,6 @@ extern int vfs_root(bhv_desc_t *, struct extern int vfs_statvfs(bhv_desc_t *, bhv_statvfs_t *, struct inode *); extern int vfs_sync(bhv_desc_t *, int, struct cred *); extern int vfs_vget(bhv_desc_t *, struct inode **, struct fid *); -extern int vfs_quotactl(bhv_desc_t *, int, int, caddr_t); extern struct inode *vfs_get_inode(bhv_desc_t *, xfs_ino_t, int); extern void vfs_init_vnode(bhv_desc_t *, struct inode *, struct xfs_inode *, int); extern void vfs_force_shutdown(bhv_desc_t *, int, char *, int); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_super.c 2007-08-23 14:54:05.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c 2007-08-23 14:57:38.000000000 +0200 @@ -735,7 +735,7 @@ xfs_fs_quotasync( struct super_block *sb, int type) { - return -bhv_vfs_quotactl(vfs_from_sb(sb), Q_XQUOTASYNC, 0, NULL); + return -XFS_QM_QUOTACTL(XFS_M(sb), Q_XQUOTASYNC, 0, NULL); } STATIC int @@ -743,7 +743,7 @@ xfs_fs_getxstate( struct super_block *sb, struct fs_quota_stat *fqs) { - return -bhv_vfs_quotactl(vfs_from_sb(sb), Q_XGETQSTAT, 0, (caddr_t)fqs); + return -XFS_QM_QUOTACTL(XFS_M(sb), Q_XGETQSTAT, 0, (caddr_t)fqs); } STATIC int @@ -752,7 +752,7 @@ xfs_fs_setxstate( unsigned int flags, int op) { - return -bhv_vfs_quotactl(vfs_from_sb(sb), op, 0, (caddr_t)&flags); + return -XFS_QM_QUOTACTL(XFS_M(sb), op, 0, (caddr_t)&flags); } STATIC int @@ -762,7 +762,7 @@ xfs_fs_getxquota( qid_t id, struct fs_disk_quota *fdq) { - return -bhv_vfs_quotactl(vfs_from_sb(sb), + return -XFS_QM_QUOTACTL(XFS_M(sb), (type == USRQUOTA) ? Q_XGETQUOTA : ((type == GRPQUOTA) ? Q_XGETGQUOTA : Q_XGETPQUOTA), id, (caddr_t)fdq); @@ -775,7 +775,7 @@ xfs_fs_setxquota( qid_t id, struct fs_disk_quota *fdq) { - return -bhv_vfs_quotactl(vfs_from_sb(sb), + return -XFS_QM_QUOTACTL(XFS_M(sb), (type == USRQUOTA) ? Q_XSETQLIM : ((type == GRPQUOTA) ? Q_XSETGQLIM : Q_XSETPQLIM), id, (caddr_t)fdq); Index: linux-2.6-xfs/fs/xfs/xfs_qmops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_qmops.c 2007-08-23 02:29:35.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_qmops.c 2007-08-23 14:57:38.000000000 +0200 @@ -28,6 +28,8 @@ #include "xfs_mount.h" #include "xfs_quota.h" #include "xfs_error.h" +#include "xfs_clnt.h" + STATIC struct xfs_dquot * xfs_dqvopchown_default( @@ -110,7 +112,7 @@ xfs_noquota_init( return error; } -xfs_qmops_t xfs_qmcore_stub = { +static struct xfs_qmops xfs_qmcore_stub = { .xfs_qminit = (xfs_qminit_t) xfs_noquota_init, .xfs_qmdone = (xfs_qmdone_t) fs_noerr, .xfs_qmmount = (xfs_qmmount_t) fs_noerr, @@ -124,4 +126,38 @@ xfs_qmops_t xfs_qmcore_stub = { .xfs_dqvoprename = (xfs_dqvoprename_t) fs_noerr, .xfs_dqvopchown = xfs_dqvopchown_default, .xfs_dqvopchownresv = (xfs_dqvopchownresv_t) fs_noerr, + .xfs_dqstatvfs = (xfs_dqstatvfs_t) fs_noval, + .xfs_dqsync = (xfs_dqsync_t) fs_noerr, + .xfs_quotactl = (xfs_quotactl_t) fs_noerr, }; + +int +xfs_qmops_get(struct xfs_mount *mp, struct xfs_mount_args *args) +{ + if (args->flags & (XFSMNT_UQUOTA | XFSMNT_PQUOTA | XFSMNT_GQUOTA)) { + struct xfs_qmops *ops; + + ops = symbol_get(xfs_qmcore_xfs); + if (!ops) { + request_module("xfs_quota"); + ops = symbol_get(xfs_qmcore_xfs); + } + + if (!ops) { + cmn_err(CE_WARN, "XFS: no quota support available."); + return EINVAL; + } + mp->m_qm_ops = ops; + } else { + mp->m_qm_ops = &xfs_qmcore_stub; + } + + return 0; +} + +void +xfs_qmops_put(struct xfs_mount *mp) +{ + if (mp->m_qm_ops != &xfs_qmcore_stub) + symbol_put(xfs_qmcore_xfs); +} From owner-xfs@oss.sgi.com Thu Aug 23 12:39:51 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 12:39:54 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_65 autolearn=no version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7NJdk4p004768 for ; Thu, 23 Aug 2007 12:39:51 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7NJdiA5008703 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 23 Aug 2007 21:39:44 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7NJditj008701 for xfs@oss.sgi.com; Thu, 23 Aug 2007 21:39:44 +0200 Date: Thu, 23 Aug 2007 21:39:44 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH 12/17] decontaminate vfs operations from behavior details Message-ID: <20070823193944.GM8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12618 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs All vfs ops now take struct xfs_mount pointers and the behaviour related glue is split out into methods of it's own. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/Makefile-linux-2.6 =================================================================== --- linux-2.6-xfs.orig/fs/xfs/Makefile-linux-2.6 2007-08-13 18:07:34.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/Makefile-linux-2.6 2007-08-13 18:07:59.000000000 +0200 @@ -78,6 +78,7 @@ xfs-y += xfs_alloc.o \ xfs_trans_item.o \ xfs_utils.o \ xfs_vfsops.o \ + xfs_vfsops_bhv.o \ xfs_vnodeops.o \ xfs_rw.o \ xfs_dmops.o \ Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_super.c 2007-08-13 18:07:56.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c 2007-08-13 18:07:59.000000000 +0200 @@ -202,7 +202,7 @@ xfs_revalidate_inode( void xfs_initialize_vnode( - bhv_desc_t *bdp, + struct xfs_mount *mp, bhv_vnode_t *vp, struct xfs_inode *ip, int unlock) @@ -222,7 +222,7 @@ xfs_initialize_vnode( * finish our work. */ if (ip->i_d.di_mode != 0 && unlock && (inode->i_state & I_NEW)) { - xfs_revalidate_inode(XFS_BHVTOM(bdp), vp, ip); + xfs_revalidate_inode(mp, vp, ip); xfs_set_inodeops(inode); xfs_iflags_clear(ip, XFS_INEW); @@ -234,11 +234,11 @@ xfs_initialize_vnode( struct inode * xfs_get_inode( - bhv_desc_t *bdp, + xfs_mount_t *mp, xfs_ino_t ino, int flags) { - return iget_locked(bhvtovfs(bdp)->vfs_super, ino); + return iget_locked(XFS_MTOVFS(mp)->vfs_super, ino); } int Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_super.h 2007-08-13 18:07:56.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.h 2007-08-13 18:07:59.000000000 +0200 @@ -76,9 +76,6 @@ struct block_device; extern __uint64_t xfs_max_file_offset(unsigned int); -extern struct inode *xfs_get_inode(bhv_desc_t *, xfs_ino_t, int); -extern void xfs_initialize_vnode(bhv_desc_t *, bhv_vnode_t *, struct xfs_inode *, int); - extern void xfs_flush_inode(struct xfs_inode *); extern void xfs_flush_device(struct xfs_inode *); Index: linux-2.6-xfs/fs/xfs/xfs_mount.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_mount.h 2007-08-13 18:07:56.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_mount.h 2007-08-13 18:07:59.000000000 +0200 @@ -650,7 +650,6 @@ extern struct xfs_buf *xfs_getsb(xfs_mou extern int xfs_readsb(xfs_mount_t *, int); extern void xfs_freesb(xfs_mount_t *); extern int xfs_fs_writable(xfs_mount_t *); -extern void xfs_do_force_shutdown(bhv_desc_t *, int, char *, int); extern int xfs_syncsub(xfs_mount_t *, int, int *); extern int xfs_sync_inodes(xfs_mount_t *, int, int *); extern xfs_agnumber_t xfs_initialize_perag(struct bhv_vfs *, xfs_mount_t *, Index: linux-2.6-xfs/fs/xfs/xfs_rw.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_rw.c 2007-08-13 17:59:06.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_rw.c 2007-08-13 18:07:59.000000000 +0200 @@ -178,18 +178,15 @@ xfs_write_sync_logforce( * the shop, make sure that absolutely nothing persistent happens to * this filesystem after this point. */ - void xfs_do_force_shutdown( - bhv_desc_t *bdp, + xfs_mount_t *mp, int flags, char *fname, int lnnum) { int logerror; - xfs_mount_t *mp; - mp = XFS_BHVTOM(bdp); logerror = flags & SHUTDOWN_LOG_IO_ERROR; if (!(flags & SHUTDOWN_FORCE_UMOUNT)) { Index: linux-2.6-xfs/fs/xfs/xfs_vfsops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vfsops.c 2007-08-13 18:07:56.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vfsops.c 2007-08-13 18:07:59.000000000 +0200 @@ -55,10 +55,9 @@ #include "xfs_filestream.h" #include "xfs_fsops.h" #include "xfs_vnodeops.h" +#include "xfs_vfsops.h" -STATIC int xfs_sync(bhv_desc_t *, int, cred_t *); - int xfs_init(void) { @@ -433,15 +432,14 @@ xfs_finish_flags( * they are present. The data subvolume has already been opened by * get_sb_bdev() and is stored in vfsp->vfs_super->s_bdev. */ -STATIC int +int xfs_mount( - struct bhv_desc *bhvp, + struct xfs_mount *mp, struct xfs_mount_args *args, cred_t *credp) { - struct bhv_vfs *vfsp = bhvtovfs(bhvp); + struct bhv_vfs *vfsp = XFS_MTOVFS(mp); struct bhv_desc *p; - struct xfs_mount *mp = XFS_BHVTOM(bhvp); struct block_device *ddev, *logdev, *rtdev; int flags = 0, error; @@ -578,14 +576,13 @@ error0: return error; } -STATIC int +int xfs_unmount( - bhv_desc_t *bdp, + xfs_mount_t *mp, int flags, cred_t *credp) { - bhv_vfs_t *vfsp = bhvtovfs(bdp); - xfs_mount_t *mp = XFS_BHVTOM(bdp); + bhv_vfs_t *vfsp = XFS_MTOVFS(mp); xfs_inode_t *rip; bhv_vnode_t *rvp; int unmount_event_wanted = 0; @@ -640,8 +637,7 @@ xfs_unmount( * referenced vnodes as well. */ if (XFS_FORCED_SHUTDOWN(mp)) { - error = xfs_sync(&mp->m_bhv, - (SYNC_WAIT | SYNC_CLOSE), credp); + error = xfs_sync(mp, SYNC_WAIT | SYNC_CLOSE); ASSERT(error != EFSCORRUPTED); } xfs_unmountfs_needed = 1; @@ -725,14 +721,13 @@ xfs_attr_quiesce( xfs_unmountfs_writesb(mp); } -STATIC int +int xfs_mntupdate( - bhv_desc_t *bdp, + struct xfs_mount *mp, int *flags, struct xfs_mount_args *args) { - bhv_vfs_t *vfsp = bhvtovfs(bdp); - xfs_mount_t *mp = XFS_BHVTOM(bdp); + struct bhv_vfs *vfsp = XFS_MTOVFS(mp); if (!(*flags & MS_RDONLY)) { /* rw/ro -> rw */ if (vfsp->vfs_flag & VFS_RDONLY) @@ -842,14 +837,14 @@ fscorrupt_out2: * vpp -- address of the caller's vnode pointer which should be * set to the desired fs root vnode */ -STATIC int +int xfs_root( - bhv_desc_t *bdp, + xfs_mount_t *mp, bhv_vnode_t **vpp) { bhv_vnode_t *vp; - vp = XFS_ITOV((XFS_BHVTOM(bdp))->m_rootip); + vp = XFS_ITOV(mp->m_rootip); VN_HOLD(vp); *vpp = vp; return 0; @@ -862,19 +857,17 @@ xfs_root( * the superblock lock in the mount structure to ensure a consistent * snapshot of the counters returned. */ -STATIC int +int xfs_statvfs( - bhv_desc_t *bdp, + xfs_mount_t *mp, bhv_statvfs_t *statp, bhv_vnode_t *vp) { __uint64_t fakeinos; xfs_extlen_t lsize; - xfs_mount_t *mp; xfs_sb_t *sbp; unsigned long s; - mp = XFS_BHVTOM(bdp); sbp = &(mp->m_sb); statp->f_type = XFS_SB_MAGIC; @@ -953,14 +946,11 @@ xfs_statvfs( * filesystem. * */ -/*ARGSUSED*/ -STATIC int +int xfs_sync( - bhv_desc_t *bdp, - int flags, - cred_t *credp) + xfs_mount_t *mp, + int flags) { - xfs_mount_t *mp = XFS_BHVTOM(bdp); int error; /* @@ -1647,13 +1637,12 @@ xfs_syncsub( /* * xfs_vget - called by DMAPI and NFSD to get vnode from file handle */ -STATIC int +int xfs_vget( - bhv_desc_t *bdp, + xfs_mount_t *mp, bhv_vnode_t **vpp, fid_t *fidp) { - xfs_mount_t *mp = XFS_BHVTOM(bdp); xfs_fid_t *xfid = (struct xfs_fid *)fidp; xfs_inode_t *ip; int error; @@ -1770,14 +1759,14 @@ suffix_strtoul(char *s, char **endp, uns return simple_strtoul((const char *)s, endp, base) << shift_left_factor; } -STATIC int +int xfs_parseargs( - struct bhv_desc *bhv, + struct xfs_mount *mp, char *options, struct xfs_mount_args *args, int update) { - bhv_vfs_t *vfsp = bhvtovfs(bhv); + bhv_vfs_t *vfsp = XFS_MTOVFS(mp); char *this_char, *value, *eov; int dsunit, dswidth, vol_dsunit, vol_dswidth; int iosize; @@ -2028,9 +2017,9 @@ done: return 0; } -STATIC int +int xfs_showargs( - struct bhv_desc *bhv, + struct xfs_mount *mp, struct seq_file *m) { static struct proc_xfs_info { @@ -2048,7 +2037,6 @@ xfs_showargs( { 0, NULL } }; struct proc_xfs_info *xfs_infop; - struct xfs_mount *mp = XFS_BHVTOM(bhv); struct bhv_vfs *vfsp = XFS_MTOVFS(mp); for (xfs_infop = xfs_info; xfs_infop->flag; xfs_infop++) { @@ -2121,30 +2109,10 @@ xfs_showargs( * need to take care of themetadata. Once that's done write a dummy * record to dirty the log in case of a crash while frozen. */ -STATIC void +void xfs_freeze( - bhv_desc_t *bdp) + xfs_mount_t *mp) { - xfs_mount_t *mp = XFS_BHVTOM(bdp); - xfs_attr_quiesce(mp); xfs_fs_log_dummy(mp); } - - -bhv_vfsops_t xfs_vfsops = { - BHV_IDENTITY_INIT(VFS_BHV_XFS,VFS_POSITION_XFS), - .vfs_parseargs = xfs_parseargs, - .vfs_showargs = xfs_showargs, - .vfs_mount = xfs_mount, - .vfs_unmount = xfs_unmount, - .vfs_mntupdate = xfs_mntupdate, - .vfs_root = xfs_root, - .vfs_statvfs = xfs_statvfs, - .vfs_sync = xfs_sync, - .vfs_vget = xfs_vget, - .vfs_get_inode = xfs_get_inode, - .vfs_init_vnode = xfs_initialize_vnode, - .vfs_force_shutdown = xfs_do_force_shutdown, - .vfs_freeze = xfs_freeze, -}; Index: linux-2.6-xfs/fs/xfs/xfs_vfsops.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.6-xfs/fs/xfs/xfs_vfsops.h 2007-08-13 18:07:59.000000000 +0200 @@ -0,0 +1,31 @@ +#ifndef _XFS_VFSOPS_H +#define _XFS_VFSOPS_H 1 + +struct cred; +struct fid; +struct inode; +struct kstatfs; +struct xfs_mount; +struct xfs_mount_args; + +int xfs_mount(struct xfs_mount *mp, struct xfs_mount_args *args, + struct cred *credp); +int xfs_unmount(struct xfs_mount *mp, int flags, struct cred *credp); +int xfs_mntupdate(struct xfs_mount *mp, int *flags, + struct xfs_mount_args *args); +int xfs_root(struct xfs_mount *mp, bhv_vnode_t **vpp); +int xfs_statvfs(struct xfs_mount *mp, struct kstatfs *statp, + bhv_vnode_t *vp); +int xfs_sync(struct xfs_mount *mp, int flags); +int xfs_vget(struct xfs_mount *mp, bhv_vnode_t **vpp, struct fid *fidp); +int xfs_parseargs(struct xfs_mount *mp, char *options, + struct xfs_mount_args *args, int update); +int xfs_showargs(struct xfs_mount *mp, struct seq_file *m); +void xfs_freeze(struct xfs_mount *mp); +void xfs_do_force_shutdown(struct xfs_mount *mp, int flags, char *fname, + int lnnum); +struct inode *xfs_get_inode(struct xfs_mount *mp, xfs_ino_t ino, int flags); +void xfs_initialize_vnode(struct xfs_mount *mp, bhv_vnode_t *vp, + struct xfs_inode *ip, int unlock); + +#endif /* _XFS_VFSOPS_H */ Index: linux-2.6-xfs/fs/xfs/xfs_vfsops_bhv.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.6-xfs/fs/xfs/xfs_vfsops_bhv.c 2007-08-13 18:07:59.000000000 +0200 @@ -0,0 +1,143 @@ + +#include "xfs_linux.h" +#include "xfs_vfsops.h" + +#include "xfs_dmapi.h" +#include "xfs_sb.h" +#include "xfs_log.h" +#include "xfs_trans.h" +#include "xfs_mount.h" + + +STATIC int +xfs_bhv_mount( + struct bhv_desc *bhvp, + struct xfs_mount_args *args, + cred_t *credp) +{ + return xfs_mount(XFS_BHVTOM(bhvp), args, credp); +} + +STATIC int +xfs_bhv_unmount( + bhv_desc_t *bdp, + int flags, + cred_t *credp) +{ + return xfs_unmount(XFS_BHVTOM(bdp), flags, credp); +} + +STATIC int +xfs_bhv_mntupdate( + bhv_desc_t *bdp, + int *flags, + struct xfs_mount_args *args) +{ + return xfs_mntupdate(XFS_BHVTOM(bdp), flags, args); +} + +STATIC int +xfs_bhv_root( + bhv_desc_t *bdp, + bhv_vnode_t **vpp) +{ + return xfs_root(XFS_BHVTOM(bdp), vpp); +} + +STATIC int +xfs_bhv_statvfs( + bhv_desc_t *bdp, + bhv_statvfs_t *statp, + bhv_vnode_t *vp) +{ + return xfs_statvfs(XFS_BHVTOM(bdp), statp, vp); +} + +STATIC int +xfs_bhv_sync( + bhv_desc_t *bdp, + int flags, + cred_t *credp) +{ + return xfs_sync(XFS_BHVTOM(bdp), flags); +} + +STATIC int +xfs_bhv_vget( + bhv_desc_t *bdp, + bhv_vnode_t **vpp, + fid_t *fidp) +{ + return xfs_vget(XFS_BHVTOM(bdp), vpp, fidp); +} + +STATIC int +xfs_bhv_parseargs( + struct bhv_desc *bhv, + char *options, + struct xfs_mount_args *args, + int update) +{ + return xfs_parseargs(XFS_BHVTOM(bhv), options, args, update); +} + +STATIC int +xfs_bhv_showargs( + struct bhv_desc *bhv, + struct seq_file *m) +{ + return xfs_showargs(XFS_BHVTOM(bhv), m); +} + +STATIC void +xfs_bhv_freeze( + bhv_desc_t *bdp) +{ + return xfs_freeze(XFS_BHVTOM(bdp)); +} + +STATIC void +xfs_bhv_force_shutdown( + bhv_desc_t *bdp, + int flags, + char *fname, + int lnnum) +{ + return xfs_do_force_shutdown(XFS_BHVTOM(bdp), flags, fname, lnnum); +} + +STATIC struct inode * +xfs_bhv_get_inode( + bhv_desc_t *bdp, + xfs_ino_t ino, + int flags) +{ + return xfs_get_inode(XFS_BHVTOM(bdp), ino, flags); +} + +STATIC void +xfs_bhv_initialize_vnode( + bhv_desc_t *bdp, + bhv_vnode_t *vp, + struct xfs_inode *ip, + int unlock) +{ + return xfs_initialize_vnode(XFS_BHVTOM(bdp), vp, ip, unlock); +} + +bhv_vfsops_t xfs_vfsops = { + BHV_IDENTITY_INIT(VFS_BHV_XFS,VFS_POSITION_XFS), + .vfs_parseargs = xfs_bhv_parseargs, + .vfs_showargs = xfs_bhv_showargs, + .vfs_mount = xfs_bhv_mount, + .vfs_unmount = xfs_bhv_unmount, + .vfs_mntupdate = xfs_bhv_mntupdate, + .vfs_root = xfs_bhv_root, + .vfs_statvfs = xfs_bhv_statvfs, + .vfs_sync = xfs_bhv_sync, + .vfs_vget = xfs_bhv_vget, + .vfs_get_inode = xfs_bhv_get_inode, + .vfs_init_vnode = xfs_bhv_initialize_vnode, + .vfs_force_shutdown = xfs_bhv_force_shutdown, + .vfs_freeze = xfs_bhv_freeze, +}; From owner-xfs@oss.sgi.com Thu Aug 23 12:39:58 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 12:40:04 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_12, J_CHICKENPOX_21 autolearn=no version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7NJdt4p005008 for ; Thu, 23 Aug 2007 12:39:57 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7NJdpA5008723 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 23 Aug 2007 21:39:51 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7NJdp6O008721 for xfs@oss.sgi.com; Thu, 23 Aug 2007 21:39:51 +0200 Date: Thu, 23 Aug 2007 21:39:51 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH 13/17] call common xfs vnode-level helpers directly and remove vnode operations Message-ID: <20070823193951.GN8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12619 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs Also remove the now dead behavior code. Index: linux-2.6-xfs/fs/xfs/Makefile-linux-2.6 =================================================================== --- linux-2.6-xfs.orig/fs/xfs/Makefile-linux-2.6 2007-08-13 18:07:59.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/Makefile-linux-2.6 2007-08-13 18:08:02.000000000 +0200 @@ -39,7 +39,6 @@ xfs-y += xfs_alloc.o \ xfs_alloc_btree.o \ xfs_attr.o \ xfs_attr_leaf.o \ - xfs_behavior.o \ xfs_bit.o \ xfs_bmap.o \ xfs_bmap_btree.o \ @@ -78,7 +77,6 @@ xfs-y += xfs_alloc.o \ xfs_trans_item.o \ xfs_utils.o \ xfs_vfsops.o \ - xfs_vfsops_bhv.o \ xfs_vnodeops.o \ xfs_rw.o \ xfs_dmops.o \ Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm_fsops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm_fsops.c 2007-08-13 18:07:54.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm_fsops.c 2007-08-13 18:08:02.000000000 +0200 @@ -45,6 +45,7 @@ #include "xfs_attr.h" #include "xfs_inode_item.h" #include "xfs_vnodeops.h" +#include "xfs_vfsops.h" #include #include #include "xfs_dm.h" @@ -64,7 +65,7 @@ xfs_dm_fh_to_inode( dm_fid_t *dmfid) { bhv_vnode_t *vp = NULL; - bhv_vfs_t *vfsp = vfs_from_sb(sb); + xfs_mount_t *mp = XFS_M(sb); int error; fid_t fid; @@ -73,10 +74,10 @@ xfs_dm_fh_to_inode( *ip = NULL; memcpy(&fid, dmfid, sizeof(*dmfid)); if (fid.fid_len) { /* file object handle */ - error = bhv_vfs_vget(vfsp, &vp, &fid); + error = xfs_vget(mp, &vp, &fid); } else { /* filesystem handle */ - error = bhv_vfs_root(vfsp, &vp); + error = xfs_root(mp, &vp); } if (vp && (error == 0)) *ip = vn_to_inode(vp); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_export.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_export.c 2007-08-13 18:07:34.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_export.c 2007-08-13 18:08:02.000000000 +0200 @@ -28,6 +28,7 @@ #include "xfs_vnodeops.h" #include "xfs_bmap_btree.h" #include "xfs_inode.h" +#include "xfs_vfsops.h" static struct dentry dotdot = { .d_name.name = "..", .d_name.len = 2, }; @@ -143,10 +144,9 @@ xfs_fs_get_dentry( bhv_vnode_t *vp; struct inode *inode; struct dentry *result; - bhv_vfs_t *vfsp = vfs_from_sb(sb); int error; - error = bhv_vfs_vget(vfsp, &vp, (fid_t *)data); + error = xfs_vget(XFS_M(sb), &vp, (fid_t *)data); if (error || vp == NULL) return ERR_PTR(-ESTALE) ; Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ksyms.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_ksyms.c 2007-08-13 18:07:56.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ksyms.c 2007-08-13 18:08:02.000000000 +0200 @@ -65,6 +65,7 @@ #include "xfs_iomap.h" #include "xfs_filestream.h" #include "xfs_vnodeops.h" +#include "xfs_vfsops.h" #include "support/ktrace.h" @@ -140,17 +141,6 @@ EXPORT_SYMBOL(xfs_get_buftarg_list); EXPORT_SYMBOL(assfail); EXPORT_SYMBOL(cmn_err); -EXPORT_SYMBOL(bhv_base); -EXPORT_SYMBOL(bhv_get_vfsops); -EXPORT_SYMBOL(bhv_head_destroy); -EXPORT_SYMBOL(bhv_insert); -EXPORT_SYMBOL(bhv_insert_initial); -EXPORT_SYMBOL(bhv_lookup_range); -EXPORT_SYMBOL(bhv_module_init); -EXPORT_SYMBOL(bhv_module_exit); -EXPORT_SYMBOL(bhv_remove_vfsops); -EXPORT_SYMBOL(bhv_remove_all_vfsops); -EXPORT_SYMBOL(bhv_remove_not_first); EXPORT_SYMBOL(xfs_flush_pages); EXPORT_SYMBOL(xfs_flushinval_pages); EXPORT_SYMBOL(xfs_tosspages); @@ -190,18 +180,6 @@ EXPORT_SYMBOL(uuid_getnodeuniq); EXPORT_SYMBOL(uuid_hash64); EXPORT_SYMBOL(uuid_is_nil); EXPORT_SYMBOL(uuid_table_remove); -EXPORT_SYMBOL(vfs_mount); -EXPORT_SYMBOL(vfs_parseargs); -EXPORT_SYMBOL(vfs_showargs); -EXPORT_SYMBOL(vfs_unmount); -EXPORT_SYMBOL(vfs_mntupdate); -EXPORT_SYMBOL(vfs_root); -EXPORT_SYMBOL(vfs_statvfs); -EXPORT_SYMBOL(vfs_sync); -EXPORT_SYMBOL(vfs_vget); -EXPORT_SYMBOL(vfs_get_inode); -EXPORT_SYMBOL(vfs_init_vnode); -EXPORT_SYMBOL(vfs_force_shutdown); EXPORT_SYMBOL(vfs_from_sb); EXPORT_SYMBOL(vn_hold); EXPORT_SYMBOL(vn_initialize); @@ -330,7 +308,6 @@ EXPORT_SYMBOL(xfs_trans_unlocked_item); EXPORT_SYMBOL(xfs_truncate_file); EXPORT_SYMBOL(xfs_unmount_flush); EXPORT_SYMBOL(xfs_unmountfs_writesb); -EXPORT_SYMBOL(xfs_vfsops); EXPORT_SYMBOL(xfs_write_clear_setuid); EXPORT_SYMBOL(xfs_dinode_from_disk); EXPORT_SYMBOL(xfs_sb_from_disk); @@ -338,3 +315,7 @@ EXPORT_SYMBOL(xfs_zero_eof); EXPORT_SYMBOL(xlog_recover_process_iunlinks); EXPORT_SYMBOL(xfs_ichgtime_fast); EXPORT_SYMBOL(xfs_free_eofblocks); + +EXPORT_SYMBOL(xfs_do_force_shutdown); +EXPORT_SYMBOL(xfs_vget); +EXPORT_SYMBOL(xfs_root); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_linux.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_linux.h 2007-08-13 18:04:24.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_linux.h 2007-08-13 18:08:02.000000000 +0200 @@ -83,7 +83,6 @@ #include #include -#include #include #include #include Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_lrw.h 2007-08-13 18:07:43.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.h 2007-08-13 18:08:02.000000000 +0200 @@ -18,7 +18,6 @@ #ifndef __XFS_LRW_H__ #define __XFS_LRW_H__ -struct bhv_desc; struct xfs_mount; struct xfs_iocore; struct xfs_inode; Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_super.c 2007-08-13 18:07:59.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c 2007-08-13 18:08:02.000000000 +0200 @@ -47,6 +47,7 @@ #include "xfs_buf_item.h" #include "xfs_utils.h" #include "xfs_vnodeops.h" +#include "xfs_vfsops.h" #include "xfs_version.h" #include @@ -204,8 +205,7 @@ void xfs_initialize_vnode( struct xfs_mount *mp, bhv_vnode_t *vp, - struct xfs_inode *ip, - int unlock) + struct xfs_inode *ip) { struct inode *inode = vn_to_inode(vp); @@ -221,7 +221,7 @@ xfs_initialize_vnode( * second time once the inode is properly set up, and then we can * finish our work. */ - if (ip->i_d.di_mode != 0 && unlock && (inode->i_state & I_NEW)) { + if (ip->i_d.di_mode != 0 && (inode->i_state & I_NEW)) { xfs_revalidate_inode(mp, vp, ip); xfs_set_inodeops(inode); @@ -232,15 +232,6 @@ xfs_initialize_vnode( } } -struct inode * -xfs_get_inode( - xfs_mount_t *mp, - xfs_ino_t ino, - int flags) -{ - return iget_locked(XFS_MTOVFS(mp)->vfs_super, ino); -} - int xfs_blkdev_get( xfs_mount_t *mp, @@ -542,9 +533,8 @@ vfs_sync_worker( int error; if (!(vfsp->vfs_flag & VFS_RDONLY)) - error = bhv_vfs_sync(vfsp, SYNC_FSDATA | SYNC_BDFLUSH | \ - SYNC_ATTR | SYNC_REFCACHE | SYNC_SUPER, - NULL); + error = xfs_sync(XFS_VFSTOM(vfsp), SYNC_FSDATA | SYNC_BDFLUSH | \ + SYNC_ATTR | SYNC_REFCACHE | SYNC_SUPER); vfsp->vfs_sync_seq++; wake_up(&vfsp->vfs_wait_single_sync_task); } @@ -620,11 +610,12 @@ xfs_fs_put_super( struct super_block *sb) { bhv_vfs_t *vfsp = vfs_from_sb(sb); + struct xfs_mount *mp = XFS_M(sb); int error; xfs_fs_stop_syncd(vfsp); - bhv_vfs_sync(vfsp, SYNC_ATTR | SYNC_DELWRI, NULL); - error = bhv_vfs_unmount(vfsp, 0, NULL); + xfs_sync(mp, SYNC_ATTR | SYNC_DELWRI); + error = xfs_unmount(mp, 0, NULL); if (error) { printk("XFS: unmount got error=%d\n", error); printk("%s: vfs=0x%p left dangling!\n", __FUNCTION__, vfsp); @@ -638,7 +629,7 @@ xfs_fs_write_super( struct super_block *sb) { if (!(sb->s_flags & MS_RDONLY)) - bhv_vfs_sync(vfs_from_sb(sb), SYNC_FSDATA, NULL); + xfs_sync(XFS_M(sb), SYNC_FSDATA); sb->s_dirt = 0; } @@ -648,6 +639,7 @@ xfs_fs_sync_super( int wait) { bhv_vfs_t *vfsp = vfs_from_sb(sb); + struct xfs_mount *mp = XFS_M(sb); int error; int flags; @@ -664,7 +656,7 @@ xfs_fs_sync_super( } else flags = SYNC_FSDATA | (wait ? SYNC_WAIT : 0); - error = bhv_vfs_sync(vfsp, flags, NULL); + error = xfs_sync(mp, flags); sb->s_dirt = 0; if (unlikely(laptop_mode)) { @@ -694,7 +686,7 @@ xfs_fs_statfs( struct dentry *dentry, struct kstatfs *statp) { - return -bhv_vfs_statvfs(vfs_from_sb(dentry->d_sb), statp, + return -xfs_statvfs(XFS_M(dentry->d_sb), statp, vn_from_inode(dentry->d_inode)); } @@ -704,13 +696,13 @@ xfs_fs_remount( int *flags, char *options) { - bhv_vfs_t *vfsp = vfs_from_sb(sb); + struct xfs_mount *mp = XFS_M(sb); struct xfs_mount_args *args = xfs_args_allocate(sb, 0); int error; - error = bhv_vfs_parseargs(vfsp, options, args, 1); + error = xfs_parseargs(mp, options, args, 1); if (!error) - error = bhv_vfs_mntupdate(vfsp, flags, args); + error = xfs_mntupdate(mp, flags, args); kmem_free(args, sizeof(*args)); return -error; } @@ -719,7 +711,7 @@ STATIC void xfs_fs_lockfs( struct super_block *sb) { - bhv_vfs_freeze(vfs_from_sb(sb)); + xfs_freeze(XFS_M(sb)); } STATIC int @@ -727,7 +719,7 @@ xfs_fs_show_options( struct seq_file *m, struct vfsmount *mnt) { - return -bhv_vfs_showargs(vfs_from_sb(mnt->mnt_sb), m); + return -xfs_showargs(XFS_M(mnt->mnt_sb), m); } STATIC int @@ -789,30 +781,29 @@ xfs_fs_fill_super( { struct inode *rootvp; struct bhv_vfs *vfsp = vfs_allocate(sb); + struct xfs_mount *mp = NULL; struct xfs_mount_args *args = xfs_args_allocate(sb, silent); struct kstatfs statvfs; int error; - bhv_insert_all_vfsops(vfsp); + mp = xfs_mount_init(); + mp->m_vfsp = vfsp; + vfsp->vfs_mount = mp; - error = bhv_vfs_parseargs(vfsp, (char *)data, args, 0); - if (error) { - bhv_remove_all_vfsops(vfsp, 1); + error = xfs_parseargs(mp, (char *)data, args, 0); + if (error) goto fail_vfsop; - } sb_min_blocksize(sb, BBSIZE); sb->s_export_op = &xfs_export_operations; sb->s_qcop = &xfs_quotactl_operations; sb->s_op = &xfs_super_operations; - error = bhv_vfs_mount(vfsp, args, NULL); - if (error) { - bhv_remove_all_vfsops(vfsp, 1); + error = xfs_mount(mp, args, NULL); + if (error) goto fail_vfsop; - } - error = bhv_vfs_statvfs(vfsp, &statvfs, NULL); + error = xfs_statvfs(mp, &statvfs, NULL); if (error) goto fail_unmount; @@ -824,7 +815,7 @@ xfs_fs_fill_super( sb->s_time_gran = 1; set_posix_acl_flag(sb); - error = bhv_vfs_root(vfsp, &rootvp); + error = xfs_root(mp, &rootvp); if (error) goto fail_unmount; @@ -854,7 +845,7 @@ fail_vnrele: } fail_unmount: - bhv_vfs_unmount(vfsp, 0, NULL); + xfs_unmount(mp, 0, NULL); fail_vfsop: vfs_deallocate(vfsp); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vfs.c 2007-08-13 18:07:56.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.c 2007-08-13 18:08:02.000000000 +0200 @@ -30,186 +30,6 @@ #include "xfs_mount.h" #include "xfs_quota.h" -int -vfs_mount( - struct bhv_desc *bdp, - struct xfs_mount_args *args, - struct cred *cr) -{ - struct bhv_desc *next = bdp; - - ASSERT(next); - while (! (bhvtovfsops(next))->vfs_mount) - next = BHV_NEXT(next); - return ((*bhvtovfsops(next)->vfs_mount)(next, args, cr)); -} - -int -vfs_parseargs( - struct bhv_desc *bdp, - char *s, - struct xfs_mount_args *args, - int f) -{ - struct bhv_desc *next = bdp; - - ASSERT(next); - while (! (bhvtovfsops(next))->vfs_parseargs) - next = BHV_NEXT(next); - return ((*bhvtovfsops(next)->vfs_parseargs)(next, s, args, f)); -} - -int -vfs_showargs( - struct bhv_desc *bdp, - struct seq_file *m) -{ - struct bhv_desc *next = bdp; - - ASSERT(next); - while (! (bhvtovfsops(next))->vfs_showargs) - next = BHV_NEXT(next); - return ((*bhvtovfsops(next)->vfs_showargs)(next, m)); -} - -int -vfs_unmount( - struct bhv_desc *bdp, - int fl, - struct cred *cr) -{ - struct bhv_desc *next = bdp; - - ASSERT(next); - while (! (bhvtovfsops(next))->vfs_unmount) - next = BHV_NEXT(next); - return ((*bhvtovfsops(next)->vfs_unmount)(next, fl, cr)); -} - -int -vfs_mntupdate( - struct bhv_desc *bdp, - int *fl, - struct xfs_mount_args *args) -{ - struct bhv_desc *next = bdp; - - ASSERT(next); - while (! (bhvtovfsops(next))->vfs_mntupdate) - next = BHV_NEXT(next); - return ((*bhvtovfsops(next)->vfs_mntupdate)(next, fl, args)); -} - -int -vfs_root( - struct bhv_desc *bdp, - bhv_vnode_t **vpp) -{ - struct bhv_desc *next = bdp; - - ASSERT(next); - while (! (bhvtovfsops(next))->vfs_root) - next = BHV_NEXT(next); - return ((*bhvtovfsops(next)->vfs_root)(next, vpp)); -} - -int -vfs_statvfs( - struct bhv_desc *bdp, - bhv_statvfs_t *statp, - bhv_vnode_t *vp) -{ - struct bhv_desc *next = bdp; - - ASSERT(next); - while (! (bhvtovfsops(next))->vfs_statvfs) - next = BHV_NEXT(next); - return ((*bhvtovfsops(next)->vfs_statvfs)(next, statp, vp)); -} - -int -vfs_sync( - struct bhv_desc *bdp, - int fl, - struct cred *cr) -{ - struct bhv_desc *next = bdp; - - ASSERT(next); - while (! (bhvtovfsops(next))->vfs_sync) - next = BHV_NEXT(next); - return ((*bhvtovfsops(next)->vfs_sync)(next, fl, cr)); -} - -int -vfs_vget( - struct bhv_desc *bdp, - bhv_vnode_t **vpp, - struct fid *fidp) -{ - struct bhv_desc *next = bdp; - - ASSERT(next); - while (! (bhvtovfsops(next))->vfs_vget) - next = BHV_NEXT(next); - return ((*bhvtovfsops(next)->vfs_vget)(next, vpp, fidp)); -} - -struct inode * -vfs_get_inode( - struct bhv_desc *bdp, - xfs_ino_t ino, - int fl) -{ - struct bhv_desc *next = bdp; - - while (! (bhvtovfsops(next))->vfs_get_inode) - next = BHV_NEXTNULL(next); - return ((*bhvtovfsops(next)->vfs_get_inode)(next, ino, fl)); -} - -void -vfs_init_vnode( - struct bhv_desc *bdp, - bhv_vnode_t *vp, - struct xfs_inode *ip, - int unlock) -{ - struct bhv_desc *next = bdp; - - ASSERT(next); - while (! (bhvtovfsops(next))->vfs_init_vnode) - next = BHV_NEXT(next); - ((*bhvtovfsops(next)->vfs_init_vnode)(next, vp, ip, unlock)); -} - -void -vfs_force_shutdown( - struct bhv_desc *bdp, - int fl, - char *file, - int line) -{ - struct bhv_desc *next = bdp; - - ASSERT(next); - while (! (bhvtovfsops(next))->vfs_force_shutdown) - next = BHV_NEXT(next); - ((*bhvtovfsops(next)->vfs_force_shutdown)(next, fl, file, line)); -} - -void -vfs_freeze( - struct bhv_desc *bdp) -{ - struct bhv_desc *next = bdp; - - ASSERT(next); - while (! (bhvtovfsops(next))->vfs_freeze) - next = BHV_NEXT(next); - ((*bhvtovfsops(next)->vfs_freeze)(next)); -} - bhv_vfs_t * vfs_allocate( struct super_block *sb) @@ -217,7 +37,6 @@ vfs_allocate( struct bhv_vfs *vfsp; vfsp = kmem_zalloc(sizeof(bhv_vfs_t), KM_SLEEP); - bhv_head_init(VFS_BHVHEAD(vfsp), "vfs"); INIT_LIST_HEAD(&vfsp->vfs_sync_list); spin_lock_init(&vfsp->vfs_sync_lock); init_waitqueue_head(&vfsp->vfs_wait_single_sync_task); @@ -242,180 +61,5 @@ void vfs_deallocate( struct bhv_vfs *vfsp) { - bhv_head_destroy(VFS_BHVHEAD(vfsp)); kmem_free(vfsp, sizeof(bhv_vfs_t)); } - -void -vfs_insertbhv( - struct bhv_vfs *vfsp, - struct bhv_desc *bdp, - struct bhv_vfsops *vfsops, - void *mount) -{ - bhv_desc_init(bdp, mount, vfsp, vfsops); - bhv_insert_initial(&vfsp->vfs_bh, bdp); -} - -/* - * Implementation for behaviours-as-modules - */ - -typedef struct bhv_module_list { - struct list_head bm_list; - struct module * bm_module; - const char * bm_name; - void * bm_ops; -} bhv_module_list_t; - -static DEFINE_SPINLOCK(bhv_lock); -static struct list_head bhv_list = LIST_HEAD_INIT(bhv_list); - -void -bhv_module_init( - const char *name, - struct module *module, - const void *ops) -{ - bhv_module_list_t *bm, *entry, *n; - - bm = kmem_alloc(sizeof(struct bhv_module_list), KM_SLEEP); - INIT_LIST_HEAD(&bm->bm_list); - bm->bm_module = module; - bm->bm_name = name; - bm->bm_ops = (void *)ops; - - spin_lock(&bhv_lock); - list_for_each_entry_safe(entry, n, &bhv_list, bm_list) - BUG_ON(strcmp(entry->bm_name, name) == 0); - list_add(&bm->bm_list, &bhv_list); - spin_unlock(&bhv_lock); -} - -void -bhv_module_exit( - const char *name) -{ - bhv_module_list_t *entry, *n; - - spin_lock(&bhv_lock); - list_for_each_entry_safe(entry, n, &bhv_list, bm_list) - if (strcmp(entry->bm_name, name) == 0) - list_del(&entry->bm_list); - spin_unlock(&bhv_lock); -} - -STATIC void * -bhv_insert_module( - const char *name, - const char *modname) -{ - bhv_module_list_t *entry, *n; - void *ops = NULL; - - spin_lock(&bhv_lock); - list_for_each_entry_safe(entry, n, &bhv_list, bm_list) - if (strcmp(entry->bm_name, name) == 0 && - try_module_get(entry->bm_module)) - ops = entry->bm_ops; - spin_unlock(&bhv_lock); - return ops; -} - -STATIC void -bhv_remove_module( - const char *name) -{ - bhv_module_list_t *entry, *n; - - spin_lock(&bhv_lock); - list_for_each_entry_safe(entry, n, &bhv_list, bm_list) - if (strcmp(entry->bm_name, name) == 0) - module_put(entry->bm_module); - spin_unlock(&bhv_lock); -} - -STATIC void * -bhv_lookup_module( - const char *name, - const char *module) -{ - void *ops; - - ops = bhv_insert_module(name, module); - if (!ops && module) { - request_module("%s", module); - ops = bhv_insert_module(name, module); - } - return ops; -} - -void -bhv_remove_vfsops( - struct bhv_vfs *vfsp, - int pos) -{ - struct bhv_desc *bhv; - - bhv = bhv_lookup_range(&vfsp->vfs_bh, pos, pos); - if (bhv) { - struct bhv_module *bm; - - bm = (bhv_module_t *) BHV_PDATA(bhv); - bhv_remove(&vfsp->vfs_bh, bhv); - bhv_remove_module(bm->bm_name); - kmem_free(bhv, sizeof(*bhv)); - } -} - -void -bhv_remove_all_vfsops( - struct bhv_vfs *vfsp, - int freebase) -{ - struct xfs_mount *mp; - - bhv_remove_vfsops(vfsp, VFS_POSITION_QM); - bhv_remove_vfsops(vfsp, VFS_POSITION_IO); - if (!freebase) - return; - mp = XFS_VFSTOM(vfsp); - VFS_REMOVEBHV(vfsp, &mp->m_bhv); - xfs_mount_free(mp, 0); - kmem_free(mp, sizeof(xfs_mount_t)); -} - -void -bhv_get_vfsops( - struct bhv_vfs *vfsp, - const char *name, - const char *module) -{ - struct bhv_vfsops *ops; - - ops = (struct bhv_vfsops *) bhv_lookup_module(name, module); - if (ops) { - struct bhv_module *bm; - - bm = kmem_alloc(sizeof(struct bhv_module), KM_SLEEP); - bm->bm_name = name; - bhv_desc_init(&bm->bm_desc, bm, vfsp, ops); - bhv_insert(&vfsp->vfs_bh, &bm->bm_desc); - } -} - -void -bhv_insert_all_vfsops( - struct bhv_vfs *vfsp) -{ - struct xfs_mount *mp; - - mp = xfs_mount_init(); - vfs_insertbhv(vfsp, &mp->m_bhv, &xfs_vfsops, mp); - bhv_get_vfsops(vfsp, XFS_DMOPS, - xfs_probe_dmapi ? XFS_DM_MODULE : NULL); - bhv_get_vfsops(vfsp, XFS_QMOPS, - xfs_probe_quota ? XFS_QM_MODULE : NULL); - bhv_get_vfsops(vfsp, XFS_IOOPS, - xfs_probe_ioops ? XFS_IO_MODULE : NULL); -} Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vfs.h 2007-08-13 18:07:56.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.h 2007-08-13 18:08:02.000000000 +0200 @@ -29,6 +29,7 @@ struct cred; struct seq_file; struct super_block; struct xfs_inode; +struct xfs_mount; struct xfs_mount_args; typedef struct kstatfs bhv_statvfs_t; @@ -41,10 +42,10 @@ typedef struct bhv_vfs_sync_work { } bhv_vfs_sync_work_t; typedef struct bhv_vfs { + struct xfs_mount *vfs_mount; u_int vfs_flag; /* flags */ xfs_fsid_t vfs_fsid; /* file system ID */ xfs_fsid_t *vfs_altfsid; /* An ID fixed for life of FS */ - bhv_head_t vfs_bh; /* head of vfs behavior chain */ struct super_block *vfs_super; /* generic superblock pointer */ struct task_struct *vfs_sync_task; /* generalised sync thread */ bhv_vfs_sync_work_t vfs_sync_work; /* work item for VFS_SYNC */ @@ -54,27 +55,6 @@ typedef struct bhv_vfs { wait_queue_head_t vfs_wait_single_sync_task; } bhv_vfs_t; -#define bhvtovfs(bdp) ( (struct bhv_vfs *)BHV_VOBJ(bdp) ) -#define bhvtovfsops(bdp) ( (struct bhv_vfsops *)BHV_OPS(bdp) ) -#define VFS_BHVHEAD(vfs) ( &(vfs)->vfs_bh ) -#define VFS_REMOVEBHV(vfs, bdp) ( bhv_remove(VFS_BHVHEAD(vfs), bdp) ) - -#define VFS_POSITION_BASE BHV_POSITION_BASE /* chain bottom */ -#define VFS_POSITION_TOP BHV_POSITION_TOP /* chain top */ -#define VFS_POSITION_INVALID BHV_POSITION_INVALID /* invalid pos. num */ - -typedef enum { - VFS_BHV_UNKNOWN, /* not specified */ - VFS_BHV_XFS, /* xfs */ - VFS_BHV_QM, /* quota manager */ - VFS_BHV_IO, /* IO path */ - VFS_BHV_END /* housekeeping end-of-range */ -} bhv_vfs_type_t; - -#define VFS_POSITION_XFS (BHV_POSITION_BASE) -#define VFS_POSITION_QM (VFS_POSITION_BASE+20) -#define VFS_POSITION_IO (VFS_POSITION_BASE+30) - #define VFS_RDONLY 0x0001 /* read-only vfs */ #define VFS_GRPID 0x0002 /* group-ID assigned from directory */ #define VFS_DMI 0x0004 /* filesystem has the DMI enabled */ @@ -114,127 +94,11 @@ typedef enum { #define SHUTDOWN_REMOTE_REQ 0x0010 /* shutdown came from remote cell */ #define SHUTDOWN_DEVICE_REQ 0x0020 /* failed all paths to the device */ -typedef int (*vfs_mount_t)(bhv_desc_t *, - struct xfs_mount_args *, struct cred *); -typedef int (*vfs_parseargs_t)(bhv_desc_t *, char *, - struct xfs_mount_args *, int); -typedef int (*vfs_showargs_t)(bhv_desc_t *, struct seq_file *); -typedef int (*vfs_unmount_t)(bhv_desc_t *, int, struct cred *); -typedef int (*vfs_mntupdate_t)(bhv_desc_t *, int *, - struct xfs_mount_args *); -typedef int (*vfs_root_t)(bhv_desc_t *, struct inode **); -typedef int (*vfs_statvfs_t)(bhv_desc_t *, bhv_statvfs_t *, - struct inode *); -typedef int (*vfs_sync_t)(bhv_desc_t *, int, struct cred *); -typedef int (*vfs_vget_t)(bhv_desc_t *, struct inode **, struct fid *); -typedef void (*vfs_init_vnode_t)(bhv_desc_t *, - struct inode *, struct xfs_inode *, int); -typedef void (*vfs_force_shutdown_t)(bhv_desc_t *, int, char *, int); -typedef void (*vfs_freeze_t)(bhv_desc_t *); -typedef struct inode * (*vfs_get_inode_t)(bhv_desc_t *, xfs_ino_t, int); - -typedef struct bhv_vfsops { - bhv_position_t vf_position; /* behavior chain position */ - vfs_mount_t vfs_mount; /* mount file system */ - vfs_parseargs_t vfs_parseargs; /* parse mount options */ - vfs_showargs_t vfs_showargs; /* unparse mount options */ - vfs_unmount_t vfs_unmount; /* unmount file system */ - vfs_mntupdate_t vfs_mntupdate; /* update file system options */ - vfs_root_t vfs_root; /* get root vnode */ - vfs_statvfs_t vfs_statvfs; /* file system statistics */ - vfs_sync_t vfs_sync; /* flush files */ - vfs_vget_t vfs_vget; /* get vnode from fid */ - vfs_get_inode_t vfs_get_inode; /* bhv specific iget */ - vfs_init_vnode_t vfs_init_vnode; /* initialize a new vnode */ - vfs_force_shutdown_t vfs_force_shutdown; /* crash and burn */ - vfs_freeze_t vfs_freeze; /* freeze fs for snapshot */ -} bhv_vfsops_t; - -/* - * Virtual filesystem operations, operating from head bhv. - */ -#define VFSHEAD(v) ((v)->vfs_bh.bh_first) -#define bhv_vfs_mount(v, ma,cr) vfs_mount(VFSHEAD(v), ma,cr) -#define bhv_vfs_parseargs(v, o,ma,f) vfs_parseargs(VFSHEAD(v), o,ma,f) -#define bhv_vfs_showargs(v, m) vfs_showargs(VFSHEAD(v), m) -#define bhv_vfs_unmount(v, f,cr) vfs_unmount(VFSHEAD(v), f,cr) -#define bhv_vfs_mntupdate(v, fl,args) vfs_mntupdate(VFSHEAD(v), fl,args) -#define bhv_vfs_root(v, vpp) vfs_root(VFSHEAD(v), vpp) -#define bhv_vfs_statvfs(v, sp,vp) vfs_statvfs(VFSHEAD(v), sp,vp) -#define bhv_vfs_sync(v, flag,cr) vfs_sync(VFSHEAD(v), flag,cr) -#define bhv_vfs_vget(v, vpp,fidp) vfs_vget(VFSHEAD(v), vpp,fidp) -#define bhv_vfs_get_inode(v, ino, fl) vfs_get_inode(VFSHEAD(v), ino,fl) -#define bhv_vfs_init_vnode(v, vp,b,ul) vfs_init_vnode(VFSHEAD(v), vp,b,ul) -#define bhv_vfs_force_shutdown(v,u,f,l) vfs_force_shutdown(VFSHEAD(v), u,f,l) -#define bhv_vfs_freeze(v) vfs_freeze(VFSHEAD(v)) - -/* - * Virtual filesystem operations, operating from next bhv. - */ -#define bhv_next_vfs_mount(b, ma,cr) vfs_mount(b, ma,cr) -#define bhv_next_vfs_parseargs(b, o,ma,f) vfs_parseargs(b, o,ma,f) -#define bhv_next_vfs_showargs(b, m) vfs_showargs(b, m) -#define bhv_next_vfs_unmount(b, f,cr) vfs_unmount(b, f,cr) -#define bhv_next_vfs_mntupdate(b, fl,args) vfs_mntupdate(b, fl, args) -#define bhv_next_vfs_root(b, vpp) vfs_root(b, vpp) -#define bhv_next_vfs_statvfs(b, sp,vp) vfs_statvfs(b, sp,vp) -#define bhv_next_vfs_sync(b, flag,cr) vfs_sync(b, flag,cr) -#define bhv_next_vfs_vget(b, vpp,fidp) vfs_vget(b, vpp,fidp) -#define bhv_next_vfs_get_inode(b, ino,fl) vfs_get_inode(b, ino,fl) -#define bhv_next_vfs_init_vnode(b, vp,b2,ul) vfs_init_vnode(b, vp,b2,ul) -#define bhv_next_force_shutdown(b, fl,f,l) vfs_force_shutdown(b, fl,f,l) -#define bhv_next_vfs_freeze(b) vfs_freeze(b) - -extern int vfs_mount(bhv_desc_t *, struct xfs_mount_args *, struct cred *); -extern int vfs_parseargs(bhv_desc_t *, char *, struct xfs_mount_args *, int); -extern int vfs_showargs(bhv_desc_t *, struct seq_file *); -extern int vfs_unmount(bhv_desc_t *, int, struct cred *); -extern int vfs_mntupdate(bhv_desc_t *, int *, struct xfs_mount_args *); -extern int vfs_root(bhv_desc_t *, struct inode **); -extern int vfs_statvfs(bhv_desc_t *, bhv_statvfs_t *, struct inode *); -extern int vfs_sync(bhv_desc_t *, int, struct cred *); -extern int vfs_vget(bhv_desc_t *, struct inode **, struct fid *); -extern struct inode *vfs_get_inode(bhv_desc_t *, xfs_ino_t, int); -extern void vfs_init_vnode(bhv_desc_t *, struct inode *, struct xfs_inode *, int); -extern void vfs_force_shutdown(bhv_desc_t *, int, char *, int); -extern void vfs_freeze(bhv_desc_t *); - #define vfs_test_for_freeze(vfs) ((vfs)->vfs_super->s_frozen) #define vfs_wait_for_freeze(vfs,l) vfs_check_frozen((vfs)->vfs_super, (l)) -#define XFS_DMOPS "xfs_dm_operations" /* Data Migration */ -#define XFS_QMOPS "xfs_qm_operations" /* Quota Manager */ -#define XFS_IOOPS "xfs_io_operations" /* I/O subsystem */ -#define XFS_DM_MODULE "xfs_dmapi" -#define XFS_QM_MODULE "xfs_quota" -#define XFS_IO_MODULE "xfs_ioops" - -typedef struct bhv_module_vfsops { - struct bhv_vfsops bhv_common; - void * bhv_custom; -} bhv_module_vfsops_t; - -typedef struct bhv_module { - bhv_desc_t bm_desc; - const char * bm_name; - bhv_module_vfsops_t * bm_ops; -} bhv_module_t; - -#define vfs_bhv_lookup(v, id) (bhv_lookup_range(&(v)->vfs_bh, (id), (id))) -#define vfs_bhv_custom(b) (((bhv_module_vfsops_t*)BHV_OPS(b))->bhv_custom) -#define vfs_bhv_set_custom(b,o) ((b)->bhv_custom = (void *)(o)) -#define vfs_bhv_clr_custom(b) ((b)->bhv_custom = NULL) - extern bhv_vfs_t *vfs_allocate(struct super_block *); extern bhv_vfs_t *vfs_from_sb(struct super_block *); extern void vfs_deallocate(bhv_vfs_t *); -extern void vfs_insertbhv(bhv_vfs_t *, bhv_desc_t *, bhv_vfsops_t *, void *); - -extern void bhv_module_init(const char *, struct module *, const void *); -extern void bhv_module_exit(const char *); -extern void bhv_get_vfsops(struct bhv_vfs *, const char *, const char *); -extern void bhv_insert_all_vfsops(struct bhv_vfs *); -extern void bhv_remove_all_vfsops(struct bhv_vfs *, int); -extern void bhv_remove_vfsops(struct bhv_vfs *, int); #endif /* __XFS_VFS_H__ */ Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vnode.c 2007-08-13 18:07:39.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c 2007-08-13 18:08:02.000000000 +0200 @@ -76,10 +76,8 @@ vn_ioerror( char *f, int l) { - bhv_vfs_t *vfsp = XFS_MTOVFS(ip->i_mount); - if (unlikely(error == -ENODEV)) - bhv_vfs_force_shutdown(vfsp, SHUTDOWN_DEVICE_REQ, f, l); + xfs_do_force_shutdown(ip->i_mount, SHUTDOWN_DEVICE_REQ, f, l); } bhv_vnode_t * Index: linux-2.6-xfs/fs/xfs/xfs_behavior.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_behavior.c 2007-08-13 17:59:06.000000000 +0200 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -1,183 +0,0 @@ -/* - * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. - * All Rights Reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -#include "xfs.h" - -/* - * Source file used to associate/disassociate behaviors with virtualized - * objects. See xfs_behavior.h for more information about behaviors, etc. - * - * The implementation is split between functions in this file and macros - * in xfs_behavior.h. - */ - -/* - * Insert a new behavior descriptor into a behavior chain. - * - * The behavior chain is ordered based on the 'position' number which - * lives in the first field of the ops vector (higher numbers first). - * - * Attempts to insert duplicate ops result in an EINVAL return code. - * Otherwise, return 0 to indicate success. - */ -int -bhv_insert(bhv_head_t *bhp, bhv_desc_t *bdp) -{ - bhv_desc_t *curdesc, *prev; - int position; - - /* - * Validate the position value of the new behavior. - */ - position = BHV_POSITION(bdp); - ASSERT(position >= BHV_POSITION_BASE && position <= BHV_POSITION_TOP); - - /* - * Find location to insert behavior. Check for duplicates. - */ - prev = NULL; - for (curdesc = bhp->bh_first; - curdesc != NULL; - curdesc = curdesc->bd_next) { - - /* Check for duplication. */ - if (curdesc->bd_ops == bdp->bd_ops) { - ASSERT(0); - return EINVAL; - } - - /* Find correct position */ - if (position >= BHV_POSITION(curdesc)) { - ASSERT(position != BHV_POSITION(curdesc)); - break; /* found it */ - } - - prev = curdesc; - } - - if (prev == NULL) { - /* insert at front of chain */ - bdp->bd_next = bhp->bh_first; - bhp->bh_first = bdp; - } else { - /* insert after prev */ - bdp->bd_next = prev->bd_next; - prev->bd_next = bdp; - } - - return 0; -} - -/* - * Remove a behavior descriptor from a position in a behavior chain; - * the position is guaranteed not to be the first position. - * Should only be called by the bhv_remove() macro. - */ -void -bhv_remove_not_first(bhv_head_t *bhp, bhv_desc_t *bdp) -{ - bhv_desc_t *curdesc, *prev; - - ASSERT(bhp->bh_first != NULL); - ASSERT(bhp->bh_first->bd_next != NULL); - - prev = bhp->bh_first; - for (curdesc = bhp->bh_first->bd_next; - curdesc != NULL; - curdesc = curdesc->bd_next) { - - if (curdesc == bdp) - break; /* found it */ - prev = curdesc; - } - - ASSERT(curdesc == bdp); - prev->bd_next = bdp->bd_next; /* remove from after prev */ -} - -/* - * Looks for the first behavior within a specified range of positions. - * Return the associated behavior descriptor. Or NULL, if none found. - */ -bhv_desc_t * -bhv_lookup_range(bhv_head_t *bhp, int low, int high) -{ - bhv_desc_t *curdesc; - - for (curdesc = bhp->bh_first; - curdesc != NULL; - curdesc = curdesc->bd_next) { - - int position = BHV_POSITION(curdesc); - - if (position <= high) { - if (position >= low) - return curdesc; - return NULL; - } - } - - return NULL; -} - -/* - * Return the base behavior in the chain, or NULL if the chain - * is empty. - * - * The caller has not read locked the behavior chain, so acquire the - * lock before traversing the chain. - */ -bhv_desc_t * -bhv_base(bhv_head_t *bhp) -{ - bhv_desc_t *curdesc; - - for (curdesc = bhp->bh_first; - curdesc != NULL; - curdesc = curdesc->bd_next) { - - if (curdesc->bd_next == NULL) { - return curdesc; - } - } - - return NULL; -} - -void -bhv_head_init( - bhv_head_t *bhp, - char *name) -{ - bhp->bh_first = NULL; -} - -void -bhv_insert_initial( - bhv_head_t *bhp, - bhv_desc_t *bdp) -{ - ASSERT(bhp->bh_first == NULL); - (bhp)->bh_first = bdp; -} - -void -bhv_head_destroy( - bhv_head_t *bhp) -{ - ASSERT(bhp->bh_first == NULL); -} Index: linux-2.6-xfs/fs/xfs/xfs_behavior.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_behavior.h 2007-08-13 17:59:06.000000000 +0200 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -1,188 +0,0 @@ -/* - * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. - * All Rights Reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -#ifndef __XFS_BEHAVIOR_H__ -#define __XFS_BEHAVIOR_H__ - -/* - * Header file used to associate behaviors with virtualized objects. - * - * A virtualized object is an internal, virtualized representation of - * OS entities such as persistent files, processes, or sockets. Examples - * of virtualized objects include vnodes, vprocs, and vsockets. Often - * a virtualized object is referred to simply as an "object." - * - * A behavior is essentially an implementation layer associated with - * an object. Multiple behaviors for an object are chained together, - * the order of chaining determining the order of invocation. Each - * behavior of a given object implements the same set of interfaces - * (e.g., the VOP interfaces). - * - * Behaviors may be dynamically inserted into an object's behavior chain, - * such that the addition is transparent to consumers that already have - * references to the object. Typically, a given behavior will be inserted - * at a particular location in the behavior chain. Insertion of new - * behaviors is synchronized with operations-in-progress (oip's) so that - * the oip's always see a consistent view of the chain. - * - * The term "interposition" is used to refer to the act of inserting - * a behavior such that it interposes on (i.e., is inserted in front - * of) a particular other behavior. A key example of this is when a - * system implementing distributed single system image wishes to - * interpose a distribution layer (providing distributed coherency) - * in front of an object that is otherwise only accessed locally. - * - * Note that the traditional vnode/inode combination is simply a virtualized - * object that has exactly one associated behavior. - * - * Behavior synchronization is logic which is necessary under certain - * circumstances that there is no conflict between ongoing operations - * traversing the behavior chain and those dynamically modifying the - * behavior chain. Because behavior synchronization adds extra overhead - * to virtual operation invocation, we want to restrict, as much as - * we can, the requirement for this extra code, to those situations - * in which it is truly necessary. - * - * Behavior synchronization is needed whenever there's at least one class - * of object in the system for which: - * 1) multiple behaviors for a given object are supported, - * -- AND -- - * 2a) insertion of a new behavior can happen dynamically at any time during - * the life of an active object, - * -- AND -- - * 3a) insertion of a new behavior needs to synchronize with existing - * ops-in-progress. - * -- OR -- - * 3b) multiple different behaviors can be dynamically inserted at - * any time during the life of an active object - * -- OR -- - * 3c) removal of a behavior can occur at any time during the life of - * an active object. - * -- OR -- - * 2b) removal of a behavior can occur at any time during the life of an - * active object - * - */ - -struct bhv_head_lock; - -/* - * Behavior head. Head of the chain of behaviors. - * Contained within each virtualized object data structure. - */ -typedef struct bhv_head { - struct bhv_desc *bh_first; /* first behavior in chain */ - struct bhv_head_lock *bh_lockp; /* pointer to lock info struct */ -} bhv_head_t; - -/* - * Behavior descriptor. Descriptor associated with each behavior. - * Contained within the behavior's private data structure. - */ -typedef struct bhv_desc { - void *bd_pdata; /* private data for this behavior */ - void *bd_vobj; /* virtual object associated with */ - void *bd_ops; /* ops for this behavior */ - struct bhv_desc *bd_next; /* next behavior in chain */ -} bhv_desc_t; - -/* - * Behavior identity field. A behavior's identity determines the position - * where it lives within a behavior chain, and it's always the first field - * of the behavior's ops vector. The optional id field further identifies the - * subsystem responsible for the behavior. - */ -typedef struct bhv_identity { - __u16 bi_id; /* owning subsystem id */ - __u16 bi_position; /* position in chain */ -} bhv_identity_t; - -typedef bhv_identity_t bhv_position_t; - -#define BHV_IDENTITY_INIT(id,pos) {id, pos} -#define BHV_IDENTITY_INIT_POSITION(pos) BHV_IDENTITY_INIT(0, pos) - -/* - * Define boundaries of position values. - */ -#define BHV_POSITION_INVALID 0 /* invalid position number */ -#define BHV_POSITION_BASE 1 /* base (last) implementation layer */ -#define BHV_POSITION_TOP 63 /* top (first) implementation layer */ - -/* - * Plumbing macros. - */ -#define BHV_HEAD_FIRST(bhp) (ASSERT((bhp)->bh_first), (bhp)->bh_first) -#define BHV_NEXT(bdp) (ASSERT((bdp)->bd_next), (bdp)->bd_next) -#define BHV_NEXTNULL(bdp) ((bdp)->bd_next) -#define BHV_VOBJ(bdp) (ASSERT((bdp)->bd_vobj), (bdp)->bd_vobj) -#define BHV_VOBJNULL(bdp) ((bdp)->bd_vobj) -#define BHV_PDATA(bdp) (bdp)->bd_pdata -#define BHV_OPS(bdp) (bdp)->bd_ops -#define BHV_IDENTITY(bdp) ((bhv_identity_t *)(bdp)->bd_ops) -#define BHV_POSITION(bdp) (BHV_IDENTITY(bdp)->bi_position) - -extern void bhv_head_init(bhv_head_t *, char *); -extern void bhv_head_destroy(bhv_head_t *); -extern int bhv_insert(bhv_head_t *, bhv_desc_t *); -extern void bhv_insert_initial(bhv_head_t *, bhv_desc_t *); - -/* - * Initialize a new behavior descriptor. - * Arguments: - * bdp - pointer to behavior descriptor - * pdata - pointer to behavior's private data - * vobj - pointer to associated virtual object - * ops - pointer to ops for this behavior - */ -#define bhv_desc_init(bdp, pdata, vobj, ops) \ - { \ - (bdp)->bd_pdata = pdata; \ - (bdp)->bd_vobj = vobj; \ - (bdp)->bd_ops = ops; \ - (bdp)->bd_next = NULL; \ - } - -/* - * Remove a behavior descriptor from a behavior chain. - */ -#define bhv_remove(bhp, bdp) \ - { \ - if ((bhp)->bh_first == (bdp)) { \ - /* \ - * Remove from front of chain. \ - * Atomic wrt oip's. \ - */ \ - (bhp)->bh_first = (bdp)->bd_next; \ - } else { \ - /* remove from non-front of chain */ \ - bhv_remove_not_first(bhp, bdp); \ - } \ - (bdp)->bd_vobj = NULL; \ - } - -/* - * Behavior module prototypes. - */ -extern void bhv_remove_not_first(bhv_head_t *bhp, bhv_desc_t *bdp); -extern bhv_desc_t * bhv_lookup_range(bhv_head_t *bhp, int low, int high); -extern bhv_desc_t * bhv_base(bhv_head_t *bhp); - -/* No bhv locking on Linux */ -#define bhv_base_unlocked bhv_base - -#endif /* __XFS_BEHAVIOR_H__ */ Index: linux-2.6-xfs/fs/xfs/xfs_iget.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_iget.c 2007-08-13 18:07:39.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_iget.c 2007-08-13 18:08:02.000000000 +0200 @@ -353,8 +353,7 @@ finish_inode: * If we have a real type for an on-disk inode, we can set ops(&unlock) * now. If it's a new inode being created, xfs_ialloc will handle it. */ - bhv_vfs_init_vnode(XFS_MTOVFS(mp), vp, ip, 1); - + xfs_initialize_vnode(mp, vp, ip); return 0; } @@ -380,7 +379,8 @@ xfs_iget( XFS_STATS_INC(xs_ig_attempts); retry: - if ((inode = bhv_vfs_get_inode(XFS_MTOVFS(mp), ino, 0))) { + inode = iget_locked(XFS_MTOVFS(mp)->vfs_super, ino); + if (inode) { xfs_inode_t *ip; vp = vn_from_inode(inode); Index: linux-2.6-xfs/fs/xfs/xfs_mount.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_mount.c 2007-08-13 18:07:51.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_mount.c 2007-08-13 18:08:02.000000000 +0200 @@ -157,8 +157,7 @@ xfs_mount_init(void) */ void xfs_mount_free( - xfs_mount_t *mp, - int remove_bhv) + xfs_mount_t *mp) { if (mp->m_perag) { int agno; @@ -186,13 +185,6 @@ xfs_mount_free( if (mp->m_logname != NULL) kmem_free(mp->m_logname, strlen(mp->m_logname) + 1); - if (remove_bhv) { - struct bhv_vfs *vfsp = XFS_MTOVFS(mp); - - bhv_remove_all_vfsops(vfsp, 0); - VFS_REMOVEBHV(vfsp, &mp->m_bhv); - } - xfs_icsb_destroy_counters(mp); } @@ -1284,7 +1276,7 @@ xfs_unmountfs(xfs_mount_t *mp, struct cr xfs_errortag_clearall_umount(fsid, mp->m_fsname, 0); #endif XFS_IODONE(vfsp); - xfs_mount_free(mp, 1); + xfs_mount_free(mp); return 0; } Index: linux-2.6-xfs/fs/xfs/xfs_mount.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_mount.h 2007-08-13 18:07:59.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_mount.h 2007-08-13 18:08:02.000000000 +0200 @@ -64,8 +64,6 @@ struct xfs_extdelta; struct xfs_swapext; struct xfs_mru_cache; -extern struct bhv_vfsops xfs_vfsops; - #define AIL_LOCK_T lock_t #define AIL_LOCKINIT(x,y) spinlock_init(x,y) #define AIL_LOCK_DESTROY(x) spinlock_destroy(x) @@ -330,7 +328,7 @@ extern void xfs_icsb_sync_counters_flags #endif typedef struct xfs_mount { - bhv_desc_t m_bhv; /* vfs xfs behavior */ + struct bhv_vfs *m_vfsp; xfs_tid_t m_tid; /* next unused tid for fs */ AIL_LOCK_T m_ail_lock; /* fs AIL mutex */ xfs_ail_entry_t m_ail; /* fs active log item list */ @@ -527,8 +525,10 @@ xfs_preferred_iosize(xfs_mount_t *mp) #define XFS_LAST_UNMOUNT_WAS_CLEAN(mp) \ ((mp)->m_flags & XFS_MOUNT_WAS_CLEAN) #define XFS_FORCED_SHUTDOWN(mp) ((mp)->m_flags & XFS_MOUNT_FS_SHUTDOWN) +void xfs_do_force_shutdown(struct xfs_mount *mp, int flags, char *fname, + int lnnum); #define xfs_force_shutdown(m,f) \ - bhv_vfs_force_shutdown((XFS_MTOVFS(m)), f, __FILE__, __LINE__) + xfs_do_force_shutdown(m, f, __FILE__, __LINE__) /* * Flags for xfs_mountfs @@ -548,20 +548,13 @@ xfs_preferred_iosize(xfs_mount_t *mp) #define XFS_MTOVFS(mp) xfs_mtovfs(mp) static inline struct bhv_vfs *xfs_mtovfs(xfs_mount_t *mp) { - return bhvtovfs(&mp->m_bhv); -} - -#define XFS_BHVTOM(bdp) xfs_bhvtom(bdp) -static inline xfs_mount_t *xfs_bhvtom(bhv_desc_t *bdp) -{ - return (xfs_mount_t *)BHV_PDATA(bdp); + return mp->m_vfsp; } #define XFS_VFSTOM(vfs) xfs_vfstom(vfs) static inline xfs_mount_t *xfs_vfstom(bhv_vfs_t *vfs) { - return XFS_BHVTOM(bhv_lookup_range(VFS_BHVHEAD(vfs), - VFS_POSITION_XFS, VFS_POSITION_XFS)); + return vfs->vfs_mount; } #define XFS_DADDR_TO_AGNO(mp,d) xfs_daddr_to_agno(mp,d) @@ -633,7 +626,7 @@ typedef struct xfs_mod_sb { extern xfs_mount_t *xfs_mount_init(void); extern void xfs_mod_sb(xfs_trans_t *, __int64_t); extern int xfs_log_sbcount(xfs_mount_t *, uint); -extern void xfs_mount_free(xfs_mount_t *mp, int remove_bhv); +extern void xfs_mount_free(xfs_mount_t *mp); extern int xfs_mountfs(struct bhv_vfs *, xfs_mount_t *mp, int); extern void xfs_mountfs_check_barriers(xfs_mount_t *mp); Index: linux-2.6-xfs/fs/xfs/xfs_vfsops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vfsops.c 2007-08-13 18:07:59.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vfsops.c 2007-08-13 18:08:02.000000000 +0200 @@ -439,7 +439,6 @@ xfs_mount( cred_t *credp) { struct bhv_vfs *vfsp = XFS_MTOVFS(mp); - struct bhv_desc *p; struct block_device *ddev, *logdev, *rtdev; int flags = 0, error; @@ -453,11 +452,7 @@ xfs_mount( if (error) return error; - /* - * Setup xfs_mount function vectors from available behaviors - */ - p = vfs_bhv_lookup(vfsp, VFS_POSITION_IO); - mp->m_io_ops = p ? *(xfs_ioops_t *) vfs_bhv_custom(p) : xfs_iocore_xfs; + mp->m_io_ops = xfs_iocore_xfs; if (args->flags & XFSMNT_QUIET) flags |= XFS_MFSI_QUIET; @@ -740,7 +735,7 @@ xfs_mntupdate( } } else if (!(vfsp->vfs_flag & VFS_RDONLY)) { /* rw -> ro */ xfs_filestream_flush(mp); - bhv_vfs_sync(vfsp, SYNC_DATA_QUIESCE, NULL); + xfs_sync(mp, SYNC_DATA_QUIESCE); xfs_attr_quiesce(mp); vfsp->vfs_flag |= VFS_RDONLY; } Index: linux-2.6-xfs/fs/xfs/xfs_vfsops.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vfsops.h 2007-08-13 18:07:59.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vfsops.h 2007-08-13 18:08:02.000000000 +0200 @@ -24,8 +24,5 @@ int xfs_showargs(struct xfs_mount *mp, s void xfs_freeze(struct xfs_mount *mp); void xfs_do_force_shutdown(struct xfs_mount *mp, int flags, char *fname, int lnnum); -struct inode *xfs_get_inode(struct xfs_mount *mp, xfs_ino_t ino, int flags); -void xfs_initialize_vnode(struct xfs_mount *mp, bhv_vnode_t *vp, - struct xfs_inode *ip, int unlock); #endif /* _XFS_VFSOPS_H */ Index: linux-2.6-xfs/fs/xfs/xfs_vfsops_bhv.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vfsops_bhv.c 2007-08-13 18:07:59.000000000 +0200 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -1,143 +0,0 @@ - -#include "xfs_linux.h" -#include "xfs_vfsops.h" - -#include "xfs_dmapi.h" -#include "xfs_sb.h" -#include "xfs_log.h" -#include "xfs_trans.h" -#include "xfs_mount.h" - - -STATIC int -xfs_bhv_mount( - struct bhv_desc *bhvp, - struct xfs_mount_args *args, - cred_t *credp) -{ - return xfs_mount(XFS_BHVTOM(bhvp), args, credp); -} - -STATIC int -xfs_bhv_unmount( - bhv_desc_t *bdp, - int flags, - cred_t *credp) -{ - return xfs_unmount(XFS_BHVTOM(bdp), flags, credp); -} - -STATIC int -xfs_bhv_mntupdate( - bhv_desc_t *bdp, - int *flags, - struct xfs_mount_args *args) -{ - return xfs_mntupdate(XFS_BHVTOM(bdp), flags, args); -} - -STATIC int -xfs_bhv_root( - bhv_desc_t *bdp, - bhv_vnode_t **vpp) -{ - return xfs_root(XFS_BHVTOM(bdp), vpp); -} - -STATIC int -xfs_bhv_statvfs( - bhv_desc_t *bdp, - bhv_statvfs_t *statp, - bhv_vnode_t *vp) -{ - return xfs_statvfs(XFS_BHVTOM(bdp), statp, vp); -} - -STATIC int -xfs_bhv_sync( - bhv_desc_t *bdp, - int flags, - cred_t *credp) -{ - return xfs_sync(XFS_BHVTOM(bdp), flags); -} - -STATIC int -xfs_bhv_vget( - bhv_desc_t *bdp, - bhv_vnode_t **vpp, - fid_t *fidp) -{ - return xfs_vget(XFS_BHVTOM(bdp), vpp, fidp); -} - -STATIC int -xfs_bhv_parseargs( - struct bhv_desc *bhv, - char *options, - struct xfs_mount_args *args, - int update) -{ - return xfs_parseargs(XFS_BHVTOM(bhv), options, args, update); -} - -STATIC int -xfs_bhv_showargs( - struct bhv_desc *bhv, - struct seq_file *m) -{ - return xfs_showargs(XFS_BHVTOM(bhv), m); -} - -STATIC void -xfs_bhv_freeze( - bhv_desc_t *bdp) -{ - return xfs_freeze(XFS_BHVTOM(bdp)); -} - -STATIC void -xfs_bhv_force_shutdown( - bhv_desc_t *bdp, - int flags, - char *fname, - int lnnum) -{ - return xfs_do_force_shutdown(XFS_BHVTOM(bdp), flags, fname, lnnum); -} - -STATIC struct inode * -xfs_bhv_get_inode( - bhv_desc_t *bdp, - xfs_ino_t ino, - int flags) -{ - return xfs_get_inode(XFS_BHVTOM(bdp), ino, flags); -} - -STATIC void -xfs_bhv_initialize_vnode( - bhv_desc_t *bdp, - bhv_vnode_t *vp, - struct xfs_inode *ip, - int unlock) -{ - return xfs_initialize_vnode(XFS_BHVTOM(bdp), vp, ip, unlock); -} - -bhv_vfsops_t xfs_vfsops = { - BHV_IDENTITY_INIT(VFS_BHV_XFS,VFS_POSITION_XFS), - .vfs_parseargs = xfs_bhv_parseargs, - .vfs_showargs = xfs_bhv_showargs, - .vfs_mount = xfs_bhv_mount, - .vfs_unmount = xfs_bhv_unmount, - .vfs_mntupdate = xfs_bhv_mntupdate, - .vfs_root = xfs_bhv_root, - .vfs_statvfs = xfs_bhv_statvfs, - .vfs_sync = xfs_bhv_sync, - .vfs_vget = xfs_bhv_vget, - .vfs_get_inode = xfs_bhv_get_inode, - .vfs_init_vnode = xfs_bhv_initialize_vnode, - .vfs_force_shutdown = xfs_bhv_force_shutdown, - .vfs_freeze = xfs_bhv_freeze, -}; Index: linux-2.6-xfs/fs/xfs/xfsidbg.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfsidbg.c 2007-08-13 18:07:39.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfsidbg.c 2007-08-13 18:08:02.000000000 +0200 @@ -1752,31 +1752,6 @@ printflags(register uint64_t flags, } -static void printbhv(bhv_desc_t *bdp) -{ - int maxbhv = 20; /* if you get 20 bhvs you're in trouble already */ - kdb_symtab_t symtab; - - if (bdp == NULL) { - kdb_printf("NULL bhv\n"); - return; - } - - kdb_printf("bhv at 0x%p\n", bdp); - while (bdp && maxbhv--) { - if (kdbnearsym((unsigned long)bdp->bd_ops, &symtab)) - kdb_printf(" ops %s", symtab.sym_name); - else - kdb_printf(" ops %s/0x%p", "???", (void *)bdp->bd_ops); - - kdb_printf(" vobj 0x%p pdata 0x%p next 0x%p\n", - bdp->bd_vobj, bdp->bd_pdata, bdp->bd_next); - - bdp = bdp->bd_next; - } -} - - static void printvnode(bhv_vnode_t *vp, unsigned long addr) { kdb_printf("vnode: 0x%lx\n", addr); @@ -1815,34 +1790,6 @@ print_vfs(bhv_vfs_t *vfs, unsigned long kdb_printf("vfsp at 0x%lx", addr); kdb_printf(" vfs_flag 0x%x\n", vfs->vfs_flag); kdb_printf(" vfs_super 0x%p", vfs->vfs_super); - kdb_printf(" vfs_bh 0x%p\n", &vfs->vfs_bh); - - printbhv(VFSHEAD(vfs)); -} - -static int kdbm_bhv( - int argc, - const char **argv) -{ - unsigned long addr; - int nextarg = 1; - long offset = 0; - int diag; - bhv_desc_t *bh; - - if (argc != 1) - return KDB_ARGCOUNT; - - diag = kdbgetaddrarg(argc, argv, &nextarg, &addr, &offset, NULL); - - if (diag) - return diag; - - bh = (bhv_desc_t *)addr; - - printbhv(bh); - - return 0; } static int kdbm_vfs( @@ -2479,7 +2426,6 @@ struct xif { }; static struct xif xfsidbg_funcs[] = { - { "bhv", kdbm_bhv, "", "Dump bhv chain"}, { "vn", kdbm_vn, "", "Dump inode/vnode/trace"}, { "vnode", kdbm_vnode, "", "Dump vnode"}, { "vfs", kdbm_vfs, "", "Dump vfs"}, Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_super.h 2007-08-13 18:07:59.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.h 2007-08-13 18:08:02.000000000 +0200 @@ -76,6 +76,9 @@ struct block_device; extern __uint64_t xfs_max_file_offset(unsigned int); +extern void xfs_initialize_vnode(struct xfs_mount *mp, bhv_vnode_t *vp, + struct xfs_inode *ip); + extern void xfs_flush_inode(struct xfs_inode *); extern void xfs_flush_device(struct xfs_inode *); Index: linux-2.6-xfs/fs/xfs/xfs_inode.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_inode.c 2007-08-13 18:07:37.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_inode.c 2007-08-13 18:08:02.000000000 +0200 @@ -1272,7 +1272,7 @@ xfs_ialloc( xfs_trans_log_inode(tp, ip, flags); /* now that we have an i_mode we can setup inode ops and unlock */ - bhv_vfs_init_vnode(XFS_MTOVFS(tp->t_mountp), vp, ip, 1); + xfs_initialize_vnode(tp->t_mountp, vp, ip); *ipp = ip; return 0; From owner-xfs@oss.sgi.com Thu Aug 23 12:40:03 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 12:40:06 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_64, J_CHICKENPOX_65,J_CHICKENPOX_66 autolearn=no version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7NJe04p005163 for ; Thu, 23 Aug 2007 12:40:03 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7NJdxA5008740 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 23 Aug 2007 21:39:59 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7NJdxmx008738 for xfs@oss.sgi.com; Thu, 23 Aug 2007 21:39:59 +0200 Date: Thu, 23 Aug 2007 21:39:59 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH 14/17] kill the vfs_fsid and vfs_altfsid members in struct bhv_vfs. Message-ID: <20070823193959.GO8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12620 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs vfs_altfsid was just a pointer to mp->m_fixedfsid so we can trivially replace it with the latter. vfs_fsid also was identicaly to m_fixedfsid through rather obsfucated ways so we can kill it aswell and simply it's only user. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm.c 2007-08-13 18:07:54.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c 2007-08-13 18:08:05.000000000 +0200 @@ -1501,7 +1501,7 @@ xfs_dm_get_bulkall_rvp( */ dmb.laststruct = NULL; - memcpy(&dmb.fsid, XFS_MTOVFS(mp)->vfs_altfsid, sizeof(dm_fsid_t)); + memcpy(&dmb.fsid, mp->m_fixedfsid, sizeof(dm_fsid_t)); error = xfs_bulkstat(mp, (xfs_ino_t *)&loc, &nelems, xfs_dm_bulkall_one, (void*)&dmb, statstruct_sz, bufp, BULKSTAT_FG_INLINE, &done); @@ -1597,7 +1597,7 @@ xfs_dm_get_bulkattr_rvp( } dmb.laststruct = NULL; - memcpy(&dmb.fsid, XFS_MTOVFS(mp)->vfs_altfsid, sizeof(dm_fsid_t)); + memcpy(&dmb.fsid, mp->m_fixedfsid, sizeof(dm_fsid_t)); error = xfs_bulkstat(mp, (xfs_ino_t *)&loc, &nelems, xfs_dm_bulkattr_one, (void*)&dmb, statstruct_sz, bufp, BULKSTAT_FG_INLINE, &done); Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm_fsops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm_fsops.c 2007-08-13 18:08:02.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm_fsops.c 2007-08-13 18:08:05.000000000 +0200 @@ -91,20 +91,19 @@ xfs_dm_inode_to_fh( dm_fsid_t *dmfsid) { xfs_inode_t *ip = XFS_I(inode); - bhv_vfs_t *vfsp = XFS_MTOVFS(ip->i_mount); int error; fid_t fid; /* Returns negative errors to DMAPI */ - if (vfsp->vfs_altfsid == NULL) + if (ip->i_mount->m_fixedfsid == NULL) return -EINVAL; error = xfs_fid2(ip, &fid); if (error) return -error; /* Return negative error to DMAPI */ memcpy(dmfid, &fid, sizeof(*dmfid)); - memcpy(dmfsid, vfsp->vfs_altfsid, sizeof(*dmfsid)); + memcpy(dmfsid, ip->i_mount->m_fixedfsid, sizeof(*dmfsid)); return 0; } @@ -121,7 +120,7 @@ xfs_dm_get_fsid( struct super_block *sb, dm_fsid_t *fsid) { - memcpy(fsid, vfs_from_sb(sb)->vfs_altfsid, sizeof(*fsid)); + memcpy(fsid, XFS_M(sb)->m_fixedfsid, sizeof(*fsid)); } /* Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_ioctl.c 2007-08-13 18:07:37.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c 2007-08-13 18:08:05.000000000 +0200 @@ -138,7 +138,7 @@ xfs_find_handle( vp = vn_from_inode(inode); /* now we can grab the fsid */ - memcpy(&handle.ha_fsid, XFS_MTOVFS(XFS_I(inode)->i_mount)->vfs_altfsid, + memcpy(&handle.ha_fsid, XFS_I(inode)->i_mount->m_fixedfsid, sizeof(xfs_fsid_t)); hsize = sizeof(xfs_fsid_t); @@ -966,7 +966,7 @@ xfs_ioctl( if (!capable(CAP_SYS_ADMIN)) return -EPERM; - error = xfs_errortag_clearall(mp); + error = xfs_errortag_clearall(mp, 1); return -error; default: Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vfs.h 2007-08-13 18:08:02.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.h 2007-08-13 18:08:05.000000000 +0200 @@ -44,8 +44,6 @@ typedef struct bhv_vfs_sync_work { typedef struct bhv_vfs { struct xfs_mount *vfs_mount; u_int vfs_flag; /* flags */ - xfs_fsid_t vfs_fsid; /* file system ID */ - xfs_fsid_t *vfs_altfsid; /* An ID fixed for life of FS */ struct super_block *vfs_super; /* generic superblock pointer */ struct task_struct *vfs_sync_task; /* generalised sync thread */ bhv_vfs_sync_work_t vfs_sync_work; /* work item for VFS_SYNC */ Index: linux-2.6-xfs/fs/xfs/xfs_error.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_error.c 2007-08-13 18:04:29.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_error.c 2007-08-13 18:08:05.000000000 +0200 @@ -133,10 +133,14 @@ xfs_errortag_add(int error_tag, xfs_moun } int -xfs_errortag_clearall_umount(int64_t fsid, char *fsname, int loud) +xfs_errortag_clearall(xfs_mount_t *mp, int loud) { - int i; + int64_t fsid; int cleared = 0; + int i; + + memcpy(&fsid, mp->m_fixedfsid, sizeof(xfs_fsid_t)); + for (i = 0; i < XFS_NUM_INJECT_ERROR; i++) { if ((fsid == 0LL || xfs_etest_fsid[i] == fsid) && @@ -155,20 +159,10 @@ xfs_errortag_clearall_umount(int64_t fsi if (loud || cleared) cmn_err(CE_WARN, "Cleared all XFS error tags for filesystem \"%s\"", - fsname); + mp->m_fsname); return 0; } - -int -xfs_errortag_clearall(xfs_mount_t *mp) -{ - int64_t fsid; - - memcpy(&fsid, mp->m_fixedfsid, sizeof(xfs_fsid_t)); - - return xfs_errortag_clearall_umount(fsid, mp->m_fsname, 1); -} #endif /* DEBUG || INDUCE_IO_ERROR */ static void Index: linux-2.6-xfs/fs/xfs/xfs_error.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_error.h 2007-08-13 17:59:05.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_error.h 2007-08-13 18:08:05.000000000 +0200 @@ -144,12 +144,11 @@ extern void xfs_error_test_init(void); #endif /* __ANSI_CPP__ */ extern int xfs_errortag_add(int error_tag, xfs_mount_t *mp); -extern int xfs_errortag_clearall(xfs_mount_t *mp); -extern int xfs_errortag_clearall_umount(int64_t fsid, char *fsname, int loud); +extern int xfs_errortag_clearall(xfs_mount_t *mp, int loud); #else #define XFS_TEST_ERROR(expr, mp, tag, rf) (expr) #define xfs_errortag_add(tag, mp) (ENOSYS) -#define xfs_errortag_clearall(mp) (ENOSYS) +#define xfs_errortag_clearall(mp, loud) (ENOSYS) #endif /* (DEBUG || INDUCE_IO_ERROR) */ /* Index: linux-2.6-xfs/fs/xfs/xfs_mount.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_mount.c 2007-08-13 18:08:02.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_mount.c 2007-08-13 18:08:05.000000000 +0200 @@ -872,14 +872,11 @@ xfs_mountfs( */ if ((mfsi_flags & XFS_MFSI_SECOND) == 0 && (mp->m_flags & XFS_MOUNT_NOUUID) == 0) { - __uint64_t ret64; if (xfs_uuid_mount(mp)) { error = XFS_ERROR(EINVAL); goto error1; } uuid_mounted=1; - ret64 = uuid_hash64(&sbp->sb_uuid); - memcpy(&vfsp->vfs_fsid, &ret64, sizeof(ret64)); } /* @@ -1004,16 +1001,6 @@ xfs_mountfs( */ uuid_getnodeuniq(&sbp->sb_uuid, mp->m_fixedfsid); - /* - * The vfs structure needs to have a file system independent - * way of checking for the invariant file system ID. Since it - * can't look at mount structures it has a pointer to the data - * in the mount structure. - * - * File systems that don't support user level file handles (i.e. - * all of them except for XFS) will leave vfs_altfsid as NULL. - */ - vfsp->vfs_altfsid = (xfs_fsid_t *)mp->m_fixedfsid; mp->m_dmevmask = 0; /* not persistent; set after each mount */ xfs_dir_mount(mp); @@ -1203,9 +1190,6 @@ int xfs_unmountfs(xfs_mount_t *mp, struct cred *cr) { struct bhv_vfs *vfsp = XFS_MTOVFS(mp); -#if defined(DEBUG) || defined(INDUCE_IO_ERROR) - int64_t fsid; -#endif __uint64_t resblks; /* @@ -1269,11 +1253,7 @@ xfs_unmountfs(xfs_mount_t *mp, struct cr xfs_uuid_unmount(mp); #if defined(DEBUG) || defined(INDUCE_IO_ERROR) - /* - * clear all error tags on this filesystem - */ - memcpy(&fsid, &vfsp->vfs_fsid, sizeof(int64_t)); - xfs_errortag_clearall_umount(fsid, mp->m_fsname, 0); + xfs_errortag_clearall(mp, 0); #endif XFS_IODONE(vfsp); xfs_mount_free(mp); From owner-xfs@oss.sgi.com Thu Aug 23 12:40:18 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 12:40:21 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_66 autolearn=no version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7NJeF4p005507 for ; Thu, 23 Aug 2007 12:40:18 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7NJeEA5008777 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 23 Aug 2007 21:40:14 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7NJeEaM008775 for xfs@oss.sgi.com; Thu, 23 Aug 2007 21:40:14 +0200 Date: Thu, 23 Aug 2007 21:40:14 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH 16/17] move syncing related members from struct bhv_vfs to struct xfs_mount Message-ID: <20070823194014.GQ8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12622 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_super.c 2007-08-13 18:08:07.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c 2007-08-13 18:08:10.000000000 +0200 @@ -455,9 +455,9 @@ xfs_fs_clear_inode( */ STATIC void xfs_syncd_queue_work( - struct bhv_vfs *vfs, + struct xfs_mount *mp, void *data, - void (*syncer)(bhv_vfs_t *, void *)) + void (*syncer)(struct xfs_mount *, void *)) { struct bhv_vfs_sync_work *work; @@ -465,11 +465,11 @@ xfs_syncd_queue_work( INIT_LIST_HEAD(&work->w_list); work->w_syncer = syncer; work->w_data = data; - work->w_vfs = vfs; - spin_lock(&vfs->vfs_sync_lock); - list_add_tail(&work->w_list, &vfs->vfs_sync_list); - spin_unlock(&vfs->vfs_sync_lock); - wake_up_process(vfs->vfs_sync_task); + work->w_mount = mp; + spin_lock(&mp->m_sync_lock); + list_add_tail(&work->w_list, &mp->m_sync_list); + spin_unlock(&mp->m_sync_lock); + wake_up_process(mp->m_sync_task); } /* @@ -480,22 +480,22 @@ xfs_syncd_queue_work( */ STATIC void xfs_flush_inode_work( - bhv_vfs_t *vfs, - void *inode) + struct xfs_mount *mp, + void *arg) { - filemap_flush(((struct inode *)inode)->i_mapping); - iput((struct inode *)inode); + struct inode *inode = arg; + filemap_flush(inode->i_mapping); + iput(inode); } void xfs_flush_inode( xfs_inode_t *ip) { - struct inode *inode = vn_to_inode(XFS_ITOV(ip)); - struct bhv_vfs *vfs = XFS_MTOVFS(ip->i_mount); + struct inode *inode = ip->i_vnode; igrab(inode); - xfs_syncd_queue_work(vfs, inode, xfs_flush_inode_work); + xfs_syncd_queue_work(ip->i_mount, inode, xfs_flush_inode_work); delay(msecs_to_jiffies(500)); } @@ -505,11 +505,12 @@ xfs_flush_inode( */ STATIC void xfs_flush_device_work( - bhv_vfs_t *vfs, - void *inode) + struct xfs_mount *mp, + void *arg) { - sync_blockdev(vfs->vfs_super->s_bdev); - iput((struct inode *)inode); + struct inode *inode = arg; + sync_blockdev(mp->m_vfsp->vfs_super->s_bdev); + iput(inode); } void @@ -517,34 +518,33 @@ xfs_flush_device( xfs_inode_t *ip) { struct inode *inode = vn_to_inode(XFS_ITOV(ip)); - struct bhv_vfs *vfs = XFS_MTOVFS(ip->i_mount); igrab(inode); - xfs_syncd_queue_work(vfs, inode, xfs_flush_device_work); + xfs_syncd_queue_work(ip->i_mount, inode, xfs_flush_device_work); delay(msecs_to_jiffies(500)); xfs_log_force(ip->i_mount, (xfs_lsn_t)0, XFS_LOG_FORCE|XFS_LOG_SYNC); } STATIC void -vfs_sync_worker( - bhv_vfs_t *vfsp, +xfs_sync_worker( + struct xfs_mount *mp, void *unused) { int error; - if (!(XFS_VFSTOM(vfsp)->m_flags & XFS_MOUNT_RDONLY)) - error = xfs_sync(XFS_VFSTOM(vfsp), SYNC_FSDATA | SYNC_BDFLUSH | \ - SYNC_ATTR | SYNC_REFCACHE | SYNC_SUPER); - vfsp->vfs_sync_seq++; - wake_up(&vfsp->vfs_wait_single_sync_task); + if (!(mp->m_flags & XFS_MOUNT_RDONLY)) + error = xfs_sync(mp, SYNC_FSDATA | SYNC_BDFLUSH | SYNC_ATTR | + SYNC_REFCACHE | SYNC_SUPER); + mp->m_sync_seq++; + wake_up(&mp->m_wait_single_sync_task); } STATIC int xfssyncd( void *arg) { + struct xfs_mount *mp = arg; long timeleft; - bhv_vfs_t *vfsp = (bhv_vfs_t *) arg; bhv_vfs_sync_work_t *work, *n; LIST_HEAD (tmp); @@ -553,31 +553,31 @@ xfssyncd( timeleft = schedule_timeout_interruptible(timeleft); /* swsusp */ try_to_freeze(); - if (kthread_should_stop() && list_empty(&vfsp->vfs_sync_list)) + if (kthread_should_stop() && list_empty(&mp->m_sync_list)) break; - spin_lock(&vfsp->vfs_sync_lock); + spin_lock(&mp->m_sync_lock); /* * We can get woken by laptop mode, to do a sync - * that's the (only!) case where the list would be * empty with time remaining. */ - if (!timeleft || list_empty(&vfsp->vfs_sync_list)) { + if (!timeleft || list_empty(&mp->m_sync_list)) { if (!timeleft) timeleft = xfs_syncd_centisecs * msecs_to_jiffies(10); - INIT_LIST_HEAD(&vfsp->vfs_sync_work.w_list); - list_add_tail(&vfsp->vfs_sync_work.w_list, - &vfsp->vfs_sync_list); + INIT_LIST_HEAD(&mp->m_sync_work.w_list); + list_add_tail(&mp->m_sync_work.w_list, + &mp->m_sync_list); } - list_for_each_entry_safe(work, n, &vfsp->vfs_sync_list, w_list) + list_for_each_entry_safe(work, n, &mp->m_sync_list, w_list) list_move(&work->w_list, &tmp); - spin_unlock(&vfsp->vfs_sync_lock); + spin_unlock(&mp->m_sync_lock); list_for_each_entry_safe(work, n, &tmp, w_list) { - (*work->w_syncer)(vfsp, work->w_data); + (*work->w_syncer)(mp, work->w_data); list_del(&work->w_list); - if (work == &vfsp->vfs_sync_work) + if (work == &mp->m_sync_work) continue; kmem_free(work, sizeof(struct bhv_vfs_sync_work)); } @@ -586,25 +586,6 @@ xfssyncd( return 0; } -STATIC int -xfs_fs_start_syncd( - bhv_vfs_t *vfsp) -{ - vfsp->vfs_sync_work.w_syncer = vfs_sync_worker; - vfsp->vfs_sync_work.w_vfs = vfsp; - vfsp->vfs_sync_task = kthread_run(xfssyncd, vfsp, "xfssyncd"); - if (IS_ERR(vfsp->vfs_sync_task)) - return -PTR_ERR(vfsp->vfs_sync_task); - return 0; -} - -STATIC void -xfs_fs_stop_syncd( - bhv_vfs_t *vfsp) -{ - kthread_stop(vfsp->vfs_sync_task); -} - STATIC void xfs_fs_put_super( struct super_block *sb) @@ -613,7 +594,8 @@ xfs_fs_put_super( struct xfs_mount *mp = XFS_M(sb); int error; - xfs_fs_stop_syncd(vfsp); + kthread_stop(mp->m_sync_task); + xfs_sync(mp, SYNC_ATTR | SYNC_DELWRI); error = xfs_unmount(mp, 0, NULL); if (error) { @@ -638,7 +620,6 @@ xfs_fs_sync_super( struct super_block *sb, int wait) { - bhv_vfs_t *vfsp = vfs_from_sb(sb); struct xfs_mount *mp = XFS_M(sb); int error; int flags; @@ -660,22 +641,22 @@ xfs_fs_sync_super( sb->s_dirt = 0; if (unlikely(laptop_mode)) { - int prev_sync_seq = vfsp->vfs_sync_seq; + int prev_sync_seq = mp->m_sync_seq; /* * The disk must be active because we're syncing. * We schedule xfssyncd now (now that the disk is * active) instead of later (when it might not be). */ - wake_up_process(vfsp->vfs_sync_task); + wake_up_process(mp->m_sync_task); /* * We have to wait for the sync iteration to complete. * If we don't, the disk activity caused by the sync * will come after the sync is completed, and that * triggers another sync from laptop mode. */ - wait_event(vfsp->vfs_wait_single_sync_task, - vfsp->vfs_sync_seq != prev_sync_seq); + wait_event(mp->m_wait_single_sync_task, + mp->m_sync_seq != prev_sync_seq); } return -error; @@ -787,6 +768,11 @@ xfs_fs_fill_super( int error; mp = xfs_mount_init(); + + INIT_LIST_HEAD(&mp->m_sync_list); + spin_lock_init(&mp->m_sync_lock); + init_waitqueue_head(&mp->m_wait_single_sync_task); + mp->m_vfsp = vfsp; vfsp->vfs_mount = mp; @@ -831,8 +817,15 @@ xfs_fs_fill_super( error = EINVAL; goto fail_vnrele; } - if ((error = xfs_fs_start_syncd(vfsp))) + + mp->m_sync_work.w_syncer = xfs_sync_worker; + mp->m_sync_work.w_mount = mp; + mp->m_sync_task = kthread_run(xfssyncd, mp, "xfssyncd"); + if (IS_ERR(mp->m_sync_task)) { + error = -PTR_ERR(mp->m_sync_task); goto fail_vnrele; + } + vn_trace_exit(XFS_I(sb->s_root->d_inode), __FUNCTION__, (inst_t *)__return_address); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vfs.c 2007-08-13 18:08:07.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.c 2007-08-13 18:08:10.000000000 +0200 @@ -37,9 +37,6 @@ vfs_allocate( struct bhv_vfs *vfsp; vfsp = kmem_zalloc(sizeof(bhv_vfs_t), KM_SLEEP); - INIT_LIST_HEAD(&vfsp->vfs_sync_list); - spin_lock_init(&vfsp->vfs_sync_lock); - init_waitqueue_head(&vfsp->vfs_wait_single_sync_task); vfsp->vfs_super = sb; sb->s_fs_info = vfsp; Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vfs.h 2007-08-13 18:08:07.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.h 2007-08-13 18:08:10.000000000 +0200 @@ -36,20 +36,14 @@ typedef struct kstatfs bhv_statvfs_t; typedef struct bhv_vfs_sync_work { struct list_head w_list; - struct bhv_vfs *w_vfs; + struct xfs_mount *w_mount; void *w_data; /* syncer routine argument */ - void (*w_syncer)(struct bhv_vfs *, void *); + void (*w_syncer)(struct xfs_mount *, void *); } bhv_vfs_sync_work_t; typedef struct bhv_vfs { struct xfs_mount *vfs_mount; struct super_block *vfs_super; /* generic superblock pointer */ - struct task_struct *vfs_sync_task; /* generalised sync thread */ - bhv_vfs_sync_work_t vfs_sync_work; /* work item for VFS_SYNC */ - struct list_head vfs_sync_list; /* sync thread work item list */ - spinlock_t vfs_sync_lock; /* work item list lock */ - int vfs_sync_seq; /* sync thread generation no. */ - wait_queue_head_t vfs_wait_single_sync_task; } bhv_vfs_t; #define SYNC_ATTR 0x0001 /* sync attributes */ Index: linux-2.6-xfs/fs/xfs/xfs_mount.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_mount.h 2007-08-13 18:08:07.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_mount.h 2007-08-13 18:08:10.000000000 +0200 @@ -433,6 +433,12 @@ typedef struct xfs_mount { struct mutex m_icsb_mutex; /* balancer sync lock */ #endif struct xfs_mru_cache *m_filestream; /* per-mount filestream data */ + struct task_struct *m_sync_task; /* generalised sync thread */ + bhv_vfs_sync_work_t m_sync_work; /* work item for VFS_SYNC */ + struct list_head m_sync_list; /* sync thread work item list */ + spinlock_t m_sync_lock; /* work item list lock */ + int m_sync_seq; /* sync thread generation no. */ + wait_queue_head_t m_wait_single_sync_task; } xfs_mount_t; /* From owner-xfs@oss.sgi.com Thu Aug 23 12:40:12 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 12:40:15 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_64 autolearn=no version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7NJe94p005335 for ; Thu, 23 Aug 2007 12:40:11 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7NJe7A5008761 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 23 Aug 2007 21:40:07 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7NJe7up008759 for xfs@oss.sgi.com; Thu, 23 Aug 2007 21:40:07 +0200 Date: Thu, 23 Aug 2007 21:40:07 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH 15/17] kill the vfs_flags member in struct bhv_vfs Message-ID: <20070823194006.GP8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12621 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs All flags are added to xfs_mount's m_flag instead. Note that the 32bit inode flag was duplicated in both of them, but only cleared in the mount when it was not nessecary due to the filesystem beeing small enough. Thus this patch introduces a slight behavior change in that the 32bit inodes option is only present in the /proc//mounts output if actually nessecary but not if it was on the command line but isn't actually in effect. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm.c 2007-08-23 14:57:46.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c 2007-08-23 14:57:56.000000000 +0200 @@ -3199,7 +3199,7 @@ xfs_dm_send_mmap_event( ASSERT(vp); if (!S_ISREG(vma->vm_file->f_dentry->d_inode->i_mode) || - !(XFS_MTOVFS(ip->i_mount)->vfs_flag & VFS_DMI)) + !(ip->i_mount->m_flags & XFS_MOUNT_DMAPI)) return 0; /* If they specifically asked for 'read', then give it to them. Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_file.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_file.c 2007-08-23 14:44:59.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_file.c 2007-08-23 14:57:56.000000000 +0200 @@ -234,10 +234,10 @@ xfs_vm_nopage( int *type) { struct inode *inode = area->vm_file->f_path.dentry->d_inode; - bhv_vfs_t *vfsp = vfs_from_sb(inode->i_sb); + struct xfs_mount *mp = XFS_M(inode->i_sb); - ASSERT_ALWAYS(vfsp->vfs_flag & VFS_DMI); - if (XFS_SEND_MMAP(XFS_VFSTOM(vfsp), area, 0)) + ASSERT_ALWAYS(mp->m_flags & XFS_MOUNT_DMAPI); + if (XFS_SEND_MMAP(mp, area, 0)) return NULL; return filemap_nopage(area, address, type); } @@ -282,7 +282,7 @@ xfs_file_mmap( vma->vm_ops = &xfs_file_vm_ops; #ifdef HAVE_DMAPI - if (vfs_from_sb(filp->f_path.dentry->d_inode->i_sb)->vfs_flag & VFS_DMI) + if (XFS_M(filp->f_path.dentry->d_inode->i_sb)->m_flags & XFS_MOUNT_DMAPI) vma->vm_ops = &xfs_dmapi_file_vm_ops; #endif /* HAVE_DMAPI */ @@ -340,13 +340,13 @@ xfs_vm_mprotect( unsigned int newflags) { struct inode *inode = vma->vm_file->f_path.dentry->d_inode; - bhv_vfs_t *vfsp = vfs_from_sb(inode->i_sb); + struct xfs_mount *mp = XFS_M(inode->i_sb); int error = 0; - if (vfsp->vfs_flag & VFS_DMI) { + if (mp->m_flags & XFS_MOUNT_DMAPI) { if ((vma->vm_flags & VM_MAYSHARE) && (newflags & VM_WRITE) && !(vma->vm_flags & VM_WRITE)) - error = XFS_SEND_MMAP(XFS_VFSTOM(vfsp), vma, VM_WRITE); + error = XFS_SEND_MMAP(mp, vma, VM_WRITE); } return error; } @@ -363,13 +363,13 @@ STATIC int xfs_file_open_exec( struct inode *inode) { - bhv_vfs_t *vfsp = vfs_from_sb(inode->i_sb); + struct xfs_mount *mp = XFS_M(inode->i_sb); - if (unlikely(vfsp->vfs_flag & VFS_DMI)) { + if (unlikely(mp->m_flags & XFS_MOUNT_DMAPI)) { if (DM_EVENT_ENABLED(XFS_I(inode), DM_EVENT_READ)) { bhv_vnode_t *vp = vn_from_inode(inode); - return -XFS_SEND_DATA(XFS_VFSTOM(vfsp), DM_EVENT_READ, + return -XFS_SEND_DATA(mp, DM_EVENT_READ, vp, 0, 0, 0, NULL); } } Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vfs.h 2007-08-23 14:57:46.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.h 2007-08-23 14:57:56.000000000 +0200 @@ -43,7 +43,6 @@ typedef struct bhv_vfs_sync_work { typedef struct bhv_vfs { struct xfs_mount *vfs_mount; - u_int vfs_flag; /* flags */ struct super_block *vfs_super; /* generic superblock pointer */ struct task_struct *vfs_sync_task; /* generalised sync thread */ bhv_vfs_sync_work_t vfs_sync_work; /* work item for VFS_SYNC */ @@ -53,13 +52,6 @@ typedef struct bhv_vfs { wait_queue_head_t vfs_wait_single_sync_task; } bhv_vfs_t; -#define VFS_RDONLY 0x0001 /* read-only vfs */ -#define VFS_GRPID 0x0002 /* group-ID assigned from directory */ -#define VFS_DMI 0x0004 /* filesystem has the DMI enabled */ -/* ---- VFS_UMOUNT ---- 0x0008 -- unneeded, fixed via kthread APIs */ -#define VFS_32BITINODES 0x0010 /* do not use inums above 32 bits */ -#define VFS_END 0x0010 /* max flag */ - #define SYNC_ATTR 0x0001 /* sync attributes */ #define SYNC_CLOSE 0x0002 /* close file system down */ #define SYNC_DELWRI 0x0004 /* look at delayed writes */ Index: linux-2.6-xfs/fs/xfs/xfs_dmapi.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_dmapi.h 2007-08-23 14:54:07.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_dmapi.h 2007-08-23 14:57:56.000000000 +0200 @@ -69,7 +69,7 @@ typedef enum { /* Defines for determining if an event message should be sent. */ #ifdef HAVE_DMAPI #define DM_EVENT_ENABLED(ip, event) ( \ - unlikely (XFS_MTOVFS((ip)->i_mount)->vfs_flag & VFS_DMI) && \ + unlikely ((ip)->i_mount->m_flags & XFS_MOUNT_DMAPI) && \ ( ((ip)->i_d.di_dmevmask & (1 << event)) || \ ((ip)->i_mount->m_dmevmask & (1 << event)) ) \ ) Index: linux-2.6-xfs/fs/xfs/xfs_mount.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_mount.h 2007-08-23 14:57:45.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_mount.h 2007-08-23 14:57:56.000000000 +0200 @@ -442,7 +442,7 @@ typedef struct xfs_mount { must be synchronous except for space allocations */ #define XFS_MOUNT_INO64 (1ULL << 1) - /* (1ULL << 2) -- currently unused */ +#define XFS_MOUNT_DMAPI (1ULL << 2) /* dmapi is enabled */ #define XFS_MOUNT_WAS_CLEAN (1ULL << 3) #define XFS_MOUNT_FS_SHUTDOWN (1ULL << 4) /* atomic stop of all filesystem operations, typically for @@ -452,7 +452,7 @@ typedef struct xfs_mount { #define XFS_MOUNT_NOALIGN (1ULL << 7) /* turn off stripe alignment allocations */ #define XFS_MOUNT_ATTR2 (1ULL << 8) /* allow use of attr2 format */ - /* (1ULL << 9) -- currently unused */ +#define XFS_MOUNT_GRPID (1ULL << 9) /* group-ID assigned from directory */ #define XFS_MOUNT_NORECOVERY (1ULL << 10) /* no recovery - dirty fs */ #define XFS_MOUNT_SHARED (1ULL << 11) /* shared mount */ #define XFS_MOUNT_DFLT_IOSIZE (1ULL << 12) /* set default i/o size */ @@ -460,7 +460,7 @@ typedef struct xfs_mount { /* osyncisdsync is now default*/ #define XFS_MOUNT_32BITINODES (1ULL << 14) /* do not create inodes above * 32 bits in size */ - /* (1ULL << 15) -- currently unused */ +#define XFS_MOUNT_RDONLY (1ULL << 15) /* read-only vfs */ #define XFS_MOUNT_NOUUID (1ULL << 16) /* ignore uuid during mount */ #define XFS_MOUNT_BARRIER (1ULL << 17) #define XFS_MOUNT_IDELETE (1ULL << 18) /* delete empty inode clusters*/ Index: linux-2.6-xfs/fs/xfs/xfs_vfsops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vfsops.c 2007-08-23 14:57:45.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vfsops.c 2007-08-23 14:58:23.000000000 +0200 @@ -307,7 +307,7 @@ xfs_start_flags( * no recovery flag requires a read-only mount */ if (ap->flags & XFSMNT_NORECOVERY) { - if (!(vfs->vfs_flag & VFS_RDONLY)) { + if (!(mp->m_flags & XFS_MOUNT_RDONLY)) { cmn_err(CE_WARN, "XFS: tried to mount a FS read-write without recovery!"); return XFS_ERROR(EINVAL); @@ -326,7 +326,7 @@ xfs_start_flags( mp->m_flags |= XFS_MOUNT_FILESTREAMS; if (ap->flags & XFSMNT_DMAPI) - vfs->vfs_flag |= VFS_DMI; + mp->m_flags |= XFS_MOUNT_DMAPI; return 0; } @@ -340,7 +340,7 @@ xfs_finish_flags( struct xfs_mount_args *ap, struct xfs_mount *mp) { - int ronly = (vfs->vfs_flag & VFS_RDONLY); + int ronly = (mp->m_flags & XFS_MOUNT_RDONLY); /* Fail a mount where the logbuf is smaller then the log stripe */ if (XFS_SB_VERSION_HASLOGV2(&mp->m_sb)) { @@ -589,7 +589,7 @@ xfs_unmount( rvp = XFS_ITOV(rip); #ifdef HAVE_DMAPI - if (vfsp->vfs_flag & VFS_DMI) { + if (mp->m_flags & XFS_MOUNT_DMAPI) { error = XFS_SEND_PREUNMOUNT(mp, vfsp, rvp, DM_RIGHT_NULL, rvp, DM_RIGHT_NULL, NULL, NULL, 0, 0, @@ -723,22 +723,20 @@ xfs_mntupdate( int *flags, struct xfs_mount_args *args) { - struct bhv_vfs *vfsp = XFS_MTOVFS(mp); - if (!(*flags & MS_RDONLY)) { /* rw/ro -> rw */ - if (vfsp->vfs_flag & VFS_RDONLY) - vfsp->vfs_flag &= ~VFS_RDONLY; + if (mp->m_flags & XFS_MOUNT_RDONLY) + mp->m_flags &= ~XFS_MOUNT_RDONLY; if (args->flags & XFSMNT_BARRIER) { mp->m_flags |= XFS_MOUNT_BARRIER; xfs_mountfs_check_barriers(mp); } else { mp->m_flags &= ~XFS_MOUNT_BARRIER; } - } else if (!(vfsp->vfs_flag & VFS_RDONLY)) { /* rw -> ro */ + } else if (!(mp->m_flags & XFS_MOUNT_RDONLY)) { /* rw -> ro */ xfs_filestream_flush(mp); xfs_sync(mp, SYNC_DATA_QUIESCE); xfs_attr_quiesce(mp); - vfsp->vfs_flag |= VFS_RDONLY; + mp->m_flags |= XFS_MOUNT_RDONLY; } return 0; } @@ -1049,7 +1047,7 @@ xfs_sync_inodes( if (bypassed) *bypassed = 0; - if (XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY) + if (mp->m_flags & XFS_MOUNT_RDONLY) return 0; error = 0; last_error = 0; @@ -1762,7 +1760,6 @@ xfs_parseargs( struct xfs_mount_args *args, int update) { - bhv_vfs_t *vfsp = XFS_MTOVFS(mp); char *this_char, *value, *eov; int dsunit, dswidth, vol_dsunit, vol_dswidth; int iosize; @@ -1844,10 +1841,10 @@ xfs_parseargs( args->iosizelog = ffs(iosize) - 1; } else if (!strcmp(this_char, MNTOPT_GRPID) || !strcmp(this_char, MNTOPT_BSDGROUPS)) { - vfsp->vfs_flag |= VFS_GRPID; + mp->m_flags |= XFS_MOUNT_GRPID; } else if (!strcmp(this_char, MNTOPT_NOGRPID) || !strcmp(this_char, MNTOPT_SYSVGROUPS)) { - vfsp->vfs_flag &= ~VFS_GRPID; + mp->m_flags &= ~XFS_MOUNT_GRPID; } else if (!strcmp(this_char, MNTOPT_WSYNC)) { args->flags |= XFSMNT_WSYNC; } else if (!strcmp(this_char, MNTOPT_OSYNCISOSYNC)) { @@ -1954,7 +1951,7 @@ xfs_parseargs( } if (args->flags & XFSMNT_NORECOVERY) { - if ((vfsp->vfs_flag & VFS_RDONLY) == 0) { + if ((mp->m_flags & XFS_MOUNT_RDONLY) == 0) { cmn_err(CE_WARN, "XFS: no-recovery mounts must be read-only."); return EINVAL; @@ -2006,8 +2003,6 @@ xfs_parseargs( } done: - if (args->flags & XFSMNT_32BITINODES) - vfsp->vfs_flag |= VFS_32BITINODES; if (args->flags2) args->flags |= XFSMNT_FLAGS2; return 0; @@ -2033,7 +2028,6 @@ xfs_showargs( { 0, NULL } }; struct proc_xfs_info *xfs_infop; - struct bhv_vfs *vfsp = XFS_MTOVFS(mp); for (xfs_infop = xfs_info; xfs_infop->flag; xfs_infop++) { if (mp->m_flags & xfs_infop->flag) @@ -2066,9 +2060,9 @@ xfs_showargs( if (!(mp->m_flags & XFS_MOUNT_COMPAT_IOSIZE)) seq_printf(m, "," MNTOPT_LARGEIO); - if (!(vfsp->vfs_flag & VFS_32BITINODES)) + if (!(mp->m_flags & XFS_MOUNT_32BITINODES)) seq_printf(m, "," MNTOPT_64BITINODE); - if (vfsp->vfs_flag & VFS_GRPID) + if (mp->m_flags & XFS_MOUNT_GRPID) seq_printf(m, "," MNTOPT_GRPID); if (mp->m_qflags & XFS_UQUOTA_ACCT) { @@ -2095,7 +2089,7 @@ xfs_showargs( if (!(mp->m_qflags & XFS_ALL_QUOTA_ACCT)) seq_puts(m, "," MNTOPT_NOQUOTA); - if (vfsp->vfs_flag & VFS_DMI) + if (mp->m_flags & XFS_MOUNT_DMAPI) seq_puts(m, "," MNTOPT_DMAPI); return 0; } Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_export.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_export.c 2007-08-23 14:57:45.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_export.c 2007-08-23 14:57:56.000000000 +0200 @@ -102,9 +102,7 @@ xfs_fs_encode_fh( int len; int is64 = 0; #if XFS_BIG_INUMS - bhv_vfs_t *vfs = vfs_from_sb(inode->i_sb); - - if (!(vfs->vfs_flag & VFS_32BITINODES)) { + if (!(XFS_M(inode->i_sb)->m_flags & XFS_MOUNT_32BITINODES)) { /* filesystem may contain 64bit inode numbers */ is64 = XFS_FILEID_TYPE_64FLAG; } Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_super.c 2007-08-23 14:57:45.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c 2007-08-23 14:57:56.000000000 +0200 @@ -532,7 +532,7 @@ vfs_sync_worker( { int error; - if (!(vfsp->vfs_flag & VFS_RDONLY)) + if (!(XFS_VFSTOM(vfsp)->m_flags & XFS_MOUNT_RDONLY)) error = xfs_sync(XFS_VFSTOM(vfsp), SYNC_FSDATA | SYNC_BDFLUSH | \ SYNC_ATTR | SYNC_REFCACHE | SYNC_SUPER); vfsp->vfs_sync_seq++; @@ -790,6 +790,9 @@ xfs_fs_fill_super( mp->m_vfsp = vfsp; vfsp->vfs_mount = mp; + if (sb->s_flags & MS_RDONLY) + mp->m_flags |= XFS_MOUNT_RDONLY; + error = xfs_parseargs(mp, (char *)data, args, 0); if (error) goto fail_vfsop; Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vfs.c 2007-08-23 14:57:45.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.c 2007-08-23 14:57:56.000000000 +0200 @@ -44,9 +44,6 @@ vfs_allocate( vfsp->vfs_super = sb; sb->s_fs_info = vfsp; - if (sb->s_flags & MS_RDONLY) - vfsp->vfs_flag |= VFS_RDONLY; - return vfsp; } Index: linux-2.6-xfs/fs/xfs/quota/xfs_qm.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/quota/xfs_qm.c 2007-08-23 14:57:38.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/quota/xfs_qm.c 2007-08-23 14:57:56.000000000 +0200 @@ -2413,8 +2413,7 @@ xfs_qm_vop_dqalloc( lockflags = XFS_ILOCK_EXCL; xfs_ilock(ip, lockflags); - if ((flags & XFS_QMOPT_INHERIT) && - XFS_INHERIT_GID(ip, XFS_MTOVFS(mp))) + if ((flags & XFS_QMOPT_INHERIT) && XFS_INHERIT_GID(ip)) gid = ip->i_d.di_gid; /* Index: linux-2.6-xfs/fs/xfs/quota/xfs_qm_syscalls.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/quota/xfs_qm_syscalls.c 2007-08-23 14:57:38.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/quota/xfs_qm_syscalls.c 2007-08-23 14:57:56.000000000 +0200 @@ -86,10 +86,8 @@ xfs_qm_quotactl( int id, xfs_caddr_t addr) { - bhv_vfs_t *vfsp = XFS_MTOVFS(mp); int error; - ASSERT(addr != NULL || cmd == Q_XQUOTASYNC); /* @@ -102,7 +100,7 @@ xfs_qm_quotactl( */ if (XFS_IS_QUOTA_ON(mp)) return XFS_ERROR(EINVAL); - if (vfsp->vfs_flag & VFS_RDONLY) + if (mp->m_flags & XFS_MOUNT_RDONLY) return XFS_ERROR(EROFS); return (xfs_qm_scall_trunc_qfiles(mp, xfs_qm_import_qtype_flags(*(uint *)addr))); @@ -118,13 +116,13 @@ xfs_qm_quotactl( * QUOTAON - enabling quota enforcement. * Quota accounting must be turned on at mount time. */ - if (vfsp->vfs_flag & VFS_RDONLY) + if (mp->m_flags & XFS_MOUNT_RDONLY) return XFS_ERROR(EROFS); return (xfs_qm_scall_quotaon(mp, xfs_qm_import_flags(*(uint *)addr))); case Q_XQUOTAOFF: - if (vfsp->vfs_flag & VFS_RDONLY) + if (mp->m_flags & XFS_MOUNT_RDONLY) return XFS_ERROR(EROFS); break; @@ -140,7 +138,7 @@ xfs_qm_quotactl( switch (cmd) { case Q_XQUOTAOFF: - if (vfsp->vfs_flag & VFS_RDONLY) + if (mp->m_flags & XFS_MOUNT_RDONLY) return XFS_ERROR(EROFS); error = xfs_qm_scall_quotaoff(mp, xfs_qm_import_flags(*(uint *)addr), @@ -161,19 +159,19 @@ xfs_qm_quotactl( break; case Q_XSETQLIM: - if (vfsp->vfs_flag & VFS_RDONLY) + if (mp->m_flags & XFS_MOUNT_RDONLY) return XFS_ERROR(EROFS); error = xfs_qm_scall_setqlim(mp, (xfs_dqid_t)id, XFS_DQ_USER, (fs_disk_quota_t *)addr); break; case Q_XSETGQLIM: - if (vfsp->vfs_flag & VFS_RDONLY) + if (mp->m_flags & XFS_MOUNT_RDONLY) return XFS_ERROR(EROFS); error = xfs_qm_scall_setqlim(mp, (xfs_dqid_t)id, XFS_DQ_GROUP, (fs_disk_quota_t *)addr); break; case Q_XSETPQLIM: - if (vfsp->vfs_flag & VFS_RDONLY) + if (mp->m_flags & XFS_MOUNT_RDONLY) return XFS_ERROR(EROFS); error = xfs_qm_scall_setqlim(mp, (xfs_dqid_t)id, XFS_DQ_PROJ, (fs_disk_quota_t *)addr); Index: linux-2.6-xfs/fs/xfs/xfs_inode.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_inode.c 2007-08-23 14:57:45.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_inode.c 2007-08-23 14:57:56.000000000 +0200 @@ -1158,7 +1158,7 @@ xfs_ialloc( if ((prid != 0) && (ip->i_d.di_version == XFS_DINODE_VERSION_1)) xfs_bump_ino_vers2(tp, ip); - if (pip && XFS_INHERIT_GID(pip, XFS_MTOVFS(pip->i_mount))) { + if (pip && XFS_INHERIT_GID(pip)) { ip->i_d.di_gid = pip->i_d.di_gid; if ((pip->i_d.di_mode & S_ISGID) && (mode & S_IFMT) == S_IFDIR) { ip->i_d.di_mode |= S_ISGID; Index: linux-2.6-xfs/fs/xfs/xfs_inode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_inode.h 2007-08-23 14:54:05.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_inode.h 2007-08-23 14:57:56.000000000 +0200 @@ -480,8 +480,9 @@ xfs_iflags_test(xfs_inode_t *ip, unsigne * directory, group of new file is set to that of the parent, and * new subdirectory gets S_ISGID bit from parent. */ -#define XFS_INHERIT_GID(pip, vfsp) \ - (((vfsp)->vfs_flag & VFS_GRPID) || ((pip)->i_d.di_mode & S_ISGID)) +#define XFS_INHERIT_GID(pip) \ + (((pip)->i_mount->m_flags & XFS_MOUNT_GRPID) || \ + ((pip)->i_d.di_mode & S_ISGID)) /* * Flags for xfs_iget() Index: linux-2.6-xfs/fs/xfs/xfs_log.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_log.c 2007-08-23 14:39:43.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_log.c 2007-08-23 14:57:56.000000000 +0200 @@ -509,7 +509,7 @@ xfs_log_mount(xfs_mount_t *mp, cmn_err(CE_NOTE, "!Mounting filesystem \"%s\" in no-recovery mode. Filesystem will be inconsistent.", mp->m_fsname); - ASSERT(XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY); + ASSERT(mp->m_flags & XFS_MOUNT_RDONLY); } mp->m_log = xlog_alloc_log(mp, log_target, blk_offset, num_bblks); @@ -519,16 +519,15 @@ xfs_log_mount(xfs_mount_t *mp, * just worked. */ if (!(mp->m_flags & XFS_MOUNT_NORECOVERY)) { - bhv_vfs_t *vfsp = XFS_MTOVFS(mp); - int error, readonly = (vfsp->vfs_flag & VFS_RDONLY); + int error, readonly = (mp->m_flags & XFS_MOUNT_RDONLY); if (readonly) - vfsp->vfs_flag &= ~VFS_RDONLY; + mp->m_flags &= ~XFS_MOUNT_RDONLY; error = xlog_recover(mp->m_log); if (readonly) - vfsp->vfs_flag |= VFS_RDONLY; + mp->m_flags |= XFS_MOUNT_RDONLY; if (error) { cmn_err(CE_WARN, "XFS: log mount/recovery failed: error %d", error); xlog_dealloc_log(mp->m_log); @@ -560,7 +559,7 @@ xfs_log_mount_finish(xfs_mount_t *mp, in error = xlog_recover_finish(mp->m_log, mfsi_flags); else { error = 0; - ASSERT(XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY); + ASSERT(mp->m_flags & XFS_MOUNT_RDONLY); } return error; @@ -620,7 +619,7 @@ xfs_log_unmount_write(xfs_mount_t *mp) * Don't write out unmount record on read-only mounts. * Or, if we are doing a forced umount (typically because of IO errors). */ - if (XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY) + if (mp->m_flags & XFS_MOUNT_RDONLY) return 0; xfs_log_force(mp, 0, XFS_LOG_FORCE|XFS_LOG_SYNC); Index: linux-2.6-xfs/fs/xfs/xfs_mount.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_mount.c 2007-08-23 14:57:46.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_mount.c 2007-08-23 14:57:56.000000000 +0200 @@ -348,11 +348,8 @@ xfs_initialize_perag( /* Clear the mount flag if no inode can overflow 32 bits * on this filesystem, or if specifically requested.. */ - if ((vfs->vfs_flag & VFS_32BITINODES) && ino > max_inum) { - mp->m_flags |= XFS_MOUNT_32BITINODES; - } else { + if (!((mp->m_flags & XFS_MOUNT_32BITINODES) && ino > max_inum)) mp->m_flags &= ~XFS_MOUNT_32BITINODES; - } /* If we can overflow then setup the ag headers accordingly */ if (mp->m_flags & XFS_MOUNT_32BITINODES) { @@ -1113,7 +1110,7 @@ xfs_mountfs( * If fs is not mounted readonly, then update the superblock * unit and width changes. */ - if (update_flags && !(vfsp->vfs_flag & VFS_RDONLY)) + if (update_flags && !(mp->m_flags & XFS_MOUNT_RDONLY)) xfs_mount_log_sbunit(mp, update_flags); /* @@ -1286,7 +1283,7 @@ xfs_fs_writable(xfs_mount_t *mp) bhv_vfs_t *vfsp = XFS_MTOVFS(mp); return !(vfs_test_for_freeze(vfsp) || XFS_FORCED_SHUTDOWN(mp) || - (vfsp->vfs_flag & VFS_RDONLY)); + (mp->m_flags & XFS_MOUNT_RDONLY)); } /* @@ -1364,7 +1361,7 @@ xfs_unmountfs_writesb(xfs_mount_t *mp) * skip superblock write if fs is read-only, or * if we are doing a forced umount. */ - if (!(XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY || + if (!((mp->m_flags & XFS_MOUNT_RDONLY) || XFS_FORCED_SHUTDOWN(mp))) { sbp = xfs_getsb(mp, 0); Index: linux-2.6-xfs/fs/xfs/xfs_qmops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_qmops.c 2007-08-23 14:57:38.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_qmops.c 2007-08-23 14:57:56.000000000 +0200 @@ -66,7 +66,7 @@ xfs_mount_reset_sbqflags(xfs_mount_t *mp * if the fs is readonly, let the incore superblock run * with quotas off but don't flush the update out to disk */ - if (XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY) + if (mp->m_flags & XFS_MOUNT_RDONLY) return 0; #ifdef QUOTADEBUG xfs_fs_cmn_err(CE_NOTE, mp, "Writing superblock quota changes"); Index: linux-2.6-xfs/fs/xfs/xfs_vnodeops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vnodeops.c 2007-08-23 14:54:01.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vnodeops.c 2007-08-23 14:57:56.000000000 +0200 @@ -230,7 +230,7 @@ xfs_setattr( vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); - if (XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY) + if (mp->m_flags & XFS_MOUNT_RDONLY) return XFS_ERROR(EROFS); /* @@ -1512,7 +1512,7 @@ xfs_release( return 0; /* If this is a read-only mount, don't do this (would generate I/O) */ - if (XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY) + if (mp->m_flags & XFS_MOUNT_RDONLY) return 0; if (!XFS_FORCED_SHUTDOWN(mp)) { @@ -1626,7 +1626,7 @@ xfs_inactive( error = 0; /* If this is a read-only mount, don't do this (would generate I/O) */ - if (XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY) + if (mp->m_flags & XFS_MOUNT_RDONLY) goto out; if (ip->i_d.di_nlink != 0) { Index: linux-2.6-xfs/fs/xfs/xfsidbg.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfsidbg.c 2007-08-23 14:57:45.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfsidbg.c 2007-08-23 14:57:56.000000000 +0200 @@ -1788,7 +1788,6 @@ static void print_vfs(bhv_vfs_t *vfs, unsigned long addr) { kdb_printf("vfsp at 0x%lx", addr); - kdb_printf(" vfs_flag 0x%x\n", vfs->vfs_flag); kdb_printf(" vfs_super 0x%p", vfs->vfs_super); } From owner-xfs@oss.sgi.com Thu Aug 23 12:40:27 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 12:40:30 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_25, J_CHICKENPOX_42,J_CHICKENPOX_52 autolearn=no version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7NJeN4p005674 for ; Thu, 23 Aug 2007 12:40:26 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7NJeKA5008802 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 23 Aug 2007 21:40:21 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7NJeKpt008800 for xfs@oss.sgi.com; Thu, 23 Aug 2007 21:40:20 +0200 Date: Thu, 23 Aug 2007 21:40:20 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH 17/17] kill struct bhv_vfs Message-ID: <20070823194020.GR8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12623 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs Now that struct bhv_vfs doesn't have any members left we can kill it and go directly from the super_block to the xfs_mount everywhere. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/xfs_fsops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_fsops.c 2007-08-23 14:39:44.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_fsops.c 2007-08-23 14:59:51.000000000 +0200 @@ -174,7 +174,7 @@ xfs_growfs_data_private( memset(&mp->m_perag[oagcount], 0, (nagcount - oagcount) * sizeof(xfs_perag_t)); mp->m_flags |= XFS_MOUNT_32BITINODES; - nagimax = xfs_initialize_perag(XFS_MTOVFS(mp), mp, nagcount); + nagimax = xfs_initialize_perag(mp, nagcount); up_write(&mp->m_peraglock); } tp = xfs_trans_alloc(mp, XFS_TRANS_GROWFS); @@ -626,8 +626,7 @@ xfs_fs_goingdown( { switch (inflags) { case XFS_FSOP_GOING_FLAGS_DEFAULT: { - struct bhv_vfs *vfsp = XFS_MTOVFS(mp); - struct super_block *sb = freeze_bdev(vfsp->vfs_super->s_bdev); + struct super_block *sb = freeze_bdev(mp->m_super->s_bdev); if (sb && !IS_ERR(sb)) { xfs_force_shutdown(mp, SHUTDOWN_FORCE_UMOUNT); Index: linux-2.6-xfs/fs/xfs/xfs_iocore.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_iocore.c 2007-08-23 02:29:33.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_iocore.c 2007-08-23 14:59:51.000000000 +0200 @@ -57,11 +57,11 @@ xfs_size_fn( STATIC int xfs_ioinit( - struct bhv_vfs *vfsp, + struct xfs_mount *mp, struct xfs_mount_args *mntargs, int flags) { - return xfs_mountfs(vfsp, XFS_VFSTOM(vfsp), flags); + return xfs_mountfs(mp, flags); } xfs_ioops_t xfs_iocore_xfs = { Index: linux-2.6-xfs/fs/xfs/xfs_mount.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_mount.c 2007-08-23 14:57:56.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_mount.c 2007-08-23 14:59:51.000000000 +0200 @@ -330,7 +330,6 @@ xfs_mount_validate_sb( xfs_agnumber_t xfs_initialize_perag( - bhv_vfs_t *vfs, xfs_mount_t *mp, xfs_agnumber_t agcount) { @@ -742,7 +741,6 @@ xfs_initialize_perag_data(xfs_mount_t *m */ int xfs_mountfs( - bhv_vfs_t *vfsp, xfs_mount_t *mp, int mfsi_flags) { @@ -1019,7 +1017,7 @@ xfs_mountfs( mp->m_perag = kmem_zalloc(sbp->sb_agcount * sizeof(xfs_perag_t), KM_SLEEP); - mp->m_maxagi = xfs_initialize_perag(vfsp, mp, sbp->sb_agcount); + mp->m_maxagi = xfs_initialize_perag(mp, sbp->sb_agcount); /* * log's mount-time initialization. Perform 1st part recovery if needed @@ -1186,7 +1184,6 @@ xfs_mountfs( int xfs_unmountfs(xfs_mount_t *mp, struct cred *cr) { - struct bhv_vfs *vfsp = XFS_MTOVFS(mp); __uint64_t resblks; /* @@ -1252,7 +1249,7 @@ xfs_unmountfs(xfs_mount_t *mp, struct cr #if defined(DEBUG) || defined(INDUCE_IO_ERROR) xfs_errortag_clearall(mp, 0); #endif - XFS_IODONE(vfsp); + XFS_IODONE(mp); xfs_mount_free(mp); return 0; } @@ -1280,9 +1277,7 @@ xfs_unmountfs_wait(xfs_mount_t *mp) int xfs_fs_writable(xfs_mount_t *mp) { - bhv_vfs_t *vfsp = XFS_MTOVFS(mp); - - return !(vfs_test_for_freeze(vfsp) || XFS_FORCED_SHUTDOWN(mp) || + return !(xfs_test_for_freeze(mp) || XFS_FORCED_SHUTDOWN(mp) || (mp->m_flags & XFS_MOUNT_RDONLY)); } Index: linux-2.6-xfs/fs/xfs/xfs_mount.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_mount.h 2007-08-23 14:59:49.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_mount.h 2007-08-23 14:59:51.000000000 +0200 @@ -54,7 +54,6 @@ typedef struct xfs_trans_reservations { #else struct cred; struct log; -struct bhv_vfs; struct xfs_mount_args; struct xfs_inode; struct xfs_iocore; @@ -79,13 +78,13 @@ typedef int (*xfs_send_data_t)(int, bhv_ xfs_off_t, size_t, int, bhv_vrwlock_t *); typedef int (*xfs_send_mmap_t)(struct vm_area_struct *, uint); typedef int (*xfs_send_destroy_t)(bhv_vnode_t *, dm_right_t); -typedef int (*xfs_send_namesp_t)(dm_eventtype_t, struct bhv_vfs *, +typedef int (*xfs_send_namesp_t)(dm_eventtype_t, struct xfs_mount *, bhv_vnode_t *, dm_right_t, bhv_vnode_t *, dm_right_t, char *, char *, mode_t, int, int); typedef int (*xfs_send_mount_t)(struct xfs_mount *, dm_right_t, char *, char *); -typedef void (*xfs_send_unmount_t)(struct bhv_vfs *, bhv_vnode_t *, +typedef void (*xfs_send_unmount_t)(struct xfs_mount *, bhv_vnode_t *, dm_right_t, mode_t, int, int); typedef struct xfs_dmops { @@ -105,12 +104,12 @@ typedef struct xfs_dmops { (*(mp)->m_dm_ops->xfs_send_destroy)(vp,right) #define XFS_SEND_NAMESP(mp, ev,b1,r1,b2,r2,n1,n2,mode,rval,fl) \ (*(mp)->m_dm_ops->xfs_send_namesp)(ev,NULL,b1,r1,b2,r2,n1,n2,mode,rval,fl) -#define XFS_SEND_PREUNMOUNT(mp, vfs,b1,r1,b2,r2,n1,n2,mode,rval,fl) \ - (*(mp)->m_dm_ops->xfs_send_namesp)(DM_EVENT_PREUNMOUNT,vfs,b1,r1,b2,r2,n1,n2,mode,rval,fl) +#define XFS_SEND_PREUNMOUNT(mp,b1,r1,b2,r2,n1,n2,mode,rval,fl) \ + (*(mp)->m_dm_ops->xfs_send_namesp)(DM_EVENT_PREUNMOUNT,mp,b1,r1,b2,r2,n1,n2,mode,rval,fl) #define XFS_SEND_MOUNT(mp,right,path,name) \ (*(mp)->m_dm_ops->xfs_send_mount)(mp,right,path,name) -#define XFS_SEND_UNMOUNT(mp, vfsp,vp,right,mode,rval,fl) \ - (*(mp)->m_dm_ops->xfs_send_unmount)(vfsp,vp,right,mode,rval,fl) +#define XFS_SEND_UNMOUNT(mp, vp,right,mode,rval,fl) \ + (*(mp)->m_dm_ops->xfs_send_unmount)(mp,vp,right,mode,rval,fl) /* @@ -202,7 +201,7 @@ typedef struct xfs_qmops { * Prototypes and functions for I/O core modularization. */ -typedef int (*xfs_ioinit_t)(struct bhv_vfs *, +typedef int (*xfs_ioinit_t)(struct xfs_mount *, struct xfs_mount_args *, int); typedef int (*xfs_bmapi_t)(struct xfs_trans *, void *, xfs_fileoff_t, xfs_filblks_t, int, @@ -232,7 +231,7 @@ typedef void (*xfs_lock_demote_t)(void typedef int (*xfs_lock_nowait_t)(void *, uint); typedef void (*xfs_unlk_t)(void *, unsigned int); typedef xfs_fsize_t (*xfs_size_t)(void *); -typedef xfs_fsize_t (*xfs_iodone_t)(struct bhv_vfs *); +typedef xfs_fsize_t (*xfs_iodone_t)(struct xfs_mount *); typedef int (*xfs_swap_extents_t)(void *, void *, struct xfs_swapext*); @@ -255,8 +254,8 @@ typedef struct xfs_ioops { xfs_swap_extents_t xfs_swap_extents_func; } xfs_ioops_t; -#define XFS_IOINIT(vfsp, args, flags) \ - (*(mp)->m_io_ops.xfs_ioinit)(vfsp, args, flags) +#define XFS_IOINIT(mp, args, flags) \ + (*(mp)->m_io_ops.xfs_ioinit)(mp, args, flags) #define XFS_BMAPI(mp, trans,io,bno,len,f,first,tot,mval,nmap,flist,delta) \ (*(mp)->m_io_ops.xfs_bmapi_func) \ (trans,(io)->io_obj,bno,len,f,first,tot,mval,nmap,flist,delta) @@ -290,8 +289,8 @@ typedef struct xfs_ioops { (*(mp)->m_io_ops.xfs_ilock_demote)((io)->io_obj, mode) #define XFS_SIZE(mp, io) \ (*(mp)->m_io_ops.xfs_size_func)((io)->io_obj) -#define XFS_IODONE(vfsp) \ - (*(mp)->m_io_ops.xfs_iodone)(vfsp) +#define XFS_IODONE(mp) \ + (*(mp)->m_io_ops.xfs_iodone)(mp) #define XFS_SWAP_EXTENTS(mp, io, tio, sxp) \ (*(mp)->m_io_ops.xfs_swap_extents_func) \ ((io)->io_obj, (tio)->io_obj, sxp) @@ -328,7 +327,7 @@ extern void xfs_icsb_sync_counters_flags #endif typedef struct xfs_mount { - struct bhv_vfs *m_vfsp; + struct super_block *m_super; xfs_tid_t m_tid; /* next unused tid for fs */ AIL_LOCK_T m_ail_lock; /* fs AIL mutex */ xfs_ail_entry_t m_ail; /* fs active log item list */ @@ -548,21 +547,6 @@ void xfs_do_force_shutdown(struct xfs_mo /* XFS_MFSI_CONVERT_SUNIT */ #define XFS_MFSI_QUIET 0x40 /* Be silent if mount errors found */ -/* - * Macros for getting from mount to vfs and back. - */ -#define XFS_MTOVFS(mp) xfs_mtovfs(mp) -static inline struct bhv_vfs *xfs_mtovfs(xfs_mount_t *mp) -{ - return mp->m_vfsp; -} - -#define XFS_VFSTOM(vfs) xfs_vfstom(vfs) -static inline xfs_mount_t *xfs_vfstom(bhv_vfs_t *vfs) -{ - return vfs->vfs_mount; -} - #define XFS_DADDR_TO_AGNO(mp,d) xfs_daddr_to_agno(mp,d) static inline xfs_agnumber_t xfs_daddr_to_agno(struct xfs_mount *mp, xfs_daddr_t d) @@ -633,7 +617,7 @@ extern xfs_mount_t *xfs_mount_init(void) extern void xfs_mod_sb(xfs_trans_t *, __int64_t); extern int xfs_log_sbcount(xfs_mount_t *, uint); extern void xfs_mount_free(xfs_mount_t *mp); -extern int xfs_mountfs(struct bhv_vfs *, xfs_mount_t *mp, int); +extern int xfs_mountfs(xfs_mount_t *mp, int); extern void xfs_mountfs_check_barriers(xfs_mount_t *mp); extern int xfs_unmountfs(xfs_mount_t *, struct cred *); @@ -651,8 +635,7 @@ extern void xfs_freesb(xfs_mount_t *); extern int xfs_fs_writable(xfs_mount_t *); extern int xfs_syncsub(xfs_mount_t *, int, int *); extern int xfs_sync_inodes(xfs_mount_t *, int, int *); -extern xfs_agnumber_t xfs_initialize_perag(struct bhv_vfs *, xfs_mount_t *, - xfs_agnumber_t); +extern xfs_agnumber_t xfs_initialize_perag(xfs_mount_t *, xfs_agnumber_t); extern void xfs_sb_from_disk(struct xfs_sb *, struct xfs_dsb *); extern void xfs_sb_to_disk(struct xfs_dsb *, struct xfs_sb *, __int64_t); extern int xfs_sb_validate_fsb_count(struct xfs_sb *, __uint64_t); Index: linux-2.6-xfs/fs/xfs/xfs_vfsops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vfsops.c 2007-08-23 14:58:23.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vfsops.c 2007-08-23 14:59:51.000000000 +0200 @@ -211,7 +211,6 @@ xfs_cleanup(void) */ STATIC int xfs_start_flags( - struct bhv_vfs *vfs, struct xfs_mount_args *ap, struct xfs_mount *mp) { @@ -336,7 +335,6 @@ xfs_start_flags( */ STATIC int xfs_finish_flags( - struct bhv_vfs *vfs, struct xfs_mount_args *ap, struct xfs_mount *mp) { @@ -438,11 +436,10 @@ xfs_mount( struct xfs_mount_args *args, cred_t *credp) { - struct bhv_vfs *vfsp = XFS_MTOVFS(mp); struct block_device *ddev, *logdev, *rtdev; int flags = 0, error; - ddev = vfsp->vfs_super->s_bdev; + ddev = mp->m_super->s_bdev; logdev = rtdev = NULL; error = xfs_dmops_get(mp, args); @@ -510,13 +507,13 @@ xfs_mount( /* * Setup flags based on mount(2) options and then the superblock */ - error = xfs_start_flags(vfsp, args, mp); + error = xfs_start_flags(args, mp); if (error) goto error1; error = xfs_readsb(mp, flags); if (error) goto error1; - error = xfs_finish_flags(vfsp, args, mp); + error = xfs_finish_flags(args, mp); if (error) goto error2; @@ -547,7 +544,7 @@ xfs_mount( if ((error = xfs_filestream_mount(mp))) goto error2; - error = XFS_IOINIT(vfsp, args, flags); + error = XFS_IOINIT(mp, args, flags); if (error) goto error2; @@ -577,7 +574,6 @@ xfs_unmount( int flags, cred_t *credp) { - bhv_vfs_t *vfsp = XFS_MTOVFS(mp); xfs_inode_t *rip; bhv_vnode_t *rvp; int unmount_event_wanted = 0; @@ -590,7 +586,7 @@ xfs_unmount( #ifdef HAVE_DMAPI if (mp->m_flags & XFS_MOUNT_DMAPI) { - error = XFS_SEND_PREUNMOUNT(mp, vfsp, + error = XFS_SEND_PREUNMOUNT(mp, rvp, DM_RIGHT_NULL, rvp, DM_RIGHT_NULL, NULL, NULL, 0, 0, (mp->m_dmevmask & (1<vfs_super); -} - -static int kdbm_vfs( - int argc, - const char **argv) -{ - unsigned long addr; - int nextarg = 1; - long offset = 0; - int diag; - bhv_vfs_t vfs; - - if (argc != 1) - return KDB_ARGCOUNT; - - diag = kdbgetaddrarg(argc, argv, &nextarg, &addr, &offset, NULL); - - if (diag) - return diag; - - if ((diag = kdb_getarea(vfs, addr))) - return diag; - - print_vfs(&vfs, addr); - - return 0; -} - - #ifdef XFS_VNODE_TRACE /* * Print a vnode trace entry. @@ -2427,7 +2393,6 @@ struct xif { static struct xif xfsidbg_funcs[] = { { "vn", kdbm_vn, "", "Dump inode/vnode/trace"}, { "vnode", kdbm_vnode, "", "Dump vnode"}, - { "vfs", kdbm_vfs, "", "Dump vfs"}, #ifdef XFS_VNODE_TRACE { "vntrace", kdbm_vntrace, "", "Dump vnode Trace"}, { "vntraceaddr", kdbm_vntraceaddr, "", @@ -6503,8 +6468,8 @@ xfsidbg_xmount(xfs_mount_t *mp) }; kdb_printf("xfs_mount at 0x%p\n", mp); - kdb_printf("vfsp 0x%p tid 0x%x ail_lock 0x%p &ail 0x%p\n", - XFS_MTOVFS(mp), mp->m_tid, &mp->m_ail_lock, &mp->m_ail); + kdb_printf("tid 0x%x ail_lock 0x%p &ail 0x%p\n", + mp->m_tid, &mp->m_ail_lock, &mp->m_ail); kdb_printf("ail_gen 0x%x &sb 0x%p\n", mp->m_ail_gen, &mp->m_sb); kdb_printf("sb_lock 0x%p sb_bp 0x%p dev 0x%x logdev 0x%x rtdev 0x%x\n", Index: linux-2.6-xfs/fs/xfs/Makefile-linux-2.6 =================================================================== --- linux-2.6-xfs.orig/fs/xfs/Makefile-linux-2.6 2007-08-23 14:57:45.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/Makefile-linux-2.6 2007-08-23 14:59:51.000000000 +0200 @@ -97,7 +97,6 @@ xfs-y += $(addprefix $(XFS_LINUX)/, \ xfs_iops.o \ xfs_lrw.o \ xfs_super.o \ - xfs_vfs.o \ xfs_vnode.o \ xfs_ksyms.o) Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm.c 2007-08-23 14:57:56.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c 2007-08-23 14:59:51.000000000 +0200 @@ -3290,7 +3290,7 @@ xfs_dm_send_destroy_event( STATIC int xfs_dm_send_namesp_event( dm_eventtype_t event, - bhv_vfs_t *vfsp, /* used by PREUNMOUNT */ + struct xfs_mount *mp, bhv_vnode_t *vp1, dm_right_t vp1_right, bhv_vnode_t *vp2, @@ -3305,7 +3305,7 @@ xfs_dm_send_namesp_event( /* Returns positive errors to XFS */ - error = dm_send_namesp_event(event, vfsp ? vfsp->vfs_super: NULL, + error = dm_send_namesp_event(event, mp ? mp->m_super : NULL, vn_to_inode(vp1), vp1_right, vp2 ? vn_to_inode(vp2) : NULL, vp2_right, name1, name2, @@ -3322,9 +3322,7 @@ xfs_dm_send_mount_event( char *mtpt, char *fsname) { - struct bhv_vfs *vfsp = XFS_MTOVFS(mp); - - return dm_send_mount_event(vfsp->vfs_super, root_right, + return dm_send_mount_event(mp->m_super, root_right, NULL, DM_RIGHT_NULL, mp->m_rootip ? XFS_ITOV(mp->m_rootip) : NULL, DM_RIGHT_NULL, mtpt, fsname); @@ -3332,14 +3330,14 @@ xfs_dm_send_mount_event( STATIC void xfs_dm_send_unmount_event( - bhv_vfs_t *vfsp, + struct xfs_mount *mp, bhv_vnode_t *vp, /* NULL if unmount successful */ dm_right_t vfsp_right, mode_t mode, int retcode, /* errno, if unmount failed */ int flags) { - dm_send_unmount_event(vfsp->vfs_super, vp ? vn_to_inode(vp) : NULL, + dm_send_unmount_event(mp->m_super, vp ? vn_to_inode(vp) : NULL, vfsp_right, mode, retcode, flags); } Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ksyms.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_ksyms.c 2007-08-23 14:57:45.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ksyms.c 2007-08-23 14:59:51.000000000 +0200 @@ -180,7 +180,6 @@ EXPORT_SYMBOL(uuid_getnodeuniq); EXPORT_SYMBOL(uuid_hash64); EXPORT_SYMBOL(uuid_is_nil); EXPORT_SYMBOL(uuid_table_remove); -EXPORT_SYMBOL(vfs_from_sb); EXPORT_SYMBOL(vn_hold); EXPORT_SYMBOL(vn_initialize); EXPORT_SYMBOL(vn_revalidate); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_lrw.c 2007-08-23 14:44:55.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c 2007-08-23 14:59:51.000000000 +0200 @@ -678,7 +678,7 @@ xfs_write( io = &xip->i_iocore; mp = io->io_mount; - vfs_wait_for_freeze(XFS_MTOVFS(mp), SB_FREEZE_WRITE); + xfs_wait_for_freeze(mp, SB_FREEZE_WRITE); if (XFS_FORCED_SHUTDOWN(mp)) return -EIO; Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_super.c 2007-08-23 14:59:49.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c 2007-08-23 14:59:51.000000000 +0200 @@ -509,7 +509,7 @@ xfs_flush_device_work( void *arg) { struct inode *inode = arg; - sync_blockdev(mp->m_vfsp->vfs_super->s_bdev); + sync_blockdev(mp->m_super->s_bdev); iput(inode); } @@ -590,7 +590,6 @@ STATIC void xfs_fs_put_super( struct super_block *sb) { - bhv_vfs_t *vfsp = vfs_from_sb(sb); struct xfs_mount *mp = XFS_M(sb); int error; @@ -598,12 +597,8 @@ xfs_fs_put_super( xfs_sync(mp, SYNC_ATTR | SYNC_DELWRI); error = xfs_unmount(mp, 0, NULL); - if (error) { + if (error) printk("XFS: unmount got error=%d\n", error); - printk("%s: vfs=0x%p left dangling!\n", __FUNCTION__, vfsp); - } else { - vfs_deallocate(vfsp); - } } STATIC void @@ -761,7 +756,6 @@ xfs_fs_fill_super( int silent) { struct inode *rootvp; - struct bhv_vfs *vfsp = vfs_allocate(sb); struct xfs_mount *mp = NULL; struct xfs_mount_args *args = xfs_args_allocate(sb, silent); struct kstatfs statvfs; @@ -773,8 +767,8 @@ xfs_fs_fill_super( spin_lock_init(&mp->m_sync_lock); init_waitqueue_head(&mp->m_wait_single_sync_task); - mp->m_vfsp = vfsp; - vfsp->vfs_mount = mp; + mp->m_super = sb; + sb->s_fs_info = mp; if (sb->s_flags & MS_RDONLY) mp->m_flags |= XFS_MOUNT_RDONLY; @@ -844,7 +838,6 @@ fail_unmount: xfs_unmount(mp, 0, NULL); fail_vfsop: - vfs_deallocate(vfsp); kmem_free(args, sizeof(*args)); return -error; } Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_super.h 2007-08-23 14:57:45.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.h 2007-08-23 14:59:51.000000000 +0200 @@ -89,7 +89,6 @@ extern void xfs_blkdev_issue_flush(struc extern struct export_operations xfs_export_operations; -#define XFS_M(sb) \ - XFS_VFSTOM(vfs_from_sb(sb)) +#define XFS_M(sb) ((struct xfs_mount *)((sb)->s_fs_info)) #endif /* __XFS_SUPER_H__ */ Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vfs.c 2007-08-23 14:59:49.000000000 +0200 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. - * All Rights Reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -#include "xfs.h" -#include "xfs_fs.h" -#include "xfs_inum.h" -#include "xfs_log.h" -#include "xfs_clnt.h" -#include "xfs_trans.h" -#include "xfs_sb.h" -#include "xfs_ag.h" -#include "xfs_dir2.h" -#include "xfs_imap.h" -#include "xfs_alloc.h" -#include "xfs_dmapi.h" -#include "xfs_mount.h" -#include "xfs_quota.h" - -bhv_vfs_t * -vfs_allocate( - struct super_block *sb) -{ - struct bhv_vfs *vfsp; - - vfsp = kmem_zalloc(sizeof(bhv_vfs_t), KM_SLEEP); - - vfsp->vfs_super = sb; - sb->s_fs_info = vfsp; - - return vfsp; -} - -bhv_vfs_t * -vfs_from_sb( - struct super_block *sb) -{ - return (bhv_vfs_t *)sb->s_fs_info; -} - -void -vfs_deallocate( - struct bhv_vfs *vfsp) -{ - kmem_free(vfsp, sizeof(bhv_vfs_t)); -} Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vfs.h 2007-08-23 14:59:49.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vfs.h 2007-08-23 14:59:51.000000000 +0200 @@ -21,7 +21,6 @@ #include #include "xfs_fs.h" -struct bhv_vfs; struct inode; struct fid; @@ -41,11 +40,6 @@ typedef struct bhv_vfs_sync_work { void (*w_syncer)(struct xfs_mount *, void *); } bhv_vfs_sync_work_t; -typedef struct bhv_vfs { - struct xfs_mount *vfs_mount; - struct super_block *vfs_super; /* generic superblock pointer */ -} bhv_vfs_t; - #define SYNC_ATTR 0x0001 /* sync attributes */ #define SYNC_CLOSE 0x0002 /* close file system down */ #define SYNC_DELWRI 0x0004 /* look at delayed writes */ @@ -78,11 +72,7 @@ typedef struct bhv_vfs { #define SHUTDOWN_REMOTE_REQ 0x0010 /* shutdown came from remote cell */ #define SHUTDOWN_DEVICE_REQ 0x0020 /* failed all paths to the device */ -#define vfs_test_for_freeze(vfs) ((vfs)->vfs_super->s_frozen) -#define vfs_wait_for_freeze(vfs,l) vfs_check_frozen((vfs)->vfs_super, (l)) - -extern bhv_vfs_t *vfs_allocate(struct super_block *); -extern bhv_vfs_t *vfs_from_sb(struct super_block *); -extern void vfs_deallocate(bhv_vfs_t *); +#define xfs_test_for_freeze(mp) ((mp)->m_super->s_frozen) +#define xfs_wait_for_freeze(mp,l) vfs_check_frozen((mp)->m_super, (l)) #endif /* __XFS_VFS_H__ */ Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vnode.h 2007-08-23 14:54:05.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.h 2007-08-23 14:59:51.000000000 +0200 @@ -19,7 +19,6 @@ #define __XFS_VNODE_H__ struct file; -struct bhv_vfs; struct bhv_vattr; struct xfs_iomap; struct attrlist_cursor_kern; Index: linux-2.6-xfs/fs/xfs/xfs_iget.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_iget.c 2007-08-23 14:57:45.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_iget.c 2007-08-23 14:59:51.000000000 +0200 @@ -379,7 +379,7 @@ xfs_iget( XFS_STATS_INC(xs_ig_attempts); retry: - inode = iget_locked(XFS_MTOVFS(mp)->vfs_super, ino); + inode = iget_locked(mp->m_super, ino); if (inode) { xfs_inode_t *ip; Index: linux-2.6-xfs/fs/xfs/xfs_trans.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_trans.c 2007-08-23 14:39:41.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_trans.c 2007-08-23 14:59:51.000000000 +0200 @@ -234,7 +234,7 @@ xfs_trans_alloc( xfs_mount_t *mp, uint type) { - vfs_wait_for_freeze(XFS_MTOVFS(mp), SB_FREEZE_TRANS); + xfs_wait_for_freeze(mp, SB_FREEZE_TRANS); return _xfs_trans_alloc(mp, type); } @@ -628,7 +628,7 @@ xfs_trans_apply_sb_deltas( offsetof(xfs_dsb_t, sb_frextents) + sizeof(sbp->sb_frextents) - 1); - XFS_MTOVFS(tp->t_mountp)->vfs_super->s_dirt = 1; + tp->t_mountp->m_super->s_dirt = 1; } /* From owner-xfs@oss.sgi.com Thu Aug 23 12:45:34 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 12:45:36 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_05 autolearn=ham version=3.2.0-pre1-r499012 Received: from filer.fsl.cs.sunysb.edu (filer.fsl.cs.sunysb.edu [130.245.126.2]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7NJjU4p009173 for ; Thu, 23 Aug 2007 12:45:34 -0700 Received: from filer.fsl.cs.sunysb.edu (localhost.localdomain [127.0.0.1]) by filer.fsl.cs.sunysb.edu (8.12.11.20060308/8.13.1) with ESMTP id l7NJjRan009715; Thu, 23 Aug 2007 15:45:27 -0400 Received: (from jsipek@localhost) by filer.fsl.cs.sunysb.edu (8.12.11.20060308/8.13.1/Submit) id l7NJjRmv009713; Thu, 23 Aug 2007 15:45:27 -0400 X-Authentication-Warning: filer.fsl.cs.sunysb.edu: jsipek set sender to jsipek@fsl.cs.sunysb.edu using -f Date: Thu, 23 Aug 2007 15:45:27 -0400 From: Josef Sipek To: Christoph Hellwig Cc: xfs@oss.sgi.com Subject: Re: [PATCH 4/17] kill the v_flag member in struct bhv_vnode Message-ID: <20070823194527.GA8431@filer.fsl.cs.sunysb.edu> References: <20070823193807.GE8050@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070823193807.GE8050@lst.de> User-Agent: Mutt/1.5.16 (2007-07-16) X-archive-position: 12624 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jsipek@fsl.cs.sunysb.edu Precedence: bulk X-list: xfs On Thu, Aug 23, 2007 at 09:38:07PM +0200, Christoph Hellwig wrote: > > All flags previous handled at the vnode level are not in the xfs_inode ^^^ typo :) > where we already have a flags mechanisms and free bits for flags > previously in the vnode. Yeah, didn't notice anything else... Jeff. -- The box said "Windows XP or better required". So I installed Linux. From owner-xfs@oss.sgi.com Thu Aug 23 12:47:54 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 12:47:56 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from filer.fsl.cs.sunysb.edu (filer.fsl.cs.sunysb.edu [130.245.126.2]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7NJlq4p009848 for ; Thu, 23 Aug 2007 12:47:54 -0700 Received: from filer.fsl.cs.sunysb.edu (localhost.localdomain [127.0.0.1]) by filer.fsl.cs.sunysb.edu (8.12.11.20060308/8.13.1) with ESMTP id l7NJlnqC009860; Thu, 23 Aug 2007 15:47:49 -0400 Received: (from jsipek@localhost) by filer.fsl.cs.sunysb.edu (8.12.11.20060308/8.13.1/Submit) id l7NJlnYE009858; Thu, 23 Aug 2007 15:47:49 -0400 X-Authentication-Warning: filer.fsl.cs.sunysb.edu: jsipek set sender to jsipek@fsl.cs.sunysb.edu using -f Date: Thu, 23 Aug 2007 15:47:49 -0400 From: Josef Sipek To: Christoph Hellwig Cc: xfs@oss.sgi.com Subject: Re: [PATCH 5/17] move v_iocount from bhv_vnode to xfs_inode Message-ID: <20070823194749.GB8431@filer.fsl.cs.sunysb.edu> References: <20070823193818.GF8050@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070823193818.GF8050@lst.de> User-Agent: Mutt/1.5.16 (2007-07-16) X-archive-position: 12625 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jsipek@fsl.cs.sunysb.edu Precedence: bulk X-list: xfs On Thu, Aug 23, 2007 at 09:38:18PM +0200, Christoph Hellwig wrote: > struct bhv_vnode is on it's way out, so move the I/O count to the XFS inode. > > > Signed-off-by: Christoph Hellwig > > Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c > =================================================================== > --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_aops.c 2007-08-23 14:46:18.000000000 +0200 > +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c 2007-08-23 14:51:38.000000000 +0200 > @@ -140,9 +140,11 @@ xfs_destroy_ioend( > next = bh->b_private; > bh->b_end_io(bh, !ioend->io_error); > } > - if (unlikely(ioend->io_error)) > - vn_ioerror(ioend->io_vnode, ioend->io_error, __FILE__,__LINE__); > - vn_iowake(ioend->io_vnode); > + if (unlikely(ioend->io_error)) { > + vn_ioerror(XFS_I(ioend->io_inode), ioend->io_error, > + __FILE__,__LINE__); Should it still be called vn_* if it takes an xfs inode? (And yes, I realize this is a patch in the middle of the series.) > + } > + vn_iowake(XFS_I(ioend->io_inode)); ditto. Josef 'Jeff' Sipek. -- A computer without Microsoft is like chocolate cake without mustard. From owner-xfs@oss.sgi.com Thu Aug 23 13:33:13 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 13:33:16 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_50 autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.pretago.de (mx1.pretago.de [89.110.132.151]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7NKXA4p017641 for ; Thu, 23 Aug 2007 13:33:13 -0700 Received: from localhost (localhost [127.0.0.1]) by mx1.pretago.de (Postfix) with ESMTP id EA1142EC069 for ; Thu, 23 Aug 2007 22:09:51 +0200 (CEST) X-Virus-Scanned: scanned for viruses... should be clean Received: from mx1.pretago.de ([127.0.0.1]) by localhost (mx1.pretago.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OM3R04Gt8mWa for ; Thu, 23 Aug 2007 22:09:51 +0200 (CEST) Received: from gondolin.gammarayburst.de (unknown [87.127.185.82]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: p127p4) by mx1.pretago.de (Postfix) with ESMTP id 619612EC066 for ; Thu, 23 Aug 2007 22:09:51 +0200 (CEST) From: Markus Schoder To: xfs@oss.sgi.com Subject: XFS internal error XFS_WANT_CORRUPTED_RETURN Date: Thu, 23 Aug 2007 21:09:50 +0100 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708232109.50780.lists@gammarayburst.de> X-archive-position: 12626 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: lists@gammarayburst.de Precedence: bulk X-list: xfs Got a bunch of the below errors in the log. It occured during a Debian upgrade with aptitude. xfs_repair found a lost inode. Kernel is stock 2.6.22.4 plus CFS patch. This is a 64bit kernel on an amd64 processor. I am glad to provide more information if required. Would be nice to keep me CC'ed if this is not against policy. -- Markus Aug 23 00:15:09 gondolin kernel: [17152.830267] XFS internal error XFS_WANT_CORRUPTED_RETURN at line 281 of file fs/xfs/xfs_alloc.c. Caller 0xffffffff802eb061 Aug 23 00:15:09 gondolin kernel: [17152.830274] Aug 23 00:15:09 gondolin kernel: [17152.830275] Call Trace: Aug 23 00:15:09 gondolin kernel: [17152.830295] [] xfs_alloc_fixup_trees+0x307/0x3a0 Aug 23 00:15:09 gondolin kernel: [17152.830301] [] xfs_btree_setbuf+0x2d/0xb0 Aug 23 00:15:09 gondolin kernel: [17152.830306] [] xfs_alloc_ag_vextent_near+0x581/0x9b0 Aug 23 00:15:09 gondolin kernel: [17152.830313] [] xfs_alloc_ag_vextent+0xd5/0x130 Aug 23 00:15:09 gondolin kernel: [17152.830316] [] xfs_alloc_vextent+0x275/0x460 Aug 23 00:15:09 gondolin kernel: [17152.830322] [] xfs_bmap_btalloc+0x410/0x7c0 Aug 23 00:15:09 gondolin kernel: [17152.830327] [] xfs_mod_incore_sb_batch+0xea/0x130 Aug 23 00:15:09 gondolin kernel: [17152.830335] [] xfs_bmap_isaeof+0x7e/0xd0 Aug 23 00:15:09 gondolin kernel: [17152.830344] [] xfs_bmapi+0xc89/0x1340 Aug 23 00:15:09 gondolin kernel: [17152.830359] [] xfs_trans_reserve+0xa8/0x210 Aug 23 00:15:09 gondolin kernel: [17152.830364] [] xfs_iomap_write_direct+0x2e8/0x500 Aug 23 00:15:09 gondolin kernel: [17152.830374] [] xfs_iomap+0x31c/0x390 Aug 23 00:15:09 gondolin kernel: [17152.830383] [] xfs_map_blocks+0x3a/0x80 Aug 23 00:15:09 gondolin kernel: [17152.830387] [] xfs_page_state_convert+0x2be/0x630 Aug 23 00:15:09 gondolin kernel: [17152.830394] [] alloc_buffer_head+0x4c/0x80 Aug 23 00:15:09 gondolin kernel: [17152.830398] [] alloc_page_buffers+0x60/0xe0 Aug 23 00:15:09 gondolin kernel: [17152.830403] [] xfs_vm_writepage+0x6f/0x120 Aug 23 00:15:09 gondolin kernel: [17152.830408] [] __writepage+0xa/0x30 Aug 23 00:15:09 gondolin kernel: [17152.830411] [] write_cache_pages+0x23e/0x330 Aug 23 00:15:09 gondolin kernel: [17152.830415] [] __writepage+0x0/0x30 Aug 23 00:15:09 gondolin kernel: [17152.830424] [] do_writepages+0x20/0x40 Aug 23 00:15:09 gondolin kernel: [17152.830427] [] __filemap_fdatawrite_range+0x75/0xb0 Aug 23 00:15:09 gondolin kernel: [17152.830434] [] do_fsync+0x45/0xe0 Aug 23 00:15:09 gondolin kernel: [17152.830438] [] sys_msync+0x166/0x1d0 Aug 23 00:15:09 gondolin kernel: [17152.830444] [] ia32_sysret+0x0/0xa From owner-xfs@oss.sgi.com Thu Aug 23 15:51:23 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 15:51:25 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7NMpK4p005861 for ; Thu, 23 Aug 2007 15:51:22 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id IAA10921; Fri, 24 Aug 2007 08:51:15 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l7NMpEeW76923805; Fri, 24 Aug 2007 08:51:15 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l7NMpB1Y76914055; Fri, 24 Aug 2007 08:51:11 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Fri, 24 Aug 2007 08:51:11 +1000 From: David Chinner To: kanishk rastogi Cc: xfs@oss.sgi.com Subject: Re: Need of inode->i_mutex in xfs_write() Message-ID: <20070823225111.GW72985246@sgi.com> References: <9ee2fe770708210826n5952e727od0df16a5a7b267f0@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9ee2fe770708210826n5952e727od0df16a5a7b267f0@mail.gmail.com> User-Agent: Mutt/1.4.2.1i X-archive-position: 12627 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Tue, Aug 21, 2007 at 09:11:56PM +0545, kanishk rastogi wrote: > I was looking at the xfs_write code path in kernel 2.6.20 ....... > I saw it acquiring inode->i_mutex . > Whats the need ? > What are we safegaurding inode for. See Documentation/filesystems/Locking and other files in that directory for what i_mutex is supposed to protect. XFS is different as it has it's own inodes and inode locks, but it still mostly uses i_mutex inteh accepted way. Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Thu Aug 23 15:56:39 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 15:56:41 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7NMuY4p006811 for ; Thu, 23 Aug 2007 15:56:37 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id IAA11003; Fri, 24 Aug 2007 08:56:30 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l7NMuSeW76887763; Fri, 24 Aug 2007 08:56:29 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l7NMuRZE76799386; Fri, 24 Aug 2007 08:56:27 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Fri, 24 Aug 2007 08:56:26 +1000 From: David Chinner To: Chris Pearson Cc: xfs@oss.sgi.com Subject: Re: sb_ifree and sb_fdblocks are unequal Message-ID: <20070823225626.GX72985246@sgi.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-archive-position: 12628 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Wed, Aug 22, 2007 at 05:17:33PM -0500, Chris Pearson wrote: > I have the same problem as posted in: > http://oss.sgi.com/archives/xfs/2006-02/msg00091.html > > using xfsprogs-2.9.3 in linux 2.4.29 linux 2.4.29, eh? I first a bunch of freespace/inode count issues quite some time ago, but the went into a 2.6 kernel, not a 2.4 kernel. Perhaps you should upgrade ;) > after running xfs_repair on a read-only mounted root filesystem, xfs_check > still shows errors: > > # ./xfs_check.sh -f /dev/md1 > sb_ifree 993009, counted 993008 > sb_fdblocks 3119630, counted 3119633 Boot from a bootable cd (e.g. knoppix) and run repair from there without the filesytem mounted. it should fix everything up. > It's possible, even likely, I had corruption due to a power outtage and > Seagate ATAPI drives that had write caching enabled by default. Possible. no way to prove or disprove, though. Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Thu Aug 23 16:12:56 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 16:12:58 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7NNCq4p008900 for ; Thu, 23 Aug 2007 16:12:54 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id JAA11392; Fri, 24 Aug 2007 09:12:45 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l7NNCheW76945475; Fri, 24 Aug 2007 09:12:43 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l7NNCe7d76522584; Fri, 24 Aug 2007 09:12:40 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Fri, 24 Aug 2007 09:12:40 +1000 From: David Chinner To: Christoph Hellwig Cc: xfs@oss.sgi.com Subject: Re: [PATCH 4/17] kill the v_flag member in struct bhv_vnode Message-ID: <20070823231237.GY72985246@sgi.com> References: <20070823193807.GE8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070823193807.GE8050@lst.de> User-Agent: Mutt/1.4.2.1i X-archive-position: 12629 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Thu, Aug 23, 2007 at 09:38:07PM +0200, Christoph Hellwig wrote: > > All flags previous handled at the vnode level are not in the xfs_inode > where we already have a flags mechanisms and free bits for flags > previously in the vnode. > > > Signed-off-by: Christoph Hellwig .... > Index: linux-2.6-xfs/fs/xfs/xfs_vnodeops.c > =================================================================== > --- linux-2.6-xfs.orig/fs/xfs/xfs_vnodeops.c 2007-08-13 18:00:49.000000000 +0200 > +++ linux-2.6-xfs/fs/xfs/xfs_vnodeops.c 2007-08-13 18:00:51.000000000 +0200 .... > @@ -1536,7 +1538,13 @@ xfs_release( > * significantly reducing the time window where we'd otherwise > * be exposed to that problem. > */ > - if (VUNTRUNCATE(vp) && VN_DIRTY(vp) && ip->i_delayed_blks > 0) > + spin_lock(&ip->i_flags_lock); > + truncated = __xfs_iflags_test(ip, XFS_ITRUNCATED); > + if (truncated) > + ip->i_flags &= ~XFS_ITRUNCATED; > + spin_unlock(&ip->i_flags_lock); > + > + if (truncated && VN_DIRTY(vp) && ip->i_delayed_blks > 0) > xfs_flush_pages(ip, 0, -1, XFS_B_ASYNC, FI_NONE); > } This is kind of icky - doing an open coded flag clear instead of wrapping it in a xfs_iflags_test_and_clear() type operation. Something like: static inline int xfs_iflags_test_and_clear(xfs_inode_t *ip, unsigned short flags) { int ret; spin_lock(&ip->i_flags_lock); ret = ip->i_flags & flags; if (ret) ip->i_flags &= ~flags; spin_unlock(&ip->i_flags_lock); return ret; } And then the code can become: if (xfs_iflags_test_and_clear(ip, XFS_ITRUNCATED) && VN_DIRTY(vp) && ip->i_delayed_blks > 0)) xfs_flush_pages(ip, 0, -1, XFS_B_ASYNC, FI_NONE); FWIW, for changes to this series I think incremental patches would probably be the easiest way to handle it. Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Thu Aug 23 16:57:07 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 16:57:10 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7NNv44p019425 for ; Thu, 23 Aug 2007 16:57:06 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id JAA12658; Fri, 24 Aug 2007 09:56:57 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l7NNuteW76882340; Fri, 24 Aug 2007 09:56:56 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l7NNuqIv76875370; Fri, 24 Aug 2007 09:56:52 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Fri, 24 Aug 2007 09:56:52 +1000 From: David Chinner To: Josef Sipek Cc: Christoph Hellwig , xfs@oss.sgi.com Subject: Re: [PATCH 5/17] move v_iocount from bhv_vnode to xfs_inode Message-ID: <20070823235652.GZ72985246@sgi.com> References: <20070823193818.GF8050@lst.de> <20070823194749.GB8431@filer.fsl.cs.sunysb.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070823194749.GB8431@filer.fsl.cs.sunysb.edu> User-Agent: Mutt/1.4.2.1i X-archive-position: 12630 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Thu, Aug 23, 2007 at 03:47:49PM -0400, Josef Sipek wrote: > On Thu, Aug 23, 2007 at 09:38:18PM +0200, Christoph Hellwig wrote: > > struct bhv_vnode is on it's way out, so move the I/O count to the XFS inode. > > > > > > Signed-off-by: Christoph Hellwig > > > > Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c > > =================================================================== > > --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_aops.c 2007-08-23 14:46:18.000000000 +0200 > > +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c 2007-08-23 14:51:38.000000000 +0200 > > @@ -140,9 +140,11 @@ xfs_destroy_ioend( > > next = bh->b_private; > > bh->b_end_io(bh, !ioend->io_error); > > } > > - if (unlikely(ioend->io_error)) > > - vn_ioerror(ioend->io_vnode, ioend->io_error, __FILE__,__LINE__); > > - vn_iowake(ioend->io_vnode); > > + if (unlikely(ioend->io_error)) { > > + vn_ioerror(XFS_I(ioend->io_inode), ioend->io_error, > > + __FILE__,__LINE__); > > Should it still be called vn_* if it takes an xfs inode? (And yes, I realize > this is a patch in the middle of the series.) Eventually, yes, but that's really only cosmetic at this point. I'm more concerned with the functional and structural changes at this point and not so much the cosmetics. There are much bigger cosmetic changes in the pipeline as a result of this patchset, I think... Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Thu Aug 23 17:05:40 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 17:05:42 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7O05a4p020884 for ; Thu, 23 Aug 2007 17:05:39 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id KAA12949; Fri, 24 Aug 2007 10:05:27 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l7O05PeW76964391; Fri, 24 Aug 2007 10:05:26 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l7O05Nre75450716; Fri, 24 Aug 2007 10:05:23 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Fri, 24 Aug 2007 10:05:23 +1000 From: David Chinner To: Christoph Hellwig Cc: xfs@oss.sgi.com Subject: Re: [PATCH 6/17] move v_trace from bhv_vnode to xfs_inode Message-ID: <20070824000523.GA72985246@sgi.com> References: <20070823193834.GG8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070823193834.GG8050@lst.de> User-Agent: Mutt/1.4.2.1i X-archive-position: 12631 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Thu, Aug 23, 2007 at 09:38:34PM +0200, Christoph Hellwig wrote: > struct bhv_vnode is on it's way out, so move the trace buffer to the > XFS inode. Note that this makes the tracing macros rather misnamed, > but this kind of fallout will be fixed up incrementally later on. .... > @@ -197,11 +192,11 @@ vn_hold( > #ifdef XFS_VNODE_TRACE > > #define KTRACE_ENTER(vp, vk, s, line, ra) \ > - ktrace_enter( (vp)->v_trace, \ > + ktrace_enter( (ip)->i_trace, \ > /* 0 */ (void *)(__psint_t)(vk), \ > /* 1 */ (void *)(s), \ > /* 2 */ (void *)(__psint_t) line, \ > -/* 3 */ (void *)(__psint_t)(vn_count(vp)), \ > +/* 3 */ NULL, \ given that vn_count() returns the linux inode i_count, shouldn't we put that here as well rather than killing it? It is sometimes useful to see what is happening with the reference count in the traces.... > +#ifdef XFS_VNODE_TRACE > + ip->i_trace = ktrace_alloc(VNODE_TRACE_SIZE, KM_SLEEP); > +#endif At some point we need to change that define as well. More cosmetic stuff, though. Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Thu Aug 23 17:10:56 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 17:10:58 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7O0Ap4p021782 for ; Thu, 23 Aug 2007 17:10:54 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id KAA13099; Fri, 24 Aug 2007 10:10:44 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l7O0AgeW76962188; Fri, 24 Aug 2007 10:10:43 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l7O0AecV76872658; Fri, 24 Aug 2007 10:10:40 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Fri, 24 Aug 2007 10:10:40 +1000 From: David Chinner To: Christoph Hellwig Cc: xfs@oss.sgi.com Subject: Re: [PATCH 8/17] kill struct bhv_vnode Message-ID: <20070824001040.GB72985246@sgi.com> References: <20070823193905.GI8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070823193905.GI8050@lst.de> User-Agent: Mutt/1.4.2.1i X-archive-position: 12632 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Thu, Aug 23, 2007 at 09:39:05PM +0200, Christoph Hellwig wrote: > Now that struct bhv_vnode is empty we can just kill it. Retain bhv_vattr_t > as a typedef for struct inode for the time beeing until all the fallout is > cleaned up. I think you mean "retain the bhv_vnode_t as a typedef for struct inode": > +typedef struct inode bhv_vnode_t; > > -typedef struct bhv_vnode { > - struct inode v_inode; /* Linux inode */ > - /* inode MUST be last */ > -} bhv_vnode_t; Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Thu Aug 23 17:26:26 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 17:26:27 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_65 autolearn=no version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7O0QN4p024212 for ; Thu, 23 Aug 2007 17:26:24 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id KAA13687; Fri, 24 Aug 2007 10:26:16 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l7O0QEeW76991745; Fri, 24 Aug 2007 10:26:15 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l7O0QCI974346518; Fri, 24 Aug 2007 10:26:12 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Fri, 24 Aug 2007 10:26:12 +1000 From: David Chinner To: Christoph Hellwig Cc: xfs@oss.sgi.com Subject: Re: [PATCH 11/17] remove dependency of the quota module on behaviors. Message-ID: <20070824002612.GC72985246@sgi.com> References: <20070823193935.GL8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070823193935.GL8050@lst.de> User-Agent: Mutt/1.4.2.1i X-archive-position: 12633 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Thu, Aug 23, 2007 at 09:39:35PM +0200, Christoph Hellwig wrote: > Mount options are now parsed by the main XFS module and rejected if quota > support is not available, and there are some new quota operation for the > quotactl syscall and calls to quote in the mount, unmount and sync > callchains. .... > > -STATIC int > -xfs_qm_syncall( > - struct bhv_desc *bhv, > - int flags, > - cred_t *credp) ..... > - /* > - * Get the Quota Manager to flush the dquots. > - */ > - if (XFS_IS_QUOTA_ON(mp)) { > - if ((error = xfs_qm_sync(mp, flags))) { > - /* > - * If we got an IO error, we will be shutting down. > - * So, there's nothing more for us to do here. > - */ > - ASSERT(error != EIO || XFS_FORCED_SHUTDOWN(mp)); > - if (XFS_FORCED_SHUTDOWN(mp)) { > - return XFS_ERROR(error); > - } > - } So we check for quota being enabled here before syncing. > @@ -941,6 +962,21 @@ xfs_sync( > cred_t *credp) > { > xfs_mount_t *mp = XFS_BHVTOM(bdp); > + int error; > + > + /* > + * Get the Quota Manager to flush the dquots. > + */ > + error = XFS_QM_DQSYNC(mp, flags); > + if (error) { > + /* > + * If we got an IO error, we will be shutting down. > + * So, there's nothing more for us to do here. > + */ > + ASSERT(error != EIO || XFS_FORCED_SHUTDOWN(mp)); > + if (XFS_FORCED_SHUTDOWN(mp)) > + return XFS_ERROR(error); > + } but we don't for the new code. I assume that this is because of the stub: > +static struct xfs_qmops xfs_qmcore_stub = { > .xfs_qminit = (xfs_qminit_t) xfs_noquota_init, > .xfs_qmdone = (xfs_qmdone_t) fs_noerr, > .xfs_qmmount = (xfs_qmmount_t) fs_noerr, > @@ -124,4 +126,38 @@ xfs_qmops_t xfs_qmcore_stub = { > .xfs_dqvoprename = (xfs_dqvoprename_t) fs_noerr, > .xfs_dqvopchown = xfs_dqvopchown_default, > .xfs_dqvopchownresv = (xfs_dqvopchownresv_t) fs_noerr, > + .xfs_dqstatvfs = (xfs_dqstatvfs_t) fs_noval, > + .xfs_dqsync = (xfs_dqsync_t) fs_noerr, That returns no error. This is slightly non-obvious that if quotas are not enabled or loaded that this quota sync does not actually return an error. Perhaps a small addition to the comment above XFS_QM_DQSYNC() to explain this would help prevent future misunderstandings. Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Thu Aug 23 17:45:02 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 17:45:04 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7O0ix4p026806 for ; Thu, 23 Aug 2007 17:45:02 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l7O0iwDO005193 for ; Thu, 23 Aug 2007 20:44:58 -0400 Received: from lacrosse.corp.redhat.com (lacrosse.corp.redhat.com [172.16.52.154]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7O0iwpv011279 for ; Thu, 23 Aug 2007 20:44:58 -0400 Received: from [10.15.80.10] (neon.msp.redhat.com [10.15.80.10]) by lacrosse.corp.redhat.com (8.12.11.20060308/8.11.6) with ESMTP id l7O0itAu018425 for ; Thu, 23 Aug 2007 20:44:57 -0400 Message-ID: <46CE2A07.7080305@sandeen.net> Date: Thu, 23 Aug 2007 19:44:55 -0500 From: Eric Sandeen User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: xfs@oss.sgi.com Subject: [PATCH] fix filestreams on 32-bit boxes Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-archive-position: 12634 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs xfs_filestream_mount() sets up an mru cache with: err = xfs_mru_cache_create(&mp->m_filestream, lifetime, grp_count, (xfs_mru_cache_free_func_t)xfs_fstrm_free_func); but that cast is causing problems... typedef void (*xfs_mru_cache_free_func_t)(unsigned long, void*); but: void xfs_fstrm_free_func( xfs_ino_t ino, fstrm_item_t *item) so on a 32-bit box, it's casting (32, 32) args into (64, 32) and I assume it's getting garbage for *item, which subsequently causes an explosion. With this change the filestreams xfsqa tests don't oops on my 32-bit box. Signed-off-by: Eric Sandeen Index: linux-2.6.22.i386/fs/xfs/xfs_filestream.c =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/xfs_filestream.c +++ linux-2.6.22.i386/fs/xfs/xfs_filestream.c @@ -350,7 +350,7 @@ _xfs_filestream_update_ag( /* xfs_fstrm_free_func(): callback for freeing cached stream items. */ void xfs_fstrm_free_func( - xfs_ino_t ino, + unsigned long ino, fstrm_item_t *item) { xfs_inode_t *ip = item->ip; From owner-xfs@oss.sgi.com Thu Aug 23 18:19:00 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 18:19:03 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7O1Iv4p031559 for ; Thu, 23 Aug 2007 18:18:59 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id LAA14954; Fri, 24 Aug 2007 11:18:51 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l7O1IneW75891886; Fri, 24 Aug 2007 11:18:50 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l7O1IlxW76986833; Fri, 24 Aug 2007 11:18:47 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Fri, 24 Aug 2007 11:18:47 +1000 From: David Chinner To: Christoph Hellwig Cc: xfs@oss.sgi.com Subject: Re: [PATCH 15/17] kill the vfs_flags member in struct bhv_vfs Message-ID: <20070824011847.GD72985246@sgi.com> References: <20070823194006.GP8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070823194006.GP8050@lst.de> User-Agent: Mutt/1.4.2.1i X-archive-position: 12635 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Thu, Aug 23, 2007 at 09:40:07PM +0200, Christoph Hellwig wrote: > All flags are added to xfs_mount's m_flag instead. Note that the 32bit > inode flag was duplicated in both of them, but only cleared in the > mount when it was not nessecary due to the filesystem beeing small enough. > Thus this patch introduces a slight behavior change in that the 32bit > inodes option is only present in the /proc//mounts output if > actually nessecary but not if it was on the command line but isn't > actually in effect. Hmmm - it looks like it actually prints inode64 in that case. > - if (!(vfsp->vfs_flag & VFS_32BITINODES)) > + if (!(mp->m_flags & XFS_MOUNT_32BITINODES)) > seq_printf(m, "," MNTOPT_64BITINODE); So if the XFS_MOUNT_32BITINODES is not set, we print "inode64" in /proc//mounts, and: > @@ -348,11 +348,8 @@ xfs_initialize_perag( > /* Clear the mount flag if no inode can overflow 32 bits > * on this filesystem, or if specifically requested.. > */ > - if ((vfs->vfs_flag & VFS_32BITINODES) && ino > max_inum) { > - mp->m_flags |= XFS_MOUNT_32BITINODES; > - } else { > + if (!((mp->m_flags & XFS_MOUNT_32BITINODES) && ino > max_inum)) > mp->m_flags &= ~XFS_MOUNT_32BITINODES; > - } On mount, we enter here in with XFS_MOUNT_32BITINODES set unless the inode64 mount option is set. Assuming 256 byte inodes we end up with: entry fs_size exit /proc/mounts set <1TB clear ...,inode64,... wrong set >1TB set nothing correct clear any clear ...,inode64,... correct And then we have the growfs case, which *always* sets the XFS_MOUNT_32BITINODES flag before initialising thenew ags and that means we see: entry fs_size exit /proc/mounts set <1TB clear ...,inode64,... wrong set >1TB set nothing *possibly wrong* The issue here is that if we supplied inode64 on the command line, then grow the filesystem to something more than 1TB (even if it started at more then 1TB) we turn on inode32 mode. That is wrong. If growfs does not set the flag: entry fs_size exit /proc/mounts clear <1TB clear ...,inode64,... wrong clear >1TB clear ...,inode64,... *possibly wrong* We can be enabling inode64 on 32bit systems incorrectly. So I think a second flag really is needed here to ensure the correct mode is preserved for the grow case, and that would ensure that we don't have a change in /proc/mounts output, too. > @@ -460,7 +460,7 @@ typedef struct xfs_mount { > /* osyncisdsync is now default*/ > #define XFS_MOUNT_32BITINODES (1ULL << 14) /* do not create inodes above > * 32 bits in size */ > - /* (1ULL << 15) -- currently unused */ > +#define XFS_MOUNT_RDONLY (1ULL << 15) /* read-only vfs */ "read-only fs"? Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Thu Aug 23 18:22:29 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 18:22:31 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7O1MQ4p032222 for ; Thu, 23 Aug 2007 18:22:29 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7O1MPA5025695 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 24 Aug 2007 03:22:25 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7O1MPxL025693; Fri, 24 Aug 2007 03:22:25 +0200 Date: Fri, 24 Aug 2007 03:22:25 +0200 From: Christoph Hellwig To: David Chinner Cc: Christoph Hellwig , xfs@oss.sgi.com Subject: Re: [PATCH 8/17] kill struct bhv_vnode Message-ID: <20070824012225.GB25534@lst.de> References: <20070823193905.GI8050@lst.de> <20070824001040.GB72985246@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070824001040.GB72985246@sgi.com> User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12637 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs On Fri, Aug 24, 2007 at 10:10:40AM +1000, David Chinner wrote: > On Thu, Aug 23, 2007 at 09:39:05PM +0200, Christoph Hellwig wrote: > > Now that struct bhv_vnode is empty we can just kill it. Retain bhv_vattr_t > > as a typedef for struct inode for the time beeing until all the fallout is > > cleaned up. > > I think you mean "retain the bhv_vnode_t as a typedef for struct inode": Yes, feel free to correct it in the final commit message :) From owner-xfs@oss.sgi.com Thu Aug 23 18:22:05 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 18:22:07 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7O1M04p032115 for ; Thu, 23 Aug 2007 18:22:04 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7O1LxA5025668 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 24 Aug 2007 03:21:59 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7O1LxZu025666; Fri, 24 Aug 2007 03:21:59 +0200 Date: Fri, 24 Aug 2007 03:21:59 +0200 From: Christoph Hellwig To: David Chinner Cc: Christoph Hellwig , xfs@oss.sgi.com Subject: Re: [PATCH 6/17] move v_trace from bhv_vnode to xfs_inode Message-ID: <20070824012158.GA25534@lst.de> References: <20070823193834.GG8050@lst.de> <20070824000523.GA72985246@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070824000523.GA72985246@sgi.com> User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12636 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs On Fri, Aug 24, 2007 at 10:05:23AM +1000, David Chinner wrote: > given that vn_count() returns the linux inode i_count, shouldn't > we put that here as well rather than killing it? It is sometimes > useful to see what is happening with the reference count in the > traces.... True. It'll need a little helper because the linux inode might be zero in some places. From owner-xfs@oss.sgi.com Thu Aug 23 18:27:06 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 18:27:09 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7O1R44p000783 for ; Thu, 23 Aug 2007 18:27:05 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7O1R3A5025871 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 24 Aug 2007 03:27:03 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7O1R2es025869; Fri, 24 Aug 2007 03:27:02 +0200 Date: Fri, 24 Aug 2007 03:27:02 +0200 From: Christoph Hellwig To: David Chinner Cc: Christoph Hellwig , xfs@oss.sgi.com Subject: Re: [PATCH 11/17] remove dependency of the quota module on behaviors. Message-ID: <20070824012702.GC25534@lst.de> References: <20070823193935.GL8050@lst.de> <20070824002612.GC72985246@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070824002612.GC72985246@sgi.com> User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12638 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs On Fri, Aug 24, 2007 at 10:26:12AM +1000, David Chinner wrote: > > +static struct xfs_qmops xfs_qmcore_stub = { > > .xfs_qminit = (xfs_qminit_t) xfs_noquota_init, > > .xfs_qmdone = (xfs_qmdone_t) fs_noerr, > > .xfs_qmmount = (xfs_qmmount_t) fs_noerr, > > @@ -124,4 +126,38 @@ xfs_qmops_t xfs_qmcore_stub = { > > .xfs_dqvoprename = (xfs_dqvoprename_t) fs_noerr, > > .xfs_dqvopchown = xfs_dqvopchown_default, > > .xfs_dqvopchownresv = (xfs_dqvopchownresv_t) fs_noerr, > > + .xfs_dqstatvfs = (xfs_dqstatvfs_t) fs_noval, > > + .xfs_dqsync = (xfs_dqsync_t) fs_noerr, > > That returns no error. > > This is slightly non-obvious that if quotas are not enabled or loaded > that this quota sync does not actually return an error. Perhaps a small > addition to the comment above XFS_QM_DQSYNC() to explain this would > help prevent future misunderstandings. Sure, I'll add a comment. From owner-xfs@oss.sgi.com Thu Aug 23 18:43:26 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 18:43:29 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7O1hN4p003091 for ; Thu, 23 Aug 2007 18:43:24 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id LAA15518; Fri, 24 Aug 2007 11:43:18 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l7O1hHeW76717339; Fri, 24 Aug 2007 11:43:17 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l7O1hDfl76330087; Fri, 24 Aug 2007 11:43:13 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Fri, 24 Aug 2007 11:43:13 +1000 From: David Chinner To: Markus Schoder Cc: xfs@oss.sgi.com Subject: Re: XFS internal error XFS_WANT_CORRUPTED_RETURN Message-ID: <20070824014313.GE72985246@sgi.com> References: <200708232109.50780.lists@gammarayburst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200708232109.50780.lists@gammarayburst.de> User-Agent: Mutt/1.4.2.1i X-archive-position: 12639 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Thu, Aug 23, 2007 at 09:09:50PM +0100, Markus Schoder wrote: > Got a bunch of the below errors in the log. It occured during a Debian > upgrade with aptitude. xfs_repair found a lost inode. Can you post the output of xfs_repair if you still have it? It would be handy to correlæte the shutdown to an actual error on disk.... > Kernel is stock 2.6.22.4 plus CFS patch. This is a 64bit kernel on an > amd64 processor. Hmmmm - so not exactly a stock kernel then. Which of the 19 versions the CFS patch was applied? Is it reproducable or only a one-off? if it's not a one-off problem, have you seen the problem without the CFS patch? Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Thu Aug 23 18:48:36 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 18:48:38 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7O1mT4p003923 for ; Thu, 23 Aug 2007 18:48:34 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id LAA15754; Fri, 24 Aug 2007 11:48:23 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l7O1mMeW76959459; Fri, 24 Aug 2007 11:48:22 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l7O1mKj677042723; Fri, 24 Aug 2007 11:48:20 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Fri, 24 Aug 2007 11:48:20 +1000 From: David Chinner To: Eric Sandeen Cc: xfs@oss.sgi.com Subject: Re: [PATCH] fix filestreams on 32-bit boxes Message-ID: <20070824014820.GF72985246@sgi.com> References: <46CE2A07.7080305@sandeen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46CE2A07.7080305@sandeen.net> User-Agent: Mutt/1.4.2.1i X-archive-position: 12640 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Thu, Aug 23, 2007 at 07:44:55PM -0500, Eric Sandeen wrote: > xfs_filestream_mount() sets up an mru cache with: > > err = xfs_mru_cache_create(&mp->m_filestream, lifetime, grp_count, > (xfs_mru_cache_free_func_t)xfs_fstrm_free_func); > > but that cast is causing problems... > > typedef void (*xfs_mru_cache_free_func_t)(unsigned long, void*); > > but: > > void xfs_fstrm_free_func( > xfs_ino_t ino, > fstrm_item_t *item) > > so on a 32-bit box, it's casting (32, 32) args into (64, 32) and I assume > it's getting garbage for *item, which subsequently causes an explosion. > > With this change the filestreams xfsqa tests don't oops on my 32-bit box. > > Signed-off-by: Eric Sandeen > > Index: linux-2.6.22.i386/fs/xfs/xfs_filestream.c > =================================================================== > --- linux-2.6.22.i386.orig/fs/xfs/xfs_filestream.c > +++ linux-2.6.22.i386/fs/xfs/xfs_filestream.c > @@ -350,7 +350,7 @@ _xfs_filestream_update_ag( > /* xfs_fstrm_free_func(): callback for freeing cached stream items. */ > void > xfs_fstrm_free_func( > - xfs_ino_t ino, > + unsigned long ino, > fstrm_item_t *item) > { > xfs_inode_t *ip = item->ip; hmmm - probably should make xfs_fstrm_free_func follow the correct prototype and convert the item into an opaque void * as well. Then we can remove the cast that hid this problem in xfs_filestream_mount().... Nice catch, though, Eric. Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Thu Aug 23 18:56:47 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 18:56:49 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7O1ui4p005425 for ; Thu, 23 Aug 2007 18:56:47 -0700 Received: from hch by pentafluge.infradead.org with local (Exim 4.63 #1 (Red Hat Linux)) id 1IOO6F-0000QM-Ik; Fri, 24 Aug 2007 02:36:35 +0100 Date: Fri, 24 Aug 2007 02:36:35 +0100 From: Christoph Hellwig To: Eric Sandeen Cc: xfs@oss.sgi.com Subject: Re: [PATCH] fix filestreams on 32-bit boxes Message-ID: <20070824013635.GA1500@infradead.org> References: <46CE2A07.7080305@sandeen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46CE2A07.7080305@sandeen.net> User-Agent: Mutt/1.4.2.3i X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 12641 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: xfs On Thu, Aug 23, 2007 at 07:44:55PM -0500, Eric Sandeen wrote: > xfs_filestream_mount() sets up an mru cache with: > > err = xfs_mru_cache_create(&mp->m_filestream, lifetime, grp_count, > (xfs_mru_cache_free_func_t)xfs_fstrm_free_func); > > but that cast is causing problems... > > typedef void (*xfs_mru_cache_free_func_t)(unsigned long, void*); > > but: > > void xfs_fstrm_free_func( > xfs_ino_t ino, > fstrm_item_t *item) > > so on a 32-bit box, it's casting (32, 32) args into (64, 32) and I assume > it's getting garbage for *item, which subsequently causes an explosion. > > With this change the filestreams xfsqa tests don't oops on my 32-bit box. Please also kill that blody cast. Function pointer casts are wonderful for hiding bugs like the one you just fixed from compilers, but that's it. From owner-xfs@oss.sgi.com Thu Aug 23 19:02:57 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 19:03:00 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7O22q4p006716 for ; Thu, 23 Aug 2007 19:02:56 -0700 Received: from boing.melbourne.sgi.com (boing.melbourne.sgi.com [134.14.55.141]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id MAA16185; Fri, 24 Aug 2007 12:02:45 +1000 Message-ID: <46CE3C45.1080907@sgi.com> Date: Fri, 24 Aug 2007 12:02:45 +1000 From: Timothy Shimmin User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Markus Schoder CC: xfs@oss.sgi.com Subject: Re: XFS internal error XFS_WANT_CORRUPTED_RETURN References: <200708232109.50780.lists@gammarayburst.de> In-Reply-To: <200708232109.50780.lists@gammarayburst.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 12642 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: tes@sgi.com Precedence: bulk X-list: xfs Markus Schoder wrote: > Got a bunch of the below errors in the log. It occured during a Debian > upgrade with aptitude. xfs_repair found a lost inode. > > Kernel is stock 2.6.22.4 plus CFS patch. This is a 64bit kernel on an > amd64 processor. > > I am glad to provide more information if required. > > Would be nice to keep me CC'ed if this is not against policy. > > -- > Markus > > Aug 23 00:15:09 gondolin kernel: [17152.830267] XFS internal error XFS_WANT_CORRUPTED_RETURN at line 281 of file fs/xfs/xfs_alloc.c. Caller 0xffffffff802eb061 > Aug 23 00:15:09 gondolin kernel: [17152.830274] > Aug 23 00:15:09 gondolin kernel: [17152.830275] Call Trace: > Aug 23 00:15:09 gondolin kernel: [17152.830295] [] xfs_alloc_fixup_trees+0x307/0x3a0 > Aug 23 00:15:09 gondolin kernel: [17152.830301] [] xfs_btree_setbuf+0x2d/0xb0 > Aug 23 00:15:09 gondolin kernel: [17152.830306] [] xfs_alloc_ag_vextent_near+0x581/0x9b0 > Aug 23 00:15:09 gondolin kernel: [17152.830313] [] xfs_alloc_ag_vextent+0xd5/0x130 > Aug 23 00:15:09 gondolin kernel: [17152.830316] [] xfs_alloc_vextent+0x275/0x460 > Aug 23 00:15:09 gondolin kernel: [17152.830322] [] xfs_bmap_btalloc+0x410/0x7c0 > Aug 23 00:15:09 gondolin kernel: [17152.830327] [] xfs_mod_incore_sb_batch+0xea/0x130 > Aug 23 00:15:09 gondolin kernel: [17152.830335] [] xfs_bmap_isaeof+0x7e/0xd0 > Aug 23 00:15:09 gondolin kernel: [17152.830344] [] xfs_bmapi+0xc89/0x1340 > Aug 23 00:15:09 gondolin kernel: [17152.830359] [] xfs_trans_reserve+0xa8/0x210 > Aug 23 00:15:09 gondolin kernel: [17152.830364] [] xfs_iomap_write_direct+0x2e8/0x500 > Aug 23 00:15:09 gondolin kernel: [17152.830374] [] xfs_iomap+0x31c/0x390 > Aug 23 00:15:09 gondolin kernel: [17152.830383] [] xfs_map_blocks+0x3a/0x80 > Aug 23 00:15:09 gondolin kernel: [17152.830387] [] xfs_page_state_convert+0x2be/0x630 > Aug 23 00:15:09 gondolin kernel: [17152.830394] [] alloc_buffer_head+0x4c/0x80 > Aug 23 00:15:09 gondolin kernel: [17152.830398] [] alloc_page_buffers+0x60/0xe0 > Aug 23 00:15:09 gondolin kernel: [17152.830403] [] xfs_vm_writepage+0x6f/0x120 > Aug 23 00:15:09 gondolin kernel: [17152.830408] [] __writepage+0xa/0x30 > Aug 23 00:15:09 gondolin kernel: [17152.830411] [] write_cache_pages+0x23e/0x330 > Aug 23 00:15:09 gondolin kernel: [17152.830415] [] __writepage+0x0/0x30 > Aug 23 00:15:09 gondolin kernel: [17152.830424] [] do_writepages+0x20/0x40 > Aug 23 00:15:09 gondolin kernel: [17152.830427] [] __filemap_fdatawrite_range+0x75/0xb0 > Aug 23 00:15:09 gondolin kernel: [17152.830434] [] do_fsync+0x45/0xe0 > Aug 23 00:15:09 gondolin kernel: [17152.830438] [] sys_msync+0x166/0x1d0 > Aug 23 00:15:09 gondolin kernel: [17152.830444] [] ia32_sysret+0x0/0xa > It looks a lot like a reported bug: Suse#198124 and sgi-pv#956334 Where we had corruption in freespace btrees. Can you also run xfs_check before running xfs_repair. --Tim From owner-xfs@oss.sgi.com Thu Aug 23 19:03:49 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 19:03:51 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7O23l4p007020 for ; Thu, 23 Aug 2007 19:03:49 -0700 Received: from Liberator.local (unknown [10.0.0.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 2167F18DF377C; Thu, 23 Aug 2007 21:03:46 -0500 (CDT) Message-ID: <46CE3C8B.5090609@sandeen.net> Date: Thu, 23 Aug 2007 21:03:55 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: David Chinner CC: xfs@oss.sgi.com Subject: Re: [PATCH] fix filestreams on 32-bit boxes References: <46CE2A07.7080305@sandeen.net> <20070824014820.GF72985246@sgi.com> In-Reply-To: <20070824014820.GF72985246@sgi.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-archive-position: 12643 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs David Chinner wrote: > > hmmm - probably should make xfs_fstrm_free_func follow the correct prototype > and convert the item into an opaque void * as well. Then we can remove the > cast that hid this problem in xfs_filestream_mount().... > > Nice catch, though, Eric. > > Cheers, > > Dave. Yep, I thought of removing the cast on the way home, as did Christoph, wherever he is :) --------------------- xfs_filestream_mount() sets up an mru cache with: err = xfs_mru_cache_create(&mp->m_filestream, lifetime, grp_count, (xfs_mru_cache_free_func_t)xfs_fstrm_free_func); but that cast is causing problems... typedef void (*xfs_mru_cache_free_func_t)(unsigned long, void*); but: void xfs_fstrm_free_func( xfs_ino_t ino, fstrm_item_t *item) so on a 32-bit box, it's casting (32, 32) args into (64, 32) and I assume it's getting garbage for *item, which subsequently causes an explosion. With this change the filestreams xfsqa tests don't oops on my 32-bit box. Signed-off-by: Eric Sandeen Index: linux-2.6.22.i386/fs/xfs/xfs_filestream.c =================================================================== --- linux-2.6.22.i386.orig/fs/xfs/xfs_filestream.c +++ linux-2.6.22.i386/fs/xfs/xfs_filestream.c @@ -350,9 +350,10 @@ _xfs_filestream_update_ag( /* xfs_fstrm_free_func(): callback for freeing cached stream items. */ void xfs_fstrm_free_func( - xfs_ino_t ino, - fstrm_item_t *item) + unsigned long ino, + void *data) { + fstrm_item_t *item = (fstrm_item_t *)data; xfs_inode_t *ip = item->ip; int ref; @@ -438,7 +439,7 @@ xfs_filestream_mount( grp_count = 10; err = xfs_mru_cache_create(&mp->m_filestream, lifetime, grp_count, - (xfs_mru_cache_free_func_t)xfs_fstrm_free_func); + xfs_fstrm_free_func); return err; } From owner-xfs@oss.sgi.com Thu Aug 23 20:59:43 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 23 Aug 2007 20:59:46 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7O3xb4p025116 for ; Thu, 23 Aug 2007 20:59:41 -0700 Received: from [134.14.55.89] (soarer.melbourne.sgi.com [134.14.55.89]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id NAA18588; Fri, 24 Aug 2007 13:59:33 +1000 Message-ID: <46CE581A.2000405@sgi.com> Date: Fri, 24 Aug 2007 14:01:30 +1000 From: Vlad Apostolov User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: sgi.bugs.xfs@engr.sgi.com CC: linux-xfs@oss.sgi.com Subject: TAKE 969192: Default mount option "noikeep" makes the inode generation number non-persistent Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 12644 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: vapo@sgi.com Precedence: bulk X-list: xfs XFS inodes are dynamically allocated on demand, rather than being allocated at mkfs time. Chunks of 64 inodes are allocated at once, but they are never freed. Over time, this can lead to filesystem fragmentation, clusters of inodes and the btrees which point at them can be scattered around the system. By freeing clusters as they are emptied, we reduce fragmentation of the free space after removing files. This in turn allows us to make better placement decisions when repopulating a filesystem. The XFSMNT_IDELETE mount option enables freeing clusters when they get empty. Unfortunately a side effect of freeing inode clusters is that the inode generation numbers of such inodes would be reset to zero when the cluster is reclaimed. This is a problem in particular for a DMAPI enabled filesystem as the the DMAPI handles need to be unique and persistent in time. An unique DMAPI handle is built with the help of the inode generation number. When the last one is prematurely reset by an inode cluster reclaim, there is a high probability of different generation inodes to end up having identical DMAPI handles. To avoid the problem with identical DMAPI handles, the XFSMNT_IDELETE mount option should be set as default, only if the filesystem is not mounted with XFSMNT_DMAPI. Date: Fri Aug 24 13:54:57 AEST 2007 Workarea: soarer.melbourne.sgi.com:/home/vapo/isms/linux-xfs Inspected by: dgc, markgw Author: vapo The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29486a fs/xfs/xfs_vfsops.c - 1.527 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vfsops.c.diff?r1=text&tr1=1.527&r2=text&tr2=1.526&f=h - pv 969192, rv dgc, markgw - Imply "ikeep" default mount option for DMAPI enabled filestems. From owner-xfs@oss.sgi.com Fri Aug 24 00:32:37 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 00:32:39 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7O7WX4p027894 for ; Fri, 24 Aug 2007 00:32:35 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id RAA23922; Fri, 24 Aug 2007 17:32:26 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l7O7WOeW23967704; Fri, 24 Aug 2007 17:32:25 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l7O7WM1e76604326; Fri, 24 Aug 2007 17:32:22 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Fri, 24 Aug 2007 17:32:22 +1000 From: David Chinner To: Christoph Hellwig Cc: xfs@oss.sgi.com Subject: Re: [PATCH 11/17] remove dependency of the quota module on behaviors. Message-ID: <20070824073222.GN72985246@sgi.com> References: <20070823193935.GL8050@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070823193935.GL8050@lst.de> User-Agent: Mutt/1.4.2.1i X-archive-position: 12645 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Thu, Aug 23, 2007 at 09:39:35PM +0200, Christoph Hellwig wrote: > Mount options are now parsed by the main XFS module and rejected if quota > support is not available, and there are some new quota operation for the > quotactl syscall and calls to quote in the mount, unmount and sync > callchains. .... > @@ -110,7 +112,7 @@ xfs_noquota_init( > return error; > } > > -xfs_qmops_t xfs_qmcore_stub = { > +static struct xfs_qmops xfs_qmcore_stub = { > .xfs_qminit = (xfs_qminit_t) xfs_noquota_init, > .xfs_qmdone = (xfs_qmdone_t) fs_noerr, > .xfs_qmmount = (xfs_qmmount_t) fs_noerr, > @@ -124,4 +126,38 @@ xfs_qmops_t xfs_qmcore_stub = { > .xfs_dqvoprename = (xfs_dqvoprename_t) fs_noerr, > .xfs_dqvopchown = xfs_dqvopchown_default, > .xfs_dqvopchownresv = (xfs_dqvopchownresv_t) fs_noerr, > + .xfs_dqstatvfs = (xfs_dqstatvfs_t) fs_noval, > + .xfs_dqsync = (xfs_dqsync_t) fs_noerr, > + .xfs_quotactl = (xfs_quotactl_t) fs_noerr, quotactl needs to return ENOSYS when quota is not enabled on the filesystem, otherwise the quota tools think quota is enabled, no error occurred and they interpret unitialised data as quota data. This causes all the xfsdump/restore tests to fail in xfsqa because they erroneously detect that quota is enabled and dump/restore garbage for the quota. This: --- fs/xfs/xfs_qmops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: 2.6.x-xfs-experimental/fs/xfs/xfs_qmops.c =================================================================== --- 2.6.x-xfs-experimental.orig/fs/xfs/xfs_qmops.c 2007-08-24 12:47:50.000000000 +1000 +++ 2.6.x-xfs-experimental/fs/xfs/xfs_qmops.c 2007-08-24 17:05:44.765805482 +1000 @@ -128,7 +128,7 @@ static struct xfs_qmops xfs_qmcore_stub .xfs_dqvopchownresv = (xfs_dqvopchownresv_t) fs_noerr, .xfs_dqstatvfs = (xfs_dqstatvfs_t) fs_noval, .xfs_dqsync = (xfs_dqsync_t) fs_noerr, - .xfs_quotactl = (xfs_quotactl_t) fs_noerr, + .xfs_quotactl = (xfs_quotactl_t) fs_nosys, }; int makes qa tests 026 028 046 047 063 065 066 (all in the dump group) pass. Otherwise, the patch set passes xfsqa without introducing any new regressions. Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Fri Aug 24 03:44:09 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 03:44:11 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7OAi54p024080 for ; Fri, 24 Aug 2007 03:44:07 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id UAA27953; Fri, 24 Aug 2007 20:44:00 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 2BBFA58C38F1; Fri, 24 Aug 2007 20:44:00 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 969608 - decontaminate vnode operations from behavior details Message-Id: <20070824104400.2BBFA58C38F1@chook.melbourne.sgi.com> Date: Fri, 24 Aug 2007 20:44:00 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12646 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs decontaminate vnode operations from behavior details All vnode ops now take struct xfs_inode pointers and the behaviour related glue is split out into methods of it's own. This required fixing xfs_create/mkdir/symlink to not mess with the inode pointer but rather use a separate boolean for error handling. Thanks to Dave Chinner for that fix. Signed-off-by: Christoph Hellwig Date: Fri Aug 24 20:43:23 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29492a fs/xfs/xfs_vnodeops_bhv.c - 1.1 - new http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vnodeops_bhv.c - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. fs/xfs/xfs_vnodeops.h - 1.1 - new http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vnodeops.h - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. fs/xfs/xfs_rw.h - 1.84 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_rw.h.diff?r1=text&tr1=1.84&r2=text&tr2=1.83&f=h - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. fs/xfs/xfs_vnodeops.c - 1.709 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vnodeops.c.diff?r1=text&tr1=1.709&r2=text&tr2=1.708&f=h - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. fs/xfs/xfs_utils.c - 1.75 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_utils.c.diff?r1=text&tr1=1.75&r2=text&tr2=1.74&f=h - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. fs/xfs/xfs_utils.h - 1.36 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_utils.h.diff?r1=text&tr1=1.36&r2=text&tr2=1.35&f=h - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. fs/xfs/xfs_bmap.h - 1.101 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_bmap.h.diff?r1=text&tr1=1.101&r2=text&tr2=1.100&f=h - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. fs/xfs/xfs_bmap.c - 1.377 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_bmap.c.diff?r1=text&tr1=1.377&r2=text&tr2=1.376&f=h - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. fs/xfs/xfs_rename.c - 1.73 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_rename.c.diff?r1=text&tr1=1.73&r2=text&tr2=1.72&f=h - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. fs/xfs/xfs_attr.c - 1.144 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_attr.c.diff?r1=text&tr1=1.144&r2=text&tr2=1.143&f=h - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. fs/xfs/xfs_attr.h - 1.37 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_attr.h.diff?r1=text&tr1=1.37&r2=text&tr2=1.36&f=h - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. fs/xfs/xfs_dir2.h - 1.21 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dir2.h.diff?r1=text&tr1=1.21&r2=text&tr2=1.20&f=h - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. fs/xfs/xfs_dir2.c - 1.58 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dir2.c.diff?r1=text&tr1=1.58&r2=text&tr2=1.57&f=h - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. fs/xfs/Makefile-linux-2.6 - 1.209 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/Makefile-linux-2.6.diff?r1=text&tr1=1.209&r2=text&tr2=1.208&f=h - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. fs/xfs/linux-2.6/xfs_lrw.h - 1.57 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_lrw.h.diff?r1=text&tr1=1.57&r2=text&tr2=1.56&f=h - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. fs/xfs/linux-2.6/xfs_lrw.c - 1.263 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_lrw.c.diff?r1=text&tr1=1.263&r2=text&tr2=1.262&f=h - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. fs/xfs/linux-2.6/xfs_ioctl.c - 1.147 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_ioctl.c.diff?r1=text&tr1=1.147&r2=text&tr2=1.146&f=h - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. fs/xfs/linux-2.6/xfs_fs_subr.c - 1.51 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_fs_subr.c.diff?r1=text&tr1=1.51&r2=text&tr2=1.50&f=h - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. fs/xfs/linux-2.6/xfs_fs_subr.h - 1.15 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_fs_subr.h.diff?r1=text&tr1=1.15&r2=text&tr2=1.14&f=h - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. fs/xfs/linux-2.6/xfs_iops.h - 1.31 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_iops.h.diff?r1=text&tr1=1.31&r2=text&tr2=1.30&f=h - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. fs/xfs/linux-2.6/xfs_ksyms.c - 1.65 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_ksyms.c.diff?r1=text&tr1=1.65&r2=text&tr2=1.64&f=h - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. fs/xfs/dmapi/xfs_dm.c - 1.44 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm.c.diff?r1=text&tr1=1.44&r2=text&tr2=1.43&f=h - convert vnode ops to take xfs_inode pointers and separate out behaviour related glue. From owner-xfs@oss.sgi.com Fri Aug 24 03:50:40 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 03:50:42 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7OAob4p025628 for ; Fri, 24 Aug 2007 03:50:38 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id UAA28389; Fri, 24 Aug 2007 20:50:33 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 3385458C38F1; Fri, 24 Aug 2007 20:50:32 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 969608 - remove vnode operations Message-Id: <20070824105033.3385458C38F1@chook.melbourne.sgi.com> Date: Fri, 24 Aug 2007 20:50:32 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12647 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs call common xfs vnode-level helpers directly and remove vnode operations Signed-off-by: Christoph Hellwig Date: Fri Aug 24 20:48:51 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29493a fs/xfs/xfsidbg.c - 1.324 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfsidbg.c.diff?r1=text&tr1=1.324&r2=text&tr2=1.323&f=h - remove vnode operations. fs/xfs/xfs_vnodeops.c - 1.710 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vnodeops.c.diff?r1=text&tr1=1.710&r2=text&tr2=1.709&f=h - remove vnode operations. fs/xfs/xfs_vfsops.c - 1.528 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vfsops.c.diff?r1=text&tr1=1.528&r2=text&tr2=1.527&f=h - remove vnode operations. fs/xfs/xfs_dfrag.c - 1.60 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dfrag.c.diff?r1=text&tr1=1.60&r2=text&tr2=1.59&f=h - remove vnode operations. fs/xfs/xfs_iget.c - 1.227 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_iget.c.diff?r1=text&tr1=1.227&r2=text&tr2=1.226&f=h - remove vnode operations. fs/xfs/xfs_mount.h - 1.241 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.h.diff?r1=text&tr1=1.241&r2=text&tr2=1.240&f=h - remove vnode operations. fs/xfs/xfs_acl.c - 1.64 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_acl.c.diff?r1=text&tr1=1.64&r2=text&tr2=1.63&f=h - remove vnode operations. fs/xfs/xfs_inode.c - 1.473 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.c.diff?r1=text&tr1=1.473&r2=text&tr2=1.472&f=h - remove vnode operations. fs/xfs/xfs_inode.h - 1.226 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.h.diff?r1=text&tr1=1.226&r2=text&tr2=1.225&f=h - remove vnode operations. fs/xfs/xfs_bmap.c - 1.378 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_bmap.c.diff?r1=text&tr1=1.378&r2=text&tr2=1.377&f=h - remove vnode operations. fs/xfs/xfs_rename.c - 1.74 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_rename.c.diff?r1=text&tr1=1.74&r2=text&tr2=1.73&f=h - remove vnode operations. fs/xfs/xfs_attr.c - 1.145 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_attr.c.diff?r1=text&tr1=1.145&r2=text&tr2=1.144&f=h - remove vnode operations. fs/xfs/Makefile-linux-2.6 - 1.210 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/Makefile-linux-2.6.diff?r1=text&tr1=1.210&r2=text&tr2=1.209&f=h - remove vnode operations. fs/xfs/linux-2.6/xfs_lrw.c - 1.264 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_lrw.c.diff?r1=text&tr1=1.264&r2=text&tr2=1.263&f=h - remove vnode operations. fs/xfs/linux-2.6/xfs_ioctl.c - 1.148 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_ioctl.c.diff?r1=text&tr1=1.148&r2=text&tr2=1.147&f=h - remove vnode operations. fs/xfs/linux-2.6/xfs_vfs.h - 1.72 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vfs.h.diff?r1=text&tr1=1.72&r2=text&tr2=1.71&f=h - remove vnode operations. fs/xfs/linux-2.6/xfs_vfs.c - 1.75 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vfs.c.diff?r1=text&tr1=1.75&r2=text&tr2=1.74&f=h - remove vnode operations. fs/xfs/linux-2.6/xfs_file.c - 1.153 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_file.c.diff?r1=text&tr1=1.153&r2=text&tr2=1.152&f=h - remove vnode operations. fs/xfs/linux-2.6/xfs_vnode.c - 1.144 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vnode.c.diff?r1=text&tr1=1.144&r2=text&tr2=1.143&f=h - remove vnode operations. fs/xfs/linux-2.6/xfs_vnode.h - 1.131 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vnode.h.diff?r1=text&tr1=1.131&r2=text&tr2=1.130&f=h - remove vnode operations. fs/xfs/linux-2.6/xfs_super.h - 1.70 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_super.h.diff?r1=text&tr1=1.70&r2=text&tr2=1.69&f=h - remove vnode operations. fs/xfs/linux-2.6/xfs_super.c - 1.385 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_super.c.diff?r1=text&tr1=1.385&r2=text&tr2=1.384&f=h - remove vnode operations. fs/xfs/linux-2.6/xfs_iops.c - 1.260 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_iops.c.diff?r1=text&tr1=1.260&r2=text&tr2=1.259&f=h - remove vnode operations. fs/xfs/linux-2.6/xfs_iops.h - 1.32 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_iops.h.diff?r1=text&tr1=1.32&r2=text&tr2=1.31&f=h - remove vnode operations. fs/xfs/linux-2.6/xfs_aops.c - 1.148 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_aops.c.diff?r1=text&tr1=1.148&r2=text&tr2=1.147&f=h - remove vnode operations. fs/xfs/linux-2.6/xfs_ksyms.c - 1.66 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_ksyms.c.diff?r1=text&tr1=1.66&r2=text&tr2=1.65&f=h - remove vnode operations. fs/xfs/linux-2.6/xfs_ioctl32.c - 1.19 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_ioctl32.c.diff?r1=text&tr1=1.19&r2=text&tr2=1.18&f=h - remove vnode operations. fs/xfs/linux-2.6/xfs_export.c - 1.14 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_export.c.diff?r1=text&tr1=1.14&r2=text&tr2=1.13&f=h - remove vnode operations. fs/xfs/dmapi/xfs_dm_fsops.c - 1.8 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm_fsops.c.diff?r1=text&tr1=1.8&r2=text&tr2=1.7&f=h - remove vnode operations. fs/xfs/dmapi/xfs_dm_bhv.c - 1.7 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm_bhv.c.diff?r1=text&tr1=1.7&r2=text&tr2=1.6&f=h - remove vnode operations. fs/xfs/dmapi/xfs_dm.c - 1.45 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm.c.diff?r1=text&tr1=1.45&r2=text&tr2=1.44&f=h - remove vnode operations. fs/xfs/xfs_vnodeops_bhv.c - 1.2 - deleted http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vnodeops_bhv.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.1&f=h - remove vnode operations. From owner-xfs@oss.sgi.com Fri Aug 24 03:54:54 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 03:54:56 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7OAsA4p026343 for ; Fri, 24 Aug 2007 03:54:53 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id UAA28479; Fri, 24 Aug 2007 20:54:05 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 60FA958C38F1; Fri, 24 Aug 2007 20:54:05 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 969608 - kill v_vfsp member from struct bhv_vnode Message-Id: <20070824105405.60FA958C38F1@chook.melbourne.sgi.com> Date: Fri, 24 Aug 2007 20:54:05 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12648 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs kill v_vfsp member from struct bhv_vnode We can easily get at the vfsp through the super_block but it will soon be gone anyway. Signed-off-by: Christoph Hellwig Date: Fri Aug 24 20:53:35 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29494a fs/xfs/xfsidbg.c - 1.325 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfsidbg.c.diff?r1=text&tr1=1.325&r2=text&tr2=1.324&f=h - remove v_vfsp from bhv_vnode. fs/xfs/xfs_vnodeops.c - 1.711 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vnodeops.c.diff?r1=text&tr1=1.711&r2=text&tr2=1.710&f=h - remove v_vfsp from bhv_vnode. fs/xfs/xfs_acl.c - 1.65 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_acl.c.diff?r1=text&tr1=1.65&r2=text&tr2=1.64&f=h - remove v_vfsp from bhv_vnode. fs/xfs/xfs_inode.c - 1.474 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.c.diff?r1=text&tr1=1.474&r2=text&tr2=1.473&f=h - remove v_vfsp from bhv_vnode. fs/xfs/linux-2.6/xfs_lrw.c - 1.265 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_lrw.c.diff?r1=text&tr1=1.265&r2=text&tr2=1.264&f=h - remove v_vfsp from bhv_vnode. fs/xfs/linux-2.6/xfs_ioctl.c - 1.149 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_ioctl.c.diff?r1=text&tr1=1.149&r2=text&tr2=1.148&f=h - remove v_vfsp from bhv_vnode. fs/xfs/linux-2.6/xfs_file.c - 1.154 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_file.c.diff?r1=text&tr1=1.154&r2=text&tr2=1.153&f=h - remove v_vfsp from bhv_vnode. fs/xfs/linux-2.6/xfs_vnode.c - 1.145 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vnode.c.diff?r1=text&tr1=1.145&r2=text&tr2=1.144&f=h - remove v_vfsp from bhv_vnode. fs/xfs/linux-2.6/xfs_vnode.h - 1.132 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vnode.h.diff?r1=text&tr1=1.132&r2=text&tr2=1.131&f=h - remove v_vfsp from bhv_vnode. fs/xfs/linux-2.6/xfs_super.c - 1.386 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_super.c.diff?r1=text&tr1=1.386&r2=text&tr2=1.385&f=h - remove v_vfsp from bhv_vnode. fs/xfs/dmapi/xfs_dm_fsops.c - 1.9 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm_fsops.c.diff?r1=text&tr1=1.9&r2=text&tr2=1.8&f=h - remove v_vfsp from bhv_vnode. fs/xfs/dmapi/xfs_dm.c - 1.46 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm.c.diff?r1=text&tr1=1.46&r2=text&tr2=1.45&f=h - remove v_vfsp from bhv_vnode. From owner-xfs@oss.sgi.com Fri Aug 24 03:57:57 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 03:58:00 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7OAvs4p027165 for ; Fri, 24 Aug 2007 03:57:56 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id UAA28558; Fri, 24 Aug 2007 20:57:50 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id ED8F758C38F1; Fri, 24 Aug 2007 20:57:49 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 969608 - kill the v_flag member in struct bhv_vnode Message-Id: <20070824105749.ED8F758C38F1@chook.melbourne.sgi.com> Date: Fri, 24 Aug 2007 20:57:49 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12649 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs kill the v_flag member in struct bhv_vnode All flags previous handled at the vnode level are not in the xfs_inode where we already have a flags mechanisms and free bits for flags previously in the vnode. Signed-off-by: Christoph Hellwig Date: Fri Aug 24 20:57:19 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29495a fs/xfs/xfsidbg.c - 1.326 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfsidbg.c.diff?r1=text&tr1=1.326&r2=text&tr2=1.325&f=h - move vnode flags to xfs inode. fs/xfs/xfs_vnodeops.c - 1.712 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vnodeops.c.diff?r1=text&tr1=1.712&r2=text&tr2=1.711&f=h - move vnode flags to xfs inode. fs/xfs/xfs_iget.c - 1.228 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_iget.c.diff?r1=text&tr1=1.228&r2=text&tr2=1.227&f=h - move vnode flags to xfs inode. fs/xfs/xfs_inode.h - 1.227 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.h.diff?r1=text&tr1=1.227&r2=text&tr2=1.226&f=h - move vnode flags to xfs inode. fs/xfs/linux-2.6/xfs_file.c - 1.155 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_file.c.diff?r1=text&tr1=1.155&r2=text&tr2=1.154&f=h - move vnode flags to xfs inode. fs/xfs/linux-2.6/xfs_vnode.c - 1.146 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vnode.c.diff?r1=text&tr1=1.146&r2=text&tr2=1.145&f=h - move vnode flags to xfs inode. fs/xfs/linux-2.6/xfs_vnode.h - 1.133 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vnode.h.diff?r1=text&tr1=1.133&r2=text&tr2=1.132&f=h - move vnode flags to xfs inode. fs/xfs/linux-2.6/xfs_fs_subr.c - 1.52 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_fs_subr.c.diff?r1=text&tr1=1.52&r2=text&tr2=1.51&f=h - move vnode flags to xfs inode. fs/xfs/linux-2.6/xfs_super.c - 1.387 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_super.c.diff?r1=text&tr1=1.387&r2=text&tr2=1.386&f=h - move vnode flags to xfs inode. fs/xfs/linux-2.6/xfs_iops.c - 1.261 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_iops.c.diff?r1=text&tr1=1.261&r2=text&tr2=1.260&f=h - move vnode flags to xfs inode. fs/xfs/linux-2.6/xfs_aops.c - 1.149 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_aops.c.diff?r1=text&tr1=1.149&r2=text&tr2=1.148&f=h - move vnode flags to xfs inode. fs/xfs/linux-2.6/xfs_ioctl32.c - 1.20 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_ioctl32.c.diff?r1=text&tr1=1.20&r2=text&tr2=1.19&f=h - move vnode flags to xfs inode. fs/xfs/dmapi/xfs_dm.c - 1.47 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm.c.diff?r1=text&tr1=1.47&r2=text&tr2=1.46&f=h - move vnode flags to xfs inode. From owner-xfs@oss.sgi.com Fri Aug 24 04:01:45 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 04:01:47 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7OB1f4p028227 for ; Fri, 24 Aug 2007 04:01:44 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA28841; Fri, 24 Aug 2007 21:01:37 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 1F4E858C38F1; Fri, 24 Aug 2007 21:01:37 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 969608 - Create xfs_iflags_test_and_clear helper function Message-Id: <20070824110137.1F4E858C38F1@chook.melbourne.sgi.com> Date: Fri, 24 Aug 2007 21:01:37 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12650 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs Create xfs_iflags_test_and_clear helper function Signed-off-by: Christoph Hellwig Date: Fri Aug 24 21:01:07 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29496a fs/xfs/xfs_vnodeops.c - 1.713 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vnodeops.c.diff?r1=text&tr1=1.713&r2=text&tr2=1.712&f=h - use a xfs_iflags_test_and_clear helper instead of open coding. fs/xfs/xfs_inode.h - 1.228 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.h.diff?r1=text&tr1=1.228&r2=text&tr2=1.227&f=h - use a xfs_iflags_test_and_clear helper instead of open coding. From owner-xfs@oss.sgi.com Fri Aug 24 04:05:05 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 04:05:07 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_50 autolearn=ham version=3.2.0-pre1-r499012 Received: from bowl.fysh.org (fysh.org [83.170.75.51]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7OB4w4p029138 for ; Fri, 24 Aug 2007 04:05:05 -0700 Received: from mike by bowl.fysh.org with local (Exim 4.50 #1 (Debian)) id 1IOWYx-0001aE-1l for xfs@oss.sgi.com; Fri, 24 Aug 2007 11:38:47 +0100 Date: Fri, 24 Aug 2007 11:38:47 +0100 To: xfs@oss.sgi.com Subject: XFS and 4k stacks/newer kernels. Message-ID: <20070824103846.GC13240@fysh.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i From: Mike Ashton X-archive-position: 12651 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: mike@fysh.org Precedence: bulk X-list: xfs Hi folks, Firstly, I must apologise for the tremendously vague nature of this "report". I do hope it's of some use, and it's the best I can do at the moment. I've been using XFS for several years now on a raid6 partition on a 15-disk array on linux 2.6.19 without 4k stacks, and without incident. And a very nice filesystem it is too. I've just set up a new one based on exactly the same hardware but with a 2.6.22.3 kernel (and thus with compulsory 4k stacks, as I understand it?). During a large rsync to populate the filesystem, the write to local disk blocked in a fast device wait, but without any errors in dmesg. After giving it half an hour to wake up again, I hard rebooted and the XFS superblock was unreadable; bye bye filesystem. So I've rolled back to 2.6.19, unsurprisingly, but I wanted to let you know that some issues with 4k stacks or other features of newer kernels may not have been resolved yet. Since there were no errors, I've nothing specific to give you, which I appreciate gives you little to go on. It wouldn't be right to leave this anecdote unreported, however. Best of luck and thanks, Mike. From owner-xfs@oss.sgi.com Fri Aug 24 04:05:25 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 04:05:27 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7OB5M4p029298 for ; Fri, 24 Aug 2007 04:05:24 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA28921; Fri, 24 Aug 2007 21:05:18 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 316B158C38F1; Fri, 24 Aug 2007 21:05:18 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 969608 - move v_iocount from bhv_vnode to xfs_inode Message-Id: <20070824110518.316B158C38F1@chook.melbourne.sgi.com> Date: Fri, 24 Aug 2007 21:05:18 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12652 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs move v_iocount from bhv_vnode to xfs_inode struct bhv_vnode is on it's way out, so move the I/O count to the XFS inode. Signed-off-by: Christoph Hellwig Date: Fri Aug 24 21:04:54 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29497a fs/xfs/xfs_vnodeops.c - 1.714 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vnodeops.c.diff?r1=text&tr1=1.714&r2=text&tr2=1.713&f=h - move v_iocount from bhv_vnode to xfs_inode fs/xfs/xfs_vfsops.c - 1.529 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vfsops.c.diff?r1=text&tr1=1.529&r2=text&tr2=1.528&f=h - move v_iocount from bhv_vnode to xfs_inode fs/xfs/xfs_inode.c - 1.475 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.c.diff?r1=text&tr1=1.475&r2=text&tr2=1.474&f=h - move v_iocount from bhv_vnode to xfs_inode fs/xfs/xfs_inode.h - 1.229 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.h.diff?r1=text&tr1=1.229&r2=text&tr2=1.228&f=h - move v_iocount from bhv_vnode to xfs_inode fs/xfs/linux-2.6/xfs_vnode.c - 1.147 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vnode.c.diff?r1=text&tr1=1.147&r2=text&tr2=1.146&f=h - move v_iocount from bhv_vnode to xfs_inode fs/xfs/linux-2.6/xfs_vnode.h - 1.134 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vnode.h.diff?r1=text&tr1=1.134&r2=text&tr2=1.133&f=h - move v_iocount from bhv_vnode to xfs_inode fs/xfs/linux-2.6/xfs_aops.c - 1.150 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_aops.c.diff?r1=text&tr1=1.150&r2=text&tr2=1.149&f=h - move v_iocount from bhv_vnode to xfs_inode fs/xfs/linux-2.6/xfs_aops.h - 1.11 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_aops.h.diff?r1=text&tr1=1.11&r2=text&tr2=1.10&f=h - move v_iocount from bhv_vnode to xfs_inode From owner-xfs@oss.sgi.com Fri Aug 24 04:09:28 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 04:09:30 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7OB9N4p030671 for ; Fri, 24 Aug 2007 04:09:26 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA29083; Fri, 24 Aug 2007 21:09:19 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 22E8258C38F1; Fri, 24 Aug 2007 21:09:18 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 969608 - move v_trace from bhv_vnode to xfs_inode Message-Id: <20070824110919.22E8258C38F1@chook.melbourne.sgi.com> Date: Fri, 24 Aug 2007 21:09:18 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12653 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs move v_trace from bhv_vnode to xfs_inode struct bhv_vnode is on it's way out, so move the trace buffer to the XFS inode. Note that this makes the tracing macros rather misnamed, but this kind of fallout will be fixed up incrementally later on. Signed-off-by: Christoph Hellwig Date: Fri Aug 24 21:08:51 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29498a fs/xfs/xfsidbg.c - 1.327 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfsidbg.c.diff?r1=text&tr1=1.327&r2=text&tr2=1.326&f=h - move v_trace from bhv_vnode to xfs_inode fs/xfs/xfs_vnodeops.c - 1.715 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vnodeops.c.diff?r1=text&tr1=1.715&r2=text&tr2=1.714&f=h - move v_trace from bhv_vnode to xfs_inode fs/xfs/xfs_iget.c - 1.229 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_iget.c.diff?r1=text&tr1=1.229&r2=text&tr2=1.228&f=h - move v_trace from bhv_vnode to xfs_inode fs/xfs/xfs_inode.c - 1.476 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.c.diff?r1=text&tr1=1.476&r2=text&tr2=1.475&f=h - move v_trace from bhv_vnode to xfs_inode fs/xfs/xfs_inode.h - 1.230 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.h.diff?r1=text&tr1=1.230&r2=text&tr2=1.229&f=h - move v_trace from bhv_vnode to xfs_inode fs/xfs/xfs_utils.c - 1.76 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_utils.c.diff?r1=text&tr1=1.76&r2=text&tr2=1.75&f=h - move v_trace from bhv_vnode to xfs_inode fs/xfs/xfs_utils.h - 1.37 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_utils.h.diff?r1=text&tr1=1.37&r2=text&tr2=1.36&f=h - move v_trace from bhv_vnode to xfs_inode fs/xfs/xfs_rename.c - 1.75 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_rename.c.diff?r1=text&tr1=1.75&r2=text&tr2=1.74&f=h - move v_trace from bhv_vnode to xfs_inode fs/xfs/xfs_dir2.c - 1.59 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dir2.c.diff?r1=text&tr1=1.59&r2=text&tr2=1.58&f=h - move v_trace from bhv_vnode to xfs_inode fs/xfs/linux-2.6/xfs_ioctl.c - 1.150 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_ioctl.c.diff?r1=text&tr1=1.150&r2=text&tr2=1.149&f=h - move v_trace from bhv_vnode to xfs_inode fs/xfs/linux-2.6/xfs_vnode.c - 1.148 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vnode.c.diff?r1=text&tr1=1.148&r2=text&tr2=1.147&f=h - move v_trace from bhv_vnode to xfs_inode fs/xfs/linux-2.6/xfs_vnode.h - 1.135 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vnode.h.diff?r1=text&tr1=1.135&r2=text&tr2=1.134&f=h - move v_trace from bhv_vnode to xfs_inode fs/xfs/linux-2.6/xfs_super.c - 1.388 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_super.c.diff?r1=text&tr1=1.388&r2=text&tr2=1.387&f=h - move v_trace from bhv_vnode to xfs_inode fs/xfs/linux-2.6/xfs_aops.c - 1.151 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_aops.c.diff?r1=text&tr1=1.151&r2=text&tr2=1.150&f=h - move v_trace from bhv_vnode to xfs_inode From owner-xfs@oss.sgi.com Fri Aug 24 04:12:57 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 04:12:58 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7OBCr4p031748 for ; Fri, 24 Aug 2007 04:12:55 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA29139; Fri, 24 Aug 2007 21:12:49 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id D08FF58C38F1; Fri, 24 Aug 2007 21:12:49 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 969608 - kill the v_number member in struct bhv_vnode Message-Id: <20070824111249.D08FF58C38F1@chook.melbourne.sgi.com> Date: Fri, 24 Aug 2007 21:12:49 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12654 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs kill the v_number member in struct bhv_vnode It's entirely unused except for ignored arguments in the mrlock initialization, so remove it. Signed-off-by: Christoph Hellwig Date: Fri Aug 24 21:12:25 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29499a fs/xfs/xfsidbg.c - 1.328 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfsidbg.c.diff?r1=text&tr1=1.328&r2=text&tr2=1.327&f=h - kill the v_number member in struct bhv_vnode fs/xfs/xfs_iget.c - 1.230 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_iget.c.diff?r1=text&tr1=1.230&r2=text&tr2=1.229&f=h - kill the v_number member in struct bhv_vnode fs/xfs/linux-2.6/xfs_vnode.c - 1.149 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vnode.c.diff?r1=text&tr1=1.149&r2=text&tr2=1.148&f=h - kill the v_number member in struct bhv_vnode fs/xfs/linux-2.6/xfs_vnode.h - 1.136 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vnode.h.diff?r1=text&tr1=1.136&r2=text&tr2=1.135&f=h - kill the v_number member in struct bhv_vnode From owner-xfs@oss.sgi.com Fri Aug 24 04:20:22 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 04:20:24 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7OBIZ4p001316 for ; Fri, 24 Aug 2007 04:20:21 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA29326; Fri, 24 Aug 2007 21:18:31 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 0ABD458C38F1; Fri, 24 Aug 2007 21:18:30 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 969608 - kill struct bhv_vnode Message-Id: <20070824111831.0ABD458C38F1@chook.melbourne.sgi.com> Date: Fri, 24 Aug 2007 21:18:30 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12655 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs kill struct bhv_vnode Now that struct bhv_vnode is empty we can just kill it. Retain bhv_vnode_t as a typedef for struct inode for the time beeing until all the fallout is cleaned up. Signed-off-by: Christoph Hellwig Date: Fri Aug 24 21:18:05 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29500a fs/xfs/xfs_mount.h - 1.242 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.h.diff?r1=text&tr1=1.242&r2=text&tr2=1.241&f=h - struct bhv_vnode is empty so just retain it as a typedef to a struct inode to minimise cosmetic change. fs/xfs/xfs_acl.h - 1.35 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_acl.h.diff?r1=text&tr1=1.35&r2=text&tr2=1.34&f=h - struct bhv_vnode is empty so just retain it as a typedef to a struct inode to minimise cosmetic change. fs/xfs/xfs_acl.c - 1.66 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_acl.c.diff?r1=text&tr1=1.66&r2=text&tr2=1.65&f=h - struct bhv_vnode is empty so just retain it as a typedef to a struct inode to minimise cosmetic change. fs/xfs/xfs_inode.h - 1.231 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.h.diff?r1=text&tr1=1.231&r2=text&tr2=1.230&f=h - struct bhv_vnode is empty so just retain it as a typedef to a struct inode to minimise cosmetic change. fs/xfs/xfs_attr.h - 1.38 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_attr.h.diff?r1=text&tr1=1.38&r2=text&tr2=1.37&f=h - struct bhv_vnode is empty so just retain it as a typedef to a struct inode to minimise cosmetic change. fs/xfs/quota/xfs_qm_bhv.c - 1.26 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/quota/xfs_qm_bhv.c.diff?r1=text&tr1=1.26&r2=text&tr2=1.25&f=h - struct bhv_vnode is empty so just retain it as a typedef to a struct inode to minimise cosmetic change. fs/xfs/linux-2.6/xfs_lrw.h - 1.58 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_lrw.h.diff?r1=text&tr1=1.58&r2=text&tr2=1.57&f=h - struct bhv_vnode is empty so just retain it as a typedef to a struct inode to minimise cosmetic change. fs/xfs/linux-2.6/xfs_vfs.h - 1.73 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vfs.h.diff?r1=text&tr1=1.73&r2=text&tr2=1.72&f=h - struct bhv_vnode is empty so just retain it as a typedef to a struct inode to minimise cosmetic change. fs/xfs/linux-2.6/xfs_vfs.c - 1.76 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vfs.c.diff?r1=text&tr1=1.76&r2=text&tr2=1.75&f=h - struct bhv_vnode is empty so just retain it as a typedef to a struct inode to minimise cosmetic change. fs/xfs/linux-2.6/xfs_vnode.h - 1.137 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vnode.h.diff?r1=text&tr1=1.137&r2=text&tr2=1.136&f=h - struct bhv_vnode is empty so just retain it as a typedef to a struct inode to minimise cosmetic change. fs/xfs/linux-2.6/xfs_super.c - 1.389 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_super.c.diff?r1=text&tr1=1.389&r2=text&tr2=1.388&f=h - struct bhv_vnode is empty so just retain it as a typedef to a struct inode to minimise cosmetic change. fs/xfs/linux-2.6/xfs_iops.c - 1.262 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_iops.c.diff?r1=text&tr1=1.262&r2=text&tr2=1.261&f=h - struct bhv_vnode is empty so just retain it as a typedef to a struct inode to minimise cosmetic change. fs/xfs/dmapi/xfs_dm_bhv.c - 1.8 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm_bhv.c.diff?r1=text&tr1=1.8&r2=text&tr2=1.7&f=h - struct bhv_vnode is empty so just retain it as a typedef to a struct inode to minimise cosmetic change. fs/xfs/dmapi/xfs_dm.c - 1.48 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm.c.diff?r1=text&tr1=1.48&r2=text&tr2=1.47&f=h - struct bhv_vnode is empty so just retain it as a typedef to a struct inode to minimise cosmetic change. From owner-xfs@oss.sgi.com Fri Aug 24 04:24:33 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 04:24:35 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7OBOU4p006525 for ; Fri, 24 Aug 2007 04:24:31 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA29454; Fri, 24 Aug 2007 21:24:26 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 3861058C38F1; Fri, 24 Aug 2007 21:24:26 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 969608 - move freeing the mount structure from xfs_mount_free into the callers Message-Id: <20070824112426.3861058C38F1@chook.melbourne.sgi.com> Date: Fri, 24 Aug 2007 21:24:26 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12656 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs move freeing the mount structure from xfs_mount_free into the callers In the next patch we need to look at the mount structure until just before it's freed, so we need to be able to free it as the very last thing in xfs_unmount. Signed-off-by: Christoph Hellwig Date: Fri Aug 24 21:24:02 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29501a fs/xfs/xfs_vfsops.c - 1.530 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vfsops.c.diff?r1=text&tr1=1.530&r2=text&tr2=1.529&f=h - call xfs_mount_free into the callers so that we can stack extra cleanup functions prior to freeing the structure. fs/xfs/xfs_mount.c - 1.404 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.c.diff?r1=text&tr1=1.404&r2=text&tr2=1.403&f=h - call xfs_mount_free into the callers so that we can stack extra cleanup functions prior to freeing the structure. fs/xfs/linux-2.6/xfs_vfs.c - 1.77 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vfs.c.diff?r1=text&tr1=1.77&r2=text&tr2=1.76&f=h - call xfs_mount_free into the callers so that we can stack extra cleanup functions prior to freeing the structure. From owner-xfs@oss.sgi.com Fri Aug 24 04:28:48 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 04:28:50 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7OBSj4p007483 for ; Fri, 24 Aug 2007 04:28:47 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA29512; Fri, 24 Aug 2007 21:28:41 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 6E0F058C38F1; Fri, 24 Aug 2007 21:28:41 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 969608 - remove dependency of the dmapi module on behaviors Message-Id: <20070824112841.6E0F058C38F1@chook.melbourne.sgi.com> Date: Fri, 24 Aug 2007 21:28:41 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12657 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs remove dependency of the dmapi module on behaviors Mount options are now parsed by the main XFS module and rejected if dmapi support is not available, and there is a new dm operation to send the mount event. Signed-off-by: Christoph Hellwig Date: Fri Aug 24 21:28:04 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29502a fs/xfs/xfs_dmapi.h - 1.61 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dmapi.h.diff?r1=text&tr1=1.61&r2=text&tr2=1.60&f=h - remove dependency of the dmapi module on behaviors fs/xfs/xfs_vfsops.c - 1.531 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vfsops.c.diff?r1=text&tr1=1.531&r2=text&tr2=1.530&f=h - remove dependency of the dmapi module on behaviors fs/xfs/xfs_mount.h - 1.243 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.h.diff?r1=text&tr1=1.243&r2=text&tr2=1.242&f=h - remove dependency of the dmapi module on behaviors fs/xfs/xfs_dmops.c - 1.13 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dmops.c.diff?r1=text&tr1=1.13&r2=text&tr2=1.12&f=h - remove dependency of the dmapi module on behaviors fs/xfs/linux-2.6/xfs_vfs.h - 1.74 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vfs.h.diff?r1=text&tr1=1.74&r2=text&tr2=1.73&f=h - remove dependency of the dmapi module on behaviors fs/xfs/linux-2.6/xfs_vfs.c - 1.78 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vfs.c.diff?r1=text&tr1=1.78&r2=text&tr2=1.77&f=h - remove dependency of the dmapi module on behaviors fs/xfs/linux-2.6/xfs_ksyms.c - 1.67 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_ksyms.c.diff?r1=text&tr1=1.67&r2=text&tr2=1.66&f=h - remove dependency of the dmapi module on behaviors fs/xfs/dmapi/Makefile-linux-2.6 - 1.6 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/Makefile-linux-2.6.diff?r1=text&tr1=1.6&r2=text&tr2=1.5&f=h - remove dependency of the dmapi module on behaviors fs/xfs/dmapi/xfs_dm_fsops.c - 1.10 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm_fsops.c.diff?r1=text&tr1=1.10&r2=text&tr2=1.9&f=h - remove dependency of the dmapi module on behaviors fs/xfs/dmapi/xfs_dm_bhv.c - 1.9 - deleted http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm_bhv.c.diff?r1=text&tr1=1.9&r2=text&tr2=1.8&f=h - remove dependency of the dmapi module on behaviors fs/xfs/dmapi/xfs_dm.h - 1.2 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm.h.diff?r1=text&tr1=1.2&r2=text&tr2=1.1&f=h - remove dependency of the dmapi module on behaviors fs/xfs/dmapi/xfs_dm.c - 1.49 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm.c.diff?r1=text&tr1=1.49&r2=text&tr2=1.48&f=h - remove dependency of the dmapi module on behaviors From owner-xfs@oss.sgi.com Fri Aug 24 04:32:58 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 04:33:00 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7OBWt4p008407 for ; Fri, 24 Aug 2007 04:32:57 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA29674; Fri, 24 Aug 2007 21:32:52 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id E91F058C38F1; Fri, 24 Aug 2007 21:32:51 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 969608 - remove dependency of the quota module on behaviors Message-Id: <20070824113251.E91F058C38F1@chook.melbourne.sgi.com> Date: Fri, 24 Aug 2007 21:32:51 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12658 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs remove dependency of the quota module on behaviors Mount options are now parsed by the main XFS module and rejected if quota support is not available, and there are some new quota operation for the quotactl syscall and calls to quote in the mount, unmount and sync callchains. Signed-off-by: Christoph Hellwig Date: Fri Aug 24 21:32:27 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29503a fs/xfs/xfs_vfsops.c - 1.532 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vfsops.c.diff?r1=text&tr1=1.532&r2=text&tr2=1.531&f=h - remove dependency of the quota module on behaviors fs/xfs/xfs_mount.h - 1.244 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.h.diff?r1=text&tr1=1.244&r2=text&tr2=1.243&f=h - remove dependency of the quota module on behaviors fs/xfs/xfs_qmops.c - 1.16 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_qmops.c.diff?r1=text&tr1=1.16&r2=text&tr2=1.15&f=h - remove dependency of the quota module on behaviors fs/xfs/xfs_quota.h - 1.49 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_quota.h.diff?r1=text&tr1=1.49&r2=text&tr2=1.48&f=h - remove dependency of the quota module on behaviors fs/xfs/quota/xfs_qm_bhv.c - 1.27 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/quota/xfs_qm_bhv.c.diff?r1=text&tr1=1.27&r2=text&tr2=1.26&f=h - remove dependency of the quota module on behaviors fs/xfs/quota/xfs_qm_syscalls.c - 1.34 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/quota/xfs_qm_syscalls.c.diff?r1=text&tr1=1.34&r2=text&tr2=1.33&f=h - remove dependency of the quota module on behaviors fs/xfs/quota/xfs_qm.h - 1.16 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/quota/xfs_qm.h.diff?r1=text&tr1=1.16&r2=text&tr2=1.15&f=h - remove dependency of the quota module on behaviors fs/xfs/quota/xfs_qm.c - 1.53 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/quota/xfs_qm.c.diff?r1=text&tr1=1.53&r2=text&tr2=1.52&f=h - remove dependency of the quota module on behaviors fs/xfs/linux-2.6/xfs_vfs.h - 1.75 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vfs.h.diff?r1=text&tr1=1.75&r2=text&tr2=1.74&f=h - remove dependency of the quota module on behaviors fs/xfs/linux-2.6/xfs_vfs.c - 1.79 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vfs.c.diff?r1=text&tr1=1.79&r2=text&tr2=1.78&f=h - remove dependency of the quota module on behaviors fs/xfs/linux-2.6/xfs_super.h - 1.71 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_super.h.diff?r1=text&tr1=1.71&r2=text&tr2=1.70&f=h - remove dependency of the quota module on behaviors fs/xfs/linux-2.6/xfs_super.c - 1.390 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_super.c.diff?r1=text&tr1=1.390&r2=text&tr2=1.389&f=h - remove dependency of the quota module on behaviors fs/xfs/linux-2.6/xfs_ksyms.c - 1.68 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_ksyms.c.diff?r1=text&tr1=1.68&r2=text&tr2=1.67&f=h - remove dependency of the quota module on behaviors From owner-xfs@oss.sgi.com Fri Aug 24 04:41:22 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 04:41:23 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7OBfF4p009966 for ; Fri, 24 Aug 2007 04:41:20 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA29820; Fri, 24 Aug 2007 21:41:12 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id E303F58C38F1; Fri, 24 Aug 2007 21:41:11 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 969608 - decontaminate vfs operations from behavior details Message-Id: <20070824114111.E303F58C38F1@chook.melbourne.sgi.com> Date: Fri, 24 Aug 2007 21:41:11 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12659 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs decontaminate vfs operations from behavior details All vfs ops now take struct xfs_mount pointers and the behaviour related glue is split out into methods of it's own. Signed-off-by: Christoph Hellwig Date: Fri Aug 24 21:40:43 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29504a fs/xfs/xfs_vfsops_bhv.c - 1.1 - new http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vfsops_bhv.c - convert vfs ops to take xfs_mount pointers and split out the behaviour related glue. fs/xfs/xfs_vfsops.h - 1.1 - new http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vfsops.h - convert vfs ops to take xfs_mount pointers and split out the behaviour related glue. fs/xfs/xfs_rw.c - 1.399 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_rw.c.diff?r1=text&tr1=1.399&r2=text&tr2=1.398&f=h - convert vfs ops to take xfs_mount pointers and split out the behaviour related glue. fs/xfs/xfs_vfsops.c - 1.533 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vfsops.c.diff?r1=text&tr1=1.533&r2=text&tr2=1.532&f=h - convert vfs ops to take xfs_mount pointers and split out the behaviour related glue. fs/xfs/xfs_mount.h - 1.245 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.h.diff?r1=text&tr1=1.245&r2=text&tr2=1.244&f=h - convert vfs ops to take xfs_mount pointers and split out the behaviour related glue. fs/xfs/Makefile-linux-2.6 - 1.211 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/Makefile-linux-2.6.diff?r1=text&tr1=1.211&r2=text&tr2=1.210&f=h - convert vfs ops to take xfs_mount pointers and split out the behaviour related glue. fs/xfs/linux-2.6/xfs_super.h - 1.72 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_super.h.diff?r1=text&tr1=1.72&r2=text&tr2=1.71&f=h - convert vfs ops to take xfs_mount pointers and split out the behaviour related glue. fs/xfs/linux-2.6/xfs_super.c - 1.391 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_super.c.diff?r1=text&tr1=1.391&r2=text&tr2=1.390&f=h - convert vfs ops to take xfs_mount pointers and split out the behaviour related glue. From owner-xfs@oss.sgi.com Fri Aug 24 04:56:50 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 04:56:51 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7OBuk4p012759 for ; Fri, 24 Aug 2007 04:56:49 -0700 Received: from hch by pentafluge.infradead.org with local (Exim 4.63 #1 (Red Hat Linux)) id 1IOXSp-00070n-S8; Fri, 24 Aug 2007 12:36:31 +0100 Date: Fri, 24 Aug 2007 12:36:31 +0100 From: Christoph Hellwig To: Vlad Apostolov Cc: linux-xfs@oss.sgi.com Subject: Re: TAKE 969192: Default mount option "noikeep" makes the inode generation number non-persistent Message-ID: <20070824113631.GA26868@infradead.org> References: <46CE581A.2000405@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46CE581A.2000405@sgi.com> User-Agent: Mutt/1.4.2.3i X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 12661 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: xfs On Fri, Aug 24, 2007 at 02:01:30PM +1000, Vlad Apostolov wrote: > To avoid the problem with identical DMAPI handles, the XFSMNT_IDELETE mount > option should be set as default, only if the filesystem is not mounted with > XFSMNT_DMAPI. Note that we have the same problem with nfs exports aswell. Dateo maybe we need a real fix insteead and keep a block of generation numbers around even if and inode cluster is freed or something similar. From owner-xfs@oss.sgi.com Fri Aug 24 04:55:24 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 04:55:26 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7OBtJ4p012391 for ; Fri, 24 Aug 2007 04:55:22 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id VAA00117; Fri, 24 Aug 2007 21:55:14 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 1B53C58C38F1; Fri, 24 Aug 2007 21:55:13 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 969608 - call common xfs vfs-level helpers directly and remove vfs operations Message-Id: <20070824115514.1B53C58C38F1@chook.melbourne.sgi.com> Date: Fri, 24 Aug 2007 21:55:13 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12660 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs call common xfs vfs-level helpers directly and remove vfs operations Also remove the now dead behavior code. Signed-off-by: Christoph Hellwig Date: Fri Aug 24 21:54:45 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29505a fs/xfs/xfsidbg.c - 1.329 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfsidbg.c.diff?r1=text&tr1=1.329&r2=text&tr2=1.328&f=h - remove vfs operations. fs/xfs/xfs_vfsops.c - 1.534 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vfsops.c.diff?r1=text&tr1=1.534&r2=text&tr2=1.533&f=h - remove vfs operations. fs/xfs/xfs_iget.c - 1.231 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_iget.c.diff?r1=text&tr1=1.231&r2=text&tr2=1.230&f=h - remove vfs operations. fs/xfs/xfs_mount.h - 1.246 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.h.diff?r1=text&tr1=1.246&r2=text&tr2=1.245&f=h - remove vfs operations. fs/xfs/xfs_mount.c - 1.405 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.c.diff?r1=text&tr1=1.405&r2=text&tr2=1.404&f=h - remove vfs operations. fs/xfs/xfs_inode.c - 1.477 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.c.diff?r1=text&tr1=1.477&r2=text&tr2=1.476&f=h - remove vfs operations. fs/xfs/Makefile-linux-2.6 - 1.212 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/Makefile-linux-2.6.diff?r1=text&tr1=1.212&r2=text&tr2=1.211&f=h - remove vfs operations. fs/xfs/xfs_behavior.c - 1.27 - deleted http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_behavior.c.diff?r1=text&tr1=1.27&r2=text&tr2=1.26&f=h - remove the now dead behaviour code. fs/xfs/xfs_behavior.h - 1.24 - deleted http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_behavior.h.diff?r1=text&tr1=1.24&r2=text&tr2=1.23&f=h - remove the now dead behaviour code. fs/xfs/linux-2.6/xfs_lrw.h - 1.59 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_lrw.h.diff?r1=text&tr1=1.59&r2=text&tr2=1.58&f=h - remove vfs operations. fs/xfs/linux-2.6/xfs_vfs.h - 1.76 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vfs.h.diff?r1=text&tr1=1.76&r2=text&tr2=1.75&f=h - remove vfs operations. fs/xfs/linux-2.6/xfs_vfs.c - 1.80 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vfs.c.diff?r1=text&tr1=1.80&r2=text&tr2=1.79&f=h - remove vfs operations. fs/xfs/linux-2.6/xfs_linux.h - 1.157 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_linux.h.diff?r1=text&tr1=1.157&r2=text&tr2=1.156&f=h - remove vfs operations. fs/xfs/linux-2.6/xfs_vnode.c - 1.150 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vnode.c.diff?r1=text&tr1=1.150&r2=text&tr2=1.149&f=h - remove vfs operations. fs/xfs/linux-2.6/xfs_super.h - 1.73 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_super.h.diff?r1=text&tr1=1.73&r2=text&tr2=1.72&f=h - remove vfs operations. fs/xfs/linux-2.6/xfs_super.c - 1.392 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_super.c.diff?r1=text&tr1=1.392&r2=text&tr2=1.391&f=h - remove vfs operations. fs/xfs/linux-2.6/xfs_ksyms.c - 1.69 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_ksyms.c.diff?r1=text&tr1=1.69&r2=text&tr2=1.68&f=h - remove vfs operations. fs/xfs/linux-2.6/xfs_export.c - 1.15 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_export.c.diff?r1=text&tr1=1.15&r2=text&tr2=1.14&f=h - remove vfs operations. fs/xfs/dmapi/xfs_dm_fsops.c - 1.11 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm_fsops.c.diff?r1=text&tr1=1.11&r2=text&tr2=1.10&f=h - remove vfs operations. fs/xfs/xfs_vfsops_bhv.c - 1.2 - deleted http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vfsops_bhv.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.1&f=h - remove vfs operations. fs/xfs/xfs_vfsops.h - 1.2 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vfsops.h.diff?r1=text&tr1=1.2&r2=text&tr2=1.1&f=h - remove vfs operations. From owner-xfs@oss.sgi.com Fri Aug 24 05:00:21 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 05:00:23 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7OC0E4p013827 for ; Fri, 24 Aug 2007 05:00:20 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id WAA00318; Fri, 24 Aug 2007 22:00:09 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 931A058C38F1; Fri, 24 Aug 2007 22:00:09 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 969608 - kill the vfs_fsid and vfs_altfsid members in struct bhv_vfs Message-Id: <20070824120009.931A058C38F1@chook.melbourne.sgi.com> Date: Fri, 24 Aug 2007 22:00:09 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12662 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs kill the vfs_fsid and vfs_altfsid members in struct bhv_vfs vfs_altfsid was just a pointer to mp->m_fixedfsid so we can trivially replace it with the latter. vfs_fsid also was identicaly to m_fixedfsid through rather obsfucated ways so we can kill it aswell and simply it's only user. Signed-off-by: Christoph Hellwig Date: Fri Aug 24 21:59:32 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29506a fs/xfs/xfs_mount.c - 1.406 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.c.diff?r1=text&tr1=1.406&r2=text&tr2=1.405&f=h - remove vfs_fsid and vfs_altfsid. fs/xfs/xfs_error.c - 1.58 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_error.c.diff?r1=text&tr1=1.58&r2=text&tr2=1.57&f=h - remove vfs_fsid and vfs_altfsid. fs/xfs/xfs_error.h - 1.48 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_error.h.diff?r1=text&tr1=1.48&r2=text&tr2=1.47&f=h - remove vfs_fsid and vfs_altfsid. fs/xfs/linux-2.6/xfs_ioctl.c - 1.151 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_ioctl.c.diff?r1=text&tr1=1.151&r2=text&tr2=1.150&f=h - remove vfs_fsid and vfs_altfsid. fs/xfs/linux-2.6/xfs_vfs.h - 1.77 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vfs.h.diff?r1=text&tr1=1.77&r2=text&tr2=1.76&f=h - remove vfs_fsid and vfs_altfsid. fs/xfs/dmapi/xfs_dm_fsops.c - 1.12 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm_fsops.c.diff?r1=text&tr1=1.12&r2=text&tr2=1.11&f=h - remove vfs_fsid and vfs_altfsid. fs/xfs/dmapi/xfs_dm.c - 1.50 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm.c.diff?r1=text&tr1=1.50&r2=text&tr2=1.49&f=h - remove vfs_fsid and vfs_altfsid. From owner-xfs@oss.sgi.com Fri Aug 24 05:10:24 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 05:10:26 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7OCAL4p015856 for ; Fri, 24 Aug 2007 05:10:23 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id WAA00588; Fri, 24 Aug 2007 22:10:17 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id AA07A58C38F1; Fri, 24 Aug 2007 22:10:17 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 969608 - kill the vfs_flags member in struct bhv_vfs Message-Id: <20070824121017.AA07A58C38F1@chook.melbourne.sgi.com> Date: Fri, 24 Aug 2007 22:10:17 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12663 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs kill the vfs_flags member in struct bhv_vfs All flags are added to xfs_mount's m_flag instead. Note that the 32bit inode flag was duplicated in both of them, but only cleared in the mount when it was not nessecary due to the filesystem beeing small enough. Two flags are still required here - one to indicate the mount option setting, and one to indicate if it applies or not. Signed-off-by: Christoph Hellwig Date: Fri Aug 24 22:09:46 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29507a fs/xfs/xfsidbg.c - 1.330 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfsidbg.c.diff?r1=text&tr1=1.330&r2=text&tr2=1.329&f=h - move vfs_flags to xfs_mount. fs/xfs/xfs_log.c - 1.335 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_log.c.diff?r1=text&tr1=1.335&r2=text&tr2=1.334&f=h - move vfs_flags to xfs_mount. fs/xfs/xfs_vnodeops.c - 1.716 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vnodeops.c.diff?r1=text&tr1=1.716&r2=text&tr2=1.715&f=h - move vfs_flags to xfs_mount. fs/xfs/xfs_dmapi.h - 1.62 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_dmapi.h.diff?r1=text&tr1=1.62&r2=text&tr2=1.61&f=h - move vfs_flags to xfs_mount. fs/xfs/xfs_vfsops.c - 1.535 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vfsops.c.diff?r1=text&tr1=1.535&r2=text&tr2=1.534&f=h - move vfs_flags to xfs_mount. fs/xfs/xfs_mount.h - 1.247 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.h.diff?r1=text&tr1=1.247&r2=text&tr2=1.246&f=h - move vfs_flags to xfs_mount. fs/xfs/xfs_mount.c - 1.407 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.c.diff?r1=text&tr1=1.407&r2=text&tr2=1.406&f=h - move vfs_flags to xfs_mount. fs/xfs/xfs_inode.c - 1.478 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.c.diff?r1=text&tr1=1.478&r2=text&tr2=1.477&f=h - move vfs_flags to xfs_mount. fs/xfs/xfs_inode.h - 1.232 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_inode.h.diff?r1=text&tr1=1.232&r2=text&tr2=1.231&f=h - move vfs_flags to xfs_mount. fs/xfs/xfs_qmops.c - 1.17 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_qmops.c.diff?r1=text&tr1=1.17&r2=text&tr2=1.16&f=h - move vfs_flags to xfs_mount. fs/xfs/quota/xfs_qm_syscalls.c - 1.35 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/quota/xfs_qm_syscalls.c.diff?r1=text&tr1=1.35&r2=text&tr2=1.34&f=h - move vfs_flags to xfs_mount. fs/xfs/quota/xfs_qm.c - 1.54 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/quota/xfs_qm.c.diff?r1=text&tr1=1.54&r2=text&tr2=1.53&f=h - move vfs_flags to xfs_mount. fs/xfs/linux-2.6/xfs_vfs.h - 1.78 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vfs.h.diff?r1=text&tr1=1.78&r2=text&tr2=1.77&f=h - move vfs_flags to xfs_mount. fs/xfs/linux-2.6/xfs_vfs.c - 1.81 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vfs.c.diff?r1=text&tr1=1.81&r2=text&tr2=1.80&f=h - move vfs_flags to xfs_mount. fs/xfs/linux-2.6/xfs_file.c - 1.156 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_file.c.diff?r1=text&tr1=1.156&r2=text&tr2=1.155&f=h - move vfs_flags to xfs_mount. fs/xfs/linux-2.6/xfs_super.c - 1.393 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_super.c.diff?r1=text&tr1=1.393&r2=text&tr2=1.392&f=h - move vfs_flags to xfs_mount. fs/xfs/linux-2.6/xfs_export.c - 1.16 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_export.c.diff?r1=text&tr1=1.16&r2=text&tr2=1.15&f=h - move vfs_flags to xfs_mount. fs/xfs/dmapi/xfs_dm.c - 1.51 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm.c.diff?r1=text&tr1=1.51&r2=text&tr2=1.50&f=h - move vfs_flags to xfs_mount. From owner-xfs@oss.sgi.com Fri Aug 24 05:13:59 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 05:14:01 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7OCDt4p016875 for ; Fri, 24 Aug 2007 05:13:57 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id WAA00633; Fri, 24 Aug 2007 22:13:50 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 6E88A58C38F1; Fri, 24 Aug 2007 22:13:50 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 969608 - move syncing related members from struct bhv_vfs to struct xfs_mount Message-Id: <20070824121350.6E88A58C38F1@chook.melbourne.sgi.com> Date: Fri, 24 Aug 2007 22:13:50 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12664 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs move syncing related members from struct bhv_vfs to struct xfs_mount Signed-off-by: Christoph Hellwig Date: Fri Aug 24 22:13:23 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29508a fs/xfs/xfs_mount.h - 1.248 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.h.diff?r1=text&tr1=1.248&r2=text&tr2=1.247&f=h - move sync-related members of bhv_vfs to xfs_mount. fs/xfs/linux-2.6/xfs_vfs.h - 1.79 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vfs.h.diff?r1=text&tr1=1.79&r2=text&tr2=1.78&f=h - move sync-related members of bhv_vfs to xfs_mount. fs/xfs/linux-2.6/xfs_vfs.c - 1.82 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vfs.c.diff?r1=text&tr1=1.82&r2=text&tr2=1.81&f=h - move sync-related members of bhv_vfs to xfs_mount. fs/xfs/linux-2.6/xfs_super.c - 1.394 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_super.c.diff?r1=text&tr1=1.394&r2=text&tr2=1.393&f=h - move sync-related members of bhv_vfs to xfs_mount. From owner-xfs@oss.sgi.com Fri Aug 24 05:18:34 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 05:18:35 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7OCIR4p017868 for ; Fri, 24 Aug 2007 05:18:33 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id WAA00843; Fri, 24 Aug 2007 22:18:23 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id 555CF58C38F1; Fri, 24 Aug 2007 22:18:23 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: TAKE 969608 - kill struct bhv_vfs Message-Id: <20070824121823.555CF58C38F1@chook.melbourne.sgi.com> Date: Fri, 24 Aug 2007 22:18:23 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12665 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs kill struct bhv_vfs Now that struct bhv_vfs doesn't have any members left we can kill it and go directly from the super_block to the xfs_mount everywhere. Signed-off-by: Christoph Hellwig Date: Fri Aug 24 22:17:45 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29509a fs/xfs/xfsidbg.c - 1.331 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfsidbg.c.diff?r1=text&tr1=1.331&r2=text&tr2=1.330&f=h - remove struct bhv_vfs and go directly to the superblock. fs/xfs/xfs_iocore.c - 1.53 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_iocore.c.diff?r1=text&tr1=1.53&r2=text&tr2=1.52&f=h - remove struct bhv_vfs and go directly to the superblock. fs/xfs/xfs_vfsops.c - 1.536 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vfsops.c.diff?r1=text&tr1=1.536&r2=text&tr2=1.535&f=h - remove struct bhv_vfs and go directly to the superblock. fs/xfs/xfs_iget.c - 1.232 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_iget.c.diff?r1=text&tr1=1.232&r2=text&tr2=1.231&f=h - remove struct bhv_vfs and go directly to the superblock. fs/xfs/xfs_mount.h - 1.249 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.h.diff?r1=text&tr1=1.249&r2=text&tr2=1.248&f=h - remove struct bhv_vfs and go directly to the superblock. fs/xfs/xfs_mount.c - 1.408 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.c.diff?r1=text&tr1=1.408&r2=text&tr2=1.407&f=h - remove struct bhv_vfs and go directly to the superblock. fs/xfs/xfs_trans.c - 1.183 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_trans.c.diff?r1=text&tr1=1.183&r2=text&tr2=1.182&f=h - remove struct bhv_vfs and go directly to the superblock. fs/xfs/xfs_fsops.c - 1.129 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_fsops.c.diff?r1=text&tr1=1.129&r2=text&tr2=1.128&f=h - remove struct bhv_vfs and go directly to the superblock. fs/xfs/Makefile-linux-2.6 - 1.213 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/Makefile-linux-2.6.diff?r1=text&tr1=1.213&r2=text&tr2=1.212&f=h - remove struct bhv_vfs and go directly to the superblock. fs/xfs/linux-2.6/xfs_lrw.c - 1.266 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_lrw.c.diff?r1=text&tr1=1.266&r2=text&tr2=1.265&f=h - remove struct bhv_vfs and go directly to the superblock. fs/xfs/linux-2.6/xfs_vfs.h - 1.80 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vfs.h.diff?r1=text&tr1=1.80&r2=text&tr2=1.79&f=h - remove struct bhv_vfs and go directly to the superblock. fs/xfs/linux-2.6/xfs_vfs.c - 1.83 - deleted http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vfs.c.diff?r1=text&tr1=1.83&r2=text&tr2=1.82&f=h - remove struct bhv_vfs and go directly to the superblock. fs/xfs/linux-2.6/xfs_vnode.h - 1.138 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_vnode.h.diff?r1=text&tr1=1.138&r2=text&tr2=1.137&f=h - remove struct bhv_vfs and go directly to the superblock. fs/xfs/linux-2.6/xfs_super.h - 1.74 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_super.h.diff?r1=text&tr1=1.74&r2=text&tr2=1.73&f=h - remove struct bhv_vfs and go directly to the superblock. fs/xfs/linux-2.6/xfs_super.c - 1.395 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_super.c.diff?r1=text&tr1=1.395&r2=text&tr2=1.394&f=h - remove struct bhv_vfs and go directly to the superblock. fs/xfs/linux-2.6/xfs_ksyms.c - 1.70 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_ksyms.c.diff?r1=text&tr1=1.70&r2=text&tr2=1.69&f=h - remove struct bhv_vfs and go directly to the superblock. fs/xfs/dmapi/xfs_dm.c - 1.52 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/dmapi/xfs_dm.c.diff?r1=text&tr1=1.52&r2=text&tr2=1.51&f=h - remove struct bhv_vfs and go directly to the superblock. From owner-xfs@oss.sgi.com Fri Aug 24 05:49:48 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 05:49:50 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7OCnj4p023883 for ; Fri, 24 Aug 2007 05:49:47 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id WAA01573; Fri, 24 Aug 2007 22:49:36 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l7OCnZeW78036723; Fri, 24 Aug 2007 22:49:36 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l7OCnX9p76765282; Fri, 24 Aug 2007 22:49:33 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Fri, 24 Aug 2007 22:49:33 +1000 From: David Chinner To: Christoph Hellwig Cc: Vlad Apostolov , linux-xfs@oss.sgi.com Subject: Re: TAKE 969192: Default mount option "noikeep" makes the inode generation number non-persistent Message-ID: <20070824124933.GS61154114@sgi.com> References: <46CE581A.2000405@sgi.com> <20070824113631.GA26868@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070824113631.GA26868@infradead.org> User-Agent: Mutt/1.4.2.1i X-archive-position: 12666 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Fri, Aug 24, 2007 at 12:36:31PM +0100, Christoph Hellwig wrote: > On Fri, Aug 24, 2007 at 02:01:30PM +1000, Vlad Apostolov wrote: > > To avoid the problem with identical DMAPI handles, the XFSMNT_IDELETE mount > > option should be set as default, only if the filesystem is not mounted with > > XFSMNT_DMAPI. > > Note that we have the same problem with nfs exports aswell. Dateo maybe we > need a real fix insteead and keep a block of generation numbers around even > if and inode cluster is freed or something similar. Yes. NFS is less critical than dmapi, though - with NFS filehandles just a change in generation number is usually good enough to catch most stale filehandle issues. With DMAPI, there's applications that record inode number/generation pairs and expect them never to repeat ever again. We haven't had any reports of probelms with NFS servers due to this, but as soon as our HSm was exposed to this code we started getting strange coherency and corruption problems that have taken some time to track down to this issue. Hence this change seems like the best tradeoff while we work out a real solution. At this point I suspect a deleted inode cluster btree in the AGI is the best solution because it can share most of the btree code with the current AGI btree and keeps the granularity of shared generation numbers quite fine. Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Fri Aug 24 06:24:01 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 06:24:03 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7ODNv4p029837 for ; Fri, 24 Aug 2007 06:24:00 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id XAA02407; Fri, 24 Aug 2007 23:23:51 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id B1AA158C38F1; Fri, 24 Aug 2007 23:23:51 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: TAKE 967795 - fix filestreams on 32-bit boxes Message-Id: <20070824132351.B1AA158C38F1@chook.melbourne.sgi.com> Date: Fri, 24 Aug 2007 23:23:51 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12667 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs fix filestreams on 32-bit boxes xfs_filestream_mount() sets up an mru cache with: err = xfs_mru_cache_create(&mp->m_filestream, lifetime, grp_count, (xfs_mru_cache_free_func_t)xfs_fstrm_free_func); but that cast is causing problems... typedef void (*xfs_mru_cache_free_func_t)(unsigned long, void*); but: void xfs_fstrm_free_func( xfs_ino_t ino, fstrm_item_t *item) so on a 32-bit box, it's casting (32, 32) args into (64, 32) and I assume it's getting garbage for *item, which subsequently causes an explosion. With this change the filestreams xfsqa tests don't oops on my 32-bit box. Signed-off-by: Eric Sandeen Date: Fri Aug 24 23:23:27 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: sandeen@sandeen.net The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29510a fs/xfs/xfs_filestream.c - 1.3 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_filestream.c.diff?r1=text&tr1=1.3&r2=text&tr2=1.2&f=h - clean up item freeing callback to use correct interface. prevents panics on 32 bit platforms. From owner-xfs@oss.sgi.com Fri Aug 24 06:40:01 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 06:40:02 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7ODdv4p032595 for ; Fri, 24 Aug 2007 06:40:00 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id XAA02745; Fri, 24 Aug 2007 23:39:53 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id D494158C38F1; Fri, 24 Aug 2007 23:39:52 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - replace some large xfs_log_priv.h macros by proper functions Message-Id: <20070824133952.D494158C38F1@chook.melbourne.sgi.com> Date: Fri, 24 Aug 2007 23:39:52 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12668 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs replace some large xfs_log_priv.h macros by proper functions ... or in the case of XLOG_TIC_ADD_OPHDR remove a useless macro entirely. Signed-off-by: Christoph Hellwig Date: Fri Aug 24 23:39:27 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29511a fs/xfs/xfs_log.c - 1.336 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_log.c.diff?r1=text&tr1=1.336&r2=text&tr2=1.335&f=h - convert some large macros to functions. fs/xfs/xfs_log_priv.h - 1.120 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_log_priv.h.diff?r1=text&tr1=1.120&r2=text&tr2=1.119&f=h - convert some large macros to functions. From owner-xfs@oss.sgi.com Fri Aug 24 06:46:09 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 06:46:11 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7ODk64p001632 for ; Fri, 24 Aug 2007 06:46:08 -0700 Received: from chook.melbourne.sgi.com (chook.melbourne.sgi.com [134.14.54.237]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id XAA02979; Fri, 24 Aug 2007 23:46:01 +1000 Received: by chook.melbourne.sgi.com (Postfix, from userid 16346) id AF28D58C38F1; Fri, 24 Aug 2007 23:46:01 +1000 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: PARTIAL TAKE 968563 - growlock should be a mutex Message-Id: <20070824134601.AF28D58C38F1@chook.melbourne.sgi.com> Date: Fri, 24 Aug 2007 23:46:01 +1000 (EST) From: dgc@sgi.com (David Chinner) X-archive-position: 12669 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs growlock should be a mutex m_growlock only needs plain binary mutex semantics, so use a struct mutex instead of a semaphore for it. Signed-off-by: Christoph Hellwig Date: Fri Aug 24 23:45:37 AEST 2007 Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs Inspected by: hch@lst.de The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb Modid: xfs-linux-melb:xfs-kern:29512a fs/xfs/xfs_mount.h - 1.250 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.h.diff?r1=text&tr1=1.250&r2=text&tr2=1.249&f=h - convert m_growlock to a mutex. fs/xfs/xfs_mount.c - 1.409 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.c.diff?r1=text&tr1=1.409&r2=text&tr2=1.408&f=h - convert m_growlock to a mutex. fs/xfs/xfs_fsops.c - 1.130 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_fsops.c.diff?r1=text&tr1=1.130&r2=text&tr2=1.129&f=h - convert m_growlock to a mutex. From owner-xfs@oss.sgi.com Fri Aug 24 07:08:37 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 07:08:39 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7OE8X4p006056 for ; Fri, 24 Aug 2007 07:08:36 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id AAA03677; Sat, 25 Aug 2007 00:08:26 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l7OE8PeW77764087; Sat, 25 Aug 2007 00:08:25 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l7OE8Nvo78063557; Sat, 25 Aug 2007 00:08:23 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Sat, 25 Aug 2007 00:08:23 +1000 From: David Chinner To: Eric Sandeen Cc: xfs-oss Subject: Re: [PATCH] optimize XFS_IS_REALTIME_INODE w/o realtime config Message-ID: <20070824140822.GP72985246@sgi.com> References: <46C7627A.60503@sandeen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46C7627A.60503@sandeen.net> User-Agent: Mutt/1.4.2.1i X-archive-position: 12670 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Sat, Aug 18, 2007 at 04:19:54PM -0500, Eric Sandeen wrote: > Use XFS_IS_REALTIME_INODE in more places, and #define it to > 0 if CONFIG_XFS_RT is off. This should be safe because mount > checks in xfs_rtmount_init: > > # define xfs_rtmount_init(m) (((mp)->m_sb.sb_rblocks == 0)? 0 : (ENOSYS)) > > so if we get mounted w/o CONFIG_XFS_RT, no realtime inodes should > be encountered after that. > > Defining XFS_IS_REALTIME_INODE to 0 saves a bit of stack space, > presumeably gcc can optimize around the various "if (0)" type > checks: > > xfs_alloc_file_space -8 > xfs_bmap_adjacent -16 > xfs_bmapi -8 > xfs_bmap_rtalloc -16 > xfs_bunmapi -28 > xfs_free_file_space -64 > xfs_imap +8 <-- ? hmm. > xfs_iomap_write_direct -12 > xfs_qm_dqusage_adjust -4 > xfs_qm_vop_chown_reserve -4 > > Compile tested only at this point. This misses a bunch of tests (at least in the current tot) in xfs_bmap.c, xfs_bmap_btree.c, xfs_iget.c, dmapi/xfs_dm.c and linux-2.6/xfs_lrw.c. I think they are all in assert statements, but shoul dbe cleaned up as well. Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Fri Aug 24 09:01:42 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 09:01:44 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=AWL,BAYES_20 autolearn=ham version=3.2.0-pre1-r499012 Received: from smtp118.sbc.mail.sp1.yahoo.com (smtp118.sbc.mail.sp1.yahoo.com [69.147.64.91]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7OG1d4p030520 for ; Fri, 24 Aug 2007 09:01:42 -0700 Received: (qmail 978 invoked from network); 24 Aug 2007 15:34:59 -0000 Received: from unknown (HELO stupidest.org) (cwedgwood@sbcglobal.net@24.5.75.45 with login) by smtp118.sbc.mail.sp1.yahoo.com with SMTP; 24 Aug 2007 15:34:58 -0000 X-YMail-OSG: Wa4GXGEVM1kbttEchqv2Mj7IiJaUH1RQ37IsNZN2Y0ZSC53E02sfcvEpD6_JoA2Lq7.ceiYK3g-- Received: by tuatara.stupidest.org (Postfix, from userid 10000) id 01F5128398BD; Fri, 24 Aug 2007 08:35:56 -0700 (PDT) Date: Fri, 24 Aug 2007 08:35:56 -0700 From: Chris Wedgwood To: Mike Ashton Cc: xfs@oss.sgi.com, Eric Sandeen Subject: Re: XFS and 4k stacks/newer kernels. Message-ID: <20070824153556.GA14476@puku.stupidest.org> References: <20070824103846.GC13240@fysh.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070824103846.GC13240@fysh.org> X-archive-position: 12671 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: cw@f00f.org Precedence: bulk X-list: xfs On Fri, Aug 24, 2007 at 11:38:47AM +0100, Mike Ashton wrote: > I've just set up a new one based on exactly the same hardware but > with a 2.6.22.3 kernel (and thus with compulsory 4k stacks, as I > understand it?). Not when I tested here. Turn off 4K stacks. > After giving it half an hour to wake up again, I hard rebooted and > the XFS superblock was unreadable; bye bye filesystem. Did xfs_repair fix the damage? > So I've rolled back to 2.6.19, unsurprisingly, but I wanted to let > you know that some issues with 4k stacks or other features of newer > kernels may not have been resolved yet. XFS on i386 with 4K stacks isn't safe. People are working on making it better but it's a bit of an uphill battle in some ways. I've posted patches in the past to change of some the config logic to avoid this but none of them ever got much more than a grunt ora snarky anti-XFS comment, it's probably time to do it again. From owner-xfs@oss.sgi.com Fri Aug 24 10:53:33 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 10:53:35 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7OHrT4p018151 for ; Fri, 24 Aug 2007 10:53:33 -0700 Received: from Liberator.local (unknown [10.0.0.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id CD49C18DF3769; Fri, 24 Aug 2007 12:53:28 -0500 (CDT) Message-ID: <46CF1B22.7090007@sandeen.net> Date: Fri, 24 Aug 2007 12:53:38 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: David Chinner CC: xfs-oss Subject: [PATCH V2] optimize XFS_IS_REALTIME_INODE w/o realtime config References: <46C7627A.60503@sandeen.net> <20070824140822.GP72985246@sgi.com> In-Reply-To: <20070824140822.GP72985246@sgi.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-archive-position: 12672 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs David Chinner wrote: > > This misses a bunch of tests (at least in the current tot) > in xfs_bmap.c, xfs_bmap_btree.c, xfs_iget.c, dmapi/xfs_dm.c and > linux-2.6/xfs_lrw.c. I think they are all in assert statements, > but shoul dbe cleaned up as well. > > Cheers, > > Dave. > Yup, sorry. Here you go: --------------- Use XFS_IS_REALTIME_INODE in more places, and #define it to 0 if CONFIG_XFS_RT is off. This should be safe because mount checks in xfs_rtmount_init: # define xfs_rtmount_init(m) (((mp)->m_sb.sb_rblocks == 0)? 0 : (ENOSYS)) so if we get mounted w/o CONFIG_XFS_RT, no realtime inodes should be encountered after that. Defining XFS_IS_REALTIME_INODE to 0 saves a bit of stack space, presumeably gcc can optimize around the various "if (0)" type checks: xfs_alloc_file_space -8 xfs_bmap_adjacent -16 xfs_bmapi -8 xfs_bmap_rtalloc -16 xfs_bunmapi -28 xfs_free_file_space -64 xfs_imap +8 <-- ? hmm. xfs_iomap_write_direct -12 xfs_qm_dqusage_adjust -4 xfs_qm_vop_chown_reserve -4 Signed-off-by: Eric Sandeen Index: linux-2.6-xfs/fs/xfs/xfs_rtalloc.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_rtalloc.h +++ linux-2.6-xfs/fs/xfs/xfs_rtalloc.h @@ -21,8 +21,6 @@ struct xfs_mount; struct xfs_trans; -#define XFS_IS_REALTIME_INODE(ip) ((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME) - /* Min and max rt extent sizes, specified in bytes */ #define XFS_MAX_RTEXTSIZE (1024 * 1024 * 1024) /* 1GB */ #define XFS_DFL_RTEXTSIZE (64 * 1024) /* 64KB */ Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_ioctl.c +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c @@ -758,7 +758,7 @@ xfs_ioctl( case XFS_IOC_DIOINFO: { struct dioattr da; xfs_buftarg_t *target = - (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) ? + XFS_IS_REALTIME_INODE(ip) ? mp->m_rtdev_targp : mp->m_ddev_targp; da.d_mem = da.d_miniosz = 1 << target->bt_sshift; Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_lrw.c +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c @@ -216,7 +216,7 @@ xfs_read( if (unlikely(ioflags & IO_ISDIRECT)) { xfs_buftarg_t *target = - (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) ? + XFS_IS_REALTIME_INODE(ip) ? mp->m_rtdev_targp : mp->m_ddev_targp; if ((*offset & target->bt_smask) || (size & target->bt_smask)) { @@ -735,7 +735,7 @@ start: if (ioflags & IO_ISDIRECT) { xfs_buftarg_t *target = - (xip->i_d.di_flags & XFS_DIFLAG_REALTIME) ? + XFS_IS_REALTIME_INODE(xip) ? mp->m_rtdev_targp : mp->m_ddev_targp; if ((pos & target->bt_smask) || (count & target->bt_smask)) { @@ -976,7 +976,7 @@ xfs_bmap( xfs_iocore_t *io = &ip->i_iocore; ASSERT((ip->i_d.di_mode & S_IFMT) == S_IFREG); - ASSERT(((ip->i_d.di_flags & XFS_DIFLAG_REALTIME) != 0) == + ASSERT((XFS_IS_REALTIME_INODE(ip) != 0) == ((ip->i_iocore.io_flags & XFS_IOCORE_RT) != 0)); return xfs_iomap(io, offset, count, flags, iomapp, niomaps); Index: linux-2.6-xfs/fs/xfs/xfs_dfrag.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_dfrag.c +++ linux-2.6-xfs/fs/xfs/xfs_dfrag.c @@ -185,8 +185,7 @@ xfs_swap_extents( } /* Verify both files are either real-time or non-realtime */ - if ((ip->i_d.di_flags & XFS_DIFLAG_REALTIME) != - (tip->i_d.di_flags & XFS_DIFLAG_REALTIME)) { + if (XFS_IS_REALTIME_INODE(ip) != XFS_IS_REALTIME_INODE(tip)) { error = XFS_ERROR(EINVAL); goto error0; } Index: linux-2.6-xfs/fs/xfs/xfs_iocore.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_iocore.c +++ linux-2.6-xfs/fs/xfs/xfs_iocore.c @@ -94,7 +94,7 @@ xfs_iocore_inode_reinit( xfs_iocore_t *io = &ip->i_iocore; io->io_flags = 0; - if (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) + if (XFS_IS_REALTIME_INODE(ip)) io->io_flags |= XFS_IOCORE_RT; io->io_dmevmask = ip->i_d.di_dmevmask; io->io_dmstate = ip->i_d.di_dmstate; Index: linux-2.6-xfs/fs/xfs/xfs_rw.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_rw.h +++ linux-2.6-xfs/fs/xfs/xfs_rw.h @@ -32,7 +32,7 @@ struct xfs_mount; static inline xfs_daddr_t xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb) { - return (((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME) ? \ + return (XFS_IS_REALTIME_INODE(ip) ? \ (xfs_daddr_t)XFS_FSB_TO_BB((ip)->i_mount, (fsb)) : \ XFS_FSB_TO_DADDR((ip)->i_mount, (fsb))); } @@ -61,7 +61,7 @@ xfs_get_extsz_hint( { xfs_extlen_t extsz; - if (unlikely(ip->i_d.di_flags & XFS_DIFLAG_REALTIME)) { + if (unlikely(XFS_IS_REALTIME_INODE(ip))) { extsz = (ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE) ? ip->i_d.di_extsize : ip->i_mount->m_sb.sb_rextsize; Index: linux-2.6-xfs/fs/xfs/xfs_vnodeops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vnodeops.c +++ linux-2.6-xfs/fs/xfs/xfs_vnodeops.c @@ -136,7 +136,7 @@ xfs_getattr( default: vap->va_rdev = 0; - if (!(ip->i_d.di_flags & XFS_DIFLAG_REALTIME)) { + if (!(XFS_IS_REALTIME_INODE(ip))) { vap->va_blocksize = xfs_preferred_iosize(mp); } else { @@ -508,7 +508,7 @@ xfs_setattr( */ if ((ip->i_d.di_nextents || ip->i_delayed_blks) && (mask & XFS_AT_XFLAGS) && - (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) != + (XFS_IS_REALTIME_INODE(ip)) != (vap->va_xflags & XFS_XFLAG_REALTIME)) { code = XFS_ERROR(EINVAL); /* EFBIG? */ goto error_return; @@ -520,7 +520,7 @@ xfs_setattr( if ((mask & XFS_AT_EXTSIZE) && vap->va_extsize != 0) { xfs_extlen_t size; - if ((ip->i_d.di_flags & XFS_DIFLAG_REALTIME) || + if (XFS_IS_REALTIME_INODE(ip) || ((mask & XFS_AT_XFLAGS) && (vap->va_xflags & XFS_XFLAG_REALTIME))) { size = mp->m_sb.sb_rextsize << @@ -1146,7 +1146,7 @@ xfs_fsync( * If this inode is on the RT dev we need to flush that * cache as well. */ - if (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) + if (XFS_IS_REALTIME_INODE(ip)) xfs_blkdev_issue_flush(ip->i_mount->m_rtdev_targp); } @@ -4068,7 +4068,7 @@ xfs_zero_remaining_bytes( int error = 0; bp = xfs_buf_get_noaddr(mp->m_sb.sb_blocksize, - ip->i_d.di_flags & XFS_DIFLAG_REALTIME ? + XFS_IS_REALTIME_INODE(ip) ? mp->m_rtdev_targp : mp->m_ddev_targp); for (offset = startoff; offset <= endoff; offset = lastoffset + 1) { @@ -4165,7 +4165,7 @@ xfs_free_file_space( error = 0; if (len <= 0) /* if nothing being freed */ return error; - rt = (ip->i_d.di_flags & XFS_DIFLAG_REALTIME); + rt = XFS_IS_REALTIME_INODE(ip); startoffset_fsb = XFS_B_TO_FSB(mp, offset); end_dmi_offset = offset + len; endoffset_fsb = XFS_B_TO_FSBT(mp, end_dmi_offset); Index: linux-2.6-xfs/fs/xfs/xfs_dinode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_dinode.h +++ linux-2.6-xfs/fs/xfs/xfs_dinode.h @@ -273,6 +273,12 @@ typedef enum xfs_dinode_fmt #define XFS_DIFLAG_NODEFRAG (1 << XFS_DIFLAG_NODEFRAG_BIT) #define XFS_DIFLAG_FILESTREAM (1 << XFS_DIFLAG_FILESTREAM_BIT) +#ifdef CONFIG_XFS_RT +#define XFS_IS_REALTIME_INODE(ip) ((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME) +#else +#define XFS_IS_REALTIME_INODE(ip) (0) +#endif + #define XFS_DIFLAG_ANY \ (XFS_DIFLAG_REALTIME | XFS_DIFLAG_PREALLOC | XFS_DIFLAG_NEWRTBM | \ XFS_DIFLAG_IMMUTABLE | XFS_DIFLAG_APPEND | XFS_DIFLAG_SYNC | \ Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm.c +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c @@ -1107,7 +1107,7 @@ xfs_dm_direct_ok( /* Realtime files can ONLY do direct I/O. */ - if (ip->i_d.di_flags & XFS_DIFLAG_REALTIME) + if (XFS_IS_REALTIME_INODE(ip)) return(1); /* If direct I/O is disabled, or if the request is too small, use Index: linux-2.6-xfs/fs/xfs/xfs_bmap.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_bmap.c +++ linux-2.6-xfs/fs/xfs/xfs_bmap.c @@ -2969,7 +2969,7 @@ STATIC int xfs_bmap_alloc( xfs_bmalloca_t *ap) /* bmap alloc argument struct */ { - if ((ap->ip->i_d.di_flags & XFS_DIFLAG_REALTIME) && ap->userdata) + if (XFS_IS_REALTIME_INODE(ap->ip) && ap->userdata) return xfs_bmap_rtalloc(ap); return xfs_bmap_btalloc(ap); } @@ -3096,8 +3096,7 @@ xfs_bmap_del_extent( /* * Realtime allocation. Free it and record di_nblocks update. */ - if (whichfork == XFS_DATA_FORK && - (ip->i_d.di_flags & XFS_DIFLAG_REALTIME)) { + if (whichfork == XFS_DATA_FORK && XFS_IS_REALTIME_INODE(ip)) { xfs_fsblock_t bno; xfs_filblks_t len; Index: linux-2.6-xfs/fs/xfs/xfs_bmap_btree.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_bmap_btree.c +++ linux-2.6-xfs/fs/xfs/xfs_bmap_btree.c @@ -2062,8 +2062,7 @@ xfs_bmbt_insert( pcur->bc_private.b.allocated; pcur->bc_private.b.allocated = 0; ASSERT((cur->bc_private.b.firstblock != NULLFSBLOCK) || - (cur->bc_private.b.ip->i_d.di_flags & - XFS_DIFLAG_REALTIME)); + XFS_IS_REALTIME_INODE(cur->bc_private.b.ip)); cur->bc_private.b.firstblock = pcur->bc_private.b.firstblock; ASSERT(cur->bc_private.b.flist == Index: linux-2.6-xfs/fs/xfs/xfs_iget.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_iget.c +++ linux-2.6-xfs/fs/xfs/xfs_iget.c @@ -333,7 +333,7 @@ finish_inode: ASSERT(ip->i_df.if_ext_max == XFS_IFORK_DSIZE(ip) / sizeof(xfs_bmbt_rec_t)); - ASSERT(((ip->i_d.di_flags & XFS_DIFLAG_REALTIME) != 0) == + ASSERT((XFS_IS_REALTIME_INODE(ip) != 0) == ((ip->i_iocore.io_flags & XFS_IOCORE_RT) != 0)); xfs_iflags_set(ip, XFS_IMODIFIED); Index: linux-2.6-xfs/fs/xfs/xfs_inode.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_inode.c +++ linux-2.6-xfs/fs/xfs/xfs_inode.c @@ -1298,7 +1298,7 @@ xfs_isize_check( if ((ip->i_d.di_mode & S_IFMT) != S_IFREG) return; - if (ip->i_d.di_flags & (XFS_DIFLAG_REALTIME | XFS_DIFLAG_EXTSIZE)) + if (XFS_IS_REALTIME_INODE(ip) || (ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE)) return; nimaps = 2; From owner-xfs@oss.sgi.com Fri Aug 24 12:19:11 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 12:19:13 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_45 autolearn=no version=3.2.0-pre1-r499012 Received: from mx1.pretago.de (mx1.pretago.de [89.110.132.151]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7OJJ64p002491 for ; Fri, 24 Aug 2007 12:19:11 -0700 Received: from localhost (localhost [127.0.0.1]) by mx1.pretago.de (Postfix) with ESMTP id 567A72EC03B; Fri, 24 Aug 2007 21:19:05 +0200 (CEST) X-Virus-Scanned: scanned for viruses... should be clean Received: from mx1.pretago.de ([127.0.0.1]) by localhost (mx1.pretago.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BbilrOuRGvD8; Fri, 24 Aug 2007 21:19:04 +0200 (CEST) Received: from gondolin.gammarayburst.de (unknown [87.127.185.82]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: p127p4) by mx1.pretago.de (Postfix) with ESMTP id C1E462EC029; Fri, 24 Aug 2007 21:19:04 +0200 (CEST) From: Markus Schoder To: David Chinner Subject: Re: XFS internal error XFS_WANT_CORRUPTED_RETURN Date: Fri, 24 Aug 2007 20:19:04 +0100 User-Agent: KMail/1.9.7 Cc: xfs@oss.sgi.com References: <200708232109.50780.lists@gammarayburst.de> <20070824014313.GE72985246@sgi.com> In-Reply-To: <20070824014313.GE72985246@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Message-Id: <200708242019.04219.lists@gammarayburst.de> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id l7OJJB4p002535 X-archive-position: 12673 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: lists@gammarayburst.de Precedence: bulk X-list: xfs On Friday 24 August 2007, David Chinner wrote: > On Thu, Aug 23, 2007 at 09:09:50PM +0100, Markus Schoder wrote: > > Got a bunch of the below errors in the log. It occured during a > > Debian upgrade with aptitude. xfs_repair found a lost inode. > > Can you post the output of xfs_repair if you still have it? It > would be handy to correlæte the shutdown to an actual error on > disk.... Unfortunately I don't have the output anymore. From memory I recall there were two messsages indicating problems: 1. A message about rebuilding a directory at inode 128. 2. A lost inode that was moved to lost+found. Other than that there were only the usual progress messages. > > Kernel is stock 2.6.22.4 plus CFS patch. This is a 64bit kernel on > > an amd64 processor. > > Hmmmm - so not exactly a stock kernel then. Which of the 19 versions > the CFS patch was applied? Is it reproducable or only a one-off? > if it's not a one-off problem, have you seen the problem without the > CFS patch? It is version 19.1 and the problem was a one-off never seen it before or since. -- Markus From owner-xfs@oss.sgi.com Fri Aug 24 12:23:21 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 12:23:27 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.pretago.de (mx1.pretago.de [89.110.132.151]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7OJNJ4p003667 for ; Fri, 24 Aug 2007 12:23:21 -0700 Received: from localhost (localhost [127.0.0.1]) by mx1.pretago.de (Postfix) with ESMTP id EC8222EC03B; Fri, 24 Aug 2007 21:23:17 +0200 (CEST) X-Virus-Scanned: scanned for viruses... should be clean Received: from mx1.pretago.de ([127.0.0.1]) by localhost (mx1.pretago.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9h6UERe71gA8; Fri, 24 Aug 2007 21:23:17 +0200 (CEST) Received: from gondolin.gammarayburst.de (unknown [87.127.185.82]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: p127p4) by mx1.pretago.de (Postfix) with ESMTP id 60E5C2EC029; Fri, 24 Aug 2007 21:23:17 +0200 (CEST) From: Markus Schoder To: Timothy Shimmin Subject: Re: XFS internal error XFS_WANT_CORRUPTED_RETURN Date: Fri, 24 Aug 2007 20:23:17 +0100 User-Agent: KMail/1.9.7 Cc: xfs@oss.sgi.com References: <200708232109.50780.lists@gammarayburst.de> <46CE3C45.1080907@sgi.com> In-Reply-To: <46CE3C45.1080907@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708242023.17327.lists@gammarayburst.de> X-archive-position: 12674 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: lists@gammarayburst.de Precedence: bulk X-list: xfs On Friday 24 August 2007, Timothy Shimmin wrote: > It looks a lot like a reported bug: > Suse#198124 and sgi-pv#956334 > > Where we had corruption in freespace btrees. > > Can you also run xfs_check before running xfs_repair. I actually tried to run xfs_check before xfs_repair but it seg-faulted. -- Markus From owner-xfs@oss.sgi.com Fri Aug 24 13:21:57 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 13:21:58 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from relay.sgi.com (netops-testserver-4.corp.sgi.com [192.26.58.214]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7OKLu4p013750 for ; Fri, 24 Aug 2007 13:21:56 -0700 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by netops-testserver-4.corp.sgi.com (Postfix) with ESMTP id 23DFB61B0C for ; Fri, 24 Aug 2007 13:01:56 -0700 (PDT) Received: from augusta (augusta.americas.sgi.com [128.162.233.117]) by estes.americas.sgi.com (Postfix) with ESMTP id 2995F70006FB; Fri, 24 Aug 2007 14:37:31 -0500 (CDT) Received: by augusta (Postfix, from userid 2022) id EA609B5F59; Fri, 24 Aug 2007 14:37:30 -0500 (CDT) To: xfs@oss.sgi.com, sgi.bugs.xfs@fido.engr.sgi.com Subject: TAKE 969625 - always specify a mode when using O_CREAT on open(2) Message-Id: <20070824193730.EA609B5F59@augusta> Date: Fri, 24 Aug 2007 14:37:30 -0500 (CDT) From: wkendall@sgi.com (Bill Kendall) X-archive-position: 12675 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: wkendall@sgi.com Precedence: bulk X-list: xfs Fedora Core 8 refuses to compile code that uses O_CREAT on an open(2) call without specifying a mode. Fix up the few cases where xfsdump was doing this. Date: Fri Aug 24 12:36:15 PDT 2007 Workarea: augusta.americas.sgi.com:/data/lwork/attica1/wkendall/xfs-cmds Inspected by: sandeen@sandeen.net The following file(s) were checked into: bonnie.engr.sgi.com:/isms/xfs-cmds/master Modid: master:xfs-cmds:232533a xfsdump/VERSION - 1.87 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfsdump/VERSION.diff?r1=text&tr1=1.87&r2=text&tr2=1.86&f=h xfsdump/doc/CHANGES - 1.101 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfsdump/doc/CHANGES.diff?r1=text&tr1=1.101&r2=text&tr2=1.100&f=h xfsdump/inventory/inv_oref.c - 1.9 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfsdump/inventory/inv_oref.c.diff?r1=text&tr1=1.9&r2=text&tr2=1.8&f=h xfsdump/inventory/inv_stobj.c - 1.13 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfsdump/inventory/inv_stobj.c.diff?r1=text&tr1=1.13&r2=text&tr2=1.12&f=h xfsdump/inventory/inv_mgr.c - 1.11 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfsdump/inventory/inv_mgr.c.diff?r1=text&tr1=1.11&r2=text&tr2=1.10&f=h xfsdump/inventory/inv_fstab.c - 1.9 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfsdump/inventory/inv_fstab.c.diff?r1=text&tr1=1.9&r2=text&tr2=1.8&f=h xfsdump/inventory/inv_idx.c - 1.9 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfsdump/inventory/inv_idx.c.diff?r1=text&tr1=1.9&r2=text&tr2=1.8&f=h xfsdump/invutil/invidx.c - 1.8 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfsdump/invutil/invidx.c.diff?r1=text&tr1=1.8&r2=text&tr2=1.7&f=h From owner-xfs@oss.sgi.com Fri Aug 24 16:26:20 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 24 Aug 2007 16:26:23 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7ONQJ4p013427 for ; Fri, 24 Aug 2007 16:26:20 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l7ONQID1029989 for ; Fri, 24 Aug 2007 19:26:18 -0400 Received: from lacrosse.corp.redhat.com (lacrosse.corp.redhat.com [172.16.52.154]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7ONQInP023901 for ; Fri, 24 Aug 2007 19:26:18 -0400 Received: from [10.15.80.10] (neon.msp.redhat.com [10.15.80.10]) by lacrosse.corp.redhat.com (8.12.11.20060308/8.11.6) with ESMTP id l7ONQH4I001691 for ; Fri, 24 Aug 2007 19:26:17 -0400 Message-ID: <46CF6919.2050404@sandeen.net> Date: Fri, 24 Aug 2007 18:26:17 -0500 From: Eric Sandeen User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: xfs mailing list Subject: [PATCH] fix xfsqa test 052 filtering with long device names Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-archive-position: 12676 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Long devicenames cause this quota output to split onto 2 lines: # xfs_quota -c "quota -gpu -birnN 99" /mnt/scratch /dev/mapper/testvol-test2 880 1004 1004 00 [--------] 1 10 10 00 [--------] 0 0 0 00 [--------] /mnt/scratch (why, I'm not sure, because that last line is plenty long too) but if we make that "\n" go away, the test still passes. Signed-off-by: Eric Sandeen Index: xfs-cmds/xfstests/052 =================================================================== --- xfs-cmds.orig/xfstests/052 +++ xfs-cmds/xfstests/052 @@ -82,8 +82,8 @@ xfs_quota -x \ # cross check blks, softblks, hardblks <-> quota, xfs_db xfs_quota -c "quota -$type -birnN $id" $SCRATCH_DEV | - tr -s '[:space:]' | tee -a $seq.full | perl -ne ' - if (m[^\s*'$SCRATCH_DEV'\s+(\d+)\s+(\d+)\s+(\d+)]) { + tr -d '\n' | tr -s '[:space:]' | tee -a $seq.full | + perl -ne 'if (m[^\s*'$SCRATCH_DEV'\s+(\d+)\s+(\d+)\s+(\d+)]) { print "used_blocks=", $1, "\n"; print "soft_blocks=", $2, "\n"; print "hard_blocks=", $3, "\n"; From owner-xfs@oss.sgi.com Sat Aug 25 23:35:02 2007 Received: with ECARTIS (v1.0.0; list xfs); Sat, 25 Aug 2007 23:35:04 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_56, J_CHICKENPOX_65 autolearn=no version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7Q6Yw4p032232 for ; Sat, 25 Aug 2007 23:35:01 -0700 Received: from Liberator.local (unknown [10.0.0.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id E412318DB0F08 for ; Sun, 26 Aug 2007 01:34:57 -0500 (CDT) Message-ID: <46D11F1B.5020409@sandeen.net> Date: Sun, 26 Aug 2007 01:35:07 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: xfs-oss Subject: [PATCH] clean up vnode^winode tracing Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-archive-position: 12677 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Simplify vnode tracing calls by embedding function name & return addr in the calling macro. Also do a lot of vnode->inode renaming for consistency, while we're at it. Signed-off-by: Eric Sandeen Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_aops.c +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c @@ -1525,8 +1525,7 @@ xfs_vm_bmap( struct inode *inode = (struct inode *)mapping->host; struct xfs_inode *ip = XFS_I(inode); - vn_trace_entry(XFS_I(inode), __FUNCTION__, - (inst_t *)__return_address); + ip_trace_entry(XFS_I(inode)); xfs_rwlock(ip, VRWLOCK_READ); xfs_flush_pages(ip, (xfs_off_t)0, -1, 0, FI_REMAPF); xfs_rwunlock(ip, VRWLOCK_READ); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_ioctl.c +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c @@ -733,8 +733,7 @@ xfs_ioctl( xfs_mount_t *mp = ip->i_mount; int error; - vn_trace_entry(XFS_I(inode), "xfs_ioctl", (inst_t *)__return_address); - + ip_trace_entry(XFS_I(inode)); switch (cmd) { case XFS_IOC_ALLOCSP: Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ksyms.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_ksyms.c +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ksyms.c @@ -83,12 +83,12 @@ EXPORT_SYMBOL(ktrace_first); EXPORT_SYMBOL(ktrace_next); #endif -#ifdef XFS_VNODE_TRACE -EXPORT_SYMBOL(vn_trace_ref); -EXPORT_SYMBOL(vn_trace_entry); -EXPORT_SYMBOL(vn_trace_exit); -EXPORT_SYMBOL(vn_trace_hold); -EXPORT_SYMBOL(vn_trace_rele); +#ifdef XFS_INODE_TRACE +EXPORT_SYMBOL(_ip_trace_ref); +EXPORT_SYMBOL(_ip_trace_entry); +EXPORT_SYMBOL(_ip_trace_exit); +EXPORT_SYMBOL(ip_trace_hold); +EXPORT_SYMBOL(ip_trace_rele); #endif #ifdef XFS_ILOCK_TRACE Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_super.c +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c @@ -403,8 +403,7 @@ xfs_fs_write_inode( { int error = 0, flags = FLUSH_INODE; - vn_trace_entry(XFS_I(inode), __FUNCTION__, - (inst_t *)__return_address); + ip_trace_entry(XFS_I(inode)); if (sync) flags |= FLUSH_SYNC; error = xfs_inode_flush(XFS_I(inode), flags); @@ -430,8 +429,7 @@ xfs_fs_clear_inode( * find an inode with di_mode == 0 but without IGET_CREATE set. */ if (ip) { - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); - + ip_trace_entry(ip); XFS_STATS_INC(vn_rele); XFS_STATS_INC(vn_remove); XFS_STATS_INC(vn_reclaim); @@ -820,8 +818,7 @@ xfs_fs_fill_super( goto fail_vnrele; } - vn_trace_exit(XFS_I(sb->s_root->d_inode), __FUNCTION__, - (inst_t *)__return_address); + ip_trace_exit(XFS_I(sb->s_root->d_inode)); kmem_free(args, sizeof(*args)); return 0; Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vnode.c +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c @@ -143,7 +143,7 @@ __vn_revalidate( { int error; - vn_trace_entry(xfs_vtoi(vp), __FUNCTION__, (inst_t *)__return_address); + ip_trace_entry(xfs_vtoi(vp)); vattr->va_mask = XFS_AT_STAT | XFS_AT_XFLAGS; error = xfs_getattr(xfs_vtoi(vp), vattr, 0); if (likely(!error)) { @@ -179,7 +179,7 @@ vn_hold( return vp; } -#ifdef XFS_VNODE_TRACE +#ifdef XFS_INODE_TRACE /* * Reference count of Linux inode if present, -1 if the xfs_inode @@ -211,32 +211,32 @@ static inline int xfs_icount(struct xfs_ * Vnode tracing code. */ void -vn_trace_entry(xfs_inode_t *ip, const char *func, inst_t *ra) +_ip_trace_entry(xfs_inode_t *ip, const char *func, inst_t *ra) { - KTRACE_ENTER(ip, VNODE_KTRACE_ENTRY, func, 0, ra); + KTRACE_ENTER(ip, INODE_KTRACE_ENTRY, func, 0, ra); } void -vn_trace_exit(xfs_inode_t *ip, const char *func, inst_t *ra) +_ip_trace_exit(xfs_inode_t *ip, const char *func, inst_t *ra) { - KTRACE_ENTER(ip, VNODE_KTRACE_EXIT, func, 0, ra); + KTRACE_ENTER(ip, INODE_KTRACE_EXIT, func, 0, ra); } void -vn_trace_hold(xfs_inode_t *ip, char *file, int line, inst_t *ra) +ip_trace_hold(xfs_inode_t *ip, char *file, int line, inst_t *ra) { - KTRACE_ENTER(ip, VNODE_KTRACE_HOLD, file, line, ra); + KTRACE_ENTER(ip, INODE_KTRACE_HOLD, file, line, ra); } void -vn_trace_ref(xfs_inode_t *ip, char *file, int line, inst_t *ra) +_ip_trace_ref(xfs_inode_t *ip, char *file, int line, inst_t *ra) { - KTRACE_ENTER(ip, VNODE_KTRACE_REF, file, line, ra); + KTRACE_ENTER(ip, INODE_KTRACE_REF, file, line, ra); } void -vn_trace_rele(xfs_inode_t *ip, char *file, int line, inst_t *ra) +ip_trace_rele(xfs_inode_t *ip, char *file, int line, inst_t *ra) { - KTRACE_ENTER(ip, VNODE_KTRACE_RELE, file, line, ra); + KTRACE_ENTER(ip, INODE_KTRACE_RELE, file, line, ra); } -#endif /* XFS_VNODE_TRACE */ +#endif /* XFS_INODE_TRACE */ Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vnode.h +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.h @@ -210,12 +210,12 @@ static inline int vn_count(bhv_vnode_t * */ extern bhv_vnode_t *vn_hold(bhv_vnode_t *); -#if defined(XFS_VNODE_TRACE) +#if defined(XFS_INODE_TRACE) #define VN_HOLD(vp) \ ((void)vn_hold(vp), \ - vn_trace_hold(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address)) + ip_trace_hold(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address)) #define VN_RELE(vp) \ - (vn_trace_rele(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address), \ + (ip_trace_rele(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address), \ iput(vn_to_inode(vp))) #else #define VN_HOLD(vp) ((void)vn_hold(vp)) @@ -296,26 +296,33 @@ static inline void vn_atime_to_time_t(bh /* * Tracking vnode activity. */ -#if defined(XFS_VNODE_TRACE) +#if defined(XFS_INODE_TRACE) + +#define INODE_TRACE_SIZE 16 /* number of trace entries */ +#define INODE_KTRACE_ENTRY 1 +#define INODE_KTRACE_EXIT 2 +#define INODE_KTRACE_HOLD 3 +#define INODE_KTRACE_REF 4 +#define INODE_KTRACE_RELE 5 + +extern void _ip_trace_entry(struct xfs_inode *, const char *, inst_t *); +extern void _ip_trace_exit(struct xfs_inode *, const char *, inst_t *); +extern void ip_trace_hold(struct xfs_inode *, char *, int, inst_t *); +extern void _ip_trace_ref(struct xfs_inode *, char *, int, inst_t *); +extern void ip_trace_rele(struct xfs_inode *, char *, int, inst_t *); +#define ip_trace_entry(ip) \ + _ip_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address) +#define ip_trace_exit(ip) \ + _ip_trace_exit(ip, __FUNCTION__, (inst_t *)__return_address) +#define ip_trace_ref(ip) \ + _ip_trace_ref(ip, __FILE__, __LINE__, (inst_t *)__return_address) -#define VNODE_TRACE_SIZE 16 /* number of trace entries */ -#define VNODE_KTRACE_ENTRY 1 -#define VNODE_KTRACE_EXIT 2 -#define VNODE_KTRACE_HOLD 3 -#define VNODE_KTRACE_REF 4 -#define VNODE_KTRACE_RELE 5 - -extern void vn_trace_entry(struct xfs_inode *, const char *, inst_t *); -extern void vn_trace_exit(struct xfs_inode *, const char *, inst_t *); -extern void vn_trace_hold(struct xfs_inode *, char *, int, inst_t *); -extern void vn_trace_ref(struct xfs_inode *, char *, int, inst_t *); -extern void vn_trace_rele(struct xfs_inode *, char *, int, inst_t *); #else -#define vn_trace_entry(a,b,c) -#define vn_trace_exit(a,b,c) -#define vn_trace_hold(a,b,c,d) -#define vn_trace_ref(a,b,c,d) -#define vn_trace_rele(a,b,c,d) +#define ip_trace_entry(a) +#define ip_trace_exit(a) +#define ip_trace_hold(a, b, c, d) +#define ip_trace_ref(a) +#define ip_trace_rele(a, b, c, d) #endif #endif /* __XFS_VNODE_H__ */ Index: linux-2.6-xfs/fs/xfs/xfs_dir2.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_dir2.c +++ linux-2.6-xfs/fs/xfs/xfs_dir2.c @@ -301,7 +301,7 @@ xfs_readdir( int rval; /* return value */ int v; /* type-checking value */ - vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); + ip_trace_entry(dp); if (XFS_FORCED_SHUTDOWN(dp->i_mount)) return XFS_ERROR(EIO); Index: linux-2.6-xfs/fs/xfs/xfs_iget.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_iget.c +++ linux-2.6-xfs/fs/xfs/xfs_iget.c @@ -157,7 +157,7 @@ again: goto again; } - vn_trace_exit(ip, "xfs_iget.alloc", + _ip_trace_exit(ip, "xfs_iget.alloc", (inst_t *)__return_address); XFS_STATS_INC(xs_ig_found); @@ -212,7 +212,7 @@ finish_inode: xfs_ilock(ip, lock_flags); xfs_iflags_clear(ip, XFS_ISTALE); - vn_trace_exit(ip, "xfs_iget.found", + _ip_trace_exit(ip, "xfs_iget.found", (inst_t *)__return_address); goto return_ip; } @@ -234,7 +234,7 @@ finish_inode: return error; } - vn_trace_exit(ip, "xfs_iget.alloc", (inst_t *)__return_address); + _ip_trace_exit(ip, "xfs_iget.alloc", (inst_t *)__return_address); xfs_inode_lock_init(ip, vp); xfs_iocore_inode_init(ip); @@ -467,7 +467,7 @@ xfs_iput(xfs_inode_t *ip, { bhv_vnode_t *vp = XFS_ITOV(ip); - vn_trace_entry(ip, "xfs_iput", (inst_t *)__return_address); + ip_trace_entry(ip); xfs_iunlock(ip, lock_flags); VN_RELE(vp); } @@ -482,7 +482,7 @@ xfs_iput_new(xfs_inode_t *ip, bhv_vnode_t *vp = XFS_ITOV(ip); struct inode *inode = vn_to_inode(vp); - vn_trace_entry(ip, "xfs_iput_new", (inst_t *)__return_address); + ip_trace_entry(ip); if ((ip->i_d.di_mode == 0)) { ASSERT(!xfs_iflags_test(ip, XFS_IRECLAIMABLE)); Index: linux-2.6-xfs/fs/xfs/xfs_inode.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_inode.c +++ linux-2.6-xfs/fs/xfs/xfs_inode.c @@ -884,8 +884,8 @@ xfs_iread( * Initialize inode's trace buffers. * Do this before xfs_iformat in case it adds entries. */ -#ifdef XFS_VNODE_TRACE - ip->i_trace = ktrace_alloc(VNODE_TRACE_SIZE, KM_SLEEP); +#ifdef XFS_INODE_TRACE + ip->i_trace = ktrace_alloc(INODE_TRACE_SIZE, KM_SLEEP); #endif #ifdef XFS_BMAP_TRACE ip->i_xtrace = ktrace_alloc(XFS_BMAP_KTRACE_SIZE, KM_SLEEP); @@ -2733,7 +2733,7 @@ xfs_idestroy( mrfree(&ip->i_iolock); freesema(&ip->i_flock); -#ifdef XFS_VNODE_TRACE +#ifdef XFS_INODE_TRACE ktrace_free(ip->i_trace); #endif #ifdef XFS_BMAP_TRACE Index: linux-2.6-xfs/fs/xfs/xfs_rename.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_rename.c +++ linux-2.6-xfs/fs/xfs/xfs_rename.c @@ -118,7 +118,7 @@ xfs_lock_for_rename( inum1 = ip1->i_ino; ASSERT(ip1); - ITRACE(ip1); + ip_trace_ref(ip1); /* * Unlock dp1 and lock dp2 if they are different. @@ -141,7 +141,7 @@ xfs_lock_for_rename( IRELE (ip1); return error; } else { - ITRACE(ip2); + ip_trace_ref(ip2); } /* @@ -247,8 +247,8 @@ xfs_rename( int src_namelen = VNAMELEN(src_vname); int target_namelen = VNAMELEN(target_vname); - vn_trace_entry(src_dp, "xfs_rename", (inst_t *)__return_address); - vn_trace_entry(xfs_vtoi(target_dir_vp), "xfs_rename", (inst_t *)__return_address); + ip_trace_entry(src_dp); + ip_trace_entry(xfs_vtoi(target_dir_vp)); /* * Find the XFS behavior descriptor for the target directory Index: linux-2.6-xfs/fs/xfs/xfs_utils.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_utils.c +++ linux-2.6-xfs/fs/xfs/xfs_utils.c @@ -73,7 +73,7 @@ xfs_dir_lookup_int( { int error; - vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); + ip_trace_entry(dp); error = xfs_dir_lookup(NULL, dp, VNAME(dentry), VNAMELEN(dentry), inum); if (!error) { Index: linux-2.6-xfs/fs/xfs/xfs_utils.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_utils.h +++ linux-2.6-xfs/fs/xfs/xfs_utils.h @@ -20,8 +20,6 @@ #define IRELE(ip) VN_RELE(XFS_ITOV(ip)) #define IHOLD(ip) VN_HOLD(XFS_ITOV(ip)) -#define ITRACE(ip) vn_trace_ref(ip, __FILE__, __LINE__, \ - (inst_t *)__return_address) extern int xfs_get_dir_entry (bhv_vname_t *, xfs_inode_t **); extern int xfs_dir_lookup_int (xfs_inode_t *, uint, bhv_vname_t *, xfs_ino_t *, Index: linux-2.6-xfs/fs/xfs/xfs_vnodeops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vnodeops.c +++ linux-2.6-xfs/fs/xfs/xfs_vnodeops.c @@ -88,7 +88,7 @@ xfs_getattr( bhv_vnode_t *vp = XFS_ITOV(ip); xfs_mount_t *mp = ip->i_mount; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); + ip_trace_entry(ip); if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -228,7 +228,7 @@ xfs_setattr( int file_owner; int need_iolock = 1; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); + ip_trace_entry(ip); if (mp->m_flags & XFS_MOUNT_RDONLY) return XFS_ERROR(EROFS); @@ -915,8 +915,7 @@ xfs_access( { int error; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); - + ip_trace_entry(ip); xfs_ilock(ip, XFS_ILOCK_SHARED); error = xfs_iaccess(ip, mode, credp); xfs_iunlock(ip, XFS_ILOCK_SHARED); @@ -987,7 +986,7 @@ xfs_readlink( int pathlen; int error = 0; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); + ip_trace_entry(ip); if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -1033,7 +1032,7 @@ xfs_fsync( int error; int log_flushed = 0, changed = 1; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); + ip_trace_entry(ip); ASSERT(start >= 0 && stop >= -1); @@ -1589,7 +1588,7 @@ xfs_inactive( int error; int truncate; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); + ip_trace_entry(ip); /* * If the inode is already free, then there can be nothing @@ -1802,7 +1801,7 @@ xfs_lookup( int error; uint lock_mode; - vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); + ip_trace_entry(dp); if (XFS_FORCED_SHUTDOWN(dp->i_mount)) return XFS_ERROR(EIO); @@ -1811,7 +1810,7 @@ xfs_lookup( error = xfs_dir_lookup_int(dp, lock_mode, dentry, &e_inum, &ip); if (!error) { *vpp = XFS_ITOV(ip); - ITRACE(ip); + ip_trace_ref(ip); } xfs_iunlock_map_shared(dp, lock_mode); return error; @@ -1846,7 +1845,7 @@ xfs_create( int namelen; ASSERT(!*vpp); - vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); + ip_trace_entry(dp); dm_di_mode = vap->va_mode; namelen = VNAMELEN(dentry); @@ -1932,7 +1931,7 @@ xfs_create( goto error_return; goto abort_return; } - ITRACE(ip); + ip_trace_ref(ip); /* * At this point, we've gotten a newly allocated inode. @@ -2100,7 +2099,7 @@ again: e_inum = ip->i_ino; - ITRACE(ip); + ip_trace_ref(ip); /* * We want to lock in increasing inum. Since we've already @@ -2323,7 +2322,7 @@ xfs_remove( uint resblks; int namelen; - vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); + ip_trace_entry(dp); if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -2366,9 +2365,8 @@ xfs_remove( dm_di_mode = ip->i_d.di_mode; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); - - ITRACE(ip); + ip_trace_entry(ip); + ip_trace_ref(ip); error = XFS_QM_DQATTACH(mp, dp, 0); if (!error && dp != ip) @@ -2500,8 +2498,7 @@ xfs_remove( if (link_zero && xfs_inode_is_filestream(ip)) xfs_filestream_deassociate(ip); - vn_trace_exit(ip, __FUNCTION__, (inst_t *)__return_address); - + ip_trace_exit(ip); IRELE(ip); /* Fall through to std_return with error = 0 */ @@ -2564,8 +2561,8 @@ xfs_link( char *target_name = VNAME(dentry); int target_namelen; - vn_trace_entry(tdp, __FUNCTION__, (inst_t *)__return_address); - vn_trace_entry(xfs_vtoi(src_vp), __FUNCTION__, (inst_t *)__return_address); + ip_trace_entry(tdp); + ip_trace_entry(xfs_vtoi(src_vp)); target_namelen = VNAMELEN(dentry); ASSERT(!VN_ISDIR(src_vp)); @@ -2748,7 +2745,7 @@ xfs_mkdir( /* Return through std_return after this point. */ - vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); + ip_trace_entry(dp); mp = dp->i_mount; udqp = gdqp = NULL; @@ -2816,7 +2813,7 @@ xfs_mkdir( goto error_return; goto abort_return; } - ITRACE(cdp); + ip_trace_ref(cdp); /* * Now we add the directory inode to the transaction. @@ -2942,7 +2939,7 @@ xfs_rmdir( int last_cdp_link; uint resblks; - vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); + ip_trace_entry(dp); if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -3047,7 +3044,7 @@ xfs_rmdir( VN_HOLD(dir_vp); } - ITRACE(cdp); + ip_trace_ref(cdp); xfs_trans_ijoin(tp, cdp, XFS_ILOCK_EXCL); ASSERT(cdp->i_d.di_nlink >= 2); @@ -3195,8 +3192,7 @@ xfs_symlink( ip = NULL; tp = NULL; - vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); - + ip_trace_entry(dp); if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -3325,7 +3321,7 @@ xfs_symlink( goto error_return; goto error1; } - ITRACE(ip); + ip_trace_ref(ip); /* * An error after we've joined dp to the transaction will result in the @@ -3487,7 +3483,7 @@ xfs_fid2( { xfs_fid2_t *xfid = (xfs_fid2_t *)fidp; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); + ip_trace_entry(ip); ASSERT(sizeof(fid_t) >= sizeof(xfs_fid2_t)); xfid->fid_len = sizeof(xfs_fid2_t) - sizeof(xfid->fid_len); @@ -3669,7 +3665,7 @@ xfs_reclaim( { bhv_vnode_t *vp = XFS_ITOV(ip); - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); + ip_trace_entry(ip); ASSERT(!VN_MAPPED(vp)); @@ -3887,7 +3883,7 @@ xfs_alloc_file_space( int committed; int error; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); + ip_trace_entry(ip); if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -4157,7 +4153,7 @@ xfs_free_file_space( vp = XFS_ITOV(ip); mp = ip->i_mount; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); + ip_trace_entry(ip); if ((error = XFS_QM_DQATTACH(mp, ip, 0))) return error; @@ -4363,7 +4359,7 @@ xfs_change_file_space( xfs_trans_t *tp; bhv_vattr_t va; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); + ip_trace_entry(ip); /* * must be a regular file and have write permission Index: linux-2.6-xfs/fs/xfs/xfs.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs.h +++ linux-2.6-xfs/fs/xfs/xfs.h @@ -37,7 +37,7 @@ #define XFS_LOG_TRACE 1 #define XFS_RW_TRACE 1 #define XFS_BUF_TRACE 1 -#define XFS_VNODE_TRACE 1 +#define XFS_INODE_TRACE 1 #define XFS_FILESTREAMS_TRACE 1 #endif Index: linux-2.6-xfs/fs/xfs/xfs_inode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_inode.h +++ linux-2.6-xfs/fs/xfs/xfs_inode.h @@ -300,7 +300,7 @@ typedef struct xfs_inode { xfs_fsize_t i_size; /* in-memory size */ atomic_t i_iocount; /* outstanding I/O count */ /* Trace buffers per inode. */ -#ifdef XFS_VNODE_TRACE +#ifdef XFS_INODE_TRACE struct ktrace *i_trace; /* general inode trace */ #endif #ifdef XFS_BMAP_TRACE Index: linux-2.6-xfs/fs/xfs/xfsidbg.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfsidbg.c +++ linux-2.6-xfs/fs/xfs/xfsidbg.c @@ -113,11 +113,11 @@ static void xfsidbg_xqm_dqtrace(xfs_dquo #ifdef XFS_FILESTREAMS_TRACE static void xfsidbg_filestreams_trace(int); #endif -#ifdef XFS_VNODE_TRACE +#ifdef XFS_INODE_TRACE /* - * Print a vnode trace entry. + * Print a inode trace entry. */ -static int vn_trace_pr_entry(ktrace_entry_t *ktep); +static int ip_trace_pr_entry(ktrace_entry_t *ktep); #endif @@ -1443,7 +1443,7 @@ static int kdbm_xfs_xnode( int nextarg = 1; long offset = 0; int diag; -#ifdef XFS_VNODE_TRACE +#ifdef XFS_INODE_TRACE ktrace_entry_t *ktep; ktrace_snap_t kts; #endif @@ -1457,18 +1457,18 @@ static int kdbm_xfs_xnode( xfsidbg_xnode(ip); -#ifdef XFS_VNODE_TRACE +#ifdef XFS_INODE_TRACE kdb_printf("--> itrace @ 0x%lx/0x%p\n", addr, ip->i_trace); if (ip->i_trace == NULL) return 0; ktep = ktrace_first(ip->i_trace, &kts); while (ktep != NULL) { - if (vn_trace_pr_entry(ktep)) + if (ip_trace_pr_entry(ktep)) kdb_printf("\n"); ktep = ktrace_next(ip->i_trace, &kts); } -#endif /* XFS_VNODE_TRACE */ +#endif /* XFS_INODE_TRACE */ return 0; } @@ -1784,12 +1784,12 @@ static int kdbm_vnode( return 0; } -#ifdef XFS_VNODE_TRACE +#ifdef XFS_INODE_TRACE /* - * Print a vnode trace entry. + * Print a inode trace entry. */ static int -vn_trace_pr_entry(ktrace_entry_t *ktep) +ip_trace_pr_entry(ktrace_entry_t *ktep) { char funcname[128]; kdb_symtab_t symtab; @@ -1812,19 +1812,19 @@ vn_trace_pr_entry(ktrace_entry_t *ktep) switch ((__psint_t)ktep->val[0]) { - case VNODE_KTRACE_ENTRY: + case INODE_KTRACE_ENTRY: kdb_printf("entry to %s i_count = %ld", (char *)ktep->val[1], (long)ktep->val[3]); break; - case VNODE_KTRACE_EXIT: + case INODE_KTRACE_EXIT: kdb_printf("exit from %s i_count = %lu", (char *)ktep->val[1], (long)ktep->val[3]); break; - case VNODE_KTRACE_HOLD: + case INODE_KTRACE_HOLD: if ((__psint_t)ktep->val[3] != 1) kdb_printf("hold @%s:%ld(%s) i_count %ld => %ld ", (char *)ktep->val[1], @@ -1840,7 +1840,7 @@ vn_trace_pr_entry(ktrace_entry_t *ktep) (long)ktep->val[3]); break; - case VNODE_KTRACE_REF: + case INODE_KTRACE_REF: kdb_printf("ref @%s:%ld(%s) i_count = %ld", (char *)ktep->val[1], (long)ktep->val[2], @@ -1848,7 +1848,7 @@ vn_trace_pr_entry(ktrace_entry_t *ktep) (long)ktep->val[3]); break; - case VNODE_KTRACE_RELE: + case INODE_KTRACE_RELE: if ((__psint_t)ktep->val[3] != 1) kdb_printf("rele @%s:%ld(%s) i_count %ld => %ld ", (char *)ktep->val[1], @@ -1865,7 +1865,7 @@ vn_trace_pr_entry(ktrace_entry_t *ktep) break; default: - kdb_printf("unknown vntrace record\n"); + kdb_printf("unknown intrace record\n"); return 1; } @@ -1891,9 +1891,9 @@ vn_trace_pr_entry(ktrace_entry_t *ktep) /* - * Print out the trace buffer attached to the given vnode. + * Print out the trace buffer attached to the given inode. */ -static int kdbm_vntrace( +static int kdbm_iptrace( int argc, const char **argv) { @@ -1917,17 +1917,17 @@ static int kdbm_vntrace( ip = (xfs_inode_t *)addr; if (ip->i_trace == NULL) { - kdb_printf("The vnode trace buffer is not initialized\n"); + kdb_printf("The inode trace buffer is not initialized\n"); return 0; } - kdb_printf("vntrace ip 0x%p\n", ip); + kdb_printf("iptrace ip 0x%p\n", ip); ktep = ktrace_first(ip->i_trace, &kts); while (ktep != NULL) { - if (vn_trace_pr_entry(ktep)) + if (ip_trace_pr_entry(ktep)) kdb_printf("\n"); ktep = ktrace_next(ip->i_trace, &kts); @@ -1936,9 +1936,9 @@ static int kdbm_vntrace( return 0; } /* - * Print out the trace buffer attached to the given vnode. + * Print out the trace buffer attached to the given inode. */ -static int kdbm_vntraceaddr( +static int kdbm_iptraceaddr( int argc, const char **argv) { @@ -1961,12 +1961,12 @@ static int kdbm_vntraceaddr( kt = (struct ktrace *)addr; - kdb_printf("vntraceaddr kt 0x%p\n", kt); + kdb_printf("iptraceaddr kt 0x%p\n", kt); ktep = ktrace_first(kt, &kts); while (ktep != NULL) { - if (vn_trace_pr_entry(ktep)) + if (ip_trace_pr_entry(ktep)) kdb_printf("\n"); ktep = ktrace_next(kt, &kts); @@ -1974,7 +1974,7 @@ static int kdbm_vntraceaddr( return 0; } -#endif /* XFS_VNODE_TRACE */ +#endif /* XFS_INODE_TRACE */ static void printinode(struct inode *ip) @@ -2393,10 +2393,10 @@ struct xif { static struct xif xfsidbg_funcs[] = { { "vn", kdbm_vn, "", "Dump inode/vnode/trace"}, { "vnode", kdbm_vnode, "", "Dump vnode"}, -#ifdef XFS_VNODE_TRACE - { "vntrace", kdbm_vntrace, "", "Dump vnode Trace"}, - { "vntraceaddr", kdbm_vntraceaddr, "", - "Dump vnode Trace by Address"}, +#ifdef XFS_INODE_TRACE + { "iptrace", kdbm_iptrace, "", "Dump inode Trace"}, + { "iptraceaddr", kdbm_iptraceaddr, "", + "Dump inode Trace by Address"}, #endif { "xagf", kdbm_xfs_xagf, "", "Dump XFS allocation group freespace" }, @@ -6603,7 +6603,7 @@ xfsidbg_xnode(xfs_inode_t *ip) kdb_printf("size %lld\n", ip->i_size); -#ifdef XFS_VNODE_TRACE +#ifdef XFS_INODE_TRACE qprintf(" trace 0x%p\n", ip->i_trace); #endif #ifdef XFS_BMAP_TRACE From owner-xfs@oss.sgi.com Sun Aug 26 09:56:49 2007 Received: with ECARTIS (v1.0.0; list xfs); Sun, 26 Aug 2007 09:56:50 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_56 autolearn=no version=3.2.0-pre1-r499012 Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7QGul4p017420 for ; Sun, 26 Aug 2007 09:56:49 -0700 Received: from hch by pentafluge.infradead.org with local (Exim 4.63 #1 (Red Hat Linux)) id 1IPL8k-0003Z6-4S; Sun, 26 Aug 2007 17:39:06 +0100 Date: Sun, 26 Aug 2007 17:39:06 +0100 From: Christoph Hellwig To: Eric Sandeen Cc: xfs-oss Subject: Re: [PATCH] clean up vnode^winode tracing Message-ID: <20070826163906.GA13665@infradead.org> References: <46D11F1B.5020409@sandeen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46D11F1B.5020409@sandeen.net> User-Agent: Mutt/1.4.2.3i X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 12678 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: xfs On Sun, Aug 26, 2007 at 01:35:07AM -0500, Eric Sandeen wrote: > Simplify vnode tracing calls by embedding function name & return addr > in the calling macro. > > Also do a lot of vnode->inode renaming for consistency, while > we're at it. Looks good. One day we should move the implementation and declaration out of xfs_vnode.[ch], but that's fine as a separate patch. From owner-xfs@oss.sgi.com Sun Aug 26 12:04:27 2007 Received: with ECARTIS (v1.0.0; list xfs); Sun, 26 Aug 2007 12:04:28 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: **** X-Spam-Status: No, score=4.0 required=5.0 tests=BAYES_99,MISSING_MIMEOLE autolearn=no version=3.2.0-pre1-r499012 Received: from fmailhost03.isp.att.net (fmailhost03.isp.att.net [207.115.11.53]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7QJ4P4p003603 for ; Sun, 26 Aug 2007 12:04:26 -0700 Received: from fbnitpro (adsl-070-145-139-040.sip.mem.bellsouth.net[70.145.139.40]) by bellsouth.net (frfwmhc03) with SMTP id <20070826184923H03006fv3ie>; Sun, 26 Aug 2007 18:49:23 +0000 X-Originating-IP: [70.145.139.40] From: "Fred Norfleet, FBN ITPro" To: Subject: HP z565 Digital Entertainment Center Date: Sun, 26 Aug 2007 13:37:23 -0500 Organization: FBN ITPro Message-ID: <00bc01c7e811$b68cd740$23a685c0$@net> MIME-Version: 1.0 Content-Type: application/x-pkcs7-mime; smime-type=signed-data; name="smime.p7m" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7m" X-Priority: 1 (Highest) X-MSMail-Priority: High X-Mailer: Microsoft Office Outlook 12.0 Importance: High Sensitivity: Company-Confidential Thread-Index: AcfoDzJrPd/QKaDOSs+QGWniyWCcGQ== Content-Language: en-us X-archive-position: 12679 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: fbnorfleet@bellsouth.net Precedence: bulk X-list: xfs MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAaCAJIAEggeWQ29u dGVudC1UeXBlOiBtdWx0aXBhcnQvcmVsYXRlZDsNCglib3VuZGFyeT0iLS0tLT1fTmV4dFBhcnRf MDAwXzA1MTlfMDFDN0U3RTUuNDk5RUY2MzAiDQoNClRoaXMgaXMgYSBtdWx0aXBhcnQgbWVzc2Fn ZSBpbiBNSU1FIGZvcm1hdC4NCg0KLS0tLS0tPV9OZXh0UGFydF8wMDBfMDUxOV8wMUM3RTdFNS40 OTlFRjYzMA0KQ29udGVudC1UeXBlOiBtdWx0aXBhcnQvYWx0ZXJuYXRpdmU7DQoJYm91bmRhcnk9 Ii0tLS09X05leHRQYXJ0XzAwMV8wNTFBXzAxQzdFN0U1LjQ5OUVGNjMwIg0KDQoNCi0tLS0tLT1f TmV4dFBhcnRfMDAxXzA1MUFfMDFDN0U3RTUuNDk5RUY2MzANCkNvbnRlbnQtVHlwZTogdGV4dC9w bGFpbjsNCgljaGFyc2V0PSJpc28tODg1OS0xIg0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzog OGJpdA0KDQoNCg0KDQoNCg0KRkJOIElUUHJvIE9ubGluZQ0KDQoNCg0KDQoNCldlIEFwcHJlY2lh dGUgWW91IGFuZCBZb3VyIEJ1c2luZXNzIQ0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCkhQ IHo1NjUgRGlnaXRhbCBFbnRlcnRhaW5tZW50IENlbnRlcg0KDQogPGh0dHA6Ly9oNzEwMTYud3d3 Ny5ocC5jb20vaHRtbC9pbnRlcmFjdGl2ZS96NTAwL21vZGVsLmh0bWw+IFZpZXcgRGVtbyENCg0K T3ZlcnZpZXc6DQoNCldhdGNoIGxvdHMgb2YgVFYgYW5kIG1vdmllcz8gTGlzdGVuIHRvIG11c2lj IGFsbCB0aGUgdGltZT8gTG92ZSB2aWRlbyBnYW1lcz8NClRoZSBIUCB6NTY1IERpZ2l0YWwgRW50 ZXJ0YWlubWVudCBDZW50ZXIgaXMgbWFkZSB3aXRoIHlvdSBpbiBtaW5kLiBJdA0KY2VudHJhbGl6 ZXMgeW91ciB2YXJpb3VzIGVudGVydGFpbm1lbnQgaW4gb25lIGNvbnZlbmllbnQgZGlnaXRhbCBs b2NhdGlvbi4NClBsdXMsIHlvdSBjYW4gc3RvcmUgYSB3aG9wcGluZyA4MDBHQiB3b3J0aCBvZiB5 b3VyIGZhdm9yaXRlIHNob3dzLCBtb3ZpZXMsDQptdXNpYywgZ2FtZXMsIHNvbmdzLCBhbmQgcGhv dG9zIQ0KDQpEZXRhaWxzOg0KDQqVSW50ZWwgUGVudGl1bSBEIDk0NSBEdWFsIENvcmUgcHJvY2Vz c29yICgzLjRHSHopDQoNCpVHZW51aW5lIFdpbmRvd3MgWFAgTWVkaWEgQ2VudGVyDQoNCpUyR0Ig RERSMiBTRFJBTQ0KDQqVNTAwR0IgNzIwMCBycG0gaGFyZCBkcml2ZQ0KDQqVRG91YmxlLWxheWVy IFN1cGVyTXVsdGkgRFZEsVIvUlcgZHJpdmUgd2l0aCBMaWdodFNjcmliZSwgcHJvZ3Jlc3NpdmUg c2Nhbg0KRFZEIHBsYXliYWNrDQoNCpVOVklESUEgR2VGb3JjZSA3NjAwIEdTIGdyYXBoaWNzDQoN CpVJbnRlbCBIaWdoIERlZmluaXRpb24gQXVkaW8NCg0KlTktaW4tMSBkaWdpdGFsIG1lZGlhIGNh cmQgcmVhZGVyDQoNCpVQZXJzb25hbCB2aWRlbyByZWNvcmRlciB3aXRoIGR1YWwgTlRTQyBUViB0 dW5lcnMsIG92ZXItYWlyIEFUU0MgVFYgdHVuZXINCg0KlVJlbW90ZQ0KDQqVV2lyZWxlc3Mga2V5 Ym9hcmQgd2l0aCB0cmFja2JhbGwsIG11bHRpbWVkaWEga2V5cw0KDQqVUGVyc29uYWwgbWVkaWEg ZHJpdmUNCg0KlVdpbmRvd3MgVmlzdGEgUHJlbWl1bSBDYXBhYmxlDQoNCpVPbmUteWVhciBsaW1p dGVkIHdhcnJhbnR5DQoNClByaWNlOg0KDQokNTk5OS45OA0KDQoNCg0KDQoNCg0KRkJOIElUUHJv IE9ubGluZQ0KDQo1MDMxIExhdXJlbCBMYWtlIERyaXZlLCBNZW1waGlzLCBUTiAzODEyNQ0KDQpQ aG9uZTogMS05MDEtNDU3LTExNTgNCg0KQ2xpY2sgIDxtYWlsdG86ZmJub3JmbGVldEBiZWxsb3V0 aC5uZXQ/c3ViamVjdD1VbnN1YnNjcmliZT4gdW5zdWJzY3JpYmUgdG8NCmJlIHJlbW92ZWQgZnJv bSBvdXIgbWFpbGluZyBsaXN0IQ0KDQoNCg0KDQoNCi0tLS0tLT1fTmV4dFBhcnRfMDAxXzA1MUFf MDFDN0U3RTUuNDk5RUY2MzANCkNvbnRlbnQtVHlwZTogdGV4dC9odG1sOw0KCWNoYXJzZXQ9Imlz by04ODU5LTEiDQpDb250ZW50LVRyYW5zZmVyLUVuY29kaW5nOiBxdW90ZWQtcHJpbnRhYmxlDQoN CgSCQbo8aHRtbCB4bWxuczp2PTNEInVybjpzY2hlbWFzLW1pY3Jvc29mdC1jb206dm1sIiA9DQp4 bWxuczpvPTNEInVybjpzY2hlbWFzLW1pY3Jvc29mdC1jb206b2ZmaWNlOm9mZmljZSIgPQ0KeG1s bnM6ZHQ9M0QidXVpZDpDMkY0MTAxMC02NUIzLTExZDEtQTI5Ri0wMEFBMDBDMTQ4ODIiID0NCnht bG5zPTNEImh0dHA6Ly93d3cudzMub3JnL1RSL1JFQy1odG1sNDAiPg0KDQo8aGVhZD4NCjxtZXRh IGh0dHAtZXF1aXY9M0RDb250ZW50LVR5cGUgY29udGVudD0zRCJ0ZXh0L2h0bWw7ID0NCmNoYXJz ZXQ9M0Rpc28tODg1OS0xIj4NCjxsaW5rIHJlbD0zREZpbGUtTGlzdCBocmVmPTNEImNpZDpmaWxl bGlzdC54bWxAMDFDN0U3RTUuNDk4MjQ2NzAiPg0KPCEtLVtpZiAhbXNvXT4NCjxzdHlsZT4NCnZc Oioge2JlaGF2aW9yOnVybCgjZGVmYXVsdCNWTUwpO30NCm9cOioge2JlaGF2aW9yOnVybCgjZGVm YXVsdCNWTUwpO30NCmJcOioge2JlaGF2aW9yOnVybCgjZGVmYXVsdCNWTUwpO30NCi5zaGFwZSB7 YmVoYXZpb3I6dXJsKCNkZWZhdWx0I1ZNTCk7fQ0KPC9zdHlsZT4NCjwhW2VuZGlmXS0tPg0KPHN0 eWxlPg0KPCEtLQ0KIC8qIEZvbnQgRGVmaW5pdGlvbnMgKi8NCkBmb250LWZhY2UNCgl7Zm9udC1m YW1pbHk6IlRyZWJ1Y2hldCBNUyI7DQoJcGFub3NlLTE6MiAxMSA2IDMgMiAyIDIgMiAyIDQ7fQ0K IC8qIFN0eWxlIERlZmluaXRpb25zICovDQpoMw0KCXttYXJnaW46MHB4Ow0KCXRleHQtaW5kZW50 OjBweDsNCgltYXJnaW4tYm90dG9tOjVweDsNCglsaW5lLWhlaWdodDoxMTMlOw0KCXRleHQtYWxp Z246bGVmdDsNCglmb250LWZhbWlseToiVHJlYnVjaGV0IE1TIjsNCglmb250LXNpemU6MTRweDsN Cgljb2xvcjpibGFjazsNCglmb250LXN0eWxlOml0YWxpYzsNCglmb250LXdlaWdodDpub3JtYWw7 fQ0KcC5Nc29BY2NlbnRUZXh0NSwgbGkuTXNvQWNjZW50VGV4dDUsIGRpdi5Nc29BY2NlbnRUZXh0 NQ0KCXttYXJnaW46MHB4Ow0KCXRleHQtaW5kZW50OjBweDsNCgltYXJnaW4tYm90dG9tOjBweDsN CglsaW5lLWhlaWdodDoxMTMlOw0KCXRleHQtYWxpZ246bGVmdDsNCglmb250LWZhbWlseToiVHJl YnVjaGV0IE1TIjsNCglmb250LXNpemU6MTBweDsNCgljb2xvcjojMDAwMDY2O30NCm9sDQoJe21h cmdpbi10b3A6MHB4Ow0KCW1hcmdpbi1ib3R0b206MHB4Ow0KCW1hcmdpbi1sZWZ0OjI0cHg7fQ0K dWwNCgl7bWFyZ2luLXRvcDowcHg7DQoJbWFyZ2luLWJvdHRvbTowcHg7DQoJbWFyZ2luLWxlZnQ6 MjRweDt9DQpAcGFnZQ0KCXtzaXplOjgxNnB4IDEwNTZweDt9DQotLT4NCjwvc3R5bGU+DQo8L2hl YWQ+DQoNCjxib2R5IGxpbms9M0QiIzAwNjY5OSIgdmxpbms9M0RwdXJwbGUgc3R5bGU9M0QnbWFy Z2luOjAnPg0KDQo8dGFibGUgYm9yZGVyPTNEMCBjZWxsc3BhY2luZz0zRDAgY2VsbHBhZGRpbmc9 M0QwIHdpZHRoPTNENTU5Pg0KIDx0cj4NCiAgPHRkIHdpZHRoPTNEMCBoZWlnaHQ9M0QwPjwvdGQ+ DQogIDx0ZCB3aWR0aD0zRDUgaGVpZ2h0PTNEMD48L3RkPg0KICA8dGQgd2lkdGg9M0QxIGhlaWdo dD0zRDA+PC90ZD4NCiAgPHRkIHdpZHRoPTNEMiBoZWlnaHQ9M0QwPjwvdGQ+DQogIDx0ZCB3aWR0 aD0zRDEgaGVpZ2h0PTNEMD48L3RkPg0KICA8dGQgd2lkdGg9M0Q3MyBoZWlnaHQ9M0QwPjwvdGQ+ DQogIDx0ZCB3aWR0aD0zRDIgaGVpZ2h0PTNEMD48L3RkPg0KICA8dGQgd2lkdGg9M0QyMDEgaGVp Z2h0PTNEMD48L3RkPg0KICA8dGQgd2lkdGg9M0Q2IGhlaWdodD0zRDA+PC90ZD4NCiAgPHRkIHdp ZHRoPTNEMTAyIGhlaWdodD0zRDA+PC90ZD4NCiAgPHRkIHdpZHRoPTNEMyBoZWlnaHQ9M0QwPjwv dGQ+DQogIDx0ZCB3aWR0aD0zRDg4IGhlaWdodD0zRDA+PC90ZD4NCiAgPHRkIHdpZHRoPTNENjAg aGVpZ2h0PTNEMD48L3RkPg0KICA8dGQgd2lkdGg9M0QxIGhlaWdodD0zRDA+PC90ZD4NCiAgPHRk IHdpZHRoPTNEMyBoZWlnaHQ9M0QwPjwvdGQ+DQogIDx0ZCB3aWR0aD0zRDQgaGVpZ2h0PTNEMD48 L3RkPg0KICA8dGQgd2lkdGg9M0QyIGhlaWdodD0zRDA+PC90ZD4NCiAgPHRkIHdpZHRoPTNENSBo ZWlnaHQ9M0QwPjwvdGQ+DQogPC90cj4NCiA8dHI+DQogIDx0ZCB3aWR0aD0zRDAgaGVpZ2h0PTNE MTU+PC90ZD4NCiAgPHRkIHdpZHRoPTNENTU5IGhlaWdodD0zRDE1IHZhbGlnbj0zRFRvcCBjb2xz cGFuPTNEMTc+PC90ZD4NCiA8L3RyPg0KIDx0cj4NCiAgPHRkIHdpZHRoPTNEMCBoZWlnaHQ9M0Q0 NT48L3RkPg0KICA8dGQgd2lkdGg9M0Q2IGhlaWdodD0zRDgzIHZhbGlnbj0zRFRvcCBjb2xzcGFu PTNEMiByb3dzcGFuPTNENT48L3RkPg0KICA8dGQgd2lkdGg9M0QyNzkgaGVpZ2h0PTNENDUgY29s c3Bhbj0zRDU+DQogIDxkaXYgc3R5bGU9M0QncGFkZGluZy1sZWZ0OjJweDtwYWRkaW5nLXJpZ2h0 OjJweDtwYWRkaW5nLXRvcDoycHgnPg0KICA8aDMgc3R5bGU9M0QnbWFyZ2luOjBweDttYXJnaW4t Ym90dG9tOjVweDt0ZXh0LWFsaWduOmNlbnRlcic+PGk+PGZvbnQgPQ0Kc2l6ZT0zRDUNCiAgY29s b3I9M0RibGFjayBmYWNlPTNEIlRyZWJ1Y2hldCBNUyI+PHNwYW4gbGFuZz0zRGVuLVVTID0NCnN0 eWxlPTNEJ2ZvbnQtc2l6ZToyOXB4Ow0KICBsaW5lLWhlaWdodDoxMTMlO2ZvbnQtZmFtaWx5OiJU cmVidWNoZXQgTVMiO2xhbmd1YWdlOmVuLVVTJz5GQk4gSVRQcm8gPQ0KT25saW5lPC9zcGFuPjwv Zm9udD48L2k+PC9oMz4NCiAgPC9kaXY+DQogIDwvdGQ+DQogIDx0ZCB3aWR0aD0zRDYgaGVpZ2h0 PTNENDUgdmFsaWduPTNEVG9wPjwvdGQ+DQogIDx0ZCB3aWR0aD0zRDI1MyBoZWlnaHQ9M0Q4MCB2 YWxpZ249M0RUb3AgY29sc3Bhbj0zRDQgcm93c3Bhbj0zRDQ+DQogIDxpbWcgYm9yZGVyPTNEMCBo c3BhY2U9M0QwIHZzcGFjZT0zRDAgPQ0Kc3JjPTNEImNpZDppbWFnZTAwMS5qcGdAMDFDN0U3RTUu NDk4MjQ2NzAiDQogIHdpZHRoPTNEMjUzIGhlaWdodD0zRDgwIGJvcmRlcj0zRDAgdXNlbWFwPTNE IiNtYXAwIj48bWFwID0NCm5hbWU9M0RtYXAwPjxhcmVhIHNoYXBlPTNEUkVDVA0KICBjb29yZHM9 M0QiMCwwIDI1Myw4MCINCiAgPQ0KaHJlZj0zRCJodHRwczovL3d3dy5wYXlwYWwuY29tL3VzL2Nn aS1iaW4vd2Vic2NyP2NtZD0zRHhwdC9jcHMvcG9wdXAvT0xDVz0NCmhhdElzUGF5UGFsLW91dHNp ZGUiDQogID0NCnRpdGxlPTNEImh0dHBzOi8vd3d3LnBheXBhbC5jb20vdXMvY2dpLWJpbi93ZWJz Y3I/Y21kPTNEeHB0L2Nwcy9wb3B1cC9PTEM9DQpXaGF0SXNQYXlQYWwtb3V0c2lkZSI+PC9tYXA+ PC90ZD4NCiAgPHRkIHdpZHRoPTNEMTUgaGVpZ2h0PTNEODAgdmFsaWduPTNEVG9wIGNvbHNwYW49 M0Q1IHJvd3NwYW49M0Q0PjwvdGQ+DQogPC90cj4NCiA8dHI+DQogIDx0ZCB3aWR0aD0zRDAgaGVp Z2h0PTNEMz48L3RkPg0KICA8dGQgd2lkdGg9M0QyODUgaGVpZ2h0PTNEMyB2YWxpZ249M0RUb3Ag Y29sc3Bhbj0zRDY+PC90ZD4NCiA8L3RyPg0KIDx0cj4NCiAgPHRkIHdpZHRoPTNEMCBoZWlnaHQ9 M0QzMD48L3RkPg0KICA8dGQgd2lkdGg9M0QyNzkgaGVpZ2h0PTNEMzAgY29sc3Bhbj0zRDU+DQog IDxkaXYgc3R5bGU9M0QncGFkZGluZy1sZWZ0OjJweDtwYWRkaW5nLXJpZ2h0OjJweDtwYWRkaW5n LXRvcDoycHgnPg0KICA8cCBjbGFzcz0zRE1zb0FjY2VudFRleHQ1IGFsaWduPTNEY2VudGVyID0N CnN0eWxlPTNEJ3RleHQtYWxpZ246Y2VudGVyO21hcmdpbjowcHg7DQogIHRleHQtYWxpZ246Y2Vu dGVyJz48Zm9udCBzaXplPTNEMiBjb2xvcj0zRCIjMDAwMDY2IiBmYWNlPTNEIlRyZWJ1Y2hldCA9 DQpNUyI+PHNwYW4NCiAgbGFuZz0zRGVuLVVTID0NCnN0eWxlPTNEJ2ZvbnQtc2l6ZToxNHB4O2xp bmUtaGVpZ2h0OjExMyU7Zm9udC1mYW1pbHk6IlRyZWJ1Y2hldCBNUyI7DQogIGxhbmd1YWdlOmVu LVVTJz5XZSBBcHByZWNpYXRlIFlvdSBhbmQgWW91ciBCdXNpbmVzcyE8L3NwYW4+PC9mb250Pjwv cD4NCiAgPC9kaXY+DQogIDwvdGQ+DQogIDx0ZCB3aWR0aD0zRDYgaGVpZ2h0PTNEMzAgdmFsaWdu PTNEVG9wPjwvdGQ+DQogPC90cj4NCiA8dHI+DQogIDx0ZCB3aWR0aD0zRDAgaGVpZ2h0PTNEMj48 L3RkPg0KICA8dGQgd2lkdGg9M0QyODUgaGVpZ2h0PTNENSB2YWxpZ249M0RUb3AgY29sc3Bhbj0z RDYgcm93c3Bhbj0zRDI+PC90ZD4NCiA8L3RyPg0KIDx0cj4NCiAgPHRkIHdpZHRoPTNEMCBoZWln aHQ9M0QzPjwvdGQ+DQogIDx0ZCB3aWR0aD0zRDI2OCBoZWlnaHQ9M0QzIHZhbGlnbj0zRFRvcCBj b2xzcGFuPTNEOT48L3RkPg0KIDwvdHI+DQogPHRyPg0KICA8dGQgd2lkdGg9M0QwIGhlaWdodD0z RDM+PC90ZD4NCiAgPHRkIHdpZHRoPTNENSBoZWlnaHQ9M0Q5NTUgdmFsaWduPTNEVG9wIHJvd3Nw YW49M0QxND48L3RkPg0KICA8dGQgd2lkdGg9M0Q1NDAgaGVpZ2h0PTNEMyB2YWxpZ249M0RUb3Ag Y29sc3Bhbj0zRDEyPg0KICA8aW1nIGJvcmRlcj0zRDAgaHNwYWNlPTNEMCB2c3BhY2U9M0QwID0N CnNyYz0zRCJjaWQ6aW1hZ2UwMDIuanBnQDAxQzdFN0U1LjQ5ODI0NjcwIg0KICB3aWR0aD0zRDU0 MCBoZWlnaHQ9M0QzPjwvdGQ+DQogIDx0ZCB3aWR0aD0zRDE0IGhlaWdodD0zRDMgdmFsaWduPTNE VG9wIGNvbHNwYW49M0Q0PjwvdGQ+DQogPC90cj4NCiA8dHI+DQogIDx0ZCB3aWR0aD0zRDAgaGVp Z2h0PTNEMT48L3RkPg0KICA8dGQgd2lkdGg9M0Q1NTQgaGVpZ2h0PTNEMSB2YWxpZ249M0RUb3Ag Y29sc3Bhbj0zRDE2PjwvdGQ+DQogPC90cj4NCiA8dHI+DQogIDx0ZCB3aWR0aD0zRDAgaGVpZ2h0 PTNEMzU3PjwvdGQ+DQogIDx0ZCB3aWR0aD0zRDc5IGhlaWdodD0zRDM1NyB2YWxpZ249M0RUb3Ag Y29sc3Bhbj0zRDU+PC90ZD4NCiAgPHRkIHdpZHRoPTNENDAwIGhlaWdodD0zRDQwMCB2YWxpZ249 M0RUb3AgY29sc3Bhbj0zRDUgcm93c3Bhbj0zRDI+DQogIDxpbWcgYm9yZGVyPTNEMCBoc3BhY2U9 M0QwIHZzcGFjZT0zRDAgPQ0Kc3JjPTNEImNpZDppbWFnZTAwMy5qcGdAMDFDN0U3RTUuNDk4MjQ2 NzAiDQogIHdpZHRoPTNENDAwIGhlaWdodD0zRDQwMD48L3RkPg0KICA8dGQgd2lkdGg9M0Q3NSBo ZWlnaHQ9M0Q0MDAgdmFsaWduPTNEVG9wIGNvbHNwYW49M0Q2IHJvd3NwYW49M0QyPjwvdGQ+DQog PC90cj4NCiA8dHI+DQogIDx0ZCB3aWR0aD0zRDAgaGVpZ2h0PTNENDM+PC90ZD4NCiAgPHRkIHdp ZHRoPTNENCBoZWlnaHQ9M0Q0NyB2YWxpZ249M0RUb3AgY29sc3Bhbj0zRDMgcm93c3Bhbj0zRDM+ PC90ZD4NCiAgPHRkIHdpZHRoPTNENzMgaGVpZ2h0PTNENDQgdmFsaWduPTNEVG9wIHJvd3NwYW49 M0QyPg0KICA8aW1nIGJvcmRlcj0zRDAgaHNwYWNlPTNEMCB2c3BhY2U9M0QwID0NCnNyYz0zRCJj aWQ6aW1hZ2UwMDQuanBnQDAxQzdFN0U1LjQ5ODI0NjcwIg0KICB3aWR0aD0zRDczIGhlaWdodD0z RDQ0IGJvcmRlcj0zRDAgdXNlbWFwPTNEIiNtYXAxIj48bWFwID0NCm5hbWU9M0RtYXAxPjxhcmVh IHNoYXBlPTNEUkVDVA0KICBjb29yZHM9M0QiMCwwIDczLDQ0Ig0KICA9DQpocmVmPTNEImh0dHBz Oi8vd3d3LnBheXBhbC5jb20vY2dpLWJpbi93ZWJzY3I/Y21kPTNEX3hjbGljayZhbXA7YnVzaW5l c3M9M0Q9DQpmYm5vcmZsZWV0JTQwYmVsbHNvdXRoJTJlbmV0JmFtcDt1bmRlZmluZWRfcXVhbnRp dHk9M0QxJmFtcDtpdGVtX25hbWU9M0RIPQ0KUCUyMHo1NjUlMjBEaWdpdGFsJTIwRW50ZXJ0YWlu bWVudCUyMENlbnRlciZhbXA7YW1vdW50PTNENTk5OSUyZTk4JmFtcDtubz0NCl9zaGlwcGluZz0z RDImYW1wO2N1cnJlbmN5X2NvZGU9M0RVU0QmYW1wO2xjPTNEVVMmYW1wO2JuPTNEUFAlMmRCdXlO b3dCRiY9DQphbXA7Y2hhcnNldD0zRFVURiUyZDgiDQogID0NCnRpdGxlPTNEImh0dHBzOi8vd3d3 LnBheXBhbC5jb20vY2dpLWJpbi93ZWJzY3I/Y21kPTNEX3hjbGljayZhbXA7YnVzaW5lc3M9DQo9 M0RmYm5vcmZsZWV0JTQwYmVsbHNvdXRoJTJlbmV0JmFtcDt1bmRlZmluZWRfcXVhbnRpdHk9M0Qx JmFtcDtpdGVtX25hbWU9M0Q9DQpIUCUyMHo1NjUlMjBEaWdpdGFsJTIwRW50ZXJ0YWlubWVudCUy MENlbnRlciZhbXA7YW1vdW50PTNENTk5OSUyZTk4JmFtcDtuPQ0Kb19zaGlwcGluZz0zRDImYW1w O2N1cnJlbmN5X2NvZGU9M0RVU0QmYW1wO2xjPTNEVVMmYW1wO2JuPTNEUFAlMmRCdXlOb3dCRj0N CiZhbXA7Y2hhcnNldD0zRFVURiUyZDgiPjwvbWFwPjwvdGQ+DQogIDx0ZCB3aWR0aD0zRDIgaGVp Z2h0PTNENDQgdmFsaWduPTNEVG9wIHJvd3NwYW49M0QyPjwvdGQ+DQogPC90cj4NCiA8dHI+DQog IDx0ZCB3aWR0aD0zRDAgaGVpZ2h0PTNEMT48L3RkPg0KICA8dGQgd2lkdGg9M0Q0NzUgaGVpZ2h0 PTNEMSB2YWxpZ249M0RUb3AgY29sc3Bhbj0zRDExPjwvdGQ+DQogPC90cj4NCiA8dHI+DQogIDx0 ZCB3aWR0aD0zRDAgaGVpZ2h0PTNEMz48L3RkPg0KICA8dGQgd2lkdGg9M0Q1NTAgaGVpZ2h0PTNE MyB2YWxpZ249M0RUb3AgY29sc3Bhbj0zRDEzPjwvdGQ+DQogPC90cj4NCiA8dHI+DQogIDx0ZCB3 aWR0aD0zRDAgaGVpZ2h0PTNEMz48L3RkPg0KICA8dGQgd2lkdGg9M0QzIGhlaWdodD0zRDQ2OSB2 YWxpZ249M0RUb3AgY29sc3Bhbj0zRDIgcm93c3Bhbj0zRDU+PC90ZD4NCiAgPHRkIHdpZHRoPTNE NTQ2IGhlaWdodD0zRDMgdmFsaWduPTNEVG9wIGNvbHNwYW49M0QxMz4NCiAgPGltZyBib3JkZXI9 M0QwIGhzcGFjZT0zRDAgdnNwYWNlPTNEMCA9DQpzcmM9M0QiY2lkOmltYWdlMDA1LmpwZ0AwMUM3 RTdFNS40OTgyNDY3MCINCiAgd2lkdGg9M0Q1NDYgaGVpZ2h0PTNEMz48L3RkPg0KICA8dGQgd2lk dGg9M0Q1IGhlaWdodD0zRDMgdmFsaWduPTNEVG9wPjwvdGQ+DQogPC90cj4NCiA8dHI+DQogIDx0 ZCB3aWR0aD0zRDAgaGVpZ2h0PTNEND48L3RkPg0KICA8dGQgd2lkdGg9M0Q1NTEgaGVpZ2h0PTNE NCB2YWxpZ249M0RUb3AgY29sc3Bhbj0zRDE0PjwvdGQ+DQogPC90cj4NCiA8dHI+DQogIDx0ZCB3 aWR0aD0zRDAgaGVpZ2h0PTNENDU2PjwvdGQ+DQogIDx0ZCB3aWR0aD0zRDEgaGVpZ2h0PTNENDYy IHZhbGlnbj0zRFRvcCByb3dzcGFuPTNEMz48L3RkPg0KICA8dGQgd2lkdGg9M0Q1NDMgaGVpZ2h0 PTNENDU5IHZhbGlnbj0zRFRvcCBjb2xzcGFuPTNEMTEgcm93c3Bhbj0zRDI+DQogIDxkaXYgc3R5 bGU9M0QncGFkZGluZy1sZWZ0OjJweDtwYWRkaW5nLXJpZ2h0OjJweDtwYWRkaW5nLXRvcDoycHgn Pg0KICA8cCBjbGFzcz0zRE1zb0FjY2VudFRleHQ1IGFsaWduPTNEY2VudGVyID0NCnN0eWxlPTNE J3RleHQtYWxpZ246Y2VudGVyO21hcmdpbjowcHg7DQogIHRleHQtYWxpZ246Y2VudGVyJz48Zm9u dCBzaXplPTNEMSBjb2xvcj0zRGJsYWNrIGZhY2U9M0QiVHJlYnVjaGV0ID0NCk1TIj48c3Bhbg0K ICBsYW5nPTNEZW4tVVMgPQ0Kc3R5bGU9M0QnZm9udC1zaXplOjEycHg7bGluZS1oZWlnaHQ6MTEz JTtmb250LWZhbWlseToiVHJlYnVjaGV0IE1TIjsNCiAgY29sb3I6YmxhY2s7bGFuZ3VhZ2U6ZW4t VVMnPkhQIHo1NjUgRGlnaXRhbCBFbnRlcnRhaW5tZW50ID0NCkNlbnRlcjwvc3Bhbj48L2ZvbnQ+ PC9wPg0KICA8cCBjbGFzcz0zRE1zb0FjY2VudFRleHQ1IGFsaWduPTNEY2VudGVyID0NCnN0eWxl PTNEJ3RleHQtYWxpZ246Y2VudGVyO21hcmdpbjowcHg7DQogIHRleHQtYWxpZ246Y2VudGVyJz48 YQ0KICA9DQpocmVmPTNEImh0dHA6Ly9oNzEwMTYud3d3Ny5ocC5jb20vaHRtbC9pbnRlcmFjdGl2 ZS96NTAwL21vZGVsLmh0bWwiPjxmb250PQ0KDQogIHNpemU9M0QxIGNvbG9yPTNEYmxhY2sgZmFj ZT0zRCJUcmVidWNoZXQgTVMiPjxzcGFuIGxhbmc9M0Rlbi1VUyA9DQpzdHlsZT0zRCdmb250LXNp emU6DQogIDEycHg7bGluZS1oZWlnaHQ6MTEzJTtmb250LWZhbWlseToiVHJlYnVjaGV0ID0NCk1T Ijtjb2xvcjpibGFjazt0ZXh0LWRlY29yYXRpb246DQogIHVuZGVybGluZTtsYW5ndWFnZTplbi1V Uyc+VmlldyBEZW1vITwvc3Bhbj48L2ZvbnQ+PC9hPjwvcD4NCiAgPHAgY2xhc3M9M0RNc29BY2Nl bnRUZXh0NSBhbGlnbj0zRGxlZnQgc3R5bGU9M0QnbWFyZ2luOjBweCc+PGZvbnQgPQ0Kc2l6ZT0z RDENCiAgY29sb3I9M0RibGFjayBmYWNlPTNEIlRyZWJ1Y2hldCBNUyI+PHNwYW4gbGFuZz0zRGVu LVVTID0NCnN0eWxlPTNEJ2ZvbnQtc2l6ZToxMnB4Ow0KICBsaW5lLWhlaWdodDoxMTMlO2ZvbnQt ZmFtaWx5OiJUcmVidWNoZXQgPQ0KTVMiO2NvbG9yOmJsYWNrO2xhbmd1YWdlOmVuLVVTJz5PdmVy dmlldzo8L3NwYW4+PC9mb250PjwvcD4NCiAgPHAgY2xhc3M9M0RNc29BY2NlbnRUZXh0NSBhbGln bj0zRGxlZnQgPQ0Kc3R5bGU9M0QnbWFyZ2luOjBweDttYXJnaW4tbGVmdDo0OHB4Jz48Zm9udA0K ICBzaXplPTNEMSBjb2xvcj0zRGJsYWNrIGZhY2U9M0QiVHJlYnVjaGV0IE1TIj48c3BhbiBsYW5n PTNEZW4tVVMgPQ0Kc3R5bGU9M0QnZm9udC1zaXplOg0KICAxMnB4O2xpbmUtaGVpZ2h0OjExMyU7 Zm9udC1mYW1pbHk6IlRyZWJ1Y2hldCA9DQpNUyI7Y29sb3I6YmxhY2s7bGFuZ3VhZ2U6ZW4tVVMn PldhdGNoIGxvdHMgb2YgVFYgYW5kIG1vdmllcz8gTGlzdGVuIHRvID0NCm11c2ljIGFsbCB0aGUg dGltZT8gTG92ZSB2aWRlbyBnYW1lcz8gVGhlIEhQIHo1NjUgRGlnaXRhbCBFbnRlcnRhaW5tZW50 ID0NCkNlbnRlciBpcyBtYWRlIHdpdGggeW91IGluIG1pbmQuIEl0IGNlbnRyYWxpemVzIHlvdXIg dmFyaW91cyA9DQplbnRlcnRhaW5tZW50IGluIG9uZSBjb252ZW5pZW50IGRpZ2l0YWwgbG9jYXRp b24uIFBsdXMsIHlvdSBjYW4gc3RvcmUgYSA9DQp3aG9wcGluZyA4MDBHQiB3b3J0aCBvZiB5b3Vy IGZhdm9yaXRlIHNob3dzLCBtb3ZpZXMsIG11c2ljLCBnYW1lcywgPQ0Kc29uZ3MsIGFuZCBwaG90 b3MhPC9zcGFuPjwvZm9udD48L3A+DQogIDxwIGNsYXNzPTNETXNvQWNjZW50VGV4dDUgYWxpZ249 M0RsZWZ0IHN0eWxlPTNEJ21hcmdpbjowcHgnPjxmb250ID0NCnNpemU9M0QxDQogIGNvbG9yPTNE IiMwMDAwNjYiIGZhY2U9M0QiVHJlYnVjaGV0IE1TIj48c3BhbiBsYW5nPTNEZW4tVVMgPQ0Kc3R5 bGU9M0QnZm9udC1zaXplOjEycHg7DQogIGxpbmUtaGVpZ2h0OjExMyU7Zm9udC1mYW1pbHk6IlRy ZWJ1Y2hldCA9DQpNUyI7bGFuZ3VhZ2U6ZW4tVVMnPkRldGFpbHM6PC9zcGFuPjwvZm9udD48L3A+ DQogIDxwIGNsYXNzPTNETXNvQWNjZW50VGV4dDUgYWxpZ249M0RsZWZ0ID0NCnN0eWxlPTNEJ21h cmdpbjowcHg7bWFyZ2luLWxlZnQ6NDhweCc+PGZvbnQNCiAgc2l6ZT0zRDEgY29sb3I9M0QiIzAw MDA2NiIgZmFjZT0zRCJUcmVidWNoZXQgTVMiPjxzcGFuIGxhbmc9M0Rlbi1VUyA9DQpzdHlsZT0z RCdmb250LXNpemU6DQogIDEycHg7bGluZS1oZWlnaHQ6MTEzJTtsYW5ndWFnZTplbi1VUyc+JiM4 MjI2O0ludGVsIFBlbnRpdW0gRCA5NDUgRHVhbCA9DQpDb3JlIHByb2Nlc3NvciAoMy40R0h6KTwv c3Bhbj48L2ZvbnQ+PC9wPg0KICA8cCBjbGFzcz0zRE1zb0FjY2VudFRleHQ1IGFsaWduPTNEbGVm dCA9DQpzdHlsZT0zRCdtYXJnaW46MHB4O21hcmdpbi1sZWZ0OjQ4cHgnPjxmb250DQogIHNpemU9 M0QxIGNvbG9yPTNEIiMwMDAwNjYiIGZhY2U9M0QiVHJlYnVjaGV0IE1TIj48c3BhbiBsYW5nPTNE ZW4tVVMgPQ0Kc3R5bGU9M0QnZm9udC1zaXplOg0KICAxMnB4O2xpbmUtaGVpZ2h0OjExMyU7bGFu Z3VhZ2U6ZW4tVVMnPiYjODIyNjtHZW51aW5lIFdpbmRvd3MgWFAgTWVkaWEgPQ0KQ2VudGVyPC9z cGFuPjwvZm9udD48L3A+DQogIDxwIGNsYXNzPTNETXNvQWNjZW50VGV4dDUgYWxpZ249M0RsZWZ0 ID0NCnN0eWxlPTNEJ21hcmdpbjowcHg7bWFyZ2luLWxlZnQ6NDhweCc+PGZvbnQNCiAgc2l6ZT0z RDEgY29sb3I9M0QiIzAwMDA2NiIgZmFjZT0zRCJUcmVidWNoZXQgTVMiPjxzcGFuIGxhbmc9M0Rl bi1VUyA9DQpzdHlsZT0zRCdmb250LXNpemU6DQogIDEycHg7bGluZS1oZWlnaHQ6MTEzJTtsYW5n dWFnZTplbi1VUyc+JiM4MjI2OzJHQiBERFIyID0NClNEUkFNPC9zcGFuPjwvZm9udD48L3A+DQog IDxwIGNsYXNzPTNETXNvQWNjZW50VGV4dDUgYWxpZ249M0RsZWZ0ID0NCnN0eWxlPTNEJ21hcmdp bjowcHg7bWFyZ2luLWxlZnQ6NDhweCc+PGZvbnQNCiAgc2l6ZT0zRDEgY29sb3I9M0QiIzAwMDA2 NiIgZmFjZT0zRCJUcmVidWNoZXQgTVMiPjxzcGFuIGxhbmc9M0Rlbi1VUyA9DQpzdHlsZT0zRCdm b250LXNpemU6DQogIDEycHg7bGluZS1oZWlnaHQ6MTEzJTtsYW5ndWFnZTplbi1VUyc+JiM4MjI2 OzUwMEdCIDcyMDAgcnBtIGhhcmQgPQ0KZHJpdmU8L3NwYW4+PC9mb250PjwvcD4NCiAgPHAgY2xh c3M9M0RNc29BY2NlbnRUZXh0NSBhbGlnbj0zRGxlZnQgPQ0Kc3R5bGU9M0QnbWFyZ2luOjBweDtt YXJnaW4tbGVmdDo0OHB4Jz48Zm9udA0KICBzaXplPTNEMSBjb2xvcj0zRCIjMDAwMDY2IiBmYWNl PTNEIlRyZWJ1Y2hldCBNUyI+PHNwYW4gbGFuZz0zRGVuLVVTID0NCnN0eWxlPTNEJ2ZvbnQtc2l6 ZToNCiAgMTJweDtsaW5lLWhlaWdodDoxMTMlO2xhbmd1YWdlOmVuLVVTJz4mIzgyMjY7RG91Ymxl LWxheWVyIFN1cGVyTXVsdGkgPQ0KRFZEPUIxUi9SVyBkcml2ZSB3aXRoIExpZ2h0U2NyaWJlLCBw cm9ncmVzc2l2ZSBzY2FuIERWRCA9DQpwbGF5YmFjazwvc3Bhbj48L2ZvbnQ+PC9wPg0KICA8cCBj bGFzcz0zRE1zb0FjY2VudFRleHQ1IGFsaWduPTNEbGVmdCA9DQpzdHlsZT0zRCdtYXJnaW46MHB4 O21hcmdpbi1sZWZ0OjQ4cHgnPjxmb250DQogIHNpemU9M0QxIGNvbG9yPTNEIiMwMDAwNjYiIGZh Y2U9M0QiVHJlYnVjaGV0IE1TIj48c3BhbiBsYW5nPTNEZW4tVVMgPQ0Kc3R5bGU9M0QnZm9udC1z aXplOg0KICAxMnB4O2xpbmUtaGVpZ2h0OjExMyU7bGFuZ3VhZ2U6ZW4tVVMnPiYjODIyNjtOVklE SUEgR2VGb3JjZSA3NjAwIEdTID0NCmdyYXBoaWNzPC9zcGFuPjwvZm9udD48L3A+DQogIDxwIGNs YXNzPTNETXNvQWNjZW50VGV4dDUgYWxpZ249M0RsZWZ0ID0NCnN0eWxlPTNEJ21hcmdpbjowcHg7 bWFyZ2luLWxlZnQ6NDhweCc+PGZvbnQNCiAgc2l6ZT0zRDEgY29sb3I9M0QiIzAwMDA2NiIgZmFj ZT0zRCJUcmVidWNoZXQgTVMiPjxzcGFuIGxhbmc9M0Rlbi1VUyA9DQpzdHlsZT0zRCdmb250LXNp emU6DQogIDEycHg7bGluZS1oZWlnaHQ6MTEzJTtsYW5ndWFnZTplbi1VUyc+JiM4MjI2O0ludGVs IEhpZ2ggRGVmaW5pdGlvbiA9DQpBdWRpbzwvc3Bhbj48L2ZvbnQ+PC9wPg0KICA8cCBjbGFzcz0z RE1zb0FjY2VudFRleHQ1IGFsaWduPTNEbGVmdCA9DQpzdHlsZT0zRCdtYXJnaW46MHB4O21hcmdp bi1sZWZ0OjQ4cHgnPjxmb250DQogIHNpemU9M0QxIGNvbG9yPTNEIiMwMDAwNjYiIGZhY2U9M0Qi VHJlYnVjaGV0IE1TIj48c3BhbiBsYW5nPTNEZW4tVVMgPQ0Kc3R5bGU9M0QnZm9udC1zaXplOg0K ICAxMnB4O2xpbmUtaGVpZ2h0OjExMyU7bGFuZ3VhZ2U6ZW4tVVMnPiYjODIyNjs5LWluLTEgZGln aXRhbCBtZWRpYSBjYXJkID0NCnJlYWRlcjwvc3Bhbj48L2ZvbnQ+PC9wPg0KICA8cCBjbGFzcz0z RE1zb0FjY2VudFRleHQ1IGFsaWduPTNEbGVmdCA9DQpzdHlsZT0zRCdtYXJnaW46MHB4O21hcmdp bi1sZWZ0OjQ4cHgnPjxmb250DQogIHNpemU9M0QxIGNvbG9yPTNEIiMwMDAwNjYiIGZhY2U9M0Qi VHJlYnVjaGV0IE1TIj48c3BhbiBsYW5nPTNEZW4tVVMgPQ0Kc3R5bGU9M0QnZm9udC1zaXplOg0K ICAxMnB4O2xpbmUtaGVpZ2h0OjExMyU7bGFuZ3VhZ2U6ZW4tVVMnPiYjODIyNjtQZXJzb25hbCB2 aWRlbyByZWNvcmRlciA9DQp3aXRoIGR1YWwgTlRTQyBUViB0dW5lcnMsIG92ZXItYWlyIEFUU0Mg VFYgdHVuZXI8L3NwYW4+PC9mb250PjwvcD4NCiAgPHAgY2xhc3M9M0RNc29BY2NlbnRUZXh0NSBh bGlnbj0zRGxlZnQgPQ0Kc3R5bGU9M0QnbWFyZ2luOjBweDttYXJnaW4tbGVmdDo0OHB4Jz48Zm9u dA0KICBzaXplPTNEMSBjb2xvcj0zRCIjMDAwMDY2IiBmYWNlPTNEIlRyZWJ1Y2hldCBNUyI+PHNw YW4gbGFuZz0zRGVuLVVTID0NCnN0eWxlPTNEJ2ZvbnQtc2l6ZToNCiAgMTJweDtsaW5lLWhlaWdo dDoxMTMlO2xhbmd1YWdlOmVuLVVTJz4mIzgyMjY7UmVtb3RlPC9zcGFuPjwvZm9udD48L3A+DQog IDxwIGNsYXNzPTNETXNvQWNjZW50VGV4dDUgYWxpZ249M0RsZWZ0ID0NCnN0eWxlPTNEJ21hcmdp bjowcHg7bWFyZ2luLWxlZnQ6NDhweCc+PGZvbnQNCiAgc2l6ZT0zRDEgY29sb3I9M0QiIzAwMDA2 NiIgZmFjZT0zRCJUcmVidWNoZXQgTVMiPjxzcGFuIGxhbmc9M0Rlbi1VUyA9DQpzdHlsZT0zRCdm b250LXNpemU6DQogIDEycHg7bGluZS1oZWlnaHQ6MTEzJTtsYW5ndWFnZTplbi1VUyc+JiM4MjI2 O1dpcmVsZXNzIGtleWJvYXJkIHdpdGggPQ0KdHJhY2tiYWxsLCBtdWx0aW1lZGlhIGtleXM8L3Nw YW4+PC9mb250PjwvcD4NCiAgPHAgY2xhc3M9M0RNc29BY2NlbnRUZXh0NSBhbGlnbj0zRGxlZnQg PQ0Kc3R5bGU9M0QnbWFyZ2luOjBweDttYXJnaW4tbGVmdDo0OHB4Jz48Zm9udA0KICBzaXplPTNE MSBjb2xvcj0zRCIjMDAwMDY2IiBmYWNlPTNEIlRyZWJ1Y2hldCBNUyI+PHNwYW4gbGFuZz0zRGVu LVVTID0NCnN0eWxlPTNEJ2ZvbnQtc2l6ZToNCiAgMTJweDtsaW5lLWhlaWdodDoxMTMlO2xhbmd1 YWdlOmVuLVVTJz4mIzgyMjY7UGVyc29uYWwgbWVkaWEgPQ0KZHJpdmU8L3NwYW4+PC9mb250Pjwv cD4NCiAgPHAgY2xhc3M9M0RNc29BY2NlbnRUZXh0NSBhbGlnbj0zRGxlZnQgPQ0Kc3R5bGU9M0Qn bWFyZ2luOjBweDttYXJnaW4tbGVmdDo0OHB4Jz48Zm9udA0KICBzaXplPTNEMSBjb2xvcj0zRCIj MDAwMDY2IiBmYWNlPTNEIlRyZWJ1Y2hldCBNUyI+PHNwYW4gbGFuZz0zRGVuLVVTID0NCnN0eWxl PTNEJ2ZvbnQtc2l6ZToNCiAgMTJweDtsaW5lLWhlaWdodDoxMTMlO2xhbmd1YWdlOmVuLVVTJz4m IzgyMjY7V2luZG93cyBWaXN0YSBQcmVtaXVtID0NCkNhcGFibGU8L3NwYW4+PC9mb250PjwvcD4N CiAgPHAgY2xhc3M9M0RNc29BY2NlbnRUZXh0NSBhbGlnbj0zRGxlZnQgPQ0Kc3R5bGU9M0QnbWFy Z2luOjBweDttYXJnaW4tbGVmdDo0OHB4Jz48Zm9udA0KICBzaXplPTNEMSBjb2xvcj0zRCIjMDAw MDY2IiBmYWNlPTNEIlRyZWJ1Y2hldCBNUyI+PHNwYW4gbGFuZz0zRGVuLVVTID0NCnN0eWxlPTNE J2ZvbnQtc2l6ZToNCiAgMTJweDtsaW5lLWhlaWdodDoxMTMlO2xhbmd1YWdlOmVuLVVTJz4mIzgy MjY7T25lLXllYXIgbGltaXRlZCA9DQp3YXJyYW50eTwvc3Bhbj48L2ZvbnQ+PC9wPg0KICA8cCBj bGFzcz0zRE1zb0FjY2VudFRleHQ1IGFsaWduPTNEbGVmdCBzdHlsZT0zRCdtYXJnaW46MHB4Jz48 Zm9udCA9DQpzaXplPTNEMQ0KICBjb2xvcj0zRGJsYWNrIGZhY2U9M0QiVHJlYnVjaGV0IE1TIj48 c3BhbiBsYW5nPTNEZW4tVVMgPQ0Kc3R5bGU9M0QnZm9udC1zaXplOjEycHg7DQogIGxpbmUtaGVp Z2h0OjExMyU7Zm9udC1mYW1pbHk6IlRyZWJ1Y2hldCA9DQpNUyI7Y29sb3I6YmxhY2s7bGFuZ3Vh Z2U6ZW4tVVMnPlByaWNlOiA8L3NwYW4+PC9mb250PjwvcD4NCiAgPHAgY2xhc3M9M0RNc29BY2Nl bnRUZXh0NSBhbGlnbj0zRGxlZnQgPQ0Kc3R5bGU9M0QnbWFyZ2luOjBweDttYXJnaW4tbGVmdDo0 OHB4Jz48Zm9udA0KICBzaXplPTNEMSBjb2xvcj0zRGJsYWNrIGZhY2U9M0QiVHJlYnVjaGV0IE1T Ij48c3BhbiBsYW5nPTNEZW4tVVMgPQ0Kc3R5bGU9M0QnZm9udC1zaXplOg0KICAxMnB4O2xpbmUt aGVpZ2h0OjExMyU7Zm9udC1mYW1pbHk6IlRyZWJ1Y2hldCA9DQpNUyI7Y29sb3I6YmxhY2s7bGFu Z3VhZ2U6ZW4tVVMnPiQ1OTk5Ljk4PC9zcGFuPjwvZm9udD48L3A+DQogIDwvZGl2Pg0KICA8L3Rk Pg0KICA8dGQgd2lkdGg9M0Q3IGhlaWdodD0zRDQ1OSB2YWxpZ249M0RUb3AgY29sc3Bhbj0zRDIg cm93c3Bhbj0zRDI+PC90ZD4NCiA8L3RyPg0KIDx0cj4NCiAgPHRkIHdpZHRoPTNEMCBoZWlnaHQ9 M0QzPjwvdGQ+DQogPC90cj4NCiA8dHI+DQogIDx0ZCB3aWR0aD0zRDAgaGVpZ2h0PTNEMz48L3Rk Pg0KICA8dGQgd2lkdGg9M0QzODcgaGVpZ2h0PTNEMyB2YWxpZ249M0RUb3AgY29sc3Bhbj0zRDY+ PC90ZD4NCiAgPHRkIHdpZHRoPTNEMTUyIGhlaWdodD0zRDYxIHZhbGlnbj0zRFRvcCBjb2xzcGFu PTNENCByb3dzcGFuPTNEMz4NCiAgPGltZyBib3JkZXI9M0QwIGhzcGFjZT0zRDAgdnNwYWNlPTNE MCA9DQpzcmM9M0QiY2lkOmltYWdlMDA2LmpwZ0AwMUM3RTdFNS40OTgyNDY3MCINCiAgd2lkdGg9 M0QxNTIgaGVpZ2h0PTNENjEgYm9yZGVyPTNEMCB1c2VtYXA9M0QiI21hcDIiPjxtYXAgPQ0KbmFt ZT0zRG1hcDI+PGFyZWEgc2hhcGU9M0RSRUNUDQogIGNvb3Jkcz0zRCIwLDAgMTUyLDYxIg0KICA9 DQpocmVmPTNEImh0dHBzOi8vZmJuLWl0cHJvLndlYmV4LmNvbS9mYm4taXRwcm8vc3VwcG9ydGNl bnRlci93ZWJhY2Qud2J4P0FUPQ0KPTNEcHFmb3JtJmFtcDtRSUQ9M0QzODEzJmFtcDtVSUQ9M0Q0 Nzk4NDU1OTgmYW1wO1NLPTNEYzU1ZjVkN2Y4NzgwZDk1Mzg1Nj0NCmM1ZTI2ZTY1ODljNTgiDQog ID0NCnRpdGxlPTNEImh0dHBzOi8vZmJuLWl0cHJvLndlYmV4LmNvbS9mYm4taXRwcm8vc3VwcG9y dGNlbnRlci93ZWJhY2Qud2J4P0E9DQpUPTNEcHFmb3JtJmFtcDtRSUQ9M0QzODEzJmFtcDtVSUQ9 M0Q0Nzk4NDU1OTgmYW1wO1NLPTNEYzU1ZjVkN2Y4NzgwZDk1Mzg1PQ0KNmM1ZTI2ZTY1ODljNTgi PjwvbWFwPjwvdGQ+DQogIDx0ZCB3aWR0aD0zRDExIGhlaWdodD0zRDYxIHZhbGlnbj0zRFRvcCBj b2xzcGFuPTNEMyByb3dzcGFuPTNEMz48L3RkPg0KIDwvdHI+DQogPHRyPg0KICA8dGQgd2lkdGg9 M0QwIGhlaWdodD0zRDU3PjwvdGQ+DQogIDx0ZCB3aWR0aD0zRDEgaGVpZ2h0PTNENzggdmFsaWdu PTNEVG9wIHJvd3NwYW49M0QzPjwvdGQ+DQogIDx0ZCB3aWR0aD0zRDM4NyBoZWlnaHQ9M0Q1NyBj b2xzcGFuPTNENz4NCiAgPGRpdiBzdHlsZT0zRCdwYWRkaW5nLWxlZnQ6MnB4O3BhZGRpbmctcmln aHQ6MnB4O3BhZGRpbmctdG9wOjJweCc+DQogIDxwIGNsYXNzPTNETXNvQWNjZW50VGV4dDUgYWxp Z249M0RsZWZ0IHN0eWxlPTNEJ21hcmdpbjowcHgnPjxmb250ID0NCnNpemU9M0QwDQogIGNvbG9y PTNEIiMwMDAwNjYiIGZhY2U9M0QiVHJlYnVjaGV0IE1TIj48c3BhbiBsYW5nPTNEZW4tVVMgPQ0K c3R5bGU9M0QnZm9udC1zaXplOjhweDsNCiAgbGluZS1oZWlnaHQ6MTEzJTtmb250LWZhbWlseToi VHJlYnVjaGV0IE1TIjtsYW5ndWFnZTplbi1VUyc+RkJOIElUUHJvID0NCk9ubGluZSA8L3NwYW4+ PC9mb250PjwvcD4NCiAgPHAgY2xhc3M9M0RNc29BY2NlbnRUZXh0NSBhbGlnbj0zRGxlZnQgc3R5 bGU9M0QnbWFyZ2luOjBweCc+PGZvbnQgPQ0Kc2l6ZT0zRDANCiAgY29sb3I9M0QiIzAwMDA2NiIg ZmFjZT0zRCJUcmVidWNoZXQgTVMiPjxzcGFuIGxhbmc9M0Rlbi1VUyA9DQpzdHlsZT0zRCdmb250 LXNpemU6OHB4Ow0KICBsaW5lLWhlaWdodDoxMTMlO2ZvbnQtZmFtaWx5OiJUcmVidWNoZXQgTVMi O2xhbmd1YWdlOmVuLVVTJz41MDMxID0NCkxhdXJlbCBMYWtlIERyaXZlLCBNZW1waGlzLCBUTiAz ODEyNTwvc3Bhbj48L2ZvbnQ+PC9wPg0KICA8cCBjbGFzcz0zRE1zb0FjY2VudFRleHQ1IGFsaWdu PTNEbGVmdCBzdHlsZT0zRCdtYXJnaW46MHB4Jz48Zm9udCA9DQpzaXplPTNEMA0KICBjb2xvcj0z RCIjMDAwMDY2IiBmYWNlPTNEIlRyZWJ1Y2hldCBNUyI+PHNwYW4gbGFuZz0zRGVuLVVTID0NCnN0 eWxlPTNEJ2ZvbnQtc2l6ZTo4cHg7DQogIGxpbmUtaGVpZ2h0OjExMyU7Zm9udC1mYW1pbHk6IlRy ZWJ1Y2hldCBNUyI7bGFuZ3VhZ2U6ZW4tVVMnPlBob25lOiA9DQoxLTkwMS00NTctMTE1ODwvc3Bh bj48L2ZvbnQ+PC9wPg0KICA8cCBjbGFzcz0zRE1zb0FjY2VudFRleHQ1IGFsaWduPTNEbGVmdCBz dHlsZT0zRCdtYXJnaW46MHB4Jz48Zm9udCA9DQpzaXplPTNEMA0KICBjb2xvcj0zRCIjMDAwMDY2 IiBmYWNlPTNEIlRyZWJ1Y2hldCBNUyI+PHNwYW4gbGFuZz0zRGVuLVVTID0NCnN0eWxlPTNEJ2Zv bnQtc2l6ZTo4cHg7DQogIGxpbmUtaGVpZ2h0OjExMyU7Zm9udC1mYW1pbHk6IlRyZWJ1Y2hldCBN UyI7bGFuZ3VhZ2U6ZW4tVVMnPkNsaWNrID0NCjwvc3Bhbj48L2ZvbnQ+PGENCiAgaHJlZj0zRCJt YWlsdG86ZmJub3JmbGVldEBiZWxsb3V0aC5uZXQ/c3ViamVjdD0zRFVuc3Vic2NyaWJlIj48Zm9u dCA9DQpzaXplPTNEMA0KICBjb2xvcj0zRCIjMDAwMDY2IiBmYWNlPTNEIlRyZWJ1Y2hldCBNUyI+ PHNwYW4gbGFuZz0zRGVuLVVTID0NCnN0eWxlPTNEJ2ZvbnQtc2l6ZTo4cHg7DQogIGxpbmUtaGVp Z2h0OjExMyU7Zm9udC1mYW1pbHk6IlRyZWJ1Y2hldCA9DQpNUyI7Y29sb3I6YmxhY2s7dGV4dC1k ZWNvcmF0aW9uOnVuZGVybGluZTsNCiAgbGFuZ3VhZ2U6ZW4tVVMnPnVuc3Vic2NyaWJlPC9zcGFu PjwvZm9udD48L2E+PGZvbnQgc2l6ZT0zRDAgPQ0KY29sb3I9M0QiIzAwMDA2NiINCiAgZmFjZT0z RCJUcmVidWNoZXQgTVMiPjxzcGFuIGxhbmc9M0Rlbi1VUyA9DQpzdHlsZT0zRCdmb250LXNpemU6 OHB4O2xpbmUtaGVpZ2h0OjExMyU7DQogIGZvbnQtZmFtaWx5OiJUcmVidWNoZXQgTVMiO2xhbmd1 YWdlOmVuLVVTJz4gdG8gYmUgcmVtb3ZlZCBmcm9tIG91ciA9DQptYWlsaW5nIGxpc3QhPC9zcGFu PjwvZm9udD48L3A+DQogIDwvZGl2Pg0KICA8L3RkPg0KICA8dGQgd2lkdGg9M0QzIGhlaWdodD0z RDU3IHZhbGlnbj0zRFRvcD48L3RkPg0KIDwvdHI+DQogPHRyPg0KICA8dGQgd2lkdGg9M0QwIGhl aWdodD0zRDE+PC90ZD4NCiAgPHRkIHdpZHRoPTNEMzkwIGhlaWdodD0zRDIxIHZhbGlnbj0zRFRv cCBjb2xzcGFuPTNEOCByb3dzcGFuPTNEMj48L3RkPg0KIDwvdHI+DQogPHRyPg0KICA8dGQgd2lk dGg9M0QwIGhlaWdodD0zRDIwPjwvdGQ+DQogIDx0ZCB3aWR0aD0zRDE2MyBoZWlnaHQ9M0QyMCB2 YWxpZ249M0RUb3AgY29sc3Bhbj0zRDc+PC90ZD4NCiA8L3RyPg0KPC90YWJsZT4NCg0KDQo8L2Jv ZHk+DQoNCjwvaHRtbD4NCgSB5A0KLS0tLS0tPV9OZXh0UGFydF8wMDFfMDUxQV8wMUM3RTdFNS40 OTlFRjYzMC0tDQoNCi0tLS0tLT1fTmV4dFBhcnRfMDAwXzA1MTlfMDFDN0U3RTUuNDk5RUY2MzAN CkNvbnRlbnQtVHlwZTogaW1hZ2UvanBlZzsNCgluYW1lPSJpbWFnZTAwMS5qcGciDQpDb250ZW50 LVRyYW5zZmVyLUVuY29kaW5nOiBiYXNlNjQNCkNvbnRlbnQtSUQ6IDxpbWFnZTAwMS5qcGdAMDFD N0U3RTUuNDk4MjQ2NzA+DQoNCgSCJWIvOWovNEFBUVNrWkpSZ0FCQVFFQVlBQmdBQUQvMndCREFB WUVCUVlGQkFZR0JRWUhCd1lJQ2hBS0Nna0pDaFFPRHd3UUZ4UVlHQmNVDQpGaFlhSFNVZkdoc2pI QllXSUN3Z0l5WW5LU29wR1I4dE1DMG9NQ1VvS1NqLzJ3QkRBUWNIQndvSUNoTUtDaE1vR2hZYUtD Z29LQ2dvDQpLQ2dvS0Nnb0tDZ29LQ2dvS0Nnb0tDZ29LQ2dvS0Nnb0tDZ29LQ2dvS0Nnb0tDZ29L Q2dvS0Nnb0tDai93QUFSQ0FCUUFQMERBU0lBDQpBaEVCQXhFQi84UUFId0FBQVFVQkFRRUJBUUVB QUFBQUFBQUFBQUVDQXdRRkJnY0lDUW9MLzhRQXRSQUFBZ0VEQXdJRUF3VUZCQVFBDQpBQUY5QVFJ REFBUVJCUkloTVVFR0UxRmhCeUp4RkRLQmthRUlJMEt4d1JWUzBmQWtNMkp5Z2drS0ZoY1lHUm9s Smljb0tTbzBOVFkzDQpPRGs2UTBSRlJrZElTVXBUVkZWV1YxaFpXbU5rWldabmFHbHFjM1IxZG5k NGVYcURoSVdHaDRpSmlwS1RsSldXbDVpWm1xS2pwS1dtDQpwNmlwcXJLenRMVzJ0N2k1dXNMRHhN WEd4OGpKeXRMVDFOWFcxOWpaMnVIaTQrVGw1dWZvNmVyeDh2UDA5ZmIzK1BuNi84UUFId0VBDQpB d0VCQVFFQkFRRUJBUUFBQUFBQUFBRUNBd1FGQmdjSUNRb0wvOFFBdFJFQUFnRUNCQVFEQkFjRkJB UUFBUUozQUFFQ0F4RUVCU0V4DQpCaEpCVVFkaGNSTWlNb0VJRkVLUm9iSEJDU016VXZBVlluTFJD aFlrTk9FbDhSY1lHUm9tSnlncEtqVTJOemc1T2tORVJVWkhTRWxLDQpVMVJWVmxkWVdWcGpaR1Zt WjJocGFuTjBkWFozZUhsNmdvT0VoWWFIaUltS2twT1VsWmFYbUptYW9xT2twYWFucUttcXNyTzB0 YmEzDQp1TG02d3NQRXhjYkh5TW5LMHRQVTFkYlgyTm5hNHVQazVlYm42T25xOHZQMDlmYjMrUG42 LzlvQURBTUJBQUlSQXhFQVB3RDZwb29vDQpvQUtLS0tBQ2l2SnREOFFlTnZFbWwzT3U2ZnF2aHpU OUZlNm1qdFRkMjdrbUpaQ2lzVzNnYzR4OWF0M0hpenhUNFBsczdueHdtalhYDQpoKzVsV0U2anB2 bUsxdVcrNjBpTm5LSDFYcCtXZHZZdTlyNm1TcXExN2FIcDFGZWYvd0RDNC9BbUNScnBLQTdTNHM3 Z29EL3ZlWGp2DQo2MUxMOFhmQWtVakkzaU8xSlU0TzFKR0g1aGNHcDlqVS9sZjNEOXJEK1pmZWQz UlhHYWw4VVBCbW15d3gzdXZXOGJ5d3gzQ0RZN1pqDQpkUXlIaFRqS2tIQjV3UlhMK0hkZThjK0k5 QVh4QmJhcjRjMDNTcm1XVDdPdDViUHVFWWtaVjNOdkF5Y1UxUmxhNzA5UWRXTjdMVTliDQpvcnpD ZnhoNGw4RzNOaS94QWowZWJRN3lUeUYxUFRmTVh5SElKWHpFYk9WT0R5dlNyNCtNZmdROGpYZmsz YmZNK3gzR3pQOEF2Yk1mDQpyUjdHZlJYOUE5ckRxN2VwNkJSWG1IaUhXOVo4VCtOZE4wWHdQNG1o MDZ6L0FMTWZVWjcyRzFpdTFrQmtDSW8zY1o0Ym9SM3pXYjRUDQoxWHh6cVhoSFVaN2ZWRjFTN2ox aVcxaHVqYlJSYnJlUEM3Z2dHTWxnM1hPT09hSFNhanpOZ3FxY3VWSTlob3F2cDMybit6N1g3ZUVG DQozNVMrZHMrN3Z3TjJQYk9hc1ZrYUJSUlJRQVVVVVVBRkZGRkFCUlJSUUFVVVVVQUZGRkZBQlJS UlFBVVVVVUFGRkZlRWVOZkNYeEE4DQpVK1BQRVZ4NFc4VlNhYnB0cmNSV3d0MjFHNGhDdDltaGNs VlJTQUQ1bWZybXRLY0ZOMmJzWjFKdUN1bGM5M3JudmlIcTM5aGVCdGQxDQpJTnRlQzBrTVp6ajV5 dUUvOGVJcnlUdzE4TnZpalllSTlLdTlUOGFmYWJDM3U0cGJpSCsxYnAvTWpWd1dYYXlZT1FDTUhn MTZWOFdmDQpEdXErS3ZDRDZUb3IyS1N5M0VUeWk4WjFqYU5HMzdUdFVrNVpWOU8vTlg3T01acGMx MFR6eWxCdmxzemp2RWVpK0hyTDRQZUcvREhpDQpuWGY3RGhlR0tSMkF5MHJxQTBpZ0VmM21CL0t1 YTE3VzdQeFRwdmgvNGUvRGkzbHZMT040NUh2YjFXU0Zvb1NDZVNBVytiR1NBT3dHDQpjOGVnYUo0 WjhXNmo0M3N0YjhjdDRla3Q3QzBtaHRvZE44MGp6SkN1V1lTRCs2Q09ENmNWbytOUERlc1MrSWRN OFNlRTViRmRXc29YDQp0WkxlOURDS2VGaUR0M0x5cEJHUi9uT3Nha1l1emQzcS9LNWs2YmF1bFpi ZWRpdjRNMVc5dS9FMTdwV29lS05IMUtlMGlJdU5Nc2RPDQphTllEa0xqelM1SEI0MmtaK21LNEg0 S3kyMm8rSWZpVHBGcENrT25haThrMW1pakNtSXZMRVNCMHg5MGUyTVYxQTA3NG1RejM5MXA5DQpu NEMwMDNZektRSi9NM2M1ZG5WUnVibnFjOUI3NTRmNFNhMW9HaFhWMXErb2E3cGNGcG8ybG5TWVlZ N2hmTnZTSE0wc3FvU0dJTWhZDQpKd0N3UGJwVktQdXl0NWJmOEFUbDcwYitaRnJja253bitFc2Vp MnVXOFc2M0Y1dDNJcHkxdkZnSnlld1VFUnIyM0ZpUFN1eThkYUg0DQpidGZocDRhOExlS3RmL3NX Q0dPSnp0QUx6bUpNT0J3ZjRuejA2NHJMbjhEK0pQR0hoOS9FVExZUStJTlh2SWJvd2FnN2lPM3NZ eVdpDQp0L2xCUEpDTTNUUHNSWFhlSGZESGlpODhicHIvQUk1YlFKVnRyRjdTMmcwM3pTb1puREZ5 SkIxd0NPRCtGT1UwdGI2cHR2MUZHTDJ0DQpvN0plaHdHdTY1RDR6Ynd6NEYrSFZzMXpZNmUwVjI5 NWZxNlF2REJoUU9RR1pjNEJJSFhBSHQ2UjRJMVc2MURYZFMwNi93REUrazZ2DQpKYVJtTzRzTExU bWpXM2JkakhtRnlEMFliVHorVlNlTC9EZXRmOEpWWStLZkNVdGgvYWtObzFoUGJYMjRSVHdGOTRB WmVWWU56Ny9oDQp6Z0hTUGlZRTFFYWRaK0E5TlMvRGVhSTFuRW00Z2d1V1ZjTTNPY25QMDYxRGNa eHN0UFh2L1hZdEtVSlhldjhBa2NsOEhKclRTTkIrDQpKWGpLeWlTS3pFODRzbzE0VkVRUElxTDdI ekVINFY2eDhKdExPamZEZncvYU9DSlBzcXpTWjY3NVAzalo5OHNhOHkwcjRaK1ByVHdPDQpmQnoz UGhaTkVubEQzTTBUM0gybGxNZ2RzSGJ0emdZNmRQenIzbFZDS0ZVQlZBd0FCZ0FWT0ltbmV6dmQv bHNPaEZxMTFheS9QY1dpDQp2QS9FdncyK0tOLzRqMVc3MHp4cDltc0xpN2xsdDRmN1Z1azh1Tm5K VmRxcGdZQkF3T0JXYi93cXY0dS85RDMvQU9WaTgvOEFpS1NvDQpRYStORGRhZjhqUG82aXZuSC9o VmZ4ZC82SHYvQU1yRjUvOEFFVWY4S3IrTHYvUTkvd0RsWXZQL0FJaW43Q0g4NkY3YWY4alBvNml2 DQpuSC9oVmZ4ZC93Q2g3LzhBS3hlZi9FVWY4S3IrTHY4QTBQZi9BSldMei80aWoyRVA1MEh0cC95 TStqcUsrY2YrRlYvRjMvb2Uvd0R5DQpzWG4vQU1SUi93QUtyK0x2L1E5LytWaTgvd0RpS1BZUS9u UWUybi9JejZPb3I1eC80Vlg4WGY4QW9lLy9BQ3NYbi94RkgvQ3EvaTcvDQpBTkQzL3dDVmk4LytJ bzloRCtkQjdhZjhqUG82aXZuSC9oVmZ4ZC82SHY4QThyRjUvd0RFVWY4QUNxL2k3LzBQZi9sWXZQ OEE0aWoyDQpFUDUwSHRwL3lNK2pxSytjZitGVi9GMy9BS0h2L3dBckY1LzhSUi93cXY0dS93RFE5 LzhBbFl2UC9pS1BZUS9uUWUybi9JejZPb3I1DQp4LzRWWDhYZitoNy9BUEt4ZWY4QXhGSC9BQXF2 NHUvOUQzLzVXTHovQU9JbzloRCtkQjdhZjhqUG82aXZQZmd0WTY3cFdqNjNwbmluDQpWSk5VMUt6 MU14bWRyaVNjYld0NEpBcXMrRGdiK21CeVRYb1ZjODQ4c3JYdWJ3bHpLNFZ6bmhYL0FKRHZqSC9z S3gvK2tOclhSMXpuDQpoWC9rTytNZit3ckgvd0NrTnJSSFovMTFRUzNSUjhaZkV6d2o0TTFPTFQv RXVyaXl1NVlST2tadDVaTW9XS2c1UkNPcW5qcnhXR3Z4DQo0K0c3L2Q4UjUrbGpjLzhBeHV2R1Ay cWRKbjF2NHc2SFpXc01zOHNta3g0amlVc3ovdnB1QUJYbk1ta1hlbnd3Q1N4bXQ0NVVXU1BkDQpH VkRxU1FDUFVIQm94ZGJENGFFZEhLVFYzcWtsK0RQb01ueUtlWkp6bE5RajA2dC9LNjA4ejZzUHg1 K0d5bkI4U0FIME5qYy8vRzZtDQpIeHYrSHpSZWFOZGtNV003eHA5MWo4L0xyNW0wRFJyU0s5dDc3 V2JXSXRHMjZPRzZXSmQ2L3dCNEI1VUo3Z0hETGtkeU9QYnhheXgyDQo4Y2doZFlDUGtZTDh1UGIy NHI1N0g4UjBjTTFHblJsSjlmZVNTLzhBSlgraDFWK0duUm5hVlZOZE5QOEFnLzVtL2NmSFQ0WVhF RWtGDQp4NGhpbGhrVW84YjJGd3lzcEdDQ0RIeUNPMWRpdmdYd2tyQmw4TGFDQ0RrRWFmRHgvd0NP MThuL0FCbThEVzUwdWJ4QnBWc0lacmZEDQpYU1JyaFhRa0Rmam9DQ3kvWE5mYVZlN2hjYlF4bUZo aWNOZFh1bW4wYXQyOWR6NTdGNFNXR3F1blVzK3pPVnRmSG1pM2R0RmNXc1d1DQpUMjh5Q1NPV1BR cjVsZFNNaGxJaHdRUnlDS2wvNFRYUy93RG4xOFFmK0NDLy93RGpOZlBHcWZCZVhYZkR0ajR2bjF1 QzBzWDBXeG1rDQpqK3h2TThhUjJjU01mbE9UOXduZ1Z6emZDTFNGVFQzUGpXeDIzMWpKcWNKR21U SC9BRVpGM05LL1B5REEvaXhrOERtdm9JNWRnNWY4DQp2SDl6ZHZMWTg5MWFpNkgxUi93bXVsLzgr dmlEL3dBRUYvOEEvR2FQK0UxMHYvbjE4UWYrQ0MvL0FQak5mSnYvQUFySFJEUGFReCtNDQpGbWU1 aGhuWHlkRHVaQkdrMytxTW0zT3pka1lCNTVGYWJmQlN4WHhpbmhRK01yQTYrMGZtQzJHblNrQWJk M0w1Mmc3Um5CT2NZOWFwDQo1WmcxdlVsMytGN2ZjTDIxVHNmVkdrK0tkTTFUVWhwOXVOUWl1Mmhl ZFk3dlRyaTEzSXJLckZUTEdvT0M2WkE1K1lWcGFqcUZ0cDBLDQp5M2t2bHhzd1FIYVR6Z25IQTlq WGt2d204QnovQUE3OFI2YnBOemV3M3J6MjJwM1lraWpLQUF0cHlZd1NmN21meHIwYnhqYXJkMkZ1 DQpzc25rMjhjM216eW5wSEdzYmtuL0FENjE1ZFdqU2pWVVlTdkY5ZnZMbk9hcHVTV3BNZkV1a2da TjN4LzF6ZjhBd3FuYytPUER0cUNaDQo5UTJnZGYzRWgva3RjWWJyUW04TzZqcXNqNm9rVmlzVHl3 TWtmbTdKQXBSZ0EyTUVNT3BIUTFrNjFwZWlmOEkvL2JsMWQ2aWRObVVMDQpGQkRFaHVmTUJiekZa U2NEWUZKUFBHRDZWMHd3bEZ2M3VidC9XaDVkVEhZbEwzVkc5ci8xcjMwTzVmNG9lRDQvdjZ4ai90 Mm0vd0RpDQpLaVB4WThGRHJyWC9BSkt6L3dEeEZlWHllRS9EdDFmTmEyY1BpcTlsV0NHNGY3TkJB MjFaVURybkxEbkI1OTZyYXI0RzhOV2QzTEJjDQozK3MyRnhhbFdrdExxR05wN3RINFQ3T0VKREV0 eDE0NzR3YTNXQ3dkN1hsK0grUmpISDQ1cTdqSDhmOEFNK2hORDFheTEzUzROUjBxDQpmejdPYmQ1 Y214bHpoaXA0WUE5UWUxWkY5NDIwZXoxTzgwOWsxZWU1czNXT2Y3SG85NWRKRzdJc2dVdkZFeTUy dWh4bitJVlo4RDZODQpGb0hoWFQ5TnR4Y3JGRXJNRnVkdm1Mdll1UTIzaklMRWNWNTlxWGpDNjhL ZUpmRnh0TEMydTFrMU9TNW04KzU4amJIRHBsaXgybmF3DQpMSGR3RGdlOWVOVVVWTnFHMTlEM3Fi azRKejN0cWRuL0FNSjVwSC9QbjRrLzhKelVmL2pGSC9DZWFSL3o1K0pQL0NjMUgvNHhYQndmDQpH bVo0MW1sME9PQzNuTHhXalMzTEw1MG91REVBV0NGVUFHMW0zRUVBa2dIQXozQThTYXBIYnpKY2Fm WW0rZ3lraXczUmFNdms3UXJGDQpBU01iYzhjSEk3Wk9GV3JHa3J6WnZUcFRxdTBFU2Y4QUNlYVIv d0ErZmlUL0FNSnpVZjhBNHhVdGo0MjBlODFPejA5VTFlQzV2SGFPDQpEN1pvOTVhcEk2bzBoVVBM RXE1Mm81eG4rRTF3eWZGblViNXJFNlRvQ1NSenlMYlNHYVdRR09kWXZNblRDeHNjUjVWYzR4bk9j QVV6DQp3MTQxdWZITng0TDFHYlQ0YlNGTmRhTkdqbVo5N0hTN3QyR0dSU051NExua0Vna2NZSjBN ejFIWHRZc3RCMHg5UTFONVV0a2VPUDhBDQpkUXZNN1BJNnhvcW9nTE1TektBQUQxckYvd0NFODBq L0FKOC9Fbi9oT2FqL0FQR0tQaVgvQU1pNVovOEFZYTBuL3dCT052WER5MzBrDQpNc2NGdkJveEFX QlAzOERseTdvQ01rREhQUFA1MWNZOHhoV3JPazByWHVkeC93QUo1cEgvQUQ1K0pQOEF3bk5SL3dE akZIL0NlYVIvDQp6NStKUC9DYzFILzR4WEorSEx0ZFF2MGh1YmZSMmplSXlxSUxkd3hBYkdmbUdN WkJyYWZYUEJjTHRGUEhDSlVPMXg5bWJoaHdlMU53DQpTTTQ0bHk2SmZQOEE0QnBmOEo1cEgvUG40 ay84SnpVZi9qRmJXZzZ4WmE5cGlhaHBqeXZiTzhrZjcyRjRYVjQzYU4xWkhBWlNHVmdRDQpRT2xj WmQ2dDRUdmJPNWcweU9FM2pST1kvd0RSMlhrS1QxSTlBYTJmaHAveUxsNS8yR3RXL3dEVGpjVk1v MlJyVHE4N2EwMDdPNVA0DQpWLzVEdmpIL0FMQ3NmL3BEYTEwZGM1NFYvd0NRNzR4LzdDc2YvcERh MTBkRTkvdS9JMGh0OTRWem5oWC9BSkR2akgvc0t4LytrTnJYDQpSMXpuaFgva08rTWYrd3JIL3dD a05yUkhaLzExUVMzUjRUOGV0ZkhocjQ4YURxSWg4NlNQUmg1YStac3c1a25BT2NIcG5QNFZtTDhX DQoxTENRNlROQk4rN1hNRjJOb1JHVmxBVmtJR0NDT25SajN3UjJIeCsrRG5pTDRoK01MSFZ0RHZk S3Q0TGV4UzJJdTVaRWZlSkpHeUFzDQpiREdISGYxcmlyZjlueng1R2dXWFVQRFVwSDhYMm1jSC93 QkUxV0xwVGxDRThQTlh0cW4zNzYrUjlCbE9KeTdsZFBNSXU2MmF2dHZaDQpwZWV1eHM2SDQrL3RH RW0xc0pZaEJKRXdnM1MzT0F1Q0F6ZVV4MjVVc09RMjRzU1RtdWwwNjl1TGVHMmU1dG9wNytLMlcz YTQ4OWh1DQoycmpPM2IwUFVqSjU1R01tdUZnK0FmeEV0ZFF0N3UwMVR3eEc4RGgxQmxtY0UrNE1Q K2V0ZDZuZ2o0aWkzdzZlRWpQajc0dkxrTG4vDQpBSGZKeit0ZlBaaGc4MnZDV0huR1hXM3U2UDUy ODlyblZWeFdVdVVvMGxKTHU3Ni9yOTV5L3dBWS9FclIvRHZXb0x0RHZ1d0lZc1RzDQpSZ3lseDho R01qZGpkNkt2U3ZwaXZrN3hUOEFmaVA0bXZ4ZGFwclhoeGlveEhHazg0U01laWp5djE2MTlZMTdX R3cxVEQ0YUVhOVJUDQpxTnR1Mnkyc3YrRDNQbjhWVnAxS2pkR05vbkMrQ3JyVDVmaFQ0ZjArNnZM ZU41ZER0b21WNUFDTjF1bzUvQTE1Um8vdzgxUzErSE9vDQpXRjFxK2x5K0k5VFdEVEhtTjJDbG5w MGJES0llK1FDU08rNGR4WGRhWDRPOFNXZWs2ZFp6YWJwRXNscGFRV3BrVFdwRUQrWEdxYnRwDQpz empPM09NbnJWci9BSVJieEIvMENkTC9BUEI3Si84QUlWWnp4bWMwYTFSWWVuVGNISzZia3J0SjZk ZXZVY2FPQ2xDTG5PU2R0ZERsDQpyclI5WWorSUZwcTJoUWFObzhOaTNseVhWdnJHVjFLMGpYYkRC SkNWd0d3Rkc0L2Q3WndLcWVGUENHdWFiNHo4TytJTlcxblFibVlYDQpsM2Zha1lwTnNpTlBFRTJo aVNKRlVCUUFBdU9ldGRwL3dpM2lEL29FNlgvNFBaUC9BSkNvL3dDRVc4UWY5QW5TL3dEd2V5Zi9B Q0ZVDQovd0JvNTl5OHFvMHRyZkYwMTZ0K1pYMWZBWHZ6eSs0NkdhNmd1L2lQb1QyczBjeURTZFJV c2paQVBuV1BINjAzNG9YRnRGNGFTSFVODQpSWFQ3SzZ1WTRaNVNqc3hqNVpsWGFEaGlGN2pHTWc5 YXFlRmZEMnNXZmlTMnZkUXRkUHRyVzN0TG1FQ0MvZTVkM21lM1BlQ01BQVFIDQoxT1dxYjRyZUY3 N3hiNGV0N0RUSmJhS2FPNldjdGNNeXJ0Q091T0FlY3NLOURCdVY2WDFpMFpKYTJkMG5kOWRUemNj djNkUlVGZnRmDQpxZVZYZC80ZjFHeHUwZzhSM2xwOXJpYTFuVFV4TGNzVVYxYU5sS0xnZER3ZW1T TythMDlRMVB3aE5xdXUzQytKRUZwZDI5d0xTMmEwDQpuMjI5eFBHRWtrKzUzeC80ODFabi9DbFBF LzhBei9hUC93Qi9wZjhBNDNURytDSGlZLzhBTDlvLy9mNlgvd0NOMTc3bGhQOEFuNytYDQorWGtm TVJoalZ2UlQrLzhBejg3K3BEZVhQaGc2bDlwR3RhSGVxYlMzdHlsOXA5MjJ4b29sUWxkZ0hYR2Vh dDY3NHAwTFVMNjN1WjlkDQpQMnlBcW1uUFkyOHFRYWFGQU84cXlndnVZQUVZT0Y2WndCVlkvQXp4 TWY4QWwrMGIvdjhBUy84QXh1cldrZkIzeGpwR293MytuYXBvDQowTjNDU1VmekhiR1FRZURFUjBK cHVlRjM5cmRyYmIvSTFqVHhlcTlsWk42Ny93Q1o3ZjRVMVdQVy9EMWxxRU54RmNyTWh6TEVqSXJN DQpwS3RnTUFRTWc5UlhONkZvdWw2djRrOGFOcTJtMlY4MXZyY2J3bTVnU1h5Mi9zNnk1WGNEZzhE cDZWcmZEblFybncxNE4wL1NiK1NHDQpTNXQvTTN0Q1NVTzZSbUdDUUQwWWRxem9yTHhWcEhpRHhG Y2FWcHVpWDFscWQ2bDVHOXpxa3R2SW1MV0NFcVZXM2tIV0VuTzdvUndLDQorY3JLS3FTVU5ydXg5 TFJjblRpNTcyVi9VczY1NEowNjZEUzZSWmFQcDk5S1dTZWR0TWltODJKOXhkR0J4MUxiaWU1SE9j bW9MUHdkDQpkNmU5dkhwZXBXVm5aVzY0aWhpMHVJYkQ1aGI1Y1l3TUhCNzV5YzVOVHZmZU9pcDJl SC9ESWJzVHJzNUg1Zlk2eE5SaStLTjRDcVErDQpGN1ZEMmgxT2NIOHpiRS9sWE5WazB0SWMzM2Zx MGROS0tiMW55L2YraVpwcm9XajZacEFpOFlQcEdxRVRHNVJwOU9pVEVqQWIzVk9jDQpzejdtSkhQ elk3Vnk3NnZwVno0NzhGMldoYVhiMlZzTlNkbWVPSll6SnMwNjZSQmhSMEM4RFBRQURpcUUzZ2p4 NVBJWkpyZnc3SkkzDQpWbjFlY2svaWJhcm5obndKNHF0L0dPZzZscXNXaVEyV24zRWs4bjJhK2xt a2JkYnpSQUJXZ1FkWlFjN3VnTmVjcXVQcVZvM3A4c0w2DQo2cHY4L3dBajBIU3dOT2pLMVRtbmJU UnBmbCtaMnZ4TC93Q1Jjcy8rdzFwUC9weHQ2eFRybmhXWmJhTFFZYnpXYnFhVHk0YmF6dUhWDQpt QVF0dkJrZEY4dmFPR3pnL3dBT2E2VHgxcGQ5cS9oOFcrbExiTmV4WHRuZVJwY3l0Rkcva1hVVXhV c3FzVnlJeU03VHlSeFhubWtmDQpEM1Y5R3RsaTBqdzdvOWpKRzZ2RlBCNGtuU1NJQkNnVUVXV0NO ckVIY0NUd1NTUUNQWFRhMlBJbENNL2lWem9vdGQ4TEpORmJ6cmVXDQpXb3ZKYlJMWTNGMDBkem1j b0YvZCtaa2hTL3pZNmJXeG5GWmVqK0x2RE90YVJCcUduYVZxZHcxMDBDVzlzbC9DODBqeXF6S3BD M0I4DQpzaFZZbnpDdU5wNmtZcTdaNkY0bHM3SDdKRDRjMEl4ZWJiVEV2NGt1SFl0QXlNaExHekpK ekdwT2V2UHJWQzI4SmVLTGZRN1RTazB6DQpUamEySWgreEUrSlp0OW9ZaHRReHNMSCs3OHB6bklK QjYwK2VYY2oyTlA4QWxYM0Z0dkVQaHROWXR0RW4waldvdGJ1bzQzajA1NUQ1DQpySzd6SXgvMXUz YWdnZG1iTzNheVlMRmdLNkw0YWY4QUl1WG4vWWExYi8wNDNGY2l2ZzNYUklKbThPNk05NFBKWmJ0 L0V0dzB5dkZMDQpMS3Joelo1QkxUeUE5aXAyNHh4WGNlQmRMdnRJOFBtMzFWYlpiMlc5dkx5Ukxh VnBZMDgrNmxtQ2htVlMyQklCbmFPUWVLVGJlNWNZDQpSaDhLc004Sy93RElkOFkvOWhXUC93Qkli V3Vqcm5QQ3YvSWQ4WS85aFdQL0FOSWJXdWpwejMrNzhnaHQ5NFZ4OXRQcW1qYTk0alpmDQpEbXAz OXZlM3FYTU05ckxhaFNvdFlJeUNKSmtZRU5HM2IwcnNLS0l5c05xNXpuL0NRNm4vQU5DZHIzL2Y2 eC8rU2FQK0VoMVAvb1R0DQplLzcvQUZqL0FQSk5kSFJSekx0K2YrWXVWOXpuUCtFaDFQOEE2RTdY disvMWovOEFKTkgvQUFrT3AvOEFRbmE5L3dCL3JILzVKcm82DQpLT1pkdnovekRsZmM1ei9oSWRU L0FPaE8xNy92OVkvL0FDVFIvd0FKRHFmL0FFSjJ2ZjhBZjZ4LytTYTZPaWptWGI4Lzh3NVgzT2Mv DQo0U0hVL3dEb1R0ZS83L1dQL3dBazBmOEFDUTZuL3dCQ2RyMy9BSCtzZi9rbXVqb281bDIvUC9N T1Y5em5QK0VoMVA4QTZFN1h2Ky8xDQpqLzhBSk5IL0FBa09wLzhBUW5hOS93Qi9ySC81SnJvNktP WmR2ei96RGxmYzV6L2hJZFQvQU9oTzE3L3Y5WS8vQUNUUi93QUpEcWYvDQpBRUoydmY4QWY2eC8r U2E2T2lqbVhiOC84dzVYM09jLzRTSFUvd0RvVHRlLzcvV1Avd0FrMGY4QUNRNm4vd0JDZHIzL0FI K3NmL2ttDQp1am9vNWwyL1AvTU9WOXpuUCtFaDFQOEE2RTdYdisvMWovOEFKTkgvQUFrT3AvOEFR bmE5L3dCL3JILzVKcm82S09aZHZ6L3pEbGZjDQo1ei9oSWRUL0FPaE8xNy92OVkvL0FDVFIvd0FK RHFmL0FFSjJ2ZjhBZjZ4LytTYTZPaWptWGI4Lzh3NVgzT2MvNFNIVS93RG9UdGUvDQo3L1dQL3dB azBmOEFDUTZuL3dCQ2RyMy9BSCtzZi9rbXVqb281bDIvUC9NT1Y5em5QK0VoMVA4QTZFN1h2Ky8x ai84QUpOSC9BQWtPDQpwLzhBUW5hOS93Qi9ySC81SnJvNktPWmR2ei96RGxmYzV6L2hJZFQvQU9o TzE3L3Y5WS8vQUNUUi93QUpEcWYvQUVKMnZmOEFmNngvDQorU2E2T2lqbVhiOC84dzVYM09jLzRT SFUvd0RvVHRlLzcvV1Avd0FrMGY4QUNRNm4vd0JDZHIzL0FIK3NmL2ttdWpvbzVsMi9QL01PDQpW OXpuUCtFaDFQOEE2RTdYdisvMWovOEFKTkgvQUFrT3AvOEFRbmE5L3dCL3JILzVKcm82S09aZHZ6 L3pEbGZjNXp3ZkZlL2FmRU43DQpmNmZjYWY4QWJ0UVdlR0c0ZUpuMkMyZ2p5ZkxkbEh6UnR4bXVq b29wU2QzY2FWbFkvOWs9DQoEggloDQotLS0tLS09X05leHRQYXJ0XzAwMF8wNTE5XzAxQzdFN0U1 LjQ5OUVGNjMwDQpDb250ZW50LVR5cGU6IGltYWdlL2pwZWc7DQoJbmFtZT0iaW1hZ2UwMDIuanBn Ig0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmFzZTY0DQpDb250ZW50LUlEOiA8aW1hZ2Uw MDIuanBnQDAxQzdFN0U1LjQ5ODI0NjcwPg0KDQovOWovNEFBUVNrWkpSZ0FCQVFFQVlBQmdBQUQv MndCREFBWUVCUVlGQkFZR0JRWUhCd1lJQ2hBS0Nna0pDaFFPRHd3UUZ4UVlHQmNVDQpGaFlhSFNV Zkdoc2pIQllXSUN3Z0l5WW5LU29wR1I4dE1DMG9NQ1VvS1NqL3dBQUxDQUFEQWh3QkFSRUEvOFFB SHdBQUFRVUJBUUVCDQpBUUVBQUFBQUFBQUFBQUVDQXdRRkJnY0lDUW9MLzhRQXRSQUFBZ0VEQXdJ RUF3VUZCQVFBQUFGOUFRSURBQVFSQlJJaE1VRUdFMUZoDQpCeUp4RkRLQmthRUlJMEt4d1JWUzBm QWtNMkp5Z2drS0ZoY1lHUm9sSmljb0tTbzBOVFkzT0RrNlEwUkZSa2RJU1VwVFZGVldWMWhaDQpX bU5rWldabmFHbHFjM1IxZG5kNGVYcURoSVdHaDRpSmlwS1RsSldXbDVpWm1xS2pwS1dtcDZpcHFy S3p0TFcydDdpNXVzTER4TVhHDQp4OGpKeXRMVDFOWFcxOWpaMnVIaTQrVGw1dWZvNmVyeDh2UDA5 ZmIzK1BuNi85b0FDQUVCQUFBL0FQb1c5OEdhWmUzazF6TmRhK3NrDQpyRjJFT3ZYMFNBbis2aVRC VkhzQUJVUC9BQWdla2Y4QVA1NGsvd0RDajFIL0FPUDBmOElIcEgvUDU0ay84S1BVZi9qOUgvQ0I2 Ui96DQorZUpQL0NqMUgvNC9SL3dnZWtmOC9uaVQvd0FLUFVmL0FJL1Ivd0FJSHBIL0FEK2VKUDhB d285Ui93RGo5SC9DQjZSL3orZUpQL0NqDQoxSC80L1Ivd2dla2Y4L25pVC93bzlSLytQMGY4SUhw SC9QNTRrLzhBQ2oxSC93Q1AwZjhBQ0I2Ui93QS9uaVQvQU1LUFVmOEE0L1IvDQp3Z2VrZjgvbmlU L3dvOVIvK1AwZjhJSHBIL1A1NGsvOEtQVWYvajlIL0NCNlIveitlSlAvQUFvOVIvOEFqOUgvQUFn ZWtmOEFQNTRrDQovd0RDajFIL0FPUDBmOElIcEgvUDU0ay84S1BVZi9qOUgvQ0I2Ui96K2VKUC9D ajFILzQvUi93Z2VrZjgvbmlUL3dBS1BVZi9BSS9SDQovd0FJSHBIL0FEK2VKUDhBd285Ui93RGo5 SC9DQjZSL3orZUpQL0NqMUgvNC9SL3dnZWtmOC9uaVQvd285Ui8rUDBmOElIcEgvUDU0DQprLzhB Q2oxSC93Q1AwZjhBQ0I2Ui93QS9uaVQvQU1LUFVmOEE0L1Ivd2dla2Y4L25pVC93bzlSLytQMGY4 SUhwSC9QNTRrLzhLUFVmDQovajlIL0NCNlIveitlSlAvQUFvOVIvOEFqOUgvQUFnZWtmOEFQNTRr L3dEQ2oxSC9BT1AwZjhJSHBIL1A1NGsvOEtQVWYvajlIL0NCDQo2Ui96K2VKUC9DajFILzQvUi93 Z2VrZjgvbmlUL3dBS1BVZi9BSS9SL3dBSUhwSC9BRCtlSlA4QXdvOVIvd0RqOUgvQ0I2Ui96K2VK DQpQL0NqMUgvNC9SL3dnZWtmOC9uaVQvd285Ui8rUDBmOElIcEgvUDU0ay84QUNqMUgvd0NQMGY4 QUNCNlIvd0EvbmlUL0FNS1BVZjhBDQo0L1Ivd2dla2Y4L25pVC93bzlSLytQMGY4SUhwSC9QNTRr LzhLUFVmL2o5SC9DQjZSL3orZUpQL0FBbzlSLzhBajlIL0FBZ2VrZjhBDQpQNTRrL3dEQ2oxSC9B T1AwZjhJSHBIL1A1NGsvOEtQVWYvajlIL0NCNlIveitlSlAvQ2oxSC80L1Ivd2dla2Y4L25pVC93 QUtQVWYvDQpBSS9SL3dBSUhwSC9BRCtlSlA4QXdvOVIvd0RqOUgvQ0I2Ui96K2VKUC9DajFILzQv Ui93Z2VrZjgvbmlUL3dvOVIvK1AwZjhJSHBIDQovUDU0ay84QUNqMUgvd0NQMGY4QUNCNlIvd0Ev bmlUL0FNS1BVZjhBNC9SL3dnZWtmOC9uaVQvd285Ui8rUDBmOElIcEgvUDU0ay84DQpLUFVmL2o5 SC9DQjZSL3orZUpQL0FBbzlSLzhBajlIL0FBZ2VrZjhBUDU0ay93RENqMUgvQU9QMGY4SUhwSC9Q NTRrLzhLUFVmL2o5DQpIL0NCNlIveitlSlAvQ2oxSC80L1Ivd2dla2Y4L25pVC93QUtQVWYvQUkv Ui93QUlIcEgvQUQrZUpQOEF3bzlSL3dEajlIL0NCNlIvDQp6K2VKUC9DajFILzQvUi93Z2VrZjgv bmlUL3dvOVIvK1AwZjhJSHBIL1A1NGsvOEFDajFIL3dDUDBmOEFDQjZSL3dBL25pVC9BTUtQDQpV ZjhBNC9SL3dnZWtmOC9uaVQvd285Ui8rUDBmOElIcEgvUDU0ay84S1BVZi9qOUgvQ0I2Ui96K2VK UC9BQW85Ui84QWo5SC9BQWdlDQprZjhBUDU0ay93RENqMUgvQU9QMGY4SUhwSC9QNTRrLzhLUFVm L2o5SC9DQjZSL3orZUpQL0NqMUgvNC9SL3dnZWtmOC9uaVQvd0FLDQpQVWYvQUkvUi93QUlIcEgv QUQrZUpQOEF3bzlSL3dEajlIL0NCNlIveitlSlAvQ2oxSC80L1c1bzJsVytqMlp0clNTOWtqTEY4 M2Q1DQpOZFBrL3dDM0t6TmpqcG5GZi8vWg0KDQotLS0tLS09X05leHRQYXJ0XzAwMF8wNTE5XzAx QzdFN0U1LjQ5OUVGNjMwDQpDb250ZW50LVR5cGU6IGltYWdlL2pwZWc7DQoJbmFtZT0iaW1hZ2Uw MDMuanBnIg0KQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogYmFzZTY0DQpDb250ZW50LUlEOiA8 aW1hZ2UwMDMuanBnQDAxQzdFN0U1LjQ5ODI0NjcwPg0KDQoEgkrkLzlqLzRBQVFTa1pKUmdBQkFR RUFZQUJnQUFELzJ3QkRBQVlFQlFZRkJBWUdCUVlIQndZSUNoQUtDZ2tKQ2hRT0R3d1FGeFFZR0Jj VQ0KRmhZYUhTVWZHaHNqSEJZV0lDd2dJeVluS1NvcEdSOHRNQzBvTUNVb0tTai8yd0JEQVFjSEJ3 b0lDaE1LQ2hNb0doWWFLQ2dvS0Nnbw0KS0Nnb0tDZ29LQ2dvS0Nnb0tDZ29LQ2dvS0Nnb0tDZ29L Q2dvS0Nnb0tDZ29LQ2dvS0Nnb0tDZ29LQ2ovd0FBUkNBR1FBWkFEQVNJQQ0KQWhFQkF4RUIvOFFB SHdBQUFRVUJBUUVCQVFFQUFBQUFBQUFBQUFFQ0F3UUZCZ2NJQ1FvTC84UUF0UkFBQWdFREF3SUVB d1VGQkFRQQ0KQUFGOUFRSURBQVFSQlJJaE1VRUdFMUZoQnlKeEZES0JrYUVJSTBLeHdSVlMwZkFr TTJKeWdna0tGaGNZR1JvbEppY29LU28wTlRZMw0KT0RrNlEwUkZSa2RJU1VwVFZGVldWMWhaV21O a1pXWm5hR2xxYzNSMWRuZDRlWHFEaElXR2g0aUppcEtUbEpXV2w1aVptcUtqcEtXbQ0KcDZpcHFy S3p0TFcydDdpNXVzTER4TVhHeDhqSnl0TFQxTlhXMTlqWjJ1SGk0K1RsNXVmbzZlcng4dlAwOWZi MytQbjYvOFFBSHdFQQ0KQXdFQkFRRUJBUUVCQVFBQUFBQUFBQUVDQXdRRkJnY0lDUW9MLzhRQXRS RUFBZ0VDQkFRREJBY0ZCQVFBQVFKM0FBRUNBeEVFQlNFeA0KQmhKQlVRZGhjUk1pTW9FSUZFS1Jv YkhCQ1NNelV2QVZZbkxSQ2hZa05PRWw4UmNZR1JvbUp5Z3BLalUyTnpnNU9rTkVSVVpIU0VsSw0K VTFSVlZsZFlXVnBqWkdWbVoyaHBhbk4wZFhaM2VIbDZnb09FaFlhSGlJbUtrcE9VbFphWG1KbWFv cU9rcGFhbnFLbXFzck8wdGJhMw0KdUxtNndzUEV4Y2JIeU1uSzB0UFUxZGJYMk5uYTR1UGs1ZWJu Nk9ucTh2UDA5ZmIzK1BuNi85b0FEQU1CQUFJUkF4RUFQd0Q2cG9vbw0Kb0FLS0tLQUNpaWlnQW9v b29BS0tLS0FDaWlpZ0Fvb29vQUtLS0tBQ2lpaWdBb29vb0FLS0tLQUNpaWlnQW9vb29BS0tLS0FD aWlpZw0KQW9vb29BS0tLS0FDaWlpZ0Fvb29vQUtLS0tBQ2lpaWdBb29vb0FLS0tLQUNpaWlnQW9v b29BS0tLS0FDaWlpZ0Fvb29vQUtLS0tBQw0KaWlpZ0Fvb29vQUtLS0tBQ2lpaWdBb29vb0FLS0tL QUNpaWlnQW9vb29BS0tLS0FDaWlpZ0Fvb29vQUtLS0tBQ2lpaWdBb29vb0FLSw0KS0tBQ2lpaWdB b29vb0FLS0tLQUNpaWlnQW9vb29BS0tLS0FDaWlpZ0Fvb29vQUtLS0tBQ2lpaWdBb29vb0FLS0tL QUNpaWlnQW9vbw0Kb0FLS0tLQUNpaWlnQW9vb29BS0tLS0FDaWlpZ0Fvb29vQUtLS0tBQ2lpaWdB b29vb0FLS0tLQUNpaWlnQW9vb29BS0tLS0FDaWlpZw0KQW9vb29BS0tLS0FDaWlpZ0Fvb29vQUtL S0tBQ2lpaWdBb29vb0FLS0tLQUNpaWlnQW9vb29BS0tLS0FDaWlpZ0Fvb29vQUtLS0tBQw0KaWlp Z0Fvb29vQUtLS0tBQ2lpaWdBb29vb0FLS0tLQUNpaWlnQW9vb29BS0tLS0FDaWlpZ0Fvb29vQUtL S0tBQ2lpaWdBb29vb0FLSw0KS0tBQ2lpaWdBb29vb0FLS0tLQUNpaWlnQW9vb29BS0tLS0FDaWlp Z0Fvb29vQUtLS0tBQ2lpaWdBb29vb0FLS0tLQUNpaWlnQW9vbw0Kb0FLS0tLQUNpaWlnQW9vb29B S0tLS0FDaWlpZ0Fvb29vQUtLS0tBQ2lpaWdBb29vb0FLS0tLQUNpaWlnQW9vb29BS0tLS0FDaWlp Zw0KQW9vb29BS0tLS0FDaWlpZ0Fvb29vQUtLS0tBQ2lpaWdBb29vb0FLS0tLQUNpaWlnQW9vb29B S0tLS0FDaWlpZ0Fvb29vQUtLS0tBQw0KaWlpZ0Fvb29vQUtLS0tBQ2lpaWdBb29vb0FLS0tLQUNp aWlnQW9vb29BS0tLS0FDaWlpZ0Fvb29vQUtLS0tBQ2lpaWdBb29vb0FLSw0KS0tBQ2lpaWdBb29v b0FLS0tLQUNpaWlnQW9vb29BS0tLS0FDaWlpZ0Fvb29vQUtLS0tBQ2lpaWdBb29vb0FLS0tLQUNp aWlnQW9yeg0KL3dDTWZpZSs4TjZKYURTNUZpdWJ1VXgrYVFDVVVESklCNHpYakMrUFBGU2Y4eHk4 L0hhZjVpZ0Q2bm9yNWlpK0l2aXRQK1l5eFA4QQ0KdG9oL3BWaGZpWDR1UnY4QWtKUm42d0lmNlVB ZlN0RmZQT25mRjN4RFpYQ1NhbjludTdiT0dSWWdoL0FpdmZyRzVqdkxLM3VZcytYUA0KR3NpNTY0 SXlLQUxGRkZGQUJSUlJRQVVVVVVBRkZGRkFCUlJSUUFVVVVVQUZGRkZBQlJSUlFBVVVVVUFGRkZG QUJSUlJRQVVVVVVBRg0KRkZGQUJSUlJRQVVVVVVBRkZGRkFCUlJSUUFVVVVVQUZGRkZBQlJSUlFB VVVVVUFGRkZGQUhqLzdRc2p4UWFDWW14SXNrcnFmY0tvLw0KclhuSGlQVWRNbFd6dDlDZTRjR052 dFptNStiQzR4bFJqblBTdTkvYUVrLzA3UVkrbzJTdGo4VkZjWnJPZ1E2ZnJXazZjc3R2SkplYw0K N28zZmFCdUM0SlllcDZpbUJyNlA0aTBxeThKd1dFMDlpTGxZSmR5eVFBdnZKWXJ5VlBxSzVYd25h MkV1cFFEWGJwclcyRVpjdjh2TA0KZ0RBTzRFVnR2NGZSUEZUNkRFWVhsYUZaREo1ckJPak9DVHN6 MEI0eFRMUHcrdXBlSUwzU0xSTjg5bmxKUzl5RlhjTm9PR0s4L2VIYQ0KZ0RqdFRNTHl6L1pXWjdZ WFJqaWM0eTZCeUEzR09vRmZYZWhwczBYVDA5TGVNZmtvcjVKMU5Zdk5XT0hkc1dmWnl3UEtrZzhq M0ZmWA0KV25MczA2MVgwaVVmb0tUQXRVVVVVQUZGRkZBQlJSUlFBVVVVVUFGRkZGQUJSUlJRQVVV VVVBRkZGRkFCUlJSUUFVVVVVQUZGRkZBQg0KUldOcS9palF0SHlOVTFleHRXSDhNazZodnl6bXMy TDRpZUQ1ZnVlSTlNUDFuQS9uUUIxZEZjOG5qWHd3L3dCenhEcEovd0MzcFA4QQ0KR3JFWGlmUVpQ OVZyZWx2L0FMdDFIL2pRQnMwVm5Mck9sdjhBYzFLeVAwblQvR3AwdnJSL3VYVnUzMGtCL3JRQmFv cHF1cmZkWUg2VQ0KNmdBb29vb0FLS0tLQUNpaWlnQW9vb29BS0tLS0FDaWlpZ0Fvb29vQThML2FH bTJhMW8veWI5dHRJKzMrOTh3NC9TdUF2bzRyV1BLcA0KcE1qenZnTlpUeU04WUFKNk4vRFhjZkgw Ny9GK2x4bmNRTFFaQzllWkc2VnhtdVR3TkphcFkyR29XNFhLVE5kUEdSZ0RqQlVBbnAzcA0KZ1du MEtleDhPTnJMc3FJVTh3eUNkOXhISEgzZnZBSHB1cDJnYWE5MUJjVHczUzI3cVRsdnQza3lIT01u SkJKeWNWSHFGanFqZUhQOQ0KTGU2ajA0eHI4cGlUYnRKWCtMY1NNL1NvcldIU1piVzRmVUh1Qk9N N0ZTd0U2NHgvZS9ob0VZeStWTDlnRVA4QXEybUJCNjU2ODE5Zw0KeExzaVJmUUFmbFh5Rlo1bXZO SkRKNVphWmZrOU1qcFgyQlNZd29vb29BS0tLS0FDaWlpZ0Fvb29vQUtLS0tBQ2lpaWdBb3BLd05a OA0KWmVIZEdCL3RQV3RQdDJIOEJuQmIvdmtaUDZVQWRCUlhsR3IvQUJ6OExXVzhXS1gyb3VPbmxS YkZQL0FuSS9sWEZheDhmOVVseU5JMA0KZXp0MVBScm1WcEcvSWJSUUI5R1ZYdTd1M3M0Zk11N2lH QkIvRks0VWZtYStSdFcrS1BqTFZQbG0xdWEzUThiTFZGaEg1Z2J2MXJrYg0KdTRudlpmTXZiaWE1 a1A4QUZPNWMvbVNhQVByZlZ2aXA0TjB6Y3N1dFEzRWcvZ3RWYVkvbW9JL1d1SjFiNC82ZEZ2R2th TmVYSi9oZQ0KNWRZbC9JYmpYenlvcDFBSHFHcS9IRHhaZTdoWkpZNmNoNmVYRjVyZjk5TVNQL0hh NG5WZkZ2aUxXUDhBa0o2NXFFeUhxbm5sVi83NQ0KWEEvU3NXbTBBR3hkMmU1UEpvWURkODNGT3B0 QUF5Ui8zVm84dVA4QXVMVHVhYlFBM3lZLzdpKzlPV05mNFZVVTZtMEFQeXkvY2RoOQ0KR0lxVkx1 OFg3bDVkSjJHeWRoL0kxRFRhQUxxNnRxaWZjMWJVRXg2WFVuK05XbDhUZUlJZnVhOXF5QWY5UGtu djcrMVpHUGx4UTJXMw0KRnVwNm1nRG9FOFkrS1ltd3ZpUFZoai9wNlkrbnY3MUxIOFEvRnNYL0FE TTJvZE84b2IrWU5jMWpjckQxR0Q5S2dhM1hkbjVxQU92Lw0KQU9Gb2VNRSs3NGx2RC93RkQvTmFu aStML2pTTHBya3ovd0MvQkVmL0FHV3VJYTFIOTVxUHM0L3ZVQWVncjhiUEd5Lzh4U00vNzFuRg0K L1FWTW54eThaRC9sOHMzK3RtdjlDSzgyK3kvN2ROK3puKzh0QUhxVWZ4NjhYcjk1dExmNjJyRCtU MWJqL2FBOFRMOSsxMGwvKzJVZw0KL2s5ZVFmWjI5VnBmczUvaVpRS0FQWjAvYUcxNGZmMHZTVC8z OEg5YXNSZnREYXNldWhhZXgvMmJoeC9NR3ZFZnMvOEFlZjhBOGRvKw0KeXI4M3p0eDBvQTkyWDlv YlVQNC9EbHNmcGRzUC9aS3VSZnRFRC9sdDRhYi9BSUJlRCtxVjRPdTNjdmJqR2Y4QUgvR2srOHE3 dWc0Lw0KclFCNmQ0cjhYSHh6cnRycU5ycDBsdXdSYmRMZDJFcGRneEk2QWRkMk1WQjRuZlUyMUdL MzFXdzAvVHBiZE10SGF4SXBrRERnbGxKQg0Kcm1mRDhnaFdLVDVzSysvaHNIZzltN1YxZWphYlA0 bzF4bzRaL0trYU15U3ozVEZ3aXJ3T2dIcndCVEFpMURXTDdVTkZYU3BmTEZzTg0Kdk80NTRJUHA3 VlpzYnNKcGw3QW1ncmZ5YkRJOXp2a0JoVThBdHQ0Mmozcm9ibndBeVJMOWwxdTNsbDdxOEJVWitv WWtmbFhPYVJyRQ0KdGpZMzlvbDFjVzMybk1VdmxvcmNnTWh4azllU0tCR1hZekxhNm5wYzk2K1Vn Y1NTc3E1NEdDeEFyM2FMNDArQjVXQS90U1pNOTN0Wg0KUi83TFh6NXFHRWp3dlFRUCtnQXJqVWpu dUcyVzhUT1QzN1VtTSt3RDhYUEF1M0xlSXJWUjZ1a2kvd0ExcnNkTnY3WFZMR0c5MDY0aQ0KdXJP WkE4VTBUaGxkVDNCRmZFVm40VW1tK2UrbHdQN3RmVFA3UDFvbGg0Smx0WU4za1IzYjdGUGJJQk9Q cVRtZ0QwK2lpaWdBb29vbw0KQUtLS0tBR3NRcWtzY0Fja211RDFmNHQrRGRNTG8ycnJkU0tTQ3Rw RzB2SS8yZ052NjFmK0xrOGx2OE5mRVVrREZaUHNqTGtlaHdEKw0KaHI0NHdGVlFPQUtBUG9YV1Bq N2FMdVRSOUZubVBaN3FaWXgrUXlhNHJWdmpQNHcxRGNMV2V6MDZNOVBJZ0RNUHhZdC9Ldk1hS0FO dg0KVi9FR3U2dzMvRXoxdSt1Z2Y0WG5ZTC8zeU1EOUt4MXQ5djNmTEg2VXhjMDlYTkFEdnM4bnJI LzM4Rk8reXkvM1ZQOEF3SWY0MEs5Sw0KdEFDZlpKLzRVei93SVV2Mkc2LzU0TWZ5cVJhWEZBRFBz RjV0ejlsbXg2N0RUZnNWeXYzcmVZZjhBUDhBaFU5c1czU2pkMEl4K1ZUcQ0KN2YzcUFLSDJXNC81 OTV2KytHL3dwclF5cjk1SkI5Vk5heVR6THdyc0I3TVIvV3BsdTdoZitYaVlmOXRXL3dBYUFNSEIr bEpYUXRlMw0KTzNMWEV4K3NyR3E3WDB5L3hzZnJ6L09nREcvNEZSV3Uyb3lmeEtwK3FLZjZVZmJS L0ZCQ2ZyRW4rRkFHUmlpdFg3VkQvRmEyL3dEMw0KNlgrbEo5b3Qvd0RuMWgvNzRQOEFRMEFaZUtL dnZKYm4vbGxHUG9yZi9GVTNmYWZ4UkwvNDkvalFCU3hSVjNOazM4SC9BSSszK0JwaQ0KeVdEcXBU ZGc5RHZQL3dBVFFCVm9xMy94TC80WlpBZjk4ZjRVbXl5YjdzN0QvZ1NuL0NnQ25SVnhZYlJ1dDB3 LzRDcC85bW8rendOOQ0KMjZ6L0FNQS93Sm9BcFVtMnIzMlNQK0c0ai83NGIrZ05OK3hmOVBFUDQ3 aC9TZ0NwVGNWYit5TXpmTExEL3dCOTQvbUtkOWdsL2hlMw0KUDBsWC9HZ0NqU1ZjYXhuL0FMcW42 U3FmNjBMcDkyMzNZR1AwWUgrdEFGT2lydjhBWnQ5L3o1M0g0SVRVSzJzek13Mk1NZGQvR1B6bw0K QTFkS0JhMGlqUnNPNTJBKzVPSzlMMWUwaWkxelNORDBSbzlLdUppQkpkQmNreDQrYmZ6bHNnWjY5 YTgwc3cwVUNiR1hldklQYklPUg0KWFh4M1M2OXFkckpheS9ZN3VFWmttblg1VUI2QVkrOWs4ZTNl bUIxZmpQU2JQdzVBa3VqNmpmSmNFY1hFekJsYzkvbHdCWExlSTdTMw0Kc3JXQ2UyaThwMmRmTitZ bmVXT0N4eWVwWTdxNkc3OE5YLzJYN1pyVjdZdmJXLzd4WUV2TnpUZ2NsRUFIeWtqZ0UxeS9palhZ TmJsMg0KYWV6QzJlWVNtUGtCQU9SblA4WGFxRVpiQVMzU0k2NUJRZ2o2a1ZjaWhqZ1hFU0tnOXFn c3h2MUJoLzB6L3dEWnEwdkpxR01ocjNUNA0KSUQvaWtKajYzYi95V3ZGZnNyTlh1SHdhaU1QZzls YnZkU04vS2dEdktLS0tBQ2lpaWdBb29vb0E0MzR3RFB3ejhRLzllcC9tSytSTg0KSHNZdFMxS1dP NnZZN08zaFR6R2QxSjR5QndvQjNOelgxOThXMTNmRFR4RVArblJxK09QdTd2bDU3TjNGWFRsR01r NUxRbDN0b1QzVg0KdWJMVWJxejgyT1lRSEFrallsVGc0eU00T0RVV0tZcDIvVTlUUnZwVkduSnVL MEtXMnBMVGMwemZUZDFTQk9wRlBVMVYzVTlaS0FMUw0KdlVxbXFxeVZLcjBBU1d4L2UzSCsrUDVD clM0ck9nazJ6ejdVWTVJNlk5S3RMTWY3a2xBRnVpcTNtLzhBVE9UL0FMNU5MOW9SZXU0Zg0KVlQv aFFCWXFHVWZLeHAzbnhiZm1mRlIrZkQvejFYL3ZxZ0RvdFowK3p0R2cvd0JEamhqVzBpdUQ1bm1G N2tuTzhLb0k3bEZHT3BicA0KV2Q0ajA1ZFAxVjdaSUpMY0JFSmprYkxJU29KQnpWV08rbFJrZUs4 a1FvY29VbkkySDI1NHBsemNTWFU3UzNFOGswcmZlZVJ5ekhISA0KSk9UUUJBMFlwcklLa3h1cHUy Z0NKa0ZSN0tuWkQvZXBHU2dDQmhWSzBHNjBpM2RjZjFxK3dxbmFnZlk0dnAvV2dCckNvV0ZXSkZG Ug0KTmlnQ3UxTmFudFRLQUROQ2svM3FTazIwQVdiYmZMT2tTUGgzSVFFdGdaUHFUMHJWYlJ0WFNS aDVESEhjU3FSOWNnMWlyL3ZVcTBBYg0KTGFQcktSK1kxbmNHUEcvY09SajZpbmYyZHF5eWJQc1Yw VDdJU09BVDE2ZEFheTQza1g3cnlBZXpHckVWMWNMOXk0bUhmNzU2L25RQg0KZnM1NXJXVnBMaTE4 eEZPR0V5ZENmcjMrdFY5UTFLMGkxT1ZKWmN3YkE0RWJiZ0dQOElOUlhkN2N0YVhtNjRrUG5KKzh5 M0w0SEFKNw0KZ1lyaGJtUnZzMmQzTzhEOURRQjZucFJXOVZQS2VPTkdHVjh4c2NmV3I3SkxaVG84 TThKY2orQmd3eG5vY1ZsK0VOUmkwcTFzcmk0ZQ0KWkU4alp1aFFzd0pIb01tdHpSNXJieEI0MXRR N1RTMmQzZFJ3SHpOeU1SdHdSemdqbWh0Sk5zbHV5Ylk2VFZMMmFORWRZVTJwc0JDOQ0KdjhhTGF3 bGlzMDhxSnZLVk01M0RwNjEyL2pqd2pwdWllR3BkUXNyVzRoa0U4YUlacDJiS2w5cCtVMXhkM2U2 Vi93QUk5NWNMV1A4QQ0KYWdBSDhQbTd0dy9IT0tpbFZqVlRsRVNrbnNPMFliOVRmL3Jtdjh6WFFy RFdINGFUZnFFNTlsSC9BS0ZYVkpIVnNzalNFYmE5aytGNg0KYlBDcWU4cm45YThwU1A1YTllK0hT YlBDOEh1N24veDZrQjAxRkZGTUFvb29vQUtLS0tBTVR4bEZaVGVFOVhUVmtaOVBGcEk4Nm94Vg0K aWdVazRJNkhpdmdPNzhTVFBQSkpEWnd3d01TVWlMRmlpbm9wYmpPUFd2dmI0Z1dNK3BlQnRlc2JV cUxpNXNwWWtMRUFaWkNPVDByNA0KYnNaSnROaVczaDFMVHpBc204cE5Ca0U0SUlKSXlSejYwQVl5 K0k1djRyV00vUmpUditFa2J2WmZrLzhBOWF0eVc3YVdWbmFMd3pKRw0KZitXUGxiVTRCQTZFSFB2 VEhDeTd2K0pKNGRja2RZNTNYbjF3SHhRQmtmOEFDU0wvQUJXY240TUtQK0VtZy9pdDVoK1ZYN3l3 KzBXTA0KeHhhRGF4M1J4dHVZYjRuR0R6OG1jY2lzWnZEK3FML3k1U0g2WVA4QVdnQzEvd0FKSlov eEpNUCtBMUt2aVN4L2lhUWZWS3laTkcxQg0KUHYyRndQOEFnQnF2SnAxeXYzck9ZZlZEUUIwa1hp UFQvd0NLZGg5VU5XWS9FV21OL3dBdlNqNnFmOEs0MXJSbCs5QXcvd0NBbW8yZw0KQy9lVEZBSGQy dXM2ZjVzNSsyUWdFakdXeDJxL0ZxbGsvd0IyOHR6L0FNREZlYTREcjh5cmdjQWJSMjRxM3FlbFFX VWtTSmRXTjV2ag0KRW02MVlzRXovQ2NnZk1POUFIcE1kMUEzM1o0ejlIRlRMSUcrNjYvOTlWNWhh U1drVWJKTHBscmNFN1FHZHBBUmpPY2JXQTV6elYyNg0KaHNvWXJPYzZSSEZIY1JtUkJEZk14SURG Y2taSlE1WG8zMTZVQWVrd0hkS201bEE5WDZmalZ6eTRtYjVmc09CeHk1NTl4bXZKN2FiVA0KQi9y cmZVdWcvd0JUZTdlY25ubEQyeFY5eFpRMnNGeTBmaWFDM25aaEZJYnBHUnl2RFlPd1p4bm1nRDBX U0dQYnZhM3RTT2NxSDllMw0KNFVTMkVQOEFIWVJqazRLU3FlTWRPaHJ6YU85czFsQ3JyR3ZSUjdE bjkxRzUzWkdQNHh4aXJIMnFKVjN4ZUpkV0NaeG1UVEZJejZaRQ0KaG9BN2E4c1lvV1hiYStVaEhB TEE4L1VWVmFDSCs1K1RIL0d1VlhVWFVvQjRvVXhuT1M5ZzJWNDQ0QU5UcHFNN2ZkOFRhVDlKck9k Zg0KNUpRQjBQa3AyOHdmOERQK05OYUVmMzVoL3dBRHJBT28zNEkyYXZvRStTQmhXbFRxY1orWlIw cXhGZGF1L0tUK0haZnBxVWEvK2hOUQ0KQnFOQ2YrZXMzL2ZRL3dBS3IyZ0gyT0Q2ZjFxbTE1clNL eGF3MCtSRkJMR0hVWVc0SEo2TWFraWc4UndRUnIvd2pkMU9pZ2ZQYk1KVg0KT2VSeXVSM29Bc09C VUREL0FHYWhsbDFoT1p2Qyt0UmdkL3NyNC9sVkY5V1pQOWJwZXBSZXU2QTBBWDJGUlZtdDRnczEr K2x4SDlVcA0Kdjl2MkRmOEFMVmg5VU5BR2x0bythczlkWnNHLzVlRkgvQVQvQUlVOGFuWkhwZFIv OTlVQVhkeG9VbXFpMzFzMy9MeEQvd0I5aXBZNw0KcUZ2dXp4bi9BSUdLQUxTay93QzFVc2JuL2Fx cXM2dC9HcC80RUttamZkUUJQY3YvQUtKUDh2OEFBZjVWeEYwZjlHeC90LzByc3A4Lw0KWkovbC9n UDhxNHE4TzZEL0FJSC9BRXBnZXY4QWdtL2gweGJlZTRhWkUremhBWTF5Y2tDcmNqLzJ4NGhsZEha SXJpWUJIbVU5QW9HNA0KZ2M5cXkvRGd0Mit6cGR5d3hSQ0VaYVJTd3pnY1lCSDg2MFdqdDIxV0sz dDdxM2tpTzNNdzNLZ3oxejFJL0NnRGI4V2FYTm9VOXZieQ0Kend5ZWR1SVdDZDNIR0R6a2tkNmkx SjlGWHd6QUlVc2Y3Vi9kNVlJdm03aTNQT005UGVxZDVCYTJWemI3Mmp1UTZNRkVGMHpFSGprNw0K bEdLdWFucHNPbndKUEttQVhFWk1kMGt2SkI2REFOQUZqd2NtNjZ1ajZGUitqVjJFY2RjdDRGRytT OGYvQUd3UC9IYTY2U2FLM1ZUSw0KMkNlaWprbjZBVW1CUEhIWHJIZ1pObmhxMTl5eC93REhqWGpU aTV2bTh0V2t0WUc0eEczN3gvYmNQdS84QjU5NjltOEQ2WU5IOE0yVg0KbXNTeEtpa2hCMnlTZjYw Z042aWlpbUFVVVVVQUZGRkZBR0g0M1RmNE0xNWV1YkdmL3dCRm12aW1UeXZJaTJidk14Kzh6MHoy eFgyNQ0KNHJYZDRYMWtldGxNUC9IR3I0ZVg3aS9RVUFOWUJ2dktwLzREVldXT0Z2dlJSbi9nSXF3 NTJyVktWNkFJR3Q3Zi9uaEgvd0I4aW1mWg0KNE4zeXhLUHBrZnlwelBUV2VnQnlwdCs2OHlmU1Zo L1dwVm1tVDdsNWVENlR0L2pVRytuS2QxQUYyTzZ1L3dEbjl1dnhjSCtZcVZiaQ0KNGI3MTB4LzMw US8wcWdwcVZUUUJtNnJlbTB1Zkw4aTFsM2Z2Q3p3TG5rKzJLb2YybEQvSHAxbWYrQXNQNUduK0lm bXZFLzNQNm1xKw0KbEdEelhGMHlxaEFJSjU1REE0L0dxU3U3QTlpVmI2emJkdTA2UGs1R3gyR1Bi cWFGdXRQL0FJcktRZlNmL0VHckZ6Q2x4R2lRdGEvOA0KZTZsUG5qVTdnVnowd2MvNzNOTmdnamVT QUxCYnVoaEJUNXVYKzd2SjU3ZlBpcTltTG1ReU9iU0czZWJiM2dKUEJTVlR4ajNGUFo5SQ0KZFZS cDlTUkZ6dEJWR0F6MXdNMVBiV1ZuTHhGYnRLNFRPTnpOdk8xU01LdUQzckwwOUludkZTNGlaNHp1 eXF2dElJQlBYbWs0dFdFbQ0KdFN4NU9sbG0yM3R3T0JnbUFmajBhclhubit5bTB0TmJiK3ptbkZ5 YlowY0o1b1hhSDJqUHpiZU0xbjNNRWFXc0VxS3dMWXpsc2c1Rw0KZU9PM1NyZHRwVWJwRkk4NmhI VGZnT2dJK1VubkpHM3AzbzVYZXhWMEphYWRaeXk3SmRXdDRrd1NIMk9SbmpnOEN0cXp0WWJUVDcy eg0KdDlXMEdhTzZBRFBjMndhUk1mOEFQTjJCTWY4QXdHdVh0b0ludVhTV1ZoRWdZbDBYSklIb0NS MXFmN0JIOG9hNHcrOXhJUEtKQ0JPcA0KR0R6U1VHRjBYSjlBWlZVdzZqcHN4emdLazRCL1hGTFo2 VGUyOHJTUHAxdmVvWTNUWVoxSUJLa0J2bFlISUozRDM2MVFpc0ZsOGovUw0Kb1FacERGZ3EzQkhj NEI0T2FZMWkzbCtZcnd1T1RnWnp0R2ZtNUhRN1RpbHlNTG9mTG8xL0VqRjdLWUFEbHR1UVB4RlYv c2t5Tmo3UA0KSUQvdUdtS1NxL0t6Q3U2c1lZbXNiY3NuSmpCejM2VWdPTlUza1gzV3VvL296RCtW ZEI0WDFlV0o1MTFEVnRRakFBMktiMlpCM3o5MA0KOWExR2hqL2gzRC9nUi94cU4wWC9BR3YrK2ov V2dDcDRnOFIzZHZMRkhwbXI2ZzRDWmR6ZVNTQTV4Z2ZOMzYxbUo0cTFoVytlOWFRZA0KOThVYjhm OEFBbE5hMGtNVGZlMi85OGcvekZSTmEyN2Z3UmsrdXhmOEtBT2dsMUpkTjByek5Rc05KdmQ4ZVZt a3NZR0lKNkVxdU1uNg0KR3VMYlhuUEIwM1JaQjZuVG9nZjBBclJhMWovei93RHJxczJsMjdmNVAr TkFGN1RJaHFGcDlvR2plRzltU0R2aWxUcGp1cmdkNnI2aw0KTEMwVlh1dkQyam5jNVZCQmMzQUxn SERNUG5QR1JqbW9VMHRGL3dCVTdKbnJoalVVdWpsMjN0UGtudVcvK3RRQkxZcHBHb1N0SGErRw0K V01pb1pDSWRSa0J3T3ArWUd0SC9BSVI2eFZuRGVIdFlRb2NPSWRVak93K2h6SFdSSHBNMFRaaW5V SHB4NlZZYURWZHVQdHNqajBMQw0KZ0M1YldPZ3dheFoybDNhK0lMZVJwVTNSVDNVUlhhU091RUIy a1Z5dDl0ZFhkVndET1NCMkF4VzVGYTNqYW1sNXFEczRUbDM0WTRBdw0KT00xZ1hlR1ZkdlF6Y2Zr S1lIc0hnNlMyUzd4ZTZRMnJSZVJnUmpmaU04Zk9kdlBGWDdtNDBadkVhU1BwRnhaNlVvVVMya2Jz SGNnSA0KTEFzU1JrNHFMNGZKcURYZDRkTTFHM3NpSUFKUE9jcDVpa2o1UmdIbXRuZjRpLzRXSXBp dkxXNjF1SkJzazgwZVdFRWZUY1FPUXA5Tw0KdEFHZnIxeG9seGQyNTBxSzZpSXlMdDVKUS9HUmpi OUZ6VjN4TEI0Y1MxaWZSYmpVSmJnU0JJMG4yRmZLeHl4S3FQbXAvaXFUWFo5Wg0KMFpOVmd0NUpT QWJSSTJWL09CY2NOZzkyNDVxNTQ1bDFWOVBqL3RMUWJld2pOMmMzRWNFU25jRlA3c01oUEhmRkFE UEJLTzFuY0dKLw0KTEptT1cyNU9BcTlNMTZCNGQ4SzNtcVB2dDR0c1IrOWN6WitiOGVwL0NzNzRD YVhiYWtibzNrU3l4eHV6QlQwejhvNTlhOTdWUWlBSQ0KQUFPQUIwcEFZV2dlR2JIUndycVBPdWU4 MG5YOEIycmZvb29BS0tLS0FDaWlpZ0Fvb29vQXJhamJpOHNMcTFMWUUwVFI1OU1naXZpYg0KWHZE MnE2RHFFdGxxZGxjUlN3bmJuWWRyZ2RHVmh3UWErNHF6TmMxblNkSGc4M1diNnpzNGowTnhJcTUr bWV0QUh3YmZUQ0pzUDhoOQ0KK0t6NUoxL2haZjhBdnF2dG1QeHQ4UDhBVUhsalhVZEp1Q2liM3pG a0JSM0pLNHhURnUvaGxxZkhtK0U1ODlqNUg5YUFQaVh6TjM4Vg0KSm5kWDIyM2d2NGJhaDkzU2ZE OHVmK2VXei8yVTFFL3dmK0g5MG55ZUg3VUE5NFpYWCtUVUFmRk9hZXIxOWh6L0FBRzhDUy9kc0xx TA0KL3JuZFAvVW1xRS83UEhnMTEvZFM2dENmVmJrSCthMEFmS0N2VDFldnBtZjltN1FtL3dDUGZX OVVqOU42eHY4QTBGVXBmMmJiZFYvMA0KZnhOY1ovNmFXcW4rUkZBSHkxcjN6WE1SL3dCait0UmFW QkZOOXFNcWVaNWNPOVYrWWM1QS9oQk5mUjJxL3N3M2R6c2UzOFVRckl1Ug0KaDdNNHgyNlAxckhr L1pnOFN4TVd0dkVXbG4vZ0VxSDlNMDA3TUhzZUlMWldhZVVYV2FRTWpibERCU0dFYXQxSVBITlBp MDIxbGtTUA0KZXdKZ0VySHpVKzhkdUJnZ1krOTA2bXZXTG45bXp4ekYvcWJ6UjV4MjIzRHFmMVNx Vno4QlBpV3FvbjJlem1SQmhNWDY4QVk0R2NlbA0KYWM4U2JNOHZ0dFBpbWFCSVh1akl5TVhDUkFr RU50NEFPZXZYTk5pMDlaZktFTnhtZGd6TXJMZ0tRMjNDdG5uT2E3NjUrREh4SnRHKw0KWFFacE1j Wmh1WW03NS92RHZWSzQrR3Z4RmpqUlpQQ21vWVFFQXhRSVR5Y25KVTVQTlRlSWFuS1I2WFBLcVJ0 ZEtZMURGVitadG5jLw0KS0FTS2pTeHVYV0llZkdrVTRBVm5ZN1R3Y0E4SEhBcmVmd3A0enNKR2U2 OEs2c2M4TXIyTW1EeGorSEJySmxzdGF0U2dtMGkraUNFRQ0KQjdTUURnRWR4NzFWNGg3eG42ZjV5 M2Yrak5IdndSdWZHekdPYzd1TWZXcmltL1dLRDVMZDl1K1FEYWhjam5jV0E1STQ3MVRpUjdTVA0K TnhiemVXUVVaWFVwa0gzSTRxWCsxWS9JZ1JQa2tpUmtVaHh0QU9lZ3huOWFtTFZ0V0RUN0UrTlFs V0EvWTFkL1BaMWNMbG5mcVFlZg0KYW0vYXJ5MXRvbzdxM1kyZ0pSVmRTb0orWUg1aHovRWFaQnFN UDJyelpVeUM4anNOcXQ5OFkrNmVEaW83bTdqbHMwdDBUQVRHRzJnRQ0KL014NXgvdmNWZDF1bUZ2 SXFTRU03RkYySWVpN3M0OXNtdTZzVC94TDdmOEE2NXIvQUNyaGE3V3hKK3cyL3dEMXpYK1ZZbGxo alVMaw0KMHJHb3BNZjNxQkNNYWozR2hxWTJhQUJqL3MwemRTdG1tZjhBQWFBSGI2WGZ1cUwvQUlE UlFCS3BxZU1pcWExSXIvTlFCZnViamJwRg0KeGI3SXpuTDd6OTRjZEI5ZTljWEltNW9odDZ5ZFB5 cnE1T2JXVWY3QnJGdGJDNXU1RVMxaWFUWSs5OGRnTWNuOHFBUFJOQWZRMCswZg0KOEpCYjNVeVlI aytRKzNEWjVKeDdWZHRENGNieEM1V1crdGRDd1RHd3daZDIzakp3ZU4zdDBxbDRhOFJYK2lmYVA3 UGFNQ2ZHL2VwNQ0KeG5IUWoxcTdhNi9jSnIwK3F6V3RyTlBPQ0dSMEd3WkFHUURubmlnQ2U4VFNI MW13R202dGRQYU9GOCs1bVRtM083bkdBTTRITlhQRQ0KMEZwRmJXNXRQRTAyc0F6Tis0a1hCUUFm Zis4UnowcWpmYXpGZmF6YTNzdWwyY2NVQUFlMmpVS3MyQ1Q4MkFPdWNkS05aMUhUcjVZQg0KcCtq UTZkSXJreVBHMzN3Und1Qnh3ZWFZSHRQN09pZjhTeTlrOVdQL0FLRi85YXZaYThrL1ozajIrSHJo L1Z2L0FHWnE5YnBBRkZGRg0KQUJSUlJRQVVVeDNXT01zN0txRGtrOEFDdlBmRmZ4YjhPYUg1a050 SzJwM2k4ZVhhNEtnKzduajhzMEFlaTF6SGlyeHY0ZThMbzM5cg0KYWhHcytNaTNqK2VVL3dEQVJ6 K2RmUG5pMzRzZUp0YzN4Vzl3dWwyWjQ4dTB5SEk5NUR6K1dLODhmTHlNN016dXh5ekhrays1b0E5 WA0KOFpmSGJXcnVWb2ZDOWt0amE0d0xpYmE4eFA4QXVuNVYvV3ZHTmF1THZWNzk5UzFpVzh1OVFs UHp5R2NzMkJ3QU1rQURIWVZxeFdGeg0KTXUrS0puUUg1aU1aSDRkYXNXbW5RZWJFYnQyaWpMNFo1 Rk96QjllTTBBYzFiV3ZteXNpM1Z4YkRnYnBuQUhQcjFxMUxwMEVLcnYxRg0KcE8yNUZSMVA0aXRu VHpCTmMzUlRUdnRFUVJ3RjNNRGtBNFk0NDQ2MHlTMHRvckh6MVZaWTgrV3hrZFF3WWpQQ2duODZB TWh0S0Nxcg0KcGRRdUQwSmdHZnhBT1JVMXJhNmdxdDlodWxPM0pJamVSQ0FPL0JyV2F5czVVdDNX S2FHNE83enBpdTlTT05vR01INjAvd0N4VzFsZA0KdGJTMlRXNk9BSm1lSU81VTg3d3JaMm5iMHhR QlF0Tlo4VFc3YkxUVkw0ZWdqdjVCL00xcUw0NThlV1B5TnEyc1JrZndtNURIOG1xcA0KTFlXYnkv TFBkUzJ5eUVSckR1V2JZRHdUZ1lYSSt0VzJ0STVZSGVXNlcya1JGQ0k2dHZteTNxU1FDQjlLQUw5 dDhWZkg5djhBOHhMVQ0KaVA4QXBwQkUvd0RNVnBwOGJmSFVYMzVWZkhYZnB3UC9BS0RpdVlqc3ZK bDhxVy9tbFRLbjdHazRLT1BVc29QTldaTk51SVpJSGE4aA0KUXlSK1lrRUNoeU1FL2VCSEdNYzVv QTYyRDQvK0tvdHZuV3VueWV1KzFsWCtSclFpL2FMMUljUzZUcGJIMmxrVCtZTmNIcHRsYzNVbg0K MmRaN2U2MUc1d0kzalVMR2pFNElLNS9sU1NhYnFhdkJiek5ZeVNMSis5QVlvd1RuT1d5UVBZWW9B OVB0ZjJqUi93QXZHZ3duL3JuZQ0KNC9tbGFjSDdRMm10L3JkQnZCLzF6dUkyL25pdkhXc2JpN3ZN YWZvYXpSQVkydmtFRTl5MktldWoyVnZiVGkrc29YdlE0UlFHVVc2Wg0KNTNGd01ramtFWW9BOXhn K1BuaHgvd0RXNmRxMGYwalJ2NVBXeFovR0x3eGRRaVJScUtBOU45dHljZGNBRTE4MmFmb2x0cXQ1 RkZEcA0KTWx2Ri93QXQ3ay9OR2cvdmZLUVFLWmQ2Ym8wVWs3cGI2cEhBb0JpZDFLTkprY01FTEE3 U2U5QUgxRi93dGp3Zkc0UzUxS1MyY2dNQg0KTmF5cWNIcC9EVm1MNG9lQzVmdStJYk1mNys1ZjVn VjhydG9kaEY0WS90dTR2N3FNUE1JVWdqV1IzM0VrZk5sU0IwNHBsdG9VZDFxRQ0KRmxhNmxJazgz SSswc3NTZ1l6a3N3QTZlOUFIMXF2aS93ZGZmOHh2UlpjLzM1NC82bW4vOFVkZmY5Qy9jZjkrV3I1 RHZ0S3RyUzdsdA0KUCtFZ3M1WjRpQU1vUDNnL3ZKMHl2dlZ5UHdkcVV1Z3ByS3oyYWFjeitXazB5 QUNRNUkrWEI1d1JRQjlVeWVEdkJGOXdkQjBDWFA4QQ0KY3RvdjZDcU0vd0FJL0FFL0wrRk5MNS91 UmJmNUVWOHRSNkJxZm54UjI2Mjhrc2h4R3NLdVMvMDI1cTFQcGZpZlRibVdDZFdpbGg0Wg0KVXZI VXA5ZlNnRDZLdVBnYjhPNTFiL2lubzRzOTQ1NVYvd0RacXJUZkFud1l5NGhqMUMzUUFBTEhkRWdB Zjd3TmVBd1gzaTlGWTI5MQ0KcVIyZGZKMU5qajlhdFFlTHZITUsvSmY2NE1kaGRDVCtwb0E5aXVm MmZQRHNuK3AxUFZZLzk1MGIvd0JsRlpjLzdPVmdmOVQ0anZFOQ0KTjhDSCtSRmVkcjhRdkgwRzMv VGRjUDFpUi82R3JrSHhaOGRXL3dCKzh2RC9BTmRyQkQvSVVBZE5jL3M0WFA4QXk3ZUpveVArbWxu ag0KK1RWblQvczU2OFA5VnJtbHlmNzBUci9qVkNQNDNlTUlteExQQzVIYVRUaVA1WXE1RjhmUEVp ZjYyTFMzeDF6YnlML1dnRE91UDJmdg0KR01mK3F1TkptSHRNdy9tdFpzdndMOGRwdTIyVm5JUDlp OFgrdUs2K0w5b25VdjQ3RFIzK2tqci9BREpxN0IrMFBjdDkvUkxGL3dEYw0KdlNQNXJRQjVqYy9D RHgzRG5kb0V6NDd4eXh0LzdOV2RMOE4vR3NPN2Y0WDFUSHFzVzcrUk5lNFFmdEJ3c3Y3M3c4My9B R3p2RlA4QQ0KTmF0d2ZIL1RtYjk5b0dvSU81UjBiK29vQStjcm53bDRrdDIvMGp3OXEwZnViTi84 S29TYWRxRVRZbHNMNk1qKy9iT1A1aXZ1endsNA0KbHNQRk9qeGFqcHpNSTMrOUZKZ1NSa0hvd0JP SzIyQVlZUElvQStIUEJIaERWdkZWL3dEWmJIVHJpV1BwSzV5aUlQZGlNQ3ZvelJ2aA0KWG9uaER3 eHJjNnhDNnZwTFNRbDVPVWp4R2NCRlBwNm5tdlZrUlVYYWlnRDBIRlFhamFyZWFmZFdySGFKNG1p SjlBUVIvV2dENFd0aw0KUGxxYTZqd25vUzYzL2FKZWVTSVdzQWxHeEEyY3VxODVJd0J1eVRWM1Z2 aDk0ajBpNmUyazBxNmxXTTRFMENGa2NkbUJGWmJhUHFscQ0KM3oyVjVFZlh5bUg5S0FMWGlYUURv aWFjL24rYjlxamFUR3pHTnJGVGc1TzRjZGF4TnRYSjB1VzIvYVBPSlVZSG1aT0I2RE5WMVFzMg0K RlhKUFFEclFCOUZmcytEL0FJcFdVLzdZL20xZXFWNTU4RXRJdTlLOElJYjZKb3BKeUhWSDRPUGNm alhvZEFCUlJSUUJVMUhVTFRUTA0KVjduVUxpSzJ0MXhtU1Jnb3oySE5lZWVKUGl0YTJxbVBSTFpy cVR0TEpsVS9BZFRYZWE1bytuNjdwejJPc1drTjNhU1lMUnlya1pIUQ0KK3hIclhnL3hGK0dVM2gy S1hVTkVpdUxyVFY1ZU9ObU1rUS8zUjk0ZlNnRG0vRlhpZlcvRWJOL2FON004SGFCUGtqLzc1SFg4 YTQrNg0KQWhYTHNxRG9LbGd2YmE0WE1WNUlVLzM4L3dBNlZraWYvbDRiL2dXS1FGUmJlVjVNTXJJ TzdiYzQvRGlwcm0zTnBPOXZOQis4R0RoMQ0KSWJwbXBQczQvaHVNZjUrdEVsdkpMTDVyM0crVThi aXhKd09uSnpUQWxqdDQ3dTBudUVudGJaNGYrV0JaekpKbis2TUVjZldxdDVJcg0KNmRicExkTTd4 eU50aEVXQ0FjSGR1Nzhqb2F0V3B2YlIyZTF1dGpzalJuL2RZWUk1SG9hcXBhM0VTYkYyc1BmQlA2 MEFMRmlLVkpKVQ0KdDVVSXlvMzR6OWNBL2xUdFFoU0crbGVWN003L0FKd2xzdnlEUE9CbnBqcFQ1 WHZXMC83TWlReGZPWDgxRUcva1l4bjBxb3NONHYzdQ0KZlVsTW1nQzNaeUpjV3p3VEkwc2lnK1Fy M0FXT1B1V0JKNjhkTVZGaFlaVW4zWnVGN1E0WUQ2NUJxdXduWDcwVVovNERpbTVQOFZ2Rw0KZnBt Z0RlZ1NYNVo5UFhVSnBIeWtraGJaRms5dTM4UFVWWFdNUXlOYnZkUm9IT1djb0d4ams0WTFscTQv NTRTSjlITk5aRC9ETE5INg0KVUFkRXI3NHBiUFI1YnE1Q2t1SnpFRUFIZk9CM0E5YWl0ckEzMFRP aTZiYnBEL3I3cDJKVTlPT2xaYlh0ODBIa05xa3hnd0JzTEhHQg0KMEdLamdEUlNMSXIyN2tIUHpv Q1B5SW9BNlc3dXJlS0pZdEtaWnJZY1hFbHRFSVZMZXpaeit0R2thU0xxVml0a3lhY2ZuZDdtNk1R Ng0KZmV3Q1NheWJ2VXRUdTdSYmFXZUUyeThpRkZDTG4xd01WWGptdVBrKzBRTGRScDkyT1NWdG8v STBBZERmYWp1OCsyc3Y5Q3NseUZOcQ0KckR6aDJKWWpKejcxWjAyeC93QkRsMUhVclcranQwSDd0 UXlXNlRFL3dqR1Nmd0ZjN2MzMTlkWGtFc1Z1dHVZaVBKUzErVlV4MHdPYw0KbjNOZFZGWkxwV25y ckhpT3phOHV3QjVGdkpjWjY5UGt3QU1EclFCazNXclRYVnFrYTNrd2l5VVd6amdZN004NXdldnRr bXQ1Tk9pMA0KM1EwMVhVcmZVSlpIS3h4bTlWSWtRa1ozRlFTeEZZSzMxeHFGOGx6cHN2bDNidVFM YUdJdHNKN2hjWUEvR3Q2T3lhNmFlVFhkV2sxVw0KL2dqd0xQejBRUis3TXh4eDE0NU5BRkM2MW0r bHVmS3U3eXpTV0U0aUFjd3BCa2RRb0dQeHJSZ3NkSzBLS0M3dUVzZGIxQnlKQmJRSg0KaUxhZjRp emRUbnB4WFBhWUwyM2tTOHQ5TDAyV0l5QVJ6VHhmdS9wZzFzNnEwRjdhTExxMnIydDVxcnVObHJB cklrQ2orRXNjRWRlQQ0KQnpRQVgxOWZlSmRRZ2xiVG1tdjlubFJtTkVoRnFnT1FzYmtraGM5YW1r MGZROUVYeTlidDVOV250OFNMYUpMdnRvWFBaemdEUHJ0eg0KV1ZvTnd1bTNLbUx3eXQ5ZGpKVm5k amh1eEM4akZTNnZaWEVNaVMzMTE5anZicmR1dDRHR0VCNU9lQUV6UUJUOE5XQmk4UXRlZUZiVw0K NHRkUmVSM0RRUk1WajNaeUZKUHlKZzR3YTFOUjBuUnJTeDFDZlU5YzFTNjhRWFc4TTBOd3lpM2s3 c3pjaGlQN3ZmMHFMVE5XVFROTQ0KdU5sMXFsekxLR1F4RzZWWWdCd1d3cmJtOXFnZ3Q1cnJUdnRo czJGbmIvZW1rM1E1Qi9FamoyV2dCOXRMcmVxNkFuaDdTTlI4KzFTVA0KelpMallQT2tQYnpXMm5P TTFQTHBmOWlhaHByM09zMmV0WGR2T3B1ck9TSkRBa2UwZ0x2RzBsd2NFTFZTZnhCcU1XbUpiMk4w MFdueQ0Ka3gvdk1iWkdHTWhXQ0wrTkduYUpHOFMzbmlCckd6MDlCZ0xHcDN2NktGQkdLWUZqeFE1 dTlSdmI3VEd1SlpaSERpM2UxajhvQTRCeA0KdGM3ZW1lbFpjZXEzRVdnWEZzbWpTSFY1SkFmdHZt dHRqUUVIYXNZempQUTgxdk5PazF0Rlo2UFpSMjhHZk1hQ05QbWRoMFpwQWVmcA0KMHFDKzhSMitr eHNMdEliL0FGRnVUR1dEcEd3NmJtd000OUtRRlMyVFZ2c1A5bzZ4Wlc5anBhRlJJL252RkxNQ3dC RUNOa080Qno2Vg0KaGE1ck1OM3FFdjJLQ1NQVE1qeTRIZkxFQVl5ekRCT1R6aXFHczZ4ZTZ4ZC9h TlFuYVdUbmFPaW9EenRWZWlpcy9OQUZ2UlBzVGF4RQ0KZFhzTHk1MDFWWXl4MnJvSlpHeDhvVW5v TTlhbjFpMTBXOXVOVU9uMmVvYWJicEdrbHBCYzdIZDI0RHF6RS9pTVpyTlY5clpXbCthVg0KOEt1 WFBHS0FLa1ZoQ3FzSlVqazlHMkFISHZpdDd3MTRMbjE2WDl6Yi9aN01INTdsc2o4RkhjMTIvZ3o0 ZXRNcVhtdnEwY2ZWTGJveg0KL3dDOTZEMnIxUFROTjgxNExhM2lXTmNoVlZGd0VGQUcxOEovQ1du K0dORGMyTUcyUzVJTWtoKzlKam9TZnJtdTZxS0NGWVlFaVRoRQ0KQUEvQ3BhQUNpaWlnQXBHQVBX bG9vQWdrdGJlWC9XUVF2L3ZJRFVBMG5Ua2xXVkxDMVdSZWpDSlFSK09LdlVVQUZGRkZBQlJSUlFB VQ0KVVVVQWVkK0xQaEI0UDhTM0QzVnpwN1dkNjV5MXhZeUdCbVBxd0h5c2ZxSzRHKy9aeFRrNmQ0 cnZJLzdxM0Z1c242cVZyNkNvb0ErWQ0KWi8yZS9GY2U3N0w0bDB1WDA4eUNSUDVicXk3djRJL0VP My8xTDZQZEQvWXVtWC8wSkJYMWxSUUI4ZDNYd3Y4QWlYYUxsdEJXNEgvVA0KQzhpYjlDd05aY3Zo ajRnV3FzYmp3bHEyQjFLUkIvOEEwRW12dGlpZ0Q0VHVadkVOai94KytIOVloLzM3R1FmMHFvL2lj MjdZdW9wbw0KVDZTSVZQNmdWOTcxRlBid3pyaWVLT1FlanFEUUI4SUo0dXRtL2pYL0FMNnF4SDRt dG4vaVUxOW8zZmhYdzlkcVJkNkhwYzRQWHpMUw0KTS96RllkNThKL0FkMy9yL0FBcHBQL0FJQW4v b09LQVBrOWRjc24vNTUvcFVxNnBaTi9kcjZTdmZnUjhQYnI3dWh0Yi9BUFhDNmxULw0KQU5tckd1 ZjJjZkJNdWZKbDFxM1BiWmViaC80OHBvQThMVzlzMi9pLzhlcDNuV2JmeGZ5L3dyMXE2L1ptMGx2 K1BMeE5xMFBwNWlSeQ0KZnlDMWszbjdNOSt2L0lQOFlLUi8wM3NmL2lYb0E4OVVXcmZkZGFYeUlX KzYrUDhBZ1IveHJxNS8yZGZHVVBOcnIranpBZEE2eUlmNQ0KR3N1NStDUHhKdC85VkZwZHovMXp2 TWYraEFVQVpTUTdIVjRwMlJ4eUNILytzYW5lZTllZHAzdlpwSlNObTUyRGNEdHpVVjE4TmZpYg0K WS9mOE9UVGY5Y0o0bi9rOVpsejRkOGZXWC9IejRTMW9BZDB0MmNmbXVhQU41ZFMxU0syZUNHOWFK SCs4VWlVTi93QjlBNXBsbmNTMg0KdHlrL2tXY3hUb0pJano5ZXRjaFBmYTNhTmk3MGpWSWNkZk10 WkYvbUtyLzhKYjVYRXl0SC92OEFIODZBUFJKTmYxT2FkWmJob3lZeg0KbUVSdVloSDlPT3Z2VnIv aEtyeFVUL1IvT3VGNlNTVGg5bnVBZTQ3VjV6RjR3Z2IrTmY4QXZxclNlSjdkL3dDSmFBTzJnMUtE OStrMA0KV29lWGNmNjBvcWxqM0h6REI2MVduMUczbWk4dUtLYXhqVTlXUm1lYjNkdS8wcm0wMSsy Zis3VmlQV0xmK0Y4ZlJzVUFkSEJlNlJieg0KcGNTM0RTU045MkJOeXhvYzk4azhmalZpOHY1OVNh WHp0V3RYQUdZVURoWTBJNjVVZzcrT0J6WE1ycWtUZjh0Vy93QytzMDc3WEEvMw0KbWpQMVZUL1Nn RGZzWnNXemZZb3JPNXVBY0dVN1VDSHZ0SGVwWmJxOXNMbFpicTQyUlNBTzBwZkJmSFViUVNQcFhO N3JSdjRMZi92Zw0KRCtXS0dodFgrOGtmL2ZURCt0QUZqVmZFVzZXZE5IUnJhS1U1YWIvbG8vNDlx NXhxMldzclZ2NFdIMGwveEZNYlRvUDc4dy83NVA4QQ0KaFFCa1VWb1MydGxGekxleUo3ZVVELzdO V3A0YThPTHJWOHFOZGVWYWQzS2plUjZCZW41MEFaT2o2VGU2eGVMYmFmQTBzaDYraUQxSg0KN0N2 WlBDUGc2eDBHTlo3amJjMy9BUHowSy9LaC93QmtIK2RXdE9qc2RIZ1RUOUh0L25ib2thN25rUHFl NU5kcm9uZys5dmRzK3N2OQ0KbWlQSXQwYkxuL2VQUWZoU0F6TFFUWHMvbFdVVFN5ZHdPMzFOZDM0 YzBadFBScGJwbGU1YnNPaUQwRmFWalkyMm53Q0cwaVdLTWRoMw0KK3RXcVlCUlJSUUFVVVVVQUZG RkZBQlJSUlFBVVVVVUFGRkZGQUJSUlJRQVVVVVVBRkZGRkFCUlJSUUFVVVVVQUZGRkZBQlJSUlFB VQ0KVVVVQUZGRkZBQlJSUlFBVlZ1ZFBzN3IvQUkrclMzbi9BT3VrU3QvTVZhb29BNXkrOEQrRmI3 L2o3OE42UEtmVjdPUFA1NHJEdWZnNw0KOFByaGlaUEN1bmdudkdySi93Q2drVjM5RkFIazE3K3o5 OFByalBsNmJkVzJmK2VON0tQNWsxa1hYN05uaEIvK1BYVU5jdGovQUxOdw0KakQveDVEWHVGRkFI enZjZnN5V2JNVGFlTGRTakhZU1c4Y244aUt5TG45bXJYRVp2c1hpMjFrSGJ6ck5sL2s1cjZmb29B K1RicjluMw0KeDNiL0FQSHJxMmkzUHQ1a2lIOVVOWmN2d2ErSnR1VHRzTEc0QTd4M3FmOEFzMksr eHFLQVBpSzU4Qi9FaXlZckw0VTFDVEhlRmtjZg0KK09zYXk3bnc1NDlWdGorRjljUW4vcHpjL3dB aFgzalJRQjhIV2ZnRHgvZHlyL3hTbXNIUGVTSUlQellpdll2aDU4SFBFeWxKZGV1bw0KZE1oNm1G R0VzdjZIYVB6TmZSOUZBR0xvSGh6VGRCaUs2ZkJpUnZ2elA4MGovVmpXMVJSUUFVVVVVQUZGRkZB QlJSUlFBVVVVVUFGRg0KRkZBQlJSUlFBVVVVVUFGRkZGQUJSUlJRQVVVVVVBRkZGRkFCUlJSUUFV VVVVQUZGRkZBQlJSUlFBVVVVVUFGRkZGQUJSUlJRQVVVVQ0KVUFGRkZGQUJSUlJRQVVVVVVBRkZG RkFCUlJSUUFVVVVVQUZGRkZBQlJSUlFBVVVVVUFGRkZGQUJSUlJRQVVVVVVBRkZGRkFCUlJSUQ0K QVVVVVVBRkZGRkFCUlJSUUFVVVVVQUZGRkZBQlJSUlFBVVVVVUFGRkZGQUJSUlJRQVVVVVVBRkZG RkFCUlJSUUFVVVVVQUZGRkZBQg0KUlJSUUFVVVVVQUZGRkZBQlJSUlFBVVVVVUFGRkZGQUJSUlJR QVVVVVVBRkZGRkFCUlJSUUFVVVVVQUZGRkZBQlJSUlFBVVVVVUFGRg0KRkZBQlJSUlFBVVVVVUFG RkZGQUJSUlJRQVVVVVVBRkZGRkFCUlJSUUFVVVVVQUZGRkZBQlJSUlFBVVVVVUFGRkZGQUJSUlJR QVVVVQ0KVUFGRkZGQUJSUlJRQVVVVVVBRkZGRkFCUlJSUUFVVVVVQUZGRkZBQlJSUlFBVVVVVUFG RkZGQUJSUlJRQVVVVVVBRkZGRkFCUlJSUQ0KQVVVVVVBRkZGRkFCUlJSUUFVVVVVQUZGRkZBQlJS UlFBVVVVVUFGRkZGQUJSUlJRQVVVVVVBRkZGRkFCUlJSUUFVVVVVQUZGRkZBQg0KUlJSUUFVVVVV QUZGRkZBQlJSUlFBVVVVVUFGRkZGQUJSUlJRQVVVVVVBRkZGRkFCUlJSUUFVVVVVQUZGRkZBQlJS UlFBVVVVVUFGRg0KRkZBQlJSUlFBVVVVVUFGRkZGQUJSUlJRQVVVVVVBRkZGRkFCUlJSUUFVVVVV QUZGRkZBQlJSUlFBVVVVVUFGRkZGQUJSUlJRQVVVVQ0KVUFGRkZGQUJSUlJRQVVVVVVBRkZGRkFC UlJSUUFVVVVVQUZGRkZBQlJSUlFBVVVVVUFGRkZGQUJSUlJRQVVVVVVBRkZGRkFCUlJSUQ0KQVVV VVVBRkZGRkFCUlJSUUFVVVVVQUZGRkZBQlJSUlFBVVVVVUFGRkZGQUJSUlJRQVVVVVVBZi8yUT09 DQoEgg5EDQotLS0tLS09X05leHRQYXJ0XzAwMF8wNTE5XzAxQzdFN0U1LjQ5OUVGNjMwDQpDb250 ZW50LVR5cGU6IGltYWdlL2pwZWc7DQoJbmFtZT0iaW1hZ2UwMDQuanBnIg0KQ29udGVudC1UcmFu c2Zlci1FbmNvZGluZzogYmFzZTY0DQpDb250ZW50LUlEOiA8aW1hZ2UwMDQuanBnQDAxQzdFN0U1 LjQ5ODI0NjcwPg0KDQovOWovNEFBUVNrWkpSZ0FCQVFFQVlBQmdBQUQvMndCREFBWUVCUVlGQkFZ R0JRWUhCd1lJQ2hBS0Nna0pDaFFPRHd3UUZ4UVlHQmNVDQpGaFlhSFNVZkdoc2pIQllXSUN3Z0l5 WW5LU29wR1I4dE1DMG9NQ1VvS1NqLzJ3QkRBUWNIQndvSUNoTUtDaE1vR2hZYUtDZ29LQ2dvDQpL Q2dvS0Nnb0tDZ29LQ2dvS0Nnb0tDZ29LQ2dvS0Nnb0tDZ29LQ2dvS0Nnb0tDZ29LQ2dvS0Nnb0tD ai93QUFSQ0FBc0FFa0RBU0lBDQpBaEVCQXhFQi84UUFId0FBQVFVQkFRRUJBUUVBQUFBQUFBQUFB QUVDQXdRRkJnY0lDUW9MLzhRQXRSQUFBZ0VEQXdJRUF3VUZCQVFBDQpBQUY5QVFJREFBUVJCUklo TVVFR0UxRmhCeUp4RkRLQmthRUlJMEt4d1JWUzBmQWtNMkp5Z2drS0ZoY1lHUm9sSmljb0tTbzBO VFkzDQpPRGs2UTBSRlJrZElTVXBUVkZWV1YxaFpXbU5rWldabmFHbHFjM1IxZG5kNGVYcURoSVdH aDRpSmlwS1RsSldXbDVpWm1xS2pwS1dtDQpwNmlwcXJLenRMVzJ0N2k1dXNMRHhNWEd4OGpKeXRM VDFOWFcxOWpaMnVIaTQrVGw1dWZvNmVyeDh2UDA5ZmIzK1BuNi84UUFId0VBDQpBd0VCQVFFQkFR RUJBUUFBQUFBQUFBRUNBd1FGQmdjSUNRb0wvOFFBdFJFQUFnRUNCQVFEQkFjRkJBUUFBUUozQUFF Q0F4RUVCU0V4DQpCaEpCVVFkaGNSTWlNb0VJRkVLUm9iSEJDU016VXZBVlluTFJDaFlrTk9FbDhS Y1lHUm9tSnlncEtqVTJOemc1T2tORVJVWkhTRWxLDQpVMVJWVmxkWVdWcGpaR1ZtWjJocGFuTjBk WFozZUhsNmdvT0VoWWFIaUltS2twT1VsWmFYbUptYW9xT2twYWFucUttcXNyTzB0YmEzDQp1TG02 d3NQRXhjYkh5TW5LMHRQVTFkYlgyTm5hNHVQazVlYm42T25xOHZQMDlmYjMrUG42LzlvQURBTUJB QUlSQXhFQVB3RDN0SkcxDQpSdFp2ZFExZTUwNndzTGlTRUNLVllValNOUVdrZHlNOXlTU1FBQVBR azVIOXUrRFAraWp3ZitEeUgvR285ZC81Sm44Uy93RGQxUDhBDQo5RW11RzhaK0RMKzJ2Tk8xUzQr SVBpblRyTFdiaElvNHJTUWlDekxSRjhOKzhHRUFSdVFPUDFyYW5DTWw3eklsSnJZNzMrM2ZCbi9S DQpSNFAvQUFlUS93Q05IOXUrRFA4QW9vOEgvZzhoL3dBYThMbGdLV2FYQStJM2o5dk5Gc1lrM2JT MzJoM1dFRXRNRlRjcUYvbktnS1JrDQpnbkZia0hoTytrOFZhWDRlaytKSGp1SFU3NjM4OWtrWTR0 U1ZaaEhLd2xJVnlGWTdSbnA3aXRYUWd0My9BRjl4UFBJOXMwV1BSdGQ4DQo3K3hQR0Z6cVhrN2ZO K3g2bWszbDV6amR0empPRGpQb2F2WEdpUTJ5YjduWDlXaFRPTjBsNEZINml1TDhJSi93aGVzZUxW MVRVTGpVDQp6cE9pV0R6WGs1Smx1TnB1MkpKSkp6emdjbm9LOFg4YjZaNDg4UmFzMTVyVmhlVHZL N2VWYnhNSkZpVUVEQ29wT0FOd0djYytwNXJ6DQo4VlY5ZzdSVnoyY3F5MVk5djJsUlFTNzlYNUs2 djVuMCtuaDlIUU9tdWF3eUVaREM3eUQrbEpIb0VjbWZMMTNXR3gxMjNlY2ZwWHp4DQo0SS80UzdS YmVLd2xTLzhBN011M1VtTlN6S29LYmdRUXBBNElKK1ljWXpYZVdNV3BXdHo1dW55SHpGWXFYZ2tE RGNPb0pCeHgzQnJ4DQpjVm5WVER6aWxSYlQzYS80WTdhbVJRZzJ2YnhmYnovSC9NNi94a3QzNFcw NkxWckhXZFRrZUNlSVBiWERyTEZQRzBpcXluSzVCd1RnDQpxUmc0NmpJUGUxNXg4VExtVzcrSGlU WENCSm1lRVNLT3pDVlFmMUJyMGV2ZGhOVGlwTHFlQktMaTNGOUR6YlhmK1NaL0V2OEEzZFQvDQpB UFJKcW40enNZdkZYaHkxMERXZEIxSzRzSUhobDMyN01ubTdBT0NkaCtVNUlPT2VlRFhYZUZyZUc3 dHZFZHRkd3h6MjgycFhNY2tVDQppaGtkU0FDckE4RUVIQkJyTThUZUhmaDE0WTBPNTFqWFBEWGg2 MTA2MjIrYk4vWk1iN2R6QlI4cW9TZm1ZRGdkNml2Q3BPS1ZLbzRODQpPOTBrL3dBeXFVb1FrM1Vo ekwxYS9JNDdWL0R5Nmt1cXAvWnZpSzFpMVdYZmVSUUZOa3NmbEpFc0pCaE9FVlUrWEhLa2tnOU1M cG5oDQpxMDAzWHJUV0xiUlBFWnZyYTROd0RKZFNNai91akVxTWhUYmhVTzBFQU53TWs4MXJ4eWZD VnBFaWZRdENodVh2NGRNK3ozR2crVE10DQp4TXU2SldqZUlPb1lBa013Q25CNTROUzJTZkNpKzF5 TFI3WFEvRHo2akxlWFZna1A5aktNejJ5aHBrM0dQSHlxeW5PY0hQQk5jMzFmDQpHV3Q5YWY4QTRC RTZQYjRmL253di9BcEUyaTI0MS94bDQwZ3ZyY3dDKzBqVDBraWtYY1V5YnNjZ2puMTVGZUllTHRi OGRlRnRSdU5QDQoxNXc0M1lTV1MyUXBJb2JjR1JnT2hJQjlSN1Y3NW91dStBZEM4RVRlTDlFaTA3 VGZEczIzemJ1ejA4dytaaVV4RGNpb0hPSEpBeU81DQpQVG1ybDc4UWZDQU41RE5xa0Z3YlY3V040 NDRYbTh4N2xkMEN4QlZQbkYxK1lDUGR3Q1RqRmIxcVVxa1lwVGQwbHIzc3V5Tjh2eDlQDQpDU2w3 U2tweGwwZlQwYnY4KzU0WjROdWZFM2lTM2x1NzZ6dURaeE9KV3ZJNGZLRFpaVzJydEFCeTZLeHdQ WEpHZWV6dFRxbW95QzF0DQpta2szSC9WcERIdDc1eU51TUhKQkI0d1NLN2pSL2lwNEsxZUs1YlM5 Yml1RXRiQ1hVcHdrRXVZcmVOdHJzdzI1QkJIM2Z2RUVFQWdnDQpuWTBqeFhvT3A2cGFhZnAxNEpM eTgwMU5YaGpFTHJ2dFhZS3NtU29BeVNQbEozZTFlWFd5cXRVcUtjYTdpcldhL3dBdGRQeE9xcm5G DQpLYmRxRVYyOHZ3MS9BNWI0bFdrbGo4TzB0NTVQTm1SNHZNZkFHNWpNcEp3T09wTmVrVnd2eGsv NUUrYi9BSzZ3L3dEbzFLN3F2WmhCDQpRaW9yWkhpU2s1TnlmVTVyd2JJZ0d2RXVvQTFhY2RlL3kx bmZHRHc5Y2VNL2gxcTJnYVhjMmtWNWQrVDViM0xsWXhzbVJ6a3FDZWluDQp0MXFmVy9BVmhxV3FY Ti9iNmpxMmx6WFJEWEMyTndGU1p3b1VPeXNyQU50QUdSaklBem5BcWovd3JXSC9BS0dqeE4vNEVR Ly9BQnFyDQpzU2NWSjhNZFpsdUxuVXhkNlhGZUxyMm42eGIyVXQ3TmRiaGJSN0dTUzlrVHpqdTNF Z0ZHQ2JjQWZPU0pkWStGMTlxbnd3OFdhTk5jDQphT2RjMXpXNU5haTN1elEyYlBLaDJySnMzRStX ckRjRVg3NUdNY25zUCtGYXcvOEFRMGVKdi9BaUgvNDFSL3dyV0gvb2FQRTMvZ1JEDQovd0RHcUxB TytLdmhZK0tQaGhxUGhmUUhzTE9TVklJN2RaQ1k0WWxqbGpiYmhWT0FGVEFBSHBYbk50OEd0UzB2 V05TdTlOMVd3bnRvDQp0YjAzVmRMZ3VaNVFmSnRmTlVXMGprT1VDcEtxS3czNUVZeUJuajBUL2hX c1AvUTBlSnYvQUFJaC93RGpWSC9DdFlmK2hvOFRmK0JFDQpQL3hxaXdIbTNpSDRIWEhpS3hnZlV0 VHRJcnk0OFNYV3JYa1Z2T2ZMaXRia3A1a2NibVBMeUFSUmxXS291U3dJNEJyc3ZnaDhOb3ZoDQp0 L3drbTYrVzQvdEM4SDJmRXUvYmF4N3ZLMy9Jdjd6NTMzWXl2VEhldGY4QTRWckQvd0JEUjRtLzhD SWYvalZIL0N0WWYraG84VGYrDQpCRVAvQU1hb3NBMzR4M0VQL0NJeUw1cWJqTENBTTlmM3FWMzlj TGFmRFBURTFDMHV0UTFQV2RVRnJJSm9vTHk0VXhiMUlLc1ZSRjNZDQpJQkFPUmtEaml1NnBBZi9a DQoNCi0tLS0tLT1fTmV4dFBhcnRfMDAwXzA1MTlfMDFDN0U3RTUuNDk5RUY2MzANCkNvbnRlbnQt VHlwZTogaW1hZ2UvanBlZzsNCgluYW1lPSJpbWFnZTAwNS5qcGciDQpDb250ZW50LVRyYW5zZmVy LUVuY29kaW5nOiBiYXNlNjQNCkNvbnRlbnQtSUQ6IDxpbWFnZTAwNS5qcGdAMDFDN0U3RTUuNDk4 MjQ2NzA+DQoNCgSCCMUvOWovNEFBUVNrWkpSZ0FCQVFFQVlBQmdBQUQvMndCREFBWUVCUVlGQkFZ R0JRWUhCd1lJQ2hBS0Nna0pDaFFPRHd3UUZ4UVlHQmNVDQpGaFlhSFNVZkdoc2pIQllXSUN3Z0l5 WW5LU29wR1I4dE1DMG9NQ1VvS1NqL3dBQUxDQUFEQWlJQkFSRUEvOFFBSHdBQUFRVUJBUUVCDQpB UUVBQUFBQUFBQUFBQUVDQXdRRkJnY0lDUW9MLzhRQXRSQUFBZ0VEQXdJRUF3VUZCQVFBQUFGOUFR SURBQVFSQlJJaE1VRUdFMUZoDQpCeUp4RkRLQmthRUlJMEt4d1JWUzBmQWtNMkp5Z2drS0ZoY1lH Um9sSmljb0tTbzBOVFkzT0RrNlEwUkZSa2RJU1VwVFZGVldWMWhaDQpXbU5rWldabmFHbHFjM1Ix ZG5kNGVYcURoSVdHaDRpSmlwS1RsSldXbDVpWm1xS2pwS1dtcDZpcHFyS3p0TFcydDdpNXVzTER4 TVhHDQp4OGpKeXRMVDFOWFcxOWpaMnVIaTQrVGw1dWZvNmVyeDh2UDA5ZmIzK1BuNi85b0FDQUVC QUFBL0FQb1c5OEdhWmUzazF6TmRhK3NrDQpyRjJFT3ZYMFNBbis2aVRCVkhzQUJVUC9BQWdla2Y4 QVA1NGsvd0RDajFIL0FPUDBmOElIcEgvUDU0ay84S1BVZi9qOUgvQ0I2Ui96DQorZUpQL0NqMUgv NC9SL3dnZWtmOC9uaVQvd0FLUFVmL0FJL1Ivd0FJSHBIL0FEK2VKUDhBd285Ui93RGo5SC9DQjZS L3orZUpQL0NqDQoxSC80L1Ivd2dla2Y4L25pVC93bzlSLytQMGY4SUhwSC9QNTRrLzhBQ2oxSC93 Q1AwZjhBQ0I2Ui93QS9uaVQvQU1LUFVmOEE0L1IvDQp3Z2VrZjgvbmlUL3dvOVIvK1AwZjhJSHBI L1A1NGsvOEtQVWYvajlIL0NCNlIveitlSlAvQUFvOVIvOEFqOUgvQUFnZWtmOEFQNTRrDQovd0RD ajFIL0FPUDBmOElIcEgvUDU0ay84S1BVZi9qOUgvQ0I2Ui96K2VKUC9DajFILzQvUi93Z2VrZjgv bmlUL3dBS1BVZi9BSS9SDQovd0FJSHBIL0FEK2VKUDhBd285Ui93RGo5SC9DQjZSL3orZUpQL0Nq MUgvNC9SL3dnZWtmOC9uaVQvd285Ui8rUDBmOElIcEgvUDU0DQprLzhBQ2oxSC93Q1AwZjhBQ0I2 Ui93QS9uaVQvQU1LUFVmOEE0L1Ivd2dla2Y4L25pVC93bzlSLytQMGY4SUhwSC9QNTRrLzhLUFVm DQovajlIL0NCNlIveitlSlAvQUFvOVIvOEFqOUgvQUFnZWtmOEFQNTRrL3dEQ2oxSC9BT1AwZjhJ SHBIL1A1NGsvOEtQVWYvajlIL0NCDQo2Ui96K2VKUC9DajFILzQvUi93Z2VrZjgvbmlUL3dBS1BV Zi9BSS9SL3dBSUhwSC9BRCtlSlA4QXdvOVIvd0RqOUgvQ0I2Ui96K2VKDQpQL0NqMUgvNC9SL3dn ZWtmOC9uaVQvd285Ui8rUDBmOElIcEgvUDU0ay84QUNqMUgvd0NQMGY4QUNCNlIvd0EvbmlUL0FN S1BVZjhBDQo0L1Ivd2dla2Y4L25pVC93bzlSLytQMGY4SUhwSC9QNTRrLzhLUFVmL2o5SC9DQjZS L3orZUpQL0FBbzlSLzhBajlIL0FBZ2VrZjhBDQpQNTRrL3dEQ2oxSC9BT1AwZjhJSHBIL1A1NGsv OEtQVWYvajlIL0NCNlIveitlSlAvQ2oxSC80L1Ivd2dla2Y4L25pVC93QUtQVWYvDQpBSS9SL3dB SUhwSC9BRCtlSlA4QXdvOVIvd0RqOUgvQ0I2Ui96K2VKUC9DajFILzQvUi93Z2VrZjgvbmlUL3dv OVIvK1AwZjhJSHBIDQovUDU0ay84QUNqMUgvd0NQMGY4QUNCNlIvd0EvbmlUL0FNS1BVZjhBNC9S L3dnZWtmOC9uaVQvd285Ui8rUDBmOElIcEgvUDU0ay84DQpLUFVmL2o5SC9DQjZSL3orZUpQL0FB bzlSLzhBajlIL0FBZ2VrZjhBUDU0ay93RENqMUgvQU9QMGY4SUhwSC9QNTRrLzhLUFVmL2o5DQpI L0NCNlIveitlSlAvQ2oxSC80L1Ivd2dla2Y4L25pVC93QUtQVWYvQUkvUi93QUlIcEgvQUQrZUpQ OEF3bzlSL3dEajlIL0NCNlIvDQp6K2VKUC9DajFILzQvUi93Z2VrZjgvbmlUL3dvOVIvK1AwZjhJ SHBIL1A1NGsvOEFDajFIL3dDUDBmOEFDQjZSL3dBL25pVC9BTUtQDQpVZjhBNC9SL3dnZWtmOC9u aVQvd285Ui8rUDBmOElIcEgvUDU0ay84S1BVZi9qOUgvQ0I2Ui96K2VKUC9BQW85Ui84QWo5SC9B QWdlDQprZjhBUDU0ay93RENqMUgvQU9QMGY4SUhwSC9QNTRrLzhLUFVmL2o5SC9DQjZSL3orZUpQ L0NqMUgvNC9SL3dnZWtmOC9uaVQvd0FLDQpQVWYvQUkvUi93QUlIcEgvQUQrZUpQOEF3bzlSL3dE ajlIL0NCNlIveitlSlAvQ2oxSC80L1Ivd2dla2Y4L25pVC93bzlSLytQMTAxDQp2Q3R2YnhReGx5 a2FoRk1qczdFQVk1WmlTVDdra252WC85az0NCg0KLS0tLS0tPV9OZXh0UGFydF8wMDBfMDUxOV8w MUM3RTdFNS40OTlFRjYzMA0KQ29udGVudC1UeXBlOiBpbWFnZS9qcGVnOw0KCW5hbWU9ImltYWdl MDA2LmpwZyINCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJhc2U2NA0KQ29udGVudC1JRDog PGltYWdlMDA2LmpwZ0AwMUM3RTdFNS40OTgyNDY3MD4NCg0KBIIVki85ai80QUFRU2taSlJnQUJB UUVBWUFCZ0FBRC8yd0JEQUFZRUJRWUZCQVlHQlFZSEJ3WUlDaEFLQ2drSkNoUU9Ed3dRRnhRWUdC Y1UNCkZoWWFIU1VmR2hzakhCWVdJQ3dnSXlZbktTb3BHUjh0TUMwb01DVW9LU2ovMndCREFRY0hC d29JQ2hNS0NoTW9HaFlhS0Nnb0tDZ28NCktDZ29LQ2dvS0Nnb0tDZ29LQ2dvS0Nnb0tDZ29LQ2dv S0Nnb0tDZ29LQ2dvS0Nnb0tDZ29LQ2dvS0NqL3dBQVJDQUE5QUpnREFTSUENCkFoRUJBeEVCLzhR QUh3QUFBUVVCQVFFQkFRRUFBQUFBQUFBQUFBRUNBd1FGQmdjSUNRb0wvOFFBdFJBQUFnRURBd0lF QXdVRkJBUUENCkFBRjlBUUlEQUFRUkJSSWhNVUVHRTFGaEJ5SnhGREtCa2FFSUkwS3h3UlZTMGZB a00ySnlnZ2tLRmhjWUdSb2xKaWNvS1NvME5UWTMNCk9EazZRMFJGUmtkSVNVcFRWRlZXVjFoWldt TmtaV1puYUdscWMzUjFkbmQ0ZVhxRGhJV0doNGlKaXBLVGxKV1dsNWlabXFLanBLV20NCnA2aXBx ckt6dExXMnQ3aTV1c0xEeE1YR3g4akp5dExUMU5YVzE5aloydUhpNCtUbDV1Zm82ZXJ4OHZQMDlm YjMrUG42LzhRQUh3RUENCkF3RUJBUUVCQVFFQkFRQUFBQUFBQUFFQ0F3UUZCZ2NJQ1FvTC84UUF0 UkVBQWdFQ0JBUURCQWNGQkFRQUFRSjNBQUVDQXhFRUJTRXgNCkJoSkJVUWRoY1JNaU1vRUlGRUtS b2JIQkNTTXpVdkFWWW5MUkNoWWtOT0VsOFJjWUdSb21KeWdwS2pVMk56ZzVPa05FUlVaSFNFbEsN ClUxUlZWbGRZV1ZwalpHVm1aMmhwYW5OMGRYWjNlSGw2Z29PRWhZYUhpSW1La3BPVWxaYVhtSm1h b3FPa3BhYW5xS21xc3JPMHRiYTMNCnVMbTZ3c1BFeGNiSHlNbkswdFBVMWRiWDJObmE0dVBrNWVi bjZPbnE4dlAwOWZiMytQbjYvOW9BREFNQkFBSVJBeEVBUHdEeVhXZFINClBpbU4vRWZpbDV0UzFi VW5sYTNnYWFVeDIwZm10OGlBdGxVQkxiVnljWit0ZWplRXZoSjRlZlRZcHRhc1ROUElBMjBUU29G QjdjTlgNCkcvRHpSVGYybmhYelVHMldTUmd4R2Nxc3JjZm5tdnBHN3QyZ3ROMExLbTNHQ1YzQWZo WGlZbXZVNW5HTW10V2V6U3BRVUUybHFrY0sNCm53ZzhFLzhBUUNKLzdlNS8vaTZodXZoRjRMQ2Z1 OUZLdC8xOVQvMWVwZGErSXNPbVN0REZxTmxkeng1OHlFcXlrRDZnRUQ4YW4wVHgNCi9hNjFBQzFz OFQ1eHdkeW44UldYUFdTdnpQN3kxVHB0MnNqa3J2NFkrRzRkd1RSUTVQQy82VE5nZS8zK2FvU2ZE Ync3REV6U2Fma2cNClovMTh2L3hWZXJ5VHBJb2tiQVhIR2E1eld0WjBxQ052dEYzQkY2Qm13YUZX cXY3VCs4djJOTmZaWDNIbWJlRGZEbG5hejNkNXAyNksNCktOMkNHZVFGMnh3T0d6Z2RTYTd6Uy9o ZjRLdk5JMDY2YlJVMzNGcEJNMnk3bXh1YU5TZitXaDdrOS93SFFjbjRwdkxhNjBLOCt3WEMNClRU U3FJMENuSitZZ2RQeHIyUFJJbWcwRFNJWHp2aXNMYU1nbk9DSVVHT3A5UC9yRG9DcldxS25mbWQ3 OTJlUG1pVk5MazA5RGtmOEENCmhVM2dyL29DL3dEazFQOEEvRjBmOEttOEZmOEFRRi84bXAvL0FJ dXVxTnpjUzZ1OXJBWWxpaGpTU1V1cExOdUxBQmNFWSs3MU9hcFENCjZuZFRXT2lUanlGYTlkVmxC UW5BS014Mi9OeDkzSE9ldGMvdHEzODcrOW5qKzBsM01ML2hVM2dyL29DLytUVS8vd0FYUi93cWJ3 Vi8NCjBCZi9BQ2FuL3dEaTYyWk5adUlkRWkxU1lRbUdWNGlxSWpGbFJtQVBmazRQSFRudFZxYlVi aUx3M0xxSldBekNGcGxWVHVUSFVESVANClBHTWtVL2ExL3dDZDl0Mkh0SmR6blA4QWhVM2dyL29D L3dEazFQOEEvRjBmOEttOEZmOEFRRi84bXAvL0FJdXRXVFhiaDVOc0FXTlQNCmVOYmhudFpIWUtJ ZytTZ0liT2YwNXFCdkVWMnJhbUFzRG0yU2QxSGxNdTNZKzFja241czg5TVl4VDU2Lzh6KzlpOXBM dVVmK0ZUZUMNCnYrZ0wvd0NUVS84QThYUi93cWJ3Vi8wQmYvSnFmLzR1dWx1cjZlMjhQM0Y3bEpK bzQyY2JvSGlCSXpqS01kdy9PcVZ6ckYzQkhLdzgNCnB4YjI0dVpTMER4RjFMTU5vVmpsVGhUeWM5 dldrcXRkN1RmM3NmdEpkekgvQU9GVGVDditnTC81TlQvL0FCZEgvQ3B2QlgvUUYvOEENCkpxZi9B T0xyYjBqV0xpODFpNXRKQkdVak12M1kyVW9GazJyeVRoczg5T21LM3FVcTFhTHM1djcySHRKZHp6 alY5TWgrRlZzbmlyd2INCkplV0tXVnhBOTlwOGQyNWh2NHQ0UXh1SDNET0hiRFlPM2NTQm5CQlY3 NDMvQVBKTDlhLzdZZjhBbytPaXZaeTZwS3BTYms3Ni93Q1INCjEwRzVSMU9SK0ZQaVBRazhLK0d0 TW11d21zUlhEN1Z5ZThya0xqSGZjRCtOZlF0c1ZraDJTQUhJNXpYelYremg4T1c4Ulg3K0k5U1YN CmwwelRtSmdBNE0wNEdjL1JlUHgvR3ZvZUc1RWNnRDhEc2E1Y1pUakNkMTFQYXcxUjFJY3I2SFBl S3ZDVmhlN2pGWVJSeVozRjRpRUoNClBxZlh0K1ZaMmxlRU1hZ2wxTEdJbFJRZzJZQU9PbWZXdXUx UFdiTzJBYVoxQjdEdlZuVHJwYnl5V2VOSFZEMEREQi9LdWJtYlZyNkgNClVseTYyMU9NK0pLdmEy Y01HbjRTZVVmS1NPQWNWNU1mREdyR1EzQnU3Y3lqNWtNaUE3VDJHMGptdlcvaVBPcTM5b3JNRTJm TVdQYW8NCm9GZ2EwODdlaE9NakdLY0p1R3hYczFOSzV6SGhEUUxpL3dCUjA1dFRTMzg2M2tFOGdq VGdoYy8xeHhYcU9vbmRkRTV6OHFEcm4rRWUNCjUvejJIUVkvZysxS3BQZlNESG5IWkdQOWtkL3py WXZ6dXVjNXo4aURPYy93ajNQOC93QUIwQmlGKzZUZmM4TE5KSnlzdWhuUzJVRXQNCjNIY3NoRTZE YUdWeXVSbk9EZzhqUFk1cXBiNkZZVzRoRVVjcXJDNGtqSDJpUWhXQXdPQzNvU01kT1RYVFdkaEZO b21vWGpzNGx0eWcNClFBakIzTmc1NHFYdzdZV2QrYnBiczNBYUdJekR5aW9CQTZqa0hua1Z6UnB6 YlVVOS93RGdubEtEYlJ6VWVsMmthYkZqYlo1aXloVEkNCnhDc3JiaGdaNEdlY0RpbmYyZGFDeGtz aENCYXliZzBZSkF3eHlRUFRyMnJvWmRPZ09nRFVJSGtMaWN4T3JFWUE1SS9IcFdrdWcyYWENCmkx dFBKY2Z1ckw3UktGWmNodU1nY2ZYOUtwVWFrdncvRWFwdG5FemFWYVRNV1pIVnpLWnR5U3VoM2xk dWNnZ2o1UmlrazBld2tSa2UNCkRJWVNCdm5iSkRuTDg1enllYTJiODJaa1g3QXR3RXg4M25GU2Mr MkJWbExDSStIWHZ5eitjdHg1T01qYmphRDZkYWhLVGJTZXd1VXcNCjJzWUhzWHRKQkpKQTRLc0pK V1lrSHI4eE9mMXBMdlQ3VzdsV1M0aTNzb3g5NGpJem5CQVBJenpnMTA4bWtXNjN1andoNWR0NUZH OGgNCnlNZ3QxeHhVR3FXK213M0wyMW9MenpvNWpHelNzcFhBSkJ4Z1pxblNuRk50amNHdHpuNGRQ dFlabGxqaTJ5Qm5ZTnVQVnpsdnpQT0sNCnRWbzYvWlI2ZHE4OXJBenRISHR3WElKNVVIdDlhMmI3 UWRQVzR2YlMxbHVoZFc4UG41a0tsR0F3Y2NBSHZRcUU1T1M2clQ4LzhnVUgNCnFqeHo0My84a3Yx ci90aC82UGpvbytOLy9KTDlhLzdZZitqNDZLOWZLLzRUOWYwUjFZYjRUdHYyYVZIL0FBcGJRT0J5 YmpQdi9wRWwNClMzY3R2Y3ZONUozUkNSMVUvUTRxait6dGR4VzN3bHN0Tm1rV0hVdFBtdWJlNnRw RHNsZ2s4OXp0ZFR5cHdSd1JXTm9GOGtldTYxcE0NCnNxbVdDN2QwUHFySFA5YWVZSzhVZXJnZmla WWVDV3p2NEo3bXpXZTNkdHBsUnZtako2Y0h0K05hRi80bXR0T2tSSkhsdGVRREhjeE0NCmdiM0Rk UDFyVU1TM0Z2Skd5aGdSdFphNVhVWmZFRmhLMGR0dm50eGtxc2dCQVBicURYbVJ0MVBXaW96My9y OHpBOFllSzdiVTlSdDQNCjRiZWFVdUdDQlkvOVo2bko0eDA1cUNLSyt0dEt2SGdpTXNkdEMxdzBl N0cxUU03ZDNicFY3UTlBdmJ6VTVDZm12SmVydWVJa3J2dFgNCjB5MTBQd0xyU3haYkZuSzBrbVBt YzdEL0FKQXJyb1VQYU8vUTVzVmlJMGZkaHVZWGdUeHJvdmluVFl2N0xsV0taRUN2YXR3MFp4MDkN Ci9yWFIzNTNYT2M1K1JCbk9mNFI3bitmNERvUGgzVGJtL3dCTnZJN3V3ZWVDZU01VjB5Q1A4NC9T dnMvUjdtYTkwUFNibTZjdmNUV04NCnU4akU1Sll4S1QzUGZ0MjlCMER6S255UVZ1NTg5aXBYaWpy L0FBOWFUWDNoN1ZyZTJVTks3UmJRVGpvMmY2VlA0YzBtOHRiM1VvcG8NCnZuK3lNbkRBL00yQ0Ir aHJrNks0STE0cmxianF2UDE4dk01Vk5LMm14MVBoQlB0SzN1bVQ5MlNYQjdiWEc3K2xXTkd1V3Zm RTJyelINCnFzaGFDUVJxM0lZQXFGSDZDdU9vcHd4UEtvcTIzOWZxTlZMV1hZMHRjaHVvcmxHdmJT SzFabDRTSlFxa0R2Z1ZxYWRjbTA4SHl5Q0cNCkNiL1RNYlprM3I5d2RxNW1pczQxdVdUa3VwS2xa M1IyTjQvbTYzNGNrMnF1K0dKdHFEQUdUMEE3Q3F2aVNDOSsyTkxOWXdRMjR1VHQNCm1SQUdmSjR5 UWNuUFd1WW9yU1dKNWswMXY1LzhBcDFMcG5WK0w5SHZIMUc4MUJZMSt5NFU3dHd6d29IVDYwN3ho cWswR28zZHBCSEQNCkdKRVZYa0NmT3dJNkUrbGNsUlJQRTM1dVJXNW5mZjE4dk1IVTN0MU9HK04v L0pMOWEvN1lmK2o0NktaOFkzVzk4Sm5RTFYwazFmVjcNCm0zdGJLMjNxclN5R1pDQnlRQU9PcHdC a1pQTkZlcmxhYW92MS93QWpwdy93bnMzaVg0TytBZkV1cXlhbHEvaHUyZTlreVpKSUpaTGYNCnpH TEZpekNObERNU3h5eEJKN25nVmxmOE0vZkRML29XZi9KKzYvOEFqbGVwMFY2SnNlV2Y4TS9mREwv b1dmOEF5ZnV2L2psSC9EUDMNCnd5LzZGbi95ZnV2L0FJNVhxZEZBSGxuL0FBejk4TXYraFovOG43 ci9BT09VZjhNL2ZETC9BS0ZuL3dBbjdyLzQ1WHFkRkFIbG4vRFANCjN3eS82Rm4vQU1uN3IvNDVS L3d6OThNditoWi84bjdyL3dDT1Y2blJRQjRaNGwrRC93QU10R3ZiSzMvNFJuVDArMHh5eWViZmE1 ZFcNCnlEWVVHMEhjMlNkK2NjY0thbS80Vkg4SUVnOHk2OE95MnBXMyswU0pOZFhnTVg3dnpERzJK Q1BNQ2ZNWThsc0RPTWMxN0pKWlJ5YW4NCmIzeFovTmhoa2hVQWphVmRrSno3L3UxeDlUVktmUUxL ZlVaTHFjUEpISXhrZTJmYVlta01mbEZ5Q01rbVA1TnVkdU9kdWVhQVBMN2oNCjRPZkNDQ1NTTTZG NWtzZTNNY041ZVNzU1dkY0txdVN4QmlreUJrall4T0FLalB3ZytEeEV4ajBGNWhFeUptRzV2WlBN WjAzcUk5cm4NCnpEc080N000SEp3SzlFazhGNlpMcDdXc3pTek1aRWxFMHl4eXVHVk51U0dVcTJk MGpIY3ArZVYyNEp5SnI3d2xwbDVhVFc3UjdJbnUNCkV1VVVSeHNzTExFc1FDb3lsTWJGeGhnY1pK R0NCZ0E4eWwrRUh3bU9wNmRaV25odjdVYnVUYVpZcjY3TWFEeVhsQjNoeXBKQ3I4dVENCmNNRzZk V1dId2srRWx4NXkzSGhwN2FXTzZlMkNQZVhtSEluOGxTaDNnTUN4VE8zSVV1QVNLOVhUdzdhUmFu YjNkdEpMQkZCSUpsdFkNCmdnaE1naE1JYkczY01SNFhBSVhnY1p6bm4vR0ZqYWVIUEQycGF2SWJ1 OU1NaGxnaWFWSS9JYVc1U1FsQ0U1L2VCRytjUDl3RG9Ua0ENCjQ2VDROL0NoQnB0d2ZEaURUYjZG NVV1MzFHNlJRUWdrVUVHVElCUVNOazRBMllQSkZNSHdnK0V5ZWU5MTRiOG1GYmlTR0tRWDEyKzkN Clk4TEpJd0Q1UkZmY3BadmxHQWM0WVY2cEY0ZnR6NGQwN1NidHZPU3pqaFFTYkFOK3dCVHdjNERM dVZoM1YySGVvTG53bHBsMWJhYkQNCmN4K2Y5aHp0ZWFPT1V5N2lDKzhPcEJMbFFXWUFObk9DTW5J QjVGZGZDLzRWUTZiZVRqd29pWE52ZE5iK1hjNmxlUXhzb3VmSU1na0wNCllLaklaaW9iYmtBODFw MlB3WitGVXIydHZjK0hyZGIyNFZYUkxmVTd5YU5sY1NNaFdUY29JS3d1ZWc2ZTR6NlBKNFR0cFBP emZYd1kNCnpOTkN3TWViWm1uV2R0bnlZSU1pS2ZuM2NEQXhrNXV3NktGdjdhOW4xQyt1TG1CZGdh UmtBWmZueUNGVURCM3FUZ0RKaWpKNVhrQXcNCmZCM3d0OEYrRHI5cjN3OW9GdGJYcCs3Y1NPODhr ZkRENUdrWmltUXpBN2NaQjV6Z1VWMmxGQUgvMlE9PQ0KBDENCi0tLS0tLT1fTmV4dFBhcnRfMDAw XzA1MTlfMDFDN0U3RTUuNDk5RUY2MzAtLQ0KAAAAAAAAoIII3jCCAmYwggHPoAMCAQICEAkWPAGa wz7HgCoXXWt994UwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFRoYXd0 ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFp bCBJc3N1aW5nIENBMB4XDTA3MDgwNDEyMjEyM1oXDTA4MDgwMzEyMjEyM1owSjEfMB0GA1UEAxMW VGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEnMCUGCSqGSIb3DQEJARYYZmJub3JmbGVldEBiZWxsc291 dGgubmV0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCp2YKRwMQNUb9uMmTU7WFbA8gC4U0K 9G4LXGWd00w65vllbf5JAGaTCv55sqoSj7Tx8MZt5Ly3ERGjMyXhFcykFapb6Sf7B8BZhGsuv4hw tfOeUvGRFmlQYbThC62WjwoRTkJ+deRlGNajiWvHdKi6u1+JsoHUDQFwm8uAHgMsZQIDAQABozUw MzAjBgNVHREEHDAagRhmYm5vcmZsZWV0QGJlbGxzb3V0aC5uZXQwDAYDVR0TAQH/BAIwADANBgkq hkiG9w0BAQUFAAOBgQA3NZetKUdhMecBGyYfpJ3FwHq/OEEA+TYaTEGyArh3KUYCnZWCZo5HLSbf llHqhKlKedLSULaoDVqtkk1YY0nVckM0LrDi8GYuB9/DKE0283YoW1Zn9f/UgDlNgnDmize8MbgX CvEp9Xub2xSOjgQ/dLO627kCElJ3DUvmYyf6zDCCAy0wggKWoAMCAQICAQAwDQYJKoZIhvcNAQEE BQAwgdExCzAJBgNVBAYTAlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUg VG93bjEaMBgGA1UEChMRVGhhd3RlIENvbnN1bHRpbmcxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24g U2VydmljZXMgRGl2aXNpb24xJDAiBgNVBAMTG1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBDQTEr MCkGCSqGSIb3DQEJARYccGVyc29uYWwtZnJlZW1haWxAdGhhd3RlLmNvbTAeFw05NjAxMDEwMDAw MDBaFw0yMDEyMzEyMzU5NTlaMIHRMQswCQYDVQQGEwJaQTEVMBMGA1UECBMMV2VzdGVybiBDYXBl MRIwEAYDVQQHEwlDYXBlIFRvd24xGjAYBgNVBAoTEVRoYXd0ZSBDb25zdWx0aW5nMSgwJgYDVQQL Ex9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9uMSQwIgYDVQQDExtUaGF3dGUgUGVyc29u YWwgRnJlZW1haWwgQ0ExKzApBgkqhkiG9w0BCQEWHHBlcnNvbmFsLWZyZWVtYWlsQHRoYXd0ZS5j b20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANRp19SwlGRbcelH2AxRtupykbCEXn0tDY97 Et+FJXUodDpCLGMnn5V7S+9+GYcdhuqj3bnOlmQawhRuRKx85o/oTQ9xH0A4pgCjh3j2+ZSGXq3q wF5269kUo11uenwMpUtVfwYZKX+emibVars4JAhqmMex2qOYkf152+VaxBy5AgMBAAGjEzARMA8G A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAx+ySfk749ZalZ2IqpPBNEWDQb41gWGGs JrtSNVwIzzD7qEqWih9iQiOMFw/0umScF6xHKd+dmF7SbGBxXKKs3Hnj524ARx+1DSjoAp3kmv0T 9KbZfLH43F8jJgmRgHPQFBveQ6mDJfLmnC8Vyv6mq4oHdYsM3VGEa+T40c53ooEwggM/MIICqKAD AgECAgENMA0GCSqGSIb3DQEBBQUAMIHRMQswCQYDVQQGEwJaQTEVMBMGA1UECBMMV2VzdGVybiBD YXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xGjAYBgNVBAoTEVRoYXd0ZSBDb25zdWx0aW5nMSgwJgYD VQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9uMSQwIgYDVQQDExtUaGF3dGUgUGVy c29uYWwgRnJlZW1haWwgQ0ExKzApBgkqhkiG9w0BCQEWHHBlcnNvbmFsLWZyZWVtYWlsQHRoYXd0 ZS5jb20wHhcNMDMwNzE3MDAwMDAwWhcNMTMwNzE2MjM1OTU5WjBiMQswCQYDVQQGEwJaQTElMCMG A1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNv bmFsIEZyZWVtYWlsIElzc3VpbmcgQ0EwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMSmPFVz VftOucqZWh5owHUEcJ3f6f+jHuy9zfVb8hp2vX8MOmHyv1HOAdTlUAow1wJjWiyJFXCO3cnwK4Va qj9xVsuvPAsH5/EfkTYkKhPPK9Xzgnc9A74r/rsYPge/QIACZNenprufZdHFKlSFD0gEf6e20Txh BEAeZBlyYLf7AgMBAAGjgZQwgZEwEgYDVR0TAQH/BAgwBgEB/wIBADBDBgNVHR8EPDA6MDigNqA0 hjJodHRwOi8vY3JsLnRoYXd0ZS5jb20vVGhhd3RlUGVyc29uYWxGcmVlbWFpbENBLmNybDALBgNV HQ8EBAMCAQYwKQYDVR0RBCIwIKQeMBwxGjAYBgNVBAMTEVByaXZhdGVMYWJlbDItMTM4MA0GCSqG SIb3DQEBBQUAA4GBAEiM0VCD6gsuzA2jZqxnD3+vrL7CF6FDlpSdf0whuPg2H6otnzYvwPQcUCCT cDz9reFhYsPZOhl+hLGZGwDFGguCdJ4lUJRix9sncVcljd2pnDmOjCBPZV+V2vf3h9bGCE6u9uo0 5RAaWzVNd+NWIXiC3CEZNd4ksdMdRv9dX2VPMYIC+DCCAvQCAQEwdjBiMQswCQYDVQQGEwJaQTEl MCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBl cnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECEAkWPAGawz7HgCoXXWt994UwCQYFKw4DAhoFAKCC AdgwGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMDcwODI2MTgzMDM3 WjAjBgkqhkiG9w0BCQQxFgQUGPThz30c1G8su+FqcGB7aLCy8gwwZwYJKoZIhvcNAQkPMVowWDAK BggqhkiG9w0DBzAOBggqhkiG9w0DAgICAIAwDQYIKoZIhvcNAwICAUAwBwYFKw4DAgcwDQYIKoZI hvcNAwICASgwBwYFKw4DAhowCgYIKoZIhvcNAgUwgYUGCSsGAQQBgjcQBDF4MHYwYjELMAkGA1UE BhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1Ro YXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBAhAJFjwBmsM+x4AqF11rffeFMIGHBgsq hkiG9w0BCRACCzF4oHYwYjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5n IChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENB AhAJFjwBmsM+x4AqF11rffeFMA0GCSqGSIb3DQEBAQUABIGAeCMeLK//5XLo4O7nmKx/OTFRnK4b yEmi7CkHl6UFlaAhRzRZ//QhXj/T4PyciMqy7KFIHlZiAyoFrQp3xRgFhpI6Nxy0S7ZSd1qq/GuV 77NX/8OxvKpcj++CXeS/VlEwoKCo2bCYNYTCaZcyiRr6wVWxtoutpYmViK75T75BqWgAAAAAAAA= From owner-xfs@oss.sgi.com Sun Aug 26 23:46:49 2007 Received: with ECARTIS (v1.0.0; list xfs); Sun, 26 Aug 2007 23:46:52 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=AWL,BAYES_05 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7R6kj4p024714 for ; Sun, 26 Aug 2007 23:46:48 -0700 Received: from [134.14.55.13] (dhcp13.melbourne.sgi.com [134.14.55.13]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id QAA05178; Mon, 27 Aug 2007 16:22:38 +1000 Message-ID: <46D26D96.7050209@sgi.com> Date: Mon, 27 Aug 2007 16:22:14 +1000 From: Mark Goodwin Reply-To: markgw@sgi.com Organization: SGI Engineering User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: David Chinner CC: Christoph Hellwig , Vlad Apostolov , linux-xfs@oss.sgi.com Subject: Re: TAKE 969192: Default mount option "noikeep" makes the inode generation number non-persistent References: <46CE581A.2000405@sgi.com> <20070824113631.GA26868@infradead.org> <20070824124933.GS61154114@sgi.com> In-Reply-To: <20070824124933.GS61154114@sgi.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 12680 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: markgw@sgi.com Precedence: bulk X-list: xfs David Chinner wrote: > On Fri, Aug 24, 2007 at 12:36:31PM +0100, Christoph Hellwig wrote: >> On Fri, Aug 24, 2007 at 02:01:30PM +1000, Vlad Apostolov wrote: >>> To avoid the problem with identical DMAPI handles, the XFSMNT_IDELETE mount >>> option should be set as default, only if the filesystem is not mounted with >>> XFSMNT_DMAPI. >> Note that we have the same problem with nfs exports aswell. Dateo maybe we >> need a real fix insteead and keep a block of generation numbers around even >> if and inode cluster is freed or something similar. > > Yes. NFS is less critical than dmapi, though - with NFS filehandles just a > change in generation number is usually good enough to catch most stale > filehandle issues. With DMAPI, there's applications that record inode > number/generation pairs and expect them never to repeat ever again. > > We haven't had any reports of probelms with NFS servers due to this, > but as soon as our HSm was exposed to this code we started getting > strange coherency and corruption problems that have taken some time > to track down to this issue. Hence this change seems like the > best tradeoff while we work out a real solution. > > At this point I suspect a deleted inode cluster btree in the AGI > is the best solution because it can share most of the btree > code with the current AGI btree and keeps the granularity of > shared generation numbers quite fine. Having a persistent highest/shared generation number per inode cluster only solves part of the problem - with only 32 bits of precision, eventually it will wrap. Generation numbers need more precision to solve this completely. With more precision, the starting value could simply be based on a timestamp ... -- Mark Goodwin markgw@sgi.com Engineering Manager for XFS and PCP Phone: +61-3-99631937 SGI Australian Software Group Cell: +61-4-18969583 ------------------------------------------------------------- From owner-xfs@oss.sgi.com Mon Aug 27 02:05:56 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 27 Aug 2007 02:05:59 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_43, J_CHICKENPOX_84 autolearn=no version=3.2.0-pre1-r499012 Received: from tyo200.gate.nec.co.jp (TYO200.gate.nec.co.jp [210.143.35.50]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7R95q4p020809 for ; Mon, 27 Aug 2007 02:05:56 -0700 Received: from tyo202.gate.nec.co.jp ([10.7.69.202]) by tyo200.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id l7R7m08v010427 for ; Mon, 27 Aug 2007 16:48:00 +0900 (JST) Received: from mailgate3.nec.co.jp (mailgate54.nec.co.jp [10.7.69.195]) by tyo202.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id l7R7gbP6020420 for ; Mon, 27 Aug 2007 16:42:38 +0900 (JST) Received: (from root@localhost) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) id l7R7gbH28089 for xfs@oss.sgi.com; Mon, 27 Aug 2007 16:42:37 +0900 (JST) Received: from kuichi.jp.nec.com (kuichi.jp.nec.com [10.26.220.17]) by mailsv3.nec.co.jp (8.11.7/3.7W-MAILSV4-NEC) with ESMTP id l7R7gbv27128 for ; Mon, 27 Aug 2007 16:42:37 +0900 (JST) Received: from TNESG9305.wm.jp.nec.com ([10.1.104.199] [10.1.104.199]) by mail.jp.nec.com with ESMTP; Mon, 27 Aug 2007 16:42:37 +0900 Message-Id: <200708270742.AA05908@TNESG9305.wm.jp.nec.com> Date: Mon, 27 Aug 2007 16:42:42 +0900 To: xfs@oss.sgi.com Subject: [PATCH] Fix handling of symbolic links in getfattr. From: Utako Kusaka MIME-Version: 1.0 X-Mailer: AL-Mail32 Version 1.13 Content-Type: text/plain; charset=us-ascii X-archive-position: 12681 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: utako@tnes.nec.co.jp Precedence: bulk X-list: xfs Hi, getfattr -R and -RL give the same result. This patch implements the similar handling of symbolic links in getfattr to getfacl and setfacl. Utako Signed-off-by: Utako Kusaka --- --- attr-2.4.38/getfattr/getfattr.c.orig 2007-07-31 15:27:27.000000000 +0900 +++ attr-2.4.38/getfattr/getfattr.c 2007-08-22 15:59:28.000000000 +0900 @@ -410,6 +410,38 @@ void help(void) " --help this help text\n")); } +char *resolve_symlinks(const char *file) +{ + static char buffer[4096]; + struct stat stat; + char *path = NULL; + + if (lstat(file, &stat) == -1) + return path; + + if (S_ISLNK(stat.st_mode) && !opt_walk_physical) + path = realpath(file, buffer); + else + path = (char *)file; /* not a symlink, use given path */ + + return path; +} + +int walk_tree(const char *file) +{ + const char *p; + + if ((p = resolve_symlinks(file)) == NULL) { + fprintf(stderr, "%s: %s: %s\n", progname, + xquote(file), strerror(errno)); + return 1; + } else if (nftw(p, do_print, 0, opt_walk_logical? 0 : FTW_PHYS) < 0) { + fprintf(stderr, "%s: %s: %s\n", progname, xquote(file), + strerror(errno)); + return 1; + } + return 0; +} int main(int argc, char *argv[]) { @@ -499,12 +531,7 @@ int main(int argc, char *argv[]) } while (optind < argc) { - if (nftw(argv[optind], do_print, 0, - opt_walk_physical * FTW_PHYS) < 0) { - fprintf(stderr, "%s: %s: %s\n", progname, argv[optind], - strerror_ea(errno)); - had_errors++; - } + had_errors += walk_tree(argv[optind]); optind++; } From owner-xfs@oss.sgi.com Mon Aug 27 16:54:34 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 27 Aug 2007 16:54:35 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: **** X-Spam-Status: No, score=4.1 required=5.0 tests=BAYES_99,RDNS_NONE autolearn=no version=3.2.0-pre1-r499012 Received: from lrgip ([189.30.110.152]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7RNsP4p028808 for ; Mon, 27 Aug 2007 16:54:30 -0700 Received: (qmail 19538 invoked from network); Mon, 27 Aug 2007 20:54:30 -0300 Received: from unknown (HELO ratw) (222.221.67.167) by lrgip with SMTP; Mon, 27 Aug 2007 20:54:30 -0300 Message-ID: <46D36436.3050406@fuse.net> Date: Mon, 27 Aug 2007 20:54:30 -0300 From: User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: xfs@oss.sgi.com Subject: Here is the news you have been waiting for. Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 12683 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: chiharu-ma@douane.finances.gouv.fr Precedence: bulk X-list: xfs ERMX News Hits. Plans To Expand Dividend Opportunities! EntreMetrix Inc. (ERMX) $0.089 UP 11.25% Gladiator Challenge has been acquired by ERMX. It is one of the biggest promoters of mixed martial arts. With increased dividend opportunities in mind, this will be a great asset expansion. Check out the release and set your buy for Tuesday morn. From owner-xfs@oss.sgi.com Mon Aug 27 18:03:10 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 27 Aug 2007 18:03:12 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_84 autolearn=no version=3.2.0-pre1-r499012 Received: from tyo200.gate.nec.co.jp (TYO200.gate.nec.co.jp [210.143.35.50]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7S1384p006212 for ; Mon, 27 Aug 2007 18:03:10 -0700 Received: from tyo201.gate.nec.co.jp ([10.7.69.201]) by tyo200.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id l7S130F1026138 for ; Tue, 28 Aug 2007 10:03:07 +0900 (JST) Received: from mailgate3.nec.co.jp (mailgate53.nec.co.jp [10.7.69.192]) by tyo201.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id l7S0vHme025573 for ; Tue, 28 Aug 2007 09:57:17 +0900 (JST) Received: (from root@localhost) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) id l7S0vHb12692 for xfs@oss.sgi.com; Tue, 28 Aug 2007 09:57:17 +0900 (JST) Received: from kaishu.jp.nec.com (kaishu.jp.nec.com [10.26.220.5]) by mailsv5.nec.co.jp (8.11.7/3.7W-MAILSV4-NEC) with ESMTP id l7S0vGa28453 for ; Tue, 28 Aug 2007 09:57:16 +0900 (JST) Received: from TNESG9305.wm.jp.nec.com ([10.1.104.199] [10.1.104.199]) by mail.jp.nec.com with ESMTP; Tue, 28 Aug 2007 09:57:16 +0900 Message-Id: <200708280057.AA05910@TNESG9305.wm.jp.nec.com> Date: Tue, 28 Aug 2007 09:57:14 +0900 To: xfs@oss.sgi.com Subject: [PATCH] Fix handling of symbolic links in setfacl/getfacl. From: Utako Kusaka MIME-Version: 1.0 X-Mailer: AL-Mail32 Version 1.13 Content-Type: text/plain; charset=us-ascii X-archive-position: 12684 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: utako@tnes.nec.co.jp Precedence: bulk X-list: xfs Hi, I resend this mail which got lost yesterday. setfacl and getfacl have 2 problems when a symbolic link is specified. 1) I got an error message when link is relative path and does not exist in current directory, because setfacl and getfacl handle the relative path returned by readlink() without the conversion to the absolute path. # pwd /home/utako/TestProgram/acl-2.2.44/getfacl # ls -l ~utako/mpnt/attr4 lrwxrwxrwx 1 utako users 5 Jul 31 11:52 /home/utako/mpnt/attr4 -> mpnt2 # getfacl ~utako/mpnt/attr4 getfacl: /home/utako/mpnt/attr4: No such file or directory 2) -P option does not work. I fixed so that resolve_symlinks() returns a symbolic link source's path only when opt_walk_physical = 0. I use realpath() to get the absolute path name because xfsprogs uses it. Utako Signed-off-by: Utako Kusaka --- diff -uprN acl-2.2.44.orig/getfacl/getfacl.c acl-2.2.44/getfacl/getfacl.c --- acl-2.2.44.orig/getfacl/getfacl.c 2007-01-23 14:56:39.000000000 +0900 +++ acl-2.2.44/getfacl/getfacl.c 2007-08-27 13:51:21.000000000 +0900 @@ -598,17 +598,17 @@ int __do_print(const char *file, const s char *resolve_symlinks(const char *file) { static char buffer[4096]; + struct stat stat; char *path = NULL; - ssize_t len; - len = readlink(file, buffer, sizeof(buffer)-1); - if (len < 0) { - if (errno == EINVAL) /* not a symlink, use given path */ - path = (char *)file; - } else { - buffer[len+1] = '\0'; - path = buffer; - } + if (lstat(file, &stat) == -1) + return path; + + if (S_ISLNK(stat.st_mode) && !opt_walk_physical) + path = realpath(file, buffer); + else + path = (char *)file; /* not a symlink, use given path */ + return path; } diff -uprN acl-2.2.44.orig/setfacl/setfacl.c acl-2.2.44/setfacl/setfacl.c --- acl-2.2.44.orig/setfacl/setfacl.c 2007-01-23 14:56:40.000000000 +0900 +++ acl-2.2.44/setfacl/setfacl.c 2007-08-27 13:55:15.000000000 +0900 @@ -314,17 +314,17 @@ int __do_set(const char *file, const str char *resolve_symlinks(const char *file) { static char buffer[4096]; + struct stat stat; char *path = NULL; - ssize_t len; - len = readlink(file, buffer, sizeof(buffer)-1); - if (len < 0) { - if (errno == EINVAL) /* not a symlink, use given path */ - path = (char *)file; - } else { - buffer[len+1] = '\0'; - path = buffer; - } + if (lstat(file, &stat) == -1) + return path; + + if (S_ISLNK(stat.st_mode) && !opt_walk_physical) + path = realpath(file, buffer); + else + path = (char *)file; /* not a symlink, use given path */ + return path; } From owner-xfs@oss.sgi.com Mon Aug 27 18:29:27 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 27 Aug 2007 18:29:29 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7S1TP4p010119 for ; Mon, 27 Aug 2007 18:29:26 -0700 Received: from liberator.sandeen.net (liberator.sandeen.net [10.0.0.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id A6BA918DB200D for ; Mon, 27 Aug 2007 20:29:25 -0500 (CDT) Message-ID: <46D37A82.2080608@sandeen.net> Date: Mon, 27 Aug 2007 20:29:38 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: xfs-oss Subject: [PATCH] refactor xfs_mountfs for clarity & stack savings Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-archive-position: 12685 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs (note, please feel free to re-check the error handling in this change...) ------ Refactoring xfs_mountfs() to call sub-functions for logical chunks can help save a bit of stack, and can make it easier to read this long function. The mount path is one of the longest common callchains, easily getting to within a few bytes of the end of a 4k stack when over lvm, quotas are enabled, and quotacheck must be done. With this change on top of the other stack-related changes I've sent, I can get xfs to survive a normal xfsqa run on 4k stacks over lvm. Signed-off-by: Eric Sandeen m_sb); - xfs_inode_t *rip; - bhv_vnode_t *rvp = NULL; - int readio_log, writeio_log; - xfs_daddr_t d; - __uint64_t resblks; - __int64_t update_flags; - uint quotamount, quotaflags; - int agno; - int uuid_mounted = 0; - int error = 0; - if (mp->m_sb_bp == NULL) { - if ((error = xfs_readsb(mp, mfsi_flags))) { - return error; - } - } - xfs_mount_common(mp, sbp); - - /* - * Check if sb_agblocks is aligned at stripe boundary - * If sb_agblocks is NOT aligned turn off m_dalign since - * allocator alignment is within an ag, therefore ag has - * to be aligned at stripe boundary. - */ - update_flags = 0LL; if (mp->m_dalign && !(mfsi_flags & XFS_MFSI_SECOND)) { /* * If stripe unit and stripe width are not multiples @@ -787,8 +751,7 @@ xfs_mountfs( if (mp->m_flags & XFS_MOUNT_RETERR) { cmn_err(CE_WARN, "XFS: alignment check 1 failed"); - error = XFS_ERROR(EINVAL); - goto error1; + return XFS_ERROR(EINVAL); } mp->m_dalign = mp->m_swidth = 0; } else { @@ -798,8 +761,7 @@ xfs_mountfs( mp->m_dalign = XFS_BB_TO_FSBT(mp, mp->m_dalign); if (mp->m_dalign && (sbp->sb_agblocks % mp->m_dalign)) { if (mp->m_flags & XFS_MOUNT_RETERR) { - error = XFS_ERROR(EINVAL); - goto error1; + return XFS_ERROR(EINVAL); } xfs_fs_cmn_err(CE_WARN, mp, "stripe alignment turned off: sunit(%d)/swidth(%d) incompatible with agsize(%d)", @@ -816,8 +778,7 @@ xfs_mountfs( "stripe alignment turned off: sunit(%d) less than bsize(%d)", mp->m_dalign, mp->m_blockmask +1); - error = XFS_ERROR(EINVAL); - goto error1; + return XFS_ERROR(EINVAL); } mp->m_swidth = 0; } @@ -830,11 +791,11 @@ xfs_mountfs( if (XFS_SB_VERSION_HASDALIGN(sbp)) { if (sbp->sb_unit != mp->m_dalign) { sbp->sb_unit = mp->m_dalign; - update_flags |= XFS_SB_UNIT; + *update_flags |= XFS_SB_UNIT; } if (sbp->sb_width != mp->m_swidth) { sbp->sb_width = mp->m_swidth; - update_flags |= XFS_SB_WIDTH; + *update_flags |= XFS_SB_WIDTH; } } } else if ((mp->m_flags & XFS_MOUNT_NOALIGN) != XFS_MOUNT_NOALIGN && @@ -843,49 +804,45 @@ xfs_mountfs( mp->m_swidth = sbp->sb_width; } - xfs_alloc_compute_maxlevels(mp); - xfs_bmap_compute_maxlevels(mp, XFS_DATA_FORK); - xfs_bmap_compute_maxlevels(mp, XFS_ATTR_FORK); - xfs_ialloc_compute_maxlevels(mp); + return 0; +} - if (sbp->sb_imax_pct) { - __uint64_t icount; +/* + * Set the maximum inode count for this filesystem + */ +STATIC void +xfs_set_maxicount(xfs_mount_t *mp) +{ + xfs_sb_t *sbp = &(mp->m_sb); + __uint64_t icount; - /* Make sure the maximum inode count is a multiple of the - * units we allocate inodes in. + if (sbp->sb_imax_pct) { + /* + * Make sure the maximum inode count is a multiple + * of the units we allocate inodes in. */ - icount = sbp->sb_dblocks * sbp->sb_imax_pct; do_div(icount, 100); do_div(icount, mp->m_ialloc_blks); mp->m_maxicount = (icount * mp->m_ialloc_blks) << sbp->sb_inopblog; - } else + } else { mp->m_maxicount = 0; - - mp->m_maxioffset = xfs_max_file_offset(sbp->sb_blocklog); - - /* - * XFS uses the uuid from the superblock as the unique - * identifier for fsid. We can not use the uuid from the volume - * since a single partition filesystem is identical to a single - * partition volume/filesystem. - */ - if ((mfsi_flags & XFS_MFSI_SECOND) == 0 && - (mp->m_flags & XFS_MOUNT_NOUUID) == 0) { - if (xfs_uuid_mount(mp)) { - error = XFS_ERROR(EINVAL); - goto error1; - } - uuid_mounted=1; } +} + +/* + * Set the default minimum read and write sizes unless + * already specified in a mount option. + * We use smaller I/O sizes when the file system + * is being used for NFS service (wsync mount option). + */ +STATIC void +xfs_set_rw_sizes(xfs_mount_t *mp) +{ + xfs_sb_t *sbp = &(mp->m_sb); + int readio_log, writeio_log; - /* - * Set the default minimum read and write sizes unless - * already specified in a mount option. - * We use smaller I/O sizes when the file system - * is being used for NFS service (wsync mount option). - */ if (!(mp->m_flags & XFS_MOUNT_DFLT_IOSIZE)) { if (mp->m_flags & XFS_MOUNT_WSYNC) { readio_log = XFS_WSYNC_READIO_LOG; @@ -911,17 +868,14 @@ xfs_mountfs( mp->m_writeio_log = writeio_log; } mp->m_writeio_blocks = 1 << (mp->m_writeio_log - sbp->sb_blocklog); +} - /* - * Set the inode cluster size. - * This may still be overridden by the file system - * block size if it is larger than the chosen cluster size. - */ - mp->m_inode_cluster_size = XFS_INODE_BIG_CLUSTER_SIZE; - - /* - * Set whether we're using inode alignment. - */ +/* + * Set whether we're using inode alignment. + */ +STATIC void +xfs_set_inoalignment(xfs_mount_t *mp) +{ if (XFS_SB_VERSION_HASALIGN(&mp->m_sb) && mp->m_sb.sb_inoalignmt >= XFS_B_TO_FSBT(mp, mp->m_inode_cluster_size)) @@ -937,14 +891,22 @@ xfs_mountfs( mp->m_sinoalign = mp->m_dalign; else mp->m_sinoalign = 0; - /* - * Check that the data (and log if separate) are an ok size. - */ +} + +/* + * Check that the data (and log if separate) are an ok size. + */ +STATIC int +xfs_check_sizes(xfs_mount_t *mp, int mfsi_flags) +{ + xfs_buf_t *bp; + xfs_daddr_t d; + int error; + d = (xfs_daddr_t)XFS_FSB_TO_BB(mp, mp->m_sb.sb_dblocks); if (XFS_BB_TO_FSB(mp, d) != mp->m_sb.sb_dblocks) { cmn_err(CE_WARN, "XFS: size check 1 failed"); - error = XFS_ERROR(E2BIG); - goto error1; + return XFS_ERROR(E2BIG); } error = xfs_read_buf(mp, mp->m_ddev_targp, d - XFS_FSS_TO_BB(mp, 1), @@ -956,7 +918,7 @@ xfs_mountfs( if (error == ENOSPC) { error = XFS_ERROR(E2BIG); } - goto error1; + return error; } if (((mfsi_flags & XFS_MFSI_CLIENT) == 0) && @@ -964,8 +926,7 @@ xfs_mountfs( d = (xfs_daddr_t)XFS_FSB_TO_BB(mp, mp->m_sb.sb_logblocks); if (XFS_BB_TO_FSB(mp, d) != mp->m_sb.sb_logblocks) { cmn_err(CE_WARN, "XFS: size check 3 failed"); - error = XFS_ERROR(E2BIG); - goto error1; + return XFS_ERROR(E2BIG); } error = xfs_read_buf(mp, mp->m_logdev_targp, d - XFS_FSB_TO_BB(mp, 1), @@ -977,11 +938,102 @@ xfs_mountfs( if (error == ENOSPC) { error = XFS_ERROR(E2BIG); } + return error; + } + } + return 0; +} + +/* + * xfs_mountfs + * + * This function does the following on an initial mount of a file system: + * - reads the superblock from disk and init the mount struct + * - if we're a 32-bit kernel, do a size check on the superblock + * so we don't mount terabyte filesystems + * - init mount struct realtime fields + * - allocate inode hash table for fs + * - init directory manager + * - perform recovery and init the log manager + */ +int +xfs_mountfs( + xfs_mount_t *mp, + int mfsi_flags) +{ + xfs_sb_t *sbp = &(mp->m_sb); + xfs_inode_t *rip; + bhv_vnode_t *rvp = NULL; + __uint64_t resblks; + __int64_t update_flags = 0LL; + uint quotamount, quotaflags; + int agno; + int uuid_mounted = 0; + int error = 0; + + if (mp->m_sb_bp == NULL) { + if ((error = xfs_readsb(mp, mfsi_flags))) { + return error; + } + } + xfs_mount_common(mp, sbp); + + /* + * Check if sb_agblocks is aligned at stripe boundary + * If sb_agblocks is NOT aligned turn off m_dalign since + * allocator alignment is within an ag, therefore ag has + * to be aligned at stripe boundary. + */ + if ((error = xfs_update_alignment(mp, mfsi_flags, &update_flags))) + goto error1; + + xfs_alloc_compute_maxlevels(mp); + xfs_bmap_compute_maxlevels(mp, XFS_DATA_FORK); + xfs_bmap_compute_maxlevels(mp, XFS_ATTR_FORK); + xfs_ialloc_compute_maxlevels(mp); + + xfs_set_maxicount(mp); + + mp->m_maxioffset = xfs_max_file_offset(sbp->sb_blocklog); + + /* + * XFS uses the uuid from the superblock as the unique + * identifier for fsid. We can not use the uuid from the volume + * since a single partition filesystem is identical to a single + * partition volume/filesystem. + */ + if ((mfsi_flags & XFS_MFSI_SECOND) == 0 && + (mp->m_flags & XFS_MOUNT_NOUUID) == 0) { + if (xfs_uuid_mount(mp)) { + error = XFS_ERROR(EINVAL); goto error1; } } /* + * Set the minimum read and write sizes + */ + xfs_set_rw_sizes(mp); + + /* + * Set the inode cluster size. + * This may still be overridden by the file system + * block size if it is larger than the chosen cluster size. + */ + mp->m_inode_cluster_size = XFS_INODE_BIG_CLUSTER_SIZE; + + /* + * Set inode alignment fields + */ + xfs_set_inoalignment(mp); + + /* + * Check that the data (and log if separate) are an ok size. + */ + if ((error = xfs_check_sizes(mp, mfsi_flags))) + goto error1; + + /* * Initialize realtime fields in the mount structure */ if ((error = xfs_rtmount_init(mp))) { From owner-xfs@oss.sgi.com Mon Aug 27 18:38:03 2007 Received: with ECARTIS (v1.0.0; list xfs); Mon, 27 Aug 2007 18:38:07 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7S1c04p011538 for ; Mon, 27 Aug 2007 18:38:02 -0700 Received: from boing.melbourne.sgi.com (boing.melbourne.sgi.com [134.14.55.141]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id LAA05192; Tue, 28 Aug 2007 11:37:52 +1000 Message-ID: <46D37C70.5070907@sgi.com> Date: Tue, 28 Aug 2007 11:37:52 +1000 From: Timothy Shimmin User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Jeff Layton CC: Josef Sipek , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, xfs-oss Subject: Re: [PATCH 2/4] Fix mainline filesystems to handle ATTR_KILL_ bits correctly References: <200708202053.l7KKrMYv017763@dantu.rdu.redhat.com> <46CA798C.1020101@sgi.com> <20070821073551.dac4a5dd.jlayton@redhat.com> <20070821212128.GC1741@filer.fsl.cs.sunysb.edu> <20070821182305.7c0cb135.jlayton@redhat.com> In-Reply-To: <20070821182305.7c0cb135.jlayton@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 12686 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: tes@sgi.com Precedence: bulk X-list: xfs Jeff Layton wrote: > On Tue, 21 Aug 2007 17:21:28 -0400 > Josef Sipek wrote: > >> On Tue, Aug 21, 2007 at 07:35:51AM -0400, Jeff Layton wrote: >>> On Tue, 21 Aug 2007 15:35:08 +1000 >>> Timothy Shimmin wrote: >>> >>>> Jeff Layton wrote: >>>>> This should fix all of the filesystems in the mainline kernels to handle >>>>> ATTR_KILL_SUID and ATTR_KILL_SGID correctly. For most of them, this is >>>>> just a matter of making sure that they call generic_attrkill early in >>>>> the setattr inode op. >>>>> >>>>> Signed-off-by: Jeff Layton >>>>> --- >>>>> fs/xfs/linux-2.6/xfs_iops.c | 5 ++++- >>>>> --- a/fs/xfs/linux-2.6/xfs_iops.c >>>>> +++ b/fs/xfs/linux-2.6/xfs_iops.c >>>>> @@ -651,12 +651,15 @@ xfs_vn_setattr( >>>>> struct iattr *attr) >>>>> { >>>>> struct inode *inode = dentry->d_inode; >>>>> - unsigned int ia_valid = attr->ia_valid; >>>>> + unsigned int ia_valid; >>>>> bhv_vnode_t *vp = vn_from_inode(inode); >>>>> bhv_vattr_t vattr = { 0 }; >>>>> int flags = 0; >>>>> int error; >>>>> >>>>> + generic_attrkill(inode->i_mode, attr); >>>>> + ia_valid = attr->ia_valid; >>>>> + >>>>> if (ia_valid & ATTR_UID) { >>>>> vattr.va_mask |= XFS_AT_UID; >>>>> vattr.va_uid = attr->ia_uid; >>>> Looks reasonable to me for XFS. >>>> Acked-by: Tim Shimmin >>>> >>>> So before, this clearing would happen directly in notify_change() >>>> and now this won't happen until notify_change() calls i_op->setattr >>>> which for a particular fs it can call generic_attrkill() to do it. >>>> So I guess for the cases where i_op->setattr is called outside of >>>> via notify_change, we don't normally have ATTR_KILL_SUID/SGID >>>> set so that nothing will happen there? >>> Right. If neither ATTR_KILL bit is set then generic_attrkill is a >>> noop. >>> >>>> I guess just wondering the effect with having the code on all >>>> setattr's. (I'm not familiar with the code path) >>>> >>> These bits are referenced in very few places in the current kernel >>> tree -- mostly in the VFS layer. The *only* place I see that they >>> actually get interpreted into a mode change is in notify_change. So >>> places that call setattr ops w/o going through notify_change are >>> not likely to have those bits set. >>> >>> But hypothetically, if a fs did set ATTR_KILL_* and call setattr >>> directly, then the setattr would now include a mode change that >>> clears setuid or setgid bits where it may not have before. > > I should probably clarify -- in the hypothetical situation above, > the setattr function would have to call generic_attrkill (as most > filesystems should do with this change). > Thanks for the confirmation. That's what it looked like to me but I wanted to know explicitly what the thinking was. >> It almost sounds like an argument for a new inode op (NULL would use >> generic_attr_kill). >> > > That's not a bad idea at all. I suppose that would be easier than > modifying every fs like this, and it does seem like it might be > cleaner. I need to mull it over, but that might be the best > solution. > Yeah, sounds a much more direct way of handling things and as you say wouldn't need most of the filesystems to all be modified calling generic_attrkill. Not sure what the ramifications of adding a new iop are though. Cheers, Tim. From owner-xfs@oss.sgi.com Tue Aug 28 13:04:33 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 28 Aug 2007 13:04:34 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_56 autolearn=no version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7SK4S4p015257 for ; Tue, 28 Aug 2007 13:04:31 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id GAA01609; Wed, 29 Aug 2007 06:04:20 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l7SK4JeW83959253; Wed, 29 Aug 2007 06:04:19 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l7SK4GQA83599418; Wed, 29 Aug 2007 06:04:16 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Wed, 29 Aug 2007 06:04:16 +1000 From: David Chinner To: Eric Sandeen Cc: xfs-oss Subject: Re: [PATCH] clean up vnode^winode tracing Message-ID: <20070828200416.GG61154114@sgi.com> References: <46D11F1B.5020409@sandeen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46D11F1B.5020409@sandeen.net> User-Agent: Mutt/1.4.2.1i X-archive-position: 12687 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Sun, Aug 26, 2007 at 01:35:07AM -0500, Eric Sandeen wrote: > Simplify vnode tracing calls by embedding function name & return addr > in the calling macro. > > Also do a lot of vnode->inode renaming for consistency, while > we're at it. > > Signed-off-by: Eric Sandeen > > Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c > =================================================================== > --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_aops.c > +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c > @@ -1525,8 +1525,7 @@ xfs_vm_bmap( > struct inode *inode = (struct inode *)mapping->host; > struct xfs_inode *ip = XFS_I(inode); > > - vn_trace_entry(XFS_I(inode), __FUNCTION__, > - (inst_t *)__return_address); > + ip_trace_entry(XFS_I(inode)); s/ip_trace/xfs_itrace/ Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Tue Aug 28 13:16:34 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 28 Aug 2007 13:16:36 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7SKGV4p018191 for ; Tue, 28 Aug 2007 13:16:33 -0700 Received: from hch by pentafluge.infradead.org with local (Exim 4.63 #1 (Red Hat Linux)) id 1IQ76r-0001uA-HT; Tue, 28 Aug 2007 20:52:21 +0100 Date: Tue, 28 Aug 2007 20:52:21 +0100 From: Christoph Hellwig To: Eric Sandeen Cc: xfs-oss Subject: Re: [PATCH] refactor xfs_mountfs for clarity & stack savings Message-ID: <20070828195221.GA7237@infradead.org> References: <46D37A82.2080608@sandeen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46D37A82.2080608@sandeen.net> User-Agent: Mutt/1.4.2.3i X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 12688 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: xfs Looks goo to me except for a tiny nitpick: > > Signed-off-by: Eric Sandeen + if ((error = xfs_readsb(mp, mfsi_flags))) { > + return error; > + } > + if ((error = xfs_update_alignment(mp, mfsi_flags, &update_flags))) > + goto error1; > + if ((error = xfs_check_sizes(mp, mfsi_flags))) > + goto error1; > if ((error = xfs_rtmount_init(mp))) { Please make sure the assignment and conditional are on separate lines for all of these once you're cleaning up this function. In the first case there's also some braces to remove. From owner-xfs@oss.sgi.com Tue Aug 28 13:20:21 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 28 Aug 2007 13:20:23 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_64 autolearn=no version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7SKKI4p019189 for ; Tue, 28 Aug 2007 13:20:21 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7SKKHA5017318 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Tue, 28 Aug 2007 22:20:17 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7SKKG6W017316 for xfs@oss.sgi.com; Tue, 28 Aug 2007 22:20:16 +0200 Date: Tue, 28 Aug 2007 22:20:16 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH] cleanup vnode useage in xfs_ioctl.c Message-ID: <20070828202016.GA17289@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12689 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_ioctl.c 2007-08-25 00:30:42.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c 2007-08-25 00:37:33.000000000 +0200 @@ -75,7 +75,6 @@ xfs_find_handle( xfs_handle_t handle; xfs_fsop_handlereq_t hreq; struct inode *inode; - bhv_vnode_t *vp; if (copy_from_user(&hreq, arg, sizeof(hreq))) return -XFS_ERROR(EFAULT); @@ -134,21 +133,16 @@ xfs_find_handle( return -XFS_ERROR(EBADF); } - /* we need the vnode */ - vp = vn_from_inode(inode); - /* now we can grab the fsid */ memcpy(&handle.ha_fsid, XFS_I(inode)->i_mount->m_fixedfsid, sizeof(xfs_fsid_t)); hsize = sizeof(xfs_fsid_t); if (cmd != XFS_IOC_PATH_TO_FSHANDLE) { - xfs_inode_t *ip; + xfs_inode_t *ip = XFS_I(inode); int lock_mode; /* need to get access to the xfs_inode to read the generation */ - ip = xfs_vtoi(vp); - ASSERT(ip); lock_mode = xfs_ilock_map_shared(ip); /* fill in fid section of handle from inode */ @@ -177,20 +171,18 @@ xfs_find_handle( /* * Convert userspace handle data into vnode (and inode). - * We [ab]use the fact that all the fsop_handlereq ioctl calls - * have a data structure argument whose first component is always - * a xfs_fsop_handlereq_t, so we can cast to and from this type. - * This allows us to optimise the copy_from_user calls and gives - * a handy, shared routine. * - * If no error, caller must always VN_RELE the returned vp. + * We use the fact that all the fsop_handlereq ioctl calls have a data + * structure argument whose first component is always a xfs_fsop_handlereq_t, + * so we can pass that sub structure into this handy, shared routine. + * + * If no error, caller must always iput the returned inode. */ STATIC int xfs_vget_fsop_handlereq( xfs_mount_t *mp, struct inode *parinode, /* parent inode pointer */ xfs_fsop_handlereq_t *hreq, - bhv_vnode_t **vp, struct inode **inode) { void __user *hanp; @@ -199,8 +191,6 @@ xfs_vget_fsop_handlereq( xfs_handle_t *handlep; xfs_handle_t handle; xfs_inode_t *ip; - struct inode *inodep; - bhv_vnode_t *vpp; xfs_ino_t ino; __u32 igen; int error; @@ -253,12 +243,9 @@ xfs_vget_fsop_handlereq( return XFS_ERROR(ENOENT); } - vpp = XFS_ITOV(ip); - inodep = vn_to_inode(vpp); xfs_iunlock(ip, XFS_ILOCK_SHARED); - *vp = vpp; - *inode = inodep; + *inode = ip->i_vnode; return 0; } @@ -275,7 +262,6 @@ xfs_open_by_handle( struct file *filp; struct inode *inode; struct dentry *dentry; - bhv_vnode_t *vp; xfs_fsop_handlereq_t hreq; if (!capable(CAP_SYS_ADMIN)) @@ -283,7 +269,7 @@ xfs_open_by_handle( if (copy_from_user(&hreq, arg, sizeof(xfs_fsop_handlereq_t))) return -XFS_ERROR(EFAULT); - error = xfs_vget_fsop_handlereq(mp, parinode, &hreq, &vp, &inode); + error = xfs_vget_fsop_handlereq(mp, parinode, &hreq, &inode); if (error) return -error; @@ -385,7 +371,6 @@ xfs_readlink_by_handle( { struct inode *inode; xfs_fsop_handlereq_t hreq; - bhv_vnode_t *vp; __u32 olen; void *link; int error; @@ -395,7 +380,7 @@ xfs_readlink_by_handle( if (copy_from_user(&hreq, arg, sizeof(xfs_fsop_handlereq_t))) return -XFS_ERROR(EFAULT); - error = xfs_vget_fsop_handlereq(mp, parinode, &hreq, &vp, &inode); + error = xfs_vget_fsop_handlereq(mp, parinode, &hreq, &inode); if (error) return -error; @@ -438,34 +423,32 @@ xfs_fssetdm_by_handle( struct fsdmidata fsd; xfs_fsop_setdm_handlereq_t dmhreq; struct inode *inode; - bhv_vnode_t *vp; if (!capable(CAP_MKNOD)) return -XFS_ERROR(EPERM); if (copy_from_user(&dmhreq, arg, sizeof(xfs_fsop_setdm_handlereq_t))) return -XFS_ERROR(EFAULT); - error = xfs_vget_fsop_handlereq(mp, parinode, &dmhreq.hreq, &vp, &inode); + error = xfs_vget_fsop_handlereq(mp, parinode, &dmhreq.hreq, &inode); if (error) return -error; if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) { - VN_RELE(vp); - return -XFS_ERROR(EPERM); + error = -XFS_ERROR(EPERM); + goto out; } if (copy_from_user(&fsd, dmhreq.data, sizeof(fsd))) { - VN_RELE(vp); - return -XFS_ERROR(EFAULT); + error = -XFS_ERROR(EFAULT); + goto out; } - error = xfs_set_dmattrs(xfs_vtoi(vp), - fsd.fsd_dmevmask, fsd.fsd_dmstate); + error = -xfs_set_dmattrs(XFS_I(inode), fsd.fsd_dmevmask, + fsd.fsd_dmstate); - VN_RELE(vp); - if (error) - return -error; - return 0; + out: + iput(inode); + return error; } STATIC int @@ -478,7 +461,6 @@ xfs_attrlist_by_handle( attrlist_cursor_kern_t *cursor; xfs_fsop_attrlist_handlereq_t al_hreq; struct inode *inode; - bhv_vnode_t *vp; char *kbuf; if (!capable(CAP_SYS_ADMIN)) @@ -488,8 +470,7 @@ xfs_attrlist_by_handle( if (al_hreq.buflen > XATTR_LIST_MAX) return -XFS_ERROR(EINVAL); - error = xfs_vget_fsop_handlereq(mp, parinode, &al_hreq.hreq, - &vp, &inode); + error = xfs_vget_fsop_handlereq(mp, parinode, &al_hreq.hreq, &inode); if (error) goto out; @@ -509,7 +490,7 @@ xfs_attrlist_by_handle( out_kfree: kfree(kbuf); out_vn_rele: - VN_RELE(vp); + iput(inode); out: return -error; } @@ -598,7 +579,6 @@ xfs_attrmulti_by_handle( xfs_attr_multiop_t *ops; xfs_fsop_attrmulti_handlereq_t am_hreq; struct inode *inode; - bhv_vnode_t *vp; unsigned int i, size; char *attr_name; @@ -607,7 +587,7 @@ xfs_attrmulti_by_handle( if (copy_from_user(&am_hreq, arg, sizeof(xfs_fsop_attrmulti_handlereq_t))) return -XFS_ERROR(EFAULT); - error = xfs_vget_fsop_handlereq(mp, parinode, &am_hreq.hreq, &vp, &inode); + error = xfs_vget_fsop_handlereq(mp, parinode, &am_hreq.hreq, &inode); if (error) goto out; @@ -666,7 +646,7 @@ xfs_attrmulti_by_handle( out_kfree_ops: kfree(ops); out_vn_rele: - VN_RELE(vp); + iput(inode); out: return -error; } @@ -702,7 +682,6 @@ xfs_ioc_fsgeometry( STATIC int xfs_ioc_xattr( - bhv_vnode_t *vp, xfs_inode_t *ip, struct file *filp, unsigned int cmd, @@ -729,7 +708,6 @@ xfs_ioctl( void __user *arg) { struct inode *inode = filp->f_path.dentry->d_inode; - bhv_vnode_t *vp = vn_from_inode(inode); xfs_mount_t *mp = ip->i_mount; int error; @@ -788,7 +766,7 @@ xfs_ioctl( case XFS_IOC_FSGETXATTR: case XFS_IOC_FSSETXATTR: case XFS_IOC_FSGETXATTRA: - return xfs_ioc_xattr(vp, ip, filp, cmd, arg); + return xfs_ioc_xattr(ip, filp, cmd, arg); case XFS_IOC_FSSETDM: { struct fsdmidata dmi; @@ -1163,7 +1141,6 @@ xfs_di2lxflags( STATIC int xfs_ioc_xattr( - bhv_vnode_t *vp, xfs_inode_t *ip, struct file *filp, unsigned int cmd, @@ -1218,7 +1195,7 @@ xfs_ioc_xattr( error = xfs_setattr(ip, vattr, attr_flags, NULL); if (likely(!error)) - __vn_revalidate(vp, vattr); /* update flags */ + __vn_revalidate(XFS_ITOV(ip), vattr); /* update flags */ error = -error; break; } @@ -1274,7 +1251,7 @@ xfs_ioc_xattr( error = xfs_setattr(ip, vattr, attr_flags, NULL); if (likely(!error)) - __vn_revalidate(vp, vattr); /* update flags */ + __vn_revalidate(XFS_ITOV(ip), vattr); /* update flags */ error = -error; break; } From owner-xfs@oss.sgi.com Tue Aug 28 13:21:08 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 28 Aug 2007 13:21:10 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7SKL24p019431 for ; Tue, 28 Aug 2007 13:21:07 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7SKL2A5017367 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Tue, 28 Aug 2007 22:21:02 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7SKL2pn017365 for xfs@oss.sgi.com; Tue, 28 Aug 2007 22:21:02 +0200 Date: Tue, 28 Aug 2007 22:21:02 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH] xfs_dmapi: add MODULE_ tags Message-ID: <20070828202102.GB17289@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12690 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs Without these I get a warning about an unspecified license everytime I try to load xfs_dmapi. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm.c 2007-08-25 00:05:33.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c 2007-08-25 00:05:53.000000000 +0200 @@ -3372,5 +3372,9 @@ xfs_dm_exit(void) dmapi_unregister(&xfs_fs_type); } +MODULE_AUTHOR("Silicon Graphics, Inc."); +MODULE_DESCRIPTION("SGI XFS dmapi subsystem"); +MODULE_LICENSE("GPL"); + module_init(xfs_dm_init); module_exit(xfs_dm_exit); From owner-xfs@oss.sgi.com Tue Aug 28 13:24:50 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 28 Aug 2007 13:24:52 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7SKOm4p020447 for ; Tue, 28 Aug 2007 13:24:50 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l7SKOh0t010089; Tue, 28 Aug 2007 16:24:43 -0400 Received: from lacrosse.corp.redhat.com (lacrosse.corp.redhat.com [172.16.52.154]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7SKOgRK025409; Tue, 28 Aug 2007 16:24:42 -0400 Received: from [10.15.80.10] (neon.msp.redhat.com [10.15.80.10]) by lacrosse.corp.redhat.com (8.12.11.20060308/8.11.6) with ESMTP id l7SKOeHC030786; Tue, 28 Aug 2007 16:24:41 -0400 Message-ID: <46D48487.9080205@sandeen.net> Date: Tue, 28 Aug 2007 15:24:39 -0500 From: Eric Sandeen User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: Christoph Hellwig CC: xfs-oss Subject: Re: [PATCH] refactor xfs_mountfs for clarity & stack savings References: <46D37A82.2080608@sandeen.net> <20070828195221.GA7237@infradead.org> In-Reply-To: <20070828195221.GA7237@infradead.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-archive-position: 12691 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Christoph Hellwig wrote: > Looks goo to me except for a tiny nitpick: > >> Signed-off-by: Eric Sandeen > + if ((error = xfs_readsb(mp, mfsi_flags))) { >> + return error; >> + } > >> + if ((error = xfs_update_alignment(mp, mfsi_flags, &update_flags))) >> + goto error1; > >> + if ((error = xfs_check_sizes(mp, mfsi_flags))) >> + goto error1; > >> if ((error = xfs_rtmount_init(mp))) { > > Please make sure the assignment and conditional are on separate lines > for all of these once you're cleaning up this function. In the first > case there's also some braces to remove. > yeah, good point. That was just cut & pasting what was already there... -Eric From owner-xfs@oss.sgi.com Tue Aug 28 13:26:51 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 28 Aug 2007 13:26:53 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_56 autolearn=no version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7SKQn4p021032 for ; Tue, 28 Aug 2007 13:26:51 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l7SKQo72011505; Tue, 28 Aug 2007 16:26:50 -0400 Received: from lacrosse.corp.redhat.com (lacrosse.corp.redhat.com [172.16.52.154]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7SKQnJS026542; Tue, 28 Aug 2007 16:26:49 -0400 Received: from [10.15.80.10] (neon.msp.redhat.com [10.15.80.10]) by lacrosse.corp.redhat.com (8.12.11.20060308/8.11.6) with ESMTP id l7SKQmFD031584; Tue, 28 Aug 2007 16:26:49 -0400 Message-ID: <46D48508.9060001@sandeen.net> Date: Tue, 28 Aug 2007 15:26:48 -0500 From: Eric Sandeen User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: David Chinner CC: xfs-oss Subject: Re: [PATCH] clean up vnode^winode tracing References: <46D11F1B.5020409@sandeen.net> <20070828200416.GG61154114@sgi.com> In-Reply-To: <20070828200416.GG61154114@sgi.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-archive-position: 12692 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs David Chinner wrote: > On Sun, Aug 26, 2007 at 01:35:07AM -0500, Eric Sandeen wrote: >> Simplify vnode tracing calls by embedding function name & return addr >> in the calling macro. >> >> Also do a lot of vnode->inode renaming for consistency, while >> we're at it. >> >> Signed-off-by: Eric Sandeen >> >> Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c >> =================================================================== >> --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_aops.c >> +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c >> @@ -1525,8 +1525,7 @@ xfs_vm_bmap( >> struct inode *inode = (struct inode *)mapping->host; >> struct xfs_inode *ip = XFS_I(inode); >> >> - vn_trace_entry(XFS_I(inode), __FUNCTION__, >> - (inst_t *)__return_address); >> + ip_trace_entry(XFS_I(inode)); > > s/ip_trace/xfs_itrace/ > So xfs_itrace_entry, xfs_itrace_ref, xfs_itrace_exit etc is what you prefer? -Eric From owner-xfs@oss.sgi.com Tue Aug 28 13:36:01 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 28 Aug 2007 13:36:05 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_56, J_CHICKENPOX_65 autolearn=no version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7SKZx4p022864 for ; Tue, 28 Aug 2007 13:36:01 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l7SKZwZH016435; Tue, 28 Aug 2007 16:35:58 -0400 Received: from lacrosse.corp.redhat.com (lacrosse.corp.redhat.com [172.16.52.154]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7SKZwPk029918; Tue, 28 Aug 2007 16:35:58 -0400 Received: from [10.15.80.10] (neon.msp.redhat.com [10.15.80.10]) by lacrosse.corp.redhat.com (8.12.11.20060308/8.11.6) with ESMTP id l7SKZvPp001464; Tue, 28 Aug 2007 16:35:57 -0400 Message-ID: <46D4872D.2000900@sandeen.net> Date: Tue, 28 Aug 2007 15:35:57 -0500 From: Eric Sandeen User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: David Chinner CC: xfs-oss Subject: [PATCH V2] clean up vnode^winode tracing References: <46D11F1B.5020409@sandeen.net> <20070828200416.GG61154114@sgi.com> In-Reply-To: <20070828200416.GG61154114@sgi.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-archive-position: 12693 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Try this on for size... ----------------- Simplify vnode tracing calls by embedding function name & return addr in the calling macro. Also do a lot of vnode->inode renaming for consistency, while we're at it. Signed-off-by: Eric Sandeen Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_aops.c +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_aops.c @@ -1525,8 +1525,7 @@ xfs_vm_bmap( struct inode *inode = (struct inode *)mapping->host; struct xfs_inode *ip = XFS_I(inode); - vn_trace_entry(XFS_I(inode), __FUNCTION__, - (inst_t *)__return_address); + xfs_itrace_entry(XFS_I(inode)); xfs_rwlock(ip, VRWLOCK_READ); xfs_flush_pages(ip, (xfs_off_t)0, -1, 0, FI_REMAPF); xfs_rwunlock(ip, VRWLOCK_READ); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_ioctl.c +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c @@ -733,8 +733,7 @@ xfs_ioctl( xfs_mount_t *mp = ip->i_mount; int error; - vn_trace_entry(XFS_I(inode), "xfs_ioctl", (inst_t *)__return_address); - + xfs_itrace_entry(XFS_I(inode)); switch (cmd) { case XFS_IOC_ALLOCSP: Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ksyms.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_ksyms.c +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ksyms.c @@ -83,12 +83,12 @@ EXPORT_SYMBOL(ktrace_first); EXPORT_SYMBOL(ktrace_next); #endif -#ifdef XFS_VNODE_TRACE -EXPORT_SYMBOL(vn_trace_ref); -EXPORT_SYMBOL(vn_trace_entry); -EXPORT_SYMBOL(vn_trace_exit); -EXPORT_SYMBOL(vn_trace_hold); -EXPORT_SYMBOL(vn_trace_rele); +#ifdef XFS_INODE_TRACE +EXPORT_SYMBOL(_xfs_itrace_ref); +EXPORT_SYMBOL(_xfs_itrace_entry); +EXPORT_SYMBOL(_xfs_itrace_exit); +EXPORT_SYMBOL(xfs_itrace_hold); +EXPORT_SYMBOL(xfs_itrace_rele); #endif #ifdef XFS_ILOCK_TRACE Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_super.c +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_super.c @@ -403,8 +403,7 @@ xfs_fs_write_inode( { int error = 0, flags = FLUSH_INODE; - vn_trace_entry(XFS_I(inode), __FUNCTION__, - (inst_t *)__return_address); + xfs_itrace_entry(XFS_I(inode)); if (sync) flags |= FLUSH_SYNC; error = xfs_inode_flush(XFS_I(inode), flags); @@ -430,8 +429,7 @@ xfs_fs_clear_inode( * find an inode with di_mode == 0 but without IGET_CREATE set. */ if (ip) { - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); - + xfs_itrace_entry(ip); XFS_STATS_INC(vn_rele); XFS_STATS_INC(vn_remove); XFS_STATS_INC(vn_reclaim); @@ -820,8 +818,7 @@ xfs_fs_fill_super( goto fail_vnrele; } - vn_trace_exit(XFS_I(sb->s_root->d_inode), __FUNCTION__, - (inst_t *)__return_address); + xfs_itrace_exit(XFS_I(sb->s_root->d_inode)); kmem_free(args, sizeof(*args)); return 0; Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vnode.c +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.c @@ -143,7 +143,7 @@ __vn_revalidate( { int error; - vn_trace_entry(xfs_vtoi(vp), __FUNCTION__, (inst_t *)__return_address); + xfs_itrace_entry(xfs_vtoi(vp)); vattr->va_mask = XFS_AT_STAT | XFS_AT_XFLAGS; error = xfs_getattr(xfs_vtoi(vp), vattr, 0); if (likely(!error)) { @@ -179,7 +179,7 @@ vn_hold( return vp; } -#ifdef XFS_VNODE_TRACE +#ifdef XFS_INODE_TRACE /* * Reference count of Linux inode if present, -1 if the xfs_inode @@ -211,32 +211,32 @@ static inline int xfs_icount(struct xfs_ * Vnode tracing code. */ void -vn_trace_entry(xfs_inode_t *ip, const char *func, inst_t *ra) +_xfs_itrace_entry(xfs_inode_t *ip, const char *func, inst_t *ra) { - KTRACE_ENTER(ip, VNODE_KTRACE_ENTRY, func, 0, ra); + KTRACE_ENTER(ip, INODE_KTRACE_ENTRY, func, 0, ra); } void -vn_trace_exit(xfs_inode_t *ip, const char *func, inst_t *ra) +_xfs_itrace_exit(xfs_inode_t *ip, const char *func, inst_t *ra) { - KTRACE_ENTER(ip, VNODE_KTRACE_EXIT, func, 0, ra); + KTRACE_ENTER(ip, INODE_KTRACE_EXIT, func, 0, ra); } void -vn_trace_hold(xfs_inode_t *ip, char *file, int line, inst_t *ra) +xfs_itrace_hold(xfs_inode_t *ip, char *file, int line, inst_t *ra) { - KTRACE_ENTER(ip, VNODE_KTRACE_HOLD, file, line, ra); + KTRACE_ENTER(ip, INODE_KTRACE_HOLD, file, line, ra); } void -vn_trace_ref(xfs_inode_t *ip, char *file, int line, inst_t *ra) +_xfs_itrace_ref(xfs_inode_t *ip, char *file, int line, inst_t *ra) { - KTRACE_ENTER(ip, VNODE_KTRACE_REF, file, line, ra); + KTRACE_ENTER(ip, INODE_KTRACE_REF, file, line, ra); } void -vn_trace_rele(xfs_inode_t *ip, char *file, int line, inst_t *ra) +xfs_itrace_rele(xfs_inode_t *ip, char *file, int line, inst_t *ra) { - KTRACE_ENTER(ip, VNODE_KTRACE_RELE, file, line, ra); + KTRACE_ENTER(ip, INODE_KTRACE_RELE, file, line, ra); } -#endif /* XFS_VNODE_TRACE */ +#endif /* XFS_INODE_TRACE */ Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_vnode.h +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_vnode.h @@ -210,12 +210,12 @@ static inline int vn_count(bhv_vnode_t * */ extern bhv_vnode_t *vn_hold(bhv_vnode_t *); -#if defined(XFS_VNODE_TRACE) +#if defined(XFS_INODE_TRACE) #define VN_HOLD(vp) \ ((void)vn_hold(vp), \ - vn_trace_hold(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address)) + xfs_itrace_hold(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address)) #define VN_RELE(vp) \ - (vn_trace_rele(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address), \ + (xfs_itrace_rele(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address), \ iput(vn_to_inode(vp))) #else #define VN_HOLD(vp) ((void)vn_hold(vp)) @@ -296,26 +296,33 @@ static inline void vn_atime_to_time_t(bh /* * Tracking vnode activity. */ -#if defined(XFS_VNODE_TRACE) +#if defined(XFS_INODE_TRACE) + +#define INODE_TRACE_SIZE 16 /* number of trace entries */ +#define INODE_KTRACE_ENTRY 1 +#define INODE_KTRACE_EXIT 2 +#define INODE_KTRACE_HOLD 3 +#define INODE_KTRACE_REF 4 +#define INODE_KTRACE_RELE 5 + +extern void _xfs_itrace_entry(struct xfs_inode *, const char *, inst_t *); +extern void _xfs_itrace_exit(struct xfs_inode *, const char *, inst_t *); +extern void xfs_itrace_hold(struct xfs_inode *, char *, int, inst_t *); +extern void _xfs_itrace_ref(struct xfs_inode *, char *, int, inst_t *); +extern void xfs_itrace_rele(struct xfs_inode *, char *, int, inst_t *); +#define xfs_itrace_entry(ip) \ + _xfs_itrace_entry(ip, __FUNCTION__, (inst_t *)__return_address) +#define xfs_itrace_exit(ip) \ + _xfs_itrace_exit(ip, __FUNCTION__, (inst_t *)__return_address) +#define xfs_itrace_ref(ip) \ + _xfs_itrace_ref(ip, __FILE__, __LINE__, (inst_t *)__return_address) -#define VNODE_TRACE_SIZE 16 /* number of trace entries */ -#define VNODE_KTRACE_ENTRY 1 -#define VNODE_KTRACE_EXIT 2 -#define VNODE_KTRACE_HOLD 3 -#define VNODE_KTRACE_REF 4 -#define VNODE_KTRACE_RELE 5 - -extern void vn_trace_entry(struct xfs_inode *, const char *, inst_t *); -extern void vn_trace_exit(struct xfs_inode *, const char *, inst_t *); -extern void vn_trace_hold(struct xfs_inode *, char *, int, inst_t *); -extern void vn_trace_ref(struct xfs_inode *, char *, int, inst_t *); -extern void vn_trace_rele(struct xfs_inode *, char *, int, inst_t *); #else -#define vn_trace_entry(a,b,c) -#define vn_trace_exit(a,b,c) -#define vn_trace_hold(a,b,c,d) -#define vn_trace_ref(a,b,c,d) -#define vn_trace_rele(a,b,c,d) +#define xfs_itrace_entry(a) +#define xfs_itrace_exit(a) +#define xfs_itrace_hold(a, b, c, d) +#define xfs_itrace_ref(a) +#define xfs_itrace_rele(a, b, c, d) #endif #endif /* __XFS_VNODE_H__ */ Index: linux-2.6-xfs/fs/xfs/xfs_dir2.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_dir2.c +++ linux-2.6-xfs/fs/xfs/xfs_dir2.c @@ -301,7 +301,7 @@ xfs_readdir( int rval; /* return value */ int v; /* type-checking value */ - vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); + xfs_itrace_entry(dp); if (XFS_FORCED_SHUTDOWN(dp->i_mount)) return XFS_ERROR(EIO); Index: linux-2.6-xfs/fs/xfs/xfs_iget.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_iget.c +++ linux-2.6-xfs/fs/xfs/xfs_iget.c @@ -157,7 +157,7 @@ again: goto again; } - vn_trace_exit(ip, "xfs_iget.alloc", + _xfs_itrace_exit(ip, "xfs_iget.alloc", (inst_t *)__return_address); XFS_STATS_INC(xs_ig_found); @@ -212,7 +212,7 @@ finish_inode: xfs_ilock(ip, lock_flags); xfs_iflags_clear(ip, XFS_ISTALE); - vn_trace_exit(ip, "xfs_iget.found", + _xfs_itrace_exit(ip, "xfs_iget.found", (inst_t *)__return_address); goto return_ip; } @@ -234,7 +234,7 @@ finish_inode: return error; } - vn_trace_exit(ip, "xfs_iget.alloc", (inst_t *)__return_address); + _xfs_itrace_exit(ip, "xfs_iget.alloc", (inst_t *)__return_address); xfs_inode_lock_init(ip, vp); xfs_iocore_inode_init(ip); @@ -467,7 +467,7 @@ xfs_iput(xfs_inode_t *ip, { bhv_vnode_t *vp = XFS_ITOV(ip); - vn_trace_entry(ip, "xfs_iput", (inst_t *)__return_address); + xfs_itrace_entry(ip); xfs_iunlock(ip, lock_flags); VN_RELE(vp); } @@ -482,7 +482,7 @@ xfs_iput_new(xfs_inode_t *ip, bhv_vnode_t *vp = XFS_ITOV(ip); struct inode *inode = vn_to_inode(vp); - vn_trace_entry(ip, "xfs_iput_new", (inst_t *)__return_address); + xfs_itrace_entry(ip); if ((ip->i_d.di_mode == 0)) { ASSERT(!xfs_iflags_test(ip, XFS_IRECLAIMABLE)); Index: linux-2.6-xfs/fs/xfs/xfs_inode.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_inode.c +++ linux-2.6-xfs/fs/xfs/xfs_inode.c @@ -884,8 +884,8 @@ xfs_iread( * Initialize inode's trace buffers. * Do this before xfs_iformat in case it adds entries. */ -#ifdef XFS_VNODE_TRACE - ip->i_trace = ktrace_alloc(VNODE_TRACE_SIZE, KM_SLEEP); +#ifdef XFS_INODE_TRACE + ip->i_trace = ktrace_alloc(INODE_TRACE_SIZE, KM_SLEEP); #endif #ifdef XFS_BMAP_TRACE ip->i_xtrace = ktrace_alloc(XFS_BMAP_KTRACE_SIZE, KM_SLEEP); @@ -2733,7 +2733,7 @@ xfs_idestroy( mrfree(&ip->i_iolock); freesema(&ip->i_flock); -#ifdef XFS_VNODE_TRACE +#ifdef XFS_INODE_TRACE ktrace_free(ip->i_trace); #endif #ifdef XFS_BMAP_TRACE Index: linux-2.6-xfs/fs/xfs/xfs_rename.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_rename.c +++ linux-2.6-xfs/fs/xfs/xfs_rename.c @@ -118,7 +118,7 @@ xfs_lock_for_rename( inum1 = ip1->i_ino; ASSERT(ip1); - ITRACE(ip1); + xfs_itrace_ref(ip1); /* * Unlock dp1 and lock dp2 if they are different. @@ -141,7 +141,7 @@ xfs_lock_for_rename( IRELE (ip1); return error; } else { - ITRACE(ip2); + xfs_itrace_ref(ip2); } /* @@ -247,8 +247,8 @@ xfs_rename( int src_namelen = VNAMELEN(src_vname); int target_namelen = VNAMELEN(target_vname); - vn_trace_entry(src_dp, "xfs_rename", (inst_t *)__return_address); - vn_trace_entry(xfs_vtoi(target_dir_vp), "xfs_rename", (inst_t *)__return_address); + xfs_itrace_entry(src_dp); + xfs_itrace_entry(xfs_vtoi(target_dir_vp)); /* * Find the XFS behavior descriptor for the target directory Index: linux-2.6-xfs/fs/xfs/xfs_utils.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_utils.c +++ linux-2.6-xfs/fs/xfs/xfs_utils.c @@ -73,7 +73,7 @@ xfs_dir_lookup_int( { int error; - vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); + xfs_itrace_entry(dp); error = xfs_dir_lookup(NULL, dp, VNAME(dentry), VNAMELEN(dentry), inum); if (!error) { Index: linux-2.6-xfs/fs/xfs/xfs_utils.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_utils.h +++ linux-2.6-xfs/fs/xfs/xfs_utils.h @@ -20,8 +20,6 @@ #define IRELE(ip) VN_RELE(XFS_ITOV(ip)) #define IHOLD(ip) VN_HOLD(XFS_ITOV(ip)) -#define ITRACE(ip) vn_trace_ref(ip, __FILE__, __LINE__, \ - (inst_t *)__return_address) extern int xfs_get_dir_entry (bhv_vname_t *, xfs_inode_t **); extern int xfs_dir_lookup_int (xfs_inode_t *, uint, bhv_vname_t *, xfs_ino_t *, Index: linux-2.6-xfs/fs/xfs/xfs_vnodeops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vnodeops.c +++ linux-2.6-xfs/fs/xfs/xfs_vnodeops.c @@ -88,7 +88,7 @@ xfs_getattr( bhv_vnode_t *vp = XFS_ITOV(ip); xfs_mount_t *mp = ip->i_mount; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); + xfs_itrace_entry(ip); if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -228,7 +228,7 @@ xfs_setattr( int file_owner; int need_iolock = 1; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); + xfs_itrace_entry(ip); if (mp->m_flags & XFS_MOUNT_RDONLY) return XFS_ERROR(EROFS); @@ -915,8 +915,7 @@ xfs_access( { int error; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); - + xfs_itrace_entry(ip); xfs_ilock(ip, XFS_ILOCK_SHARED); error = xfs_iaccess(ip, mode, credp); xfs_iunlock(ip, XFS_ILOCK_SHARED); @@ -987,7 +986,7 @@ xfs_readlink( int pathlen; int error = 0; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); + xfs_itrace_entry(ip); if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -1033,7 +1032,7 @@ xfs_fsync( int error; int log_flushed = 0, changed = 1; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); + xfs_itrace_entry(ip); ASSERT(start >= 0 && stop >= -1); @@ -1589,7 +1588,7 @@ xfs_inactive( int error; int truncate; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); + xfs_itrace_entry(ip); /* * If the inode is already free, then there can be nothing @@ -1802,7 +1801,7 @@ xfs_lookup( int error; uint lock_mode; - vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); + xfs_itrace_entry(dp); if (XFS_FORCED_SHUTDOWN(dp->i_mount)) return XFS_ERROR(EIO); @@ -1811,7 +1810,7 @@ xfs_lookup( error = xfs_dir_lookup_int(dp, lock_mode, dentry, &e_inum, &ip); if (!error) { *vpp = XFS_ITOV(ip); - ITRACE(ip); + xfs_itrace_ref(ip); } xfs_iunlock_map_shared(dp, lock_mode); return error; @@ -1846,7 +1845,7 @@ xfs_create( int namelen; ASSERT(!*vpp); - vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); + xfs_itrace_entry(dp); dm_di_mode = vap->va_mode; namelen = VNAMELEN(dentry); @@ -1932,7 +1931,7 @@ xfs_create( goto error_return; goto abort_return; } - ITRACE(ip); + xfs_itrace_ref(ip); /* * At this point, we've gotten a newly allocated inode. @@ -2100,7 +2099,7 @@ again: e_inum = ip->i_ino; - ITRACE(ip); + xfs_itrace_ref(ip); /* * We want to lock in increasing inum. Since we've already @@ -2323,7 +2322,7 @@ xfs_remove( uint resblks; int namelen; - vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); + xfs_itrace_entry(dp); if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -2366,9 +2365,8 @@ xfs_remove( dm_di_mode = ip->i_d.di_mode; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); - - ITRACE(ip); + xfs_itrace_entry(ip); + xfs_itrace_ref(ip); error = XFS_QM_DQATTACH(mp, dp, 0); if (!error && dp != ip) @@ -2500,8 +2498,7 @@ xfs_remove( if (link_zero && xfs_inode_is_filestream(ip)) xfs_filestream_deassociate(ip); - vn_trace_exit(ip, __FUNCTION__, (inst_t *)__return_address); - + xfs_itrace_exit(ip); IRELE(ip); /* Fall through to std_return with error = 0 */ @@ -2564,8 +2561,8 @@ xfs_link( char *target_name = VNAME(dentry); int target_namelen; - vn_trace_entry(tdp, __FUNCTION__, (inst_t *)__return_address); - vn_trace_entry(xfs_vtoi(src_vp), __FUNCTION__, (inst_t *)__return_address); + xfs_itrace_entry(tdp); + xfs_itrace_entry(xfs_vtoi(src_vp)); target_namelen = VNAMELEN(dentry); ASSERT(!VN_ISDIR(src_vp)); @@ -2748,7 +2745,7 @@ xfs_mkdir( /* Return through std_return after this point. */ - vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); + xfs_itrace_entry(dp); mp = dp->i_mount; udqp = gdqp = NULL; @@ -2816,7 +2813,7 @@ xfs_mkdir( goto error_return; goto abort_return; } - ITRACE(cdp); + xfs_itrace_ref(cdp); /* * Now we add the directory inode to the transaction. @@ -2942,7 +2939,7 @@ xfs_rmdir( int last_cdp_link; uint resblks; - vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); + xfs_itrace_entry(dp); if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -3047,7 +3044,7 @@ xfs_rmdir( VN_HOLD(dir_vp); } - ITRACE(cdp); + xfs_itrace_ref(cdp); xfs_trans_ijoin(tp, cdp, XFS_ILOCK_EXCL); ASSERT(cdp->i_d.di_nlink >= 2); @@ -3195,8 +3192,7 @@ xfs_symlink( ip = NULL; tp = NULL; - vn_trace_entry(dp, __FUNCTION__, (inst_t *)__return_address); - + xfs_itrace_entry(dp); if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -3325,7 +3321,7 @@ xfs_symlink( goto error_return; goto error1; } - ITRACE(ip); + xfs_itrace_ref(ip); /* * An error after we've joined dp to the transaction will result in the @@ -3487,7 +3483,7 @@ xfs_fid2( { xfs_fid2_t *xfid = (xfs_fid2_t *)fidp; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); + xfs_itrace_entry(ip); ASSERT(sizeof(fid_t) >= sizeof(xfs_fid2_t)); xfid->fid_len = sizeof(xfs_fid2_t) - sizeof(xfid->fid_len); @@ -3669,7 +3665,7 @@ xfs_reclaim( { bhv_vnode_t *vp = XFS_ITOV(ip); - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); + xfs_itrace_entry(ip); ASSERT(!VN_MAPPED(vp)); @@ -3887,7 +3883,7 @@ xfs_alloc_file_space( int committed; int error; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); + xfs_itrace_entry(ip); if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); @@ -4157,7 +4153,7 @@ xfs_free_file_space( vp = XFS_ITOV(ip); mp = ip->i_mount; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); + xfs_itrace_entry(ip); if ((error = XFS_QM_DQATTACH(mp, ip, 0))) return error; @@ -4363,7 +4359,7 @@ xfs_change_file_space( xfs_trans_t *tp; bhv_vattr_t va; - vn_trace_entry(ip, __FUNCTION__, (inst_t *)__return_address); + xfs_itrace_entry(ip); /* * must be a regular file and have write permission Index: linux-2.6-xfs/fs/xfs/xfs.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs.h +++ linux-2.6-xfs/fs/xfs/xfs.h @@ -37,7 +37,7 @@ #define XFS_LOG_TRACE 1 #define XFS_RW_TRACE 1 #define XFS_BUF_TRACE 1 -#define XFS_VNODE_TRACE 1 +#define XFS_INODE_TRACE 1 #define XFS_FILESTREAMS_TRACE 1 #endif Index: linux-2.6-xfs/fs/xfs/xfs_inode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_inode.h +++ linux-2.6-xfs/fs/xfs/xfs_inode.h @@ -300,7 +300,7 @@ typedef struct xfs_inode { xfs_fsize_t i_size; /* in-memory size */ atomic_t i_iocount; /* outstanding I/O count */ /* Trace buffers per inode. */ -#ifdef XFS_VNODE_TRACE +#ifdef XFS_INODE_TRACE struct ktrace *i_trace; /* general inode trace */ #endif #ifdef XFS_BMAP_TRACE Index: linux-2.6-xfs/fs/xfs/xfsidbg.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfsidbg.c +++ linux-2.6-xfs/fs/xfs/xfsidbg.c @@ -113,11 +113,11 @@ static void xfsidbg_xqm_dqtrace(xfs_dquo #ifdef XFS_FILESTREAMS_TRACE static void xfsidbg_filestreams_trace(int); #endif -#ifdef XFS_VNODE_TRACE +#ifdef XFS_INODE_TRACE /* - * Print a vnode trace entry. + * Print a inode trace entry. */ -static int vn_trace_pr_entry(ktrace_entry_t *ktep); +static int xfs_itrace_pr_entry(ktrace_entry_t *ktep); #endif @@ -1443,7 +1443,7 @@ static int kdbm_xfs_xnode( int nextarg = 1; long offset = 0; int diag; -#ifdef XFS_VNODE_TRACE +#ifdef XFS_INODE_TRACE ktrace_entry_t *ktep; ktrace_snap_t kts; #endif @@ -1457,18 +1457,18 @@ static int kdbm_xfs_xnode( xfsidbg_xnode(ip); -#ifdef XFS_VNODE_TRACE +#ifdef XFS_INODE_TRACE kdb_printf("--> itrace @ 0x%lx/0x%p\n", addr, ip->i_trace); if (ip->i_trace == NULL) return 0; ktep = ktrace_first(ip->i_trace, &kts); while (ktep != NULL) { - if (vn_trace_pr_entry(ktep)) + if (xfs_itrace_pr_entry(ktep)) kdb_printf("\n"); ktep = ktrace_next(ip->i_trace, &kts); } -#endif /* XFS_VNODE_TRACE */ +#endif /* XFS_INODE_TRACE */ return 0; } @@ -1784,12 +1784,12 @@ static int kdbm_vnode( return 0; } -#ifdef XFS_VNODE_TRACE +#ifdef XFS_INODE_TRACE /* - * Print a vnode trace entry. + * Print a inode trace entry. */ static int -vn_trace_pr_entry(ktrace_entry_t *ktep) +xfs_itrace_pr_entry(ktrace_entry_t *ktep) { char funcname[128]; kdb_symtab_t symtab; @@ -1812,19 +1812,19 @@ vn_trace_pr_entry(ktrace_entry_t *ktep) switch ((__psint_t)ktep->val[0]) { - case VNODE_KTRACE_ENTRY: + case INODE_KTRACE_ENTRY: kdb_printf("entry to %s i_count = %ld", (char *)ktep->val[1], (long)ktep->val[3]); break; - case VNODE_KTRACE_EXIT: + case INODE_KTRACE_EXIT: kdb_printf("exit from %s i_count = %lu", (char *)ktep->val[1], (long)ktep->val[3]); break; - case VNODE_KTRACE_HOLD: + case INODE_KTRACE_HOLD: if ((__psint_t)ktep->val[3] != 1) kdb_printf("hold @%s:%ld(%s) i_count %ld => %ld ", (char *)ktep->val[1], @@ -1840,7 +1840,7 @@ vn_trace_pr_entry(ktrace_entry_t *ktep) (long)ktep->val[3]); break; - case VNODE_KTRACE_REF: + case INODE_KTRACE_REF: kdb_printf("ref @%s:%ld(%s) i_count = %ld", (char *)ktep->val[1], (long)ktep->val[2], @@ -1848,7 +1848,7 @@ vn_trace_pr_entry(ktrace_entry_t *ktep) (long)ktep->val[3]); break; - case VNODE_KTRACE_RELE: + case INODE_KTRACE_RELE: if ((__psint_t)ktep->val[3] != 1) kdb_printf("rele @%s:%ld(%s) i_count %ld => %ld ", (char *)ktep->val[1], @@ -1865,7 +1865,7 @@ vn_trace_pr_entry(ktrace_entry_t *ktep) break; default: - kdb_printf("unknown vntrace record\n"); + kdb_printf("unknown intrace record\n"); return 1; } @@ -1891,9 +1891,9 @@ vn_trace_pr_entry(ktrace_entry_t *ktep) /* - * Print out the trace buffer attached to the given vnode. + * Print out the trace buffer attached to the given inode. */ -static int kdbm_vntrace( +static int kdbm_iptrace( int argc, const char **argv) { @@ -1917,17 +1917,17 @@ static int kdbm_vntrace( ip = (xfs_inode_t *)addr; if (ip->i_trace == NULL) { - kdb_printf("The vnode trace buffer is not initialized\n"); + kdb_printf("The inode trace buffer is not initialized\n"); return 0; } - kdb_printf("vntrace ip 0x%p\n", ip); + kdb_printf("iptrace ip 0x%p\n", ip); ktep = ktrace_first(ip->i_trace, &kts); while (ktep != NULL) { - if (vn_trace_pr_entry(ktep)) + if (xfs_itrace_pr_entry(ktep)) kdb_printf("\n"); ktep = ktrace_next(ip->i_trace, &kts); @@ -1936,9 +1936,9 @@ static int kdbm_vntrace( return 0; } /* - * Print out the trace buffer attached to the given vnode. + * Print out the trace buffer attached to the given inode. */ -static int kdbm_vntraceaddr( +static int kdbm_iptraceaddr( int argc, const char **argv) { @@ -1961,12 +1961,12 @@ static int kdbm_vntraceaddr( kt = (struct ktrace *)addr; - kdb_printf("vntraceaddr kt 0x%p\n", kt); + kdb_printf("iptraceaddr kt 0x%p\n", kt); ktep = ktrace_first(kt, &kts); while (ktep != NULL) { - if (vn_trace_pr_entry(ktep)) + if (xfs_itrace_pr_entry(ktep)) kdb_printf("\n"); ktep = ktrace_next(kt, &kts); @@ -1974,7 +1974,7 @@ static int kdbm_vntraceaddr( return 0; } -#endif /* XFS_VNODE_TRACE */ +#endif /* XFS_INODE_TRACE */ static void printinode(struct inode *ip) @@ -2393,10 +2393,10 @@ struct xif { static struct xif xfsidbg_funcs[] = { { "vn", kdbm_vn, "", "Dump inode/vnode/trace"}, { "vnode", kdbm_vnode, "", "Dump vnode"}, -#ifdef XFS_VNODE_TRACE - { "vntrace", kdbm_vntrace, "", "Dump vnode Trace"}, - { "vntraceaddr", kdbm_vntraceaddr, "", - "Dump vnode Trace by Address"}, +#ifdef XFS_INODE_TRACE + { "iptrace", kdbm_iptrace, "", "Dump inode Trace"}, + { "iptraceaddr", kdbm_iptraceaddr, "", + "Dump inode Trace by Address"}, #endif { "xagf", kdbm_xfs_xagf, "", "Dump XFS allocation group freespace" }, @@ -6603,7 +6603,7 @@ xfsidbg_xnode(xfs_inode_t *ip) kdb_printf("size %lld\n", ip->i_size); -#ifdef XFS_VNODE_TRACE +#ifdef XFS_INODE_TRACE qprintf(" trace 0x%p\n", ip->i_trace); #endif #ifdef XFS_BMAP_TRACE From owner-xfs@oss.sgi.com Tue Aug 28 13:56:05 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 28 Aug 2007 13:56:08 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7SKu34p027013 for ; Tue, 28 Aug 2007 13:56:05 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l7SKtxXb027363; Tue, 28 Aug 2007 16:55:59 -0400 Received: from lacrosse.corp.redhat.com (lacrosse.corp.redhat.com [172.16.52.154]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7SKtxbI005785; Tue, 28 Aug 2007 16:55:59 -0400 Received: from [10.15.80.10] (neon.msp.redhat.com [10.15.80.10]) by lacrosse.corp.redhat.com (8.12.11.20060308/8.11.6) with ESMTP id l7SKtwJZ006422; Tue, 28 Aug 2007 16:55:59 -0400 Message-ID: <46D48BDE.5000903@sandeen.net> Date: Tue, 28 Aug 2007 15:55:58 -0500 From: Eric Sandeen User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: Christoph Hellwig CC: xfs-oss Subject: [PATCH V2] refactor xfs_mountfs for clarity & stack savings References: <46D37A82.2080608@sandeen.net> <20070828195221.GA7237@infradead.org> In-Reply-To: <20070828195221.GA7237@infradead.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-archive-position: 12694 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Refactoring xfs_mountfs() to call sub-functions for logical chunks can help save a bit of stack, and can make it easier to read this long function. The mount path is one of the longest common callchains, easily getting to within a few bytes of the end of a 4k stack when over lvm, quotas are enabled, and quotacheck must be done. With this change on top of the other stack-related changes I've sent, I can get xfs to survive a normal xfsqa run on 4k stacks over lvm. Signed-off-by: Eric Sandeen Index: linux-2.6-xfs/fs/xfs/xfs_mount.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_mount.c +++ linux-2.6-xfs/fs/xfs/xfs_mount.c @@ -734,49 +734,13 @@ xfs_initialize_perag_data(xfs_mount_t *m } /* - * xfs_mountfs - * - * This function does the following on an initial mount of a file system: - * - reads the superblock from disk and init the mount struct - * - if we're a 32-bit kernel, do a size check on the superblock - * so we don't mount terabyte filesystems - * - init mount struct realtime fields - * - allocate inode hash table for fs - * - init directory manager - * - perform recovery and init the log manager + * Update alignment values based on mount options and sb values */ -int -xfs_mountfs( - xfs_mount_t *mp, - int mfsi_flags) +STATIC int +xfs_update_alignment(xfs_mount_t *mp, int mfsi_flags, __uint64_t *update_flags) { - xfs_buf_t *bp; xfs_sb_t *sbp = &(mp->m_sb); - xfs_inode_t *rip; - bhv_vnode_t *rvp = NULL; - int readio_log, writeio_log; - xfs_daddr_t d; - __uint64_t resblks; - __int64_t update_flags; - uint quotamount, quotaflags; - int agno; - int uuid_mounted = 0; - int error = 0; - if (mp->m_sb_bp == NULL) { - if ((error = xfs_readsb(mp, mfsi_flags))) { - return error; - } - } - xfs_mount_common(mp, sbp); - - /* - * Check if sb_agblocks is aligned at stripe boundary - * If sb_agblocks is NOT aligned turn off m_dalign since - * allocator alignment is within an ag, therefore ag has - * to be aligned at stripe boundary. - */ - update_flags = 0LL; if (mp->m_dalign && !(mfsi_flags & XFS_MFSI_SECOND)) { /* * If stripe unit and stripe width are not multiples @@ -787,8 +751,7 @@ xfs_mountfs( if (mp->m_flags & XFS_MOUNT_RETERR) { cmn_err(CE_WARN, "XFS: alignment check 1 failed"); - error = XFS_ERROR(EINVAL); - goto error1; + return XFS_ERROR(EINVAL); } mp->m_dalign = mp->m_swidth = 0; } else { @@ -798,8 +761,7 @@ xfs_mountfs( mp->m_dalign = XFS_BB_TO_FSBT(mp, mp->m_dalign); if (mp->m_dalign && (sbp->sb_agblocks % mp->m_dalign)) { if (mp->m_flags & XFS_MOUNT_RETERR) { - error = XFS_ERROR(EINVAL); - goto error1; + return XFS_ERROR(EINVAL); } xfs_fs_cmn_err(CE_WARN, mp, "stripe alignment turned off: sunit(%d)/swidth(%d) incompatible with agsize(%d)", @@ -816,8 +778,7 @@ xfs_mountfs( "stripe alignment turned off: sunit(%d) less than bsize(%d)", mp->m_dalign, mp->m_blockmask +1); - error = XFS_ERROR(EINVAL); - goto error1; + return XFS_ERROR(EINVAL); } mp->m_swidth = 0; } @@ -830,11 +791,11 @@ xfs_mountfs( if (XFS_SB_VERSION_HASDALIGN(sbp)) { if (sbp->sb_unit != mp->m_dalign) { sbp->sb_unit = mp->m_dalign; - update_flags |= XFS_SB_UNIT; + *update_flags |= XFS_SB_UNIT; } if (sbp->sb_width != mp->m_swidth) { sbp->sb_width = mp->m_swidth; - update_flags |= XFS_SB_WIDTH; + *update_flags |= XFS_SB_WIDTH; } } } else if ((mp->m_flags & XFS_MOUNT_NOALIGN) != XFS_MOUNT_NOALIGN && @@ -843,49 +804,45 @@ xfs_mountfs( mp->m_swidth = sbp->sb_width; } - xfs_alloc_compute_maxlevels(mp); - xfs_bmap_compute_maxlevels(mp, XFS_DATA_FORK); - xfs_bmap_compute_maxlevels(mp, XFS_ATTR_FORK); - xfs_ialloc_compute_maxlevels(mp); + return 0; +} - if (sbp->sb_imax_pct) { - __uint64_t icount; +/* + * Set the maximum inode count for this filesystem + */ +STATIC void +xfs_set_maxicount(xfs_mount_t *mp) +{ + xfs_sb_t *sbp = &(mp->m_sb); + __uint64_t icount; - /* Make sure the maximum inode count is a multiple of the - * units we allocate inodes in. + if (sbp->sb_imax_pct) { + /* + * Make sure the maximum inode count is a multiple + * of the units we allocate inodes in. */ - icount = sbp->sb_dblocks * sbp->sb_imax_pct; do_div(icount, 100); do_div(icount, mp->m_ialloc_blks); mp->m_maxicount = (icount * mp->m_ialloc_blks) << sbp->sb_inopblog; - } else + } else { mp->m_maxicount = 0; - - mp->m_maxioffset = xfs_max_file_offset(sbp->sb_blocklog); - - /* - * XFS uses the uuid from the superblock as the unique - * identifier for fsid. We can not use the uuid from the volume - * since a single partition filesystem is identical to a single - * partition volume/filesystem. - */ - if ((mfsi_flags & XFS_MFSI_SECOND) == 0 && - (mp->m_flags & XFS_MOUNT_NOUUID) == 0) { - if (xfs_uuid_mount(mp)) { - error = XFS_ERROR(EINVAL); - goto error1; - } - uuid_mounted=1; } +} + +/* + * Set the default minimum read and write sizes unless + * already specified in a mount option. + * We use smaller I/O sizes when the file system + * is being used for NFS service (wsync mount option). + */ +STATIC void +xfs_set_rw_sizes(xfs_mount_t *mp) +{ + xfs_sb_t *sbp = &(mp->m_sb); + int readio_log, writeio_log; - /* - * Set the default minimum read and write sizes unless - * already specified in a mount option. - * We use smaller I/O sizes when the file system - * is being used for NFS service (wsync mount option). - */ if (!(mp->m_flags & XFS_MOUNT_DFLT_IOSIZE)) { if (mp->m_flags & XFS_MOUNT_WSYNC) { readio_log = XFS_WSYNC_READIO_LOG; @@ -911,17 +868,14 @@ xfs_mountfs( mp->m_writeio_log = writeio_log; } mp->m_writeio_blocks = 1 << (mp->m_writeio_log - sbp->sb_blocklog); +} - /* - * Set the inode cluster size. - * This may still be overridden by the file system - * block size if it is larger than the chosen cluster size. - */ - mp->m_inode_cluster_size = XFS_INODE_BIG_CLUSTER_SIZE; - - /* - * Set whether we're using inode alignment. - */ +/* + * Set whether we're using inode alignment. + */ +STATIC void +xfs_set_inoalignment(xfs_mount_t *mp) +{ if (XFS_SB_VERSION_HASALIGN(&mp->m_sb) && mp->m_sb.sb_inoalignmt >= XFS_B_TO_FSBT(mp, mp->m_inode_cluster_size)) @@ -937,14 +891,22 @@ xfs_mountfs( mp->m_sinoalign = mp->m_dalign; else mp->m_sinoalign = 0; - /* - * Check that the data (and log if separate) are an ok size. - */ +} + +/* + * Check that the data (and log if separate) are an ok size. + */ +STATIC int +xfs_check_sizes(xfs_mount_t *mp, int mfsi_flags) +{ + xfs_buf_t *bp; + xfs_daddr_t d; + int error; + d = (xfs_daddr_t)XFS_FSB_TO_BB(mp, mp->m_sb.sb_dblocks); if (XFS_BB_TO_FSB(mp, d) != mp->m_sb.sb_dblocks) { cmn_err(CE_WARN, "XFS: size check 1 failed"); - error = XFS_ERROR(E2BIG); - goto error1; + return XFS_ERROR(E2BIG); } error = xfs_read_buf(mp, mp->m_ddev_targp, d - XFS_FSS_TO_BB(mp, 1), @@ -953,10 +915,9 @@ xfs_mountfs( xfs_buf_relse(bp); } else { cmn_err(CE_WARN, "XFS: size check 2 failed"); - if (error == ENOSPC) { + if (error == ENOSPC) error = XFS_ERROR(E2BIG); - } - goto error1; + return error; } if (((mfsi_flags & XFS_MFSI_CLIENT) == 0) && @@ -964,8 +925,7 @@ xfs_mountfs( d = (xfs_daddr_t)XFS_FSB_TO_BB(mp, mp->m_sb.sb_logblocks); if (XFS_BB_TO_FSB(mp, d) != mp->m_sb.sb_logblocks) { cmn_err(CE_WARN, "XFS: size check 3 failed"); - error = XFS_ERROR(E2BIG); - goto error1; + return XFS_ERROR(E2BIG); } error = xfs_read_buf(mp, mp->m_logdev_targp, d - XFS_FSB_TO_BB(mp, 1), @@ -974,17 +934,110 @@ xfs_mountfs( xfs_buf_relse(bp); } else { cmn_err(CE_WARN, "XFS: size check 3 failed"); - if (error == ENOSPC) { + if (error == ENOSPC) error = XFS_ERROR(E2BIG); - } + return error; + } + } + return 0; +} + +/* + * xfs_mountfs + * + * This function does the following on an initial mount of a file system: + * - reads the superblock from disk and init the mount struct + * - if we're a 32-bit kernel, do a size check on the superblock + * so we don't mount terabyte filesystems + * - init mount struct realtime fields + * - allocate inode hash table for fs + * - init directory manager + * - perform recovery and init the log manager + */ +int +xfs_mountfs( + xfs_mount_t *mp, + int mfsi_flags) +{ + xfs_sb_t *sbp = &(mp->m_sb); + xfs_inode_t *rip; + bhv_vnode_t *rvp = NULL; + __uint64_t resblks; + __int64_t update_flags = 0LL; + uint quotamount, quotaflags; + int agno; + int uuid_mounted = 0; + int error = 0; + + if (mp->m_sb_bp == NULL) { + error = xfs_readsb(mp, mfsi_flags); + if (error) + return error; + } + xfs_mount_common(mp, sbp); + + /* + * Check if sb_agblocks is aligned at stripe boundary + * If sb_agblocks is NOT aligned turn off m_dalign since + * allocator alignment is within an ag, therefore ag has + * to be aligned at stripe boundary. + */ + error = xfs_update_alignment(mp, mfsi_flags, &update_flags); + if (error) + goto error1; + + xfs_alloc_compute_maxlevels(mp); + xfs_bmap_compute_maxlevels(mp, XFS_DATA_FORK); + xfs_bmap_compute_maxlevels(mp, XFS_ATTR_FORK); + xfs_ialloc_compute_maxlevels(mp); + + xfs_set_maxicount(mp); + + mp->m_maxioffset = xfs_max_file_offset(sbp->sb_blocklog); + + /* + * XFS uses the uuid from the superblock as the unique + * identifier for fsid. We can not use the uuid from the volume + * since a single partition filesystem is identical to a single + * partition volume/filesystem. + */ + if ((mfsi_flags & XFS_MFSI_SECOND) == 0 && + (mp->m_flags & XFS_MOUNT_NOUUID) == 0) { + if (xfs_uuid_mount(mp)) { + error = XFS_ERROR(EINVAL); goto error1; } } /* + * Set the minimum read and write sizes + */ + xfs_set_rw_sizes(mp); + + /* + * Set the inode cluster size. + * This may still be overridden by the file system + * block size if it is larger than the chosen cluster size. + */ + mp->m_inode_cluster_size = XFS_INODE_BIG_CLUSTER_SIZE; + + /* + * Set inode alignment fields + */ + xfs_set_inoalignment(mp); + + /* + * Check that the data (and log if separate) are an ok size. + */ + error = xfs_check_sizes(mp, mfsi_flags); + if (error) + goto error1; + + /* * Initialize realtime fields in the mount structure */ - if ((error = xfs_rtmount_init(mp))) { + error = xfs_rtmount_init(mp); + if (error) { cmn_err(CE_WARN, "XFS: RT mount failed"); goto error1; } @@ -1102,7 +1155,8 @@ xfs_mountfs( /* * Initialize realtime inode pointers in the mount structure */ - if ((error = xfs_rtmount_inodes(mp))) { + error = xfs_rtmount_inodes(mp); + if (error) { /* * Free up the root inode. */ @@ -1120,7 +1174,8 @@ xfs_mountfs( /* * Initialise the XFS quota management subsystem for this mount */ - if ((error = XFS_QM_INIT(mp, "amount, "aflags))) + error = XFS_QM_INIT(mp, "amount, "aflags); + if (error) goto error4; /* @@ -1137,7 +1192,8 @@ xfs_mountfs( /* * Complete the quota initialisation, post-log-replay component. */ - if ((error = XFS_QM_MOUNT(mp, quotamount, quotaflags, mfsi_flags))) + error = XFS_QM_MOUNT(mp, quotamount, quotaflags, mfsi_flags); + if (error) goto error4; /* From owner-xfs@oss.sgi.com Tue Aug 28 14:10:45 2007 Received: with ECARTIS (v1.0.0; list xfs); Tue, 28 Aug 2007 14:10:48 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7SLAi4p030052 for ; Tue, 28 Aug 2007 14:10:45 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l7SLAiLi002571 for ; Tue, 28 Aug 2007 17:10:44 -0400 Received: from lacrosse.corp.redhat.com (lacrosse.corp.redhat.com [172.16.52.154]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l7SLAiIm012516 for ; Tue, 28 Aug 2007 17:10:44 -0400 Received: from [10.15.80.10] (neon.msp.redhat.com [10.15.80.10]) by lacrosse.corp.redhat.com (8.12.11.20060308/8.11.6) with ESMTP id l7SLAiS9010028 for ; Tue, 28 Aug 2007 17:10:44 -0400 Message-ID: <46D48F54.8080200@sandeen.net> Date: Tue, 28 Aug 2007 16:10:44 -0500 From: Eric Sandeen User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: xfs mailing list Subject: [PATCH] fix up XFS_ERROR() usage in xfs_lrw.c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-archive-position: 12695 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Fix up a couple of XFS_ERROR callers who send a negative errno rather than negating the macro itself, at odds with all other callers (if xfs_etrap contained EINVAL this would not be caught) (hm, should xfs_read be using generic_segment_checks?) Signed-off-by: Eric Sandeen Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_lrw.c +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c @@ -210,7 +210,7 @@ xfs_read( */ size += iv->iov_len; if (unlikely((ssize_t)(size|iv->iov_len) < 0)) - return XFS_ERROR(-EINVAL); + return -XFS_ERROR(EINVAL); } /* END copy & waste from filemap.c */ @@ -740,7 +740,7 @@ start: if ((pos & target->bt_smask) || (count & target->bt_smask)) { xfs_iunlock(xip, XFS_ILOCK_EXCL|iolock); - return XFS_ERROR(-EINVAL); + return -XFS_ERROR(EINVAL); } if (!need_i_mutex && (VN_CACHED(vp) || pos > xip->i_size)) { From owner-xfs@oss.sgi.com Wed Aug 29 06:46:16 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 29 Aug 2007 06:46:17 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_65, J_CHICKENPOX_66 autolearn=no version=3.2.0-pre1-r499012 Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7TDkD4p028794 for ; Wed, 29 Aug 2007 06:46:15 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id l7TDkCA5000726 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Wed, 29 Aug 2007 15:46:12 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id l7TDkC6D000724 for xfs@oss.sgi.com; Wed, 29 Aug 2007 15:46:12 +0200 Date: Wed, 29 Aug 2007 15:46:12 +0200 From: Christoph Hellwig To: xfs@oss.sgi.com Subject: [PATCH] cleanup fid types mess Message-ID: <20070829134612.GA504@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 12696 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@lst.de Precedence: bulk X-list: xfs Currently XFs has three different fid types: struct fid, struct xfs_fid and struct xfs_fid2 with hte latter two beeing identicaly and the first one beeing the same size but an unstructured array with the same size. This patch consolidates all this to alway uuse struct xfs_fid. This patch is required for an upcoming patch series from me that revamps the nfs exporting code and introduces a Linux-wide struct fid. Note: the patch is ontop of Eric's inode/vnode tracing cleanup. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_export.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_export.c 2007-08-29 15:36:20.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_export.c 2007-08-29 15:37:09.000000000 +0200 @@ -54,8 +54,8 @@ xfs_fs_decode_fh( struct dentry *de), void *context) { - xfs_fid2_t ifid; - xfs_fid2_t pfid; + xfs_fid_t ifid; + xfs_fid_t pfid; void *parent = NULL; int is64 = 0; __u32 *p = fh; @@ -144,7 +144,7 @@ xfs_fs_get_dentry( struct dentry *result; int error; - error = xfs_vget(XFS_M(sb), &vp, (fid_t *)data); + error = xfs_vget(XFS_M(sb), &vp, data); if (error || vp == NULL) return ERR_PTR(-ESTALE) ; Index: linux-2.6-xfs/fs/xfs/xfs_fs.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_fs.h 2007-08-29 15:36:20.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_fs.h 2007-08-29 15:37:09.000000000 +0200 @@ -389,30 +389,13 @@ typedef struct xfs_fsop_attrmulti_handle */ typedef struct { __u32 val[2]; } xfs_fsid_t; /* file system id type */ - -#ifndef HAVE_FID -#define MAXFIDSZ 46 - -typedef struct fid { - __u16 fid_len; /* length of data in bytes */ - unsigned char fid_data[MAXFIDSZ]; /* data (fid_len worth) */ -} fid_t; -#endif - typedef struct xfs_fid { - __u16 xfs_fid_len; /* length of remainder */ - __u16 xfs_fid_pad; - __u32 xfs_fid_gen; /* generation number */ - __u64 xfs_fid_ino; /* 64 bits inode number */ + __u16 fid_len; /* length of remainder */ + __u16 fid_pad; + __u32 fid_gen; /* generation number */ + __u64 fid_ino; /* 64 bits inode number */ } xfs_fid_t; -typedef struct xfs_fid2 { - __u16 fid_len; /* length of remainder */ - __u16 fid_pad; /* padding, must be zero */ - __u32 fid_gen; /* generation number */ - __u64 fid_ino; /* inode number */ -} xfs_fid2_t; - typedef struct xfs_handle { union { __s64 align; /* force alignment of ha_fid */ @@ -422,9 +405,9 @@ typedef struct xfs_handle { } xfs_handle_t; #define ha_fsid ha_u._ha_fsid -#define XFS_HSIZE(handle) (((char *) &(handle).ha_fid.xfs_fid_pad \ +#define XFS_HSIZE(handle) (((char *) &(handle).ha_fid.fid_pad \ - (char *) &(handle)) \ - + (handle).ha_fid.xfs_fid_len) + + (handle).ha_fid.fid_len) /* * Flags for going down operation Index: linux-2.6-xfs/fs/xfs/xfs_vfsops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vfsops.c 2007-08-29 15:36:20.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vfsops.c 2007-08-29 15:37:09.000000000 +0200 @@ -1635,9 +1635,8 @@ int xfs_vget( xfs_mount_t *mp, bhv_vnode_t **vpp, - fid_t *fidp) + xfs_fid_t *xfid) { - xfs_fid_t *xfid = (struct xfs_fid *)fidp; xfs_inode_t *ip; int error; xfs_ino_t ino; @@ -1647,11 +1646,11 @@ xfs_vget( * Invalid. Since handles can be created in user space and passed in * via gethandle(), this is not cause for a panic. */ - if (xfid->xfs_fid_len != sizeof(*xfid) - sizeof(xfid->xfs_fid_len)) + if (xfid->fid_len != sizeof(*xfid) - sizeof(xfid->fid_len)) return XFS_ERROR(EINVAL); - ino = xfid->xfs_fid_ino; - igen = xfid->xfs_fid_gen; + ino = xfid->fid_ino; + igen = xfid->fid_gen; /* * NFS can sometimes send requests for ino 0. Fail them gracefully. Index: linux-2.6-xfs/fs/xfs/xfs_vnodeops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vnodeops.c 2007-08-29 15:36:47.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vnodeops.c 2007-08-29 15:37:48.000000000 +0200 @@ -3470,23 +3470,14 @@ std_return: } -/* - * xfs_fid2 - * - * A fid routine that takes a pointer to a previously allocated - * fid structure (like xfs_fast_fid) but uses a 64 bit inode number. - */ int xfs_fid2( xfs_inode_t *ip, - fid_t *fidp) + xfs_fid_t *xfid) { - xfs_fid2_t *xfid = (xfs_fid2_t *)fidp; - xfs_itrace_entry(ip); - ASSERT(sizeof(fid_t) >= sizeof(xfs_fid2_t)); - xfid->fid_len = sizeof(xfs_fid2_t) - sizeof(xfid->fid_len); + xfid->fid_len = sizeof(xfs_fid_t) - sizeof(xfid->fid_len); xfid->fid_pad = 0; /* * use memcpy because the inode is a long long and there's no Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_ioctl.c 2007-08-29 15:36:46.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_ioctl.c 2007-08-29 15:37:09.000000000 +0200 @@ -152,11 +152,11 @@ xfs_find_handle( lock_mode = xfs_ilock_map_shared(ip); /* fill in fid section of handle from inode */ - handle.ha_fid.xfs_fid_len = sizeof(xfs_fid_t) - - sizeof(handle.ha_fid.xfs_fid_len); - handle.ha_fid.xfs_fid_pad = 0; - handle.ha_fid.xfs_fid_gen = ip->i_d.di_gen; - handle.ha_fid.xfs_fid_ino = ip->i_ino; + handle.ha_fid.fid_len = sizeof(xfs_fid_t) - + sizeof(handle.ha_fid.fid_len); + handle.ha_fid.fid_pad = 0; + handle.ha_fid.fid_gen = ip->i_d.di_gen; + handle.ha_fid.fid_ino = ip->i_ino; xfs_iunlock_map_shared(ip, lock_mode); @@ -222,10 +222,10 @@ xfs_vget_fsop_handlereq( if (hlen < sizeof(*handlep)) memset(((char *)handlep) + hlen, 0, sizeof(*handlep) - hlen); if (hlen > sizeof(handlep->ha_fsid)) { - if (handlep->ha_fid.xfs_fid_len != - (hlen - sizeof(handlep->ha_fsid) - - sizeof(handlep->ha_fid.xfs_fid_len)) - || handlep->ha_fid.xfs_fid_pad) + if (handlep->ha_fid.fid_len != + (hlen - sizeof(handlep->ha_fsid) - + sizeof(handlep->ha_fid.fid_len)) || + handlep->ha_fid.fid_pad) return XFS_ERROR(EINVAL); } @@ -233,9 +233,9 @@ xfs_vget_fsop_handlereq( * Crack the handle, obtain the inode # & generation # */ xfid = (struct xfs_fid *)&handlep->ha_fid; - if (xfid->xfs_fid_len == sizeof(*xfid) - sizeof(xfid->xfs_fid_len)) { - ino = xfid->xfs_fid_ino; - igen = xfid->xfs_fid_gen; + if (xfid->fid_len == sizeof(*xfid) - sizeof(xfid->fid_len)) { + ino = xfid->fid_ino; + igen = xfid->fid_gen; } else { return XFS_ERROR(EINVAL); } Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_export.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_export.h 2007-08-29 15:36:20.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_export.h 2007-08-29 15:37:09.000000000 +0200 @@ -71,13 +71,13 @@ xfs_fileid_length(int hasparent, int is6 /* * Decode encoded inode information (either for the inode itself - * or the parent) into an xfs_fid2_t structure. Advances and + * or the parent) into an xfs_fid_t structure. Advances and * returns the new data pointer */ static inline __u32 * -xfs_fileid_decode_fid2(__u32 *p, xfs_fid2_t *fid, int is64) +xfs_fileid_decode_fid2(__u32 *p, xfs_fid_t *fid, int is64) { - fid->fid_len = sizeof(xfs_fid2_t) - sizeof(fid->fid_len); + fid->fid_len = sizeof(xfs_fid_t) - sizeof(fid->fid_len); fid->fid_pad = 0; fid->fid_ino = *p++; #if XFS_BIG_INUMS Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm.c 2007-08-29 15:36:20.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm.c 2007-08-29 15:37:09.000000000 +0200 @@ -647,11 +647,11 @@ dm_dip_to_handle( dm_handle_t *handlep) { dm_fid_t fid; - xfs_fid2_t *xfid; + struct xfs_fid *xfid; int hsize; - xfid = (xfs_fid2_t *)&fid; - xfid->fid_len = sizeof(xfs_fid2_t) - sizeof(xfid->fid_len); + xfid = (struct xfs_fid *)&fid; + xfid->fid_len = sizeof(struct xfs_fid) - sizeof(xfid->fid_len); xfid->fid_pad = 0; xfid->fid_ino = ino; xfid->fid_gen = be32_to_cpu(dip->di_core.di_gen); Index: linux-2.6-xfs/fs/xfs/dmapi/xfs_dm_fsops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/dmapi/xfs_dm_fsops.c 2007-08-29 15:36:20.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/dmapi/xfs_dm_fsops.c 2007-08-29 15:37:09.000000000 +0200 @@ -67,14 +67,14 @@ xfs_dm_fh_to_inode( bhv_vnode_t *vp = NULL; xfs_mount_t *mp = XFS_M(sb); int error; - fid_t fid; + struct xfs_fid xfid; /* Returns negative errors to DMAPI */ *ip = NULL; - memcpy(&fid, dmfid, sizeof(*dmfid)); - if (fid.fid_len) { /* file object handle */ - error = xfs_vget(mp, &vp, &fid); + memcpy(&xfid, dmfid, sizeof(*dmfid)); + if (xfid.fid_len) { /* file object handle */ + error = xfs_vget(mp, &vp, &xfid); } else { /* filesystem handle */ error = xfs_root(mp, &vp); @@ -92,17 +92,17 @@ xfs_dm_inode_to_fh( { xfs_inode_t *ip = XFS_I(inode); int error; - fid_t fid; + struct xfs_fid xfid; /* Returns negative errors to DMAPI */ if (ip->i_mount->m_fixedfsid == NULL) return -EINVAL; - error = xfs_fid2(ip, &fid); + error = xfs_fid2(ip, &xfid); if (error) return -error; /* Return negative error to DMAPI */ - memcpy(dmfid, &fid, sizeof(*dmfid)); + memcpy(dmfid, &xfid, sizeof(*dmfid)); memcpy(dmfsid, ip->i_mount->m_fixedfsid, sizeof(*dmfsid)); return 0; } Index: linux-2.6-xfs/fs/xfs/xfs_vfsops.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vfsops.h 2007-08-29 15:36:21.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vfsops.h 2007-08-29 15:37:09.000000000 +0200 @@ -2,7 +2,7 @@ #define _XFS_VFSOPS_H 1 struct cred; -struct fid; +struct xfs_fid; struct inode; struct kstatfs; struct xfs_mount; @@ -17,7 +17,7 @@ int xfs_root(struct xfs_mount *mp, bhv_v int xfs_statvfs(struct xfs_mount *mp, struct kstatfs *statp, bhv_vnode_t *vp); int xfs_sync(struct xfs_mount *mp, int flags); -int xfs_vget(struct xfs_mount *mp, bhv_vnode_t **vpp, struct fid *fidp); +int xfs_vget(struct xfs_mount *mp, bhv_vnode_t **vpp, struct xfs_fid *xfid); int xfs_parseargs(struct xfs_mount *mp, char *options, struct xfs_mount_args *args, int update); int xfs_showargs(struct xfs_mount *mp, struct seq_file *m); Index: linux-2.6-xfs/fs/xfs/xfs_vnodeops.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_vnodeops.h 2007-08-29 15:36:20.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/xfs_vnodeops.h 2007-08-29 15:37:09.000000000 +0200 @@ -39,7 +39,7 @@ int xfs_readdir(struct xfs_inode *dp, vo int xfs_symlink(struct xfs_inode *dp, bhv_vname_t *dentry, struct bhv_vattr *vap, char *target_path, bhv_vnode_t **vpp, struct cred *credp); -int xfs_fid2(struct xfs_inode *ip, fid_t *fidp); +int xfs_fid2(struct xfs_inode *ip, struct xfs_fid *xfid); int xfs_rwlock(struct xfs_inode *ip, bhv_vrwlock_t locktype); void xfs_rwunlock(struct xfs_inode *ip, bhv_vrwlock_t locktype); int xfs_inode_flush(struct xfs_inode *ip, int flags); From owner-xfs@oss.sgi.com Wed Aug 29 19:31:57 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 29 Aug 2007 19:32:00 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,BAYES_50 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7U2Vn4p021941 for ; Wed, 29 Aug 2007 19:31:56 -0700 Received: from [134.14.55.78] (redback.melbourne.sgi.com [134.14.55.78]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id MAA06983; Thu, 30 Aug 2007 12:10:34 +1000 Message-ID: <46D6279F.40601@sgi.com> Date: Thu, 30 Aug 2007 12:12:47 +1000 From: Lachlan McIlroy User-Agent: Thunderbird 2.0.0.4 (X11/20070604) MIME-Version: 1.0 To: xfs-dev CC: xfs-oss Subject: [PATCH] log replay should not overwrite newer ondisk inodes Content-Type: multipart/mixed; boundary="------------080903080506070106090000" X-archive-position: 12697 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: lachlan@sgi.com Precedence: bulk X-list: xfs This is a multi-part message in MIME format. --------------080903080506070106090000 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Log replay of clustered inodes currently ignores the flushiter field in the inode that is used to determine if the on-disk inode is more up to date than the copy in the log. As a result during log replay the newer inode is being overwritten with an older version and file size updates are being lost. I haven't handled the case of the flushiter counter overflowing but that shouldn't be a problem in this case. The log buffer contains newly created inodes so their flushiter values will be 0 and the on-disk inodes should not be much greater. Lachlan --------------080903080506070106090000 Content-Type: text/x-patch; name="xfs_log_recover.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xfs_log_recover.diff" --- fs/xfs/xfs_log_recover.c_1.322 2007-08-27 17:45:45.000000000 +1000 +++ fs/xfs/xfs_log_recover.c 2007-08-30 11:50:44.000000000 +1000 @@ -1866,6 +1866,27 @@ xlog_recover_do_inode_buffer( } /* + * Check if we need to recover an inode from a buffer + */ +int +xfs_recover_inode( + char *dest, + char *src) +{ + xfs_dinode_t *dip = (xfs_dinode_t *)dest; + xfs_dinode_t *dilp = (xfs_dinode_t*)src; + + if ((be16_to_cpu(dip->di_core.di_magic) == XFS_DINODE_MAGIC) && + (be16_to_cpu(dilp->di_core.di_magic) == XFS_DINODE_MAGIC) && + (be16_to_cpu(dilp->di_core.di_flushiter) < + be16_to_cpu(dip->di_core.di_flushiter))) { + return 1; + } + + return 0; +} + +/* * Perform a 'normal' buffer recovery. Each logged region of the * buffer should be copied over the corresponding region in the * given buffer. The bitmap in the buf log format structure indicates @@ -1917,6 +1938,13 @@ xlog_recover_do_reg_buffer( -1, 0, XFS_QMOPT_DOWARN, "dquot_buf_recover"); } + /* + * Sanity check if this is an inode buffer. + */ + if (!error) + error = xfs_recover_inode(xfs_buf_offset(bp, + (uint)bit << XFS_BLI_SHIFT), + item->ri_buf[i].i_addr); if (!error) memcpy(xfs_buf_offset(bp, (uint)bit << XFS_BLI_SHIFT), /* dest */ --------------080903080506070106090000-- From owner-xfs@oss.sgi.com Wed Aug 29 21:31:19 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 29 Aug 2007 21:31:21 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=AWL,BAYES_40,J_CHICKENPOX_51 autolearn=no version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7U4VG4p008579 for ; Wed, 29 Aug 2007 21:31:18 -0700 Received: from boing.melbourne.sgi.com (boing.melbourne.sgi.com [134.14.55.141]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id OAA12830; Thu, 30 Aug 2007 14:31:11 +1000 Message-ID: <46D6480F.4040307@sgi.com> Date: Thu, 30 Aug 2007 14:31:11 +1000 From: Timothy Shimmin User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Lachlan McIlroy CC: xfs-dev , xfs-oss Subject: Re: [PATCH] log replay should not overwrite newer ondisk inodes References: <46D6279F.40601@sgi.com> In-Reply-To: <46D6279F.40601@sgi.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 12698 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: tes@sgi.com Precedence: bulk X-list: xfs Lachlan McIlroy wrote: > Log replay of clustered inodes currently ignores the flushiter > field in the inode that is used to determine if the on-disk inode > is more up to date than the copy in the log. As a result during > log replay the newer inode is being overwritten with an older > version and file size updates are being lost. > > I haven't handled the case of the flushiter counter overflowing > but that shouldn't be a problem in this case. The log buffer > contains newly created inodes so their flushiter values will be 0 > and the on-disk inodes should not be much greater. > > Lachlan > Still would want to understand why blf_flags doesn't have XFS_BLI_INODE_ALLOC_BUF set and so we could test that - I didn't understand Dave's (dgc) response about that earlier. But anyway...:) Just some nit-picks: * instead of a comment and then calling xfs_recover_inode why don't we just give the function a better name. When I see the name I think it is going to recover the inode but instead it is just a flush_iter check and matching the magic#s. * My style preference is for option 2 over option 1: 1. if (a) { return 1; } return 0; 2. return a; But I understand the predicate is long and sometimes people like to add tracing/debug for the alternate paths in which case (1) is handy for that. I just like simplicity. * Also it is funny to return a boolean for error in the call. Although, I see that is consistent with the rest of the function. But I'm not sure this is an error... Hmmmm...I'm a bit confused. So you are _almost_ combining an error check with a flushiter check? If one buffer is an inode magic# and the other isn't then we have an error right - and could report it - but we are not doing that here. If we have an inode buf and the flushiter on the item is older than the ondisk buffer one then it is not an error but we just don't want to recover it. --Tim --- fs/xfs/xfs_log_recover.c_1.322 2007-08-27 17:45:45.000000000 +1000 +++ fs/xfs/xfs_log_recover.c 2007-08-30 11:50:44.000000000 +1000 @@ -1866,6 +1866,27 @@ xlog_recover_do_inode_buffer( } /* + * Check if we need to recover an inode from a buffer + */ +int +xfs_recover_inode( + char *dest, + char *src) +{ + xfs_dinode_t *dip = (xfs_dinode_t *)dest; + xfs_dinode_t *dilp = (xfs_dinode_t*)src; + + if ((be16_to_cpu(dip->di_core.di_magic) == XFS_DINODE_MAGIC) && + (be16_to_cpu(dilp->di_core.di_magic) == XFS_DINODE_MAGIC) && + (be16_to_cpu(dilp->di_core.di_flushiter) < + be16_to_cpu(dip->di_core.di_flushiter))) { + return 1; + } + + return 0; +} + +/* * Perform a 'normal' buffer recovery. Each logged region of the * buffer should be copied over the corresponding region in the * given buffer. The bitmap in the buf log format structure indicates @@ -1917,6 +1938,13 @@ xlog_recover_do_reg_buffer( -1, 0, XFS_QMOPT_DOWARN, "dquot_buf_recover"); } + /* + * Sanity check if this is an inode buffer. + */ + if (!error) + error = xfs_recover_inode(xfs_buf_offset(bp, + (uint)bit << XFS_BLI_SHIFT), + item->ri_buf[i].i_addr); if (!error) memcpy(xfs_buf_offset(bp, (uint)bit << XFS_BLI_SHIFT), /* dest */ From owner-xfs@oss.sgi.com Wed Aug 29 21:48:48 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 29 Aug 2007 21:48:49 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_51 autolearn=no version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7U4mi4p010988 for ; Wed, 29 Aug 2007 21:48:46 -0700 Received: from [134.14.55.78] (redback.melbourne.sgi.com [134.14.55.78]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id OAA13502; Thu, 30 Aug 2007 14:48:40 +1000 Message-ID: <46D64CAD.6050705@sgi.com> Date: Thu, 30 Aug 2007 14:50:53 +1000 From: Lachlan McIlroy User-Agent: Thunderbird 2.0.0.4 (X11/20070604) MIME-Version: 1.0 To: Timothy Shimmin CC: xfs-dev , xfs-oss Subject: Re: [PATCH] log replay should not overwrite newer ondisk inodes References: <46D6279F.40601@sgi.com> <46D6480F.4040307@sgi.com> In-Reply-To: <46D6480F.4040307@sgi.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 12699 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: lachlan@sgi.com Precedence: bulk X-list: xfs Timothy Shimmin wrote: > Lachlan McIlroy wrote: >> Log replay of clustered inodes currently ignores the flushiter >> field in the inode that is used to determine if the on-disk inode >> is more up to date than the copy in the log. As a result during >> log replay the newer inode is being overwritten with an older >> version and file size updates are being lost. >> >> I haven't handled the case of the flushiter counter overflowing >> but that shouldn't be a problem in this case. The log buffer >> contains newly created inodes so their flushiter values will be 0 >> and the on-disk inodes should not be much greater. >> >> Lachlan >> > > Still would want to understand why blf_flags doesn't have > XFS_BLI_INODE_ALLOC_BUF set and so we could test that > - I didn't understand Dave's (dgc) response about that earlier. > But anyway...:) > > > Just some nit-picks: > > * instead of a comment and then calling xfs_recover_inode > why don't we just give the function a better name. > When I see the name I think it is going to recover the inode > but instead it is just a flush_iter check and matching > the magic#s. What would you like the function to be called? > > * My style preference is for option 2 over option 1: > 1. > if (a) { > return 1; > } > return 0; > > 2. > return a; > > But I understand the predicate is long and sometimes people like > to add tracing/debug for the alternate paths in which case (1) > is handy for that. I just like simplicity. I can change that. It just looks odd when the body of the function is after the return statement. > > * Also it is funny to return a boolean for error in the call. > Although, I see that is consistent with the rest of the function. Yep, keeping consistent with coding standards. > But I'm not sure this is an error... > Hmmmm...I'm a bit confused. > So you are _almost_ combining an error check with a flushiter check? > If one buffer is an inode magic# and the other isn't then we > have an error right - and could report it - but we are not doing that > here. Not exactly. If what's on disk is not an inode but the log item is then that could be because we haven't written the inode to disk yet and we need to perform recovery. If what's on disk is an inode but the log item is not an inode then what we are about to recover is not an inode and we abort the check. If neither on-disk nor log item are inodes then we've got no business continuing the check. > If we have an inode buf and the flushiter on the item is older than > the ondisk buffer > one then it is not an error but we just don't want to recover it. Exactly. > > > > --Tim > > > --- fs/xfs/xfs_log_recover.c_1.322 2007-08-27 17:45:45.000000000 +1000 > +++ fs/xfs/xfs_log_recover.c 2007-08-30 11:50:44.000000000 +1000 > @@ -1866,6 +1866,27 @@ xlog_recover_do_inode_buffer( > } > > /* > + * Check if we need to recover an inode from a buffer > + */ > +int > +xfs_recover_inode( > + char *dest, > + char *src) > +{ > + xfs_dinode_t *dip = (xfs_dinode_t *)dest; > + xfs_dinode_t *dilp = (xfs_dinode_t*)src; > + > + if ((be16_to_cpu(dip->di_core.di_magic) == XFS_DINODE_MAGIC) && > + (be16_to_cpu(dilp->di_core.di_magic) == XFS_DINODE_MAGIC) && > + (be16_to_cpu(dilp->di_core.di_flushiter) < > + be16_to_cpu(dip->di_core.di_flushiter))) { > + return 1; > + } > + > + return 0; > +} > + > +/* > * Perform a 'normal' buffer recovery. Each logged region of the > * buffer should be copied over the corresponding region in the > * given buffer. The bitmap in the buf log format structure indicates > @@ -1917,6 +1938,13 @@ xlog_recover_do_reg_buffer( > -1, 0, XFS_QMOPT_DOWARN, > "dquot_buf_recover"); > } > + /* > + * Sanity check if this is an inode buffer. > + */ > + if (!error) > + error = xfs_recover_inode(xfs_buf_offset(bp, > + (uint)bit << XFS_BLI_SHIFT), > + item->ri_buf[i].i_addr); > if (!error) > memcpy(xfs_buf_offset(bp, > (uint)bit << XFS_BLI_SHIFT), /* dest */ > > From owner-xfs@oss.sgi.com Wed Aug 29 23:41:31 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 29 Aug 2007 23:41:34 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: *** X-Spam-Status: No, score=3.8 required=5.0 tests=AWL,BAYES_50, FH_HOST_EQ_PACBELL_D,RDNS_DYNAMIC autolearn=no version=3.2.0-pre1-r499012 Received: from h001.gghcwest.com (adsl-71-128-90-173.dsl.pltn13.pacbell.net [71.128.90.173]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7U6fT4p025083 for ; Wed, 29 Aug 2007 23:41:31 -0700 Received: from localhost (localhost.localdomain [127.0.0.1]) by h001.gghcwest.com (Postfix) with ESMTP id DB605641298; Wed, 29 Aug 2007 23:16:51 -0700 (PDT) Received: from h001.gghcwest.com ([127.0.0.1]) by localhost (h001.gghcwest.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 81bcJvz8BmjG; Wed, 29 Aug 2007 23:16:51 -0700 (PDT) Received: from [192.168.168.165] (unknown [192.168.168.165]) by h001.gghcwest.com (Postfix) with ESMTP id B108E641277; Wed, 29 Aug 2007 23:16:51 -0700 (PDT) Subject: ZFS, XFS, and EXT4 compared From: "Jeffrey W. Baker" To: zfs-discuss@opensolaris.org, xfs@oss.sgi.com, linux-ext4@vger.kernel.org Content-Type: text/plain Date: Wed, 29 Aug 2007 23:16:51 -0700 Message-Id: <1188454611.23311.13.camel@toonses.gghcwest.com> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-archive-position: 12700 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jwbaker@acm.org Precedence: bulk X-list: xfs I have a lot of people whispering "zfs" in my virtual ear these days, and at the same time I have an irrational attachment to xfs based entirely on its lack of the 32000 subdirectory limit. I'm not afraid of ext4's newness, since really a lot of that stuff has been in Lustre for years. So a-benchmarking I went. Results at the bottom: http://tastic.brillig.org/~jwb/zfs-xfs-ext4.html Short version: ext4 is awesome. zfs has absurdly fast metadata operations but falls apart on sequential transfer. xfs has great sequential transfer but really bad metadata ops, like 3 minutes to tar up the kernel. It would be nice if mke2fs would copy xfs's code for optimal layout on a software raid. The mkfs defaults and the mdadm defaults interact badly. Postmark is somewhat bogus benchmark with some obvious quantization problems. Regards, jwb From owner-xfs@oss.sgi.com Wed Aug 29 23:50:25 2007 Received: with ECARTIS (v1.0.0; list xfs); Wed, 29 Aug 2007 23:50:30 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_50 autolearn=ham version=3.2.0-pre1-r499012 Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.182]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7U6oN4p026343 for ; Wed, 29 Aug 2007 23:50:25 -0700 Received: by wa-out-1112.google.com with SMTP id k22so505167waf for ; Wed, 29 Aug 2007 23:50:24 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=s+WfQLKgbcC8mc9hUeWO2IoT2dPLAzyZ6zNqY52Cg5q3RHWLcgJeF9MteU4MmcdPU7kC6sm33Z1yRjQDTJnmDSmi4TRdTENEKNFm/cHwiMt6IPFnV2ohJGBY3etyhhIxo1pjM6fvXvpUP+krTnK45re8q1wr2YzYiti+2fs3zV0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=m2wUnPxJFHv1XWc0WqfS+VJYsPy8iD7+9y9/O9MCMhDlhMuqL6iFlKo7qo+gwWGfhOOl+S+oQ6zjMpwqDwCoRIXEqE3X850v8pVanuQJwHrZfpBfEU/ct5bt8Q+LYkHUM4PPcAi79fgtcahcXIB2HwWTUFNz159t6txACloKnN0= Received: by 10.114.159.1 with SMTP id h1mr142319wae.1188455104578; Wed, 29 Aug 2007 23:25:04 -0700 (PDT) Received: by 10.114.136.17 with HTTP; Wed, 29 Aug 2007 23:25:04 -0700 (PDT) Message-ID: Date: Thu, 30 Aug 2007 09:25:04 +0300 From: "Cyril Plisko" To: "Jeffrey W. Baker" Subject: Re: [zfs-discuss] ZFS, XFS, and EXT4 compared Cc: zfs-discuss@opensolaris.org, xfs@oss.sgi.com, linux-ext4@vger.kernel.org In-Reply-To: <1188454611.23311.13.camel@toonses.gghcwest.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1188454611.23311.13.camel@toonses.gghcwest.com> X-Google-Sender-Auth: 9927b78c4447164d X-archive-position: 12701 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: cyril.plisko@mountall.com Precedence: bulk X-list: xfs Jeffrey, it would be interesting to see your zpool layout info as well. It can significantly influence the results obtained in the benchmarks. On 8/30/07, Jeffrey W. Baker wrote: > I have a lot of people whispering "zfs" in my virtual ear these days, > and at the same time I have an irrational attachment to xfs based > entirely on its lack of the 32000 subdirectory limit. I'm not afraid of > ext4's newness, since really a lot of that stuff has been in Lustre for > years. So a-benchmarking I went. Results at the bottom: > > http://tastic.brillig.org/~jwb/zfs-xfs-ext4.html > > Short version: ext4 is awesome. zfs has absurdly fast metadata > operations but falls apart on sequential transfer. xfs has great > sequential transfer but really bad metadata ops, like 3 minutes to tar > up the kernel. > > It would be nice if mke2fs would copy xfs's code for optimal layout on a > software raid. The mkfs defaults and the mdadm defaults interact badly. > > Postmark is somewhat bogus benchmark with some obvious quantization > problems. > > Regards, > jwb > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss > -- Regards, Cyril From owner-xfs@oss.sgi.com Thu Aug 30 00:06:38 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 00:06:41 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_40,J_CHICKENPOX_43 autolearn=no version=3.2.0-pre1-r499012 Received: from postoffice.aconex.com (mail.app.aconex.com [203.89.192.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7U76Y4p030402 for ; Thu, 30 Aug 2007 00:06:37 -0700 Received: from edge.yarra.acx (unknown [203.89.192.141]) by postoffice.aconex.com (Postfix) with ESMTP id EBBB392C506; Thu, 30 Aug 2007 17:06:34 +1000 (EST) Subject: Re: ZFS, XFS, and EXT4 compared From: Nathan Scott Reply-To: nscott@aconex.com To: "Jeffrey W. Baker" Cc: zfs-discuss@opensolaris.org, xfs@oss.sgi.com, linux-ext4@vger.kernel.org In-Reply-To: <1188454611.23311.13.camel@toonses.gghcwest.com> References: <1188454611.23311.13.camel@toonses.gghcwest.com> Content-Type: text/plain Organization: Aconex Date: Thu, 30 Aug 2007 17:07:46 +1000 Message-Id: <1188457666.24970.94.camel@edge.yarra.acx> Mime-Version: 1.0 X-Mailer: Evolution 2.6.3 Content-Transfer-Encoding: 7bit X-archive-position: 12702 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: nscott@aconex.com Precedence: bulk X-list: xfs On Wed, 2007-08-29 at 23:16 -0700, Jeffrey W. Baker wrote: > ... xfs has great > sequential transfer but really bad metadata ops, like 3 minutes to tar > up the kernel. Perhaps this is due to the write barrier support - would be interesting to try a run with the "-o nobarrier" mount option to XFS. With external logs, write barriers are automatically disabled, which may explain: "Oddly XFS has better sequential reads when using an external journal, which makes little sense." To improve metadata performance, you have many options with XFS (which ones are useful depends on the type of metadata workload) - you can try a v2 format log, and mount with "-o logbsize=256k", try increasing the directory block size (e.g. mkfs.xfs -nsize=16k, etc), and also the log size (mkfs.xfs -lsize=XXXXXXb). Have fun! cheers. -- Nathan From owner-xfs@oss.sgi.com Thu Aug 30 00:23:16 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 00:23:20 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.235]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7U7ND4p003883 for ; Thu, 30 Aug 2007 00:23:16 -0700 Received: by nz-out-0506.google.com with SMTP id x3so306234nzd for ; Thu, 30 Aug 2007 00:23:14 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=mE/j8kR2EWKMg+4i3y+bAoqTs8X2ALFmRNYMoA9QowBF5jkrvAElBxvWC+k94uPW0pJ0DxZx1THXgU763pvIkjwn2qnQ9nHEH3s8sDUDjMCZkpHEH1Z8TzIvHZUpDwaRBoMqSOMCy7/QGhFWvZ+nzO590UpkQa1HetZPhju0kRs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=T9+8Kv87Vlh9DFHV4Oq+UqlVMbjyGEQQWIT1KQkfzpnjbezb5/EbU0cLA5v2pWetiBXN7rj5wFoyarat/ssER+Jr00cB8zhsK6MFKzsWtrJaW/H9ByjFCGyrcZrk3/XUDogFy+Ro3qKl8zof8yXGpRdStb7TxdUTrYo+oxtOXjE= Received: by 10.142.245.10 with SMTP id s10mr7218wfh.1188455278032; Wed, 29 Aug 2007 23:27:58 -0700 (PDT) Received: by 10.143.164.11 with HTTP; Wed, 29 Aug 2007 23:27:58 -0700 (PDT) Message-ID: Date: Wed, 29 Aug 2007 23:27:58 -0700 From: mike To: "Jeffrey W. Baker" Subject: Re: [zfs-discuss] ZFS, XFS, and EXT4 compared Cc: zfs-discuss@opensolaris.org, xfs@oss.sgi.com, linux-ext4@vger.kernel.org In-Reply-To: <1188454611.23311.13.camel@toonses.gghcwest.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1188454611.23311.13.camel@toonses.gghcwest.com> X-archive-position: 12703 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: mike503@gmail.com Precedence: bulk X-list: xfs On 8/29/07, Jeffrey W. Baker wrote: > I have a lot of people whispering "zfs" in my virtual ear these days, > and at the same time I have an irrational attachment to xfs based > entirely on its lack of the 32000 subdirectory limit. I'm not afraid of > ext4's newness, since really a lot of that stuff has been in Lustre for > years. So a-benchmarking I went. Results at the bottom: > > http://tastic.brillig.org/~jwb/zfs-xfs-ext4.html > > Short version: ext4 is awesome. zfs has absurdly fast metadata > operations but falls apart on sequential transfer. xfs has great > sequential transfer but really bad metadata ops, like 3 minutes to tar > up the kernel. > > It would be nice if mke2fs would copy xfs's code for optimal layout on a > software raid. The mkfs defaults and the mdadm defaults interact badly. this is cool to see. however, performance wouldn't be my reason for moving to zfs. the inline checksumming and all that is what i want. if someone could get nearly incorruptable filesystems (or just a linux version of zfs... btrfs looks promising) this would be even better. sadly ext4+swraid isn't as good, i might have tried that since waiting the right hardware support for zfs for me seems to be unknown at this point. From owner-xfs@oss.sgi.com Thu Aug 30 01:46:52 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 01:46:54 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_51 autolearn=no version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7U8kn4p013395 for ; Thu, 30 Aug 2007 01:46:51 -0700 Received: from boing.melbourne.sgi.com (boing.melbourne.sgi.com [134.14.55.141]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id SAA24086; Thu, 30 Aug 2007 18:29:26 +1000 Message-ID: <46D67FE6.20205@sgi.com> Date: Thu, 30 Aug 2007 18:29:26 +1000 From: Timothy Shimmin User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Lachlan McIlroy CC: xfs-dev , xfs-oss Subject: Re: [PATCH] log replay should not overwrite newer ondisk inodes References: <46D6279F.40601@sgi.com> <46D6480F.4040307@sgi.com> <46D64CAD.6050705@sgi.com> In-Reply-To: <46D64CAD.6050705@sgi.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 12704 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: tes@sgi.com Precedence: bulk X-list: xfs Lachlan McIlroy wrote: > Timothy Shimmin wrote: >> Lachlan McIlroy wrote: >>> Log replay of clustered inodes currently ignores the flushiter >>> field in the inode that is used to determine if the on-disk inode >>> is more up to date than the copy in the log. As a result during >>> log replay the newer inode is being overwritten with an older >>> version and file size updates are being lost. >>> >>> I haven't handled the case of the flushiter counter overflowing >>> but that shouldn't be a problem in this case. The log buffer >>> contains newly created inodes so their flushiter values will be 0 >>> and the on-disk inodes should not be much greater. >>> >>> Lachlan >>> >> >> Still would want to understand why blf_flags doesn't have >> XFS_BLI_INODE_ALLOC_BUF set and so we could test that >> - I didn't understand Dave's (dgc) response about that earlier. >> But anyway...:) >> >> >> Just some nit-picks: >> >> * instead of a comment and then calling xfs_recover_inode >> why don't we just give the function a better name. >> When I see the name I think it is going to recover the inode >> but instead it is just a flush_iter check and matching >> the magic#s. > What would you like the function to be called? > Dunno :) xfs_flushiter_check >> >> * My style preference is for option 2 over option 1: >> 1. >> if (a) { >> return 1; >> } >> return 0; >> >> 2. >> return a; >> >> But I understand the predicate is long and sometimes people like >> to add tracing/debug for the alternate paths in which case (1) >> is handy for that. I just like simplicity. > I can change that. It just looks odd when the body of the function > is after the return statement. > It doesn't look funny to me :-) But I'm not really fussed - do what you prefer. >> >> * Also it is funny to return a boolean for error in the call. >> Although, I see that is consistent with the rest of the function. > Yep, keeping consistent with coding standards. Well consistent with that function at least :) > >> But I'm not sure this is an error... >> Hmmmm...I'm a bit confused. >> So you are _almost_ combining an error check with a flushiter check? >> If one buffer is an inode magic# and the other isn't then we >> have an error right - and could report it - but we are not doing >> that here. > Not exactly. If what's on disk is not an inode but the log item is > then that could be because we haven't written the inode to disk yet > and we need to perform recovery. Yeah, I was thinking about that afterward. The item's format which gives the blk# for the buf to read could be a block which hasn't been used for an inode yet. OOI, Say the inode block was freed in the past and we freshly allocate one using this inode buf item in replay, so that the old block has the inode magic# but it has an old large flushiter. We then say it is newer when really it is older. We could check for zero mode or different gen#. Or perhaps we reset the flushiter when we free the inode or do we go thru a different replay path. > If what's on disk is an inode but > the log item is not an inode then what we are about to recover is not > an inode and we abort the check. Well yes we are only interested in inode buf items. > If neither on-disk nor log item are > inodes then we've got no business continuing the check. Well as above it aint even an inode in the log. > >> If we have an inode buf and the flushiter on the item is older than >> the ondisk buffer >> one then it is not an error but we just don't want to recover it. > Exactly. > So its not an error then yet we are calling it that. So perhaps we could have: if (!error && !old_inode_item) { .... --Tim >> --- fs/xfs/xfs_log_recover.c_1.322 2007-08-27 17:45:45.000000000 +1000 >> +++ fs/xfs/xfs_log_recover.c 2007-08-30 11:50:44.000000000 +1000 >> @@ -1866,6 +1866,27 @@ xlog_recover_do_inode_buffer( >> } >> >> /* >> + * Check if we need to recover an inode from a buffer >> + */ >> +int >> +xfs_recover_inode( >> + char *dest, >> + char *src) >> +{ >> + xfs_dinode_t *dip = (xfs_dinode_t *)dest; >> + xfs_dinode_t *dilp = (xfs_dinode_t*)src; >> + >> + if ((be16_to_cpu(dip->di_core.di_magic) == XFS_DINODE_MAGIC) && >> + (be16_to_cpu(dilp->di_core.di_magic) == XFS_DINODE_MAGIC) && >> + (be16_to_cpu(dilp->di_core.di_flushiter) < >> + be16_to_cpu(dip->di_core.di_flushiter))) { >> + return 1; >> + } >> + >> + return 0; >> +} >> + >> +/* >> * Perform a 'normal' buffer recovery. Each logged region of the >> * buffer should be copied over the corresponding region in the >> * given buffer. The bitmap in the buf log format structure indicates >> @@ -1917,6 +1938,13 @@ xlog_recover_do_reg_buffer( >> -1, 0, XFS_QMOPT_DOWARN, >> "dquot_buf_recover"); >> } >> + /* >> + * Sanity check if this is an inode buffer. >> + */ >> + if (!error) >> + error = xfs_recover_inode(xfs_buf_offset(bp, >> + (uint)bit << XFS_BLI_SHIFT), >> + item->ri_buf[i].i_addr); >> if (!error) >> memcpy(xfs_buf_offset(bp, >> (uint)bit << XFS_BLI_SHIFT), /* dest */ >> >> From owner-xfs@oss.sgi.com Thu Aug 30 01:51:35 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 01:51:37 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7U8pW4p014338 for ; Thu, 30 Aug 2007 01:51:34 -0700 Received: from boing.melbourne.sgi.com (boing.melbourne.sgi.com [134.14.55.141]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id SAA25068; Thu, 30 Aug 2007 18:51:28 +1000 Message-ID: <46D68510.1020404@sgi.com> Date: Thu, 30 Aug 2007 18:51:28 +1000 From: Timothy Shimmin User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Lachlan McIlroy CC: xfs-dev , xfs-oss Subject: Re: [PATCH] log replay should not overwrite newer ondisk inodes References: <46D6279F.40601@sgi.com> <46D6480F.4040307@sgi.com> <46D64CAD.6050705@sgi.com> <46D67FE6.20205@sgi.com> In-Reply-To: <46D67FE6.20205@sgi.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 12705 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: tes@sgi.com Precedence: bulk X-list: xfs Timothy Shimmin wrote: >>> But I'm not sure this is an error... >>> Hmmmm...I'm a bit confused. >>> So you are _almost_ combining an error check with a flushiter check? >>> If one buffer is an inode magic# and the other isn't then we >>> have an error right - and could report it - but we are not doing >>> that here. >> Not exactly. If what's on disk is not an inode but the log item is >> then that could be because we haven't written the inode to disk yet >> and we need to perform recovery. > Yeah, I was thinking about that afterward. > The item's format which gives the blk# for the buf to read could > be a block which hasn't been used for an inode yet. > Well, if what's on disk is not an inode but some other data and it happens to have the inode magic# which is remotely possible, then we are making a bad assumption. i.e. if we're not sure what the block/buffer should be, then testing the MAGIC# isn't a guarantee it's an inode then. Well not for the freeing of inode clusters case I would assume. Or am I missing something? --Tim From owner-xfs@oss.sgi.com Thu Aug 30 06:41:51 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 06:41:55 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_20,J_CHICKENPOX_43 autolearn=no version=3.2.0-pre1-r499012 Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7UDfn4p025257 for ; Thu, 30 Aug 2007 06:41:51 -0700 Received: from hch by pentafluge.infradead.org with local (Exim 4.63 #1 (Red Hat Linux)) id 1IQjwJ-00017t-8t; Thu, 30 Aug 2007 14:20:03 +0100 Date: Thu, 30 Aug 2007 14:20:02 +0100 From: Christoph Hellwig To: Nathan Scott Cc: "Jeffrey W. Baker" , zfs-discuss@opensolaris.org, xfs@oss.sgi.com, linux-ext4@vger.kernel.org Subject: Re: ZFS, XFS, and EXT4 compared Message-ID: <20070830132002.GA4086@infradead.org> References: <1188454611.23311.13.camel@toonses.gghcwest.com> <1188457666.24970.94.camel@edge.yarra.acx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1188457666.24970.94.camel@edge.yarra.acx> User-Agent: Mutt/1.4.2.3i X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 12706 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: xfs On Thu, Aug 30, 2007 at 05:07:46PM +1000, Nathan Scott wrote: > To improve metadata performance, you have many options with XFS (which > ones are useful depends on the type of metadata workload) - you can try > a v2 format log, and mount with "-o logbsize=256k", try increasing the > directory block size (e.g. mkfs.xfs -nsize=16k, etc), and also the log > size (mkfs.xfs -lsize=XXXXXXb). Okay, these suggestions are one too often now. v2 log and large logs/log buffers are the almost universal suggestions, and we really need to make these defaults. XFS is already the laughing stock of the Linux community due to it's absurdely bad default settings. From owner-xfs@oss.sgi.com Thu Aug 30 07:02:59 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 07:03:01 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7UE2u4p028503 for ; Thu, 30 Aug 2007 07:02:58 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id AAA08649; Fri, 31 Aug 2007 00:02:55 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l7UE2seW86472397; Fri, 31 Aug 2007 00:02:54 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l7UE2r7U86437112; Fri, 31 Aug 2007 00:02:53 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Fri, 31 Aug 2007 00:02:53 +1000 From: David Chinner To: Timothy Shimmin Cc: Lachlan McIlroy , xfs-dev , xfs-oss Subject: Re: [PATCH] log replay should not overwrite newer ondisk inodes Message-ID: <20070830140253.GR61154114@sgi.com> References: <46D6279F.40601@sgi.com> <46D6480F.4040307@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46D6480F.4040307@sgi.com> User-Agent: Mutt/1.4.2.1i X-archive-position: 12707 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Thu, Aug 30, 2007 at 02:31:11PM +1000, Timothy Shimmin wrote: > Lachlan McIlroy wrote: > >Log replay of clustered inodes currently ignores the flushiter > >field in the inode that is used to determine if the on-disk inode > >is more up to date than the copy in the log. As a result during > >log replay the newer inode is being overwritten with an older > >version and file size updates are being lost. > > > >I haven't handled the case of the flushiter counter overflowing > >but that shouldn't be a problem in this case. The log buffer > >contains newly created inodes so their flushiter values will be 0 > >and the on-disk inodes should not be much greater. > > > >Lachlan > > > > Still would want to understand why blf_flags doesn't have > XFS_BLI_INODE_ALLOC_BUF set and so we could test that > - I didn't understand Dave's (dgc) response about that earlier. I never commented on why or why not that flag isn't set in the log item. FWICT, it's not set because it is purely an in-memory flag. State that gets logged gets put in bli_format.blf_flags (e.g. XFS_BLI_FORMAT) whereas XFS_BLI_INODE_ALLOC_BUF is only ever placed in bli_flags.... The function of that flag is to prevent the logged inode buffer from being moved forward in the AIL so that it is always replayed at the time of allocation so that subsequent transactions that modify the inodes and inode buffers have a correctly allocated inode buffer to apply changes to during recovery. And if the tail of the log moves past the allocation transaction, it is guaranteed that the inodes can be read from disk so that recovery has a correctly allocated inode buffer to apply changes to.... That being said, the flag could probably be propagated into the blf_flags for (only) the allocation transaction if it makes discovery of this type of buffer during recovery more reliable.... Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Thu Aug 30 07:58:43 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 07:58:46 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_50 autolearn=ham version=3.2.0-pre1-r499012 Received: from over.ny.us.ibm.com (over.ny.us.ibm.com [32.97.182.150]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7UEwf4p005268 for ; Thu, 30 Aug 2007 07:58:43 -0700 Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.149]) by pokfb.esmtp.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l7UDbpBc011887 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 30 Aug 2007 09:37:52 -0400 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e31.co.us.ibm.com (8.13.8/8.13.8) with ESMTP id l7UDbhZi012809 for ; Thu, 30 Aug 2007 09:37:43 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v8.5) with ESMTP id l7UDbgHF470318 for ; Thu, 30 Aug 2007 07:37:43 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l7UDbg8h004253 for ; Thu, 30 Aug 2007 07:37:42 -0600 Received: from austin.ibm.com (netmail2.austin.ibm.com [9.41.248.176]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l7UDbgKs004236; Thu, 30 Aug 2007 07:37:42 -0600 Received: from gara (sig-9-49-133-202.mts.ibm.com [9.49.133.202]) by austin.ibm.com (8.13.8/8.12.10) with ESMTP id l7UDbepG032042; Thu, 30 Aug 2007 08:37:40 -0500 Date: Thu, 30 Aug 2007 08:37:47 -0500 From: "Jose R. Santos" To: "Jeffrey W. Baker" Cc: zfs-discuss@opensolaris.org, xfs@oss.sgi.com, linux-ext4@vger.kernel.org Subject: Re: ZFS, XFS, and EXT4 compared Message-ID: <20070830083747.018cfe8a@gara> In-Reply-To: <1188454611.23311.13.camel@toonses.gghcwest.com> References: <1188454611.23311.13.camel@toonses.gghcwest.com> X-Mailer: Claws Mail 2.10.0 (GTK+ 2.10.11; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 12708 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jrs@us.ibm.com Precedence: bulk X-list: xfs On Wed, 29 Aug 2007 23:16:51 -0700 "Jeffrey W. Baker" wrote: Nice comparisons. > I have a lot of people whispering "zfs" in my virtual ear these days, > and at the same time I have an irrational attachment to xfs based > entirely on its lack of the 32000 subdirectory limit. I'm not afraid of The 32000 subdir limit should be fixed on the latest rc kernels. > ext4's newness, since really a lot of that stuff has been in Lustre for > years. So a-benchmarking I went. Results at the bottom: > > http://tastic.brillig.org/~jwb/zfs-xfs-ext4.html FFSB: Could you send the patch to fix FFSB Solaris build? I should probably update the Sourceforge version so that it built out of the box. I'm also curious about your choices in the FFSB profiles you created. Specifically, the very short run time and doing fsync after every file close. When using FFSB, I usually run with a large run time (usually 600 seconds) to make sure that we do enough IO to get a stable result. Running longer means that we also use more of the disk storage and our results are not base on doing IO to just the beginning of the disk. When running for that long period of time, the fsync flag is not required since we do enough reads and writes to cause memory pressure and guarantee IO going to disk. Nothing wrong in what you did, but I wonder how it would affect the results of these runs. The agefs options you use are also interesting since you only utilize a very small percentage of your filesystem. Also note that since create and append weight are very heavy compare to deletes, the desired utilization would be reach very quickly and without that much fragmentation. Again, nothing wrong here, just very interested in your perspective in selecting these setting for your profile. Postmark: I've been looking at the postmark results and I'm becoming more convince that the meta-data results in ZFS may be artificially high due to the nature of the workload. For one thing, I find it very interesting (e.i. odd) that 9050KB/s reads and 28360KB/s writes shows up multiple times even across filesystems. The data set on postmark is also very limited in size and the run times are small enough that it is difficult to get an idea of sustained meta-data performance on any of the filesystems. Base on the ZFS numbers, it seems that there is hardly any IO being done on the ZFS case given the random nature of the workload and the high numbers it's achieving. In short, I don't think postmark is a very good workload to sustain ZFS claim as the meta-data king. It may very well be the case, but I would like to see that proven with another workload. One that actually show sustained meta-data performance across a fairly large fileset would be preferred. FFSB could be use simulate a meta-data intensive workload as well and it has better control over the fileset size and run time to make the results more interesting. Don't mean to invalidate the Postmark results, just merely pointing out a possible error in the assessment of the meta-data performance of ZFS. I say possible since it's still unknown if another workload will be able to validate these results. General: Did you gathered CPU statistics when running these benchmarks? For some environments, having the ratio filesystem performance vs CPU utilization would be good information to have since some workloads are CPU sensitive and being 20% faster while consuming 50% more CPU may not necessarily be a good thing. While this may be less of an issue in the future since CPU performance seems to be increasing at a much faster pace than IO and disk performance, it would still be another interesting data point. > > Short version: ext4 is awesome. zfs has absurdly fast metadata > operations but falls apart on sequential transfer. xfs has great > sequential transfer but really bad metadata ops, like 3 minutes to tar > up the kernel. > > It would be nice if mke2fs would copy xfs's code for optimal layout on a > software raid. The mkfs defaults and the mdadm defaults interact badly. > > Postmark is somewhat bogus benchmark with some obvious quantization > problems. Ah... Guess you agree with me about the postmark results validity. ;) > Regards, > jwb > -JRS From owner-xfs@oss.sgi.com Thu Aug 30 09:45:22 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 09:45:24 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_50 autolearn=ham version=3.2.0-pre1-r499012 Received: from smtp28.poczta.onet.pl (smtp28.poczta.onet.pl [213.180.130.99]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7UGjI4p025375 for ; Thu, 30 Aug 2007 09:45:21 -0700 Received: from rudy.mif.pg.gda.pl ([153.19.42.16]:60759 "EHLO orion.wszechswiat.org") by ps28.test.onet.pl with ESMTP id (ORCPT ); Thu, 30 Aug 2007 18:29:44 +0200 Message-ID: <46D6F066.5000009@op.pl> Date: Thu, 30 Aug 2007 18:29:26 +0200 From: Bogdan User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: xfs@oss.sgi.com Subject: About errors in XFS header files and xfsprogs X-Enigmail-Version: 0.95.3 OpenPGP: url=http://rudy.mif.pg.gda.pl/~bogdro/bogdan_publiczny.asc Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit X-archive-position: 12709 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: bogdandr@op.pl Precedence: bulk X-list: xfs -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 Hello. The XFS library header files contained in xfsprogs (2.9.3-1) contain many errors. Run the following command on a Linux system to verify: gcc -Wall -Wextra -Wfloat-equal -Wbad-function-cast -Wsign-compare - -Wunreachable-code -Wpointer-arith -Wcast-qual -Wcast-align - -Wstrict-prototypes -Wformat-security -Wformat-nonliteral - -Wnested-externs -Wshadow -Wconversion -Wdeclaration-after-statement - -Wundef -Wpadded -Wredundant-decls -pedantic -c -o xfs_repair.o xfs_repair.c (you can use any file which #includes the libxfs.h header). The use of 'long long' is less important. The header files should not only be ISO-C-compatible, but even ANSI-C-compatible. This will allow anyone to use them. Please, make useful public functions available in header files. Especially platform_check_ismounted() and platform_check_iswritable() and other "platform" functions. Also, anything that is a part of the public interface, should be in the "xfs namespace", i.e. start with "xfs_". At least one issue of this type is known: the list_head structure, declared in other files from other libraries. Things like these are very important to fix, because they are making other header files useless. You shouldn't handle gettext and internationalization in header files. Let users do it by themselves. Otherwise, a double-defined errors occur for the "_" macro. Also, a following error occurs in the library: gcc -g -O2 -DDEBUG -DVERSION=\"2.9.3\" - -DLOCALEDIR=\"/usr/local/share/locale\" -DPACKAGE=\"xfsprogs\" - -I./include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -funsigned-char - -fno-strict-aliasing -Wall -I. -g -O2 -DNDEBUG -DVERSION=\"2.9.3\" - -DLOCALEDIR=\"/usr/local/share/locale\" -DPACKAGE=\"xfsprogs\" - -I../include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -funsigned-char - -fno-strict-aliasing -Wall -c xfs_bmap.c -fPIC -DPIC -o .libs/xfs_bmap.o xfs_bmap.c: In function 'xfs_bmap_add_extent': xfs_bmap.c:287: warning: implicit declaration of function 'xfs_bmap_check_leaf_extents' and because of this, we have: ../libxfs/.libs/libxfs.a(xfs_bmap.o)(.text+0x6cf1): In function `xfs_bmap_add_extent': xfsprogs-2.9.3/libxfs/xfs_bmap.c:287: undefined reference to `xfs_bmap_check_leaf_extents' collect2: ld returned 1 exit status gmake[1]: *** [xfs_copy] Error 1 - -- Pozdrawiam/Regards - Bogdan (Linux & FreeDOS) Kurs asemblera x86 (DOS & Linux): http://rudy.mif.pg.gda.pl/~bogdro Grupy dyskusyjne o asm: pl.comp.lang.asm alt.pl.asm alt.pl.asm.win32 Rozmawiaj bezpiecznie: www.JabberPL.org Surfuj anonimowo: tor.eff.org -----BEGIN PGP SIGNATURE----- iD8DBQFG1vBmNTrTaBxW2h4RA49wAKCTVaJ47Fp/hAVGbJd+ewVvbeoxLACeOIrL sslZvDs9bl6QG/W09SwosYw= =s/eu -----END PGP SIGNATURE----- From owner-xfs@oss.sgi.com Thu Aug 30 09:56:00 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 09:56:02 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7UGtw4p027948 for ; Thu, 30 Aug 2007 09:55:59 -0700 Received: from hch by pentafluge.infradead.org with local (Exim 4.63 #1 (Red Hat Linux)) id 1IQnJE-0003XR-Ci; Thu, 30 Aug 2007 17:55:56 +0100 Date: Thu, 30 Aug 2007 17:55:56 +0100 From: Christoph Hellwig To: Bogdan Cc: xfs@oss.sgi.com Subject: Re: About errors in XFS header files and xfsprogs Message-ID: <20070830165556.GA13308@infradead.org> References: <46D6F066.5000009@op.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46D6F066.5000009@op.pl> User-Agent: Mutt/1.4.2.3i X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 12710 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: xfs On Thu, Aug 30, 2007 at 06:29:26PM +0200, Bogdan wrote: > The header files should not only be > ISO-C-compatible, but even ANSI-C-compatible. This will allow anyone > to use them. Sais who? The GNU C extensions are very useful for programming, and there is no reason to move to an inferior dialect. > Please, make useful public functions available in header files. > Especially platform_check_ismounted() and platform_check_iswritable() > and other "platform" functions. > > Also, anything that is a part of the public interface, should be in > the "xfs namespace", i.e. start with "xfs_". At least one issue of > this type is known: the list_head structure, declared in other files > from other libraries. Things like these are very important to fix, > because they are making other header files useless. There is no such thing as a public inteface. There's a good reason libxfs is not a shared libary - it's really nothing more but a collection of useful routines for the xfs utilities. If you think a proper shared library with a defined interface is a good thing you're probably right, and people would welcome you to work on one. From owner-xfs@oss.sgi.com Thu Aug 30 11:52:11 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 11:52:13 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: ** X-Spam-Status: No, score=2.8 required=5.0 tests=AWL,BAYES_50, FH_HOST_EQ_PACBELL_D,RDNS_DYNAMIC autolearn=no version=3.2.0-pre1-r499012 Received: from h001.gghcwest.com (adsl-71-128-90-173.dsl.pltn13.pacbell.net [71.128.90.173]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7UIqA4p011195 for ; Thu, 30 Aug 2007 11:52:10 -0700 Received: from localhost (localhost.localdomain [127.0.0.1]) by h001.gghcwest.com (Postfix) with ESMTP id 98534641294; Thu, 30 Aug 2007 11:52:10 -0700 (PDT) Received: from h001.gghcwest.com ([127.0.0.1]) by localhost (h001.gghcwest.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7jVmccXRb7yj; Thu, 30 Aug 2007 11:52:10 -0700 (PDT) Received: from [192.168.168.165] (unknown [192.168.168.165]) by h001.gghcwest.com (Postfix) with ESMTP id 6C4E364122D; Thu, 30 Aug 2007 11:52:10 -0700 (PDT) Subject: Re: ZFS, XFS, and EXT4 compared From: "Jeffrey W. Baker" To: "Jose R. Santos" Cc: zfs-discuss@opensolaris.org, xfs@oss.sgi.com, linux-ext4@vger.kernel.org In-Reply-To: <20070830083747.018cfe8a@gara> References: <1188454611.23311.13.camel@toonses.gghcwest.com> <20070830083747.018cfe8a@gara> Content-Type: text/plain Date: Thu, 30 Aug 2007 11:52:10 -0700 Message-Id: <1188499930.8980.16.camel@toonses.gghcwest.com> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-archive-position: 12711 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jwbaker@acm.org Precedence: bulk X-list: xfs On Thu, 2007-08-30 at 08:37 -0500, Jose R. Santos wrote: > On Wed, 29 Aug 2007 23:16:51 -0700 > "Jeffrey W. Baker" wrote: > > http://tastic.brillig.org/~jwb/zfs-xfs-ext4.html > > FFSB: > Could you send the patch to fix FFSB Solaris build? I should probably > update the Sourceforge version so that it built out of the box. Sadly I blew away OpenSolaris without preserving the patch, but the gist of it is this: ctime_r takes three parameters on Solaris (the third is the buffer length) and Solaris has directio(3c) instead of O_DIRECT. > I'm also curious about your choices in the FFSB profiles you created. > Specifically, the very short run time and doing fsync after every file > close. When using FFSB, I usually run with a large run time (usually > 600 seconds) to make sure that we do enough IO to get a stable > result. With a 1GB machine and max I/O of 200MB/s, I assumed 30 seconds would be enough for the machine to quiesce. You disagree? The fsync flag is in there because my primary workload is PostgreSQL, which is entirely synchronous. > Running longer means that we also use more of the disk > storage and our results are not base on doing IO to just the beginning > of the disk. When running for that long period of time, the fsync flag > is not required since we do enough reads and writes to cause memory > pressure and guarantee IO going to disk. Nothing wrong in what you > did, but I wonder how it would affect the results of these runs. So do I :) I did want to finish the test in a practical amount of time, and it takes 4 hours for the RAID to build. I will do a few hours-long runs of ffsb with Ext4 and see what it looks like. > The agefs options you use are also interesting since you only utilize a > very small percentage of your filesystem. Also note that since create > and append weight are very heavy compare to deletes, the desired > utilization would be reach very quickly and without that much > fragmentation. Again, nothing wrong here, just very interested in your > perspective in selecting these setting for your profile. The aging takes forever, as you are no doubt already aware. It requires at least 1 minute for 1% utilization. On a longer run, I can do more aging. The create and append weights are taken from the README. > Don't mean to invalidate the Postmark results, just merely pointing out > a possible error in the assessment of the meta-data performance of ZFS. > I say possible since it's still unknown if another workload will be > able to validate these results. I don't want to pile scorn on XFS, but the postmark workload was chosen for a reasonable run time on XFS, and then it turned out that it runs in 1-2 seconds on the other filesystems. The scaling factors could have been better chosen to exercise the high speeds of Ext4 and ZFS. The test needs to run for more than a minute to get meaningful results from postmark, since it uses truncated whole number seconds as the denominator when reporting. One thing that stood out from the postmark results is how ext4/sw has a weird inverse scaling with respect to the number of subdirectories. It's faster with 10000 files in 1 directory than with 100 files each in 100 subdirectories. Odd, no? > Did you gathered CPU statistics when running these benchmarks? I didn't bother. If you buy a server these days and it has fewer than four CPUs, you got ripped off. -jwb From owner-xfs@oss.sgi.com Thu Aug 30 11:57:31 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 11:57:34 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RDNS_NONE autolearn=no version=3.2.0-pre1-r499012 Received: from brmea-mail-2.sun.com ([192.18.98.43]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7UIvT4p012114 for ; Thu, 30 Aug 2007 11:57:31 -0700 Received: from fe-amer-09.sun.com ([192.18.108.183]) by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l7UIXsnI008979 for ; Thu, 30 Aug 2007 18:33:55 GMT Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) id <0JNL00201NHEQZ00@mail-amer.sun.com> (original mail from James.Mauro@Sun.COM) for xfs@oss.sgi.com; Thu, 30 Aug 2007 12:33:54 -0600 (MDT) Received: from [192.168.1.100] ([71.125.72.96]) by mail-amer.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPSA id <0JNL0049ONKHR4BJ@mail-amer.sun.com>; Thu, 30 Aug 2007 12:33:54 -0600 (MDT) Date: Thu, 30 Aug 2007 14:33:48 -0400 From: Jim Mauro Subject: Re: [zfs-discuss] ZFS, XFS, and EXT4 compared In-reply-to: <1188454611.23311.13.camel@toonses.gghcwest.com> To: "Jeffrey W. Baker" Cc: zfs-discuss@opensolaris.org, xfs@oss.sgi.com, linux-ext4@vger.kernel.org Message-id: <46D70D8C.8010203@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: <1188454611.23311.13.camel@toonses.gghcwest.com> User-Agent: Thunderbird 1.5.0.13 (Macintosh/20070809) X-archive-position: 12713 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: James.Mauro@Sun.COM Precedence: bulk X-list: xfs I'll take a look at this. ZFS provides outstanding sequential IO performance (both read and write). In my testing, I can essentially sustain "hardware speeds" with ZFS on sequential loads. That is, assuming 30-60MB/sec per disk sequential IO capability (depending on hitting inner or out cylinders), I get linear scale-up on sequential loads as I add disks to a zpool, e.g. I can sustain 250-300MB/sec on a 6 disk zpool, and it's pretty consistent for raidz and raidz2. Your numbers are in the 50-90MB/second range, or roughly 1/2 to 1/4 what was measured on the other 2 file systems for the same test. Very odd. Still looking... Thanks, /jim Jeffrey W. Baker wrote: > I have a lot of people whispering "zfs" in my virtual ear these days, > and at the same time I have an irrational attachment to xfs based > entirely on its lack of the 32000 subdirectory limit. I'm not afraid of > ext4's newness, since really a lot of that stuff has been in Lustre for > years. So a-benchmarking I went. Results at the bottom: > > http://tastic.brillig.org/~jwb/zfs-xfs-ext4.html > > Short version: ext4 is awesome. zfs has absurdly fast metadata > operations but falls apart on sequential transfer. xfs has great > sequential transfer but really bad metadata ops, like 3 minutes to tar > up the kernel. > > It would be nice if mke2fs would copy xfs's code for optimal layout on a > software raid. The mkfs defaults and the mdadm defaults interact badly. > > Postmark is somewhat bogus benchmark with some obvious quantization > problems. > > Regards, > jwb > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss > From owner-xfs@oss.sgi.com Thu Aug 30 11:57:18 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 11:57:21 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_40,J_CHICKENPOX_43 autolearn=no version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7UIvF4p012074 for ; Thu, 30 Aug 2007 11:57:17 -0700 Received: from liberator.sandeen.net (liberator.sandeen.net [10.0.0.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 34E1D182DD1C9; Thu, 30 Aug 2007 13:57:15 -0500 (CDT) Message-ID: <46D71318.2050604@sandeen.net> Date: Thu, 30 Aug 2007 13:57:28 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Christoph Hellwig CC: Nathan Scott , "Jeffrey W. Baker" , zfs-discuss@opensolaris.org, xfs@oss.sgi.com, linux-ext4@vger.kernel.org Subject: Re: ZFS, XFS, and EXT4 compared References: <1188454611.23311.13.camel@toonses.gghcwest.com> <1188457666.24970.94.camel@edge.yarra.acx> <20070830132002.GA4086@infradead.org> In-Reply-To: <20070830132002.GA4086@infradead.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-archive-position: 12712 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Christoph Hellwig wrote: > On Thu, Aug 30, 2007 at 05:07:46PM +1000, Nathan Scott wrote: >> To improve metadata performance, you have many options with XFS (which >> ones are useful depends on the type of metadata workload) - you can try >> a v2 format log, and mount with "-o logbsize=256k", try increasing the >> directory block size (e.g. mkfs.xfs -nsize=16k, etc), and also the log >> size (mkfs.xfs -lsize=XXXXXXb). > > Okay, these suggestions are one too often now. v2 log and large logs/log > buffers are the almost universal suggestions, and we really need to make > these defaults. XFS is already the laughing stock of the Linux community > due to it's absurdely bad default settings. Agreed on reevaluating the defaults, Christoph! barrier seems to hurt badly on xfs, too. Note: barrier is off by default on ext[34], so if you want apples to apples there, you need to change one or the other filesystem's mount options. If your write cache is safe (battery backed?) you may as well turn barriers off. I'm not sure offhand who will react more poorly to an evaporating write cache (with no barriers), ext4 or xfs... -Eric From owner-xfs@oss.sgi.com Thu Aug 30 12:09:03 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 12:09:05 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: ** X-Spam-Status: No, score=2.5 required=5.0 tests=AWL,BAYES_50, FH_HOST_EQ_PACBELL_D,J_CHICKENPOX_43,RDNS_DYNAMIC autolearn=no version=3.2.0-pre1-r499012 Received: from h001.gghcwest.com (adsl-71-128-90-173.dsl.pltn13.pacbell.net [71.128.90.173]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7UJ914p013999 for ; Thu, 30 Aug 2007 12:09:03 -0700 Received: from localhost (localhost.localdomain [127.0.0.1]) by h001.gghcwest.com (Postfix) with ESMTP id F3380641294; Thu, 30 Aug 2007 12:09:01 -0700 (PDT) Received: from h001.gghcwest.com ([127.0.0.1]) by localhost (h001.gghcwest.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CmCkkCozyyEt; Thu, 30 Aug 2007 12:09:01 -0700 (PDT) Received: from [192.168.168.165] (unknown [192.168.168.165]) by h001.gghcwest.com (Postfix) with ESMTP id D5C9E64122D; Thu, 30 Aug 2007 12:09:01 -0700 (PDT) Subject: Re: ZFS, XFS, and EXT4 compared From: "Jeffrey W. Baker" To: Eric Sandeen Cc: zfs-discuss@opensolaris.org, xfs@oss.sgi.com, linux-ext4@vger.kernel.org In-Reply-To: <46D71318.2050604@sandeen.net> References: <1188454611.23311.13.camel@toonses.gghcwest.com> <1188457666.24970.94.camel@edge.yarra.acx> <20070830132002.GA4086@infradead.org> <46D71318.2050604@sandeen.net> Content-Type: text/plain Date: Thu, 30 Aug 2007 12:09:01 -0700 Message-Id: <1188500941.8980.20.camel@toonses.gghcwest.com> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-archive-position: 12714 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jwbaker@acm.org Precedence: bulk X-list: xfs On Thu, 2007-08-30 at 13:57 -0500, Eric Sandeen wrote: > Christoph Hellwig wrote: > > On Thu, Aug 30, 2007 at 05:07:46PM +1000, Nathan Scott wrote: > >> To improve metadata performance, you have many options with XFS (which > >> ones are useful depends on the type of metadata workload) - you can try > >> a v2 format log, and mount with "-o logbsize=256k", try increasing the > >> directory block size (e.g. mkfs.xfs -nsize=16k, etc), and also the log > >> size (mkfs.xfs -lsize=XXXXXXb). > > > > Okay, these suggestions are one too often now. v2 log and large logs/log > > buffers are the almost universal suggestions, and we really need to make > > these defaults. XFS is already the laughing stock of the Linux community > > due to it's absurdely bad default settings. > > Agreed on reevaluating the defaults, Christoph! > > barrier seems to hurt badly on xfs, too. Note: barrier is off by > default on ext[34], so if you want apples to apples there, you need to > change one or the other filesystem's mount options. If your write cache > is safe (battery backed?) you may as well turn barriers off. I'm not > sure offhand who will react more poorly to an evaporating write cache > (with no barriers), ext4 or xfs... I didn't compare the safety of the three filesystems, but I did have disk caches disabled and only battery-backed caches enabled. Do you need barriers without volatile caches? Most people benchmark ext3 with data=writeback which is unsafe. I used ordered (the default). I think if you look at all the features, zfs is theoretically the most safe filesystem. But in practice, who knows? -jwb From owner-xfs@oss.sgi.com Thu Aug 30 12:13:54 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 12:13:55 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_05,J_CHICKENPOX_51 autolearn=no version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7UJDp4p015058 for ; Thu, 30 Aug 2007 12:13:53 -0700 Received: from liberator.sandeen.net (liberator.sandeen.net [10.0.0.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id E45F118E2161D; Thu, 30 Aug 2007 14:13:51 -0500 (CDT) Message-ID: <46D716FC.9030905@sandeen.net> Date: Thu, 30 Aug 2007 14:14:04 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: "Jeffrey W. Baker" CC: zfs-discuss@opensolaris.org, xfs@oss.sgi.com, linux-ext4@vger.kernel.org Subject: Re: ZFS, XFS, and EXT4 compared References: <1188454611.23311.13.camel@toonses.gghcwest.com> <1188457666.24970.94.camel@edge.yarra.acx> <20070830132002.GA4086@infradead.org> <46D71318.2050604@sandeen.net> <1188500941.8980.20.camel@toonses.gghcwest.com> In-Reply-To: <1188500941.8980.20.camel@toonses.gghcwest.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-archive-position: 12715 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Jeffrey W. Baker wrote: > On Thu, 2007-08-30 at 13:57 -0500, Eric Sandeen wrote: >> barrier seems to hurt badly on xfs, too. Note: barrier is off by >> default on ext[34], so if you want apples to apples there, you need to >> change one or the other filesystem's mount options. If your write cache >> is safe (battery backed?) you may as well turn barriers off. I'm not >> sure offhand who will react more poorly to an evaporating write cache >> (with no barriers), ext4 or xfs... > > I didn't compare the safety of the three filesystems, Understood > but I did have > disk caches disabled Oh, so for the SW raid tests the individual disks had no write cache?f > and only battery-backed caches enabled. Do you > need barriers without volatile caches? As far as I understand it, then nope, you don't need it, and you're hurting performance with it. -Eric From owner-xfs@oss.sgi.com Thu Aug 30 12:53:38 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 12:53:41 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_50 autolearn=ham version=3.2.0-pre1-r499012 Received: from e2.ny.us.ibm.com (e2.ny.us.ibm.com [32.97.182.142]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7UJrZ4p025940 for ; Thu, 30 Aug 2007 12:53:37 -0700 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e2.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id l7UJra9U013844 for ; Thu, 30 Aug 2007 15:53:36 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v8.5) with ESMTP id l7UJraQC684408 for ; Thu, 30 Aug 2007 15:53:36 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l7UJrZDK001676 for ; Thu, 30 Aug 2007 15:53:35 -0400 Received: from austin.ibm.com (netmail2.austin.ibm.com [9.41.248.176]) by d01av04.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id l7UJrZR9001654; Thu, 30 Aug 2007 15:53:35 -0400 Received: from gara (sig-9-49-133-202.mts.ibm.com [9.49.133.202]) by austin.ibm.com (8.13.8/8.12.10) with ESMTP id l7UJrYaI044142; Thu, 30 Aug 2007 14:53:34 -0500 Date: Thu, 30 Aug 2007 14:53:43 -0500 From: "Jose R. Santos" To: "Jeffrey W. Baker" Cc: zfs-discuss@opensolaris.org, xfs@oss.sgi.com, linux-ext4@vger.kernel.org Subject: Re: ZFS, XFS, and EXT4 compared Message-ID: <20070830145343.57ce5137@gara> In-Reply-To: <1188499930.8980.16.camel@toonses.gghcwest.com> References: <1188454611.23311.13.camel@toonses.gghcwest.com> <20070830083747.018cfe8a@gara> <1188499930.8980.16.camel@toonses.gghcwest.com> X-Mailer: Claws Mail 2.10.0 (GTK+ 2.10.11; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 12716 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: jrs@us.ibm.com Precedence: bulk X-list: xfs On Thu, 30 Aug 2007 11:52:10 -0700 "Jeffrey W. Baker" wrote: > On Thu, 2007-08-30 at 08:37 -0500, Jose R. Santos wrote: > > On Wed, 29 Aug 2007 23:16:51 -0700 > > "Jeffrey W. Baker" wrote: > > > http://tastic.brillig.org/~jwb/zfs-xfs-ext4.html > > > > FFSB: > > Could you send the patch to fix FFSB Solaris build? I should probably > > update the Sourceforge version so that it built out of the box. > > Sadly I blew away OpenSolaris without preserving the patch, but the gist > of it is this: ctime_r takes three parameters on Solaris (the third is > the buffer length) and Solaris has directio(3c) instead of O_DIRECT. If you ever run these workloads again, a tested patch would be greatly appreciated since I do not currently have access to a OpenSolaris box. > > I'm also curious about your choices in the FFSB profiles you created. > > Specifically, the very short run time and doing fsync after every file > > close. When using FFSB, I usually run with a large run time (usually > > 600 seconds) to make sure that we do enough IO to get a stable > > result. > > With a 1GB machine and max I/O of 200MB/s, I assumed 30 seconds would be > enough for the machine to quiesce. You disagree? The fsync flag is in > there because my primary workload is PostgreSQL, which is entirely > synchronous. On your results, you mentioned that you are able to get about 150MB/s out of the RAID controller and here you said you're getting about 200MB/s in FFSB? Then it does probably mean that you needed to run for an extended period of time since it could mean that you could be doing a lot from page cache. You could verify that you get the same results, by doing one of the runs with a larger run time and comparing it to one of the previous runs. The fsync flag only does fsync at file close time, not at each IO transaction on a selected file. For the purposes of testing PostgreSQL, wouldn't testing with O_DIRECT be more what you are looking for? > > Running longer means that we also use more of the disk > > storage and our results are not base on doing IO to just the beginning > > of the disk. When running for that long period of time, the fsync flag > > is not required since we do enough reads and writes to cause memory > > pressure and guarantee IO going to disk. Nothing wrong in what you > > did, but I wonder how it would affect the results of these runs. > > So do I :) I did want to finish the test in a practical amount of time, > and it takes 4 hours for the RAID to build. I will do a few hours-long > runs of ffsb with Ext4 and see what it looks like. Been there. I fell your pain. :) > > The agefs options you use are also interesting since you only utilize a > > very small percentage of your filesystem. Also note that since create > > and append weight are very heavy compare to deletes, the desired > > utilization would be reach very quickly and without that much > > fragmentation. Again, nothing wrong here, just very interested in your > > perspective in selecting these setting for your profile. > > The aging takes forever, as you are no doubt already aware. It requires > at least 1 minute for 1% utilization. On a longer run, I can do more > aging. The create and append weights are taken from the README. Yes it does take for ever, but since you're doing so very little aging, why even run it in the first place. It will make you're runs go faster if you just don't use it. :) Did such a small aging created noticeable difference in the results? It may have, since I've never run aging with such a small run time my self. > > Don't mean to invalidate the Postmark results, just merely pointing out > > a possible error in the assessment of the meta-data performance of ZFS. > > I say possible since it's still unknown if another workload will be > > able to validate these results. > > I don't want to pile scorn on XFS, but the postmark workload was chosen > for a reasonable run time on XFS, and then it turned out that it runs in > 1-2 seconds on the other filesystems. The scaling factors could have > been better chosen to exercise the high speeds of Ext4 and ZFS. The > test needs to run for more than a minute to get meaningful results from > postmark, since it uses truncated whole number seconds as the > denominator when reporting. > > One thing that stood out from the postmark results is how ext4/sw has a > weird inverse scaling with respect to the number of subdirectories. > It's faster with 10000 files in 1 directory than with 100 files each in > 100 subdirectories. Odd, no? Not so weird since inode allocator tries to spread directory inode across multiple block groups which could cause larger seeks on very meta-data intensive workloads. I'm actually working on a feature to address this sort of issue in ext4. Granted, if you really wanted to simulate file server performance, you would want to start your workload with a huge fileset to begging with where the data is spread across a larger chunk of the disk. The benchmark performance deficiencies on ext4 on a clean filesystem should be a lot less noticeable. Yet another reason why I don't particularly like postmark. > > Did you gathered CPU statistics when running these benchmarks? > > I didn't bother. If you buy a server these days and it has fewer than > four CPUs, you got ripped off. At the same time you can order a server with several dual port 4GB fiber channel card and really big and expensive disk arrays with lots of fast write caches. Here you could see the negative effects of a CPU hog filesystem. For desktop or relatively small server setup, I agree that CPU of utilization of a filesystem would be mostly insignificant/irelevant. > -jwb > -JRS From owner-xfs@oss.sgi.com Thu Aug 30 13:03:19 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 13:03:21 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RDNS_NONE autolearn=no version=3.2.0-pre1-r499012 Received: from brmea-mail-2.sun.com ([192.18.98.43]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7UK3H4p028756 for ; Thu, 30 Aug 2007 13:03:18 -0700 Received: from jurassic-x4600.sfbay.sun.com ([129.146.17.63]) by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l7UJ891c021955; Thu, 30 Aug 2007 19:08:09 GMT Received: from [129.146.228.30] (dhcp-umpk17-228-30.SFBay.Sun.COM [129.146.228.30]) by jurassic-x4600.sfbay.sun.com (8.14.1+Sun/8.14.1) with ESMTP id l7UJ89JF412557; Thu, 30 Aug 2007 12:08:09 -0700 (PDT) In-Reply-To: <1188454611.23311.13.camel@toonses.gghcwest.com> References: <1188454611.23311.13.camel@toonses.gghcwest.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: zfs-discuss@opensolaris.org, xfs@oss.sgi.com, linux-ext4@vger.kernel.org Content-Transfer-Encoding: 7bit From: eric kustarz Subject: Re: [zfs-discuss] ZFS, XFS, and EXT4 compared Date: Thu, 30 Aug 2007 12:07:59 -0700 To: "Jeffrey W. Baker" X-Mailer: Apple Mail (2.752.3) X-archive-position: 12717 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: eric.kustarz@sun.com Precedence: bulk X-list: xfs On Aug 29, 2007, at 11:16 PM, Jeffrey W. Baker wrote: > I have a lot of people whispering "zfs" in my virtual ear these days, > and at the same time I have an irrational attachment to xfs based > entirely on its lack of the 32000 subdirectory limit. I'm not > afraid of > ext4's newness, since really a lot of that stuff has been in Lustre > for > years. So a-benchmarking I went. Results at the bottom: > > http://tastic.brillig.org/~jwb/zfs-xfs-ext4.html > > Short version: ext4 is awesome. zfs has absurdly fast metadata > operations but falls apart on sequential transfer. xfs has great > sequential transfer but really bad metadata ops, like 3 minutes to tar > up the kernel. > > It would be nice if mke2fs would copy xfs's code for optimal layout > on a > software raid. The mkfs defaults and the mdadm defaults interact > badly. > > Postmark is somewhat bogus benchmark with some obvious quantization > problems. > > Regards, > jwb > Hey jwb, Thanks for taking up the task, its benchmarking so i've got some questions... What does it mean to have an external vs. internal journal for ZFS? Can you show the output of 'zpool status' when using software RAID vs. hardware RAID for ZFS? The hardware RAID has a cache on the controller. ZFS will flush the "cache" when pushing out a txg (essentially before writing out the uberblock and after writing out the uberblock). When you have a non- volatile cache with battery backing (such as your setup), its safe to disable that via putting 'set zfs:zfs_nocacheflush = 1' in /etc/ system and rebooting. Its ugly but we're going through the final code review of a fix for this (its partly we aren't sending down the right command and partly even if we did, no storage devices actually support it quite yet). What parameters did you give bonnie++? compiled 64bit, right? For the randomio test, it looks like you used an io_size of 4KB. Are those aligned? random? How big is the '/dev/sdb' file? Do you have the parameters given to FFSB? eric From owner-xfs@oss.sgi.com Thu Aug 30 15:41:22 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 15:41:24 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=AWL,BAYES_50,J_CHICKENPOX_43 autolearn=no version=3.2.0-pre1-r499012 Received: from postoffice.aconex.com (mail.app.aconex.com [203.89.192.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7UMfI4p021888 for ; Thu, 30 Aug 2007 15:41:21 -0700 Received: from edge.yarra.acx (unknown [203.89.192.141]) by postoffice.aconex.com (Postfix) with ESMTP id 9145A92C56A; Fri, 31 Aug 2007 08:41:19 +1000 (EST) Subject: Re: ZFS, XFS, and EXT4 compared From: Nathan Scott Reply-To: nscott@aconex.com To: Christoph Hellwig Cc: "Jeffrey W. Baker" , xfs@oss.sgi.com, linux-ext4@vger.kernel.org In-Reply-To: <20070830132002.GA4086@infradead.org> References: <1188454611.23311.13.camel@toonses.gghcwest.com> <1188457666.24970.94.camel@edge.yarra.acx> <20070830132002.GA4086@infradead.org> Content-Type: text/plain Organization: Aconex Date: Fri, 31 Aug 2007 08:42:31 +1000 Message-Id: <1188513751.24970.109.camel@edge.yarra.acx> Mime-Version: 1.0 X-Mailer: Evolution 2.6.3 Content-Transfer-Encoding: 7bit X-archive-position: 12718 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: nscott@aconex.com Precedence: bulk X-list: xfs [culled zfs-discuss from CC, since its subscriber-only] On Thu, 2007-08-30 at 14:20 +0100, Christoph Hellwig wrote: > > On Thu, Aug 30, 2007 at 05:07:46PM +1000, Nathan Scott wrote: > > To improve metadata performance, you have many options with XFS > (which > > ones are useful depends on the type of metadata workload) - you can > try > > a v2 format log, and mount with "-o logbsize=256k", try increasing > the > > directory block size (e.g. mkfs.xfs -nsize=16k, etc), and also the > log > > size (mkfs.xfs -lsize=XXXXXXb). > > Okay, these suggestions are one too often now. v2 log and large > logs/log > buffers are the almost universal suggestions, and we really need to > make > these defaults. Possibly. Far more importantly for XFS, there really needs to be some way for RAID drivers to say "even though I support write barriers, its not a good idea for filesystems to enable write barriers by default on me". Enabling write barriers everywhere, by default, seems to have a far worse impact than any mkfs/mount option tweaking. > XFS is already the laughing stock of the Linux community > due to it's absurdely bad default settings. Oh, _thats_ what everyone's laughing at? cheers. -- Nathan From owner-xfs@oss.sgi.com Thu Aug 30 16:05:13 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 16:05:14 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,MIME_8BIT_HEADER autolearn=no version=3.2.0-pre1-r499012 Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.184]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7UN5B4p026888 for ; Thu, 30 Aug 2007 16:05:13 -0700 Received: by rv-out-0910.google.com with SMTP id k20so258968rvb for ; Thu, 30 Aug 2007 16:05:12 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=O9y685F/zK9Z7zBxvk6EZ6gv4MAwlio/qzV+p8hijygmSxVVdPNkPSWhDKmnMX7nY92vk82a4jFe4YJfyaGVN2Xv/6+r9fTVp4n1XicGIYafZNKIdefs54kU+oBuc28/MMsaGiAs440cCK0q35EsenmeUusjp215wi9c1vnz4tA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=kxO9WfkeNdcqPO5TxV15VC38WPcJhSqmSZKTf0mHYINKwJi9kw/3tUyDEzAxXtIThZc9QBOhQfZrzqZTM6psRLHBhnuuAZaHlN2m5gpPxokyNtBuew/ADIMDCGxql91oua/ZFwDeBemBOiK37yFf/ve9PXx9SQkOCtUo//hDQbI= Received: by 10.141.211.13 with SMTP id n13mr409178rvq.1188513569594; Thu, 30 Aug 2007 15:39:29 -0700 (PDT) Received: by 10.141.29.19 with HTTP; Thu, 30 Aug 2007 15:39:29 -0700 (PDT) Message-ID: <68c491a60708301539t2d386c88n907de44cf1ed743b@mail.gmail.com> Date: Fri, 31 Aug 2007 00:39:29 +0200 From: "=?ISO-8859-1?Q?Martin_Schr=F6der?=" To: xfs@oss.sgi.com Subject: Re: About errors in XFS header files and xfsprogs In-Reply-To: <20070830165556.GA13308@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <46D6F066.5000009@op.pl> <20070830165556.GA13308@infradead.org> X-Google-Sender-Auth: 5165f58a4fbe8877 X-archive-position: 12719 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: martin@oneiros.de Precedence: bulk X-list: xfs 2007/8/30, Christoph Hellwig : > On Thu, Aug 30, 2007 at 06:29:26PM +0200, Bogdan wrote: > > The header files should not only be > > ISO-C-compatible, but even ANSI-C-compatible. This will allow anyone > > to use them. > > Sais who? The GNU C extensions are very useful for programming, and > there is no reason to move to an inferior dialect. Do you want to limit xfs to gcc/Linux? Other Unices may use other ccs. Best Martin From owner-xfs@oss.sgi.com Thu Aug 30 16:10:55 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 16:10:56 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=AWL,BAYES_20,MIME_8BIT_HEADER autolearn=no version=3.2.0-pre1-r499012 Received: from postoffice.aconex.com (mail.app.aconex.com [203.89.192.138]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7UNAq4p028440 for ; Thu, 30 Aug 2007 16:10:55 -0700 Received: from edge.yarra.acx (unknown [203.89.192.141]) by postoffice.aconex.com (Postfix) with ESMTP id 95B3192C556; Fri, 31 Aug 2007 09:10:53 +1000 (EST) Subject: Re: About errors in XFS header files and xfsprogs From: Nathan Scott Reply-To: nscott@aconex.com To: Martin =?ISO-8859-1?Q?Schr=F6der?= Cc: xfs@oss.sgi.com In-Reply-To: <68c491a60708301539t2d386c88n907de44cf1ed743b@mail.gmail.com> References: <46D6F066.5000009@op.pl> <20070830165556.GA13308@infradead.org> <68c491a60708301539t2d386c88n907de44cf1ed743b@mail.gmail.com> Content-Type: text/plain; charset=utf-8 Organization: Aconex Date: Fri, 31 Aug 2007 09:12:05 +1000 Message-Id: <1188515525.24970.112.camel@edge.yarra.acx> Mime-Version: 1.0 X-Mailer: Evolution 2.6.3 Content-Transfer-Encoding: 8bit X-archive-position: 12720 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: nscott@aconex.com Precedence: bulk X-list: xfs On Fri, 2007-08-31 at 00:39 +0200, Martin Schröder wrote: > > > > > 2007/8/30, Christoph Hellwig : > > On Thu, Aug 30, 2007 at 06:29:26PM +0200, Bogdan wrote: > > > The header files should not only be > > > ISO-C-compatible, but even ANSI-C-compatible. This will allow > anyone > > > to use them. > > > > Sais who? The GNU C extensions are very useful for programming, and > > there is no reason to move to an inferior dialect. > > Do you want to limit xfs to gcc/Linux? Other Unices may use other ccs. > These headers compile just fine on IRIX, FreeBSD and MacOSX ... the gcc-specific pieces are in platform dependent headers already. cheers. -- Nathan From owner-xfs@oss.sgi.com Thu Aug 30 18:14:36 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 18:14:39 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7V1EW4p022343 for ; Thu, 30 Aug 2007 18:14:35 -0700 Received: from pc-bnaujok.melbourne.sgi.com (pc-bnaujok.melbourne.sgi.com [134.14.55.58]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id LAA08591; Fri, 31 Aug 2007 11:14:24 +1000 Date: Fri, 31 Aug 2007 11:17:41 +1000 To: Bogdan , xfs@oss.sgi.com Subject: Re: About errors in XFS header files and xfsprogs From: "Barry Naujok" Organization: SGI Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 References: <46D6F066.5000009@op.pl> Message-ID: In-Reply-To: <46D6F066.5000009@op.pl> User-Agent: Opera Mail/9.10 (Win32) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from Quoted-Printable to 8bit by oss.sgi.com id l7V1Ea4p022360 X-archive-position: 12721 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: bnaujok@sgi.com Precedence: bulk X-list: xfs On Fri, 31 Aug 2007 02:29:26 +1000, Bogdan wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: RIPEMD160 > > Hello. > > The XFS library header files contained in xfsprogs (2.9.3-1) contain > many errors. Run the following command on a Linux system to verify: > > gcc -Wall -Wextra -Wfloat-equal -Wbad-function-cast -Wsign-compare > - -Wunreachable-code -Wpointer-arith -Wcast-qual -Wcast-align > - -Wstrict-prototypes -Wformat-security -Wformat-nonliteral > - -Wnested-externs -Wshadow -Wconversion -Wdeclaration-after-statement > - -Wundef -Wpadded -Wredundant-decls -pedantic -c -o xfs_repair.o > xfs_repair.c > > (you can use any file which #includes the libxfs.h header). The use of > 'long long' is less important. The header files should not only be > ISO-C-compatible, but even ANSI-C-compatible. This will allow anyone > to use them. I wouldn't call "padding struct to align..." an error either. I'm guessing (not 100% sure) all the "warning: ISO C forbids braced-groups within expressions" is from the endian swap calls which eventually gets to __swabXX() #defines with {} in them in swab.h. Related is the warning "declaration of '__x' shadows a previous local" caused by the beXX_add() functions doing a double __swabXX() call. Can't see an easy solution to these. "passing argument n of 'func' with different width due to prototype" doesn't seem to be an issue either. Could add lots of casts to hide it. Redeclaring optind in platform_getoptreset() in linux.h could be fixed. > Also, a following error occurs in the library: > > gcc -g -O2 -DDEBUG -DVERSION=\"2.9.3\" > - -DLOCALEDIR=\"/usr/local/share/locale\" -DPACKAGE=\"xfsprogs\" > - -I./include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -funsigned-char > - -fno-strict-aliasing -Wall -I. -g -O2 -DNDEBUG -DVERSION=\"2.9.3\" > - -DLOCALEDIR=\"/usr/local/share/locale\" -DPACKAGE=\"xfsprogs\" > - -I../include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -funsigned-char > - -fno-strict-aliasing -Wall -c xfs_bmap.c -fPIC -DPIC -o > .libs/xfs_bmap.o > > xfs_bmap.c: In function 'xfs_bmap_add_extent': > xfs_bmap.c:287: warning: implicit declaration of function > 'xfs_bmap_check_leaf_extents' > > and because of this, we have: > > ../libxfs/.libs/libxfs.a(xfs_bmap.o)(.text+0x6cf1): In function > `xfs_bmap_add_extent': > xfsprogs-2.9.3/libxfs/xfs_bmap.c:287: undefined reference to > `xfs_bmap_check_leaf_extents' > collect2: ld returned 1 exit status > gmake[1]: *** [xfs_copy] Error 1 It is a known issue that libxfs does not build with DEBUG defined. In the libxfs Makefile: # don't try linking xfs_repair with a debug libxfs. DEBUG = -DNDEBUG Regards, Barry. From owner-xfs@oss.sgi.com Thu Aug 30 19:12:52 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 19:12:56 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_51 autolearn=no version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7V2Ci4p030880 for ; Thu, 30 Aug 2007 19:12:50 -0700 Received: from [134.14.55.78] (redback.melbourne.sgi.com [134.14.55.78]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id MAA11188; Fri, 31 Aug 2007 12:12:39 +1000 Message-ID: <46D7799F.5030609@sgi.com> Date: Fri, 31 Aug 2007 12:14:55 +1000 From: Lachlan McIlroy User-Agent: Thunderbird 2.0.0.4 (X11/20070604) MIME-Version: 1.0 To: Timothy Shimmin CC: xfs-dev , xfs-oss Subject: Re: [PATCH] log replay should not overwrite newer ondisk inodes References: <46D6279F.40601@sgi.com> <46D6480F.4040307@sgi.com> <46D64CAD.6050705@sgi.com> <46D67FE6.20205@sgi.com> In-Reply-To: <46D67FE6.20205@sgi.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 12722 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: lachlan@sgi.com Precedence: bulk X-list: xfs Timothy Shimmin wrote: > Lachlan McIlroy wrote: >> Timothy Shimmin wrote: >>> Lachlan McIlroy wrote: >>>> Log replay of clustered inodes currently ignores the flushiter >>>> field in the inode that is used to determine if the on-disk inode >>>> is more up to date than the copy in the log. As a result during >>>> log replay the newer inode is being overwritten with an older >>>> version and file size updates are being lost. >>>> >>>> I haven't handled the case of the flushiter counter overflowing >>>> but that shouldn't be a problem in this case. The log buffer >>>> contains newly created inodes so their flushiter values will be 0 >>>> and the on-disk inodes should not be much greater. >>>> >>>> Lachlan >>>> >>> >>> Still would want to understand why blf_flags doesn't have >>> XFS_BLI_INODE_ALLOC_BUF set and so we could test that >>> - I didn't understand Dave's (dgc) response about that earlier. >>> But anyway...:) >>> >>> >>> Just some nit-picks: >>> >>> * instead of a comment and then calling xfs_recover_inode >>> why don't we just give the function a better name. >>> When I see the name I think it is going to recover the inode >>> but instead it is just a flush_iter check and matching >>> the magic#s. >> What would you like the function to be called? >> > Dunno :) > xfs_flushiter_check > >>> >>> * My style preference is for option 2 over option 1: >>> 1. >>> if (a) { >>> return 1; >>> } >>> return 0; >>> >>> 2. >>> return a; >>> >>> But I understand the predicate is long and sometimes people like >>> to add tracing/debug for the alternate paths in which case (1) >>> is handy for that. I just like simplicity. >> I can change that. It just looks odd when the body of the function >> is after the return statement. >> > It doesn't look funny to me :-) > But I'm not really fussed - do what you prefer. > >>> >>> * Also it is funny to return a boolean for error in the call. >>> Although, I see that is consistent with the rest of the function. >> Yep, keeping consistent with coding standards. > Well consistent with that function at least :) > >> >>> But I'm not sure this is an error... >>> Hmmmm...I'm a bit confused. >>> So you are _almost_ combining an error check with a flushiter check? >>> If one buffer is an inode magic# and the other isn't then we >>> have an error right - and could report it - but we are not doing >>> that here. >> Not exactly. If what's on disk is not an inode but the log item is >> then that could be because we haven't written the inode to disk yet >> and we need to perform recovery. > Yeah, I was thinking about that afterward. > The item's format which gives the blk# for the buf to read could > be a block which hasn't been used for an inode yet. > > OOI, > Say the inode block was freed in the past and we freshly allocate one using > this inode buf item in replay, so that the old block has the inode magic# > but it has an old large flushiter. We then say it is newer when > really it is older. Yeah that could be a problem. Knew this flushiter thing was a hack - if we logged every inode change we wouldn't have to worry what is on disk we could just play back the log. > We could check for zero mode or different gen#. That might work, thanks. I suppose the existing flushiter check will need this extra sanity too. > Or perhaps we reset the flushiter when we free the inode or > do we go thru a different replay path. Not sure how this would work. > > > > If what's on disk is an inode but >> the log item is not an inode then what we are about to recover is not >> an inode and we abort the check. > Well yes we are only interested in inode buf items. > >> If neither on-disk nor log item are >> inodes then we've got no business continuing the check. > Well as above it aint even an inode in the log. > >> >>> If we have an inode buf and the flushiter on the item is older than >>> the ondisk buffer >>> one then it is not an error but we just don't want to recover it. >> Exactly. >> > So its not an error then yet we are calling it that. > So perhaps we could have: > > if (!error && !old_inode_item) { > .... > > --Tim > > > > > > >>> --- fs/xfs/xfs_log_recover.c_1.322 2007-08-27 17:45:45.000000000 >>> +1000 >>> +++ fs/xfs/xfs_log_recover.c 2007-08-30 11:50:44.000000000 +1000 >>> @@ -1866,6 +1866,27 @@ xlog_recover_do_inode_buffer( >>> } >>> >>> /* >>> + * Check if we need to recover an inode from a buffer >>> + */ >>> +int >>> +xfs_recover_inode( >>> + char *dest, >>> + char *src) >>> +{ >>> + xfs_dinode_t *dip = (xfs_dinode_t *)dest; >>> + xfs_dinode_t *dilp = (xfs_dinode_t*)src; >>> + >>> + if ((be16_to_cpu(dip->di_core.di_magic) == XFS_DINODE_MAGIC) && >>> + (be16_to_cpu(dilp->di_core.di_magic) == XFS_DINODE_MAGIC) && >>> + (be16_to_cpu(dilp->di_core.di_flushiter) < >>> + be16_to_cpu(dip->di_core.di_flushiter))) { >>> + return 1; >>> + } >>> + >>> + return 0; >>> +} >>> + >>> +/* >>> * Perform a 'normal' buffer recovery. Each logged region of the >>> * buffer should be copied over the corresponding region in the >>> * given buffer. The bitmap in the buf log format structure indicates >>> @@ -1917,6 +1938,13 @@ xlog_recover_do_reg_buffer( >>> -1, 0, XFS_QMOPT_DOWARN, >>> "dquot_buf_recover"); >>> } >>> + /* >>> + * Sanity check if this is an inode buffer. >>> + */ >>> + if (!error) >>> + error = xfs_recover_inode(xfs_buf_offset(bp, >>> + (uint)bit << XFS_BLI_SHIFT), >>> + item->ri_buf[i].i_addr); >>> if (!error) >>> memcpy(xfs_buf_offset(bp, >>> (uint)bit << XFS_BLI_SHIFT), /* dest */ >>> >>> > > > From owner-xfs@oss.sgi.com Thu Aug 30 19:20:43 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 19:20:45 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7V2Kc4p032109 for ; Thu, 30 Aug 2007 19:20:42 -0700 Received: from [134.14.55.78] (redback.melbourne.sgi.com [134.14.55.78]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id MAA11602; Fri, 31 Aug 2007 12:20:34 +1000 Message-ID: <46D77B79.3040104@sgi.com> Date: Fri, 31 Aug 2007 12:22:49 +1000 From: Lachlan McIlroy User-Agent: Thunderbird 2.0.0.4 (X11/20070604) MIME-Version: 1.0 To: Timothy Shimmin CC: xfs-dev , xfs-oss Subject: Re: [PATCH] log replay should not overwrite newer ondisk inodes References: <46D6279F.40601@sgi.com> <46D6480F.4040307@sgi.com> <46D64CAD.6050705@sgi.com> <46D67FE6.20205@sgi.com> <46D68510.1020404@sgi.com> In-Reply-To: <46D68510.1020404@sgi.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 12723 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: lachlan@sgi.com Precedence: bulk X-list: xfs Timothy Shimmin wrote: > Timothy Shimmin wrote: >>>> But I'm not sure this is an error... >>>> Hmmmm...I'm a bit confused. >>>> So you are _almost_ combining an error check with a flushiter check? >>>> If one buffer is an inode magic# and the other isn't then we >>>> have an error right - and could report it - but we are not doing >>>> that here. >>> Not exactly. If what's on disk is not an inode but the log item is >>> then that could be because we haven't written the inode to disk yet >>> and we need to perform recovery. >> Yeah, I was thinking about that afterward. >> The item's format which gives the blk# for the buf to read could >> be a block which hasn't been used for an inode yet. >> > Well, if what's on disk is not an inode but some other data > and it happens to have the inode magic# which is remotely possible, > then we are making a bad assumption. > i.e. if we're not sure what the block/buffer should be, then testing the > MAGIC# isn't a guarantee it's an inode then. > Well not for the freeing of inode clusters case I would assume. > Or am I missing something? I don't think you're missing anything! You're right though - a magic number check is no guarantee. On the same vein, adding a generation number check isn't much better. From owner-xfs@oss.sgi.com Thu Aug 30 21:31:55 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 21:31:58 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7V4Vp4p014341 for ; Thu, 30 Aug 2007 21:31:53 -0700 Received: from [134.14.55.13] (dhcp13.melbourne.sgi.com [134.14.55.13]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id OAA15626; Fri, 31 Aug 2007 14:02:09 +1000 Message-ID: <46D792A1.7030308@sgi.com> Date: Fri, 31 Aug 2007 14:01:37 +1000 From: Mark Goodwin Reply-To: markgw@sgi.com Organization: SGI Engineering User-Agent: Thunderbird 1.5.0.13 (Windows/20070809) MIME-Version: 1.0 To: Lachlan McIlroy CC: Timothy Shimmin , xfs-dev , xfs-oss Subject: Re: [PATCH] log replay should not overwrite newer ondisk inodes References: <46D6279F.40601@sgi.com> <46D6480F.4040307@sgi.com> <46D64CAD.6050705@sgi.com> <46D67FE6.20205@sgi.com> <46D68510.1020404@sgi.com> <46D77B79.3040104@sgi.com> In-Reply-To: <46D77B79.3040104@sgi.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 12725 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: markgw@sgi.com Precedence: bulk X-list: xfs Lachlan McIlroy wrote: > Timothy Shimmin wrote: >> Timothy Shimmin wrote: >>>>> But I'm not sure this is an error... >>>>> Hmmmm...I'm a bit confused. >>>>> So you are _almost_ combining an error check with a flushiter check? >>>>> If one buffer is an inode magic# and the other isn't then we >>>>> have an error right - and could report it - but we are not doing >>>>> that here. >>>> Not exactly. If what's on disk is not an inode but the log item is >>>> then that could be because we haven't written the inode to disk yet >>>> and we need to perform recovery. >>> Yeah, I was thinking about that afterward. >>> The item's format which gives the blk# for the buf to read could >>> be a block which hasn't been used for an inode yet. >>> >> Well, if what's on disk is not an inode but some other data >> and it happens to have the inode magic# which is remotely possible, >> then we are making a bad assumption. >> i.e. if we're not sure what the block/buffer should be, then testing the >> MAGIC# isn't a guarantee it's an inode then. >> Well not for the freeing of inode clusters case I would assume. >> Or am I missing something? > I don't think you're missing anything! > > You're right though - a magic number check is no guarantee. On the same > vein, adding a generation number check isn't much better. unlink will have to invalidate the on-disk inode magic number? Or only when the whole cluster is free'd? -- Mark From owner-xfs@oss.sgi.com Thu Aug 30 21:43:03 2007 Received: with ECARTIS (v1.0.0; list xfs); Thu, 30 Aug 2007 21:43:05 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_20 autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7V4h14p015575 for ; Thu, 30 Aug 2007 21:43:03 -0700 Received: from liberator.sandeen.net (liberator.sandeen.net [10.0.0.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id D50DE18E2161F; Thu, 30 Aug 2007 23:43:01 -0500 (CDT) Message-ID: <46D79C62.1010304@sandeen.net> Date: Thu, 30 Aug 2007 23:43:14 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: linux-kernel Mailing List CC: xfs-oss Subject: [PATCH] Increase lockdep MAX_LOCK_DEPTH Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-archive-position: 12726 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs The xfs filesystem can exceed the current lockdep MAX_LOCK_DEPTH, because when deleting an entire cluster of inodes, they all get locked in xfs_ifree_cluster(). The normal cluster size is 8192 bytes, and with the default (and minimum) inode size of 256 bytes, that's up to 32 inodes that get locked. Throw in a few other locks along the way, and 40 seems enough to get me through all the tests in the xfsqa suite on 4k blocks. (block sizes above 8K will still exceed this though, I think) Signed-off-by: Eric Sandeen Index: linux-2.6.23-rc3/include/linux/sched.h =================================================================== --- linux-2.6.23-rc3.orig/include/linux/sched.h +++ linux-2.6.23-rc3/include/linux/sched.h @@ -1125,7 +1125,7 @@ struct task_struct { int softirq_context; #endif #ifdef CONFIG_LOCKDEP -# define MAX_LOCK_DEPTH 30UL +# define MAX_LOCK_DEPTH 40UL u64 curr_chain_key; int lockdep_depth; struct held_lock held_locks[MAX_LOCK_DEPTH]; From owner-xfs@oss.sgi.com Fri Aug 31 00:11:51 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 31 Aug 2007 00:11:54 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7V7Bn4p032118 for ; Fri, 31 Aug 2007 00:11:51 -0700 Received: from i55087.upc-i.chello.nl ([62.195.55.87] helo=[192.168.0.111]) by pentafluge.infradead.org with esmtpsa (Exim 4.63 #1 (Red Hat Linux)) id 1IR0AY-0002ex-IH; Fri, 31 Aug 2007 07:39:50 +0100 Subject: Re: [PATCH] Increase lockdep MAX_LOCK_DEPTH From: Peter Zijlstra To: Eric Sandeen Cc: linux-kernel Mailing List , xfs-oss , Dave Chinner , Ingo Molnar In-Reply-To: <46D79C62.1010304@sandeen.net> References: <46D79C62.1010304@sandeen.net> Content-Type: text/plain Date: Fri, 31 Aug 2007 08:39:49 +0200 Message-Id: <1188542389.6112.44.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-archive-position: 12727 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: peterz@infradead.org Precedence: bulk X-list: xfs On Thu, 2007-08-30 at 23:43 -0500, Eric Sandeen wrote: > The xfs filesystem can exceed the current lockdep > MAX_LOCK_DEPTH, because when deleting an entire cluster of inodes, > they all get locked in xfs_ifree_cluster(). The normal cluster > size is 8192 bytes, and with the default (and minimum) inode size > of 256 bytes, that's up to 32 inodes that get locked. Throw in a > few other locks along the way, and 40 seems enough to get me through > all the tests in the xfsqa suite on 4k blocks. (block sizes > above 8K will still exceed this though, I think) As 40 will still not be enough for people with larger block sizes, this does not seems like a solid solution. Could XFS possibly batch in smaller (fixed sized) chunks, or does that have significant down sides? > Signed-off-by: Eric Sandeen > > Index: linux-2.6.23-rc3/include/linux/sched.h > =================================================================== > --- linux-2.6.23-rc3.orig/include/linux/sched.h > +++ linux-2.6.23-rc3/include/linux/sched.h > @@ -1125,7 +1125,7 @@ struct task_struct { > int softirq_context; > #endif > #ifdef CONFIG_LOCKDEP > -# define MAX_LOCK_DEPTH 30UL > +# define MAX_LOCK_DEPTH 40UL > u64 curr_chain_key; > int lockdep_depth; > struct held_lock held_locks[MAX_LOCK_DEPTH]; > > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ From owner-xfs@oss.sgi.com Fri Aug 31 03:59:19 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 31 Aug 2007 03:59:22 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7VAxE4p027188 for ; Fri, 31 Aug 2007 03:59:19 -0700 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IR4DU-0003ux-VX for linux-xfs@oss.sgi.com; Fri, 31 Aug 2007 12:59:08 +0200 Received: from 82-46-103-219.cable.ubr05.azte.blueyonder.co.uk ([82.46.103.219]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 31 Aug 2007 12:59:08 +0200 Received: from byron.bbradley by 82-46-103-219.cable.ubr05.azte.blueyonder.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 31 Aug 2007 12:59:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: linux-xfs@oss.sgi.com From: Byron Bradley Subject: XFS Fails Quality Assurance Tests on ARM Date: Fri, 31 Aug 2007 10:58:52 +0000 (UTC) Lines: 122 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 82-46-103-219.cable.ubr05.azte.blueyonder.co.uk User-Agent: pan 0.120 (Plate of Shrimp) X-archive-position: 12728 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: byron.bbradley@gmail.com Precedence: bulk X-list: xfs XFS Fails Quality Assurance Tests on ARM [to: linux-xfs] [cc: lkml] Hello, I am one of the developers at http://linkstationwiki.net , we are trying to port linux (2.6.22) to the LinkStation Pro. This has an ARM926EJ chip and we are having problems with XFS (the default filesystem for these devices). While we only have a few users who have reported problems with XFS in real life, the quality assurance tests consistently fail and leave the partitions in an inconsistent and irreparable state. With debug mode enabled the following assertion fails during test 001: Assertion failed: (char *)sfep - (char *)sfp == dp->i_d.di_size, file: fs/xfs/xfs_dir2_sf.c, line: 647 kernel BUG at fs/xfs/support/debug.c:82! Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = c5888000 [00000000] *pgd=06254031, *pte=00000000, *ppte=00000000 Internal error: Oops: 817 [#1] Modules linked in: nfs nfsd exportfs lockd nfs_acl sunrpc reiserfs fuse CPU: 0 Not tainted (2.6.22 #7) PC is at __bug+0x20/0x2c LR is at 0x60000013 pc : [] lr : [<60000013>] psr: 60000013 sp : c678fba0 ip : c678fad0 fp : c678fbac r10: c606fd40 r9 : c01a6aac r8 : 00000008 r7 : c606fda8 r6 : 00000000 r5 : 00000030 r4 : c606fdae r3 : 00000000 r2 : 00000000 r1 : 0000223a r0 : 0000002c Flags: nZCv IRQs on FIQs on Mode SVC_32 Segment user Control: a005317f Table: 05888000 DAC: 00000015 Process mkdir (pid: 1522, stack limit = 0xc678e260) Stack: (0xc678fba0 to 0xc6790000) fba0: c678fbbc c678fbb0 c01ab70c c002936c c678fbe4 c678fbc0 c015d6e0 c01ab6ec fbc0: 00000000 c63b8290 c606fd40 00000000 00000008 c678fd04 c678fc1c c678fbe8 fbe0: c015d760 c015d5f4 c00c48a8 c678fc20 c678fc0c 00000000 c63b8290 c606fd40 fc00: 00000000 00000008 c01a6aac c678fd04 c678fca4 c678fc20 c015205c c015d748 fc20: c63b8290 00000004 c678ff00 00000008 c160e498 062d19b9 00000000 00000000 fc40: c606fd40 00000000 00000000 00000000 00000000 00000000 00000008 00000000 fc60: 000005f2 c018f22c 00000000 00000000 00000000 00000000 01000000 00000000 fc80: 00000000 00000000 c606fd60 c63b8238 c606fd40 c678fcf8 c678fce4 c678fca8 fca0: c018f244 c0151f48 c678fcf8 c016bec0 00000000 00000008 00460000 00000000 fcc0: 00000008 00460000 00000000 c606fd60 c606fd40 c63b8238 c678fd34 c678fce8 fce0: c01953b4 c018f1e4 c678fd04 c678fcf8 00000010 c678fd44 c678e000 000200d2 fd00: c678fd2c c678fd10 c678fd2c c63b8238 00000000 c61a2458 c678fdb0 c678fda4 fd20: c1714aa0 c6070e40 c678fd5c c678fd38 c01a6aac c019530c 00000000 00000000 fd40: c61a2458 c678fdb0 c678fec0 c63b8238 c678fd94 c678fd60 c009639c c01a6a68 fd60: c678e000 c6070eac c678fdcc c678fda4 c5e7700e 00000107 c678fec0 c5e77000 fd80: c678e000 00000000 c678fde4 c678fd98 c00981c0 c0096230 c678e000 00000001 fda0: c678fdc4 00c27168 00000004 c5e7700a c1714aa0 c61a2458 c678fdf4 c678fec0 fdc0: c17141a0 c678fec0 c78ba598 c5e77000 c678e000 c678fde8 c678fe5c c678fde8 fde0: c0098914 c00979a0 c78ba598 c17141a0 00000017 4013c000 c678ff3c 00000001 fe00: 00000001 00000000 c678ffb0 4013c058 0c678ffac c678ff00 fe20: c0024230 c002c6b0 c5889000 c5a64b64 c678ff10 00000002 c678fec0 c0552200 fe40: c5e77000 00000001 c0025794 009000c3 c678fe6c c678fe60 c0098a18 c0098894 fe60: c678fe9c c678fe70 c0098c40 c0098a04 c678fe9c c678fe80 c5e77000 00000001 fe80: c678fec0 ffffff9c c0025794 009000c3 c678febc c678fea0 c0099748 c0098b90 fea0: bebde6c4 c678ff40 c678fec0 000000c3 c678ff2c c678fec0 c0092184 c0099714 fec0: c61a2458 c1714aa0 00000017 4013c000 c678ff3c 00000001 00000001 00000000 fee0: c678ffb0 4013c058 00000000 40149000 c678ffac c678ff00 c0024230 c002c6b0 ff00: c5889000 c5a64b64 c678ff10 00000002 00000000 bebde6c4 c678ff40 bebde911 ff20: c678ff3c c678ff30 c0092274 c0092170 c678ffa4 c678ff40 c002b270 c0092268 ff40: 40017000 c0025794 c678ff64 00000000 00000000 400d9000 40016000 ffffffff ff60: 00000001 00001fdc 00000001 0001520c 00000000 40149000 c678ff9c c678ff88 ff80: c002c9c0 c002c6b0 ffffffff ffffffff 00000001 00000000 00000000 c678ffa8 ffa0: c0024fa0 c002b260 00000001 00000000 bebde911 bebde6c4 bebde6c4 ffffffff ffc0: 00000001 00000000 bebde911 bebde7a4 00000003 00000001 000001ed bebde754 ffe0: 400e1300 bebde638 0000984c 400e1310 60000010 bebde911 00000000 00000000 Backtrace: [] (__bug+0x0/0x2c) from [] (assfail+0x30/0x38) [] (assfail+0x0/0x38) from [] (xfs_dir2_sf_check+0xfc/0x154) [] (xfs_dir2_sf_check+0x0/0x154) from [] (xfs_dir2_sf_lookup+0x28/0x360) [] (xfs_dir2_sf_lookup+0x0/0x360) from [] (xfs_dir_lookup+0x124/0x170) [] (xfs_dir_lookup+0x0/0x170) from [] (xfs_dir_lookup_int+0x70/0x134) r7:c678fcf8 r6:c606fd40 r5:c63b8238 r4:c606fd60 [] (xfs_dir_lookup_int+0x0/0x134) from [] (xfs_lookup+0xb8/0x160) [] (xfs_lookup+0x0/0x160) from [] (xfs_vn_lookup+0x54/0x98) [] (xfs_vn_lookup+0x0/0x98) from [] (do_lookup+0x17c/0x1b8) r5:c63b8238 r4:c678fec0 [] (do_lookup+0x0/0x1b8) from [] (__link_path_walk+0x830/0xef4) [] (__link_path_walk+0x0/0xef4) from [] (link_path_walk+0x90/0x170) [] (link_path_walk+0x0/0x170) from [] (path_walk+0x24/0x28) [] (path_walk+0x0/0x28) from [] (do_path_lookup+0xc0/0x278) [] (do_path_lookup+0x0/0x278) from [] (__user_walk_fd+0x44/0x64) [] (__user_walk_fd+0x0/0x64) from [] (vfs_stat_fd+0x24/0x54) r7:000000c3 r6:c678fec0 r5:c678ff40 r4:bebde6c4 [] (vfs_stat_fd+0x0/0x54) from [] (vfs_stat+0x1c/0x20) r6:bebde911 r5:c678ff40 r4:bebde6c4 [] (vfs_stat+0x0/0x20) from [] (sys_oabi_stat64+0x20/0x3c) [] (sys_oabi_stat64+0x0/0x3c) from [] (ret_fast_syscall+0x0/0x2c) r5:00000000 r4:00000001 Code: e1a01000 e59f000c eb008188 e3a03000 (e5833000) esandeen in #xfs pointed me towards this bug, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=414932 , and suggested that I compare the size and offset of stucts between x86 and ARM. After modifying over 40 structs to give them the same offsets as x86 the problem is still present. I have already tried the patch by Greg Ungerer from 2004 but again this didn't change anything. I also tried compiling the kernel and userspace tools with an 8-bit structure size boundary but it made no difference. Further details of my attempts are at http://www.linkstationwiki.net/index.php/Buffalo_ARM9_Kernel_Port#XFS_Arm_Issues . I will keep this up to date until we find a solution. Anybody got any ideas of how we fix this? Thanks, -- Byron Bradley From owner-xfs@oss.sgi.com Fri Aug 31 06:51:17 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 31 Aug 2007 06:51:19 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7VDpD4p022771 for ; Fri, 31 Aug 2007 06:51:15 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id XAA09704; Fri, 31 Aug 2007 23:50:50 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l7VDokdD432478; Fri, 31 Aug 2007 23:50:47 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l7VDogYk421790; Fri, 31 Aug 2007 23:50:42 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Fri, 31 Aug 2007 23:50:42 +1000 From: David Chinner To: Peter Zijlstra Cc: Eric Sandeen , linux-kernel Mailing List , xfs-oss , Dave Chinner , Ingo Molnar Subject: Re: [PATCH] Increase lockdep MAX_LOCK_DEPTH Message-ID: <20070831135042.GD422459@sgi.com> References: <46D79C62.1010304@sandeen.net> <1188542389.6112.44.camel@twins> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1188542389.6112.44.camel@twins> User-Agent: Mutt/1.4.2.1i X-archive-position: 12729 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Fri, Aug 31, 2007 at 08:39:49AM +0200, Peter Zijlstra wrote: > On Thu, 2007-08-30 at 23:43 -0500, Eric Sandeen wrote: > > The xfs filesystem can exceed the current lockdep > > MAX_LOCK_DEPTH, because when deleting an entire cluster of inodes, > > they all get locked in xfs_ifree_cluster(). The normal cluster > > size is 8192 bytes, and with the default (and minimum) inode size > > of 256 bytes, that's up to 32 inodes that get locked. Throw in a > > few other locks along the way, and 40 seems enough to get me through > > all the tests in the xfsqa suite on 4k blocks. (block sizes > > above 8K will still exceed this though, I think) > > As 40 will still not be enough for people with larger block sizes, this > does not seems like a solid solution. Could XFS possibly batch in > smaller (fixed sized) chunks, or does that have significant down sides? The problem is not filesystem block size, it's the xfs inode cluster buffer size / the size of the inodes that determines the lock depth. the common case is 8k/256 = 32 inodes in a buffer, and they all get looked during inode cluster writeback. This inode writeback clustering is one of the reasons XFS doesn't suffer from atime issues as much as other filesystems - it doesn't need to do as much I/O to write back dirty inodes to disk. IOWs, we are not going to make the inode clusters smallers - if anything they are going to get *larger* in future so we do less I/O during inode writeback than we do now..... Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Fri Aug 31 07:33:58 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 31 Aug 2007 07:34:01 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7VEXt4p030095 for ; Fri, 31 Aug 2007 07:33:57 -0700 Received: from i55087.upc-i.chello.nl ([62.195.55.87] helo=[192.168.0.111]) by pentafluge.infradead.org with esmtpsa (Exim 4.63 #1 (Red Hat Linux)) id 1IR7ZJ-0006qQ-DW; Fri, 31 Aug 2007 15:33:53 +0100 Subject: Re: [PATCH] Increase lockdep MAX_LOCK_DEPTH From: Peter Zijlstra To: David Chinner Cc: Eric Sandeen , linux-kernel Mailing List , xfs-oss , Ingo Molnar In-Reply-To: <20070831135042.GD422459@sgi.com> References: <46D79C62.1010304@sandeen.net> <1188542389.6112.44.camel@twins> <20070831135042.GD422459@sgi.com> Content-Type: text/plain Date: Fri, 31 Aug 2007 16:33:51 +0200 Message-Id: <1188570831.6112.64.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-archive-position: 12731 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: peterz@infradead.org Precedence: bulk X-list: xfs On Fri, 2007-08-31 at 23:50 +1000, David Chinner wrote: > On Fri, Aug 31, 2007 at 08:39:49AM +0200, Peter Zijlstra wrote: > > On Thu, 2007-08-30 at 23:43 -0500, Eric Sandeen wrote: > > > The xfs filesystem can exceed the current lockdep > > > MAX_LOCK_DEPTH, because when deleting an entire cluster of inodes, > > > they all get locked in xfs_ifree_cluster(). The normal cluster > > > size is 8192 bytes, and with the default (and minimum) inode size > > > of 256 bytes, that's up to 32 inodes that get locked. Throw in a > > > few other locks along the way, and 40 seems enough to get me through > > > all the tests in the xfsqa suite on 4k blocks. (block sizes > > > above 8K will still exceed this though, I think) > > > > As 40 will still not be enough for people with larger block sizes, this > > does not seems like a solid solution. Could XFS possibly batch in > > smaller (fixed sized) chunks, or does that have significant down sides? > > The problem is not filesystem block size, it's the xfs inode cluster buffer > size / the size of the inodes that determines the lock depth. the common case > is 8k/256 = 32 inodes in a buffer, and they all get looked during inode > cluster writeback. > > This inode writeback clustering is one of the reasons XFS doesn't suffer from > atime issues as much as other filesystems - it doesn't need to do as much I/O > to write back dirty inodes to disk. > > IOWs, we are not going to make the inode clusters smallers - if anything they > are going to get *larger* in future so we do less I/O during inode writeback > than we do now..... Since they are all trylocks it seems to suggest there is no hard _need_ to lock a whole inode cluster at once, and could iterate through it with less inodes locked. Granted I have absolutely no understanding of what I'm talking about :-) Trouble is, we'd like to have a sane upper bound on the amount of held locks at any one time, obviously this is just wanting, because a lot of lock chains also depend on the number of online cpus... From owner-xfs@oss.sgi.com Fri Aug 31 07:33:23 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 31 Aug 2007 07:33:26 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7VEXI4p029920 for ; Fri, 31 Aug 2007 07:33:23 -0700 Received: from liberator.sandeen.net (liberator.sandeen.net [10.0.0.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 60CED182DD1C9; Fri, 31 Aug 2007 09:33:17 -0500 (CDT) Message-ID: <46D826BA.1060705@sandeen.net> Date: Fri, 31 Aug 2007 09:33:30 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: David Chinner CC: Peter Zijlstra , linux-kernel Mailing List , xfs-oss , Ingo Molnar Subject: Re: [PATCH] Increase lockdep MAX_LOCK_DEPTH References: <46D79C62.1010304@sandeen.net> <1188542389.6112.44.camel@twins> <20070831135042.GD422459@sgi.com> In-Reply-To: <20070831135042.GD422459@sgi.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-archive-position: 12730 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs David Chinner wrote: > On Fri, Aug 31, 2007 at 08:39:49AM +0200, Peter Zijlstra wrote: >> On Thu, 2007-08-30 at 23:43 -0500, Eric Sandeen wrote: >>> The xfs filesystem can exceed the current lockdep >>> MAX_LOCK_DEPTH, because when deleting an entire cluster of inodes, >>> they all get locked in xfs_ifree_cluster(). The normal cluster >>> size is 8192 bytes, and with the default (and minimum) inode size >>> of 256 bytes, that's up to 32 inodes that get locked. Throw in a >>> few other locks along the way, and 40 seems enough to get me through >>> all the tests in the xfsqa suite on 4k blocks. (block sizes >>> above 8K will still exceed this though, I think) >> As 40 will still not be enough for people with larger block sizes, this >> does not seems like a solid solution. Could XFS possibly batch in >> smaller (fixed sized) chunks, or does that have significant down sides? > > The problem is not filesystem block size, it's the xfs inode cluster buffer > size / the size of the inodes that determines the lock depth. the common case > is 8k/256 = 32 inodes in a buffer, and they all get looked during inode > cluster writeback. Right, but as I understand it, the cluster size *minimum* is the block size; that's why I made reference to block size - 16k blocks would have 64 inodes per cluster, minimum, potentially all locked in these paths. Just saying that today, larger blocks -> larger clusters -> more locks. Even though MAX_LOCK_DEPTH of 40 may not accomodate these scenarios, at least it would accomodate the most common case today... Peter, unless there is some other reason to do so, changing xfs performance behavior simply to satisfy lockdep limitations* doesn't seem like the best plan. I suppose one slightly flakey option would be for xfs to see whether lockdep is enabled and adjust cluster size based on MAX_LOCK_DEPTH... on the argument that lockdep is likely used in debugging kernels where sheer performance is less important... but, that sounds pretty flakey to me. -Eric *and I don't mean that in a pejorative sense; just the fact that some max depth must be chosen - the literal "limitation." From owner-xfs@oss.sgi.com Fri Aug 31 07:37:10 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 31 Aug 2007 07:37:12 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7VEb84p031075 for ; Fri, 31 Aug 2007 07:37:10 -0700 Received: from i55087.upc-i.chello.nl ([62.195.55.87] helo=[192.168.0.111]) by pentafluge.infradead.org with esmtpsa (Exim 4.63 #1 (Red Hat Linux)) id 1IR7cN-0006tu-Nl; Fri, 31 Aug 2007 15:37:06 +0100 Subject: Re: [PATCH] Increase lockdep MAX_LOCK_DEPTH From: Peter Zijlstra To: Eric Sandeen Cc: David Chinner , linux-kernel Mailing List , xfs-oss , Ingo Molnar In-Reply-To: <46D826BA.1060705@sandeen.net> References: <46D79C62.1010304@sandeen.net> <1188542389.6112.44.camel@twins> <20070831135042.GD422459@sgi.com> <46D826BA.1060705@sandeen.net> Content-Type: text/plain Date: Fri, 31 Aug 2007 16:36:52 +0200 Message-Id: <1188571012.6112.67.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-archive-position: 12732 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: peterz@infradead.org Precedence: bulk X-list: xfs On Fri, 2007-08-31 at 09:33 -0500, Eric Sandeen wrote: > Peter, unless there is some other reason to do so, changing xfs > performance behavior simply to satisfy lockdep limitations* doesn't seem > like the best plan. > > I suppose one slightly flakey option would be for xfs to see whether > lockdep is enabled and adjust cluster size based on MAX_LOCK_DEPTH... on > the argument that lockdep is likely used in debugging kernels where > sheer performance is less important... but, that sounds pretty flakey to me. Agreed, that sucks too :-/ I was hoping there would be a 'nice' solution, a well, again, reality ruins it. From owner-xfs@oss.sgi.com Fri Aug 31 07:59:47 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 31 Aug 2007 07:59:50 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7VExi4p001946 for ; Fri, 31 Aug 2007 07:59:47 -0700 Received: from liberator.sandeen.net (liberator.sandeen.net [10.0.0.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 6833B18E21571; Fri, 31 Aug 2007 09:36:33 -0500 (CDT) Message-ID: <46D8277E.3000402@sandeen.net> Date: Fri, 31 Aug 2007 09:36:46 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Byron Bradley CC: linux-xfs@oss.sgi.com Subject: Re: XFS Fails Quality Assurance Tests on ARM References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-archive-position: 12733 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Byron Bradley wrote: > esandeen in #xfs pointed me towards this bug, > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=414932 , and suggested > that I compare the size and offset of stucts between x86 and ARM. After > modifying over 40 structs to give them the same offsets as x86 the problem > is still present. I have already tried the patch by Greg Ungerer from 2004 > but again this didn't change anything. I also tried compiling the kernel > and userspace tools with an 8-bit structure size boundary but it made no > difference. > > Further details of my attempts are at > http://www.linkstationwiki.net/index.php/Buffalo_ARM9_Kernel_Port#XFS_Arm_Issues > . I will keep this up to date until we find a solution. Can you put information up there about the structure alignment problems you found, and the patch you tried? -Eric > Anybody got any ideas of how we fix this? > > Thanks, > From owner-xfs@oss.sgi.com Fri Aug 31 08:05:35 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 31 Aug 2007 08:05:38 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7VF5V4p002964 for ; Fri, 31 Aug 2007 08:05:34 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id BAA13502; Sat, 1 Sep 2007 01:05:18 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l7VF5EdD996311; Sat, 1 Sep 2007 01:05:15 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l7VF5BLi996695; Sat, 1 Sep 2007 01:05:11 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Sat, 1 Sep 2007 01:05:11 +1000 From: David Chinner To: Peter Zijlstra Cc: David Chinner , Eric Sandeen , linux-kernel Mailing List , xfs-oss , Ingo Molnar Subject: Re: [PATCH] Increase lockdep MAX_LOCK_DEPTH Message-ID: <20070831150511.GA734179@sgi.com> References: <46D79C62.1010304@sandeen.net> <1188542389.6112.44.camel@twins> <20070831135042.GD422459@sgi.com> <1188570831.6112.64.camel@twins> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1188570831.6112.64.camel@twins> User-Agent: Mutt/1.4.2.1i X-archive-position: 12734 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Fri, Aug 31, 2007 at 04:33:51PM +0200, Peter Zijlstra wrote: > On Fri, 2007-08-31 at 23:50 +1000, David Chinner wrote: > > On Fri, Aug 31, 2007 at 08:39:49AM +0200, Peter Zijlstra wrote: > > > On Thu, 2007-08-30 at 23:43 -0500, Eric Sandeen wrote: > > > > The xfs filesystem can exceed the current lockdep > > > > MAX_LOCK_DEPTH, because when deleting an entire cluster of inodes, > > > > they all get locked in xfs_ifree_cluster(). The normal cluster > > > > size is 8192 bytes, and with the default (and minimum) inode size > > > > of 256 bytes, that's up to 32 inodes that get locked. Throw in a > > > > few other locks along the way, and 40 seems enough to get me through > > > > all the tests in the xfsqa suite on 4k blocks. (block sizes > > > > above 8K will still exceed this though, I think) > > > > > > As 40 will still not be enough for people with larger block sizes, this > > > does not seems like a solid solution. Could XFS possibly batch in > > > smaller (fixed sized) chunks, or does that have significant down sides? > > > > The problem is not filesystem block size, it's the xfs inode cluster buffer > > size / the size of the inodes that determines the lock depth. the common case > > is 8k/256 = 32 inodes in a buffer, and they all get looked during inode > > cluster writeback. > > > > This inode writeback clustering is one of the reasons XFS doesn't suffer from > > atime issues as much as other filesystems - it doesn't need to do as much I/O > > to write back dirty inodes to disk. > > > > IOWs, we are not going to make the inode clusters smallers - if anything they > > are going to get *larger* in future so we do less I/O during inode writeback > > than we do now..... > > Since they are all trylocks it seems to suggest there is no hard _need_ > to lock a whole inode cluster at once, and could iterate through it with > less inodes locked. That's kind of misleading. They are trylocks to prevent deadlocks with other threads that may be cleaning up a given inode or the inodes may already be locked for writeback and so locking them a second time would deadlock. Basically we have to run the lower loops with the inodes locked, and the trylocks simply avoid the need for us to explicity check if items are locked to avoid deadlocks. > Granted I have absolutely no understanding of what I'm talking about :-) > > Trouble is, we'd like to have a sane upper bound on the amount of held > locks at any one time, obviously this is just wanting, because a lot of > lock chains also depend on the number of online cpus... Sure - this is an obvious case where it is valid to take >30 locks at once in a single thread. In fact, worst case here we are taking twice this number of locks - we actually take 2 per inode (ilock and flock) so a full 32 inode cluster free would take >60 locks in the middle of this function and we should be busting this depth couter limit all the time. Do semaphores (the flush locks) contribute to the lock depth counters? Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Fri Aug 31 08:09:31 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 31 Aug 2007 08:09:33 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from pentafluge.infradead.org (pentafluge.infradead.org [213.146.154.40]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7VF9P4p003761 for ; Fri, 31 Aug 2007 08:09:30 -0700 Received: from i55087.upc-i.chello.nl ([62.195.55.87] helo=[192.168.0.111]) by pentafluge.infradead.org with esmtpsa (Exim 4.63 #1 (Red Hat Linux)) id 1IR87e-0007Ft-Ar; Fri, 31 Aug 2007 16:09:22 +0100 Subject: Re: [PATCH] Increase lockdep MAX_LOCK_DEPTH From: Peter Zijlstra To: David Chinner Cc: Eric Sandeen , linux-kernel Mailing List , xfs-oss , Ingo Molnar In-Reply-To: <20070831150511.GA734179@sgi.com> References: <46D79C62.1010304@sandeen.net> <1188542389.6112.44.camel@twins> <20070831135042.GD422459@sgi.com> <1188570831.6112.64.camel@twins> <20070831150511.GA734179@sgi.com> Content-Type: text/plain Date: Fri, 31 Aug 2007 17:09:21 +0200 Message-Id: <1188572961.6112.72.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-archive-position: 12735 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: peterz@infradead.org Precedence: bulk X-list: xfs On Sat, 2007-09-01 at 01:05 +1000, David Chinner wrote: > > Trouble is, we'd like to have a sane upper bound on the amount of held > > locks at any one time, obviously this is just wanting, because a lot of > > lock chains also depend on the number of online cpus... > > Sure - this is an obvious case where it is valid to take >30 locks at > once in a single thread. In fact, worst case here we are taking twice this > number of locks - we actually take 2 per inode (ilock and flock) so a > full 32 inode cluster free would take >60 locks in the middle of this > function and we should be busting this depth couter limit all the > time. I think this started because jeffpc couldn't boot without XFS busting lockdep :-) > Do semaphores (the flush locks) contribute to the lock depth > counters? No, alas, we cannot handle semaphores in lockdep. Semaphores don't have a strict owner, hence we cannot track them. This is one of the reasons to rid ourselves of semaphores - that and there are very few cases where the actual semantics of semaphores are needed. Most of the times code using semaphores can be expressed with either a mutex or a completion. From owner-xfs@oss.sgi.com Fri Aug 31 08:11:10 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 31 Aug 2007 08:11:12 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from sandeen.net (sandeen.net [209.173.210.139]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id l7VFB84p004290 for ; Fri, 31 Aug 2007 08:11:10 -0700 Received: from liberator.sandeen.net (liberator.sandeen.net [10.0.0.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTP id 8334618E21571; Fri, 31 Aug 2007 10:11:09 -0500 (CDT) Message-ID: <46D82F9A.9090606@sandeen.net> Date: Fri, 31 Aug 2007 10:11:22 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Peter Zijlstra CC: David Chinner , linux-kernel Mailing List , xfs-oss , Ingo Molnar Subject: Re: [PATCH] Increase lockdep MAX_LOCK_DEPTH References: <46D79C62.1010304@sandeen.net> <1188542389.6112.44.camel@twins> <20070831135042.GD422459@sgi.com> <1188570831.6112.64.camel@twins> <20070831150511.GA734179@sgi.com> <1188572961.6112.72.camel@twins> In-Reply-To: <1188572961.6112.72.camel@twins> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-archive-position: 12736 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: sandeen@sandeen.net Precedence: bulk X-list: xfs Peter Zijlstra wrote: > On Sat, 2007-09-01 at 01:05 +1000, David Chinner wrote: > >>> Trouble is, we'd like to have a sane upper bound on the amount of held >>> locks at any one time, obviously this is just wanting, because a lot of >>> lock chains also depend on the number of online cpus... >> Sure - this is an obvious case where it is valid to take >30 locks at >> once in a single thread. In fact, worst case here we are taking twice this >> number of locks - we actually take 2 per inode (ilock and flock) so a >> full 32 inode cluster free would take >60 locks in the middle of this >> function and we should be busting this depth couter limit all the >> time. > > I think this started because jeffpc couldn't boot without XFS busting > lockdep :-) > >> Do semaphores (the flush locks) contribute to the lock depth >> counters? > > No, alas, we cannot handle semaphores in lockdep. That explains why 40 was enough for me, I guess :) -Eric From owner-xfs@oss.sgi.com Fri Aug 31 08:48:27 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 31 Aug 2007 08:48:29 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.0-pre1-r499012 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7VFmO4p012984 for ; Fri, 31 Aug 2007 08:48:26 -0700 Received: from snort.melbourne.sgi.com (snort.melbourne.sgi.com [134.14.54.149]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id BAA15715; Sat, 1 Sep 2007 01:48:24 +1000 Received: from snort.melbourne.sgi.com (localhost [127.0.0.1]) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id l7VFmNdD1013848; Sat, 1 Sep 2007 01:48:24 +1000 (AEST) Received: (from dgc@localhost) by snort.melbourne.sgi.com (SGI-8.12.5/8.12.5/Submit) id l7VFmNEG1013815; Sat, 1 Sep 2007 01:48:23 +1000 (AEST) X-Authentication-Warning: snort.melbourne.sgi.com: dgc set sender to dgc@sgi.com using -f Date: Sat, 1 Sep 2007 01:48:23 +1000 From: David Chinner To: Mark Goodwin Cc: Lachlan McIlroy , Timothy Shimmin , xfs-dev , xfs-oss Subject: Re: [PATCH] log replay should not overwrite newer ondisk inodes Message-ID: <20070831154822.GD734179@sgi.com> References: <46D6279F.40601@sgi.com> <46D6480F.4040307@sgi.com> <46D64CAD.6050705@sgi.com> <46D67FE6.20205@sgi.com> <46D68510.1020404@sgi.com> <46D77B79.3040104@sgi.com> <46D792A1.7030308@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46D792A1.7030308@sgi.com> User-Agent: Mutt/1.4.2.1i X-archive-position: 12738 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: dgc@sgi.com Precedence: bulk X-list: xfs On Fri, Aug 31, 2007 at 02:01:37PM +1000, Mark Goodwin wrote: > Lachlan McIlroy wrote: > >Timothy Shimmin wrote: > >>Timothy Shimmin wrote: > >>>>> But I'm not sure this is an error... > >>>>> Hmmmm...I'm a bit confused. > >>>>> So you are _almost_ combining an error check with a flushiter check? > >>>>> If one buffer is an inode magic# and the other isn't then we > >>>>> have an error right - and could report it - but we are not doing > >>>>>that here. > >>>>Not exactly. If what's on disk is not an inode but the log item is > >>>>then that could be because we haven't written the inode to disk yet > >>>>and we need to perform recovery. > >>>Yeah, I was thinking about that afterward. > >>>The item's format which gives the blk# for the buf to read could > >>>be a block which hasn't been used for an inode yet. > >>> > >>Well, if what's on disk is not an inode but some other data > >>and it happens to have the inode magic# which is remotely possible, > >>then we are making a bad assumption. > >>i.e. if we're not sure what the block/buffer should be, then testing the > >>MAGIC# isn't a guarantee it's an inode then. > >>Well not for the freeing of inode clusters case I would assume. > >>Or am I missing something? > >I don't think you're missing anything! > > > >You're right though - a magic number check is no guarantee. On the same > >vein, adding a generation number check isn't much better. > > unlink will have to invalidate the on-disk inode magic number? Or only > when the whole cluster is free'd? An unlinked inode is only detectable by the mode parameter being zero. The rest of the inode will look valid. To detect the difference between a newly allocated inode *chunk* that has been written to and a stale inode chunk that we have just allocated and not written to yet, you need to walk every inode in the chunk and determine if the mode parameter is zero in every inode. If the mode is zero for all inodes and there are generation numbers that are not zero, then you've detected a stale buffer and you should replay the inode cluster buffer initialisation. Cheers, Dave. -- Dave Chinner Principal Engineer SGI Australian Software Group From owner-xfs@oss.sgi.com Fri Aug 31 16:55:56 2007 Received: with ECARTIS (v1.0.0; list xfs); Fri, 31 Aug 2007 16:55:58 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.2.0-pre1-r499012 (2007-01-23) on oss.sgi.com X-Spam-Level: **** X-Spam-Status: No, score=4.0 required=5.0 tests=BAYES_99,STOX_REPLY_TYPE autolearn=no version=3.2.0-pre1-r499012 Received: from static-206.196.104.41.primary.net (static-206.196.104.41.primary.net [206.196.104.41]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with SMTP id l7VNtr4p021658 for ; Fri, 31 Aug 2007 16:55:56 -0700 Received: from [167.77.139.203] (helo=otn) by static-206.196.104.41.primary.net with smtp (Exim 4.62 (FreeBSD)) id 1IRGQJ-0002ae-4Q; Fri, 31 Aug 2007 19:01:11 -0500 Message-ID: <000b01c7ec2a$91016dc0$cb8b4da7@otn> From: To: Subject: Market Close Pick List Date: Fri, 31 Aug 2007 18:56:36 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-archive-position: 12740 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: wendysz03814@sun.mdx.ac.uk Precedence: bulk X-list: xfs Taking Subscription gaming to the bank. VEGA PROMOTIONAL SYS V G P M $0.07 Subscription games bring in over 1 Billion annualy. Investors were thrilled at World of Warcraft.s 471 Million gross in 2006. Subscription based games are VGPM's focus in the market. Get all over VGPM first thing Tuesday.