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-ne