From bnaujok@sgi.com Mon Dec 1 00:33:05 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_73, LOCAL_GNU_PATCH autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB16X4et027360 for ; Mon, 1 Dec 2008 00:33:05 -0600 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by relay1.corp.sgi.com (Postfix) with SMTP id 0D7A38F8173 for ; Sun, 30 Nov 2008 22:32:59 -0800 (PST) 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 RAA02969 for ; Mon, 1 Dec 2008 17:32:57 +1100 Date: Mon, 01 Dec 2008 17:34:39 +1100 To: "xfs@oss.sgi.com" Subject: [REVIEW] Fix unaligned accesses in IA64 in xfsprogs From: "Barry Naujok" Organization: SGI Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Message-ID: User-Agent: Opera Mail/9.52 (Win32) xfs_repair is the main culprit when getting disk extents which aren't properly aligned in memory. This patch does not call xfs_bmbt_disk_get_all directly anymore but does an unaligned get on the disk extent record and calls xfs_bmbt_get_all which is host-based like the rest of the kernel routines do. =========================================================================== xfsprogs/db/bmap.c =========================================================================== --- a/xfsprogs/db/bmap.c 2008-12-01 17:10:37.000000000 +1100 +++ b/xfsprogs/db/bmap.c 2008-12-01 17:03:17.956547706 +1100 @@ -277,21 +277,17 @@ convert_extent( xfs_dfilblks_t *cp, int *fp) { - xfs_bmbt_irec_t irec, *s = &irec; - xfs_bmbt_rec_t rpcopy, *p = &rpcopy; + xfs_bmbt_irec_t irec; + xfs_bmbt_rec_host_t rec; - memmove(&rpcopy, rp, sizeof(rpcopy)); - libxfs_bmbt_disk_get_all(p, s); - - if (s->br_state == XFS_EXT_UNWRITTEN) { - *fp = 1; - } else { - *fp = 0; - } - - *op = s->br_startoff; - *sp = s->br_startblock; - *cp = s->br_blockcount; + rec.l0 = get_unaligned_be64(&rp->l0); + rec.l1 = get_unaligned_be64(&rp->l1); + libxfs_bmbt_get_all(&rec, &irec); + + *fp = irec.br_state == XFS_EXT_UNWRITTEN; + *op = irec.br_startoff; + *sp = irec.br_startblock; + *cp = irec.br_blockcount; } void =========================================================================== xfsprogs/include/libxfs.h =========================================================================== --- a/xfsprogs/include/libxfs.h 2008-12-01 17:10:37.000000000 +1100 +++ b/xfsprogs/include/libxfs.h 2008-12-01 16:45:05.941577400 +1100 @@ -502,7 +502,7 @@ xfs_bmbt_rec_host_t *xfs_bmap_search_ext #define libxfs_bunmapi xfs_bunmapi /* xfs_bmap_btree.h */ -#define libxfs_bmbt_disk_get_all xfs_bmbt_disk_get_all +#define libxfs_bmbt_get_all xfs_bmbt_get_all /* xfs_da_btree.h */ #define libxfs_da_brelse xfs_da_brelse =========================================================================== xfsprogs/include/xfs_arch.h =========================================================================== --- a/xfsprogs/include/xfs_arch.h 2008-12-01 17:10:37.000000000 +1100 +++ b/xfsprogs/include/xfs_arch.h 2008-12-01 17:06:38.819726283 +1100 @@ -71,6 +71,13 @@ static inline void be64_add_cpu(__be64 * *a = cpu_to_be64(be64_to_cpu(*a) + b); } +static inline __u64 get_unaligned_be64(void *ptr) +{ + __be64 __tmp; + memmove(&__tmp, ptr, 8); + return be64_to_cpu(__tmp); +} + #endif /* __KERNEL__ */ /* do we need conversion? */ =========================================================================== xfsprogs/libxfs/xfs.h =========================================================================== --- a/xfsprogs/libxfs/xfs.h 2008-12-01 17:10:37.000000000 +1100 +++ b/xfsprogs/libxfs/xfs.h 2008-12-01 17:05:22.041221304 +1100 @@ -127,14 +127,6 @@ static inline int __do_div(unsigned long #define max_t(type,x,y) \ ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; }) -/* only 64 bit accesses used in xfs kernel code */ -static inline __u64 get_unaligned_be64(void *ptr) -{ - __be64 __tmp; - memmove(&__tmp, ptr, 8); - return be64_to_cpu(__tmp); -} - static inline void put_unaligned(__be64 val, void *ptr) { memmove(ptr, &val, 8); =========================================================================== xfsprogs/repair/dino_chunks.c =========================================================================== --- a/xfsprogs/repair/dino_chunks.c 2008-12-01 17:10:37.000000000 +1100 +++ b/xfsprogs/repair/dino_chunks.c 2008-12-01 16:11:11.549834281 +1100 @@ -609,7 +609,8 @@ process_inode_chunk( if (blks_per_cluster == 0) blks_per_cluster = 1; cluster_count = XFS_INODES_PER_CHUNK / inodes_per_cluster; - ASSERT(cluster_count > 0); + if (cluster_count == 0) + cluster_count = 1; /* * get all blocks required to read in this chunk (may wind up =========================================================================== xfsprogs/repair/dinode.c =========================================================================== --- a/xfsprogs/repair/dinode.c 2008-12-01 17:10:37.000000000 +1100 +++ b/xfsprogs/repair/dinode.c 2008-12-01 17:03:40.217799833 +1100 @@ -460,10 +460,13 @@ get_bmbt_reclist( xfs_dfiloff_t fblock) { int i; + xfs_bmbt_rec_host_t rec; xfs_bmbt_irec_t irec; - for (i = 0; i < numrecs; i++) { - libxfs_bmbt_disk_get_all(rp + i, &irec); + for (i = 0; i < numrecs; i++, rp++) { + rec.l0 = get_unaligned_be64(&rp->l0); + rec.l1 = get_unaligned_be64(&rp->l1); + xfs_bmbt_get_all(&rec, &irec); if (irec.br_startoff >= fblock && irec.br_startoff + irec.br_blockcount < fblock) return (irec.br_startblock + fblock - irec.br_startoff); @@ -612,6 +615,7 @@ process_bmbt_reclist_int( int whichfork) { xfs_bmbt_irec_t irec; + xfs_bmbt_rec_host_t rec; xfs_dfilblks_t cp = 0; /* prev count */ xfs_dfsbno_t sp = 0; /* prev start */ xfs_dfiloff_t op = 0; /* prev offset */ @@ -636,8 +640,10 @@ process_bmbt_reclist_int( else ftype = _("regular"); - for (i = 0; i < numrecs; i++) { - libxfs_bmbt_disk_get_all(rp + i, &irec); + for (i = 0; i < numrecs; i++, rp++) { + rec.l0 = get_unaligned_be64(&rp->l0); + rec.l1 = get_unaligned_be64(&rp->l1); + libxfs_bmbt_get_all(&rec, &irec); if (i == 0) *last_key = *first_key = irec.br_startoff; else @@ -913,14 +919,17 @@ getfunc_extlist(xfs_mount_t *mp, int whichfork) { xfs_bmbt_irec_t irec; + xfs_bmbt_rec_host_t rec; xfs_dfsbno_t final_fsbno = NULLDFSBNO; - xfs_bmbt_rec_t *rootblock = (xfs_bmbt_rec_t *) + xfs_bmbt_rec_t *rp = (xfs_bmbt_rec_t *) XFS_DFORK_PTR(dip, whichfork); xfs_extnum_t nextents = XFS_DFORK_NEXTENTS(dip, whichfork); int i; - for (i = 0; i < nextents; i++) { - libxfs_bmbt_disk_get_all(rootblock + i, &irec); + for (i = 0; i < nextents; i++, rp++) { + rec.l0 = get_unaligned_be64(&rp->l0); + rec.l1 = get_unaligned_be64(&rp->l1); + libxfs_bmbt_get_all(&rec, &irec); if (irec.br_startoff <= bno && bno < irec.br_startoff + irec.br_blockcount) { final_fsbno = bno - irec.br_startoff + irec.br_startblock; @@ -948,6 +957,7 @@ getfunc_btree(xfs_mount_t *mp, int found; int numrecs; xfs_bmbt_rec_t *rec; + xfs_bmbt_rec_host_t hrec; xfs_bmbt_irec_t irec; xfs_bmbt_ptr_t *pp; xfs_bmbt_key_t *key; @@ -1072,8 +1082,10 @@ getfunc_btree(xfs_mount_t *mp, ino, numrecs, mp->m_bmap_dmnr[0]); rec = XFS_BMBT_REC_ADDR(mp, block, 1); - for (i = 0; i < numrecs; i++) { - libxfs_bmbt_disk_get_all(rec + i, &irec); + for (i = 0; i < numrecs; i++, rec++) { + hrec.l0 = get_unaligned_be64(&rec->l0); + hrec.l1 = get_unaligned_be64(&rec->l1); + libxfs_bmbt_get_all(&hrec, &irec); if (irec.br_startoff <= bno && bno < irec.br_startoff + irec.br_blockcount) { final_fsbno = bno - irec.br_startoff + @@ -1387,6 +1399,7 @@ process_symlink_extlist(xfs_mount_t *mp, { xfs_dfiloff_t expected_offset; xfs_bmbt_rec_t *rp; + xfs_bmbt_rec_host_t rec; xfs_bmbt_irec_t irec; int numrecs; int i; @@ -1424,8 +1437,10 @@ process_symlink_extlist(xfs_mount_t *mp, max_blocks = max_symlink_blocks; expected_offset = 0; - for (i = 0; i < numrecs; i++) { - libxfs_bmbt_disk_get_all(rp + i, &irec); + for (i = 0; i < numrecs; i++, rp++) { + rec.l0 = get_unaligned_be64(&rp->l0); + rec.l1 = get_unaligned_be64(&rp->l1); + libxfs_bmbt_get_all(&rec, &irec); if (irec.br_startoff != expected_offset) { do_warn( =========================================================================== xfsprogs/repair/prefetch.c =========================================================================== --- a/xfsprogs/repair/prefetch.c 2008-12-01 17:10:37.000000000 +1100 +++ b/xfsprogs/repair/prefetch.c 2008-12-01 17:03:46.972965840 +1100 @@ -170,12 +170,15 @@ pf_read_bmbt_reclist( int numrecs) { int i; + xfs_bmbt_rec_host_t rec; xfs_bmbt_irec_t irec; xfs_dfilblks_t cp = 0; /* prev count */ xfs_dfiloff_t op = 0; /* prev offset */ - for (i = 0; i < numrecs; i++) { - libxfs_bmbt_disk_get_all(rp + i, &irec); + for (i = 0; i < numrecs; i++, rp++) { + rec.l0 = get_unaligned_be64(&rp->l0); + rec.l1 = get_unaligned_be64(&rp->l1); + libxfs_bmbt_get_all(&rec, &irec); if (((i > 0) && (op + cp > irec.br_startoff)) || (irec.br_blockcount == 0) || From david@fromorbit.com Mon Dec 1 01:56:45 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB17uiOL032031 for ; Mon, 1 Dec 2008 01:56:45 -0600 X-ASG-Debug-ID: 1228118202-791c03de0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from ipmail05.adl2.internode.on.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id F2BC0162F826 for ; Sun, 30 Nov 2008 23:56:42 -0800 (PST) Received: from ipmail05.adl2.internode.on.net (ipmail05.adl2.internode.on.net [203.16.214.145]) by cuda.sgi.com with ESMTP id EVmuGVicS9vGK5HU for ; Sun, 30 Nov 2008 23:56:42 -0800 (PST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAAcWM0l5LJfT/2dsb2JhbADNU4J9 X-IronPort-AV: E=Sophos;i="4.33,693,1220193000"; d="scan'208";a="266931882" Received: from ppp121-44-151-211.lns10.syd7.internode.on.net (HELO disturbed) ([121.44.151.211]) by ipmail05.adl2.internode.on.net with ESMTP; 01 Dec 2008 17:19:51 +1030 Received: from dave by disturbed with local (Exim 4.69) (envelope-from ) id 1L72bN-0002TG-Ot; Mon, 01 Dec 2008 17:49:49 +1100 Date: Mon, 1 Dec 2008 17:49:49 +1100 From: Dave Chinner To: Niv Sardi Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [XFS updates] XFS public tree - master for latest XFS changes for mainline, xfs-dev like master with kdb/dmapi branch, master, updated. v2.6.28-rc3-1049-g0924b58 Subject: Re: [XFS updates] XFS public tree - master for latest XFS changes for mainline, xfs-dev like master with kdb/dmapi branch, master, updated. v2.6.28-rc3-1049-g0924b58 Message-ID: <20081201064949.GL6291@disturbed> Mail-Followup-To: Niv Sardi , xfs@oss.sgi.com References: <200812010015.mB10F1Ab031727@oss.sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200812010015.mB10F1Ab031727@oss.sgi.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Barracuda-Connect: ipmail05.adl2.internode.on.net[203.16.214.145] X-Barracuda-Start-Time: 1228118203 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.11634 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- On Sun, Nov 30, 2008 at 06:15:01PM -0600, Niv Sardi wrote: > - Log ----------------------------------------------------------------- > commit 0924b585fc49bf371bc700c23e516a538bf589af > Author: Dave Chinner > Date: Fri Nov 28 14:23:34 2008 +1100 > > [XFS] fix uninitialised variable bug in dquot release. > > gcc is warning about an uninitialised variable in xfs_growfs_rt(). > This is a false positive. Fix it by changing the scope of the > transaction pointer to wholly within the internal loop inside > the function. The title of that doesn't match the description. I think it was supposed to be: [PATCH 4/5] XFS: fix spurious uninitialised variable warning in xfs_growfs_rt BTW, can we get a one-line summary of the commits being referenced in the message? The commit hash is less than useful, and having to read through several hundred lines of commit logs to determine what was checked in is not fun..... Cheers, Dave. -- Dave Chinner david@fromorbit.com From SRS0+8d2496b74f78b2b3d345+1926+infradead.org+hch@bombadil.srs.infradead.org Mon Dec 1 03:09:56 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB199tf0004097 for ; Mon, 1 Dec 2008 03:09:56 -0600 X-ASG-Debug-ID: 1228122594-3a9e018d0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 2E111163042A; Mon, 1 Dec 2008 01:09:55 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id 62zLP6iRN2TOGfVk; Mon, 01 Dec 2008 01:09:55 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L74mv-00071v-Os; Mon, 01 Dec 2008 09:09:53 +0000 Date: Mon, 1 Dec 2008 04:09:53 -0500 From: Christoph Hellwig To: Niv Sardi , xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [XFS updates] XFS public tree - master for latest XFS changes for mainline, xfs-dev like master with kdb/dmapi branch, master, updated. v2.6.28-rc3-1049-g0924b58 Subject: Re: [XFS updates] XFS public tree - master for latest XFS changes for mainline, xfs-dev like master with kdb/dmapi branch, master, updated. v2.6.28-rc3-1049-g0924b58 Message-ID: <20081201090953.GA31696@infradead.org> References: <200812010015.mB10F1Ab031727@oss.sgi.com> <20081201064949.GL6291@disturbed> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081201064949.GL6291@disturbed> User-Agent: Mutt/1.5.18 (2008-05-17) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228122595 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com On Mon, Dec 01, 2008 at 05:49:49PM +1100, Dave Chinner wrote: > On Sun, Nov 30, 2008 at 06:15:01PM -0600, Niv Sardi wrote: > > - Log ----------------------------------------------------------------- > > commit 0924b585fc49bf371bc700c23e516a538bf589af > > Author: Dave Chinner > > Date: Fri Nov 28 14:23:34 2008 +1100 > > > > [XFS] fix uninitialised variable bug in dquot release. > > > > gcc is warning about an uninitialised variable in xfs_growfs_rt(). > > This is a false positive. Fix it by changing the scope of the > > transaction pointer to wholly within the internal loop inside > > the function. > > The title of that doesn't match the description. I think it > was supposed to be: > > [PATCH 4/5] XFS: fix spurious uninitialised variable warning in xfs_growfs_rt Looks like xaiki just sucked in my staging tree where I mistpasted the subject line. > BTW, can we get a one-line summary of the commits being referenced > in the message? The commit hash is less than useful, and having to > read through several hundred lines of commit logs to determine > what was checked in is not fun..... Yeah, the new sort of commit messags aren't too useful. I would in fact prefer to get the old style one mail per commit, maybe even including the patch that was commited. I'm sure this is doable with git as there are a lot of projects that do it. From SRS0+8d2496b74f78b2b3d345+1926+infradead.org+hch@bombadil.srs.infradead.org Mon Dec 1 06:05:01 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=unavailable version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB1C51cG021427 for ; Mon, 1 Dec 2008 06:05:01 -0600 X-ASG-Debug-ID: 1228133100-766500480000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id B75831BE76C7 for ; Mon, 1 Dec 2008 04:05:00 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id 3BHGyqUrkP3xc26K for ; Mon, 01 Dec 2008 04:05:00 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L77WO-0008GM-Eb for xfs@oss.sgi.com; Mon, 01 Dec 2008 12:05:00 +0000 Date: Mon, 1 Dec 2008 07:05:00 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 00/10] various cleanups Subject: Re: [PATCH 00/10] various cleanups Message-ID: <20081201120500.GB19856@infradead.org> References: <20081027134707.GA5730@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081027134707.GA5730@infradead.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228133100 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com On Mon, Oct 27, 2008 at 09:47:07AM -0400, Christoph Hellwig wrote: > Various random cleanups Can I get a review for these? From SRS0+8d2496b74f78b2b3d345+1926+infradead.org+hch@bombadil.srs.infradead.org Mon Dec 1 06:05:01 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB1C4vOt021423 for ; Mon, 1 Dec 2008 06:05:01 -0600 X-ASG-Debug-ID: 1228133096-7e3a01de0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id C7DC71BE76C3 for ; Mon, 1 Dec 2008 04:04:56 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id K3654jZDyogzNAqT for ; Mon, 01 Dec 2008 04:04:56 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L77Vq-0006X6-1S for xfs@oss.sgi.com; Mon, 01 Dec 2008 12:04:26 +0000 Date: Mon, 1 Dec 2008 07:04:26 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH] xfsidbg: fix uninitialized variable warning Subject: Re: [PATCH] xfsidbg: fix uninitialized variable warning Message-ID: <20081201120426.GA19856@infradead.org> References: <20081112114609.GB15216@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081112114609.GB15216@infradead.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228133096 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com On Wed, Nov 12, 2008 at 06:46:09AM -0500, Christoph Hellwig wrote: > We don't initializ s.br_state in xfsidbg_btree_trace_record so gcc > rightly complains about accessing it in xfsidbg_xbirec. Given that we > don't get the state value from the tracing code just opencode printing > the other which actually reduces code size and makes the XFS_BTNUM_BMAP > case in xfsidbg_btree_trace_record more similar to the others. Ping? > > > Signed-off-by: Christoph Hellwig > > Index: linux-2.6-xfs/fs/xfs/xfsidbg.c > =================================================================== > --- linux-2.6-xfs.orig/fs/xfs/xfsidbg.c 2008-11-12 11:14:39.000000000 +0100 > +++ linux-2.6-xfs/fs/xfs/xfsidbg.c 2008-11-12 11:17:14.000000000 +0100 > @@ -2759,16 +2759,11 @@ xfsidbg_btree_trace_record( > { > switch (btnum) { > case XFS_BTNUM_BMAP: > - { > - struct xfs_bmbt_irec s; > - > - s.br_startoff = ((xfs_dfiloff_t)l0 << 32) | (xfs_dfiloff_t)l1; > - s.br_startblock = ((xfs_dfsbno_t)l2 << 32) | (xfs_dfsbno_t)l3; > - s.br_blockcount = ((xfs_dfilblks_t)l4 << 32) | (xfs_dfilblks_t)l5; > - > - xfsidbg_xbirec(&s); > + kdb_printf("startoff %Ld startblock %Lx blockcount %Ld\n", > + ((xfs_dfiloff_t)l0 << 32) | (xfs_dfiloff_t)l1, > + ((xfs_dfsbno_t)l2 << 32) | (xfs_dfsbno_t)l3, > + ((xfs_dfilblks_t)l4 << 32) | (xfs_dfilblks_t)l5); > break; > - } > case XFS_BTNUM_BNO: > case XFS_BTNUM_CNT: > qprintf(" startblock = %d, blockcount = %d\n", > > ---end quoted text--- From SRS0+8d2496b74f78b2b3d345+1926+infradead.org+hch@bombadil.srs.infradead.org Mon Dec 1 07:42:47 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB1DgbVY026854 for ; Mon, 1 Dec 2008 07:42:47 -0600 X-ASG-Debug-ID: 1228138957-7e0903590000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 412731BE8578 for ; Mon, 1 Dec 2008 05:42:37 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id WMiGDIov0HGjEia4 for ; Mon, 01 Dec 2008 05:42:37 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L792L-0002fb-Fd; Mon, 01 Dec 2008 13:42:05 +0000 Date: Mon, 1 Dec 2008 08:42:05 -0500 From: Christoph Hellwig To: Barry Naujok Cc: "xfs@oss.sgi.com" X-ASG-Orig-Subj: Re: [REVIEW] Fix unaligned accesses in IA64 in xfsprogs Subject: Re: [REVIEW] Fix unaligned accesses in IA64 in xfsprogs Message-ID: <20081201134205.GA7528@infradead.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228138957 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com On Mon, Dec 01, 2008 at 05:34:39PM +1100, Barry Naujok wrote: > xfs_repair is the main culprit when getting disk extents which aren't > properly aligned in memory. This patch does not call > xfs_bmbt_disk_get_all directly anymore but does an unaligned get on > the disk extent record and calls xfs_bmbt_get_all which is host-based > like the rest of the kernel routines do. What about just doin the get_unaligned in xfs_bmbt_disk_get_all? That way we could just use it everywhere. The only users that don't need the get_unaligned are in the tracing code, and I don't think we should be worried about that little bit of overhead. > @@ -277,21 +277,17 @@ convert_extent( > xfs_dfilblks_t *cp, > int *fp) > { And then we could replace this helper with a direct call to xfs_bmbt_disk_get_all as the caller would be much cleaner with a xfs_bmbt_irec_t on the stack anyway.. > --- a/xfsprogs/repair/dino_chunks.c 2008-12-01 17:10:37.000000000 +1100 > +++ b/xfsprogs/repair/dino_chunks.c 2008-12-01 16:11:11.549834281 +1100 > @@ -609,7 +609,8 @@ process_inode_chunk( > if (blks_per_cluster == 0) > blks_per_cluster = 1; > cluster_count = XFS_INODES_PER_CHUNK / inodes_per_cluster; > - ASSERT(cluster_count > 0); > + if (cluster_count == 0) > + cluster_count = 1; I can't see how this is related. From SRS0+8d2496b74f78b2b3d345+1926+infradead.org+hch@bombadil.srs.infradead.org Mon Dec 1 08:04:00 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB1E40dW028186 for ; Mon, 1 Dec 2008 08:04:00 -0600 X-ASG-Debug-ID: 1228140239-766e01cb0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 32B2F1BE87CF for ; Mon, 1 Dec 2008 06:04:00 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id RLMIIItqKsNGAx7u for ; Mon, 01 Dec 2008 06:04:00 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L79N3-0005n9-Ai; Mon, 01 Dec 2008 14:03:29 +0000 Date: Mon, 1 Dec 2008 09:03:29 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com Cc: linux-kernel@vger.kernel.org X-ASG-Orig-Subj: XFS status update for November 2008 Subject: XFS status update for November 2008 Message-ID: <20081201140329.GA5257@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228140240 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com The mainline kernel is now at 2.6.28-rc6 and includes a small number of XFS fixes. There have been no updates to the XFS development tree during December. Without new regressions that large number of changes that missed 2.6.28 has thus stabilized to be ready for 2.6.29. In the meantime kernel-side development has been slow, with the only major patch set being a wide number of fixes to the compatibility for 32 bit ioctls on a 64 bit kernel. In the meantime there has been a large number of commits to the user space tree, which mostly consist of smaller fixes. xfsprogs is getting close to have the 3.0.0 release which will be the first full resync with the kernel sources since the year 2005. From SRS0+8d2496b74f78b2b3d345+1926+infradead.org+hch@bombadil.srs.infradead.org Mon Dec 1 16:20:33 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB1MKW9g024832 for ; Mon, 1 Dec 2008 16:20:33 -0600 X-ASG-Debug-ID: 1228170009-3cee02b60000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 5AEB41639762 for ; Mon, 1 Dec 2008 14:20:09 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id w5H9E3XNlaZkjnVk for ; Mon, 01 Dec 2008 14:20:09 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7H7f-0007po-Rv for xfs@oss.sgi.com; Mon, 01 Dec 2008 22:20:07 +0000 Date: Mon, 1 Dec 2008 17:20:07 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH][mainline-only] remove useless mnt_want_write call in xfs_write Subject: Re: [PATCH][mainline-only] remove useless mnt_want_write call in xfs_write Message-ID: <20081201222007.GA28519@infradead.org> References: <20080814212551.GA20980@lst.de> <20080929074450.GB23785@lst.de> <20081110133150.GA27234@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081110133150.GA27234@infradead.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228170010 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com ping^2? Note that with the new git tree it's also not just mainline only anymore. On Mon, Nov 10, 2008 at 08:31:50AM -0500, Christoph Hellwig wrote: > ping? > > On Mon, Sep 29, 2008 at 09:44:50AM +0200, Christoph Hellwig wrote: > > Any chance to get this into the git tree for the first 2.6.28 pull? > > > > On Thu, Aug 14, 2008 at 11:25:51PM +0200, Christoph Hellwig wrote: > > > When mnt_want_write was introduced a call to it was added around > > > xfs_ichgtime, but there is no need for this because a file can't be open > > > read/write on a r/o mount, and a mount can't degrade r/o while we still > > > have files open for writing. As the mnt_want_write changes were never > > > merged into the CVS tree this patch is for mainline only. > > > > > > > > > Signed-off-by: Christoph Hellwig > > > > > > --- linux-2.6/fs/xfs/linux-2.6/xfs_lrw.c 2008-08-14 14:52:15.000000000 -0300 > > > +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c 2008-08-14 14:54:53.000000000 -0300 > > > @@ -51,7 +51,6 @@ > > > #include "xfs_vnodeops.h" > > > > > > #include > > > -#include > > > #include > > > > > > > > > @@ -668,15 +667,8 @@ start: > > > if (new_size > xip->i_size) > > > xip->i_new_size = new_size; > > > > > > - /* > > > - * We're not supposed to change timestamps in readonly-mounted > > > - * filesystems. Throw it away if anyone asks us. > > > - */ > > > - if (likely(!(ioflags & IO_INVIS) && > > > - !mnt_want_write(file->f_path.mnt))) { > > > + if (likely(!(ioflags & IO_INVIS))) > > > xfs_ichgtime(xip, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); > > > - mnt_drop_write(file->f_path.mnt); > > > - } > > > > > > /* > > > * If the offset is beyond the size of the file, we have a couple > > ---end quoted text--- > > > > > ---end quoted text--- > > ---end quoted text--- From billodo@sgi.com Mon Dec 1 17:04:40 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB1N4dIv027538 for ; Mon, 1 Dec 2008 17:04:40 -0600 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay2.corp.sgi.com (Postfix) with ESMTP id 99A8C3041D8 for ; Mon, 1 Dec 2008 15:04:36 -0800 (PST) Received: from lnx-billodo.americas.sgi.com (lnx-billodo.americas.sgi.com [128.162.232.245]) by estes.americas.sgi.com (Postfix) with ESMTP id 8BEA1700016A; Mon, 1 Dec 2008 17:04:36 -0600 (CST) Received: by lnx-billodo.americas.sgi.com (Postfix, from userid 56393) id ECDAE17E01F; Mon, 1 Dec 2008 17:10:05 -0600 (CST) Date: Mon, 1 Dec 2008 17:10:05 -0600 From: "Bill O'Donnell" To: Christoph Hellwig Cc: xfs@sgi.com Subject: Re: [PATCH 0/9] CRC support for superblock, ag headers, log and btree blocks Message-ID: <20081201231005.GA17631@sgi.com> References: <20080925225613.GA9822@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080925225613.GA9822@lst.de> User-Agent: Mutt/1.5.16 (2007-06-09) On Fri, Sep 26, 2008 at 12:56:13AM +0200, Christoph Hellwig wrote: | Here's an updated crc series for various metadata structures. We're still | looking at the magic number in the log recovery case because getting down | a buffer type for the other structures wasn't quite as easy as for the | btree block. I'll probably look into that again once we're done with all | data structures. Just to be clear, crc only applies to the metadata structures listed in the subject line, correct? It wasn't clear to me where you were with the "other structures". Maybe it would be more clear if you could provide a simple table listing the structures and whether or not crc applies (yet). Bill From billodo@sgi.com Mon Dec 1 17:17:25 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB1NHP8B028489 for ; Mon, 1 Dec 2008 17:17:25 -0600 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay2.corp.sgi.com (Postfix) with ESMTP id 390283041D9 for ; Mon, 1 Dec 2008 15:17:25 -0800 (PST) Received: from lnx-billodo.americas.sgi.com (lnx-billodo.americas.sgi.com [128.162.232.245]) by estes.americas.sgi.com (Postfix) with ESMTP id 195E3700016A; Mon, 1 Dec 2008 17:17:25 -0600 (CST) Received: by lnx-billodo.americas.sgi.com (Postfix, from userid 56393) id 7E7DE17E01F; Mon, 1 Dec 2008 17:22:54 -0600 (CST) Date: Mon, 1 Dec 2008 17:22:54 -0600 From: "Bill O'Donnell" To: Christoph Hellwig Cc: xfs@sgi.com Subject: Re: [PATCH 0/9] CRC support for superblock, ag headers, log and btree blocks Message-ID: <20081201232254.GA25288@sgi.com> References: <20080925225613.GA9822@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080925225613.GA9822@lst.de> User-Agent: Mutt/1.5.16 (2007-06-09) On Fri, Sep 26, 2008 at 12:56:13AM +0200, Christoph Hellwig wrote: | Here's an updated crc series for various metadata structures. We're still | looking at the magic number in the log recovery case because getting down | a buffer type for the other structures wasn't quite as easy as for the | btree block. I'll probably look into that again once we're done with all | data structures. IIUC, this is the latest crc series, right? (I had once thought, perhaps mistakenly, that there would be a refreshed patchset subsequent to this one). Thanks, Bill From bnaujok@sgi.com Mon Dec 1 17:31:11 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB1NVB7Q029149 for ; Mon, 1 Dec 2008 17:31:11 -0600 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by relay2.corp.sgi.com (Postfix) with SMTP id 664A230408D; Mon, 1 Dec 2008 15:31:10 -0800 (PST) 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 KAA21731; Tue, 2 Dec 2008 10:31:07 +1100 Date: Tue, 02 Dec 2008 10:31:16 +1100 To: "Christoph Hellwig" Subject: Re: [REVIEW] Fix unaligned accesses in IA64 in xfsprogs From: "Barry Naujok" Organization: SGI Cc: "xfs@oss.sgi.com" Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 MIME-Version: 1.0 References: <20081201134205.GA7528@infradead.org> Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: <20081201134205.GA7528@infradead.org> User-Agent: Opera Mail/9.52 (Win32) On Tue, 02 Dec 2008 00:42:05 +1100, Christoph Hellwig wrote: > On Mon, Dec 01, 2008 at 05:34:39PM +1100, Barry Naujok wrote: >> xfs_repair is the main culprit when getting disk extents which aren't >> properly aligned in memory. This patch does not call >> xfs_bmbt_disk_get_all directly anymore but does an unaligned get on >> the disk extent record and calls xfs_bmbt_get_all which is host-based >> like the rest of the kernel routines do. > > What about just doin the get_unaligned in xfs_bmbt_disk_get_all? That > way we could just use it everywhere. The only users that don't need > the get_unaligned are in the tracing code, and I don't think we should > be worried about that little bit of overhead. > >> @@ -277,21 +277,17 @@ convert_extent( >> xfs_dfilblks_t *cp, >> int *fp) >> { > > And then we could replace this helper with a direct call to > xfs_bmbt_disk_get_all as the caller would be much cleaner with a > xfs_bmbt_irec_t on the stack anyway.. It's a libxfs/kernel function, so ideally, it should be also ported into the kernel space and possible kernel cleanups along with it. >> --- a/xfsprogs/repair/dino_chunks.c 2008-12-01 17:10:37.000000000 +1100 >> +++ b/xfsprogs/repair/dino_chunks.c 2008-12-01 16:11:11.549834281 +1100 >> @@ -609,7 +609,8 @@ process_inode_chunk( >> if (blks_per_cluster == 0) >> blks_per_cluster = 1; >> cluster_count = XFS_INODES_PER_CHUNK / inodes_per_cluster; >> - ASSERT(cluster_count > 0); >> + if (cluster_count == 0) >> + cluster_count = 1; > > I can't see how this is related. Another IA64 fix. From billodo@sgi.com Mon Dec 1 17:34:20 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB1NYIKf029479 for ; Mon, 1 Dec 2008 17:34:20 -0600 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay1.corp.sgi.com (Postfix) with ESMTP id 867298F81A5 for ; Mon, 1 Dec 2008 15:34:15 -0800 (PST) Received: from lnx-billodo.americas.sgi.com (lnx-billodo.americas.sgi.com [128.162.232.245]) by estes.americas.sgi.com (Postfix) with ESMTP id 461E270001D6; Mon, 1 Dec 2008 17:34:15 -0600 (CST) Received: by lnx-billodo.americas.sgi.com (Postfix, from userid 56393) id B046217E01F; Mon, 1 Dec 2008 17:39:44 -0600 (CST) Date: Mon, 1 Dec 2008 17:39:44 -0600 From: "Bill O'Donnell" To: Christoph Hellwig Cc: xfs@sgi.com Subject: Re: [PATCH 0/9] CRC support for superblock, ag headers, log and btree blocks Message-ID: <20081201233944.GA32605@sgi.com> References: <20080925225613.GA9822@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080925225613.GA9822@lst.de> User-Agent: Mutt/1.5.16 (2007-06-09) On Fri, Sep 26, 2008 at 12:56:13AM +0200, Christoph Hellwig wrote: | Here's an updated crc series for various metadata structures. We're still | looking at the magic number in the log recovery case because getting down | a buffer type for the other structures wasn't quite as easy as for the | btree block. I'll probably look into that again once we're done with all | data structures. Christoph- Yet another question as I revisit this ;) ... What is to be done with the other tarball on your site ( xfs-cmds-crcs.tgz )? Is there a separate posting on this list that I may have missed earlier? Bill From billodo@sgi.com Mon Dec 1 17:36:12 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB1NaCbd029644 for ; Mon, 1 Dec 2008 17:36:12 -0600 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay3.corp.sgi.com (Postfix) with ESMTP id 9DB70AC09B for ; Mon, 1 Dec 2008 15:36:08 -0800 (PST) Received: from lnx-billodo.americas.sgi.com (lnx-billodo.americas.sgi.com [128.162.232.245]) by estes.americas.sgi.com (Postfix) with ESMTP id 56410700016A; Mon, 1 Dec 2008 17:36:08 -0600 (CST) Received: by lnx-billodo.americas.sgi.com (Postfix, from userid 56393) id C0E9517E01F; Mon, 1 Dec 2008 17:41:37 -0600 (CST) Date: Mon, 1 Dec 2008 17:41:37 -0600 From: "Bill O'Donnell" To: Christoph Hellwig Cc: xfs@sgi.com Subject: Re: [PATCH 1/9] factor out xfs_read_agi helper Message-ID: <20081201234137.GA5094@sgi.com> References: <20080925225618.GB9822@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080925225618.GB9822@lst.de> User-Agent: Mutt/1.5.16 (2007-06-09) looks good. From billodo@sgi.com Mon Dec 1 17:40:48 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB1Nel1J029929 for ; Mon, 1 Dec 2008 17:40:48 -0600 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay2.corp.sgi.com (Postfix) with ESMTP id 913D23041DC for ; Mon, 1 Dec 2008 15:40:47 -0800 (PST) Received: from lnx-billodo.americas.sgi.com (lnx-billodo.americas.sgi.com [128.162.232.245]) by estes.americas.sgi.com (Postfix) with ESMTP id 7AC00700016A; Mon, 1 Dec 2008 17:40:47 -0600 (CST) Received: by lnx-billodo.americas.sgi.com (Postfix, from userid 56393) id E6FF217E01F; Mon, 1 Dec 2008 17:46:16 -0600 (CST) Date: Mon, 1 Dec 2008 17:46:16 -0600 From: "Bill O'Donnell" To: Christoph Hellwig Cc: xfs@sgi.com Subject: Re: [PATCH 2/9] factor out xfs_read_agf helper Message-ID: <20081201234616.GB5094@sgi.com> References: <20080925225622.GC9822@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080925225622.GC9822@lst.de> User-Agent: Mutt/1.5.16 (2007-06-09) On Fri, Sep 26, 2008 at 12:56:22AM +0200, Christoph Hellwig wrote: | Add a helper to read the AGF header and perform basic verification. | Based on hunks from a larger patch from Dave Chinner. looks good. From billodo@sgi.com Mon Dec 1 17:47:49 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB1NlnqW030400 for ; Mon, 1 Dec 2008 17:47:49 -0600 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay1.corp.sgi.com (Postfix) with ESMTP id DA9778F8047 for ; Mon, 1 Dec 2008 15:47:48 -0800 (PST) Received: from lnx-billodo.americas.sgi.com (lnx-billodo.americas.sgi.com [128.162.232.245]) by estes.americas.sgi.com (Postfix) with ESMTP id BD38F700016A; Mon, 1 Dec 2008 17:47:48 -0600 (CST) Received: by lnx-billodo.americas.sgi.com (Postfix, from userid 56393) id 3734017E01F; Mon, 1 Dec 2008 17:53:18 -0600 (CST) Date: Mon, 1 Dec 2008 17:53:18 -0600 From: "Bill O'Donnell" To: Christoph Hellwig Cc: xfs@sgi.com Subject: Re: [PATCH 0/9] CRC support for superblock, ag headers, log and btree blocks Message-ID: <20081201235318.GC5094@sgi.com> References: <20080925225613.GA9822@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080925225613.GA9822@lst.de> User-Agent: Mutt/1.5.16 (2007-06-09) On Fri, Sep 26, 2008 at 12:56:13AM +0200, Christoph Hellwig wrote: | Here's an updated crc series for various metadata structures. We're still | looking at the magic number in the log recovery case because getting down | a buffer type for the other structures wasn't quite as easy as for the | btree block. I'll probably look into that again once we're done with all | data structures. I've carried out cursory build and test of this series. I'm concerned that my testing (and anyone else's testing) has not addressed performance hits being introduced with crc on metadata. What level of testing have you done, and can you recommend some testing that goes beyond the QA suite that we have in place. I did run the btree test harness on that earlier series, but it appeared to me that that was a go/no-go test and unless I'm missing something, I've not seen tests that might help quantify performance hits. Thanks, Bill From bnaujok@sgi.com Mon Dec 1 18:37:20 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB20bKYf000715 for ; Mon, 1 Dec 2008 18:37:20 -0600 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by relay3.corp.sgi.com (Postfix) with SMTP id F35E9AC009; Mon, 1 Dec 2008 16:37:15 -0800 (PST) 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 LAA22978; Tue, 2 Dec 2008 11:37:07 +1100 Date: Tue, 02 Dec 2008 11:37:31 +1100 To: "Christoph Hellwig" Subject: Re: [REVIEW] Fix unaligned accesses in IA64 in xfsprogs From: "Barry Naujok" Organization: SGI Cc: "xfs@oss.sgi.com" Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 MIME-Version: 1.0 References: <20081201134205.GA7528@infradead.org> Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: <20081201134205.GA7528@infradead.org> User-Agent: Opera Mail/9.52 (Win32) On Tue, 02 Dec 2008 00:42:05 +1100, Christoph Hellwig wrote: > On Mon, Dec 01, 2008 at 05:34:39PM +1100, Barry Naujok wrote: >> xfs_repair is the main culprit when getting disk extents which aren't >> properly aligned in memory. This patch does not call >> xfs_bmbt_disk_get_all directly anymore but does an unaligned get on >> the disk extent record and calls xfs_bmbt_get_all which is host-based >> like the rest of the kernel routines do. > > What about just doin the get_unaligned in xfs_bmbt_disk_get_all? That > way we could just use it everywhere. The only users that don't need > the get_unaligned are in the tracing code, and I don't think we should > be worried about that little bit of overhead. > >> @@ -277,21 +277,17 @@ convert_extent( >> xfs_dfilblks_t *cp, >> int *fp) >> { > > And then we could replace this helper with a direct call to > xfs_bmbt_disk_get_all as the caller would be much cleaner with a > xfs_bmbt_irec_t on the stack anyway.. Obviously modifying xfs_bmbt_disk_get_all yields a much smaller patch: =========================================================================== xfsprogs/db/bmap.c =========================================================================== --- a/xfsprogs/db/bmap.c 2008-12-02 11:21:00.000000000 +1100 +++ b/xfsprogs/db/bmap.c 2008-12-02 11:20:41.324928232 +1100 @@ -277,21 +277,14 @@ convert_extent( xfs_dfilblks_t *cp, int *fp) { - xfs_bmbt_irec_t irec, *s = &irec; - xfs_bmbt_rec_t rpcopy, *p = &rpcopy; + xfs_bmbt_irec_t irec; - memmove(&rpcopy, rp, sizeof(rpcopy)); - libxfs_bmbt_disk_get_all(p, s); + libxfs_bmbt_disk_get_all(rp, &irec); - if (s->br_state == XFS_EXT_UNWRITTEN) { - *fp = 1; - } else { - *fp = 0; - } - - *op = s->br_startoff; - *sp = s->br_startblock; - *cp = s->br_blockcount; + *fp = irec.br_state == XFS_EXT_UNWRITTEN; + *op = irec.br_startoff; + *sp = irec.br_startblock; + *cp = irec.br_blockcount; } void =========================================================================== xfsprogs/libxfs/xfs_bmap_btree.c =========================================================================== --- a/xfsprogs/libxfs/xfs_bmap_btree.c 2008-12-02 11:21:00.000000000 +1100 +++ b/xfsprogs/libxfs/xfs_bmap_btree.c 2008-12-02 11:20:09.553355392 +1100 @@ -181,7 +181,8 @@ xfs_bmbt_disk_get_all( xfs_bmbt_rec_t *r, xfs_bmbt_irec_t *s) { - __xfs_bmbt_get_all(be64_to_cpu(r->l0), be64_to_cpu(r->l1), s); + __xfs_bmbt_get_all(get_unaligned_be64(&r->l0), + get_unaligned_be64(&r->l1), s); } /* From bnaujok@sgi.com Mon Dec 1 18:41:59 2008 Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB20fx1q000906 for ; Mon, 1 Dec 2008 18:41:59 -0600 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by relay3.corp.sgi.com (Postfix) with SMTP id EBEF8AC009; Mon, 1 Dec 2008 16:41:54 -0800 (PST) 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 LAA23007; Tue, 2 Dec 2008 11:41:52 +1100 Received: by chook.melbourne.sgi.com (Postfix, from userid 1161) id B9A1158ADBF6; Tue, 2 Dec 2008 11:41:52 +1100 (EST) To: sgi.bugs.xfs@engr.sgi.com Cc: xfs@oss.sgi.com Subject: TAKE 990359 - xfs_repair: dino_chunks.c:612: process_inode_chunk: Assertion `cluster_count > 0 Message-Id: <20081202004152.B9A1158ADBF6@chook.melbourne.sgi.com> Date: Tue, 2 Dec 2008 11:41:52 +1100 (EST) From: bnaujok@sgi.com (Barry Naujok) Fix 64k blocksize handling in xfs_repair Date: Tue Dec 2 11:41:26 EST 2008 Workarea: chook.melbourne.sgi.com:/home/bnaujok/isms/xcmds-clean Inspected by: brads@sgi.com The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/xfs-cmds/master-melb Modid: master-melb:xfs-cmds:32616a xfsprogs/repair/dino_chunks.c - 1.18 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfsprogs/repair/dino_chunks.c.diff?r1=text&tr1=1.18&r2=text&tr2=1.17&f=h - Fix 64k blocksize handling in xfs_repair From bnaujok@sgi.com Mon Dec 1 19:09:46 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB219kEf002353 for ; Mon, 1 Dec 2008 19:09:46 -0600 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by relay2.corp.sgi.com (Postfix) with SMTP id 985B7304083 for ; Mon, 1 Dec 2008 17:09:42 -0800 (PST) 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 MAA23438 for ; Tue, 2 Dec 2008 12:09:41 +1100 Received: by chook.melbourne.sgi.com (Postfix, from userid 1161) id 05A1258ADBF6; Tue, 2 Dec 2008 12:09:40 +1100 (EST) To: xfs@oss.sgi.com Subject: TAKE - xfsprogs: kill unused files db/dbread.[ch] Message-Id: <20081202010941.05A1258ADBF6@chook.melbourne.sgi.com> Date: Tue, 2 Dec 2008 12:09:40 +1100 (EST) From: bnaujok@sgi.com (Barry Naujok) kill unused files db/dbread.[ch] Date: Tue Dec 2 12:09:02 EST 2008 Workarea: chook.melbourne.sgi.com:/home/bnaujok/isms/xcmds-clean Inspected by: Christoph Hellwig The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/xfs-cmds/master-melb Modid: master-melb:xfs-cmds:32617a xfsprogs/db/dbread.c - 1.10 - deleted http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfsprogs/db/dbread.c.diff?r1=text&tr1=1.10&r2=text&tr2=1.9&f=h xfsprogs/db/dbread.h - 1.7 - deleted http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfsprogs/db/dbread.h.diff?r1=text&tr1=1.7&r2=text&tr2=1.6&f=h xfsprogs/db/Makefile - 1.20 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfsprogs/db/Makefile.diff?r1=text&tr1=1.20&r2=text&tr2=1.19&f=h - kill unused files db/dbread.[ch] From bnaujok@sgi.com Mon Dec 1 19:20:16 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB21KFGM003055 for ; Mon, 1 Dec 2008 19:20:16 -0600 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by relay3.corp.sgi.com (Postfix) with SMTP id A8552AC09B for ; Mon, 1 Dec 2008 17:20:11 -0800 (PST) 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 MAA23639 for ; Tue, 2 Dec 2008 12:20:10 +1100 Received: by chook.melbourne.sgi.com (Postfix, from userid 1161) id 217DA58ADBF6; Tue, 2 Dec 2008 12:20:09 +1100 (EST) To: xfs@oss.sgi.com Subject: TAKE - xfsprogs: pad ustat struct for mount check to avoid corruption Message-Id: <20081202012010.217DA58ADBF6@chook.melbourne.sgi.com> Date: Tue, 2 Dec 2008 12:20:09 +1100 (EST) From: bnaujok@sgi.com (Barry Naujok) Linux kernels (at least up until 2.6.27) are lacking compat sys_ustat handlers on some platforms (notably PPC) so that if called from 32 bits on a 64-bit kernel, the kernel will copy out too much (32 bytes onto a 20-byte structure): [root@xero xfstests]# xfs_logprint /dev/loop0 xfs_logprint: *** stack smashing detected ***: xfs_logprint terminated Aborted This will be fixed upstream, but for the benefit of older kernels we may want to guard against this by padding the structure we pass into the syscall. We don't care about the values anyway, just the return value. Signed-off-by: Eric Sandeen Date: Tue Dec 2 12:17:58 EST 2008 Workarea: chook.melbourne.sgi.com:/home/bnaujok/isms/xcmds-clean Inspected by: Eric Sandeen The following file(s) were checked into: longdrop.melbourne.sgi.com:/isms/xfs-cmds/master-melb Modid: master-melb:xfs-cmds:32618a xfsprogs/libxfs/linux.c - 1.19 - changed http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfsprogs/libxfs/linux.c.diff?r1=text&tr1=1.19&r2=text&tr2=1.18&f=h - Pad ustat struct to avoid stack corruption From lachlan@sgi.com Mon Dec 1 21:25:19 2008 Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB23PJJm010216 for ; Mon, 1 Dec 2008 21:25:19 -0600 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by relay3.corp.sgi.com (Postfix) with SMTP id 48009AC00B; Mon, 1 Dec 2008 19:25:15 -0800 (PST) Received: from [134.14.55.78] (redback.melbourne.sgi.com [134.14.55.78]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id OAA25533; Tue, 2 Dec 2008 14:25:13 +1100 Message-ID: <4934AAA9.5090405@sgi.com> Date: Tue, 02 Dec 2008 14:25:29 +1100 From: Lachlan McIlroy Reply-To: lachlan@sgi.com User-Agent: Thunderbird 2.0.0.18 (X11/20081105) MIME-Version: 1.0 To: Donald Douwsma CC: xfs@oss.sgi.com Subject: Re: Assertion failed: atomic_read(&mp->m_active_trans) References: <492BB095.1000104@sgi.com> In-Reply-To: <492BB095.1000104@sgi.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit That looks fine to me. Just make sure the PV doesn't get closed when you check in the changes since the real problem is still unresolved. Donald Douwsma wrote: > We still occasionally see transactions in flight after remounting > read-only. This has come up a few times in the past, but we never > seem to have gotten to the bottom of it. > > http://www.gossamer-threads.com/lists/linux/kernel/868139 > > Most recently we've seen this on 2.6.27, when unmounting the root > filesystem during shutdown/reboot. > > Stack traceback for pid 13170 > 0xffff81024dcd9080 13170 12901 1 1 R 0xffff81024dcd93c0 *mount > rsp rip Function (args) > 0xffff8101fb977d18 0xffffffff803b8acd assfail+0x1a (invalid, invalid, invalid) > 0xffff8101fb977d50 0xffffffff803a57e4 xfs_attr_quiesce+0x4a (0xffff8102211e4b20) > 0xffff8101fb977d70 0xffffffff803a589b xfs_mntupdate+0x7c (0xffff8102211e4b20, invalid, invalid) > 0xffff8101fb977d90 0xffffffff803b7cf6 xfs_fs_remount+0x49 (invalid, 0xffff8101fb977dd4, invalid) > 0xffff8101fb977dc0 0xffffffff802830fe do_remount_sb+0xe9 (0xffff81025c804670, invalid, 0xffff8101ee490000, invalid) > 0xffff8101fb977e00 0xffffffff8029698d do_remount+0x7d (0xffff8101fb977e58, invalid, invalid, 0xffff8101ee490000) > 0xffff8101fb977e40 0xffffffff802974fd do_mount+0x13b (0xffff8102079c2000, 0xffff8102004ea000, 0xffff810219cb0000, invalid, 0xffff8101ee490000) > 0xffff8101fb977f20 0xffffffff8029761a sys_mount+0x89 (0x523d90, invalid, invalid, 0xffffffffc0ed0021, 0x523e30) > 0xffff8101fb977f80 0xffffffff8020b18b system_call_after_swapgs+0x7b (invalid, invalid, invalid, invalid, invalid, invalid) > > Previously we've discussed changing the ASSERT_ALWAYS to a normal > ASSERT to lessen the impact for users. Any objections to doing this > until we fix the underlying problem? > > Don > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs From tes@sgi.com Mon Dec 1 21:54:45 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB23sieh011965 for ; Mon, 1 Dec 2008 21:54:45 -0600 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by relay3.corp.sgi.com (Postfix) with SMTP id 070A5AC00C; Mon, 1 Dec 2008 19:54:42 -0800 (PST) Received: from boing.melbourne.sgi.com (boing.melbourne.sgi.com [134.14.55.141]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id OAA25973; Tue, 2 Dec 2008 14:54:40 +1100 Message-ID: <4934B180.9000507@sgi.com> Date: Tue, 02 Dec 2008 14:54:40 +1100 From: Timothy Shimmin User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) MIME-Version: 1.0 To: Dave Chinner CC: xfs@oss.sgi.com Subject: Re: [XFS updates] XFS public tree - master for latest XFS changes... References: <200812010015.mB10F1Ab031727@oss.sgi.com> <20081201064949.GL6291@disturbed> In-Reply-To: <20081201064949.GL6291@disturbed> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Dave Chinner wrote: > On Sun, Nov 30, 2008 at 06:15:01PM -0600, Niv Sardi wrote: >> - Log ----------------------------------------------------------------- >> commit 0924b585fc49bf371bc700c23e516a538bf589af >> Author: Dave Chinner >> Date: Fri Nov 28 14:23:34 2008 +1100 >> >> [XFS] fix uninitialised variable bug in dquot release. >> >> gcc is warning about an uninitialised variable in xfs_growfs_rt(). >> This is a false positive. Fix it by changing the scope of the >> transaction pointer to wholly within the internal loop inside >> the function. > > The title of that doesn't match the description. I think it > was supposed to be: > > [PATCH 4/5] XFS: fix spurious uninitialised variable warning in xfs_growfs_rt > > BTW, can we get a one-line summary of the commits being referenced > in the message? Yes. The list of commits at the start now has the 1st line of each commit description. --Tim From tes@sgi.com Mon Dec 1 22:01:17 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB241HGC012413 for ; Mon, 1 Dec 2008 22:01:17 -0600 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by relay1.corp.sgi.com (Postfix) with SMTP id D7C658F8047; Mon, 1 Dec 2008 20:01:12 -0800 (PST) Received: from boing.melbourne.sgi.com (boing.melbourne.sgi.com [134.14.55.141]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id PAA26115; Tue, 2 Dec 2008 15:01:10 +1100 Message-ID: <4934B305.3010205@sgi.com> Date: Tue, 02 Dec 2008 15:01:09 +1100 From: Timothy Shimmin User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) MIME-Version: 1.0 To: Christoph Hellwig CC: Niv Sardi , xfs@oss.sgi.com Subject: Re: [XFS updates] XFS public tree - master for latest XFS changes... References: <200812010015.mB10F1Ab031727@oss.sgi.com> <20081201064949.GL6291@disturbed> <20081201090953.GA31696@infradead.org> In-Reply-To: <20081201090953.GA31696@infradead.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Christoph Hellwig wrote: > On Mon, Dec 01, 2008 at 05:49:49PM +1100, Dave Chinner wrote: >> On Sun, Nov 30, 2008 at 06:15:01PM -0600, Niv Sardi wrote: >>> - Log ----------------------------------------------------------------- >>> commit 0924b585fc49bf371bc700c23e516a538bf589af >>> Author: Dave Chinner >>> Date: Fri Nov 28 14:23:34 2008 +1100 >>> >>> [XFS] fix uninitialised variable bug in dquot release. >>> >>> gcc is warning about an uninitialised variable in xfs_growfs_rt(). >>> This is a false positive. Fix it by changing the scope of the >>> transaction pointer to wholly within the internal loop inside >>> the function. >> The title of that doesn't match the description. I think it >> was supposed to be: >> >> [PATCH 4/5] XFS: fix spurious uninitialised variable warning in xfs_growfs_rt > > Looks like xaiki just sucked in my staging tree where I mistpasted the > subject line. > >> BTW, can we get a one-line summary of the commits being referenced >> in the message? The commit hash is less than useful, and having to >> read through several hundred lines of commit logs to determine >> what was checked in is not fun..... > > Yeah, the new sort of commit messags aren't too useful. I would in fact > prefer to get the old style one mail per commit, maybe even including > the patch that was commited. I'm sure this is doable with git as there > are a lot of projects that do it. > I've changed the script to list the commits with the 1 line description as Dave suggested (hopefully what he was intending). However, I thought the msg per push was just fine. If you and others disagree, then I'll look at a per commit email hook I guess. --Tim From markgw@sgi.com Mon Dec 1 23:47:15 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB25lFAG019636 for ; Mon, 1 Dec 2008 23:47:15 -0600 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by relay2.corp.sgi.com (Postfix) with SMTP id 4C6923041B7 for ; Mon, 1 Dec 2008 21:47:11 -0800 (PST) Received: from [134.15.251.1] (melb-sw-corp-251-1.corp.sgi.com [134.15.251.1]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id QAA27693 for ; Tue, 2 Dec 2008 16:47:07 +1100 Message-ID: <4934CBD6.4040907@sgi.com> Date: Tue, 02 Dec 2008 16:47:02 +1100 From: Mark Goodwin Reply-To: markgw@sgi.com Organization: SGI Engineering User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: xfs-oss Subject: XFS patch queue & plan for 2.6.29 open season Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Looks like 2.6.28 will have another two RC's before 2.6.29 opens. I'm unsure if that means before or after Christmas, but in any case we need to be ready before Christmas - we will have a massive pull request (largely but certainly not all due to the commit list held over from 2.6.28). Current status: # The XFS master branch on oss has taken everything in Christoph's staging tree http://www.kernel.org/pub/linux/kernel/people/hch/xfs/xfs-staging/series # We're about to take Eric's compat series (12 patches) # Christoph recently sent out a couple of review pings ;-) These need some review please (Niv? or anyone?). In the IRC listing below, there are another 15 to 20 or so on the list that need review. # After that, here's a quote from a public IRC chat late last week: that's only 30 patches - there are ~70 more still on the mail list there's still a few more -staging is the fully reviewd set I have another about 15 to 20 that need review that I've recently posted Eric has about 20 compat patches Dave has some patches that he still needs to repost and I also have some older stuff that needs reposting and then there's the whole dmapi stuff that needs the xfs-dev tree and once we have that cleared I have another at least 10 that I haven't bothered (re)posting and then there's the crc series which isn't for short-term commit I'll have a new version of that too once the dependencies are in ok so we'll just start with the fully reviewed set, then take some more and then stop and start testing for .29 candidate push OK, so the remaining patches are mostly from Christoph, though looks like Dave may have a few too. These are going to need a refresh against current master branch (or xfs-dev for DMAPI & kdb). Christoph, would a new staging tree be the best way to proceed, or should we start picking off the mail list? On-going, *ideally* after a patch series has received final rv and ack, the developer would post a git URL as the last post to the thread and we'd just pull from that. I guess that'd be a sort of "xfs-next" collaborative arrangement - we're all set up for this now (with git/ptools hooks in place internally, etc). Thanks -- Mark Goodwin markgw@sgi.com Engineering Manager for XFS and PCP Phone: +61-3-99631937 SGI Australian Software Group Cell: +61-4-18969583 ------------------------------------------------------------- From xaiki@oss.sgi.com Mon Dec 1 23:58:25 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_40, J_CHICKENPOX_13,J_CHICKENPOX_15,J_CHICKENPOX_21,J_CHICKENPOX_32, J_CHICKENPOX_51,J_CHICKENPOX_52,J_CHICKENPOX_91 autolearn=no version=3.3.0-rupdated Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB25wPgi021633 for ; Mon, 1 Dec 2008 23:58:25 -0600 Received: (from xaiki@localhost) by oss.sgi.com (8.12.11.20060308/8.12.11/Submit) id mB25wAjW020253; Mon, 1 Dec 2008 23:58:10 -0600 Date: Mon, 1 Dec 2008 23:58:10 -0600 Message-Id: <200812020558.mB25wAjW020253@oss.sgi.com> From: xfs@oss.sgi.com To: xfs@oss.sgi.com Subject: [XFS updates] XFS development tree branch, mainline, updated. v2.6.28-rc3-1204-g061e41f X-Git-Refname: refs/heads/mainline X-Git-Reftype: branch X-Git-Oldrev: ed313489badef16d700f5a3be50e8fd8f8294bc8 X-Git-Newrev: 061e41fdb5047b1fb161e89664057835935ca1d2 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "XFS development tree". The branch, mainline has been updated 061e41f Linux 2.6.28-rc7 0d81514 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 9c84ba4 drivers/gpu/drm/i915/i915_irq.c: fix warning 09a8126 i82875p_edac: fix module remove 307d114 i82875p_edac: fix overflow device resource setup bca404a fbdev: fix FB console blanking 0380155 ntfs: don't fool kernel-doc ced6909 kernel-doc: handle varargs cleanly 6ff2d39 lib/idr.c: fix rcu related race with idr_find 1d678f3 DMA-API.txt: fix description of pci_map_sg/dma_map_sg scatterlists handling 4280e31 frv: fix mmap2 error handling a800599 taint: add missing comment c4c6fa9 radeonfb: fix problem with color expansion & alignment b93c35f spi: fix spi_s3c24xx_gpio num_chipselect e39ea8a spi: fix spi_s3c24xx_gpio device handle lookup 4e253d2 spi: au1550_spi full duplex dma fix 6a010b5 spi: fix spi_imx probe oopsing 7ef9964 epoll: introduce resource usage limits b7d271d spi: mpc52xx_psc_spi chipselect bugfix aaacf4b spi: avoid spidev crash when device is removed dc8c214 spi documentation: use __initdata on struct dc924ef hwmon: applesmc: make applesmc load automatically on startup 36be47d parport_serial: fix array overflow dc19f9d memcg: memory hotplug fix for notifier callback b29acbd mm: vmalloc fix lazy unmapping cache aliasing 8650e51 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2 d6b58f8 ocfs2: fix regression in ocfs2_read_blocks_sync() 07d9a39 ocfs2: fix return value set in init_dlmfs_fs() a2eee69 ocfs2: Small documentation update 07f9eeb ocfs2: fix wake_up in unlock_ast 66f502a ocfs2: initialize stack_user lvbptr 3b5da01 ocfs2: comments typo fix a693b0c em28xx: remove backward compat macro added on a previous fix 7ac0110 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev 484ab62 V4L/DVB (9748): em28xx: fix compile warning faa3bd2 V4L/DVB (9743): em28xx: fix oops audio 4bc2a9b Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband ac70a96 libata: blacklist Seagate drives which time out FLUSH_CACHE when used with NCQ 03f6084 [libata] pata_rb532_cf: fix signature of the xfer function 9f14786 [libata] pata_rb532_cf: fix and rename register definitions 1eedb4a ata_piix: add borked Tecra M4 to broken suspend list b0f43dc Merge branches 'ehca' and 'mlx4' into for-linus 42ab01c IB/mlx4: Fix MTT leakage in resize CQ 7ec4f46 IB/ehca: Fix problem with generated flush work completions 6b1f9d6 IB/ehca: Change misleading error message on memory hotplug 6a12141 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 c07f62e Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid e540458 Add kref to fake tty used by USB console 296fa7f drivers/char/tty_io.c: Avoid panic when no console is configured. b4dcfbe Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 ecf318c Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2a1dc50 vmscan: protect zone rotation stats by lru lock 33b07db Revert "of_platform_driver noise on sparce" 5bb4bd9 USB: serial: add more Onda device ids to option driver 621b239 USB: usb-storage: unusual_devs entry for Nikon D2H a6b7b03 USB: storage: unusual_devs entry for Mio C520-GPS 1f15a50 USB: fsl_usb2_udc: Report disconnect before unbinding 9ac36da USB: fsl_qe_udc: Report disconnect before unbinding 0a99e8a USB: fix SB600 USB subsystem hang bug 269f053 Revert "USB: improve ehci_watchdog's side effect in CPU power management" a1e0eb1 powerpc: Fix build for 32-bit SMP configs d9d060a Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 03cfdb8 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 4ec8f07 Merge master.kernel.org:/home/rmk/linux-2.6-arm 151903d drm/i915: Fix copy'n'pasteo that broke VT switch if flushing was non-empty. ab598b6 powerpc: Fix system calls on Cell entered with XER.SO=1 960cedb powerpc/cell: Fix GDB watchpoints, again cc353c3 powerpc/mpic: Don't reset affinity for secondary MPIC on boot d015fe9 powerpc/cell/axon-msi: Retry on missing interrupt 4a61866 powerpc: Fix boot freeze on machine with empty memory node 4b824de powerpc: Fix IRQ assignment for some PCIe devices a6e470f Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6 8e36a5d Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 9bd062d Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 72244c0 Merge branch 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 93b1005 Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 7bbc67f Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 66a45cc Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 8639dad Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 9297524 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6 8c7b905 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq 1838e39 Trivial Documentation/filesystems/ramfs-rootfs-initramfs.txt fix 42182c78 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 e2a2444 Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6 8decec7 Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6 499c59c MN10300: Tighten up the code using case ranges f1ba3bc Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 95c5e1f Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 b31a0fe Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 96b8936 remove __ARCH_WANT_COMPAT_SYS_PTRACE 16799c6 Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus 211f05a input: replace spin_lock_bh with spin_lock_irqsave in ml_ff_playback 02d0e67 hotplug_memory_notifier section annotation d3a307f sn_pci_controller_fixup() should be __init ffb78a2 get xenbus_driver ->probe() "recognized" by modpost df6b079 xen_play_dead() is __cpuinit 37af46e xen_setup_vcpu_info_placement() is not init on x86 23a14b9 kvm_setup_secondary_clock() is cpuinit 2236d25 enable_IR_x2apic() needs to be __init ad04d31 pci_setup() is init, not devinit 4bcc17d alpha: pcibios_resource_to_bus() is callable from normal code 56d74dd tricky one: hisax sections 8419641 cpuinit fixes in kernel/* b038514 uninorth-agp section mess 37d33d1 rapidio section noise f57628d section errors in smc911x/smc91x 5bac287 fix the section noise in sparc head.S 1c4567a m32r: section noise in head.S 8814b50 section misannotation in ibmtr_cs 43ced65 ixgbe section fixes 31421a6 rackmeter section fixes ced7172 gdth section fixes e669dae of_platform_driver noise on sparce 3003781 advansys fix on ISA-less configs 2fceab0 W1_MASTER_DS1WM should depend on HAVE_CLK d16d766 icside section warnings 596f103 fix talitos 6005e3e istallion section warnings 8c29890 sparc64 trivial section misannotations 409832f sparc32 cpuinit flase positives 4ea8fb9 powerpc set_huge_psize() false positive 7d6a8a1 false __cpuinit positives on alpha 3116848 meminit section warnings af6d596 sched: prevent divide by zero error in cpu_avg_load_per_task, update 1583715 sched, cpusets: fix warning in kernel/cpuset.c 2642b11 ieee1394: sbp2: fix race condition in state change e47c1fe ieee1394: fix list corruption (reported at module removal) 9a5aa62 mlx4_core: Save/restore default port IB capability mask 23d0a65 toshiba_acpi: close race in toshiba_acpi driver 7b964f7 i2c-parport: Fix misplaced parport_release call 79b93e1 i2c: Remove i2c clients in reverse order d1846b0 i2c/isp1301_omap: Build fixes ee8a1a0 HID: Apple ALU wireless keyboards are bluetooth devices af38d90 Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 487ff32 Allow architectures to override copy_user_highpage() 52b19ac udf: Fix BUG_ON() in destroy_inode() a730b32 [ARM] pxa/palmtx: misc fixes to use generic GPIO API b627c8b x86: always define DECLARE_PCI_UNMAP* macros 6417a91 Merge branch 'omap-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 abd9421 [S390] Update default configuration. 0778dc3 [S390] Fix alignment of initial kernel stack. 2944a5c [S390] pgtable.h: Fix oops in unmap_vmas for KVM processes 8107d82 [S390] fix/cleanup sched_clock 59da213 [S390] fix system call parameter functions. 4cd4262 sched: prevent divide by zero error in cpu_avg_load_per_task 4f5a7f4 ftrace: prevent recursion e899b64 ACPICA: disable _BIF warning a6e0887 ACPI: delete OSI(Linux) DMI dmesg spam 95a28ed ACPICA: Allow _WAK method to return an Integer 0081b16 ACPI: thinkpad-acpi: fix fan sleep/resume path 3fedd90 sony-laptop: printk tweak 38cfc14 sony-laptop: brightness regression fix 3bdca1b Revert "ACPI: don't enable control method power button as wakeup device when Fixed Power button is used" 65df784 ACPI suspend: Blacklist boxes that require us to set SCI_EN directly on resume 4059907 ACPI: scheduling in atomic via acpi_evaluate_integer () 723fdb7 ARM: OMAP: Fixes for suspend / resume GPIO wake-up handling 558073d ACPI: battery: Convert discharge energy rate to current properly 90f6713 parisc: struct device - replace bus_id with dev_name(), dev_set_name() 7a3f513 parisc: fix kernel crash when unwinding a userspace process 9860d1b parisc: __kernel_time_t is always long 7b4d469 ACPI: EC: count interrupts only if called from interrupt handler. a98ee8c [CIFS] fix regression in cifs_write_begin/cifs_write_end 545f4e9 Input: wacom - add support for new USB Tablet PCs 461cba2 drm/i915: Save/restore HWS_PGA on suspend/resume 2fd36a5 [ARM] pxa/corgi: update default config to exclude tosa from being built 72e9622 [ARM] pxa/pcm990: use negative number for an invalid GPIO in camera data ffd565a x86: fixup config space size of CPU functions for AMD family 11h 147dcf5 ARM: OMAP: Typo fix for clock_allow_idle 031bb27 firewire: fw-sbp2: another iPod mini quirk entry 9e0de91 ieee1394: sbp2: another iPod mini quirk entry a266d9f [CPUFREQ] powernow-k8: ignore out-of-range PstateStatus value 121fe86 [CPUFREQ] Documentation: Add Blackfin to list of supported processors de90add x86, bts: fix wrmsr and spinlock over kmalloc c4858ff x86, pebs: fix PEBS record size configuration e5e8ca6 x86, bts: turn macro into static inline function 292c669 x86, bts: exclude ds.c from build when disabled b628353 Merge branch 'topic/fix/hda' into for-linus eff79ae arch/x86/kernel/pci-calgary_64.c: change simple_strtol to simple_strtoul 5cf02b7 x86: use limited register constraint for setnz 661cd8f ALSA: hda - Check model for Dell 92HD73xx laptops c65574a ALSA: hda - mark Dell studio 1535 quirk 9502662 ALSA: hda - No 'Headphone as Line-out' swich without line-outs f73d358 ALSA: hda - Fix AFG power management on IDT 92HD* codecs 9e97697 ALSA: hda - Fix caching of SPDIF status bits 7953031 ARM: OMAP: Remove broken LCD driver for SX1 5244021 drm: move drm vblank initialization/cleanup to driver load/unload 6133047 drm/i915: execbuffer pins objects, no need to ensure they're still in the GTT 05eff84 drm/i915: Always read pipestat in irq_handler 2678d9d drm/i915: Subtract total pinned bytes from available aperture size 28dfe52 drm/i915: Avoid BUG_ONs on VT switch with a wedged chipset. cdfbc41 drm/i915: Remove IMR masking during interrupt handler, and restart it if needed. 7c46358 drm/i915: Manage PIPESTAT to control vblank interrupts instead of IMR. 8442c87 Input: replace spin_lock_bh with spin_lock_irqsave in ml_ff_playback 8ec2e24 MIPS: Make BUG() __noreturn. 50f3beb V4L/DVB (9742): em28xx-alsa: implement another locking schema 7a8f4cc V4L/DVB (9732): sms1xxx: use new firmware for Hauppauge WinTV MiniStick e07a1d8 V4L/DVB (9691): gspca: Move the video device to a separate area. 5c4fa00 V4L/DVB (9690): gspca: Lock the subdrivers via module_get/put. 98522a7 V4L/DVB (9689): gspca: Memory leak when disconnect while streaming. 3f9b5d4 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/jk/spufs into merge be542fa Merge branch 'merge' of ssh://master.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx into merge 11bac8a Merge branch 'merge' of git://git.secretlab.ca/git/linux-2.6-mpc52xx into merge fb91ee6 tracing, doc: update mmiotrace documentation 7ee1768 x86, mmiotrace: fix buffer overrun detection 47fd6f7 [ARM] 5335/1: pxa25x_udc: Fix is_vbus_present to return 1 or 0 86bbc2c xen: pin correct PGD on suspend 3d994e1 Merge branch 'oprofile-for-tip' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into x86/urgent fde5be3 HID: remove setup mutex, fix possible deadlock a1967d6 x86: revert irq number limitation 2ed1cdc irq.h: fix missing/extra kernel-doc 9f14416 Merge commit 'v2.6.28-rc6' into irq/urgent 844c6f6 [ARM] pxa/MioA701: bluetooth resume fix 999f633 [ARM] pxa/MioA701: fix memory corruption. 57550b2 Merge commit 'v2.6.28-rc6' into x86/urgent b0788ca lockdep: consistent alignement for lockdep info 522a110 function tracing: fix wrong position computing of stack_trace c879c63 Merge branches 'topic/fix/hda' and 'topic/fix/sound-core' into for-linus b0fc5e0 ALSA: hda - Add a quirk for Dell Studio 15 3a7abfd ALSA: hda: Add STAC_DELL_M4_3 quirk a39c4ad sound/sound_core: Fix sparse warnings 6065726 powerpc/spufs: Fix spinning in spufs_ps_fault on signal 818a557 V4L/DVB (9668): em28xx: fix a race condition with hald cce2571 V4L/DVB (9664): af9015: don't reconnect device in USB-bus f2a2e49 V4L/DVB (9647): em28xx: void having two concurrent control URB's c4a9879 V4L/DVB (9646): em28xx: avoid allocating/dealocating memory on every control urb 625ff16 V4L/DVB (9645): em28xx: Avoid memory leaks if registration fails 0253fdc ALSA: hda: STAC_DELL_M6 EAPD bfe085f x86: fixing __cpuinit/__init tangle, xsave_cntxt_init() 9bc646f x86: fix __cpuinit/__init tangle in init_thread_xstate() 578f3a3 HID: add USB ID for another dual gameron adapter 06d2148 HID: unignore mouse on unibody macbooks 5f4ba04 Input: i8042 - add Compal Hel80 laptop to nomux blacklist e871809 powerpc/mpc832x_rdb: fix swapped ethernet ids 06597aa powerpc: Use generic PHY driver for Marvell 88E1111 PHY on GE Fanuc SBC610 f464ff5 powerpc/85xx: L2 cache size wrong in 8572DS dts a4a16be oprofile: fix an overflow in ppro code 99afb98 V4L/DVB (9639): Make dib0700 remote control support work with firmware v1.20 deaf53e V4L/DVB (9635): v4l: s2255drv fix firmware test on big-endian 41286d9 V4L/DVB (9634): Make sure the i2c gate is open before powering down tuner 3f9b46c V4L/DVB (9632): make em28xx aux audio input work 3fa37de V4L/DVB (9631): Make s2api work for ATSC support c41109f V4L/DVB (9627): em28xx: Avoid i2c register error for boards without eeprom df4533a V4L/DVB (9608): Fix section mismatch warning for dm1105 during make 4faf100 V4L/DVB (9605): usb-urb: fix memory leak 7935eea V4L/DVB (9604): ttusb_dec: fix memory leak b7ed785 V4L/DVB (9603): dvb-ttusb-budget: Add validation for ttusb_alloc_iso_urbs 11eb260 V4L/DVB (9602): dvb-ttusb-budget: Add NULL pointer validation d7c31a1 V4L/DVB (9601): ttusb_dec: Add NULL pointer validation 5181e59 HID: fix blacklist entries for greenasia/pantherlord c8d6988 powerpc/virtex: Update defconfigs c7c2ffb powerpc/52xx: update defconfigs c14464b xsysace: Fix driver to use resource_size_t instead of unsigned long a108096 powerpc/virtex: fix various format/casting printk mismatches 847cdf4 powerpc/mpc5200: fix bestcomm Kconfig dependencies 6612d9b powerpc/44x: Fix 460EX/460GT machine check handling 5907630 powerpc/40x: Limit allocable DRAM during early mapping 3ff68a6 genirq: __irq_set_trigger: change pr_warning to pr_debug 734f0ba Input: cm109 - add keymap for ATCom AU-100 phone 4f48544 Input: fix the example of an input device driver 5fb17fd Input: psmouse - fix incorrect validate_byte check in OLPC protocol d6d79a7 Input: atkbd - cancel delayed work before freeing its structure a8215b8 Input: atkbd - add keymap quirk for Inventec Symphony systems 786b11c Input: i8042 - add Dell XPS M1530 to nomux list f131e24 irq: fix typo 6c2e940 x86: apic honour irq affinity which was set in early boot 612e368 genirq: fix the affinity setting in setup_irq f6d87f4 genirq: keep affinities set from userspace across free/request_irq() 2ad4988 UBI: Don't exit from ubi_thread until kthread_should_stop() is true b77bcb0 UBI: fix EBADMSG handling 9a5415f Input: elo - fix format string in elo driver from ed313489badef16d700f5a3be50e8fd8f8294bc8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 061e41fdb5047b1fb161e89664057835935ca1d2 Author: Linus Torvalds Date: Mon Dec 1 19:59:23 2008 -0800 Linux 2.6.28-rc7 commit 0d815142d1988899c97514a25ce5a9f4880e7fc8 Merge: 9c84ba4e502184d95ab75128d3166f595ea2dea0 a693b0cdba94f60f7ed43754d2c34151cdd11da5 Author: Linus Torvalds Date: Mon Dec 1 19:56:34 2008 -0800 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (25 commits) em28xx: remove backward compat macro added on a previous fix V4L/DVB (9748): em28xx: fix compile warning V4L/DVB (9743): em28xx: fix oops audio V4L/DVB (9742): em28xx-alsa: implement another locking schema V4L/DVB (9732): sms1xxx: use new firmware for Hauppauge WinTV MiniStick V4L/DVB (9691): gspca: Move the video device to a separate area. V4L/DVB (9690): gspca: Lock the subdrivers via module_get/put. V4L/DVB (9689): gspca: Memory leak when disconnect while streaming. V4L/DVB (9668): em28xx: fix a race condition with hald V4L/DVB (9664): af9015: don't reconnect device in USB-bus V4L/DVB (9647): em28xx: void having two concurrent control URB's V4L/DVB (9646): em28xx: avoid allocating/dealocating memory on every control urb V4L/DVB (9645): em28xx: Avoid memory leaks if registration fails V4L/DVB (9639): Make dib0700 remote control support work with firmware v1.20 V4L/DVB (9635): v4l: s2255drv fix firmware test on big-endian V4L/DVB (9634): Make sure the i2c gate is open before powering down tuner V4L/DVB (9632): make em28xx aux audio input work V4L/DVB (9631): Make s2api work for ATSC support V4L/DVB (9627): em28xx: Avoid i2c register error for boards without eeprom V4L/DVB (9608): Fix section mismatch warning for dm1105 during make ... commit 9c84ba4e502184d95ab75128d3166f595ea2dea0 Author: Andrew Morton Date: Mon Dec 1 13:14:08 2008 -0800 drivers/gpu/drm/i915/i915_irq.c: fix warning drivers/gpu/drm/i915/i915_irq.c: In function 'i915_disable_pipestat': drivers/gpu/drm/i915/i915_irq.c:101: warning: control may reach end of non-void function 'i915_pipestat' being inlined Cc: Dave Airlie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 09a81269c7aadaec3375a7ebd9647acbb72f5a67 Author: Jarkko Lavinen Date: Mon Dec 1 13:14:08 2008 -0800 i82875p_edac: fix module remove Fix module removal bugs of i82875p_edac. Also i82975x_edac code seems to have the same module removal bugs as in i82875p_edac. The problems were: 1. In module removal i82875p_remove_one() is never called. Variable i82875p_registered is newer changed from 1, which guarantees i82875p_remove_one() is not called (and even if it were called, it would be called in wrong order). As a result, the edac_mc workque is not stopped and keeps probing. If kernel debugging options are not enabled, user may not notice anything going wrong. if debugging options are enabled and I do "rmmod i82875p_edac", I get: edac debug: edac_pci_workq_function() checking BUG: unable to handle kernel paging request at f882d16f ... call trace: [] ? edac_mc_workq_function+0x55/0x7e [edac_core] [] ? run_workqueue+0xd7/0x1a5 [] ? run_workqueue+0x92/0x1a5 [] ? edac_mc_workq_function+0x0/0x7e [edac_core] [] ? worker_thread+0xb7/0xc3 [] ? autoremove_wake_function+0x0/0x33 [] ? worker_thread+0x0/0xc3 [] ? kthread+0x3b/0x61 [] ? kthread+0x0/0x61 [] ? kernel_thread_helper+0x7/0x10 Fix for this is to get rid of needles variable i82875p_registered altogether and run i82875p_remove_one() *before* pci_unregister_driver(). 2. edac_mc_del_mc() uses mci after freeing mci edac_mc_del_mc() calls calls edac_remove_sysfs_mci_device(). The kobject refcount of mci drops to 0 and mci is freed. After this mci is accessed via debug print and i82875p_remove_one() still uses mci->pvt and tries to free mci again with edac_mc_free(). The fix for this is add kobject_get(&mci->edac_mci_kobj) after edac_mc_alloc(). Then the mci is still available after returning from edac_mc_del_mc() with refcount 1, and mci->pvt is still available. When i82875p_remove_one() finally calls edac_mc_free(), this will cause kobject_put() and mci is released properly. Signed-off-by: Jarkko Lavinen Cc: Doug Thompson Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 307d114441f905e4576871ff28d06408a1af1a7e Author: Jarkko Lavinen Date: Mon Dec 1 13:14:06 2008 -0800 i82875p_edac: fix overflow device resource setup When I do "modprobe i82875p_edac" on my Asus P4C800 MB on kernels 2.6.26 or later, the module load fails due to BAR 0 collision. On 2.6.25 the module loads just fine. The overflow device on the MB seems to be hidden and its resources are not allocated at normal PCI bus init. Log shows the missing resource problem: EDAC DEBUG: i82875p_probe1() PCI: 0000:00:06.0 reg 10 32bit mmio: [fecf0000, fecf0fff] pci 0000:00:06.0: device not available because of BAR 0 [0xfecf0000-0xfecf0fff] collisions EDAC i82875p: i82875p_setup_overfl_dev(): Failed to enable overflow device The patch below fixes this by calling pci_bus_assign_resources() after the overflow device is revealed and added to the bus. With this patch I am again able to load and use the module. Signed-off-by: Jarkko Lavinen Cc: Doug Thompson Cc: Jesse Barnes Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bca404afdc5206c3bb30168315ee8a98a579ec65 Author: Dmitry Baryshkov Date: Mon Dec 1 13:14:05 2008 -0800 fbdev: fix FB console blanking The commit aef7db4bd5a3b6068dfa05919a3d685199eed116 fixed the problem with recursive locking in fb blanking code if blank is caused by user setting the /sys/class/graphics/fb*/blank. However this broke the fbcon timeout blanking. If you use a driver that defines ->fb_blank operation and at the same time that driver relies on other driver (e.g. backlight or lcd class) to blank the screen, when the fbcon times out and tries to blank the fb, it will call only fb driver blanker and won't notify the other driver. Thus FB output is disabled, but the screen isn't blanked. Restore fbcon blanking and at the same time apply the proper fix for the above problem: if fbcon_blank is called with FBINFO_FLAG_USEREVENT, we are already called through notification from fb_blank, thus we don't have to blank the fb again. Signed-off-by: Dmitry Baryshkov Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 03801553630c4bec6682108800c9b2de64bdbd37 Author: Randy Dunlap Date: Mon Dec 1 13:14:04 2008 -0800 ntfs: don't fool kernel-doc kernel-doc handles macros now (it has for quite some time), so change the ntfs_debug() macro's kernel-doc to be just before the macro instead of before a phony function prototype. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Randy Dunlap Cc: Anton Altaparmakov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ced69090c573f1db253fb6b84ec537f4f3d7e2f4 Author: Randy Dunlap Date: Mon Dec 1 13:14:03 2008 -0800 kernel-doc: handle varargs cleanly The method for listing varargs in kernel-doc notation is: * @...: these arguments are printed by the @fmt argument but scripts/kernel-doc is confused: it always lists varargs as: ... variable arguments and ignores the @...: line's description, but then prints that line after the list of function parameters as though it's not part of the function parameters. This patch makes kernel-doc print the supplied @... description if it is present; otherwise a boilerplate "variable arguments" is printed. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6ff2d39b91aec3dcae951afa982059e3dd9b49dc Author: Manfred Spraul Date: Mon Dec 1 13:14:02 2008 -0800 lib/idr.c: fix rcu related race with idr_find 2nd part of the fixes needed for http://bugzilla.kernel.org/show_bug.cgi?id=11796. When the idr tree is either grown or shrunk, then the update to the number of layers and the top pointer were not atomic. This race caused crashes. The attached patch fixes that by replicating the layers counter in each layer, thus idr_find doesn't need idp->layers anymore. Signed-off-by: Manfred Spraul Cc: Clement Calmels Cc: Nadia Derbey Cc: Pierre Peiffer Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1d678f365dae28420fa7329a2a35390b3582678d Author: FUJITA Tomonori Date: Mon Dec 1 13:14:01 2008 -0800 DMA-API.txt: fix description of pci_map_sg/dma_map_sg scatterlists handling - pci_map_sg/dma_map_sg are used with a scatter gather list that doesn't come from the block layer (e.g. some network drivers do). - how IOMMUs merge adjacent elements of the scatter/gather list is independent of how the block layer determines sees elements. Signed-off-by: FUJITA Tomonori Cc: James Bottomley Cc: Tejun Heo Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4280e3126f641898f0ed1a931645373d3489e2a6 Author: David Howells Date: Mon Dec 1 13:14:00 2008 -0800 frv: fix mmap2 error handling Fix the error handling in sys_mmap2(). Currently, if the pgoff check fails, fput() might have to be called (which it isn't), so do the pgoff check first, before fget() is called. Signed-off-by: David Howells Reported-by: Julia Lawall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a8005992836434cab6182c6147993d21442184c1 Author: Arjan van de Ven Date: Mon Dec 1 13:14:00 2008 -0800 taint: add missing comment The description for 'D' was missing in the comment... (causing me a minute of WTF followed by looking at more of the code) Signed-off-by: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c4c6fa9891f3d1bcaae4f39fb751d5302965b566 Author: Benjamin Herrenschmidt Date: Mon Dec 1 13:13:58 2008 -0800 radeonfb: fix problem with color expansion & alignment The engine on some radeon variants locks up if color expansion is called for non aligned source data. This patch enables a feature of the core fbdev to request aligned input pixmaps and uses the HW clipping engine to clip the output to the requested size Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11875 Signed-off-by: Benjamin Herrenschmidt Tested-by: James Cloos Cc: "Rafael J. Wysocki" Cc: "David S. Miller" Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b93c35ff39d19f20c47c06c206986afefecc777a Author: Ben Dooks Date: Mon Dec 1 13:13:57 2008 -0800 spi: fix spi_s3c24xx_gpio num_chipselect The spi master driver must have num_chipselect set to allow the bus to initialise. Pass this through the platform data. Signed-off-by: Ben Dooks Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e39ea8a2def1fcb203ed0183317124348962e351 Author: Ben Dooks Date: Mon Dec 1 13:13:56 2008 -0800 spi: fix spi_s3c24xx_gpio device handle lookup The spidev_to_sg() call in spi_s3c24xx_gpio.c was using the wrong method to convert the spi device into the private data for the driver. Fix this by using spi_master_get_devdata. Signed-off-by: Ben Dooks Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4e253d23003b54c88d0919d6088be74f00eec3c7 Author: Jan Nikitenko Date: Mon Dec 1 13:13:56 2008 -0800 spi: au1550_spi full duplex dma fix Fix unsafe order in dma mapping operation: always flush data from the cache *BEFORE* invalidating it, to allow full duplex transfers where the same buffer may be used for both writes and reads. Tested with mmc-spi. Signed-off-by: Jan Nikitenko Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6a010b56e9bd2fdb32efd153e1a08305949b6b53 Author: Julien Boibessot Date: Mon Dec 1 13:13:55 2008 -0800 spi: fix spi_imx probe oopsing Corrects spi_imx driver oops during initialization/probing: can't use drv_data before it's allocated. Signed-off-by: Julien Boibessot Acked-by: Sascha Hauer Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7ef9964e6d1b911b78709f144000aacadd0ebc21 Author: Davide Libenzi Date: Mon Dec 1 13:13:55 2008 -0800 epoll: introduce resource usage limits It has been thought that the per-user file descriptors limit would also limit the resources that a normal user can request via the epoll interface. Vegard Nossum reported a very simple program (a modified version attached) that can make a normal user to request a pretty large amount of kernel memory, well within the its maximum number of fds. To solve such problem, default limits are now imposed, and /proc based configuration has been introduced. A new directory has been created, named /proc/sys/fs/epoll/ and inside there, there are two configuration points: max_user_instances = Maximum number of devices - per user max_user_watches = Maximum number of "watched" fds - per user The current default for "max_user_watches" limits the memory used by epoll to store "watches", to 1/32 of the amount of the low RAM. As example, a 256MB 32bit machine, will have "max_user_watches" set to roughly 90000. That should be enough to not break existing heavy epoll users. The default value for "max_user_instances" is set to 128, that should be enough too. This also changes the userspace, because a new error code can now come out from EPOLL_CTL_ADD (-ENOSPC). The EMFILE from epoll_create() was already listed, so that should be ok. [akpm@linux-foundation.org: use get_current_user()] Signed-off-by: Davide Libenzi Cc: Michael Kerrisk Cc: Cc: Cyrill Gorcunov Reported-by: Vegard Nossum Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b7d271df873c5121a4ca1c70dea126b5920ec2f1 Author: Stefano Babic Date: Mon Dec 1 13:13:53 2008 -0800 spi: mpc52xx_psc_spi chipselect bugfix According to the manual the "tdfOnExit" flag must be set on the last byte we want to send. The PSC controller holds SS low until the flag is set. However, the flag was set always on the last byte of the FIFO, independently if it is the last byte of the transfer. This generates spurious toggling of the SS signals that breaks the protocol of some peripherals. Fix. Signed-off-by: Stefano Babic Acked-by: Grant Likely Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aaacf4bb51b243875b203e6ff73b5047636b4efa Author: Wolfgang Ocker Date: Mon Dec 1 13:13:52 2008 -0800 spi: avoid spidev crash when device is removed I saw a kernel oops in spidev_remove() when a spidev device was registered and I unloaded the SPI master driver: Unable to handle kernel paging request for data at address 0x00000004 Faulting instruction address: 0xc01c0c50 Oops: Kernel access of bad area, sig: 11 [#1] CDSPR Modules linked in: spi_ppc4xx(-) NIP: c01c0c50 LR: c01bf9e4 CTR: c01c0c34 REGS: cec89c30 TRAP: 0300 Not tainted (2.6.27.3izt) MSR: 00021000 CR: 24000228 XER: 20000007 DEAR: 00000004, ESR: 00800000 TASK = cf889040[2070] 'rmmod' THREAD: cec88000 GPR00: 00000000 cec89ce0 cf889040 cec8e000 00000004 cec8e000 ffffffff 00000000 GPR08: 0000001c c0336380 00000000 c01c0c34 00000001 1001a338 100e0000 100df49c GPR16: 100b54c0 100df49c 100ddd20 100f05a8 100b5340 100efd68 00000000 00000000 GPR24: 100ec008 100f0428 c0327788 c0327794 cec8e0ac cec8e000 c0336380 00000000 NIP [c01c0c50] spidev_remove+0x1c/0xe4 LR [c01bf9e4] spi_drv_remove+0x2c/0x3c Call Trace: [cec89d00] [c01bf9e4] spi_drv_remove+0x2c/0x3c [cec89d10] [c01859a0] __device_release_driver+0x78/0xb4 [cec89d20] [c0185ab0] device_release_driver+0x28/0x44 [cec89d40] [c0184be8] bus_remove_device+0xac/0xd8 [cec89d60] [c0183094] device_del+0x100/0x194 [cec89d80] [c0183140] device_unregister+0x18/0x30 [cec89da0] [c01bf30c] __unregister+0x20/0x34 [cec89db0] [c0182778] device_for_each_child+0x38/0x74 [cec89de0] [c01bf2d0] spi_unregister_master+0x28/0x44 [cec89e00] [c01bfeac] spi_bitbang_stop+0x1c/0x58 [cec89e20] [d908a5e0] spi_ppc4xx_of_remove+0x24/0x7c [spi_ppc4xx] [...] IMHO a call to spi_set_drvdata() is missing in spidev_probe(). The patch below helped. Signed-off-by: Wolfgang Ocker Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dc8c214a9c37eb288b1c4782632649e55d251c68 Author: roel kluin Date: Mon Dec 1 13:13:51 2008 -0800 spi documentation: use __initdata on struct Use __initdata for data, not __init. Signed-off-by: Roel Kluin Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dc924efb52ba9e4dffec5b15ae2242b894198139 Author: Henrik Rydberg Date: Mon Dec 1 13:13:49 2008 -0800 hwmon: applesmc: make applesmc load automatically on startup make use of the new dmi device loading support to automatically load the applesmc driver based on the dmi_match table. Signed-off-by: Henrik Rydberg Cc: Nicolas Boichat Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 36be47d6d8d98f54b6c4f891e9f54fb2bf554584 Author: Takashi Iwai Date: Mon Dec 1 13:13:49 2008 -0800 parport_serial: fix array overflow The netmos_9xx5_combo type assumes that PCI SSID provides always the correct value for the number of parallel and serial ports, but there are indeed broken devices with wrong numbers, which may result in Oops. This patch simply adds the check of the array range. Reference: Novell bnc#447067 https://bugzilla.novell.com/show_bug.cgi?id=447067 Signed-off-by: Takashi Iwai Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dc19f9db38295f811d9041bd89b113beccbd763a Author: KAMEZAWA Hiroyuki Date: Mon Dec 1 13:13:48 2008 -0800 memcg: memory hotplug fix for notifier callback Fixes for memcg/memory hotplug. While memory hotplug allocate/free memmap, page_cgroup doesn't free page_cgroup at OFFLINE when page_cgroup is allocated via bootomem. (Because freeing bootmem requires special care.) Then, if page_cgroup is allocated by bootmem and memmap is freed/allocated by memory hotplug, page_cgroup->page == page is no longer true. But current MEM_ONLINE handler doesn't check it and update page_cgroup->page if it's not necessary to allocate page_cgroup. (This was not found because memmap is not freed if SPARSEMEM_VMEMMAP is y.) And I noticed that MEM_ONLINE can be called against "part of section". So, freeing page_cgroup at CANCEL_ONLINE will cause trouble. (freeing used page_cgroup) Don't rollback at CANCEL. One more, current memory hotplug notifier is stopped by slub because it sets NOTIFY_STOP_MASK to return vaule. So, page_cgroup's callback never be called. (low priority than slub now.) I think this slub's behavior is not intentional(BUG). and fixes it. Another way to be considered about page_cgroup allocation: - free page_cgroup at OFFLINE even if it's from bootmem and remove specieal handler. But it requires more changes. Addresses http://bugzilla.kernel.org/show_bug.cgi?id=12041 Signed-off-by: KAMEZAWA Hiruyoki Cc: Li Zefan Cc: Balbir Singh Cc: Pavel Emelyanov Tested-by: Badari Pulavarty Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b29acbdcf877009af3f1fc0750bcac314c51e055 Author: Nick Piggin Date: Mon Dec 1 13:13:47 2008 -0800 mm: vmalloc fix lazy unmapping cache aliasing Jim Radford has reported that the vmap subsystem rewrite was sometimes causing his VIVT ARM system to behave strangely (seemed like going into infinite loops trying to fault in pages to userspace). We determined that the problem was most likely due to a cache aliasing issue. flush_cache_vunmap was only being called at the moment the page tables were to be taken down, however with lazy unmapping, this can happen after the page has subsequently been freed and allocated for something else. The dangling alias may still have dirty data attached to it. The fix for this problem is to do the cache flushing when the caller has called vunmap -- it would be a bug for them to write anything else to the mapping at that point. That appeared to solve Jim's problems. Reported-by: Jim Radford Signed-off-by: Nick Piggin Cc: Russell King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8650e51ac94b5fe93c02e3c8fef02e416f14501c Merge: 7ac01108e71ca8ccc2ded4ee98035d0e5db9c981 d6b58f89f7257c8099c2260e2bea042a917d6cdf Author: Linus Torvalds Date: Mon Dec 1 18:56:55 2008 -0800 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2 * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2: ocfs2: fix regression in ocfs2_read_blocks_sync() ocfs2: fix return value set in init_dlmfs_fs() ocfs2: Small documentation update ocfs2: fix wake_up in unlock_ast ocfs2: initialize stack_user lvbptr ocfs2: comments typo fix commit d6b58f89f7257c8099c2260e2bea042a917d6cdf Author: Mark Fasheh Date: Fri Nov 21 14:06:55 2008 -0800 ocfs2: fix regression in ocfs2_read_blocks_sync() We're panicing in ocfs2_read_blocks_sync() if a jbd-managed buffer is seen. At first glance, this seems ok but in reality it can happen. My test case was to just run 'exorcist'. A struct inode is being pushed out of memory but is then re-read at a later time, before the buffer has been checkpointed by jbd. This causes a BUG to be hit in ocfs2_read_blocks_sync(). Reviewed-by: Joel Becker Signed-off-by: Mark Fasheh commit 07d9a3954a68764aefe16855bcd0f86deeb5c825 Author: Coly Li Date: Mon Nov 17 12:38:22 2008 +0800 ocfs2: fix return value set in init_dlmfs_fs() In init_dlmfs_fs(), if calling kmem_cache_create() failed, the code will use return value from calling bdi_init(). The correct behavior should be set status as -ENOMEM before going to "bail:". Signed-off-by: Coly Li Acked-by: Sunil Mushran Signed-off-by: Mark Fasheh commit a2eee69b814854095ed835a6eb64b8efc220cd6a Author: Mark Fasheh Date: Tue Nov 18 15:08:42 2008 -0800 ocfs2: Small documentation update Remove some features from the "not-supported" list that are actually supported now. Signed-off-by: Mark Fasheh commit 07f9eebcdfaeefc8f807fa1bcce1d7c3ae6661b1 Author: David Teigland Date: Mon Nov 17 12:28:48 2008 -0600 ocfs2: fix wake_up in unlock_ast In ocfs2_unlock_ast(), call wake_up() on lockres before releasing the spin lock on it. As soon as the spin lock is released, the lockres can be freed. Signed-off-by: David Teigland Signed-off-by: Mark Fasheh commit 66f502a416f18cd36179290746aa53736c6b2828 Author: David Teigland Date: Mon Nov 10 16:24:57 2008 -0600 ocfs2: initialize stack_user lvbptr The locking_state dump, ocfs2_dlm_seq_show, reads the lvb on locks where it has not yet been initialized by a lock call. Signed-off-by: David Teigland Acked-by: Joel Becker Signed-off-by: Mark Fasheh commit 3b5da0189c93160e44b878d2c72e9552d642497c Author: Coly Li Date: Wed Nov 5 15:16:24 2008 +0800 ocfs2: comments typo fix This patch fixes two typos in comments of ocfs2. Signed-off-by: Coly Li Signed-off-by: Mark Fasheh commit a693b0cdba94f60f7ed43754d2c34151cdd11da5 Author: Mauro Carvalho Chehab Date: Mon Dec 1 18:04:14 2008 -0200 em28xx: remove backward compat macro added on a previous fix commit 50f3beb50abe0cc0228363af804e50e710b3e5b0 fixed em28xx-alsa locking schema. However, a backport macro was kept. This patch removes the macro, since it is not needed for the module compilation against upstream. Signed-off-by: Mauro Carvalho Chehab commit 7ac01108e71ca8ccc2ded4ee98035d0e5db9c981 Merge: 4bc2a9bf8cbb63f3bb9797b2bf30b2316bd27a2b ac70a964b0e22a95af3628c344815857a01461b7 Author: Linus Torvalds Date: Mon Dec 1 11:23:33 2008 -0800 Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: libata: blacklist Seagate drives which time out FLUSH_CACHE when used with NCQ [libata] pata_rb532_cf: fix signature of the xfer function [libata] pata_rb532_cf: fix and rename register definitions ata_piix: add borked Tecra M4 to broken suspend list commit 484ab62c5ee805c2bdc405a85a4e64da2722690f Author: Hans Verkuil Date: Mon Nov 24 09:53:22 2008 -0300 V4L/DVB (9748): em28xx: fix compile warning Label fail_unreg is no longer used. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit faa3bd2e48e594e9475e92fb84bb6ebe6f62f23b Author: Douglas Schilling Landgraf Date: Mon Nov 24 09:51:20 2008 -0300 V4L/DVB (9743): em28xx: fix oops audio Replaced usb_kill_usb for usb_unlink_usb (wait until urb to fully stop require USB core to put the calling process to sleep). Oops: http://www.kerneloops.org/raw.php?rawid=71799&msgid= Signed-off-by: Douglas Schilling Landgraf Signed-off-by: Mauro Carvalho Chehab commit 4bc2a9bf8cbb63f3bb9797b2bf30b2316bd27a2b Merge: 6a1214113090905aca6a492fc8ef10d84c608a69 b0f43dcca8a1f46e17b26d10f3cb1b297ebfb44e Author: Linus Torvalds Date: Mon Dec 1 11:01:54 2008 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IB/mlx4: Fix MTT leakage in resize CQ IB/ehca: Fix problem with generated flush work completions IB/ehca: Change misleading error message on memory hotplug mlx4_core: Save/restore default port IB capability mask commit ac70a964b0e22a95af3628c344815857a01461b7 Author: Tejun Heo Date: Thu Nov 27 13:36:48 2008 +0900 libata: blacklist Seagate drives which time out FLUSH_CACHE when used with NCQ Some recent Seagate harddrives have firmware bug which causes FLUSH CACHE to timeout under certain circumstances if NCQ is being used. This can be worked around by disabling NCQ and fixed by updating the firmware. Implement ATA_HORKAGE_FIRMWARE_UPDATE and blacklist these devices. The wiki page has been updated to contain information on this issue. http://ata.wiki.kernel.org/index.php/Known_issues Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik commit 03f60840fa462e92220b093f778b2426ceab23af Author: Phil Sutter Date: Fri Nov 28 20:48:35 2008 +0100 [libata] pata_rb532_cf: fix signature of the xfer function Per definition, this function should return the number of bytes consumed. As the original parameter "buflen" is being decremented inside the read/write loop, save it in "retlen" at the beginning. Signed-off-by: Phil Sutter Acked-by: Sergei Shtyltov Acked-by: Bartlomiej Zolnierkiewicz Acked-by: Florian Fainelli Signed-off-by: Jeff Garzik commit 9f14786e27908a176f0568cf2132558efef71b31 Author: Phil Sutter Date: Fri Nov 28 20:48:26 2008 +0100 [libata] pata_rb532_cf: fix and rename register definitions The original standalone driver uses a custom address for the error register. Use it in pata_rb532_cf, too. Rename two register definitions: - The address offset 0x0800 in fact is the ATA base, not ATA command address. - The offset 0x0C00 is not a regular ATA data address, but a buffered one allowing 4-byte IO. Signed-off-by: Phil Sutter Signed-off-by: Jeff Garzik commit 1eedb4a90c958d8d59e0e4f19c297b445df21cf9 Author: Tejun Heo Date: Sat Nov 29 22:37:21 2008 +0900 ata_piix: add borked Tecra M4 to broken suspend list Tecra M4 sometimes forget what it is and reports bogus data via DMI which makes the machine evade broken suspend matching and thus fail suspend/resume. This patch updates piix_broken_suspend() such that it can match such case. As the borked DMI data is a bit generic, matching many entries to make the match more specific is necessary. As the usual DMI matching is limited to four entries, this patch uses hard coded manual matching. This is reported by Alexandru Romanescu. Signed-off-by: Tejun Heo Cc: Alexandru Romanescu Signed-off-by: Jeff Garzik commit b0f43dcca8a1f46e17b26d10f3cb1b297ebfb44e Merge: 7ec4f4634a4326c1f8fd172c80c8f59c9b3e90a4 42ab01c31526ac1d06d193f81a498bf3cf2acfe4 Author: Roland Dreier Date: Mon Dec 1 10:11:50 2008 -0800 Merge branches 'ehca' and 'mlx4' into for-linus commit 42ab01c31526ac1d06d193f81a498bf3cf2acfe4 Author: Jack Morgenstein Date: Mon Dec 1 10:09:37 2008 -0800 IB/mlx4: Fix MTT leakage in resize CQ When resizing a CQ, MTTs associated with the old CQE buffer were not freed. As a result, if any app used resize CQ repeatedly, all MTTs were eventually exhausted, which led to all memory registration operations failing until the driver is reloaded. Once the RESIZE_CQ command returns successfully from FW, FW no longer accesses the old CQ buffer, so it is safe to deallocate the MTT entries used by the old CQ buffer. Finally, if the RESIZE_CQ command fails, the MTTs allocated for the new CQEs buffer also need to be de-allocated. This fixes . Signed-off-by: Jack Morgenstein Signed-off-by: Roland Dreier commit 7ec4f4634a4326c1f8fd172c80c8f59c9b3e90a4 Author: Stefan Roscher Date: Mon Dec 1 10:05:50 2008 -0800 IB/ehca: Fix problem with generated flush work completions This fix enables ehca device driver to generate flush work completions even if the application doesn't request completions for all work requests. The current implementation of ehca will generate flush work completions for the wrong work requests if an application uses non signaled work completions. Signed-off-by: Stefan Roscher Signed-off-by: Roland Dreier commit 6b1f9d647e848060d34c3db408413989f1e460ba Author: Joachim Fenkes Date: Mon Dec 1 10:05:44 2008 -0800 IB/ehca: Change misleading error message on memory hotplug The error message printed when the eHCA driver prevents memory hotplug is misleading -- the user might think that hot-removing the lhca, hotplugging memory, then hot-adding the lhca again will work, but it actually doesn't. Signed-off-by: Joachim Fenkes Signed-off-by: Roland Dreier commit 6a1214113090905aca6a492fc8ef10d84c608a69 Merge: c07f62e5f18123103459ff74e86af1518a5b8af5 2642b11295ebcc94843045933061bfbb263fce7f Author: Linus Torvalds Date: Mon Dec 1 09:34:23 2008 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: ieee1394: sbp2: fix race condition in state change ieee1394: fix list corruption (reported at module removal) firewire: fw-sbp2: another iPod mini quirk entry ieee1394: sbp2: another iPod mini quirk entry commit c07f62e5f18123103459ff74e86af1518a5b8af5 Merge: e5404586a499f7dce915456e85ff94b2df7a3b1c ee8a1a0a1a5817accd03ced7e7ffde3a4430f485 Author: Linus Torvalds Date: Mon Dec 1 08:33:59 2008 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: Apple ALU wireless keyboards are bluetooth devices HID: remove setup mutex, fix possible deadlock HID: add USB ID for another dual gameron adapter HID: unignore mouse on unibody macbooks HID: fix blacklist entries for greenasia/pantherlord commit e5404586a499f7dce915456e85ff94b2df7a3b1c Author: Kevin Hao Date: Mon Dec 1 11:36:16 2008 +0000 Add kref to fake tty used by USB console We alloc a fake tty in usb serial console setup function. we should init the tty's kref otherwise we will face WARN_ON after following invoke of tty_port_tty_set --> tty_kref_get. Signed-off-by: Kevin Hao Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit 296fa7f6a3f3342d40df7713e74246198295654b Author: Will Newton Date: Mon Dec 1 11:36:06 2008 +0000 drivers/char/tty_io.c: Avoid panic when no console is configured. When no console is configured tty_open tries to call kref_get on a NULL pointer, return ENODEV instead. Signed-off-by: Will Newton Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds commit b4dcfbee3b536c9125762e8f6681ac6be0e9256b Merge: ecf318cc3daee6f41354cc781e2d4b766f7eec3e 5bb4bd9895df508ed2bd8b3280252d8a8170e4ac Author: Linus Torvalds Date: Mon Dec 1 07:58:49 2008 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: USB: serial: add more Onda device ids to option driver USB: usb-storage: unusual_devs entry for Nikon D2H USB: storage: unusual_devs entry for Mio C520-GPS USB: fsl_usb2_udc: Report disconnect before unbinding USB: fsl_qe_udc: Report disconnect before unbinding USB: fix SB600 USB subsystem hang bug Revert "USB: improve ehci_watchdog's side effect in CPU power management" commit ecf318cc3daee6f41354cc781e2d4b766f7eec3e Merge: 2a1dc509747fdcfdf3a2df818a14908aed86c3d4 a1e0eb104249817e5251bd4aade50921ffcb2159 Author: Linus Torvalds Date: Mon Dec 1 07:58:23 2008 -0800 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: powerpc: Fix build for 32-bit SMP configs commit 2a1dc509747fdcfdf3a2df818a14908aed86c3d4 Author: Johannes Weiner Date: Mon Dec 1 03:00:35 2008 +0100 vmscan: protect zone rotation stats by lru lock The zone's rotation statistics must not be accessed without the corresponding LRU lock held. Fix an unprotected write in shrink_active_list(). Acked-by: Rik van Riel Reviewed-by: KOSAKI Motohiro Signed-off-by: Johannes Weiner Signed-off-by: Linus Torvalds commit 33b07db9f38fe73b3895f8d4db8fdee03e3afec3 Author: Linus Torvalds Date: Mon Dec 1 07:55:14 2008 -0800 Revert "of_platform_driver noise on sparce" This reverts commit e669dae6141ff97d3c7566207f5de3b487dcf837, since it is incomplete, and clashes with fuller patches and the sparc 32/64 unification effort. Requested-by: David Miller Acked-by: Al Viro Signed-off-by: Linus Torvalds commit 5bb4bd9895df508ed2bd8b3280252d8a8170e4ac Author: Greg Kroah-Hartman Date: Sat Nov 29 11:46:21 2008 -0800 USB: serial: add more Onda device ids to option driver Thanks to Domenico Riccio for pointing these out. Cc: Domenico Riccio Signed-off-by: Greg Kroah-Hartman commit 621b239d75b790ac66854d46b094874f69e6776e Author: Tobias Kunze Briseño Date: Mon Nov 24 11:28:31 2008 -0500 USB: usb-storage: unusual_devs entry for Nikon D2H This patch adds an unusual_devs entry for the Nikon D2H camera. From: Tobias Kunze Briseño , Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit a6b7b034d7f20761c55743be2acb762ce09a0c6b Author: Alan Stern Date: Fri Nov 21 16:15:12 2008 -0500 USB: storage: unusual_devs entry for Mio C520-GPS This patch (as1176) adds an unusual_devs entry for the Mio C520 GPS unit. Other devices also based on the Mitac hardware use the same USB interface firmware, so the Vendor and Product names are generalized. This fixes Bugzilla #11583. Signed-off-by: Alan Stern Tested-by: Tamas Kerecsen Signed-off-by: Greg Kroah-Hartman commit 1f15a506f356aa21c29b6a7b0e9e826695273dfc Author: Anton Vorontsov Date: Thu Nov 13 15:00:46 2008 +0300 USB: fsl_usb2_udc: Report disconnect before unbinding Gadgets disable endpoints in their disconnect callbacks, so we must call disconnect before unbinding. The patch fixes following badness: root@b1:~# insmod fsl_usb2_udc.ko Freescale High-Speed USB SOC Device Controller driver (Apr 20, 2007) root@b1:~# insmod g_ether.ko g_ether gadget: using random self ethernet address g_ether gadget: using random host ethernet address usb0: MAC 26:07:ba:c0:44:33 usb0: HOST MAC 96:81:0c:05:4d:e3 g_ether gadget: Ethernet Gadget, version: Memorial Day 2008 g_ether gadget: g_ether ready fsl-usb2-udc: bind to driver g_ether g_ether gadget: high speed config #1: CDC Ethernet (ECM) root@b1:~# rmmod g_ether.ko ------------[ cut here ]------------ Badness at drivers/usb/gadget/composite.c:871 [...] NIP [e10c3454] composite_unbind+0x24/0x15c [g_ether] LR [e10aa454] usb_gadget_unregister_driver+0x13c/0x164 [fsl_usb2_udc] Call Trace: [df145e80] [ffffff94] 0xffffff94 (unreliable) [df145eb0] [e10aa454] usb_gadget_unregister_driver+0x13c/0x164 [fsl_usb2_udc] [df145ed0] [e10c4c40] usb_composite_unregister+0x3c/0x4c [g_ether] [df145ee0] [c006bcc0] sys_delete_module+0x130/0x19c [df145f40] [c00142d8] ret_from_syscall+0x0/0x38 [...] unregistered gadget driver 'g_ether' Signed-off-by: Anton Vorontsov Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 9ac36da3f8bc646a628bd09326e090defc8b7940 Author: Anton Vorontsov Date: Thu Nov 13 14:57:20 2008 +0300 USB: fsl_qe_udc: Report disconnect before unbinding Gadgets disable endpoints in their disconnect callbacks, so we must call disconnect before unbinding. This also fixes muram memory leak, since we free muram in the qe_ep_disable(). But mainly the patch fixes following badness: root@b1:~# insmod fsl_qe_udc.ko fsl_qe_udc: Freescale QE/CPM USB Device Controller driver, 1.0 fsl_qe_udc e01006c0.usb: QE USB controller initialized as device root@b1:~# insmod g_ether.ko g_ether gadget: using random self ethernet address g_ether gadget: using random host ethernet address usb0: MAC be:2d:3c:fa:be:f0 usb0: HOST MAC 62:b8:6a:df:38:66 g_ether gadget: Ethernet Gadget, version: Memorial Day 2008 g_ether gadget: g_ether ready fsl_qe_udc e01006c0.usb: fsl_qe_udc bind to driver g_ether g_ether gadget: high speed config #1: CDC Ethernet (ECM) root@b1:~# rmmod g_ether.ko ------------[ cut here ]------------ Badness at drivers/usb/gadget/composite.c:871 [...] NIP [d10c1374] composite_unbind+0x24/0x15c [g_ether] LR [d10a82f4] usb_gadget_unregister_driver+0x128/0x168 [fsl_qe_udc] Call Trace: [cfb93e80] [cfb1f3a0] 0xcfb1f3a0 (unreliable) [cfb93eb0] [d10a82f4] usb_gadget_unregister_driver+0x128/0x168 [fsl_qe_udc] [cfb93ed0] [d10c2a3c] usb_composite_unregister+0x3c/0x4c [g_ether] [cfb93ee0] [c006bde0] sys_delete_module+0x130/0x19c [cfb93f40] [c00142d8] ret_from_syscall+0x0/0x38 [...] fsl_qe_udc e01006c0.usb: unregistered gadget driver 'g_ether' Signed-off-by: Anton Vorontsov Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 0a99e8ac430a27825bd055719765fd0d65cd797f Author: Shane Huang Date: Tue Nov 25 15:12:33 2008 +0800 USB: fix SB600 USB subsystem hang bug This patch is required for all AMD SB600 revisions to avoid USB subsystem hang symptom. The USB subsystem hang symptom is observed when the system has multiple USB devices connected to it. In some cases a USB hub may be required to observe this symptom. Reported in bugzilla as #11599, the similar patch for SB700 old revision is: commit b09bc6cbae4dd3a2d35722668ef2c502a7b8b093 Reported-by: raffaele Tested-by: Roman Mamedov Signed-off-by: Shane Huang Cc: stable Signed-off-by: Greg Kroah-Hartman commit 269f0532332410e97e3edeb78e6cd3bb940e52b4 Author: Greg Kroah-Hartman Date: Tue Nov 25 13:34:45 2008 -0800 Revert "USB: improve ehci_watchdog's side effect in CPU power management" This reverts commit f0d781d59cb621e1795d510039df973d0f8b23fc. It was the wrong thing to do, and does not really do what it said it did. Cc: Yi Yang Cc: David Brownell Cc: Alan Stern Signed-off-by: Greg Kroah-Hartman commit a1e0eb104249817e5251bd4aade50921ffcb2159 Author: Milton Miller Date: Sun Nov 16 11:44:42 2008 +0000 powerpc: Fix build for 32-bit SMP configs attr_smt_snooze_delay is only defined for CONFIG_PPC64, so protect the attribute removal with the same condition. This fixes this build error on 32-bit SMP configurations: /data/home/miltonm/next.git/arch/powerpc/kernel/sysfs.c: In function ‘unregister_cpu_online’: /data/home/miltonm/next.git/arch/powerpc/kernel/sysfs.c:722: error: ‘attr_smt_snooze_delay’ undeclared (first use in this function) /data/home/miltonm/next.git/arch/powerpc/kernel/sysfs.c:722: error: (Each undeclared identifier is reported only once /data/home/miltonm/next.git/arch/powerpc/kernel/sysfs.c:722: error: for each function it appears in.) Signed-off-by: Paul Mackerras commit d9d060a98ff89fe0f86e24c9c0c3d2f0c566781c Merge: 03cfdb86ac66677dbe76accae3f22c374a15b814 151903d5466fbcfb56ce792c3d5ea0ecbae15d07 Author: Linus Torvalds Date: Sun Nov 30 16:45:13 2008 -0800 Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/i915: Fix copy'n'pasteo that broke VT switch if flushing was non-empty. commit 03cfdb86ac66677dbe76accae3f22c374a15b814 Merge: 4ec8f077e4dd51f713984669781e7b568b8c41e2 ab598b6680f1e74c267d1547ee352f3e1e530f89 Author: Linus Torvalds Date: Sun Nov 30 16:44:18 2008 -0800 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: powerpc: Fix system calls on Cell entered with XER.SO=1 powerpc/cell: Fix GDB watchpoints, again powerpc/mpic: Don't reset affinity for secondary MPIC on boot powerpc/cell/axon-msi: Retry on missing interrupt powerpc: Fix boot freeze on machine with empty memory node powerpc: Fix IRQ assignment for some PCIe devices powerpc/spufs: Fix spinning in spufs_ps_fault on signal powerpc/mpc832x_rdb: fix swapped ethernet ids powerpc: Use generic PHY driver for Marvell 88E1111 PHY on GE Fanuc SBC610 powerpc/85xx: L2 cache size wrong in 8572DS dts powerpc/virtex: Update defconfigs powerpc/52xx: update defconfigs xsysace: Fix driver to use resource_size_t instead of unsigned long powerpc/virtex: fix various format/casting printk mismatches powerpc/mpc5200: fix bestcomm Kconfig dependencies powerpc/44x: Fix 460EX/460GT machine check handling powerpc/40x: Limit allocable DRAM during early mapping commit 4ec8f077e4dd51f713984669781e7b568b8c41e2 Merge: a6e470fd1bbfea8e51d2b10b0713e802b782f19a af38d90d6a5e135b546a3f86222ba2ad895ba4ae Author: Linus Torvalds Date: Sun Nov 30 16:39:06 2008 -0800 Merge master.kernel.org:/home/rmk/linux-2.6-arm * master.kernel.org:/home/rmk/linux-2.6-arm: Allow architectures to override copy_user_highpage() [ARM] pxa/palmtx: misc fixes to use generic GPIO API ARM: OMAP: Fixes for suspend / resume GPIO wake-up handling [ARM] pxa/corgi: update default config to exclude tosa from being built [ARM] pxa/pcm990: use negative number for an invalid GPIO in camera data ARM: OMAP: Typo fix for clock_allow_idle ARM: OMAP: Remove broken LCD driver for SX1 [ARM] 5335/1: pxa25x_udc: Fix is_vbus_present to return 1 or 0 [ARM] pxa/MioA701: bluetooth resume fix [ARM] pxa/MioA701: fix memory corruption. commit 151903d5466fbcfb56ce792c3d5ea0ecbae15d07 Author: Eric Anholt Date: Mon Dec 1 10:23:21 2008 +1000 drm/i915: Fix copy'n'pasteo that broke VT switch if flushing was non-empty. Introduced in the "Avoid BUG_ONs on VT switch" commit. Signed-off-by: Eric Anholt Signed-off-by: Dave Airlie commit ab598b6680f1e74c267d1547ee352f3e1e530f89 Author: Paul Mackerras Date: Sun Nov 30 11:49:45 2008 +0000 powerpc: Fix system calls on Cell entered with XER.SO=1 It turns out that on Cell, on a kernel with CONFIG_VIRT_CPU_ACCOUNTING = y, if a program sets the SO (summary overflow) bit in the XER and then does a system call, the SO bit in CR0 will be set on return regardless of whether the system call detected an error. Since CR0.SO is used as the error indication from the system call, this means that all system calls appear to fail. The reason is that the workaround for the timebase bug on Cell uses a compare instruction. With CONFIG_VIRT_CPU_ACCOUNTING = y, the ACCOUNT_CPU_USER_ENTRY macro reads the timebase, so we end up doing a compare instruction, which copies XER.SO to CR0.SO. Since we were doing this in the system call entry patch after clearing CR0.SO but before saving the CR, this meant that the saved CR image had CR0.SO set if XER.SO was set on entry. This fixes it by moving the clearing of CR0.SO to after the ACCOUNT_CPU_USER_ENTRY call in the system call entry path. Signed-off-by: Paul Mackerras Acked-by: Arnd Bergmann Acked-by: Benjamin Herrenschmidt commit 960cedb4e3eedec6394f224fc832c7a23f35a799 Author: Arnd Bergmann Date: Fri Nov 28 09:51:24 2008 +0000 powerpc/cell: Fix GDB watchpoints, again An earlier patch from Jens Osterkamp attempted to fix GDB watchpoints by enabling the DABRX register at boot time. Unfortunately, this did not work on SMP setups, where secondary CPUs were still using the power-on DABRX value. This introduces the same change for secondary CPUs on cell as well. Reported-by: Ulrich Weigand Tested-by: Ulrich Weigand Signed-off-by: Arnd Bergmann Signed-off-by: Paul Mackerras commit cc353c30bbdb84f4317a6c149ebb11cde2232e40 Author: Arnd Bergmann Date: Fri Nov 28 09:51:23 2008 +0000 powerpc/mpic: Don't reset affinity for secondary MPIC on boot Kexec/kdump currently fails on the IBM QS2x blades when the kexec happens on a CPU other than the initial boot CPU. It turns out that this is the result of mpic_init trying to set affinity of each interrupt vector to the current boot CPU. As far as I can tell, the same problem is likely to exist on any secondary MPIC, because they have to deliver interrupts to the first output all the time. There are two potential solutions for this: either not set up affinity at all for secondary MPICs, or assume that a single CPU output is connected to the upstream interrupt controller and hardcode affinity to that per architecture. This patch implements the second approach, defaulting to the first output. Currently, all known secondary MPICs are routed to their upstream port using the first destination, so we hardcode that. Signed-off-by: Arnd Bergmann Signed-off-by: Paul Mackerras commit d015fe9951641b2d869a7ae4a690be2a05a9dc7f Author: Arnd Bergmann Date: Fri Nov 28 09:51:22 2008 +0000 powerpc/cell/axon-msi: Retry on missing interrupt The MSI capture logic for the axon bridge can sometimes lose interrupts in case of high DMA and interrupt load, when it signals an MSI interrupt to the MPIC interrupt controller while we are already handling another MSI. Each MSI vector gets written into a FIFO buffer in main memory using DMA, and that DMA access is normally flushed by the actual interrupt packet on the IOIF. An MMIO register in the MSIC holds the position of the last entry in the FIFO buffer that was written. However, reading that position does not flush the DMA, so that we can observe stale data in the buffer. In a stress test, we have observed the DMA to arrive up to 14 microseconds after reading the register. This patch works around this problem by retrying the access to the FIFO buffer. We can reliably detect the conditioning by writing an invalid MSI vector into the FIFO buffer after reading from it, assuming that all MSIs we get are valid. After detecting an invalid MSI vector, we udelay(1) in the interrupt cascade for up to 100 times before giving up. Signed-off-by: Arnd Bergmann Signed-off-by: Paul Mackerras commit 4a6186696e7f15b3ea4dafcdb64ee0703e0e4487 Author: Dave Hansen Date: Mon Nov 24 12:02:35 2008 +0000 powerpc: Fix boot freeze on machine with empty memory node I got a bug report about a distro kernel not booting on a particular machine. It would freeze during boot: > ... > Could not find start_pfn for node 1 > [boot]0015 Setup Done > Built 2 zonelists in Node order, mobility grouping on. Total pages: 123783 > Policy zone: DMA > Kernel command line: > [boot]0020 XICS Init > [boot]0021 XICS Done > PID hash table entries: 4096 (order: 12, 32768 bytes) > clocksource: timebase mult[7d0000] shift[22] registered > Console: colour dummy device 80x25 > console handover: boot [udbg0] -> real [hvc0] > Dentry cache hash table entries: 1048576 (order: 7, 8388608 bytes) > Inode-cache hash table entries: 524288 (order: 6, 4194304 bytes) > freeing bootmem node 0 I've reproduced this on 2.6.27.7. It is caused by commit 8f64e1f2d1e09267ac926e15090fd505c1c0cbcb ("powerpc: Reserve in bootmem lmb reserved regions that cross NUMA nodes"). The problem is that Jon took a loop which was (in pseudocode): for_each_node(nid) NODE_DATA(nid) = careful_alloc(nid); setup_bootmem(nid); reserve_node_bootmem(nid); and broke it up into: for_each_node(nid) NODE_DATA(nid) = careful_alloc(nid); setup_bootmem(nid); for_each_node(nid) reserve_node_bootmem(nid); The issue comes in when the 'careful_alloc()' is called on a node with no memory. It falls back to using bootmem from a previously-initialized node. But, bootmem has not yet been reserved when Jon's patch is applied. It gives back bogus memory (0xc000000000000000) and pukes later in boot. The following patch collapses the loop back together. It also breaks the mark_reserved_regions_for_nid() code out into a function and adds some comments. I think a huge part of introducing this bug is because for loop was too long and hard to read. The actual bug fix here is the: + if (end_pfn <= node->node_start_pfn || + start_pfn >= node_end_pfn) + continue; Signed-off-by: Dave Hansen Signed-off-by: Paul Mackerras commit 4b824de9b18b8d1013e9fc9e4b0f855ced8cac2c Author: Adhemerval Zanella Date: Wed Nov 19 03:55:35 2008 +0000 powerpc: Fix IRQ assignment for some PCIe devices Currently, some PCIe devices on POWER6 machines do not get interrupts assigned correctly. The problem is that OF doesn't create an "interrupt" property for them. The fix is for of_irq_map_pci to fall back to using the value in the PCI interrupt-pin register in config space, as we do when there is no OF device-tree node for the device. I have verified that this works fine with a pair of Squib-E SAS adapter on a P6-570. Acked-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras commit a6e470fd1bbfea8e51d2b10b0713e802b782f19a Merge: 8e36a5d6ad587d906f0ff677974e5edb0335db30 90f671301a5e2678cdc99f611cd842161c3bb87f Author: Linus Torvalds Date: Sun Nov 30 14:04:31 2008 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6: parisc: struct device - replace bus_id with dev_name(), dev_set_name() parisc: fix kernel crash when unwinding a userspace process parisc: __kernel_time_t is always long commit 8e36a5d6ad587d906f0ff677974e5edb0335db30 Merge: 9bd062d9eaf9e790330f37d9f4518e1b95131f6c a98ee8c1c707fe3210b00ef9f806ba8e2bf35504 Author: Linus Torvalds Date: Sun Nov 30 14:04:02 2008 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: [CIFS] fix regression in cifs_write_begin/cifs_write_end commit 9bd062d9eaf9e790330f37d9f4518e1b95131f6c Merge: 72244c0e68dd664b894adb34a8772a6e4673b4c1 af6d596fd603219b054c1c90fb16672a9fd441bd Author: Linus Torvalds Date: Sun Nov 30 13:06:47 2008 -0800 Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: prevent divide by zero error in cpu_avg_load_per_task, update sched, cpusets: fix warning in kernel/cpuset.c sched: prevent divide by zero error in cpu_avg_load_per_task commit 72244c0e68dd664b894adb34a8772a6e4673b4c1 Merge: 93b10052f9146eab4e848b474baf10c2ea22acb3 2ed1cdcf9a83205d1343f29b630abff232eaa72c Author: Linus Torvalds Date: Sun Nov 30 13:06:20 2008 -0800 Merge branch 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: irq.h: fix missing/extra kernel-doc genirq: __irq_set_trigger: change pr_warning to pr_debug irq: fix typo x86: apic honour irq affinity which was set in early boot genirq: fix the affinity setting in setup_irq genirq: keep affinities set from userspace across free/request_irq() commit 93b10052f9146eab4e848b474baf10c2ea22acb3 Merge: 7bbc67fbf60b698b43692fc6ea16c526bf1c5e26 b0788caf7af773b6c2374590dabd3a205f0918a8 Author: Linus Torvalds Date: Sun Nov 30 13:05:46 2008 -0800 Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: lockdep: consistent alignement for lockdep info commit 7bbc67fbf60b698b43692fc6ea16c526bf1c5e26 Merge: 66a45cc4cc1c1f7d1ccae4d0fee261eab5560682 4f5a7f40ddbae98569acbb99118a98570315579c Author: Linus Torvalds Date: Sun Nov 30 13:05:31 2008 -0800 Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: ftrace: prevent recursion tracing, doc: update mmiotrace documentation x86, mmiotrace: fix buffer overrun detection function tracing: fix wrong position computing of stack_trace commit 66a45cc4cc1c1f7d1ccae4d0fee261eab5560682 Merge: 8639dad84e4fe83577006e8e2bd9da79c6c2c41e b627c8b17ccacba38c975bc0f69a49fc4e5261c9 Author: Linus Torvalds Date: Sun Nov 30 13:01:04 2008 -0800 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: always define DECLARE_PCI_UNMAP* macros x86: fixup config space size of CPU functions for AMD family 11h x86, bts: fix wrmsr and spinlock over kmalloc x86, pebs: fix PEBS record size configuration x86, bts: turn macro into static inline function x86, bts: exclude ds.c from build when disabled arch/x86/kernel/pci-calgary_64.c: change simple_strtol to simple_strtoul x86: use limited register constraint for setnz xen: pin correct PGD on suspend x86: revert irq number limitation x86: fixing __cpuinit/__init tangle, xsave_cntxt_init() x86: fix __cpuinit/__init tangle in init_thread_xstate() oprofile: fix an overflow in ppro code commit 8639dad84e4fe83577006e8e2bd9da79c6c2c41e Merge: 9297524f6a2885bfb4e2431d658cd1ffaefbda41 461cba2d294fe83297edf8a6556912812903dce1 Author: Linus Torvalds Date: Sun Nov 30 13:00:21 2008 -0800 Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/i915: Save/restore HWS_PGA on suspend/resume drm: move drm vblank initialization/cleanup to driver load/unload drm/i915: execbuffer pins objects, no need to ensure they're still in the GTT drm/i915: Always read pipestat in irq_handler drm/i915: Subtract total pinned bytes from available aperture size drm/i915: Avoid BUG_ONs on VT switch with a wedged chipset. drm/i915: Remove IMR masking during interrupt handler, and restart it if needed. drm/i915: Manage PIPESTAT to control vblank interrupts instead of IMR. commit 9297524f6a2885bfb4e2431d658cd1ffaefbda41 Merge: 8c7b905a2d131a8dd0b081b16c64b17db4ce9392 52b19ac993f1aeadbce15b55302be9a35346e235 Author: Linus Torvalds Date: Sun Nov 30 12:34:22 2008 -0800 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6: udf: Fix BUG_ON() in destroy_inode() commit 8c7b905a2d131a8dd0b081b16c64b17db4ce9392 Merge: 1838e39214ee3e390f9c8150ea7454103b72ef83 a266d9f1253a38ec2d5655ebcd6846298b0554f4 Author: Linus Torvalds Date: Sun Nov 30 11:43:41 2008 -0800 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq: [CPUFREQ] powernow-k8: ignore out-of-range PstateStatus value [CPUFREQ] Documentation: Add Blackfin to list of supported processors commit 1838e39214ee3e390f9c8150ea7454103b72ef83 Author: frans Date: Sat Nov 22 15:39:06 2008 +0100 Trivial Documentation/filesystems/ramfs-rootfs-initramfs.txt fix A very minor patch on ramfs-rootfs-initramfs.txt: update the location where CONFIG_INITRAMFS_SOURCE lives in menuconfig Signed-off-by: Frans Meulenbroeks Acked-by: Rob Landley Signed-off-by: Linus Torvalds commit 42182c7850cdfbfdcf5f8763908a7a66b5ce9041 Merge: e2a2444a90ba12f123c9c59362ffe3ab278bccb9 b6283534a3e057f8268ca5448305900f74d12608 Author: Linus Torvalds Date: Sun Nov 30 11:36:57 2008 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: hda - Check model for Dell 92HD73xx laptops ALSA: hda - mark Dell studio 1535 quirk ALSA: hda - No 'Headphone as Line-out' swich without line-outs ALSA: hda - Fix AFG power management on IDT 92HD* codecs ALSA: hda - Fix caching of SPDIF status bits ALSA: hda - Add a quirk for Dell Studio 15 ALSA: hda: Add STAC_DELL_M4_3 quirk sound/sound_core: Fix sparse warnings ALSA: hda: STAC_DELL_M6 EAPD commit e2a2444a90ba12f123c9c59362ffe3ab278bccb9 Merge: 8decec78a3d9e240f14553284629ac4851ff3744 2ad49887150894b9ed6a87a76b409adceee6b074 Author: Linus Torvalds Date: Sun Nov 30 11:34:17 2008 -0800 Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6 * 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6: UBI: Don't exit from ubi_thread until kthread_should_stop() is true UBI: fix EBADMSG handling commit 8decec78a3d9e240f14553284629ac4851ff3744 Merge: 499c59c42967329d39481314a839d7669f5e1506 7b964f733798960c899dc40911329aee7bee25e4 Author: Linus Torvalds Date: Sun Nov 30 11:21:43 2008 -0800 Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6 * 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: i2c-parport: Fix misplaced parport_release call i2c: Remove i2c clients in reverse order i2c/isp1301_omap: Build fixes commit 499c59c42967329d39481314a839d7669f5e1506 Author: Robert P. J. Day Date: Fri Nov 28 11:48:37 2008 +0000 MN10300: Tighten up the code using case ranges Compress a set of consecutive switch cases into a case-range. Signed-off-by: Robert P. J. Day Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit f1ba3bc7b97ad0cc5886e5dadf4defba68f37819 Merge: 95c5e1f1e6e1788cc8b9acbe9379ae395ef64958 abd942194dcba2fa9d24d547b8acd4ef052eaf73 Author: Linus Torvalds Date: Sun Nov 30 11:07:16 2008 -0800 Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 * 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: [S390] Update default configuration. [S390] Fix alignment of initial kernel stack. [S390] pgtable.h: Fix oops in unmap_vmas for KVM processes [S390] fix/cleanup sched_clock [S390] fix system call parameter functions. commit 95c5e1f1e6e1788cc8b9acbe9379ae395ef64958 Merge: b31a0fecd1dd01f1db406014a7c8a73983e04cc9 23d0a65cf229acd273b6f5a325c34d758a90d592 Author: Linus Torvalds Date: Sun Nov 30 11:06:40 2008 -0800 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: toshiba_acpi: close race in toshiba_acpi driver ACPICA: disable _BIF warning ACPI: delete OSI(Linux) DMI dmesg spam ACPICA: Allow _WAK method to return an Integer ACPI: thinkpad-acpi: fix fan sleep/resume path sony-laptop: printk tweak sony-laptop: brightness regression fix Revert "ACPI: don't enable control method power button as wakeup device when Fixed Power button is used" ACPI suspend: Blacklist boxes that require us to set SCI_EN directly on resume ACPI: scheduling in atomic via acpi_evaluate_integer () ACPI: battery: Convert discharge energy rate to current properly ACPI: EC: count interrupts only if called from interrupt handler. commit b31a0fecd1dd01f1db406014a7c8a73983e04cc9 Merge: 96b8936a9ed08746e47081458a5eb9e43a751e24 545f4e99dee7284ed57c79384c5c1d5ac58dcd59 Author: Linus Torvalds Date: Sun Nov 30 11:05:21 2008 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: wacom - add support for new USB Tablet PCs Input: replace spin_lock_bh with spin_lock_irqsave in ml_ff_playback Input: i8042 - add Compal Hel80 laptop to nomux blacklist Input: cm109 - add keymap for ATCom AU-100 phone Input: fix the example of an input device driver Input: psmouse - fix incorrect validate_byte check in OLPC protocol Input: atkbd - cancel delayed work before freeing its structure Input: atkbd - add keymap quirk for Inventec Symphony systems Input: i8042 - add Dell XPS M1530 to nomux list Input: elo - fix format string in elo driver commit 96b8936a9ed08746e47081458a5eb9e43a751e24 Author: Christoph Hellwig Date: Tue Nov 25 08:10:03 2008 +0100 remove __ARCH_WANT_COMPAT_SYS_PTRACE All architectures now use the generic compat_sys_ptrace, as should every new architecture that needs 32bit compat (if we'll ever get another). Remove the now superflous __ARCH_WANT_COMPAT_SYS_PTRACE define, and also kill a comment about __ARCH_SYS_PTRACE that was added after __ARCH_SYS_PTRACE was already gone. Signed-off-by: Christoph Hellwig Acked-by: David S. Miller Signed-off-by: Linus Torvalds commit 16799c6a4d5156c6ee185b51b7586cca1aae0800 Merge: 211f05a034f49586fdd071abd174853217ec29ee 8ec2e24356e63dc298c6040557faf396410907ac Author: Linus Torvalds Date: Sun Nov 30 10:38:22 2008 -0800 Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: MIPS: Make BUG() __noreturn. commit 211f05a034f49586fdd071abd174853217ec29ee Author: Arjan van de Ven Date: Sun Nov 23 16:57:36 2008 -0800 input: replace spin_lock_bh with spin_lock_irqsave in ml_ff_playback ml_ff_playback() uses spin_(un)lock_bh. However this function is called with interrupts disabled from erase_effect() in drivers/input/ff-core.c:196. This is not permitted, and will result in a WARN_ON in the bottom half handling code. This patch changes this function to just use spin_lock_irqsave() instead, solving the problem and simplifying the locking logic. This was reported as entry #106559 in kerneloops.org Reported-by: kerneloops.org Signed-off-by: Arjan van de Ven Signed-off-by: Linus Torvalds commit 02d0e6753d8ab0173b63338157929e52eac86d12 Author: Al Viro Date: Sat Nov 22 17:38:34 2008 +0000 hotplug_memory_notifier section annotation Same as for hotplug_cpu - we want static notifier_block in there in meminitdata, to avoid false positives whenever it's used. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit d3a307f32ec3554739033762672e533e2d246dae Author: Al Viro Date: Sat Nov 22 17:38:24 2008 +0000 sn_pci_controller_fixup() should be __init called only from __init Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit ffb78a26169351f6c22cdae481b057d50d5d759b Author: Al Viro Date: Sat Nov 22 17:38:14 2008 +0000 get xenbus_driver ->probe() "recognized" by modpost ... by giving the instances' names magic suffix recognized by modpost ;-/ Their ->probe() is __devinit Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit df6b07949b6cab9d119363d02ef63379160f6c82 Author: Al Viro Date: Sat Nov 22 17:38:04 2008 +0000 xen_play_dead() is __cpuinit Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 37af46efa5413c6f4c25d9a24b4c43f2cc718eed Author: Al Viro Date: Sat Nov 22 17:37:54 2008 +0000 xen_setup_vcpu_info_placement() is not init on x86 ... so get xen-ops.h in agreement with xen/smp.c Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 23a14b9e9db49ed5f7683857557c26c874d4abb6 Author: Al Viro Date: Sat Nov 22 17:37:44 2008 +0000 kvm_setup_secondary_clock() is cpuinit Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 2236d252e001ea57d53cec1954f680e503f3b8bc Author: Al Viro Date: Sat Nov 22 17:37:34 2008 +0000 enable_IR_x2apic() needs to be __init calls __init, called only from __init Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit ad04d31e5fb6b25308e6cdea6baa07d41871a3e0 Author: Al Viro Date: Sat Nov 22 17:37:14 2008 +0000 pci_setup() is init, not devinit for fsck sake, it's used only when parsing kernel command line... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 4bcc17dd8e48b612d43a9b0a6faa9eaa358fa4bd Author: Al Viro Date: Sat Nov 22 17:37:04 2008 +0000 alpha: pcibios_resource_to_bus() is callable from normal code pci_enable_rom(), specifically. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 56d74dd5f7ad8b6b0979ce915d51cf03bcc57267 Author: Al Viro Date: Sat Nov 22 17:36:54 2008 +0000 tricky one: hisax sections a) hisax_init_pcmcia() needs to be defined only if we have CONFIG_HOTPLUG (no PCMCIA support otherwise) and can be declared __devinit. b) HiSax_inithardware() can go __init c) hisax_register() is passing to checkcard() full-blown hisax_cs_setup_card(): checkcard(i, id, NULL, hisax_d_if->owner, hisax_cs_setup_card); The problem with it is that * hisax_cs_setup_card() is __devinit * hisax_register() is not * hisax_cs_setup_card() is a switch from hell, calling a lot of setup_some_weirdcard() depending on card->typ. _These_ are also __devinit. However, in hisax_register() we have card->typ equal to ISDN_CTYPE_DYNAMIC, which reduces hisax_cs_setup_card() to "nevermind all that crap, just do nothing and return 2". So we add a trimmed-down callback doing just that and passed to checkcard() by hisax_register(). _This_ is non-init (we can stand the impact on .text size). Voila - no section warnings from drivers/isdn Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 8419641450edc838a6ce7cdf0f99d262bf0af2d5 Author: Al Viro Date: Sat Nov 22 17:36:44 2008 +0000 cpuinit fixes in kernel/* Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit b0385146bcdd24b0390c2b60fd05a083888835db Author: Al Viro Date: Sat Nov 22 17:36:34 2008 +0000 uninorth-agp section mess 'aperture' is declared devinitdata (the whole word of it) and is used from ->fetch_size() which can, AFAICS, be used on !HOTPLUG after init time. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 37d33d151428a4ee648c855c0b49368de7804e7f Author: Al Viro Date: Sat Nov 22 17:36:24 2008 +0000 rapidio section noise functions calling devinit and called only from devinit Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit f57628d76bd201a444ca822f3622522a44acbf60 Author: Al Viro Date: Sat Nov 22 17:36:14 2008 +0000 section errors in smc911x/smc91x a) ->probe() can be __devinit; no need to put it into .text b) calling __init stuff from it, OTOH, is wrong c) ->remove() is __devexit fodder Acked-by: rmk+kernel@arm.linux.org.uk Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 5bac287ea51bb8678c3875d87a536071ef0fd590 Author: Al Viro Date: Sat Nov 22 17:36:04 2008 +0000 fix the section noise in sparc head.S usual .text.head trick Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 1c4567aeed84a2746d78d4c1fe092222a559d43f Author: Al Viro Date: Sat Nov 22 17:35:54 2008 +0000 m32r: section noise in head.S usual "introduce .text.head, put it in front of TEXT_TEXT in vmlinux.lds.S, make the stuff up to jump to start_kernel live in it", same as on other targets. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 8814b5050d183f00a25a087b550841797c0c2775 Author: Al Viro Date: Sat Nov 22 17:35:44 2008 +0000 section misannotation in ibmtr_cs ibmtr_resume() is calling ibmtr_probe(), which is devinit. Whether that's the right thing to do there is a separate question, but since it's PCMCIA and thus will never compile without HOTPLUG... Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 43ced651d1272ced02ed5f1c2abc79e3354187f6 Author: Al Viro Date: Sat Nov 22 17:35:34 2008 +0000 ixgbe section fixes ixgbe_init_interrupt_scheme() is called from ixgbe_resume(). Build that with CONFIG_PM and without CONFIG_HOTPLUG and you've got a problem. Several helpers called by it also are misannotated __devinit. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 31421a6f6ea88236cb17b6a24aa21e66a6138d4c Author: Al Viro Date: Sat Nov 22 17:35:24 2008 +0000 rackmeter section fixes * rackmeter_remove() reference needs devexit_p * rackmeter_setup() is calls devinit and is called only from devinit Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit ced7172ad94713f9023a3c279082402ac7750ba8 Author: Al Viro Date: Sat Nov 22 17:35:14 2008 +0000 gdth section fixes PCI side of driver should be devinit, not init Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit e669dae6141ff97d3c7566207f5de3b487dcf837 Author: Al Viro Date: Sat Nov 22 17:35:04 2008 +0000 of_platform_driver noise on sparce switch to __init for those; unlike powerpc sparc has no hotplug support for that stuff and their ->probe() tends to call __init functions while being declared __devinit. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 30037818f7c1e11cb3742fbecd614ef3dc7b27bb Author: Al Viro Date: Sat Nov 22 17:34:54 2008 +0000 advansys fix on ISA-less configs The code if (shost->dma_channel != NO_ISA_DMA) free_dma(shost->dma_channel); in there is triggerable only if we have CONFIG_ISA (we only set ->dma_channel to something other than NO_ISA_DMA under #ifdef CONFIG_ISA). OTOH, free_dma() is not guaranteed to be there in absense of CONFIG_ISA. IOW, driver runs into undefined symbols on PCI-but-not-ISA configs (e.g. on frv) and it's a false positive. Fix: put the entire if () under #ifdef CONFIG_ISA; behaviour doesn't change and dependency on free_dma() disappears for !CONFIG_ISA. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 2fceab0bd8d82509519e9b842a5a7234b2397fb4 Author: Al Viro Date: Sat Nov 22 17:34:44 2008 +0000 W1_MASTER_DS1WM should depend on HAVE_CLK Uses clk_...() a lot Acked-by: rmk+kernel@arm.linux.org.uk Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit d16d7667f9c211e8d9b7e2365cc3d3a83fc6a8e2 Author: Al Viro Date: Sat Nov 22 17:34:34 2008 +0000 icside section warnings icside_register_v[56] is called from (__devinit) icside_probe Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 596f1034190565529e507e1eb8df6def1c9f5560 Author: Al Viro Date: Sat Nov 22 17:34:24 2008 +0000 fix talitos talitos_remove() can be called from talitos_probe() on failure exit path, so it can't be __devexit. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 6005e3eb89db99f3737c8f5fe3d97f3262ed7919 Author: Al Viro Date: Sat Nov 22 17:34:14 2008 +0000 istallion section warnings stli_findeisabrds() and stli_initbrds() are using __init and called only from __init. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 8c29890aef80702824e2284909ee301ef2430a3e Author: Al Viro Date: Sat Nov 22 17:34:04 2008 +0000 sparc64 trivial section misannotations Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 409832f5484cd1e2d8812c3236dffb33d01c359b Author: Al Viro Date: Sat Nov 22 17:33:54 2008 +0000 sparc32 cpuinit flase positives All noise since we don't have CPU hotplug there. However, they did expose something very odd-looking in there - poke_viking() does a bunch of identical btfixup each time it's called (i.e. for each CPU). That one is left alone for now; just the trivial misannotation fixes. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 4ea8fb9c1cc67bee980dca589ec8d0d4e62858c7 Author: Al Viro Date: Sat Nov 22 17:33:44 2008 +0000 powerpc set_huge_psize() false positive called only from __init, calls __init. Incidentally, it ought to be static in file. Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 7d6a8a1c487422b772201927c454930377d8cf7e Author: Al Viro Date: Sat Nov 22 17:33:34 2008 +0000 false __cpuinit positives on alpha pure noise - alpha doesn't have CPU hotplug Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 31168481c32c8a485e1003af9433124dede57f8d Author: Al Viro Date: Sat Nov 22 17:33:24 2008 +0000 meminit section warnings Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit af6d596fd603219b054c1c90fb16672a9fd441bd Author: Ingo Molnar Date: Sat Nov 29 20:45:15 2008 +0100 sched: prevent divide by zero error in cpu_avg_load_per_task, update Regarding the bug addressed in: 4cd4262: sched: prevent divide by zero error in cpu_avg_load_per_task Linus points out that the fix is not complete: > There's nothing that keeps gcc from deciding not to reload > rq->nr_running. > > Of course, in _practice_, I don't think gcc ever will (if it decides > that it will spill, gcc is likely going to decide that it will > literally spill the local variable to the stack rather than decide to > reload off the pointer), but it's a valid compiler optimization, and > it even has a name (rematerialization). > > So I suspect that your patch does fix the bug, but it still leaves the > fairly unlikely _potential_ for it to re-appear at some point. > > We have ACCESS_ONCE() as a macro to guarantee that the compiler > doesn't rematerialize a pointer access. That also would clarify > the fact that we access something unsafe outside a lock. So make sure our nr_running value is immutable and cannot change after we check it for nonzero. Signed-off-by: Ingo Molnar commit 1583715ddb61f822041807a0f18b3b4845e88c76 Author: Ingo Molnar Date: Tue Nov 25 10:27:49 2008 +0100 sched, cpusets: fix warning in kernel/cpuset.c this warning: kernel/cpuset.c: In function ‘generate_sched_domains’: kernel/cpuset.c:588: warning: ‘ndoms’ may be used uninitialized in this function triggers because GCC does not recognize that ndoms stays uninitialized only if doms is NULL - but that flow is covered at the end of generate_sched_domains(). Help out GCC by initializing this variable to 0. (that's prudent anyway) Also, this function needs a splitup and code flow simplification: with 160 lines length it's clearly too long. Signed-off-by: Ingo Molnar commit 2642b11295ebcc94843045933061bfbb263fce7f Author: Stefan Richter Date: Sat Nov 29 14:55:47 2008 +0100 ieee1394: sbp2: fix race condition in state change An intermediate transition from _RUNNING to _IN_SHUTDOWN could have been missed by the former code. Signed-off-by: Stefan Richter commit e47c1feb17e61ef4e2f245c0af0c5a8e2a7798b2 Author: Stefan Richter Date: Wed Nov 26 01:34:25 2008 +0100 ieee1394: fix list corruption (reported at module removal) If there is more than one FireWire controller present, dummy_zero_addr and dummy_max_addr were added multiple times to different lists, thus corrupting the lists. Fix this by allocating them dynamically per host instead of just once globally. (Perhaps a better address space allocation algorithm could rid us of the two dummy address spaces.) Fixes http://bugzilla.kernel.org/show_bug.cgi?id=10129 . Signed-off-by: Stefan Richter commit 9a5aa622dd4cd22b5e0fe83e4a9c0c768d4e2dea Author: Jack Morgenstein Date: Fri Nov 28 21:29:46 2008 -0800 mlx4_core: Save/restore default port IB capability mask Commit 7ff93f8b ("mlx4_core: Multiple port type support") introduced support for different port types. As part of that support, SET_PORT is invoked to set the port type during driver startup. However, as a side-effect, for IB ports the invocation of this command also sets the port's capability mask to zero (losing the default value set by FW). To fix this, get the default ib port capabilities (via a MAD_IFC Port Info query) during driver startup, and save them for use in the mlx4_SET_PORT command when setting the port-type to Infiniband. This patch fixes problems with subnet manager (SM) failover such as , which occurred because the IsTrapSupported bit in the capability mask was zeroed. Signed-off-by: Jack Morgenstein Signed-off-by: Roland Dreier commit 23d0a65cf229acd273b6f5a325c34d758a90d592 Author: Arjan van de Ven Date: Fri Nov 28 08:19:09 2008 -0800 toshiba_acpi: close race in toshiba_acpi driver the toshiba ACPI driver will, in a failure case, free the rfkill state before stopping the polling timer that would use this state. More interesting, in the same failure case handling, it calls the exit function, which also frees the rfkill state, but after stopping the polling. If the race happens, a NULL pointer is passed to rfkill_force_state() which then causes a nice dereference. Fix the race by just not doing the too-early freeing of the rfkill state. This appears to be the cause of a hot issue on kerneloops.org; while I have no solid evidence of that this patch will fix the issue, the race appears rather real. Signed-off-by: Arjan van de Ven Signed-off-by: Len Brown commit 7b964f733798960c899dc40911329aee7bee25e4 Author: Jean Delvare Date: Fri Nov 28 15:24:39 2008 +0100 i2c-parport: Fix misplaced parport_release call We shouldn't release the parallel port until we are actually done with it. Signed-off-by: Jean Delvare commit 79b93e1359b1414b438f239c6e5e0ad91232e4c8 Author: Jean Delvare Date: Fri Nov 28 15:24:38 2008 +0100 i2c: Remove i2c clients in reverse order i2c clients should be removed in reverse order compared to the probe (actually: bind) order. This matters when several clients depend on each other. Signed-off-by: Jean Delvare Tested-by: Guennadi Liakhovetski commit d1846b0e7a1dc26f90fb0d75641aca9abb077ef9 Author: David Brownell Date: Fri Nov 28 15:24:38 2008 +0100 i2c/isp1301_omap: Build fixes Build fixes for isp1301_omap; no behavior changes: - fix incorrect probe() signature (it changed many months ago) - provide missing functions on H3 and H4 boards - "sparse" fixes (static, NULL-vs-0) The H3 build bits subset some of the stuff that was previously in the OMAP tree but never went to mainline. Signed-off-by: David Brownell Signed-off-by: Jean Delvare commit ee8a1a0a1a5817accd03ced7e7ffde3a4430f485 Author: Jan Scholz Date: Wed Nov 26 15:33:45 2008 +0100 HID: Apple ALU wireless keyboards are bluetooth devices While parsing 'hid_blacklist' in the apple alu wireless keyboard is not found. This happens because in the blacklist it is declared with HID_USB_DEVICE although the keyboards are really bluetooth devices. The same holds for 'apple_devices' list. This patch fixes it by changing HID_USB_DEVICE to HID_BLUETOOTH_DEVICE in those two lists. Signed-off-by: Jan Scholz Signed-off-by: Jiri Kosina commit af38d90d6a5e135b546a3f86222ba2ad895ba4ae Merge: 487ff32082a9bd7489d8185cf7d7a2fdf18a22fa a730b327ca70f0e4d933202e3979e96613c3585f Author: Russell King Date: Thu Nov 27 23:50:31 2008 +0000 Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 commit 487ff32082a9bd7489d8185cf7d7a2fdf18a22fa Author: Russell King Date: Thu Nov 27 11:13:58 2008 +0000 Allow architectures to override copy_user_highpage() With aliasing VIPT cache support, the ARM implementation of clear_user_page() and copy_user_page() sets up a temporary kernel space mapping such that we have the same cache colour as the userspace page. This avoids having to consider any userspace aliases from this operation. However, when highmem is enabled, kmap_atomic() have to setup mappings. The copy_user_highpage() and clear_user_highpage() call these functions before delegating the copies to copy_user_page() and clear_user_page(). The effect of this is that each of the *_user_highpage() functions setup their own kmap mapping, followed by the *_user_page() functions setting up another mapping. This is rather wasteful. Thankfully, copy_user_highpage() can be overriden by architectures by defining __HAVE_ARCH_COPY_USER_HIGHPAGE. However, replacement of clear_user_highpage() is more difficult because its inline definition is not conditional. It seems that you're expected to define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE and provide a replacement __alloc_zeroed_user_highpage() implementation instead. The allocation itself is fine, so we don't want to override that. What we really want to do is to override clear_user_highpage() with our own version which doesn't kmap_atomic() unnecessarily. Other VIPT architectures (PARISC and SH) would also like to override this function as well. Acked-by: Hugh Dickins Acked-by: James Bottomley Acked-by: Paul Mundt Signed-off-by: Russell King commit 52b19ac993f1aeadbce15b55302be9a35346e235 Author: Jan Kara Date: Tue Sep 23 18:24:08 2008 +0200 udf: Fix BUG_ON() in destroy_inode() udf_clear_inode() can leave behind buffers on mapping's i_private list (when we truncated preallocation). Call invalidate_inode_buffers() so that the list is properly cleaned-up before we return from udf_clear_inode(). This is ugly and suggest that we should cleanup preallocation earlier than in clear_inode() but currently there's no such call available since drop_inode() is called under inode lock and thus is unusable for disk operations. Signed-off-by: Jan Kara commit a730b327ca70f0e4d933202e3979e96613c3585f Author: Marek Vasut Date: Thu Nov 20 17:34:57 2008 +0100 [ARM] pxa/palmtx: misc fixes to use generic GPIO API Signed-off-by: Marek Vasut Signed-off-by: Eric Miao commit b627c8b17ccacba38c975bc0f69a49fc4e5261c9 Author: Joerg Roedel Date: Thu Nov 20 20:49:56 2008 +0100 x86: always define DECLARE_PCI_UNMAP* macros Impact: fix boot crash on AMD IOMMU if CONFIG_GART_IOMMU is off Currently these macros evaluate to a no-op except the kernel is compiled with GART or Calgary support. But we also need these macros when we have SWIOTLB, VT-d or AMD IOMMU in the kernel. Since we always compile at least with SWIOTLB we can define these macros always. This patch is also for stable backport for the same reason the SWIOTLB default selection patch is. Signed-off-by: Joerg Roedel Cc: Signed-off-by: Ingo Molnar commit 6417a917b564106dcf2b8f42687f92ad94635ddd Merge: 47fd6f7c94e15eb5f97dd1cbb0427a46b03c8185 723fdb781abfe78d8ba7d911abbb581722348aa7 Author: Russell King Date: Thu Nov 27 11:13:10 2008 +0000 Merge branch 'omap-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 commit abd942194dcba2fa9d24d547b8acd4ef052eaf73 Author: Martin Schwidefsky Date: Thu Nov 27 11:05:59 2008 +0100 [S390] Update default configuration. Signed-off-by: Martin Schwidefsky commit 0778dc3a624b48cf80072b04405cacd1ad4079be Author: Heiko Carstens Date: Thu Nov 27 11:05:58 2008 +0100 [S390] Fix alignment of initial kernel stack. We need an alignment of 16384 bytes for the initial kernel stack if the kernel is configured for 16384 bytes stacks but the linker script currently guarantees only an alignment of 8192 bytes. So fix this and simply use THREAD_SIZE as alignment value which will always do the right thing. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky commit 2944a5c971c12766e2438ea407ec3567949c32b7 Author: Christian Borntraeger Date: Thu Nov 27 11:05:57 2008 +0100 [S390] pgtable.h: Fix oops in unmap_vmas for KVM processes When running several kvm processes with lots of memory overcommitment, we have seen an oops during process shutdown: ------------[ cut here ]------------ Kernel BUG at 0000000000193434 [verbose debug info unavailable] addressing exception: 0005 [#1] PREEMPT SMP Modules linked in: kvm sunrpc qeth_l2 dm_mod qeth ccwgroup CPU: 10 Not tainted 2.6.28-rc4-kvm-bigiron-00521-g0ccca08-dirty #8 Process kuli (pid: 14460, task: 0000000149822338, ksp: 0000000024f57650) Krnl PSW : 0704e00180000000 0000000000193434 (unmap_vmas+0x884/0xf10) R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:2 PM:0 EA:3 Krnl GPRS: 0000000000000002 0000000000000000 000000051008d000 000003e05e6034e0 00000000001933f6 00000000000001e9 0000000407259e0a 00000002be88c400 00000200001c1000 0000000407259608 0000000407259e08 0000000024f577f0 0000000407259e09 0000000000445fa8 00000000001933f6 0000000024f577f0 Krnl Code: 0000000000193426: eb22000c000d sllg %r2,%r2,12 000000000019342c: a7180000 lhi %r1,0 0000000000193430: b2290012 iske %r1,%r2 >0000000000193434: a7110002 tmll %r1,2 0000000000193438: a7840006 brc 8,193444 000000000019343c: 9602c000 oi 0(%r12),2 0000000000193440: 96806000 oi 0(%r6),128 0000000000193444: a7110004 tmll %r1,4 Call Trace: ([<00000000001933f6>] unmap_vmas+0x846/0xf10) [<0000000000199680>] exit_mmap+0x210/0x458 [<000000000012a8f8>] mmput+0x54/0xfc [<000000000012f714>] exit_mm+0x134/0x144 [<000000000013120c>] do_exit+0x240/0x878 [<00000000001318dc>] do_group_exit+0x98/0xc8 [<000000000013e6b0>] get_signal_to_deliver+0x30c/0x358 [<000000000010bee0>] do_signal+0xec/0x860 [<0000000000112e30>] sysc_sigpending+0xe/0x22 [<000002000013198a>] 0x2000013198a INFO: lockdep is turned off. Last Breaking-Event-Address: [<00000000001a68d0>] free_swap_and_cache+0x1a0/0x1a4 <4>---[ end trace bc19f1d51ac9db7c ]--- The faulting instruction is the storage key operation (iske) in ptep_rcp_copy (called by pte_clear, called by unmap_vmas). iske reads dirty and reference bit information for a physical page and requires a valid physical address. Since we are in pte_clear, we cannot rely on the pte containing a valid address. Fortunately we dont need these information in pte_clear - after all there is no mapping. The best fix is to remove the needless call to ptep_rcp_copy that contains the iske. Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky commit 8107d8296baff899db89c1716fe8af69a5b19d18 Author: Christian Borntraeger Date: Thu Nov 27 11:05:56 2008 +0100 [S390] fix/cleanup sched_clock CONFIG_PRINTK_TIME reveals that sched_clock has a wrong offset during boot: .. [ 0.000000] Movable zone: 0 pages used for memmap [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 775679 [ 0.000000] Kernel command line: dasd=4b6c root=/dev/dasda1 ro noinitrd [ 0.000000] PID hash table entries: 4096 (order: 12, 32768 bytes) [6920575.975232] console [ttyS0] enabled [6920575.987586] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes) [6920575.991404] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes) .. The s390 implementation of sched_clock uses the store clock instruction and subtracts jiffies_timer_cc. jiffies_timer_cc is a local variable in arch/s390/kernel/time.c and only used for sched_clock and monotonic clock. For historical reasons there is an offset on that value. With todays code this offset is unnecessary. By removing that offset we can get a sched_clock which returns the nanoseconds after time_init. This improves CONFIG_PRINTK_TIME. Since sched_clock is the only user, I have also renamed jiffies_timer_cc to sched_clock_base_cc. In addition, the local variable init_timer_cc is redundant and can be romved as well. Signed-off-by: Christian Borntraeger Signed-off-by: Martin Schwidefsky commit 59da21398e680e8100625d689c8bebee6a139e93 Author: Martin Schwidefsky Date: Thu Nov 27 11:05:55 2008 +0100 [S390] fix system call parameter functions. syscall_get_nr() currently returns a valid result only if the call chain of the traced process includes do_syscall_trace_enter(). But collect_syscall() can be called for any sleeping task, the result of syscall_get_nr() in general is completely bogus. To make syscall_get_nr() work for any sleeping task the traps field in pt_regs is replace with svcnr - the system call number the process is executing. If svcnr == 0 the process is not on a system call path. The syscall_get_arguments and syscall_set_arguments use regs->gprs[2] for the first system call parameter. This is incorrect since gprs[2] may have been overwritten with the system call number if the call chain includes do_syscall_trace_enter. Use regs->orig_gprs2 instead. Signed-off-by: Martin Schwidefsky commit 4cd4262034849da01eb88659af677b69f8169f06 Author: Steven Rostedt Date: Wed Nov 26 21:04:24 2008 -0500 sched: prevent divide by zero error in cpu_avg_load_per_task Impact: fix divide by zero crash in scheduler rebalance irq While testing the branch profiler, I hit this crash: divide error: 0000 [#1] PREEMPT SMP [...] RIP: 0010:[] [] cpu_avg_load_per_task+0x50/0x7f [...] Call Trace: <0> [] find_busiest_group+0x3e5/0xcaa [] rebalance_domains+0x2da/0xa21 [] ? find_next_bit+0x1b2/0x1e6 [] run_rebalance_domains+0x112/0x19f [] __do_softirq+0xa8/0x232 [] call_softirq+0x1c/0x3e [] do_softirq+0x94/0x1cd [] irq_exit+0x6b/0x10e [] smp_apic_timer_interrupt+0xd3/0xff [] apic_timer_interrupt+0x13/0x20 The code for cpu_avg_load_per_task has: if (rq->nr_running) rq->avg_load_per_task = rq->load.weight / rq->nr_running; The runqueue lock is not held here, and there is nothing that prevents the rq->nr_running from going to zero after it passes the if condition. The branch profiler simply made the race window bigger. This patch saves off the rq->nr_running to a local variable and uses that for both the condition and the division. Signed-off-by: Steven Rostedt Peter Zijlstra Signed-off-by: Ingo Molnar commit 4f5a7f40ddbae98569acbb99118a98570315579c Author: Lai Jiangshan Date: Thu Nov 27 10:21:46 2008 +0800 ftrace: prevent recursion Impact: prevent unnecessary stack recursion if the resched flag was set before we entered, then don't reschedule. Signed-off-by: Lai Jiangshan Acked-by: Steven Rostedt Signed-off-by: Ingo Molnar commit e899b6485c332aa2d7510739507ab5e5d7b28e59 Author: Lin Ming Date: Thu Nov 27 14:42:30 2008 +0800 ACPICA: disable _BIF warning A generic work-around from ACPICA is in the queue, but since Linux has a work-around in its battery driver, we can disable this warning now. Allow _BIF method to return an Package with Buffer elements http://bugzilla.kernel.org/show_bug.cgi?id=11822 Signed-off-by: Lin Ming Signed-off-by: Len Brown commit a6e0887f21bbab337ee32d9c0a84d7c0b6e9141b Author: Len Brown Date: Sat Nov 8 01:21:10 2008 -0500 ACPI: delete OSI(Linux) DMI dmesg spam Linux will continue to ignore OSI(Linux), except for a white-list containing a few systems. So delete the black-list, and stop soliciting user-feedback on the console. Signed-off-by: Len Brown commit 95a28ed08619cc70f31611886ac7b26ab0e462dc Author: Bob Moore Date: Thu Nov 13 11:01:34 2008 +0800 ACPICA: Allow _WAK method to return an Integer This can happen if the _WAK method returns nothing (as per ACPI 1.0) but does return an integer if the implicit return mechanism is enabled. This is the only method that has this problem, since it is also defined to return a package of two integers (ACPI 1.0b+). In all other cases, if a method returns an object when one was not expected, no warning is issued. Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown commit 0081b162023690877e0096ef17a82ba1969befa8 Author: Henrique de Moraes Holschuh Date: Sun Nov 9 10:54:02 2008 -0200 ACPI: thinkpad-acpi: fix fan sleep/resume path This fixes a regression from v2.6.27, caused by commit 5814f737e1cd2cfa2893badd62189acae3e1e1fd, "ACPI: thinkpad-acpi: attempt to preserve fan state on resume". It is possible for fan_suspend() to fail to properly initialize fan_control_desired_level as required by fan_resume(), resulting on the fan always being set to level 7 on resume if the user didn't touch the fan controller. In order to get fan sleep/resume handling to work right: 1. Fix the fan_suspend handling of the T43 firmware quirk. If it is still undefined, we didn't touch the fan yet and that means we have no business doing it on resume. 2. Store the fan level on its own variable to avoid any possible issues with hijacking fan_control_desired_level (which isn't supposed to have anything other than 0-7 in it, anyway). 3. Change the fan_resume code to me more straightforward to understand (although we DO optimize the boolean logic there, otherwise it looks disgusting). 4. Add comments to help understand what the code is supposed to be doing. 5. Change fan_set_level to be less strict about how auto and full-speed modes are requested. http://bugzilla.kernel.org/show_bug.cgi?id=11982 Signed-off-by: Henrique de Moraes Holschuh Reported-by: Tino Keitel Signed-off-by: Len Brown commit 3fedd90fdf17643df1da473c5da983137d51bbdb Author: Alessandro Guido Date: Wed Nov 12 23:13:35 2008 +0100 sony-laptop: printk tweak There's no need to print "Sony: " just after "sony-laptop: " (DRV_PFX). Signed-off-by: Alessandro Guido Signed-off-by: Len Brown commit 38cfc148e1bc470175b3ad131db7dd7bdcff37ee Author: Alessandro Guido Date: Wed Nov 12 23:03:28 2008 +0100 sony-laptop: brightness regression fix After commit 540b8bb9c33935183ceb5bed466a42ad72b2af56: sony-laptop: fingers off backlight if video.ko is serving this functionality I can't set brightness on my sony laptop (nothing in /sys/class/backlight). dmesg says "sony-laptop: Sony: Brightness ignored, must be controlled by ACPI video driver". The function acpi_video_backlight_support returns 0 if we should use the vendor-specific backlight support, while non-0 if the ACPI generic should be used. Because of this, the check introduced by the said commit appears reversed. Signed-off-by: Alessandro Guido Signed-off-by: Len Brown commit 3bdca1b863c1ebcb2244fc0cb683876d7330e62b Author: Len Brown Date: Wed Nov 26 17:55:15 2008 -0500 Revert "ACPI: don't enable control method power button as wakeup device when Fixed Power button is used" This reverts commit faee816b1502385dc9bc5abf2960d1cc645844d1. http://bugzilla.kernel.org/show_bug.cgi?id=12091 Signed-off-by: Len Brown commit 65df78473ffbf3bff5e2034df1638acc4f3ddd50 Author: Rafael J. Wysocki Date: Wed Nov 26 17:53:13 2008 -0500 ACPI suspend: Blacklist boxes that require us to set SCI_EN directly on resume Some Apple boxes evidently require us to set SCI_EN on resume directly, because if we don't do that, they hung somewhere in the resume code path. Moreover, on these boxes it is not sufficient to use acpi_enable() to turn ACPI on during resume. All of this is against the ACPI specification which states that (1) the BIOS is supposed to return from the S3 sleep state with ACPI enabled (SCI_EN set) and (2) the SCI_EN bit is owned by the hardware and we are not supposed to change it. For this reason, blacklist the affected systems so that the SCI_EN bit is set during resume on them. [NOTE: Unconditional setting SCI_EN for all system on resume doesn't work, because it makes some other systems crash (that's to be expected). Also, it is not entirely clear right now if all of the Apple boxes require this workaround.] This patch fixes the recent regression tracked as http://bugzilla.kernel.org/show_bug.cgi?id=12038 Signed-off-by: Rafael J. Wysocki Tested-by: Tino Keitel Tested-by: Bob Copeland Signed-off-by: Len Brown commit 40599072dca3ec7d4c9ff8271978be169f974638 Author: Pavel Machek Date: Tue Nov 25 12:05:08 2008 +0100 ACPI: scheduling in atomic via acpi_evaluate_integer () Now I know why I had strange "scheduling in atomic" problems: acpi_evaluate_integer() does malloc(..., irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL)... which is (of course) broken. There's no way to reliably tell if we need GFP_ATOMIC or not from code, this one for example fails to detect spinlocks held. Fortunately, allocation seems small enough to be done on stack. Signed-off-by: Pavel Machek Acked-by: Bob Moore Signed-off-by: Len Brown commit 723fdb781abfe78d8ba7d911abbb581722348aa7 Author: Tero Kristo Date: Wed Nov 26 14:35:16 2008 -0800 ARM: OMAP: Fixes for suspend / resume GPIO wake-up handling Use the correct wake-up enable register, and make it work with 34xx also. Signed-off-by: Tero Kristo Signed-off-by: Kevin Hilman Signed-off-by: Tony Lindgren commit 558073dd56707864f09d563b64e7c37c021e89d2 Author: Alexey Starikovskiy Date: Fri Nov 21 22:41:01 2008 +0800 ACPI: battery: Convert discharge energy rate to current properly ACPI battery interface reports its state either in mW or in mA, and discharge rate in your case is reported in mW. power_supply interface does not have such a parameter, so current_now parameter is used for all cases. But in case of mW, reported discharge should be converted into mA. Signed-off-by: Alexey Starikovskiy Tested-by: Ferenc Wagner Signed-off-by: Len Brown commit 90f671301a5e2678cdc99f611cd842161c3bb87f Author: Kay Sievers Date: Fri Nov 7 01:42:46 2008 +0100 parisc: struct device - replace bus_id with dev_name(), dev_set_name() (I did not compile or test it, please let me know, or help fixing it, if something is wrong with the conversion) This patch is part of a larger patch series which will remove the "char bus_id[20]" name string from struct device. The device name is managed in the kobject anyway, and without any size limitation, and just needlessly copied into "struct device". To set and read the device name dev_name(dev) and dev_set_name(dev) must be used. If your code uses static kobjects, which it shouldn't do, "const char *init_name" can be used to statically provide the name the registered device should have. At registration time, the init_name field is cleared, to enforce the use of dev_name(dev) to access the device name at a later time. We need to get rid of all occurrences of bus_id in the entire tree to be able to enable the new interface. Please apply this patch, and possibly convert any remaining remaining occurrences of bus_id. We want to submit a patch to -next, which will remove bus_id from "struct device", to find the remaining pieces to convert, and finally switch over to the new api, which will remove the 20 bytes array and does no longer have a size limitation. Thanks, Kay Cc: Matthew Wilcox Cc: linux-parisc@vger.kernel.org Acked-by: Greg Kroah-Hartman Signed-off-by: Kay Sievers Signed-off-by: Kyle McMartin commit 7a3f5134a8f5bd7fa38b5645eef05e8a4eb62951 Author: Helge Deller Date: Wed Nov 26 12:46:22 2008 -0800 parisc: fix kernel crash when unwinding a userspace process Any user on existing parisc 32- and 64bit-kernels can easily crash the kernel and as such enforce a DSO. A simple testcase is available here: http://gsyprf10.external.hp.com/~deller/crash.tgz The problem is introduced by the fact, that the handle_interruption() crash handler calls the show_regs() function, which in turn tries to unwind the stack by calling parisc_show_stack(). Since the stack contains userspace addresses, a try to unwind the stack is dangerous and useless and leads to the crash. The fix is trivial: For userspace processes a) avoid to unwind the stack, and b) avoid to resolve userspace addresses to kernel symbol names. While touching this code, I converted print_symbol() to %pS printk formats and made parisc_show_stack() static. An initial patch for this was written by Kyle McMartin back in August: http://marc.info/?l=linux-parisc&m=121805168830283&w=2 Compile and run-tested with a 64bit parisc kernel. Signed-off-by: Helge Deller Cc: Grant Grundler Cc: Matthew Wilcox Cc: [2.6.25.x, 2.6.26.x, 2.6.27.x, earlier...] Signed-off-by: Andrew Morton Signed-off-by: Kyle McMartin commit 9860d1b08b082ffb54c4b7827c48c2728e12ba21 Author: Geert Uytterhoeven Date: Sun Nov 16 12:04:13 2008 +0100 parisc: __kernel_time_t is always long __kernel_time_t is always long on PA-RISC, irrespective of CONFIG_64BIT, hence move it out of the #ifdef CONFIG_64BIT / #else / #endif block. Signed-off-by: Geert Uytterhoeven Signed-off-by: Kyle McMartin commit 7b4d469228a92a00e412675817cedd60133de38a Author: Alexey Starikovskiy Date: Thu Nov 13 12:00:03 2008 +0300 ACPI: EC: count interrupts only if called from interrupt handler. fix 2.6.28 EC interrupt storm regression Signed-off-by: Alexey Starikovskiy Signed-off-by: Len Brown commit a98ee8c1c707fe3210b00ef9f806ba8e2bf35504 Author: Jeff Layton Date: Wed Nov 26 19:32:33 2008 +0000 [CIFS] fix regression in cifs_write_begin/cifs_write_end The conversion to write_begin/write_end interfaces had a bug where we were passing a bad parameter to cifs_readpage_worker. Rather than passing the page offset of the start of the write, we needed to pass the offset of the beginning of the page. This was reliably showing up as data corruption in the fsx-linux test from LTP. It also became evident that this code was occasionally doing unnecessary read calls. Optimize those away by using the PG_checked flag to indicate that the unwritten part of the page has been initialized. CC: Nick Piggin Acked-by: Dave Kleikamp Signed-off-by: Jeff Layton Signed-off-by: Steve French commit 545f4e99dee7284ed57c79384c5c1d5ac58dcd59 Author: Ping Cheng Date: Mon Nov 24 11:44:27 2008 -0500 Input: wacom - add support for new USB Tablet PCs Signed-off-by: Ping Cheng Signed-off-by: Dmitry Torokhov commit 461cba2d294fe83297edf8a6556912812903dce1 Author: Peng Li Date: Tue Nov 18 12:39:02 2008 +0800 drm/i915: Save/restore HWS_PGA on suspend/resume It fixes suspend/resume failure of xf86-video-intel dri2 branch. As dri2 branch doesn't call I830DRIResume() to restore hardware status page anymore, we need to preserve this register across suspend/resume. Signed-off-by: Peng Li Signed-off-by: Eric Anholt Signed-off-by: Dave Airlie commit 2fd36a5d6e830269a37f0f6ccfd34ee0517ebc7d Author: Eric Miao Date: Wed Nov 26 12:51:42 2008 +0800 [ARM] pxa/corgi: update default config to exclude tosa from being built Signed-off-by: Eric Miao commit 72e9622c2a2eb73d82c716504cc93d22cd3cfd8e Author: Guennadi Liakhovetski Date: Tue Nov 25 18:57:08 2008 +0100 [ARM] pxa/pcm990: use negative number for an invalid GPIO in camera data 0 is a valid GPIO number, use a negative number to specify, that this camera doesn't have a GPIO for bus-width switching. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Eric Miao commit ffd565a8b817d1eb4b25184e8418e8d96c3f56f6 Author: Andreas Herrmann Date: Tue Nov 25 17:18:03 2008 +0100 x86: fixup config space size of CPU functions for AMD family 11h Impact: extend allowed configuration space access on 11h CPUs from 256 to 4K Signed-off-by: Andreas Herrmann Acked-by: Jesse Barnes Signed-off-by: Ingo Molnar commit 147dcf5489fb86c4bfe400520186f9f11b304783 Author: Amit Kucheria Date: Tue Nov 25 15:11:12 2008 -0800 ARM: OMAP: Typo fix for clock_allow_idle The second clk_deny_idle instance should be clk_allow_idle instead. Signed-off-by: Amit Kucheria Signed-off-by: Tony Lindgren commit 031bb27c4bf77c2f60b3f3dea8cce63ef0d1fba9 Author: Stefan Richter Date: Sat Nov 22 12:38:58 2008 +0100 firewire: fw-sbp2: another iPod mini quirk entry Add another model ID of a broken firmware to prevent early I/O errors by acesses at the end of the disk. Reported at linux1394-user, http://marc.info/?t=122670842900002 Signed-off-by: Stefan Richter commit 9e0de91011ef6fe6eb3bb63f7ea15f586955660a Author: Stefan Richter Date: Sat Nov 22 12:38:24 2008 +0100 ieee1394: sbp2: another iPod mini quirk entry Add another model ID of a broken firmware to prevent early I/O errors by acesses at the end of the disk. Reported at linux1394-user, http://marc.info/?t=122670842900002 Signed-off-by: Stefan Richter commit a266d9f1253a38ec2d5655ebcd6846298b0554f4 Author: Andreas Herrmann Date: Fri Nov 21 14:49:25 2008 +0100 [CPUFREQ] powernow-k8: ignore out-of-range PstateStatus value A workaround for AMD CPU family 11h erratum 311 might cause that the P-state Status Register shows a "current P-state" which is larger than the "current P-state limit" in P-state Current Limit Register. For the wrong P-state value there is no ACPI _PSS object defined and powernow-k8/cpufreq can't determine the proper CPU frequency for that state. As a consequence this can cause a panic during boot (potentially with all recent kernel versions -- at least I have reproduced it with various 2.6.27 kernels and with the current .28 series), as an example: powernow-k8: Found 1 AMD Turion(tm)X2 Ultra DualCore Mobile ZM-82 processors (2 \ ) powernow-k8: 0 : pstate 0 (2200 MHz) powernow-k8: 1 : pstate 1 (1100 MHz) powernow-k8: 2 : pstate 2 (600 MHz) BUG: unable to handle kernel paging request at ffff88086e7528b8 IP: [] cpufreq_stats_update+0x4a/0x5f PGD 202063 PUD 0 Oops: 0002 [#1] SMP last sysfs file: CPU 1 Modules linked in: Pid: 1, comm: swapper Not tainted 2.6.28-rc3-dirty #16 RIP: 0010:[] [] cpufreq_stats_update+0x4a/0\ f Synaptics claims to have extended capabilities, but I'm not able to read them.<6\ 6 RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffff88006e7528c0 RDX: 00000000ffffffff RSI: ffff88006e54af00 RDI: ffffffff808f056c RBP: 00000000fffee697 R08: 0000000000000003 R09: ffff88006e73f080 R10: 0000000000000001 R11: 00000000002191c0 R12: ffff88006fb83c10 R13: 00000000ffffffff R14: 0000000000000001 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff88006fb50740(0000) knlGS:0000000000000000 Unable to initialize Synaptics hardware. CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b CR2: ffff88086e7528b8 CR3: 0000000000201000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process swapper (pid: 1, threadinfo ffff88006fb82000, task ffff88006fb816d0) Stack: ffff88006e74da50 0000000000000000 ffff88006e54af00 ffffffff804863c7 ffff88006e74da50 0000000000000000 00000000ffffffff 0000000000000000 ffff88006fb83c10 ffffffff8024b46c ffffffff808f0560 ffff88006fb83c10 Call Trace: [] ? cpufreq_stat_notifier_trans+0x51/0x83 [] ? notifier_call_chain+0x29/0x4c [] ? __srcu_notifier_call_chain+0x46/0x61 [] ? cpufreq_notify_transition+0x93/0xa9 [] ? powernowk8_target+0x1e8/0x5f3 [] ? cpufreq_governor_performance+0x1b/0x20 [] ? __cpufreq_governor+0x71/0xa8 [] ? __cpufreq_set_policy+0x101/0x13e [] ? cpufreq_add_dev+0x3f0/0x4cd [] ? handle_update+0x0/0x8 [] ? sysdev_driver_register+0xb6/0x10d [] ? powernowk8_init+0x0/0x7e [] ? cpufreq_register_driver+0x8f/0x140 [] ? _stext+0x56/0x14f [] ? proc_register+0x122/0x17d [] ? create_proc_entry+0x73/0x8a [] ? register_irq_proc+0x92/0xaa [] ? init_irq_proc+0x57/0x69 [] ? kernel_init+0x116/0x169 [] ? child_rip+0xa/0x11 [] ? kernel_init+0x0/0x169 [] ? child_rip+0x0/0x11 Code: 05 c5 83 36 00 48 c7 c2 48 5d 86 80 48 8b 04 d8 48 8b 40 08 48 8b 34 02 48\ RIP [] cpufreq_stats_update+0x4a/0x5f RSP CR2: ffff88086e7528b8 ---[ end trace 0678bac75e67a2f7 ]--- Kernel panic - not syncing: Attempted to kill init! In short, aftereffect of the wrong P-state is that cpufreq_stats_update() uses "-1" as index for some array in cpufreq_stats_update (unsigned int cpu) { ... if (stat->time_in_state) stat->time_in_state[stat->last_index] = cputime64_add(stat->time_in_state[stat->last_index], cputime_sub(cur_time, stat->last_time)); ... } Fortunately, the wrong P-state value is returned only if the core is in P-state 0. This fix solves the problem by detecting the out-of-range P-state, ignoring it, and using "0" instead. Cc: Mark Langsdorf Signed-off-by: Andreas Herrmann Signed-off-by: Dave Jones commit 121fe86bdf062af3fed1e998c08c3c272ae6dc99 Author: Robin Getz Date: Fri Oct 17 01:36:43 2008 +0800 [CPUFREQ] Documentation: Add Blackfin to list of supported processors Signed-off-by: Robin Getz Signed-off-by: Bryan Wu Signed-off-by: Dave Jones commit de90add30e79261c3b5be68bb0f22d2ef98e8113 Author: Markus Metzger Date: Tue Nov 25 08:52:56 2008 +0100 x86, bts: fix wrmsr and spinlock over kmalloc Impact: fix sleeping-with-spinlock-held bugs/crashes - Turn a wrmsr to write the DS_AREA MSR into a wrmsrl. - Use irqsave variants of spinlocks. - Do not allocate memory while holding spinlocks. Reported-by: Stephane Eranian Reported-by: Ingo Molnar Signed-off-by: Markus Metzger Signed-off-by: Ingo Molnar commit c4858ffc8f2dc850cb1f609c679b1ac1ad36ef0c Author: Markus Metzger Date: Tue Nov 25 08:49:06 2008 +0100 x86, pebs: fix PEBS record size configuration Impact: fix DS hw enablement on 64-bit x86 Fix the PEBS record size in the DS configuration. Reported-by: Stephane Eranian Signed-off-by: Markus Metzger Signed-off-by: Ingo Molnar commit e5e8ca633bbe972eff6f84e064a63c0c08ed6c3d Author: Markus Metzger Date: Tue Nov 25 08:47:19 2008 +0100 x86, bts: turn macro into static inline function Impact: cleanup Replace a macro with a static inline function. Signed-off-by: Markus Metzger Signed-off-by: Ingo Molnar commit 292c669cd7087a090d6420e223eb1072f3e3c50b Author: Markus Metzger Date: Tue Nov 25 08:45:13 2008 +0100 x86, bts: exclude ds.c from build when disabled Impact: cleanup Move the CONFIG guard from the .c file into the makefile. Reported-by: Andi Kleen Signed-off-by: Markus Metzger Signed-off-by: Ingo Molnar commit b6283534a3e057f8268ca5448305900f74d12608 Merge: c879c634c928223765cf50103ddaf32f2a55fed0 661cd8fb5210af78f0763071642e0764a10389a6 Author: Takashi Iwai Date: Tue Nov 25 17:21:32 2008 +0100 Merge branch 'topic/fix/hda' into for-linus commit eff79aee91dd07e944df65fa448c8baeee7709d8 Author: Julia Lawall Date: Tue Nov 25 14:13:03 2008 +0100 arch/x86/kernel/pci-calgary_64.c: change simple_strtol to simple_strtoul Impact: fix theoretical option string parsing overflow Since bridge is unsigned, it would seem better to use simple_strtoul that simple_strtol. A simplified version of the semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r2@ long e; position p; @@ e = simple_strtol@p(...) @@ position p != r2.p; type T; T e; @@ e = - simple_strtol@p + simple_strtoul (...) // Signed-off-by: Julia Lawall Cc: muli@il.ibm.com Cc: jdmason@kudzu.us Cc: discuss@x86-64.org Signed-off-by: Ingo Molnar commit 5cf02b7bafddb6c3c16ddfb23d3ce187f70528ba Author: Steven Rostedt Date: Tue Nov 25 00:42:37 2008 -0500 x86: use limited register constraint for setnz Impact: build fix with certain compilers GCC can decide to use %dil when "r" is used, which is not valid for setnz. This bug was brought out by Stephen Rothwell's merging of the branch tracer into linux-next. [ Thanks to Uros Bizjak for recommending 'q' over 'Q' ] Signed-off-by: Steven Rostedt Signed-off-by: Ingo Molnar commit 661cd8fb5210af78f0763071642e0764a10389a6 Author: Takashi Iwai Date: Tue Nov 25 15:18:29 2008 +0100 ALSA: hda - Check model for Dell 92HD73xx laptops Check the model type instead of PCI SSID for detection of the mic types on Dell laptops with IDT 92HD73xx codecs. In this way, a new laptop can be tested via model module option. Signed-off-by: Takashi Iwai commit c65574abad288d7123bd49e7906fa53b7e420239 Author: Takashi Iwai Date: Fri Nov 21 18:01:44 2008 +0100 ALSA: hda - mark Dell studio 1535 quirk Fixed the quirk string for Dell studio 1535 (the product name wasn't published at the time the patch was made). Signed-off-by: Takashi Iwai commit 95026623da32848bc93fbfb472dc8737487df450 Author: Takashi Iwai Date: Mon Nov 24 07:51:11 2008 +0100 ALSA: hda - No 'Headphone as Line-out' swich without line-outs STAC/IDT driver creates "Headphone as Line-Out" switch even if there is no line-out pins on the machine. For devices only with headpohnes and speaker-outs, this switch shouldn't be created. Signed-off-by: Takashi Iwai commit f73d35853e9263c7c404f0d6c0fe3d83fc6fd5c0 Author: Takashi Iwai Date: Tue Nov 25 08:21:51 2008 +0100 ALSA: hda - Fix AFG power management on IDT 92HD* codecs The AFG pin power-mapping isn't properly set for the fixed I/O pins on IDT 92HD* codecs. This resulted in the low power mode after the boot until any jack detection is executed, thus no output from the speaker. This patch fixes the power mapping for the fixed pins, and also fixes the GPIO bits and digital I/O pin settings properly in stac92xx_ini(). Reference: Novell bnc#446025 https://bugzilla.novell.com/show_bug.cgi?id=446025 Signed-off-by: Takashi Iwai commit 9e97697666d0e7494946cfb639f6a9faacd5f1b0 Author: Takashi Iwai Date: Tue Nov 25 08:17:20 2008 +0100 ALSA: hda - Fix caching of SPDIF status bits SPDIF status bits controls are written via snd_hda_codec_write() without caching. This causes a regression at resume that the bits are lost. Simply replacing it with the cached version fixes the problem. Reference: http://lkml.org/lkml/2008/11/24/324 Signed-off-by: Takashi Iwai commit 7953031da4200323ab5d85bd514054ca4ba9d225 Author: Tony Lindgren Date: Mon Nov 24 18:11:16 2008 -0800 ARM: OMAP: Remove broken LCD driver for SX1 Recently the omap McBSP code was cleaned up to get rid of direct McBSP register tinkering by the drivers. Looks like lcd_sx1.c never got converted, and now it breaks builds. It seems the lcd_sx1.c driver is attempting SPI mode, but doing it in a different way compared to omap_mcbsp_set_spi_mode(). Remove the broken driver, patches welcome to add it back when done properly by patching both mcbsp.c and lcd_sx1.c. Cc: Vovan888@gmail.com Cc: linux-fbdev-devel@lists.sourceforge.net Signed-off-by: Tony Lindgren commit 52440211dcdc52c0b757f8b34d122e11b12cdd50 Author: Keith Packard Date: Tue Nov 18 09:30:25 2008 -0800 drm: move drm vblank initialization/cleanup to driver load/unload drm vblank initialization keeps track of the changes in driver-supplied frame counts across vt switch and mode setting, but only if you let it by not tearing down the drm vblank structure. Signed-off-by: Keith Packard Signed-off-by: Dave Airlie commit 6133047aa64d2fd5b3b79dff74f696ded45615b2 Author: Keith Packard Date: Thu Nov 20 23:14:48 2008 -0800 drm/i915: execbuffer pins objects, no need to ensure they're still in the GTT Before we had the notion of pinning objects, we had a kludge around to make sure all of the objects were still resident in the GTT before we committed to executing a batch buffer. We don't need this any longer, and it sticks an error return in the middle of object domain computations that must be associated with a subsequent flush/invalidate emmission into the ring. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Signed-off-by: Dave Airlie commit 05eff845a28499762075d3a72e238a31f4d2407c Author: Keith Packard Date: Wed Nov 19 14:03:05 2008 -0800 drm/i915: Always read pipestat in irq_handler Because we write pipestat before iir, it's possible that a pipestat interrupt will occur between the pipestat write and the iir write. This leaves pipestat with an interrupt status not visible in iir. This may cause an interrupt flood as we never clear the pipestat event. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Signed-off-by: Dave Airlie commit 2678d9d6964b29ecd1975870c7a850242b29bc5c Author: Keith Packard Date: Thu Nov 20 22:54:54 2008 -0800 drm/i915: Subtract total pinned bytes from available aperture size The old code was wandering through the active list looking for pinned buffers; there may be other pinned buffers around. Fortunately, we keep a count of the total amount of pinned memory and can use that instead. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Signed-off-by: Dave Airlie commit 28dfe52a6e8a1495067c4331358700a170d0ee86 Author: Eric Anholt Date: Thu Nov 13 15:00:55 2008 -0800 drm/i915: Avoid BUG_ONs on VT switch with a wedged chipset. Instead, just warn that bad things are happening and do our best to clean up the mess without the GPU's help. Signed-off-by: Eric Anholt Signed-off-by: Dave Airlie commit cdfbc41f6d602fc0105fb2b4e0645cc1aa274c12 Author: Eric Anholt Date: Tue Nov 4 15:50:30 2008 -0800 drm/i915: Remove IMR masking during interrupt handler, and restart it if needed. The IMR masking was a technique recommended for avoiding getting stuck with no interrupts generated again in MSI mode. It kept new IIR bits from getting set between the IIR read and the IIR write, which would have otherwise prevented an MSI from ever getting generated again. However, this caused a problem for vblank as the IMR mask would keep the pipe event interrupt from getting reflected in IIR, even after the IMR mask was brought back down. Instead, just check the state of IIR after we ack the interrupts we're going to handle, and restart if we didn't get IIR all the way to zero. Signed-off-by: Eric Anholt Signed-off-by: Dave Airlie commit 7c463586427bbbad726ba561bae4ba5acada2481 Author: Keith Packard Date: Tue Nov 4 02:03:27 2008 -0800 drm/i915: Manage PIPESTAT to control vblank interrupts instead of IMR. The pipestat fields affect reporting of all vblank-related interrupts, so we have to reset them during the irq_handler, and while enabling vblank interrupts. Otherwise, if a pipe status field had been set to non-zero before enabling reporting, we would never see an interrupt again. This patch adds i915_enable_pipestat and i915_disable_pipestat to abstract out the steps needed to change the reported interrupts. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Signed-off-by: Dave Airlie commit 8442c87d2f6c73cdc9a391e4dd9390523d242bda Author: Arjan van de Ven Date: Sun Nov 23 22:35:57 2008 -0500 Input: replace spin_lock_bh with spin_lock_irqsave in ml_ff_playback ml_ff_playback() uses spin_(un)lock_bh. However this function is called with interrupts disabled from erase_effect() in drivers/input/ff-core.c:196. This is not permitted, and will result in a WARN_ON in the bottom half handling code. This patch changes this function to just use spin_lock_irqsave() instead, solving the problem and simplifying the locking logic. This was reported as entry #106559 in kerneloops.org Reported-by: kerneloops.org Signed-off-by: Arjan van de Ven Signed-off-by: Dmitry Torokhov commit 8ec2e24356e63dc298c6040557faf396410907ac Author: David Daney Date: Thu Nov 20 17:26:36 2008 -0800 MIPS: Make BUG() __noreturn. Often we do things like put BUG() in the default clause of a case statement. Since it was not declared __noreturn, this could sometimes lead to bogus compiler warnings that variables were used uninitialized. There is a small problem in that we have to put a magic while(1); loop to fool GCC into really thinking it is noreturn. This makes the new BUG() function 3 instructions long instead of just 1, but I think it is worth it as it is now unnecessary to do extra work to silence the 'used uninitialized' warnings. I also re-wrote BUG_ON so that if it is given a constant condition, it just does BUG() instead of loading a constant value in to a register and testing it. Signed-off-by: David Daney Signed-off-by: Ralf Baechle commit 50f3beb50abe0cc0228363af804e50e710b3e5b0 Author: Mauro Carvalho Chehab Date: Mon Nov 24 08:45:57 2008 -0300 V4L/DVB (9742): em28xx-alsa: implement another locking schema Instead of using a spinlock, it is better to call the proper pcm stream locking schema. Signed-off-by: Mauro Carvalho Chehab commit 7a8f4ccfd572a11f609439dc6a75165b441641bc Author: Michael Krufky Date: Fri Nov 21 17:14:37 2008 -0300 V4L/DVB (9732): sms1xxx: use new firmware for Hauppauge WinTV MiniStick New firmware image brings enhanced tuning performance. Firmware is available for download at the following location: http://www.steventoth.net/linux/sms1xxx Signed-off-by: Michael Krufky Signed-off-by: Mauro Carvalho Chehab commit e07a1d8ab20a059fefbfd1558db43701bca560d7 Author: Jean-Francois Moine Date: Wed Nov 19 06:37:53 2008 -0300 V4L/DVB (9691): gspca: Move the video device to a separate area. The video device was part of the gspca device. On device disconnection while streaming, the device structure is freed at close time. In this case, the remaining close job on the video device run out of allocated memory. Signed-off-by: Jean-Francois Moine Signed-off-by: Mauro Carvalho Chehab commit 5c4fa002b1c7b40f65fa911ae17a823ec9e26ab2 Author: Jean-Francois Moine Date: Tue Nov 18 15:52:31 2008 -0300 V4L/DVB (9690): gspca: Lock the subdrivers via module_get/put. The previous subdriver protection against rmmod was done via the file operations table in the device descriptor. On device disconnection while streaming, the device structure was freed at close time, and the module_put still used the module name in the freed area. Now, explicit module get/put are done on open and close. Signed-off-by: Jean-Francois Moine Signed-off-by: Mauro Carvalho Chehab commit 98522a7be97f2b23451342e36c39f412f0461e24 Author: Jean-Francois Moine Date: Tue Nov 18 06:33:08 2008 -0300 V4L/DVB (9689): gspca: Memory leak when disconnect while streaming. As a side effect, the sd routine stop0 is called on disconnect. This permits the subdriver to free its resources. Signed-off-by: Jean-Francois Moine Signed-off-by: Mauro Carvalho Chehab commit 3f9b5d4dda6d85aab33fef32e8351ddc34c81fb4 Merge: be542fa56b1b5b269a70b4df219d0cbd871f16d2 606572634c3faa5b32a8fc430266e6e9d78d2179 Author: Paul Mackerras Date: Mon Nov 24 11:54:08 2008 +1100 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/jk/spufs into merge commit be542fa56b1b5b269a70b4df219d0cbd871f16d2 Merge: 11bac8a026dd38380b52a914ec9bf65fb2ad13e2 6612d9b0b8208c2ade3a16b8302a271ec81d45f6 Author: Paul Mackerras Date: Mon Nov 24 11:53:58 2008 +1100 Merge branch 'merge' of ssh://master.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx into merge commit 11bac8a026dd38380b52a914ec9bf65fb2ad13e2 Merge: e871809cccc11aaa072afaf746f8fd946d2d9cac c8d698849e135780738c2cb08f07f06eda982a8c Author: Paul Mackerras Date: Mon Nov 24 11:53:44 2008 +1100 Merge branch 'merge' of git://git.secretlab.ca/git/linux-2.6-mpc52xx into merge commit fb91ee6cf5b8be5360acec577458e29ec7e97e5e Author: Pekka Paalanen Date: Sun Nov 23 21:24:59 2008 +0200 tracing, doc: update mmiotrace documentation Impact: update documentation Update to reflect the current state of the tracing framework: - "none" tracer has been replaced by "nop" tracer - tracing_enabled must be toggled when changing buffer size Signed-off-by: Pekka Paalanen Signed-off-by: Ingo Molnar commit 7ee1768ddb3075ae3a0801cc2d0ea4195530a7db Author: Pekka Paalanen Date: Sun Nov 23 21:24:30 2008 +0200 x86, mmiotrace: fix buffer overrun detection Impact: fix mmiotrace overrun tracing When ftrace framework moved to use the ring buffer facility, the buffer overrun detection was broken after 2.6.27 by commit | commit 3928a8a2d98081d1bc3c0a84a2d70e29b90ecf1c | Author: Steven Rostedt | Date: Mon Sep 29 23:02:41 2008 -0400 | | ftrace: make work with new ring buffer | | This patch ports ftrace over to the new ring buffer. The detection is now fixed by using the ring buffer API. When mmiotrace detects a buffer overrun, it will report the number of lost events. People reading an mmiotrace log must know if something was missed, otherwise the data may not make sense. Signed-off-by: Pekka Paalanen Acked-by: Steven Rostedt Signed-off-by: Ingo Molnar commit 47fd6f7c94e15eb5f97dd1cbb0427a46b03c8185 Author: Jaya Kumar Date: Tue Nov 18 02:32:36 2008 +0100 [ARM] 5335/1: pxa25x_udc: Fix is_vbus_present to return 1 or 0 the use of is_blah() suggests a 1 or 0 return. This assumption is made in pxa25x_udc code such as: dev->vbus = is_vbus_present(); where dev->vbus is a bitfield. This fix allows pxa25x_udc_probe to correctly detect vbus. Other changes were to make its use consistent in the rest of the code. Signed-off-by: Jaya Kumar Signed-off-by: Russell King commit 86bbc2c235e500957b213e7e64ce2e0ccb8bc131 Author: Ian Campbell Date: Fri Nov 21 10:21:33 2008 +0000 xen: pin correct PGD on suspend Impact: fix Xen guest boot failure commit eefb47f6a1e855653d275cb90592a3587ea93a09 ("xen: use spin_lock_nest_lock when pinning a pagetable") changed xen_pgd_walk to walk over mm->pgd rather than taking pgd as an argument. This breaks xen_mm_(un)pin_all() because it makes init_mm.pgd readonly instead of the pgd we are interested in and therefore the pin subsequently fails. (XEN) mm.c:2280:d15 Bad type (saw 00000000e8000001 != exp 0000000060000000) for mfn bc464 (pfn 21ca7) (XEN) mm.c:2665:d15 Error while pinning mfn bc464 [ 14.586913] 1 multicall(s) failed: cpu 0 [ 14.586926] Pid: 14, comm: kstop/0 Not tainted 2.6.28-rc5-x86_32p-xenU-00172-gee2f6cc #200 [ 14.586940] Call Trace: [ 14.586955] [] ? printk+0x18/0x1e [ 14.586972] [] xen_mc_flush+0x163/0x1d0 [ 14.586986] [] __xen_pgd_pin+0xa1/0x110 [ 14.587000] [] ? stop_cpu+0x0/0xf0 [ 14.587015] [] xen_mm_pin_all+0x4b/0x70 [ 14.587029] [] xen_suspend+0x39/0xe0 [ 14.587042] [] ? stop_cpu+0x0/0xf0 [ 14.587054] [] stop_cpu+0x9d/0xf0 [ 14.587067] [] run_workqueue+0x8d/0x150 [ 14.587080] [] ? _spin_unlock_irqrestore+0x23/0x40 [ 14.587094] [] ? prepare_to_wait+0x3a/0x70 [ 14.587107] [] worker_thread+0x88/0xf0 [ 14.587120] [] ? autoremove_wake_function+0x0/0x50 [ 14.587133] [] ? worker_thread+0x0/0xf0 [ 14.587146] [] kthread+0x3c/0x70 [ 14.587157] [] ? kthread+0x0/0x70 [ 14.587170] [] kernel_thread_helper+0x7/0x10 [ 14.587181] call 1/3: op=14 arg=[c0415000] result=0 [ 14.587192] call 2/3: op=14 arg=[e1ca2000] result=0 [ 14.587204] call 3/3: op=26 arg=[c1808860] result=-22 Signed-off-by: Ian Campbell Acked-by: Jeremy Fitzhardinge Signed-off-by: Ingo Molnar commit 3d994e107694381f5b8b2f5cd9fdc4fcf04a5b79 Merge: a1967d64414dab500e86cbbddf8eae6ad2047903 a4a16beadea041ab601e65b264b568e8b6b4f68d Author: Ingo Molnar Date: Sun Nov 23 12:16:57 2008 +0100 Merge branch 'oprofile-for-tip' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into x86/urgent commit fde5be353e872fe6088d2b1951e56cdfda2042ff Author: Jiri Slaby Date: Sun Nov 23 12:03:20 2008 +0100 HID: remove setup mutex, fix possible deadlock It causes recursive locking warning and is unneeded after introduction of STARTED flag. * Resume vs. stop is effectively solved by DISCONNECT flag. * No problem in suspend vs. start -- urb is submitted even after open which is possible after connect which is called after start. * Resume vs. start solved by STARTED flag. * Suspend vs. stop -- no problem in killing urb and timer twice. Reported-by: Alan Stern Signed-off-by: Jiri Slaby Signed-off-by: Jiri Kosina commit a1967d64414dab500e86cbbddf8eae6ad2047903 Author: Thomas Gleixner Date: Fri Nov 21 11:16:48 2008 -0800 x86: revert irq number limitation Impact: fix MSIx not enough irq numbers available regression The manual revert of the sparse_irq patches missed to bring the number of possible irqs back to the .27 status. This resulted in a regression when two multichannel network cards were placed in a system with only one IO_APIC - causing the networking driver to not have the right IRQ and the device not coming up. Remove the dynamic allocation logic leftovers and simply return NR_IRQS in probe_nr_irqs() for now. Fixes: http://lkml.org/lkml/2008/11/19/354 Reported-by: Jesper Dangaard Brouer Signed-off-by: Thomas Gleixner Tested-by: Jesper Dangaard Brouer Acked-by: Yinghai Lu Signed-off-by: Ingo Molnar commit 2ed1cdcf9a83205d1343f29b630abff232eaa72c Author: Randy Dunlap Date: Fri Nov 21 16:59:57 2008 -0800 irq.h: fix missing/extra kernel-doc Impact: fix kernel-doc build Fix missing & excess irq.h kernel-doc: Warning(include/linux/irq.h:182): No description found for parameter 'irq' Warning(include/linux/irq.h:182): Excess struct/union/enum/typedef member 'affinity_entry' description in 'irq_desc' Signed-off-by: Randy Dunlap Cc: Andrew Morton Signed-off-by: Ingo Molnar commit 9f1441644213e5f6faa150206399fe511eba2eb6 Merge: 3ff68a6a106c362a6811d3e51bced58e6fc87de7 13d428afc007fcfcd6deeb215618f54cf9c0cae6 Author: Ingo Molnar Date: Sun Nov 23 10:52:33 2008 +0100 Merge commit 'v2.6.28-rc6' into irq/urgent commit 844c6f6a36984c5fe1bcc2d68a88f2ed212d1eef Author: Robert Jarzmik Date: Mon Nov 17 20:29:04 2008 +0100 [ARM] pxa/MioA701: bluetooth resume fix The G3IPL expects the value at RAM address 0xa020b020 to be exactly 1 to setup the bluetooth GPIOs properly. The actual code got a value from gpio_get_value() which was not 1, but a "not equal to 0" integer. Signed-off-by: Robert Jarzmik Acked-by: Russell King Signed-off-by: Eric Miao commit 999f6338780fa0577b6581941c697c868d1ec2d3 Author: Robert Jarzmik Date: Mon Nov 17 20:29:03 2008 +0100 [ARM] pxa/MioA701: fix memory corruption. In the resume bootstrap, the early disable address is wrong. Fix it to RAM address 0xa020b000 instead of 0xa0200000, and make it consistent with RESUME_ENABLE_ADDR in mioa701.c. Signed-off-by: Robert Jarzmik Acked-by: Russell King Signed-off-by: Eric Miao commit 57550b27ff5a13b00370fbfa34f2471c3456a41d Merge: bfe085f62f98a49e1b864e4950389c7205174e4f 13d428afc007fcfcd6deeb215618f54cf9c0cae6 Author: Ingo Molnar Date: Fri Nov 21 20:55:09 2008 +0100 Merge commit 'v2.6.28-rc6' into x86/urgent commit b0788caf7af773b6c2374590dabd3a205f0918a8 Author: Li Zefan Date: Fri Nov 21 15:57:32 2008 +0800 lockdep: consistent alignement for lockdep info Impact: prettify /proc/lockdep_info Just feel odd that not all lines of lockdep info are aligned. Signed-off-by: Li Zefan Acked-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 522a110b42b306d696cf84e34c677ed0e7080194 Author: Liming Wang Date: Fri Nov 21 11:00:18 2008 +0800 function tracing: fix wrong position computing of stack_trace Impact: make output of stack_trace complete if buffer overruns When read buffer overruns, the output of stack_trace isn't complete. When printing records with seq_printf in t_show, if the read buffer has overruned by the current record, then this record won't be printed to user space through read buffer, it will just be dropped in this printing. When next printing, t_start should return the "*pos"th record, which is the one dropped by previous printing, but it just returns (m->private + *pos)th record. Here we use a more sane method to implement seq_operations which can be found in kernel code. Thus we needn't initialize m->private. About testing, it's not easy to overrun read buffer, but we can use seq_printf to print more padding bytes in t_show, then it's easy to check whether or not records are lost. This commit has been tested on both condition of overrun and non overrun. Signed-off-by: Liming Wang Acked-by: Steven Rostedt Signed-off-by: Ingo Molnar commit c879c634c928223765cf50103ddaf32f2a55fed0 Merge: ef71b1b87521ff93ed77b3e8f3e149afb392761c b0fc5e043401df4cd243352f1030c4d23e767347 a39c4ad1089be34d8dc66e926e93a52c44993a0a Author: Takashi Iwai Date: Fri Nov 21 08:39:36 2008 +0100 Merge branches 'topic/fix/hda' and 'topic/fix/sound-core' into for-linus commit b0fc5e043401df4cd243352f1030c4d23e767347 Author: Takashi Iwai Date: Fri Nov 21 08:37:03 2008 +0100 ALSA: hda - Add a quirk for Dell Studio 15 Added the matching model=dell-m6 for Dell Studio 15 laptop. Signed-off-by: Takashi Iwai commit 3a7abfd2ba26479615b81ac5e90d0122ef7f9fe0 Author: Matthew Ranostay Date: Thu Nov 20 21:21:43 2008 -0500 ALSA: hda: Add STAC_DELL_M4_3 quirk Added STAC_DELL_M4_3 quirk for Dell systems, also reorganized the board config switch to assign number of digital muxes, microphones, and SPDIF muxes via the PCI quirk defined. Signed-off-by: Matthew Ranostay Signed-off-by: Takashi Iwai commit a39c4ad1089be34d8dc66e926e93a52c44993a0a Author: Hannes Eder Date: Thu Nov 20 21:25:25 2008 +0100 sound/sound_core: Fix sparse warnings Fix the following sparse warnings: sound/sound_core.c:460:2: warning: returning void-valued expression sound/sound_core.c:477:2: warning: returning void-valued expression sound/sound_core.c:510:5: warning: symbol 'soundcore_open' was not declared. Should it be static? Signed-off-by: Hannes Eder Signed-off-by: Takashi Iwai commit 606572634c3faa5b32a8fc430266e6e9d78d2179 Author: Jeremy Kerr Date: Tue Nov 11 10:22:22 2008 +1100 powerpc/spufs: Fix spinning in spufs_ps_fault on signal Currently, we can end up in an infinite loop if we get a signal while the kernel has faulted in spufs_ps_fault. Eg: alarm(1); write(fd, some_spu_psmap_register_address, 4); - the write's copy_from_user will fault on the ps mapping, and signal_pending will be non-zero. Because returning from the fault handler will never clear TIF_SIGPENDING, so we'll just keep faulting, resulting in an unkillable process using 100% of CPU. This change returns VM_FAULT_SIGBUS if there's a fatal signal pending, letting us escape the loop. Signed-off-by: Jeremy Kerr commit 818a557eeb9c16a9a2dc93df348b0ff68fbc487f Author: Mauro Carvalho Chehab Date: Thu Nov 20 10:30:26 2008 -0300 V4L/DVB (9668): em28xx: fix a race condition with hald Newer versions of hald tries to open it to call QUERYCAP. Due to the lack of a proper locking, it is possible to open the device before it finishes initialization. This patch adds a lock to avoid this risk, and to protect the list of em28xx devices. While here, remove the uneeded BKL lock. Signed-off-by: Mauro Carvalho Chehab commit cce257109f534b4954a5d04aa4ba6905f4682f93 Author: Jose Alberto Reguero Date: Thu Nov 13 14:14:18 2008 -0300 V4L/DVB (9664): af9015: don't reconnect device in USB-bus Don't reconnect device in the USB-bus. Reconnect command was not executed every time by device firmware and that causes harm. Reconnection is not needed so remove it. Signed-off-by: Jose Alberto Reguero Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab commit f2a2e4910502e866833732f31ee697d15b3e56fd Author: Mauro Carvalho Chehab Date: Wed Nov 19 06:17:44 2008 -0300 V4L/DVB (9647): em28xx: void having two concurrent control URB's Now that we have a polling task for IR, there's a race condition, since IR can be polling while other operations are being doing. Also, we are now sharing the same urb_buf for both read and write control urb operations. So, we need a mutex. Thanks to Davin Heitmueller for warning me. Signed-off-by: Mauro Carvalho Chehab commit c4a98793a63c423c9e1af51822325969e23c16d4 Author: Mauro Carvalho Chehab Date: Tue Nov 18 14:51:08 2008 -0300 V4L/DVB (9646): em28xx: avoid allocating/dealocating memory on every control urb Before this patch, every register setup on em28xx were dynamically allocating a temporary buffer for control URB's to be handled. To avoid this ping-pong, use, instead a pre-allocated buffer. Also, be sure that read control URB's also use the buffer, instead of relying on a stack buffer. Signed-off-by: Mauro Carvalho Chehab commit 625ff1679456d8adb9af0c980394ea3954e727a8 Author: Mauro Carvalho Chehab Date: Tue Nov 18 10:23:19 2008 -0300 V4L/DVB (9645): em28xx: Avoid memory leaks if registration fails em28xx_init_dev() has some error conditions that are not properly de-allocating dev var, nor freeing the device number for a future usage. Signed-off-by: Mauro Carvalho Chehab commit 0253fdcd8aec2f954c2950a7454c0a2f3207e9a1 Author: Matthew Ranostay Date: Sun Nov 16 11:42:34 2008 -0500 ALSA: hda: STAC_DELL_M6 EAPD Add support for EAPD on system suspend and disabling EAPD on headphone jack detection for STAC_DELL_M6 laptops. This patch fixes the regressions, the silent output on HP of some Dell laptops (see Novell bnc#446025): https://bugzilla.novell.com/show_bug.cgi?id=446025 Signed-off-by: Matthew Ranostay Signed-off-by: Takashi Iwai commit bfe085f62f98a49e1b864e4950389c7205174e4f Author: Rakib Mullick Date: Thu Nov 20 19:12:50 2008 +0600 x86: fixing __cpuinit/__init tangle, xsave_cntxt_init() Annotate xsave_cntxt_init() as "can be called outside of __init". Signed-off-by: Rakib Mullick Signed-off-by: Ingo Molnar commit 9bc646f163b136684390081262fab0fd8f5343ca Author: Rakib Mullick Date: Thu Nov 20 19:08:45 2008 +0600 x86: fix __cpuinit/__init tangle in init_thread_xstate() Impact: fix incorrect __init annotation This patch removes the following section mismatch warning. A patch set was send previously (http://lkml.org/lkml/2008/11/10/407). But introduce some other problem, reported by Rufus (http://lkml.org/lkml/2008/11/11/46). Then Ingo Molnar suggest that, it's best to remove __init from xsave_cntxt_init(void). Which is the second patch in this series. Now, this one removes the following warning. WARNING: arch/x86/kernel/built-in.o(.cpuinit.text+0x2237): Section mismatch in reference from the function cpu_init() to the function .init.text:init_thread_xstate() The function __cpuinit cpu_init() references a function __init init_thread_xstate(). If init_thread_xstate is only used by cpu_init then annotate init_thread_xstate with a matching annotation. Signed-off-by: Rakib Mullick Signed-off-by: Ingo Molnar commit 578f3a35fecabff49bad808c5301313f785b5462 Author: Jiri Kosina Date: Thu Nov 20 15:55:38 2008 +0100 HID: add USB ID for another dual gameron adapter 0x0810/0x0002 needs the very same handling as 0x0001. Reported-by: Steve Conklin Signed-off-by: Jiri Kosina commit 06d2148ed3b3fa997fa5a848f6405709c464b3ba Author: Jiri Kosina Date: Thu Nov 20 11:22:17 2008 +0100 HID: unignore mouse on unibody macbooks In commit a96d6ef34, the mouse interfaces on the unibody macbooks were put into hid mouse ignore list. This was a little bit too premature though, as the corresponding bcm5974 changes are scheduled for 2.6.29. Remove these devices from the ignore list for now, in order to provide at least basic functionality with the HID driver. Will be reintroduced in 2.6.29 Reported-by: Henrik Rydberg Signed-off-by: Jiri Kosina commit 5f4ba04ffd8fc9f6b15b92270ef0517ae52dcf3a Author: Dmitry Torokhov Date: Fri Nov 14 13:32:42 2008 -0500 Input: i8042 - add Compal Hel80 laptop to nomux blacklist Reported-by: Jaime Cura Signed-off-by: Dmitry Torokhov commit e871809cccc11aaa072afaf746f8fd946d2d9cac Author: Michael Barkowski Date: Thu Nov 13 10:18:28 2008 -0500 powerpc/mpc832x_rdb: fix swapped ethernet ids ethernet0 (called FSL UEC0 in U-Boot) should be enet1 (UCC3/eth1), and ethernet1 should be enet0 (UCC2/eth0), to be consistent with U-Boot so that the interfaces do not swap addresses when control passes from U-Boot to the kernel. Signed-off-by: Michael Barkowski Acked-by: Kim Phillips Signed-off-by: Kumar Gala commit 06597aa90a75621639dcaaf5fc07bcb01f752d45 Author: Martyn Welch Date: Tue Nov 18 10:55:45 2008 +0000 powerpc: Use generic PHY driver for Marvell 88E1111 PHY on GE Fanuc SBC610 The Marvell PHY driver is currently being used for the 88E1111 on the SBC610. This driver is causing the link to run in 10/Half mode, the generic PHY driver is correctly configuring the PHY as 1000/Full. Edit default config to use generic PHY driver. Signed-off-by: Martyn Welch Signed-off-by: Kumar Gala commit f464ff581c247d82fcc0e7ef40c1ca6df9739068 Author: Trent Piepho Date: Wed Nov 19 10:40:55 2008 -0800 powerpc/85xx: L2 cache size wrong in 8572DS dts It's 1MB, not 512KB. Newer U-Boots will fix this entry, but that's no reason to have the wrong value in the dts. Signed-off-by: Trent Piepho Signed-off-by: Kumar Gala commit a4a16beadea041ab601e65b264b568e8b6b4f68d Author: Eric Dumazet Date: Mon Nov 10 09:05:37 2008 +0100 oprofile: fix an overflow in ppro code reset_value was changed from long to u64 in commit b99170288421c79f0c2efa8b33e26e65f4bb7fb8 (oprofile: Implement Intel architectural perfmon support) But dynamic allocation of this array use a wrong type (long instead of u64) Cc: Andi Kleen Signed-off-by: Eric Dumazet Signed-off-by: Robert Richter commit 99afb989b05b9fb1c7b3831ce4b7a000b214acdb Author: Devin Heitmueller Date: Sat Nov 15 07:13:07 2008 -0300 V4L/DVB (9639): Make dib0700 remote control support work with firmware v1.20 The format for reading the IR controller changed in firmware 1.20. It now provides the events on bulk endpoint 1 instead of using a control request. Support the new format, providing backward compatibility for users who might be using older firmware. Thanks to Patrick Boettcher for providing the required information on how the version 1.20 firmware works. Signed-off-by: Devin Heitmueller Signed-off-by: Patrick Boettcher Signed-off-by: Mauro Carvalho Chehab commit deaf53e3c8e717169669ee6c2594b5c33d1af93b Author: Harvey Harrison Date: Sat Nov 15 01:10:14 2008 -0300 V4L/DVB (9635): v4l: s2255drv fix firmware test on big-endian Noticed by sparse: drivers/media/video/s2255drv.c:2531:6: warning: restricted __le32 degrades to integer Cc: Dean Anderson Signed-off-by: Harvey Harrison Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab commit 41286d972530b7a47acb48376d714b6b121a6c22 Author: Devin Heitmueller Date: Sun Nov 16 00:44:52 2008 -0300 V4L/DVB (9634): Make sure the i2c gate is open before powering down tuner It is not safe to assume that the i2c gate will be open before issuing the command to power down the tuner. In fact, many demods only open the gate long enough to issue the tuning command. This fix allows power management to work properly for those tuners behind an i2c gate (in my case the problem was with the HVR-950Q) Signed-off-by: Devin Heitmueller Signed-off-by: Mauro Carvalho Chehab commit 3f9b46c154da5ec4facca88f82d1820eb329fd3e Author: Devin Heitmueller Date: Sat Nov 15 17:16:11 2008 -0300 V4L/DVB (9632): make em28xx aux audio input work The attached patch makes the em28xx auxillary audio input work. Tested with the HVR-950. em28xx: make auxillary audio input work The tuner audio input was working but the aux input wasn't. Tested with the HVR-950. Signed-off-by: Devin Heitmueller Signed-off-by: Mauro Carvalho Chehab commit 3fa37deb1a287e100c7db5b4f964784fd664bee9 Author: Devin Heitmueller Date: Sun Nov 16 00:33:32 2008 -0300 V4L/DVB (9631): Make s2api work for ATSC support ATSC should be considered a legacy delivery system, or else fields such as p->u.vsb.modulation do not get populated (resulting in set_frontend failures) Cc: Steven Toth Signed-off-by: Devin Heitmueller Signed-off-by: Mauro Carvalho Chehab commit c41109fc9a13c6af0e4069dd92fdb4c5c8046649 Author: Mauro Carvalho Chehab Date: Sat Nov 15 23:44:14 2008 -0300 V4L/DVB (9627): em28xx: Avoid i2c register error for boards without eeprom Signed-off-by: Mauro Carvalho Chehab commit df4533af7f45e87a4be470502fa3cea2f6c96da9 Author: Igor M. Liplianin Date: Tue Nov 11 18:09:28 2008 -0300 V4L/DVB (9608): Fix section mismatch warning for dm1105 during make -- Signed-off-by: Igor M. Liplianin Signed-off-by: Mauro Carvalho Chehab commit 4faf1004c32819035c5325879a466f27e189feb5 Author: Douglas Schilling Landgraf Date: Tue Nov 11 23:56:56 2008 -0300 V4L/DVB (9605): usb-urb: fix memory leak Free allocated memory Signed-off-by: Douglas Schilling Landgraf Signed-off-by: Mauro Carvalho Chehab commit 7935eeae793ff24e2d6053a9df63be71323ad634 Author: Douglas Schilling Landgraf Date: Tue Nov 11 23:47:57 2008 -0300 V4L/DVB (9604): ttusb_dec: fix memory leak Free allocated memory Signed-off-by: Douglas Schilling Landgraf Signed-off-by: Mauro Carvalho Chehab commit b7ed785b5f6a8dbdbd0cf8688a51c42e35205a4e Author: Douglas Schilling Landgraf Date: Tue Nov 11 23:37:39 2008 -0300 V4L/DVB (9603): dvb-ttusb-budget: Add validation for ttusb_alloc_iso_urbs Added validation for ttusb_alloc_iso_urbs Signed-off-by: Douglas Schilling Landgraf Signed-off-by: Mauro Carvalho Chehab commit 11eb260a70b992b83fa2d15bb777cda3ee326c05 Author: Douglas Schilling Landgraf Date: Tue Nov 11 23:30:49 2008 -0300 V4L/DVB (9602): dvb-ttusb-budget: Add NULL pointer validation Added validation for NULL pointer Signed-off-by: Douglas Schilling Landgraf Signed-off-by: Mauro Carvalho Chehab commit d7c31a1e754b5140eefeeb10c3c3be17f3702452 Author: Douglas Schilling Landgraf Date: Tue Nov 11 23:27:59 2008 -0300 V4L/DVB (9601): ttusb_dec: Add NULL pointer validation Added validation for NULL pointer Signed-off-by: Douglas Schilling Landgraf Signed-off-by: Mauro Carvalho Chehab commit 5181e594512faeac7d7fd9620ce91105f45bf643 Author: Jiri Kosina Date: Mon Nov 17 01:44:38 2008 +0100 HID: fix blacklist entries for greenasia/pantherlord Fix misplaced quirk entries for devices driven by hid-pl driver. The devices shouls be only blacklisted by generic HID driver, not completely ignored. Signed-off-by: Jiri Kosina commit c8d698849e135780738c2cb08f07f06eda982a8c Author: Grant Likely Date: Fri Nov 14 11:10:55 2008 -0700 powerpc/virtex: Update defconfigs Update defconfigs for running on Xilinx Virtex platforms Signed-off-by: Grant Likely commit c7c2ffb4fb92ad79e842226aa547adb5bd045b86 Author: Grant Likely Date: Fri Nov 14 10:22:02 2008 -0700 powerpc/52xx: update defconfigs Signed-off-by: Grant Likely commit c14464bf796d5ead1e735225ead78c566d3344ae Author: Yuri Tikhonov Date: Fri Nov 14 10:21:57 2008 -0700 xsysace: Fix driver to use resource_size_t instead of unsigned long This patch is a bug fix to the SystemACE driver to use resource_size_t for physical address instead of unsigned long. This makes the driver work correctly on 32 bit systems with 64-bit resources (e.g. PowerPC 440). Signed-off-by: Yuri Tikhonov Signed-off-by: Ilya Yanok Signed-off-by: Grant Likely commit a108096878aa6cb744b5280ca59395b6c0152d14 Author: Grant Likely Date: Fri Nov 14 09:59:48 2008 -0700 powerpc/virtex: fix various format/casting printk mismatches Various printk format string in code used by the Xilinx Virtex platform are not 32-bit/64-bit safe. Add correct casting to fix the bugs. Reported-by: Josh Boyer Signed-off-by: Grant Likely Acked-by: Josh Boyer commit 847cdf42d589882aca683b6fb65b2c7832e92231 Author: Grant Likely Date: Fri Nov 14 05:19:00 2008 -0700 powerpc/mpc5200: fix bestcomm Kconfig dependencies Without this patch it is possible to select drivers which require bestcomm support without bestcomm support being selected. This patch reworks the bestcomm dependencies to ensure the correct bestcomm tasks are always enabled. Reported-by: Hans Lehmann Signed-off-by: Grant Likely commit 6612d9b0b8208c2ade3a16b8302a271ec81d45f6 Author: Benjamin Herrenschmidt Date: Tue Nov 11 16:02:43 2008 +0000 powerpc/44x: Fix 460EX/460GT machine check handling Those cores use the 440A type machine check (ie, they have MCSRR0/MCSRR1). They thus need to call the appropriate fixup function to hook the right variant of the exception. Without this, all machine checks become fatal due to loss of context when entering the exception handler. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Josh Boyer commit 5907630ffc2b2d133de2db18963ee5a6c5af7878 Author: Grant Erickson Date: Wed Oct 29 11:41:14 2008 +0000 powerpc/40x: Limit allocable DRAM during early mapping If the size of DRAM is not an exact power of two, we may not have covered DRAM in its entirety with large 16 and 4 MiB pages. If that is the case, we can get non-recoverable page faults when doing the final PTE mappings for the non-large page PTEs. Consequently, we restrict the top end of DRAM currently allocable by updating '__initial_memory_limit_addr' so that calls to the LMB to allocate PTEs for "tail" coverage with normal-sized pages (or other reasons) do not attempt to allocate outside the allowed range. Signed-off-by: Grant Erickson Signed-off-by: Josh Boyer commit 3ff68a6a106c362a6811d3e51bced58e6fc87de7 Author: Mark Nelson Date: Thu Nov 13 21:37:41 2008 +1100 genirq: __irq_set_trigger: change pr_warning to pr_debug Commit 0c5d1eb77a8be917b638344a22afe1398236482b (genirq: record trigger type) caused powerpc platforms that had no set_type() function in their struct irq_chip to spew out warnings about "No set_type function for IRQ...". This warning isn't necessarily justified though because the generic powerpc platform code calls set_irq_type() (which in turn calls __irq_set_trigger) with information from the device tree to establish the interrupt mappings, regardless of whether the PIC can actually set a type. A platform's irq_chip might not have a set_type function for a variety of reasons, for example: the platform may have the type essentially hard-coded, or as in the case for Cell interrupts are just messages past around that have no real concept of type, or the platform could even have a virtual PIC as on the PS3. Signed-off-by: Mark Nelson Signed-off-by: Ingo Molnar commit 734f0bae9504216bd760493ed4744a34cfe0e7ce Author: Daniel Gimpelevich Date: Tue Nov 11 13:57:30 2008 -0500 Input: cm109 - add keymap for ATCom AU-100 phone Signed-off-by: Daniel Gimpelevich Signed-off-by: Dmitry Torokhov commit 4f485447973284f73e4e7cac3ab1d1e5fcd8aece Author: Dmitri Vorobiev Date: Tue Nov 11 11:40:23 2008 -0500 Input: fix the example of an input device driver This patch fixes a wrong interrupt handler example given in the "Hello, world!"-like input driver in Documentation/input/input-programming.txt. Signed-off-by: Dmitri Vorobiev Signed-off-by: Randy Dunlap Signed-off-by: Dmitry Torokhov commit 5fb17fd9a2d05be77be91369aa2f7b0db42fc8b4 Author: Andres Salomon Date: Tue Nov 11 09:52:21 2008 -0500 Input: psmouse - fix incorrect validate_byte check in OLPC protocol The validate_byte check logic was backwards; it should return true for an *invalid* packet. Thanks to Jeremy Katz for spotting this one. Signed-off-by: Andres Salomon Signed-off-by: Dmitry Torokhov commit d6d79a785d430c0e17f7e2d662f10de022cbca93 Author: Jiri Pirko Date: Tue Nov 11 09:43:21 2008 -0500 Input: atkbd - cancel delayed work before freeing its structure Pointed out by Oleg Nesterov. Since delayed work is used here, use of flush_scheduled_work() is not sufficient in atkbd_disconnect(). It does not wait for scheduled delayed work to finish. This patch prevents delayed work to be processed after freeing atkbd structure (used struct delayed_work is part of atkbd) by cancelling this delayed work. Signed-off-by: Jiri Pirko Signed-off-by: Dmitry Torokhov commit a8215b81cc31cf267506bc6a4a4bfe93f4ca1652 Author: Matthew Garrett Date: Tue Nov 11 09:40:42 2008 -0500 Input: atkbd - add keymap quirk for Inventec Symphony systems The Zepto 6615WD laptop (rebranded Inventec Symphony system) needs a key release quirk for its volume keys to work. The attached patch adds the quirk to the atkbd driver. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=460237 Signed-off-by: Matthew Garrett Signed-off-by: Adel Gadllah Signed-off-by: Dmitry Torokhov commit 786b11cc0f505e44c29f778fd329dafafafed76c Author: Herton Ronaldo Krzesinski Date: Tue Nov 11 09:37:14 2008 -0500 Input: i8042 - add Dell XPS M1530 to nomux list Dell XPS M1530 needs i8042.nomux=1 for ALPS touchpad to work as reported on https://qa.mandriva.com/show_bug.cgi?id=43532 It is said that before A08 bios version this isn't needed (I don't have the hardware so can't check), and suppose this will not break with bios versions before A08. Signed-off-by: Herton Ronaldo Krzesinski Tested-by: Andreas Ericsson Signed-off-by: Dmitry Torokhov commit f131e2436ddbac2527bb2d6297a823aae4b024f8 Author: Ingo Molnar Date: Sat Nov 8 09:57:40 2008 +0100 irq: fix typo Impact: build fix fix build failure on UP. Signed-off-by: Ingo Molnar commit 6c2e94033df5ca11149e52dd179b8dde3172e9bf Author: Thomas Gleixner Date: Fri Nov 7 12:33:49 2008 +0100 x86: apic honour irq affinity which was set in early boot setup_ioapic_dest() is called after the non boot cpus have been brought up. It sets the irq affinity of all already configured interrupts to all cpus and ignores affinity settings which were done by the early bootup code. If the IRQ_NO_BALANCING or IRQ_AFFINITY_SET flags are set then use the affinity mask from the irq descriptor and not TARGET_CPUS. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar commit 612e3684c1b7752d2890510e4f90115fd1eb2afb Author: Thomas Gleixner Date: Fri Nov 7 13:58:46 2008 +0100 genirq: fix the affinity setting in setup_irq The affinity setting in setup irq is called before the NO_BALANCING flag is checked and might therefore override affinity settings from the calling code with the default setting. Move the NO_BALANCING flag check before the call to the affinity setting. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar commit f6d87f4bd259cf33e092cd1a8fde05f291c47af1 Author: Thomas Gleixner Date: Fri Nov 7 13:18:30 2008 +0100 genirq: keep affinities set from userspace across free/request_irq() Impact: preserve user-modified affinities on interrupts Kumar Galak noticed that commit 18404756765c713a0be4eb1082920c04822ce588 (genirq: Expose default irq affinity mask (take 3)) overrides an already set affinity setting across a free / request_irq(). Happens e.g. with ifdown/ifup of a network device. Change the logic to mark the affinities as set and keep them intact. This also fixes the unlocked access to irq_desc in irq_select_affinity() when called from irq_affinity_proc_write() Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar commit 2ad49887150894b9ed6a87a76b409adceee6b074 Author: Vitaliy Gusev Date: Wed Nov 5 18:27:18 2008 +0300 UBI: Don't exit from ubi_thread until kthread_should_stop() is true If ubi_thread() exits but kthread_should_stop() is not true then kthread_stop() will never return and cleanup thread will forever stay in "D" state. Signed-off-by: Vitaliy Gusev Signed-off-by: Artem Bityutskiy commit b77bcb07897f1a9cd9d1d78691896dcdb0fd1a22 Author: Zoltan Sogor Date: Wed Oct 29 09:50:02 2008 +0100 UBI: fix EBADMSG handling 'ubi_io_read_data()' may return EBADMSG in case of an ECC error, and we should not panic because of this. We have CRC32 checksum and may check the data. So just ignore the EBADMSG error. This patch also fixes a minor spelling error at the same time. Signed-off-by: Zoltan Sogor Signed-off-by: Artem Bityutskiy commit 9a5415fbe87ad7b99ecf9b7ef6bf091c7479f2a4 Author: Vojtech Pavlik Date: Thu Oct 30 09:11:40 2008 -0400 Input: elo - fix format string in elo driver Fix typo in format string. Signed-off-by: Vojtech Pavlik Signed-off-by: Jiri Kosina Signed-off-by: Dmitry Torokhov ----------------------------------------------------------------------- Summary of changes: Documentation/DMA-API.txt | 8 +- Documentation/cpu-freq/user-guide.txt | 12 + Documentation/filesystems/ocfs2.txt | 3 - Documentation/filesystems/proc.txt | 27 + .../filesystems/ramfs-rootfs-initramfs.txt | 12 +- Documentation/input/input-programming.txt | 3 +- Documentation/sound/alsa/ALSA-Configuration.txt | 5 +- Documentation/spi/spi-summary | 2 +- Documentation/tracers/mmiotrace.txt | 6 +- Makefile | 4 +- arch/Kconfig | 2 - arch/alpha/kernel/pci.c | 2 +- arch/alpha/kernel/smp.c | 6 +- arch/alpha/kernel/traps.c | 4 +- arch/arm/configs/corgi_defconfig | 2 +- arch/arm/mach-pxa/mioa701.c | 2 +- arch/arm/mach-pxa/mioa701_bootresume.S | 1 + arch/arm/mach-pxa/palmtx.c | 150 ++++-- arch/arm/mach-pxa/pcm990-baseboard.c | 1 + arch/arm/mach-s3c2410/include/mach/spi-gpio.h | 1 + arch/arm/plat-omap/gpio.c | 5 +- arch/arm/plat-omap/include/mach/pm.h | 2 +- arch/frv/kernel/sys_frv.c | 17 +- arch/ia64/include/asm/ptrace.h | 2 - arch/ia64/sn/kernel/io_init.c | 2 +- arch/m32r/kernel/head.S | 4 +- arch/m32r/kernel/vmlinux.lds.S | 1 + arch/mips/include/asm/bug.h | 29 +- arch/mips/include/asm/ptrace.h | 4 - arch/mn10300/kernel/gdb-stub.c | 24 +- arch/parisc/include/asm/parisc-device.h | 4 +- arch/parisc/include/asm/posix_types.h | 3 +- arch/parisc/include/asm/ptrace.h | 2 - arch/parisc/kernel/drivers.c | 6 +- arch/parisc/kernel/traps.c | 43 +- arch/powerpc/boot/dts/mpc832x_rdb.dts | 4 +- arch/powerpc/boot/dts/mpc8572ds.dts | 2 +- .../virtex5_defconfig => 40x/virtex_defconfig} | 263 +++++---- arch/powerpc/configs/44x/virtex5_defconfig | 234 +++++---- arch/powerpc/configs/52xx/cm5200_defconfig | 169 +++++-- arch/powerpc/configs/52xx/lite5200b_defconfig | 206 ++++++-- arch/powerpc/configs/52xx/motionpro_defconfig | 168 +++++-- arch/powerpc/configs/52xx/pcm030_defconfig | 182 +++++-- arch/powerpc/configs/52xx/tqm5200_defconfig | 180 +++++-- arch/powerpc/configs/86xx/gef_sbc610_defconfig | 2 +- arch/powerpc/configs/mpc5200_defconfig | 573 +++++++++++++++----- arch/powerpc/configs/ppc40x_defconfig | 92 +++- arch/powerpc/configs/ppc44x_defconfig | 92 +++- arch/powerpc/include/asm/mmu-hash64.h | 1 - arch/powerpc/include/asm/ptrace.h | 2 - arch/powerpc/kernel/cpu_setup_44x.S | 7 +- arch/powerpc/kernel/entry_64.S | 8 +- arch/powerpc/kernel/prom_parse.c | 7 +- arch/powerpc/kernel/sysfs.c | 2 + arch/powerpc/mm/40x_mmu.c | 16 +- arch/powerpc/mm/hugetlbpage.c | 2 +- arch/powerpc/mm/numa.c | 122 +++-- arch/powerpc/platforms/cell/axon_msi.c | 36 +- arch/powerpc/platforms/cell/smp.c | 9 +- arch/powerpc/platforms/cell/spufs/file.c | 3 + arch/powerpc/sysdev/bestcomm/Kconfig | 9 +- arch/powerpc/sysdev/mpic.c | 9 +- arch/powerpc/sysdev/xilinx_intc.c | 4 +- arch/s390/defconfig | 74 ++- arch/s390/include/asm/pgtable.h | 2 - arch/s390/include/asm/ptrace.h | 4 +- arch/s390/include/asm/syscall.h | 28 +- arch/s390/kernel/asm-offsets.c | 2 +- arch/s390/kernel/compat_signal.c | 2 +- arch/s390/kernel/entry.S | 21 +- arch/s390/kernel/entry64.S | 23 +- arch/s390/kernel/init_task.c | 2 +- arch/s390/kernel/ptrace.c | 2 +- arch/s390/kernel/signal.c | 6 +- arch/s390/kernel/time.c | 13 +- arch/s390/kernel/vmlinux.lds.S | 3 +- arch/sparc/include/asm/ptrace_64.h | 2 - arch/sparc/kernel/cpu.c | 2 +- arch/sparc/kernel/head.S | 2 +- arch/sparc/kernel/smp.c | 4 +- arch/sparc/kernel/sun4d_smp.c | 4 +- arch/sparc/kernel/sun4m_smp.c | 2 +- arch/sparc/kernel/trampoline.S | 4 +- arch/sparc/kernel/vmlinux.lds.S | 1 + arch/sparc/mm/srmmu.c | 14 +- arch/sparc64/kernel/smp.c | 4 +- arch/sparc64/mm/init.c | 2 +- arch/x86/boot/tty.c | 2 +- arch/x86/include/asm/ds.h | 6 +- arch/x86/include/asm/pci_64.h | 14 - arch/x86/include/asm/ptrace.h | 2 - arch/x86/kernel/Makefile | 2 +- arch/x86/kernel/apic.c | 2 +- arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 18 +- arch/x86/kernel/cpu/cpufreq/powernow-k8.h | 17 +- arch/x86/kernel/ds.c | 88 ++-- arch/x86/kernel/i387.c | 2 +- arch/x86/kernel/io_apic.c | 48 +- arch/x86/kernel/kvmclock.c | 2 +- arch/x86/kernel/pci-calgary_64.c | 2 +- arch/x86/kernel/xsave.c | 2 +- arch/x86/oprofile/op_model_ppro.c | 2 +- arch/x86/pci/fixup.c | 25 +- arch/x86/xen/mmu.c | 21 +- arch/x86/xen/smp.c | 2 +- arch/x86/xen/xen-ops.h | 2 +- drivers/acpi/battery.c | 9 + drivers/acpi/blacklist.c | 401 +-------------- drivers/acpi/ec.c | 3 +- drivers/acpi/osl.c | 104 +--- drivers/acpi/scan.c | 10 - drivers/acpi/sleep/main.c | 40 ++- drivers/acpi/toshiba_acpi.c | 2 - drivers/acpi/utils.c | 16 +- drivers/ata/ata_piix.c | 15 + drivers/ata/libata-core.c | 21 + drivers/ata/pata_rb532_cf.c | 15 +- drivers/block/xsysace.c | 23 +- drivers/char/agp/uninorth-agp.c | 2 +- drivers/char/istallion.c | 4 +- drivers/char/tty_io.c | 15 +- drivers/char/xilinx_hwicap/xilinx_hwicap.c | 9 +- drivers/crypto/talitos.c | 4 +- drivers/edac/i82875p_edac.c | 14 +- drivers/firewire/fw-sbp2.c | 5 + drivers/gpu/drm/drm_drv.c | 2 + drivers/gpu/drm/drm_irq.c | 4 +- drivers/gpu/drm/i915/i915_dma.c | 7 + drivers/gpu/drm/i915/i915_drv.h | 11 + drivers/gpu/drm/i915/i915_gem.c | 74 ++-- drivers/gpu/drm/i915/i915_irq.c | 293 ++++++----- drivers/gpu/drm/i915/i915_opregion.c | 18 +- drivers/gpu/drm/i915/i915_suspend.c | 6 + drivers/gpu/drm/mga/mga_dma.c | 8 + drivers/gpu/drm/mga/mga_irq.c | 5 - drivers/gpu/drm/r128/r128_drv.c | 6 + drivers/gpu/drm/r128/r128_drv.h | 1 + drivers/gpu/drm/r128/r128_irq.c | 2 +- drivers/gpu/drm/radeon/radeon_cp.c | 6 + drivers/gpu/drm/radeon/radeon_irq.c | 5 - drivers/gpu/drm/via/via_irq.c | 1 - drivers/gpu/drm/via/via_map.c | 11 +- drivers/hid/hid-apple.c | 6 +- drivers/hid/hid-core.c | 14 +- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-pl.c | 2 + drivers/hid/usbhid/hid-core.c | 18 +- drivers/hid/usbhid/usbhid.h | 1 - drivers/hwmon/applesmc.c | 1 + drivers/i2c/busses/i2c-parport.c | 4 +- drivers/i2c/chips/isp1301_omap.c | 65 ++- drivers/i2c/i2c-core.c | 2 +- drivers/ide/icside.c | 4 +- drivers/ieee1394/highlevel.c | 25 +- drivers/ieee1394/hosts.h | 4 + drivers/ieee1394/sbp2.c | 14 +- drivers/infiniband/hw/ehca/ehca_classes.h | 4 +- drivers/infiniband/hw/ehca/ehca_main.c | 3 +- drivers/infiniband/hw/ehca/ehca_qp.c | 26 +- drivers/infiniband/hw/ehca/ehca_reqs.c | 51 +- drivers/infiniband/hw/mlx4/cq.c | 5 + drivers/input/ff-memless.c | 5 +- drivers/input/keyboard/atkbd.c | 27 +- drivers/input/misc/cm109.c | 37 ++- drivers/input/mouse/hgpk.c | 2 +- drivers/input/serio/i8042-x86ia64io.h | 14 + drivers/input/tablet/wacom.h | 13 +- drivers/input/tablet/wacom_sys.c | 228 +++++++- drivers/input/tablet/wacom_wac.c | 160 +++++- drivers/input/tablet/wacom_wac.h | 4 + drivers/input/touchscreen/elo.c | 2 +- drivers/input/xen-kbdfront.c | 6 +- drivers/isdn/hisax/config.c | 16 +- drivers/macintosh/rack-meter.c | 10 +- drivers/media/dvb/dm1105/dm1105.c | 2 +- drivers/media/dvb/dvb-core/dvb_frontend.c | 5 +- drivers/media/dvb/dvb-usb/af9015.c | 8 +- drivers/media/dvb/dvb-usb/dib0700.h | 5 +- drivers/media/dvb/dvb-usb/dib0700_core.c | 16 + drivers/media/dvb/dvb-usb/dib0700_devices.c | 139 +++++- drivers/media/dvb/dvb-usb/usb-urb.c | 19 +- drivers/media/dvb/siano/sms-cards.c | 2 +- drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | 15 +- drivers/media/dvb/ttusb-dec/ttusb_dec.c | 7 + drivers/media/video/em28xx/em28xx-audio.c | 33 +- drivers/media/video/em28xx/em28xx-core.c | 58 ++- drivers/media/video/em28xx/em28xx-i2c.c | 10 +- drivers/media/video/em28xx/em28xx-video.c | 140 +++-- drivers/media/video/em28xx/em28xx.h | 6 + drivers/media/video/gspca/conex.c | 3 + drivers/media/video/gspca/finepix.c | 8 + drivers/media/video/gspca/gspca.c | 56 +- drivers/media/video/gspca/gspca.h | 6 +- drivers/media/video/gspca/pac7311.c | 3 + drivers/media/video/gspca/spca501.c | 3 + drivers/media/video/gspca/spca505.c | 4 + drivers/media/video/gspca/spca561.c | 3 + drivers/media/video/gspca/vc032x.c | 3 + drivers/media/video/gspca/zc3xx.c | 3 + drivers/media/video/s2255drv.c | 2 +- drivers/misc/sony-laptop.c | 4 +- drivers/misc/thinkpad_acpi.c | 57 ++- drivers/mtd/ubi/eba.c | 2 +- drivers/mtd/ubi/scan.c | 2 +- drivers/mtd/ubi/wl.c | 3 +- drivers/net/Kconfig | 3 +- drivers/net/ixgbe/ixgbe_main.c | 9 +- drivers/net/mlx4/main.c | 8 + drivers/net/mlx4/mlx4.h | 1 + drivers/net/mlx4/port.c | 39 ++- drivers/net/pcmcia/ibmtr_cs.c | 2 +- drivers/net/smc911x.c | 10 +- drivers/net/smc91x.c | 10 +- drivers/net/xen-netfront.c | 6 +- drivers/parport/parport_serial.c | 2 + drivers/pci/pci.c | 2 +- drivers/rapidio/rio-scan.c | 4 +- drivers/rapidio/rio.c | 2 +- drivers/scsi/advansys.c | 4 + drivers/scsi/gdth.c | 12 +- drivers/serial/uartlite.c | 4 +- drivers/spi/au1550_spi.c | 26 +- drivers/spi/mpc52xx_psc_spi.c | 5 +- drivers/spi/spi_imx.c | 25 +- drivers/spi/spi_s3c24xx_gpio.c | 3 +- drivers/spi/spidev.c | 4 +- drivers/usb/gadget/fsl_qe_udc.c | 3 + drivers/usb/gadget/fsl_usb2_udc.c | 3 + drivers/usb/gadget/pxa25x_udc.c | 14 +- drivers/usb/host/ehci-pci.c | 9 +- drivers/usb/host/ehci.h | 12 +- drivers/usb/serial/console.c | 1 + drivers/usb/serial/option.c | 35 ++ drivers/usb/storage/unusual_devs.h | 19 + drivers/video/aty/radeon_accel.c | 21 +- drivers/video/aty/radeon_base.c | 18 + drivers/video/console/fbcon.c | 9 +- drivers/video/omap/Makefile | 1 - drivers/video/omap/lcd_sx1.c | 327 ----------- drivers/video/xen-fbfront.c | 6 +- drivers/video/xilinxfb.c | 5 +- drivers/w1/masters/Kconfig | 2 +- fs/buffer.c | 1 + fs/cifs/file.c | 77 ++- fs/eventpoll.c | 85 +++- fs/ntfs/debug.h | 8 +- fs/ocfs2/buffer_head_io.c | 15 +- fs/ocfs2/dlm/dlmfs.c | 4 +- fs/ocfs2/dlm/userdlm.h | 2 +- fs/ocfs2/dlmglue.c | 3 +- fs/ocfs2/ocfs2.h | 2 +- fs/ocfs2/stack_user.c | 3 + fs/udf/inode.c | 1 + include/acpi/acpredef.h | 4 +- include/drm/drmP.h | 1 + include/linux/compat.h | 2 - include/linux/highmem.h | 2 + include/linux/idr.h | 3 +- include/linux/irq.h | 11 +- include/linux/libata.h | 1 + include/linux/memory.h | 2 +- include/linux/mlx4/device.h | 1 + include/linux/page_cgroup.h | 4 +- include/linux/sched.h | 4 + kernel/cpu.c | 2 +- kernel/cpuset.c | 2 +- kernel/irq/internals.h | 2 + kernel/irq/manage.c | 68 ++- kernel/irq/migration.c | 11 - kernel/irq/proc.c | 2 +- kernel/lockdep.c | 4 +- kernel/panic.c | 1 + kernel/profile.c | 4 +- kernel/ptrace.c | 4 +- kernel/sched.c | 5 +- kernel/sysctl.c | 10 + kernel/trace/ring_buffer.c | 2 +- kernel/trace/trace_mmiotrace.c | 16 +- kernel/trace/trace_stack.c | 24 +- lib/idr.c | 14 +- mm/memory_hotplug.c | 9 +- mm/page_cgroup.c | 56 ++- mm/slub.c | 6 +- mm/sparse.c | 2 +- mm/vmalloc.c | 20 +- mm/vmscan.c | 2 +- scripts/kernel-doc | 10 +- sound/pci/hda/hda_codec.c | 4 +- sound/pci/hda/patch_sigmatel.c | 170 ++++-- sound/soc/fsl/Kconfig | 3 +- sound/sound_core.c | 6 +- 291 files changed, 4466 insertions(+), 2755 deletions(-) copy arch/powerpc/configs/{44x/virtex5_defconfig => 40x/virtex_defconfig} (86%) delete mode 100644 drivers/video/omap/lcd_sx1.c hooks/post-receive -- XFS development tree From xfs-bounces@oss.sgi.com Mon Dec 1 23:58:53 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB25wrhe021673 for ; Mon, 1 Dec 2008 23:58:53 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: Your message to xfs awaits moderator approval From: xfs-bounces@oss.sgi.com To: xfs@oss.sgi.com Message-ID: Date: Mon, 01 Dec 2008 23:58:51 -0600 Precedence: bulk X-BeenThere: xfs@oss.sgi.com X-Mailman-Version: 2.1.9 List-Id: XFS Filesystem from SGI X-List-Administrivia: yes Sender: xfs-bounces@oss.sgi.com Errors-To: xfs-bounces@oss.sgi.com Your mail to 'xfs' with the subject [XFS updates] XFS development tree branch, mainline, updated. v2.6.28-rc3-1204-g061e41f Is being held until the list moderator can review it for approval. The reason it is being held: Message body is too big: 224117 bytes with a limit of 150 KB Either the message will get posted to the list, or you will receive notification of the moderator's decision. If you would like to cancel this posting, please visit the following URL: http://oss.sgi.com/mailman/confirm/xfs/9abcfcf4be4750f221a0062b89c20aefd1511cb0 From xaiki@oss.sgi.com Tue Dec 2 00:33:30 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB26XUWI026671 for ; Tue, 2 Dec 2008 00:33:30 -0600 Received: (from xaiki@localhost) by oss.sgi.com (8.12.11.20060308/8.12.11/Submit) id mB26XLXp026578; Tue, 2 Dec 2008 00:33:21 -0600 Date: Tue, 2 Dec 2008 00:33:21 -0600 Message-Id: <200812020633.mB26XLXp026578@oss.sgi.com> From: xfs@oss.sgi.com To: xfs@oss.sgi.com Subject: [XFS updates] XFS development tree branch, master, updated. v2.6.28-rc3-1082-ge5d412f X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 0e446673a15a4e9c336b67c1a638eb12c21d0993 X-Git-Newrev: e5d412f17846b0aea9e5250926f994ab2e4e1006 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "XFS development tree". The branch, master has been updated e5d412f [XFS] Reorder xfs_ioctl32.c for some tidiness 710d62a [XFS] Hook up compat XFS_IOC_FSSETDM_BY_HANDLE ioctl handler 2875097 [XFS] Hook up compat XFS_IOC_ATTRMULTI_BY_HANDLE ioctl handler ebeecd2 [XFS] Hook up compat XFS_IOC_ATTRLIST_BY_HANDLE ioctl handler af819d2 [XFS] Fix compat XFS_IOC_FSBULKSTAT_SINGLE ioctl 65fbaf2 [XFS] Fix xfs_bulkstat_one size checks & error handling 2ee4fa5 [XFS] Make the bulkstat_one compat ioctl handling more sane 471d591 [XFS] Add compat handlers for data & rt growfs ioctls e94fc4a [XFS] Add compat handlers for swapext ioctl d5547f9 [XFS] Clean up some existing compat ioctl calls ffae263 [XFS] Move compat ioctl structs & numbers into xfs_ioctl32.h 743bb46 [XFS] Move copy_from_user calls out of ioctl helpers into ioctl switch. from 0e446673a15a4e9c336b67c1a638eb12c21d0993 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e5d412f17846b0aea9e5250926f994ab2e4e1006 Author: sandeen@sandeen.net Date: Tue Nov 25 21:20:17 2008 -0600 [XFS] Reorder xfs_ioctl32.c for some tidiness Put things in IMHO a more readable order, now that it's all done; add some comments. Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Signed-off-by: Lachlan McIlroy commit 710d62aaaf17c841b8bdbc7a775f8910a7160248 Author: sandeen@sandeen.net Date: Tue Nov 25 21:20:16 2008 -0600 [XFS] Hook up compat XFS_IOC_FSSETDM_BY_HANDLE ioctl handler Add a compat handler for XFS_IOC_FSSETDM_BY_HANDLE. I haven't tested this, lacking dmapi tools to do so (unless xfsqa magically gets this somehow?) Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Signed-off-by: Lachlan McIlroy commit 28750975ace79c547407a84d3969cbed516be8f8 Author: sandeen@sandeen.net Date: Tue Nov 25 21:20:15 2008 -0600 [XFS] Hook up compat XFS_IOC_ATTRMULTI_BY_HANDLE ioctl handler Add a compat handler for XFS_IOC_ATTRMULTI_BY_HANDLE Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Signed-off-by: Lachlan McIlroy commit ebeecd2b04645a4b79e1bc00d69cf4f98e03a684 Author: sandeen@sandeen.net Date: Tue Nov 25 21:20:14 2008 -0600 [XFS] Hook up compat XFS_IOC_ATTRLIST_BY_HANDLE ioctl handler Add a compat handler for XFS_IOC_ATTRLIST_BY_HANDLE Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Signed-off-by: Lachlan McIlroy commit af819d27637119105213433881f158931e29620b Author: sandeen@sandeen.net Date: Tue Nov 25 21:20:13 2008 -0600 [XFS] Fix compat XFS_IOC_FSBULKSTAT_SINGLE ioctl The XFS_IOC_FSBULKSTAT_SINGLE ioctl passes in the desired inode number, while XFS_IOC_FSBULKSTAT passes in the previous/last-stat'd inode number. The compat handler wasn't differentiating these, so when a XFS_IOC_FSBULKSTAT_SINGLE request for inode 128 was sent in, stat information for 131 was sent out. Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Signed-off-by: Lachlan McIlroy commit 65fbaf2489c667bf79ae1f20403f30c66568d445 Author: sandeen@sandeen.net Date: Tue Nov 25 21:20:12 2008 -0600 [XFS] Fix xfs_bulkstat_one size checks & error handling The 32-bit xfs_blkstat_one handler was failing because a size check checked whether the remaining (32-bit) user buffer was less than the (64-bit) bulkstat buffer, and failed with ENOMEM if so. Move this check into the respective handlers so that they check the correct sizes. Also, the formatters were returning negative errors or positive bytes copied; this was odd in the positive error value world of xfs, and handled wrong by at least some of the callers, which treated the bytes returned as an error value. Move the bytes-used assignment into the formatters. Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Signed-off-by: Lachlan McIlroy commit 2ee4fa5cb716eba104a4ef8efe159e1007a2aef6 Author: sandeen@sandeen.net Date: Tue Nov 25 21:20:11 2008 -0600 [XFS] Make the bulkstat_one compat ioctl handling more sane Currently the compat formatter was handled by passing in "private_data" for the xfs_bulkstat_one formatter, which was really just another formatter... IMHO this got confusing. Instead, just make a new xfs_bulkstat_one_compat formatter for xfs_bulkstat, and call it via a wrapper. Also, don't translate the ioctl nrs into their native counterparts, that just clouds the issue; we're in a compat handler anyway, just switch on the 32-bit cmds. Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Signed-off-by: Lachlan McIlroy commit 471d59103167c84f17b9bcfee22ed10b44ff206e Author: sandeen@sandeen.net Date: Tue Nov 25 21:20:10 2008 -0600 [XFS] Add compat handlers for data & rt growfs ioctls The args for XFS_IOC_FSGROWFSDATA and XFS_IOC_FSGROWFSRTA have padding on the end on intel, so add arg copyin functions, and then just call the growfs ioctl helpers. Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Signed-off-by: Lachlan McIlroy commit e94fc4a43e5c39f689e83caf6d2f0939081f5e6b Author: sandeen@sandeen.net Date: Tue Nov 25 21:20:09 2008 -0600 [XFS] Add compat handlers for swapext ioctl The big hitter here was the bstat field, which contains different sized time_t on 32 vs. 64 bit. Add a copyin function to translate the 32-bit arg to 64-bit, and call the swapext ioctl helper. Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Signed-off-by: Lachlan McIlroy commit d5547f9feea459dfc9e7313bd1d561394e2c129f Author: sandeen@sandeen.net Date: Tue Nov 25 21:20:08 2008 -0600 [XFS] Clean up some existing compat ioctl calls Create a new xfs_ioctl.h file which has prototypes for ioctl helpers that may be called in compat mode. Change several compat ioctl cases which are IOW to simply copy in the userspace argument, then call the common ioctl helper. This also fixes xfs_compat_ioc_fsgeometry_v1(), which had it backwards before; it copied in an (empty) arg, then copied out the native result, which probably corrupted userspace. It should be translating on the copyout. Also, a bit of formatting cleanup for consistency, and conversion of all error returns to use XFS_ERROR(). Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Signed-off-by: Lachlan McIlroy commit ffae263a640b736a7206a0d7bd14ab44eb58cd28 Author: sandeen@sandeen.net Date: Tue Nov 25 21:20:07 2008 -0600 [XFS] Move compat ioctl structs & numbers into xfs_ioctl32.h This makes the c file less cluttered and a bit more readable. Consistently name the ioctl number macros with "_32" and the compatibility stuctures with "_compat." Rename the helpers which simply copy in the arg with "_copyin" for easy identification. Finally, for a few of the existing helpers, modify them so that they directly call the native ioctl helper after userspace argument fixup. Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Signed-off-by: Lachlan McIlroy commit 743bb4650da9e2595d6cedd01c680b5b9398c74a Author: sandeen@sandeen.net Date: Tue Nov 25 21:20:06 2008 -0600 [XFS] Move copy_from_user calls out of ioctl helpers into ioctl switch. Moving the copy_from_user out of some of the ioctl helpers will make it easier for the compat ioctl switch to copy in the right struct, then just pass to the underlying helper. Also, move common access checks into the helpers themselves, and out of the native ioctl switch code, to reduce code duplication between native & compat ioctl callers. Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Signed-off-by: Lachlan McIlroy ----------------------------------------------------------------------- Summary of changes: fs/xfs/linux-2.6/xfs_ioctl.c | 123 +++--- fs/xfs/linux-2.6/xfs_ioctl.h | 70 ++++ fs/xfs/linux-2.6/xfs_ioctl32.c | 838 ++++++++++++++++++++++++++-------------- fs/xfs/linux-2.6/xfs_ioctl32.h | 213 ++++++++++ fs/xfs/xfs_dfrag.c | 8 +- fs/xfs/xfs_dfrag.h | 2 +- fs/xfs/xfs_fs.h | 4 - fs/xfs/xfs_fsops.c | 6 + fs/xfs/xfs_itable.c | 45 ++- fs/xfs/xfs_itable.h | 14 + fs/xfs/xfs_rtalloc.c | 2 + 11 files changed, 955 insertions(+), 370 deletions(-) create mode 100644 fs/xfs/linux-2.6/xfs_ioctl.h hooks/post-receive -- XFS development tree From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 00:52:17 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB26qFC4027696 for ; Tue, 2 Dec 2008 00:52:17 -0600 X-ASG-Debug-ID: 1228200734-4a7d00d50000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 3ABED1641B11 for ; Mon, 1 Dec 2008 22:52:14 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id 0jNFG00rCF8T6fuD for ; Mon, 01 Dec 2008 22:52:14 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7P1n-00037B-Jc; Tue, 02 Dec 2008 06:46:35 +0000 Date: Tue, 2 Dec 2008 01:46:35 -0500 From: Christoph Hellwig To: Barry Naujok Cc: Christoph Hellwig , "xfs@oss.sgi.com" X-ASG-Orig-Subj: Re: [REVIEW] Fix unaligned accesses in IA64 in xfsprogs Subject: Re: [REVIEW] Fix unaligned accesses in IA64 in xfsprogs Message-ID: <20081202064634.GA10115@infradead.org> References: <20081201134205.GA7528@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228200735 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com This patch looks good to go to me. On Tue, Dec 02, 2008 at 11:37:31AM +1100, Barry Naujok wrote: > Obviously modifying xfs_bmbt_disk_get_all yields a much smaller patch: > > =========================================================================== > xfsprogs/db/bmap.c > =========================================================================== > > --- a/xfsprogs/db/bmap.c 2008-12-02 11:21:00.000000000 +1100 > +++ b/xfsprogs/db/bmap.c 2008-12-02 11:20:41.324928232 +1100 > @@ -277,21 +277,14 @@ convert_extent( > xfs_dfilblks_t *cp, > int *fp) > { > - xfs_bmbt_irec_t irec, *s = &irec; > - xfs_bmbt_rec_t rpcopy, *p = &rpcopy; > + xfs_bmbt_irec_t irec; > > - memmove(&rpcopy, rp, sizeof(rpcopy)); > - libxfs_bmbt_disk_get_all(p, s); > + libxfs_bmbt_disk_get_all(rp, &irec); > > - if (s->br_state == XFS_EXT_UNWRITTEN) { > - *fp = 1; > - } else { > - *fp = 0; > - } > - > - *op = s->br_startoff; > - *sp = s->br_startblock; > - *cp = s->br_blockcount; > + *fp = irec.br_state == XFS_EXT_UNWRITTEN; > + *op = irec.br_startoff; > + *sp = irec.br_startblock; > + *cp = irec.br_blockcount; > } > > void > > =========================================================================== > xfsprogs/libxfs/xfs_bmap_btree.c > =========================================================================== > > --- a/xfsprogs/libxfs/xfs_bmap_btree.c 2008-12-02 11:21:00.000000000 +1100 > +++ b/xfsprogs/libxfs/xfs_bmap_btree.c 2008-12-02 11:20:09.553355392 +1100 > @@ -181,7 +181,8 @@ xfs_bmbt_disk_get_all( > xfs_bmbt_rec_t *r, > xfs_bmbt_irec_t *s) > { > - __xfs_bmbt_get_all(be64_to_cpu(r->l0), be64_to_cpu(r->l1), s); > + __xfs_bmbt_get_all(get_unaligned_be64(&r->l0), > + get_unaligned_be64(&r->l1), s); > } > > /* > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs ---end quoted text--- From anibal@v7w.com Tue Dec 2 03:35:11 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,MIME_8BIT_HEADER autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB29Z9DN005951 for ; Tue, 2 Dec 2008 03:35:11 -0600 X-ASG-Debug-ID: 1228210507-63a5005a0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from aura.v7w.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id DFFEF9D20A4 for ; Tue, 2 Dec 2008 01:35:07 -0800 (PST) Received: from aura.v7w.com (vs832.rosehosting.com [209.135.157.232]) by cuda.sgi.com with ESMTP id ZFy9C9Kzb8EQWMtr for ; Tue, 02 Dec 2008 01:35:07 -0800 (PST) Received: from elida.v7w.com (60-241-92-80.static.tpgi.com.au [60.241.92.80]) by aura.v7w.com (Postfix) with ESMTP id EB0CF188008; Tue, 2 Dec 2008 09:34:10 +0000 (UTC) Received: by elida.v7w.com (Postfix, from userid 1000) id 3E74A511DA; Tue, 2 Dec 2008 20:33:50 +1100 (EST) Date: Tue, 2 Dec 2008 20:33:50 +1100 From: =?iso-8859-1?Q?An=EDbal?= Monsalve Salazar To: Ron Johnson Cc: debian-amd64@lists.debian.org, xfs@oss.sgi.com X-ASG-Orig-Subj: Re: ia32 userland and XFS Subject: Re: ia32 userland and XFS Message-ID: <20081202093350.GC20730@debianrules.debiancolombia.org> References: <4934914C.7050707@cox.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kigERAySUJmIn/9g" Content-Disposition: inline In-Reply-To: <4934914C.7050707@cox.net> User-Agent: Mutt/1.5.18 (2008-05-17) X-Barracuda-Connect: vs832.rosehosting.com[209.135.157.232] X-Barracuda-Start-Time: 1228210507 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.11717 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- --kigERAySUJmIn/9g Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Adding xfs@oss.sgi.com to the cc list so all the XFS folk see this. On Mon, Dec 01, 2008 at 07:37:16PM -0600, Ron Johnson wrote: >https://alioth.debian.org/docman/view.php/30192/21/debian-amd64-howto.html#id292806 > >According to this (seemingly 2+ year old) web page, the XFS file system >chokes on the combination of 32 bit userland and 64 bit kernel. > >Is this still true, and why should a low-level driver hidden under a >virtual fs care what user apps access it via the vfs? --kigERAySUJmIn/9g Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkk1APsACgkQgY5NIXPNpFX3TwCeIavSHdthu581b+pWK00X+oeZ w40AnRzAr9UqI0glKpr2FZsdMlb7sSuC =7zTP -----END PGP SIGNATURE----- --kigERAySUJmIn/9g-- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 03:52:49 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_23 autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB29qmfp006811 for ; Tue, 2 Dec 2008 03:52:49 -0600 X-ASG-Debug-ID: 1228211567-63aa00ba0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 71D1B164310C for ; Tue, 2 Dec 2008 01:52:47 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id FezW8uuyOF1JiHrS for ; Tue, 02 Dec 2008 01:52:47 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Rvw-0003R1-B8; Tue, 02 Dec 2008 09:52:44 +0000 Date: Tue, 2 Dec 2008 04:52:44 -0500 From: Christoph Hellwig To: An?bal Monsalve Salazar Cc: Ron Johnson , debian-amd64@lists.debian.org, xfs@oss.sgi.com X-ASG-Orig-Subj: Re: ia32 userland and XFS Subject: Re: ia32 userland and XFS Message-ID: <20081202095244.GA18292@infradead.org> References: <4934914C.7050707@cox.net> <20081202093350.GC20730@debianrules.debiancolombia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081202093350.GC20730@debianrules.debiancolombia.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228211567 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com On Tue, Dec 02, 2008 at 08:33:50PM +1100, An?bal Monsalve Salazar wrote: > On Mon, Dec 01, 2008 at 07:37:16PM -0600, Ron Johnson wrote: > >According to this (seemingly 2+ year old) web page, the XFS file system > >chokes on the combination of 32 bit userland and 64 bit kernel. > > > >Is this still true, and why should a low-level driver hidden under a > >virtual fs care what user apps access it via the vfs? XFS as in the plain posix filesystem works perfectly fine with a 64 bit kernel and 32 bit userspace. But various advance capabilities or administration interfaces which are used by tools from xfsprogs are implemented as ioctls, and unfortunately most of them have been designed very badly and aren't wordsize clean. There have been handlers for a few of them for a while, but only as of today a full set of compat handlers has been commited. That code will be release with 2.6.29, but could also be backported. From billodo@sgi.com Tue Dec 2 06:53:56 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2Crt1m017984 for ; Tue, 2 Dec 2008 06:53:56 -0600 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay3.corp.sgi.com (Postfix) with ESMTP id 35F23AC0AF for ; Tue, 2 Dec 2008 04:53:52 -0800 (PST) Received: from lnx-billodo.americas.sgi.com (lnx-billodo.americas.sgi.com [128.162.232.245]) by estes.americas.sgi.com (Postfix) with ESMTP id CD3A27000103; Tue, 2 Dec 2008 06:53:51 -0600 (CST) Received: by lnx-billodo.americas.sgi.com (Postfix, from userid 56393) id 3F10617E01F; Tue, 2 Dec 2008 06:59:22 -0600 (CST) Date: Tue, 2 Dec 2008 06:59:22 -0600 From: "Bill O'Donnell" To: Christoph Hellwig Cc: xfs@sgi.com Subject: Re: [PATCH 3/9] sanitize xlog_in_core_t definition Message-ID: <20081202125922.GB27836@sgi.com> References: <20080925225626.GD9822@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080925225626.GD9822@lst.de> User-Agent: Mutt/1.5.16 (2007-06-09) On Fri, Sep 26, 2008 at 12:56:26AM +0200, Christoph Hellwig wrote: | Move all fields from xlog_iclog_fields_t into xlog_in_core_t instead of having | them in a substructure and the using #defines to make it look like they were | directly in xlog_in_core_t. Also document that xlog_in_core_2_t is grossly | misnamed, and make all references to it typesafe. Umm, instead of pointing out the misnaming of xlog_in_core_2_t, why not properly name it, or does that proliferate too much? | | | 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 2008-09-25 13:58:24.000000000 +0200 | +++ linux-2.6-xfs/fs/xfs/xfs_log.c 2008-09-25 20:02:34.000000000 +0200 | @@ -1024,12 +1024,6 @@ xlog_iodone(xfs_buf_t *bp) | ASSERT(XFS_BUF_FSPRIVATE2(bp, unsigned long) == (unsigned long) 2); | XFS_BUF_SET_FSPRIVATE2(bp, (unsigned long)1); | aborted = 0; | - | - /* | - * Some versions of cpp barf on the recursive definition of | - * ic_log -> hic_fields.ic_log and expand ic_log twice when | - * it is passed through two macros. Workaround broken cpp. | - */ | l = iclog->ic_log; | | /* | @@ -1287,7 +1281,7 @@ xlog_alloc_log(xfs_mount_t *mp, | XFS_BUF_SET_BDSTRAT_FUNC(bp, xlog_bdstrat_cb); | XFS_BUF_SET_FSPRIVATE2(bp, (unsigned long)1); | iclog->ic_bp = bp; | - iclog->hic_data = bp->b_addr; | + iclog->ic_data = bp->b_addr; | #ifdef DEBUG | log->l_iclog_bak[i] = (xfs_caddr_t)&(iclog->ic_header); | #endif | @@ -1307,7 +1301,7 @@ xlog_alloc_log(xfs_mount_t *mp, | atomic_set(&iclog->ic_refcnt, 0); | spin_lock_init(&iclog->ic_callback_lock); | iclog->ic_callback_tail = &(iclog->ic_callback); | - iclog->ic_datap = (char *)iclog->hic_data + log->l_iclog_hsize; | + iclog->ic_datap = (char *)iclog->ic_data + log->l_iclog_hsize; | | ASSERT(XFS_BUF_ISBUSY(iclog->ic_bp)); | ASSERT(XFS_BUF_VALUSEMA(iclog->ic_bp) <= 0); | @@ -3418,7 +3412,7 @@ xlog_verify_iclog(xlog_t *log, | ptr = iclog->ic_datap; | base_ptr = ptr; | ophead = (xlog_op_header_t *)ptr; | - xhdr = (xlog_in_core_2_t *)&iclog->ic_header; | + xhdr = iclog->ic_data; | for (i = 0; i < len; i++) { | ophead = (xlog_op_header_t *)ptr; | | Index: linux-2.6-xfs/fs/xfs/xfs_log_priv.h | =================================================================== | --- linux-2.6-xfs.orig/fs/xfs/xfs_log_priv.h 2008-09-25 13:58:24.000000000 +0200 | +++ linux-2.6-xfs/fs/xfs/xfs_log_priv.h 2008-09-25 20:02:35.000000000 +0200 | @@ -309,6 +309,16 @@ typedef struct xlog_rec_ext_header { | } xlog_rec_ext_header_t; | | #ifdef __KERNEL__ | + | +/* | + * Quite misnamed, because this union lays out the actual on-disk log buffer. | + */ | +typedef union xlog_in_core2 { | + xlog_rec_header_t hic_header; | + xlog_rec_ext_header_t hic_xheader; | + char hic_sector[XLOG_HEADER_SIZE]; | +} xlog_in_core_2_t; | + See my above comment. | /* | * - A log record header is 512 bytes. There is plenty of room to grow the | * xlog_rec_header_t into the reserved space. | @@ -338,7 +348,7 @@ typedef struct xlog_rec_ext_header { | * We'll put all the read-only and l_icloglock fields in the first cacheline, | * and move everything else out to subsequent cachelines. | */ | -typedef struct xlog_iclog_fields { | +typedef struct xlog_in_core { | sv_t ic_force_wait; | sv_t ic_write_wait; | struct xlog_in_core *ic_next; | @@ -361,41 +371,11 @@ typedef struct xlog_iclog_fields { | | /* reference counts need their own cacheline */ | atomic_t ic_refcnt ____cacheline_aligned_in_smp; | -} xlog_iclog_fields_t; | - | -typedef union xlog_in_core2 { | - xlog_rec_header_t hic_header; | - xlog_rec_ext_header_t hic_xheader; | - char hic_sector[XLOG_HEADER_SIZE]; | -} xlog_in_core_2_t; | - | -typedef struct xlog_in_core { | - xlog_iclog_fields_t hic_fields; | - xlog_in_core_2_t *hic_data; | + xlog_in_core_2_t *ic_data; | +#define ic_header ic_data->hic_header | } xlog_in_core_t; | | /* | - * Defines to save our code from this glop. | - */ | -#define ic_force_wait hic_fields.ic_force_wait | -#define ic_write_wait hic_fields.ic_write_wait | -#define ic_next hic_fields.ic_next | -#define ic_prev hic_fields.ic_prev | -#define ic_bp hic_fields.ic_bp | -#define ic_log hic_fields.ic_log | -#define ic_callback hic_fields.ic_callback | -#define ic_callback_lock hic_fields.ic_callback_lock | -#define ic_callback_tail hic_fields.ic_callback_tail | -#define ic_trace hic_fields.ic_trace | -#define ic_size hic_fields.ic_size | -#define ic_offset hic_fields.ic_offset | -#define ic_refcnt hic_fields.ic_refcnt | -#define ic_bwritecnt hic_fields.ic_bwritecnt | -#define ic_state hic_fields.ic_state | -#define ic_datap hic_fields.ic_datap | -#define ic_header hic_data->hic_header | - | -/* | * The reservation head lsn is not made up of a cycle number and block number. | * Instead, it uses a cycle number and byte number. Logs don't expect to | * overflow 31 bits worth of byte offset, so using a byte number will mean | Index: linux-2.6-xfs/fs/xfs/xfs_log_recover.c | =================================================================== | --- linux-2.6-xfs.orig/fs/xfs/xfs_log_recover.c 2008-09-25 13:58:24.000000000 +0200 | +++ linux-2.6-xfs/fs/xfs/xfs_log_recover.c 2008-09-25 20:02:39.000000000 +0200 | @@ -3359,7 +3359,6 @@ xlog_pack_data( | int size = iclog->ic_offset + roundoff; | __be32 cycle_lsn; | xfs_caddr_t dp; | - xlog_in_core_2_t *xhdr; | | xlog_pack_data_checksum(log, iclog, size); | | @@ -3374,7 +3373,8 @@ xlog_pack_data( | } | | if (xfs_sb_version_haslogv2(&log->l_mp->m_sb)) { | - xhdr = (xlog_in_core_2_t *)&iclog->ic_header; | + xlog_in_core_2_t *xhdr = iclog->ic_data; | + | for ( ; i < BTOBB(size); i++) { | j = i / (XLOG_HEADER_CYCLE_SIZE / BBSIZE); | k = i % (XLOG_HEADER_CYCLE_SIZE / BBSIZE); | @@ -3432,7 +3432,6 @@ xlog_unpack_data( | xlog_t *log) | { | int i, j, k; | - xlog_in_core_2_t *xhdr; | | for (i = 0; i < BTOBB(be32_to_cpu(rhead->h_len)) && | i < (XLOG_HEADER_CYCLE_SIZE / BBSIZE); i++) { | @@ -3441,7 +3440,7 @@ xlog_unpack_data( | } | | if (xfs_sb_version_haslogv2(&log->l_mp->m_sb)) { | - xhdr = (xlog_in_core_2_t *)rhead; | + xlog_in_core_2_t *xhdr = (xlog_in_core_2_t *)rhead; | for ( ; i < BTOBB(be32_to_cpu(rhead->h_len)); i++) { | j = i / (XLOG_HEADER_CYCLE_SIZE / BBSIZE); | k = i % (XLOG_HEADER_CYCLE_SIZE / BBSIZE); | Index: linux-2.6-xfs/fs/xfs/xfsidbg.c | =================================================================== | --- linux-2.6-xfs.orig/fs/xfs/xfsidbg.c 2008-09-25 13:58:24.000000000 +0200 | +++ linux-2.6-xfs/fs/xfs/xfsidbg.c 2008-09-25 20:02:39.000000000 +0200 | @@ -5763,7 +5763,7 @@ xfsidbg_xiclog(xlog_in_core_t *iclog) | }; | | kdb_printf("xlog_in_core/header at 0x%p/0x%p\n", | - iclog, iclog->hic_data); | + iclog, iclog->ic_data); | kdb_printf("magicno: %x cycle: %d version: %d lsn: 0x%Lx\n", | be32_to_cpu(iclog->ic_header.h_magicno), | be32_to_cpu(iclog->ic_header.h_cycle), | | -- | | From billodo@sgi.com Tue Dec 2 07:00:04 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2D04is018503 for ; Tue, 2 Dec 2008 07:00:04 -0600 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay2.corp.sgi.com (Postfix) with ESMTP id 4266D3041AE for ; Tue, 2 Dec 2008 05:00:01 -0800 (PST) Received: from lnx-billodo.americas.sgi.com (lnx-billodo.americas.sgi.com [128.162.232.245]) by estes.americas.sgi.com (Postfix) with ESMTP id 1C4647000103; Tue, 2 Dec 2008 07:00:01 -0600 (CST) Received: by lnx-billodo.americas.sgi.com (Postfix, from userid 56393) id 845B217E01F; Tue, 2 Dec 2008 07:05:31 -0600 (CST) Date: Tue, 2 Dec 2008 07:05:31 -0600 From: "Bill O'Donnell" To: Christoph Hellwig Cc: xfs@sgi.com Subject: Re: [PATCH 4/9] add infrastructure for crc in metadata Message-ID: <20081202130531.GC27836@sgi.com> References: <20080925225629.GE9822@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080925225629.GE9822@lst.de> User-Agent: Mutt/1.5.16 (2007-06-09) On Fri, Sep 26, 2008 at 12:56:29AM +0200, Christoph Hellwig wrote: | | - add a mount feature bit for CRC enabled filesystems | - add some helpers for generating and verifying the CRCs | - add a copy_uuid helper | - add a pre-io callback to xfs_buf for calculating the CRCs | | The checksumming helpers are losely based on similar ones in sctp, | all other bits come from Dave Chinner. | | | Signed-off-by: Christoph Hellwig looks good. From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 08:20:40 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_33, J_CHICKENPOX_44 autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2EKeYd023589 for ; Tue, 2 Dec 2008 08:20:40 -0600 X-ASG-Debug-ID: 1228227639-350502880000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id D6EAA1644F71; Tue, 2 Dec 2008 06:20:39 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id Ig15S51Cn179JOAc; Tue, 02 Dec 2008 06:20:39 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7W7D-0006wi-8U; Tue, 02 Dec 2008 14:20:39 +0000 Date: Tue, 2 Dec 2008 09:20:39 -0500 From: Christoph Hellwig To: Timothy Shimmin , xfs@oss.sgi.com X-ASG-Orig-Subj: [PATCH] xfsqa: add testcase for ->setattr permission checking Subject: [PATCH] xfsqa: add testcase for ->setattr permission checking Message-ID: <20081202142039.GA25155@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228227639 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com Index: xfs-cmds-git/xfstests/192 =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ xfs-cmds-git/xfstests/192 2008-12-02 14:16:12.000000000 +0000 @@ -0,0 +1,177 @@ +#! /bin/sh +# FS QA Test No. 192 +# +# Test permission checks in ->setattr +# +#----------------------------------------------------------------------- +# Copyright (c) 2008 Christoph Hellwig. +#----------------------------------------------------------------------- +# +# creator +owner=hch@lst.de + +seq=`basename $0` +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup_files; exit \$status" 0 1 2 3 15 +tag="added by qa $seq" + +# +# For some tests we need a secondary group for the qa_user. Currently +# that's not available in the framework, so the tests using it are +# commented out. +# +#group2=foo + +# +# Create two files, one owned by root, one by the qa_user +# +_create_files() +{ + touch test.root + touch test.${qa_user} + chown ${qa_user}:${qa_user} test.${qa_user} +} + +# +# Remove our files again +# +_cleanup_files() +{ + rm -f test.${qa_user} + rm -f test.root +} + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter + +# real QA test starts here +_supported_fs xfs nfs udf +_supported_os Linux + +_require_user +_need_to_be_root + + +# +# make sure we have a normal umask set +# +umask 022 + + +# +# Test the ATTR_UID case +# +echo +echo "testing ATTR_UID" +echo + +_create_files + +echo "user: chown root owned file to qa_user (should fail)" +su ${qa_user} -c "chown root test.${qa_user}" + +echo "user: chown root owned file to root (should fail)" +su ${qa_user} -c "chown root test.root" + +echo "user: chown qa_user owned file to qa_user (should succeed)" +su ${qa_user} -c "chown ${qa_user} test.${qa_user}" + +# this would work without _POSIX_CHOWN_RESTRICTED +echo "user: chown qa_user owned file to root (should fail)" +su ${qa_user} -c "chown ${qa_user} test.root" + +_cleanup_files + +# +# Test the ATTR_GID case +# +echo +echo "testing ATTR_GID" +echo + +_create_files + +echo "user: chgrp root owned file to root (should fail)" +su ${qa_user} -c "chgrp root test.root" + +echo "user: chgrp qa_user owned file to root (should fail)" +su ${qa_user} -c "chgrp root test.${qa_user}" + +echo "user: chgrp root owned file to qa_user (should fail)" +su ${qa_user} -c "chgrp ${qa_user} test.root" + +echo "user: chgrp qa_user owned file to qa_user (should suceed)" +su ${qa_user} -c "chgrp ${qa_user} test.${qa_user}" + +#echo "user: chgrp qa_user owned file to secondary group (should suceed)" +#su ${qa_user} -c "chgrp ${group2} test.${qa_user}" + +_cleanup_files + + +# +# Test the ATTR_MODE case +# +echo +echo "testing ATTR_MODE" +echo + +_create_files + +echo "user: chmod a+r on qa_user owned file (should succeed)" +su ${qa_user} -c "chmod a+r test.${qa_user}" + +echo "user: chmod a+r on root owned file (should fail)" +su ${qa_user} -c "chmod a+r test.root" + +# +# Setup a file owned by the qa_user, but with a group ID that +# is not present in the qa_users group list (use root to make it easier for it) +# and mark it with set sgid bit +# +echo "check that the sgid bit is cleared" +chown ${qa_user}:root test.${qa_user} +chmod g+s test.${qa_user} + +# and let the qa_user change permission bits +su ${qa_user} -c "chmod a+w test.${qa_user}" +stat -c '%A' test.${qa_user} + +# +# Setup a file owned by the qa_user and with the suid bit set. +# A chown by root should not clean the suid bit. +# +echo "check that suid bit is not cleared" +chmod u+s test.${qa_user} +chmod a+w test.${qa_user} +stat -c '%A' test.${qa_user} + +_cleanup_files + + +# +# Test ATTR_*TIMES_SET +# +echo +echo "testing ATTR_*TIMES_SET" +echo + +_create_files + +echo "user: touch qa_user file (should succeed)" +su ${qa_user} -c "touch test.${qa_user}" + +echo "user: touch root file (should fail)" +su ${qa_user} -c "touch test.root" + +_cleanup_files + +# success, all done +echo "*** done" +rm -f $seq.full +status=0 Index: xfs-cmds-git/xfstests/group =================================================================== --- xfs-cmds-git.orig/xfstests/group 2008-12-02 14:00:49.000000000 +0000 +++ xfs-cmds-git/xfstests/group 2008-12-02 14:01:01.000000000 +0000 @@ -291,3 +291,4 @@ 189 mount auto 190 rw auto 191 nfs4acl auto +192 auto metadata Index: xfs-cmds-git/xfstests/192.out =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ xfs-cmds-git/xfstests/192.out 2008-12-02 14:14:49.000000000 +0000 @@ -0,0 +1,38 @@ +QA output created by 192 + +testing ATTR_UID + +user: chown root owned file to qa_user (should fail) +chown: changing ownership of `test.fsgqa': Operation not permitted +user: chown root owned file to root (should fail) +chown: changing ownership of `test.root': Operation not permitted +user: chown qa_user owned file to qa_user (should succeed) +user: chown qa_user owned file to root (should fail) +chown: changing ownership of `test.root': Operation not permitted + +testing ATTR_GID + +user: chgrp root owned file to root (should fail) +chgrp: changing group of `test.root': Operation not permitted +user: chgrp qa_user owned file to root (should fail) +chgrp: changing group of `test.fsgqa': Operation not permitted +user: chgrp root owned file to qa_user (should fail) +chgrp: changing group of `test.root': Operation not permitted +user: chgrp qa_user owned file to qa_user (should suceed) + +testing ATTR_MODE + +user: chmod a+r on qa_user owned file (should succeed) +user: chmod a+r on root owned file (should fail) +chmod: changing permissions of `test.root': Operation not permitted +check that the sgid bit is cleared +-rw-rw-rw- +check that suid bit is not cleared +-rwSrw-rw- + +testing ATTR_*TIMES_SET + +user: touch qa_user file (should succeed) +user: touch root file (should fail) +touch: cannot touch `test.root': Permission denied +*** done From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:06:52 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2G6oa0031608 for ; Tue, 2 Dec 2008 10:06:52 -0600 X-ASG-Debug-ID: 1228234009-60db025e0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id E0631164F1B5 for ; Tue, 2 Dec 2008 08:06:49 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id UjXQi2OaLS7yUCng for ; Tue, 02 Dec 2008 08:06:49 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xlx-0007FU-Ja for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:49 +0000 Message-Id: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:30 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 00/22] 2.6.29 queue Subject: [patch 00/22] 2.6.29 queue X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234009 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com This is my current 2.6.29 queue. All but a few trivial patches have already been posted to the list. I have another two patches for 2.6.29 in progress that aren't included but should go to the list in a few days. Note that this is a series against the master tree, patches against dmapi or xfsidbg aren't included (and not relevant for 2.6.29). -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:06:53 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-4.1 required=5.0 tests=AWL,BAYES_00,LOCAL_GNU_PATCH autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2G6r8V031650 for ; Tue, 2 Dec 2008 10:06:53 -0600 X-ASG-Debug-ID: 1228234012-60d302390000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 774E9164F1C2 for ; Tue, 2 Dec 2008 08:06:52 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id zwOlQSMZZqVIroYd for ; Tue, 02 Dec 2008 08:06:52 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xm0-0007Wb-2l for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:52 +0000 Message-Id: <20081202160651.992698000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:47 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 17/22] no explicit xfs_iflush for special inodes during unmount Subject: [patch 17/22] no explicit xfs_iflush for special inodes during unmount Content-Disposition: inline; filename=xfs-stop-flushing-special-inodes X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234012 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com Currently we explicitly call xfs_iflush on the quota, real-time and root inodes from xfs_unmount_flush. But we just called xfs_sync_inodes with SYNC_ATTR and do an XFS_bflush aka xfs_flush_buftarg to make sure all inodes are on disk already, so there is no need for these special cases. Signed-off-by: Christoph Hellwig Index: xfs-master/fs/xfs/quota/xfs_qm.c =================================================================== --- xfs-master.orig/fs/xfs/quota/xfs_qm.c 2008-12-01 21:33:53.000000000 +0100 +++ xfs-master/fs/xfs/quota/xfs_qm.c 2008-12-02 11:26:22.000000000 +0100 @@ -395,13 +395,10 @@ xfs_qm_mount_quotas( /* * Called from the vfsops layer. */ -int +void xfs_qm_unmount_quotas( xfs_mount_t *mp) { - xfs_inode_t *uqp, *gqp; - int error = 0; - /* * Release the dquots that root inode, et al might be holding, * before we flush quotas and blow away the quotainfo structure. @@ -414,43 +411,18 @@ xfs_qm_unmount_quotas( xfs_qm_dqdetach(mp->m_rsumip); /* - * Flush out the quota inodes. + * Release the quota inodes. */ - uqp = gqp = NULL; if (mp->m_quotainfo) { - if ((uqp = mp->m_quotainfo->qi_uquotaip) != NULL) { - xfs_ilock(uqp, XFS_ILOCK_EXCL); - xfs_iflock(uqp); - error = xfs_iflush(uqp, XFS_IFLUSH_SYNC); - xfs_iunlock(uqp, XFS_ILOCK_EXCL); - if (unlikely(error == EFSCORRUPTED)) { - XFS_ERROR_REPORT("xfs_qm_unmount_quotas(1)", - XFS_ERRLEVEL_LOW, mp); - goto out; - } - } - if ((gqp = mp->m_quotainfo->qi_gquotaip) != NULL) { - xfs_ilock(gqp, XFS_ILOCK_EXCL); - xfs_iflock(gqp); - error = xfs_iflush(gqp, XFS_IFLUSH_SYNC); - xfs_iunlock(gqp, XFS_ILOCK_EXCL); - if (unlikely(error == EFSCORRUPTED)) { - XFS_ERROR_REPORT("xfs_qm_unmount_quotas(2)", - XFS_ERRLEVEL_LOW, mp); - goto out; - } + if (mp->m_quotainfo->qi_uquotaip) { + IRELE(mp->m_quotainfo->qi_uquotaip); + mp->m_quotainfo->qi_uquotaip = NULL; + } + if (mp->m_quotainfo->qi_gquotaip) { + IRELE(mp->m_quotainfo->qi_gquotaip); + mp->m_quotainfo->qi_gquotaip = NULL; } } - if (uqp) { - IRELE(uqp); - mp->m_quotainfo->qi_uquotaip = NULL; - } - if (gqp) { - IRELE(gqp); - mp->m_quotainfo->qi_gquotaip = NULL; - } -out: - return XFS_ERROR(error); } /* Index: xfs-master/fs/xfs/xfs_vfsops.c =================================================================== --- xfs-master.orig/fs/xfs/xfs_vfsops.c 2008-12-01 21:33:53.000000000 +0100 +++ xfs-master/fs/xfs/xfs_vfsops.c 2008-12-02 11:24:59.000000000 +0100 @@ -68,74 +68,16 @@ xfs_unmount_flush( rid of. */ int relocation) /* Called from vfs relocation. */ { - xfs_inode_t *rip = mp->m_rootip; - xfs_inode_t *rbmip; - xfs_inode_t *rsumip = NULL; - int error; - - xfs_ilock(rip, XFS_ILOCK_EXCL | XFS_ILOCK_PARENT); - xfs_iflock(rip); - - /* - * Flush out the real time inodes. - */ - if ((rbmip = mp->m_rbmip) != NULL) { - xfs_ilock(rbmip, XFS_ILOCK_EXCL); - xfs_iflock(rbmip); - error = xfs_iflush(rbmip, XFS_IFLUSH_SYNC); - xfs_iunlock(rbmip, XFS_ILOCK_EXCL); - - if (error == EFSCORRUPTED) - goto fscorrupt_out; - - ASSERT(vn_count(VFS_I(rbmip)) == 1); - - rsumip = mp->m_rsumip; - xfs_ilock(rsumip, XFS_ILOCK_EXCL); - xfs_iflock(rsumip); - error = xfs_iflush(rsumip, XFS_IFLUSH_SYNC); - xfs_iunlock(rsumip, XFS_ILOCK_EXCL); - - if (error == EFSCORRUPTED) - goto fscorrupt_out; - - ASSERT(vn_count(VFS_I(rsumip)) == 1); - } - - /* - * Synchronously flush root inode to disk - */ - error = xfs_iflush(rip, XFS_IFLUSH_SYNC); - if (error == EFSCORRUPTED) - goto fscorrupt_out2; - - if (vn_count(VFS_I(rip)) != 1 && !relocation) { - xfs_iunlock(rip, XFS_ILOCK_EXCL); - return XFS_ERROR(EBUSY); - } - /* * Release dquot that rootinode, rbmino and rsumino might be holding, * flush and purge the quota inodes. */ - error = XFS_QM_UNMOUNT(mp); - if (error == EFSCORRUPTED) - goto fscorrupt_out2; + XFS_QM_UNMOUNT(mp); - if (rbmip) { - IRELE(rbmip); - IRELE(rsumip); - } + if (mp->m_rbmip) + IRELE(mp->m_rbmip); + if (mp->m_rsumip) + IRELE(mp->m_rsumip); - xfs_iunlock(rip, XFS_ILOCK_EXCL); return 0; - -fscorrupt_out: - xfs_ifunlock(rip); - -fscorrupt_out2: - xfs_iunlock(rip, XFS_ILOCK_EXCL); - - return XFS_ERROR(EFSCORRUPTED); } - Index: xfs-master/fs/xfs/quota/xfs_qm.h =================================================================== --- xfs-master.orig/fs/xfs/quota/xfs_qm.h 2008-12-01 21:33:53.000000000 +0100 +++ xfs-master/fs/xfs/quota/xfs_qm.h 2008-12-02 11:24:59.000000000 +0100 @@ -167,7 +167,7 @@ extern void xfs_qm_destroy_quotainfo(xf extern void xfs_qm_mount_quotas(xfs_mount_t *); extern int xfs_qm_quotacheck(xfs_mount_t *); extern void xfs_qm_unmount_quotadestroy(xfs_mount_t *); -extern int xfs_qm_unmount_quotas(xfs_mount_t *); +extern void xfs_qm_unmount_quotas(xfs_mount_t *); extern int xfs_qm_write_sb_changes(xfs_mount_t *, __int64_t); extern int xfs_qm_sync(xfs_mount_t *, int); Index: xfs-master/fs/xfs/xfs_mount.h =================================================================== --- xfs-master.orig/fs/xfs/xfs_mount.h 2008-12-02 11:22:46.000000000 +0100 +++ xfs-master/fs/xfs/xfs_mount.h 2008-12-02 11:24:59.000000000 +0100 @@ -117,7 +117,7 @@ struct xfs_quotainfo; typedef int (*xfs_qminit_t)(struct xfs_mount *, uint *, uint *); typedef int (*xfs_qmmount_t)(struct xfs_mount *, uint, uint); -typedef int (*xfs_qmunmount_t)(struct xfs_mount *); +typedef void (*xfs_qmunmount_t)(struct xfs_mount *); typedef void (*xfs_qmdone_t)(struct xfs_mount *); typedef void (*xfs_dqrele_t)(struct xfs_dquot *); typedef int (*xfs_dqattach_t)(struct xfs_inode *, uint); Index: xfs-master/fs/xfs/linux-2.6/xfs_vnode.h =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_vnode.h 2008-12-02 11:24:34.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_vnode.h 2008-12-02 11:24:59.000000000 +0100 @@ -65,11 +65,6 @@ extern void vn_iowait(struct xfs_inode * extern void vn_iowake(struct xfs_inode *ip); extern void vn_ioerror(struct xfs_inode *ip, int error, char *f, int l); -static inline int vn_count(struct inode *vp) -{ - return atomic_read(&vp->i_count); -} - #define IHOLD(ip) \ do { \ ASSERT(atomic_read(&VFS_I(ip)->i_count) > 0) ; \ -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:06:53 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2G6rq2031664 for ; Tue, 2 Dec 2008 10:06:53 -0600 X-ASG-Debug-ID: 1228234012-606102750000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id C8631164F1C6 for ; Tue, 2 Dec 2008 08:06:52 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id oVSIyiBCEb6ju7Sh for ; Tue, 02 Dec 2008 08:06:52 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xm0-0007cE-Ep for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:52 +0000 Message-Id: <20081202160652.335328000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:49 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 19/22] kill vn_ioerror Subject: [patch 19/22] kill vn_ioerror Content-Disposition: inline; filename=xfs-kill-vn_ioerror X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234012 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com There's just one caller of this helper, and it's much cleaner to just merge the xfs_do_force_shutdown call into it. Signed-off-by: Christoph Hellwig Index: xfs-master/fs/xfs/linux-2.6/xfs_aops.c =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_aops.c 2008-12-02 11:24:34.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_aops.c 2008-12-02 11:26:38.000000000 +0100 @@ -146,16 +146,25 @@ xfs_destroy_ioend( xfs_ioend_t *ioend) { struct buffer_head *bh, *next; + struct xfs_inode *ip = XFS_I(ioend->io_inode); for (bh = ioend->io_buffer_head; bh; bh = next) { next = bh->b_private; bh->b_end_io(bh, !ioend->io_error); } - if (unlikely(ioend->io_error)) { - vn_ioerror(XFS_I(ioend->io_inode), ioend->io_error, - __FILE__,__LINE__); + + /* + * Volume managers supporting multiple paths can send back ENODEV + * when the final path disappears. In this case continuing to fill + * the page cache with dirty data which cannot be written out is + * evil, so prevent that. + */ + if (unlikely(ioend->io_error == -ENODEV)) { + xfs_do_force_shutdown(ip->i_mount, SHUTDOWN_DEVICE_REQ, + __FILE__, __LINE__); } - vn_iowake(XFS_I(ioend->io_inode)); + + vn_iowake(ip); mempool_free(ioend, xfs_ioend_pool); } Index: xfs-master/fs/xfs/linux-2.6/xfs_vnode.c =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_vnode.c 2008-12-02 11:24:34.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_vnode.c 2008-12-02 11:26:38.000000000 +0100 @@ -66,22 +66,6 @@ vn_iowake( wake_up(vptosync(ip)); } -/* - * Volume managers supporting multiple paths can send back ENODEV when the - * final path disappears. In this case continuing to fill the page cache - * with dirty data which cannot be written out is evil, so prevent that. - */ -void -vn_ioerror( - xfs_inode_t *ip, - int error, - char *f, - int l) -{ - if (unlikely(error == -ENODEV)) - xfs_do_force_shutdown(ip->i_mount, SHUTDOWN_DEVICE_REQ, f, l); -} - #ifdef XFS_INODE_TRACE #define KTRACE_ENTER(ip, vk, s, line, ra) \ Index: xfs-master/fs/xfs/linux-2.6/xfs_vnode.h =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_vnode.h 2008-12-02 11:24:59.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_vnode.h 2008-12-02 11:26:38.000000000 +0100 @@ -63,7 +63,6 @@ extern void vn_init(void); */ extern void vn_iowait(struct xfs_inode *ip); extern void vn_iowake(struct xfs_inode *ip); -extern void vn_ioerror(struct xfs_inode *ip, int error, char *f, int l); #define IHOLD(ip) \ do { \ -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:06:52 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2G6qOf031611 for ; Tue, 2 Dec 2008 10:06:52 -0600 X-ASG-Debug-ID: 1228234011-60da025b0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 941D7164F1B5 for ; Tue, 2 Dec 2008 08:06:51 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id 0JEKjdWvdyXdi89s for ; Tue, 02 Dec 2008 08:06:51 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xlz-0007SW-6V for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:51 +0000 Message-Id: <20081202160651.115809000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:41 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 11/22] cleanup xfs_sb.h feature flag helpers Subject: [patch 11/22] cleanup xfs_sb.h feature flag helpers Content-Disposition: inline; filename=xfs-cleanup-sb.h-helpers X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234011 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com The various inlines in xfs_sb.h that deal with the superblock version and fature flags were converted from macros a while ago, and this show by the odd coding style full of useless braces and backslashes and the avoidance of conditionals. Clean these up to look like normal C code. (First sent on August 2nd) Signed-off-by: Christoph Hellwig Index: xfs-master/fs/xfs/xfs_sb.h =================================================================== --- xfs-master.orig/fs/xfs/xfs_sb.h 2008-12-02 11:07:00.000000000 +0100 +++ xfs-master/fs/xfs/xfs_sb.h 2008-12-02 11:15:20.000000000 +0100 @@ -296,30 +296,34 @@ typedef enum { #define XFS_SB_VERSION_NUM(sbp) ((sbp)->sb_versionnum & XFS_SB_VERSION_NUMBITS) -#ifdef __KERNEL__ static inline int xfs_sb_good_version(xfs_sb_t *sbp) { - return (((sbp->sb_versionnum >= XFS_SB_VERSION_1) && \ - (sbp->sb_versionnum <= XFS_SB_VERSION_3)) || \ - ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - !((sbp->sb_versionnum & ~XFS_SB_VERSION_OKREALBITS) || \ - ((sbp->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT) && \ - (sbp->sb_features2 & ~XFS_SB_VERSION2_OKREALBITS))) && \ - (sbp->sb_shared_vn <= XFS_SB_MAX_SHARED_VN))); -} + /* We always support version 1-3 */ + if (sbp->sb_versionnum >= XFS_SB_VERSION_1 && + sbp->sb_versionnum <= XFS_SB_VERSION_3) + return 1; + + /* We support version 4 if all feature bits are supported */ + if (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) { + if ((sbp->sb_versionnum & ~XFS_SB_VERSION_OKREALBITS) || + ((sbp->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT) && + (sbp->sb_features2 & ~XFS_SB_VERSION2_OKREALBITS))) + return 0; + +#ifdef __KERNEL__ + if (sbp->sb_shared_vn > XFS_SB_MAX_SHARED_VN) + return 0; #else -static inline int xfs_sb_good_version(xfs_sb_t *sbp) -{ - return (((sbp->sb_versionnum >= XFS_SB_VERSION_1) && \ - (sbp->sb_versionnum <= XFS_SB_VERSION_3)) || \ - ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - !((sbp->sb_versionnum & ~XFS_SB_VERSION_OKREALBITS) || \ - ((sbp->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT) && \ - (sbp->sb_features2 & ~XFS_SB_VERSION2_OKREALBITS))) && \ - (!(sbp->sb_versionnum & XFS_SB_VERSION_SHAREDBIT) || \ - (sbp->sb_shared_vn <= XFS_SB_MAX_SHARED_VN)))); + if ((sbp->sb_versionnum & XFS_SB_VERSION_SHAREDBIT) && + sbp->sb_shared_vn > XFS_SB_MAX_SHARED_VN) + return 0; +#endif + + return 1; + } + + return 0; } -#endif /* __KERNEL__ */ /* * Detect a mismatched features2 field. Older kernels read/wrote @@ -332,123 +336,127 @@ static inline int xfs_sb_has_mismatched_ static inline unsigned xfs_sb_version_tonew(unsigned v) { - return ((((v) == XFS_SB_VERSION_1) ? \ - 0 : \ - (((v) == XFS_SB_VERSION_2) ? \ - XFS_SB_VERSION_ATTRBIT : \ - (XFS_SB_VERSION_ATTRBIT | XFS_SB_VERSION_NLINKBIT))) | \ - XFS_SB_VERSION_4); + if (v == XFS_SB_VERSION_1) + return XFS_SB_VERSION_4; + + if (v == XFS_SB_VERSION_2) + return XFS_SB_VERSION_4 | XFS_SB_VERSION_ATTRBIT; + + return XFS_SB_VERSION_4 | XFS_SB_VERSION_ATTRBIT | + XFS_SB_VERSION_NLINKBIT; } static inline unsigned xfs_sb_version_toold(unsigned v) { - return (((v) & (XFS_SB_VERSION_QUOTABIT | XFS_SB_VERSION_ALIGNBIT)) ? \ - 0 : \ - (((v) & XFS_SB_VERSION_NLINKBIT) ? \ - XFS_SB_VERSION_3 : \ - (((v) & XFS_SB_VERSION_ATTRBIT) ? \ - XFS_SB_VERSION_2 : \ - XFS_SB_VERSION_1))); + if (v & (XFS_SB_VERSION_QUOTABIT | XFS_SB_VERSION_ALIGNBIT)) + return 0; + if (v & XFS_SB_VERSION_NLINKBIT) + return XFS_SB_VERSION_3; + if (v & XFS_SB_VERSION_ATTRBIT) + return XFS_SB_VERSION_2; + return XFS_SB_VERSION_1; } static inline int xfs_sb_version_hasattr(xfs_sb_t *sbp) { - return ((sbp)->sb_versionnum == XFS_SB_VERSION_2) || \ - ((sbp)->sb_versionnum == XFS_SB_VERSION_3) || \ - ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_ATTRBIT)); + return sbp->sb_versionnum == XFS_SB_VERSION_2 || + sbp->sb_versionnum == XFS_SB_VERSION_3 || + (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 && + (sbp->sb_versionnum & XFS_SB_VERSION_ATTRBIT)); } static inline void xfs_sb_version_addattr(xfs_sb_t *sbp) { - (sbp)->sb_versionnum = (((sbp)->sb_versionnum == XFS_SB_VERSION_1) ? \ - XFS_SB_VERSION_2 : \ - ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) ? \ - ((sbp)->sb_versionnum | XFS_SB_VERSION_ATTRBIT) : \ - (XFS_SB_VERSION_4 | XFS_SB_VERSION_ATTRBIT))); + if (sbp->sb_versionnum == XFS_SB_VERSION_1) + sbp->sb_versionnum = XFS_SB_VERSION_2; + else if (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) + sbp->sb_versionnum |= XFS_SB_VERSION_ATTRBIT; + else + sbp->sb_versionnum = XFS_SB_VERSION_4 | XFS_SB_VERSION_ATTRBIT; } static inline int xfs_sb_version_hasnlink(xfs_sb_t *sbp) { - return ((sbp)->sb_versionnum == XFS_SB_VERSION_3) || \ - ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_NLINKBIT)); + return sbp->sb_versionnum == XFS_SB_VERSION_3 || + (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 && + (sbp->sb_versionnum & XFS_SB_VERSION_NLINKBIT)); } static inline void xfs_sb_version_addnlink(xfs_sb_t *sbp) { - (sbp)->sb_versionnum = ((sbp)->sb_versionnum <= XFS_SB_VERSION_2 ? \ - XFS_SB_VERSION_3 : \ - ((sbp)->sb_versionnum | XFS_SB_VERSION_NLINKBIT)); + if (sbp->sb_versionnum <= XFS_SB_VERSION_2) + sbp->sb_versionnum = XFS_SB_VERSION_3; + else + sbp->sb_versionnum |= XFS_SB_VERSION_NLINKBIT; } static inline int xfs_sb_version_hasquota(xfs_sb_t *sbp) { - return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_QUOTABIT); + return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 && + (sbp->sb_versionnum & XFS_SB_VERSION_QUOTABIT); } static inline void xfs_sb_version_addquota(xfs_sb_t *sbp) { - (sbp)->sb_versionnum = \ - (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 ? \ - ((sbp)->sb_versionnum | XFS_SB_VERSION_QUOTABIT) : \ - (xfs_sb_version_tonew((sbp)->sb_versionnum) | \ - XFS_SB_VERSION_QUOTABIT)); + if (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) + sbp->sb_versionnum |= XFS_SB_VERSION_QUOTABIT; + else + sbp->sb_versionnum = xfs_sb_version_tonew(sbp->sb_versionnum) | + XFS_SB_VERSION_QUOTABIT; } static inline int xfs_sb_version_hasalign(xfs_sb_t *sbp) { - return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_ALIGNBIT); + return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 && + (sbp->sb_versionnum & XFS_SB_VERSION_ALIGNBIT); } static inline int xfs_sb_version_hasdalign(xfs_sb_t *sbp) { - return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_DALIGNBIT); + return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 && + (sbp->sb_versionnum & XFS_SB_VERSION_DALIGNBIT); } static inline int xfs_sb_version_hasshared(xfs_sb_t *sbp) { - return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_SHAREDBIT); + return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 && + (sbp->sb_versionnum & XFS_SB_VERSION_SHAREDBIT); } static inline int xfs_sb_version_hasdirv2(xfs_sb_t *sbp) { - return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_DIRV2BIT); + return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 && + (sbp->sb_versionnum & XFS_SB_VERSION_DIRV2BIT); } static inline int xfs_sb_version_haslogv2(xfs_sb_t *sbp) { - return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_LOGV2BIT); + return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 && + (sbp->sb_versionnum & XFS_SB_VERSION_LOGV2BIT); } static inline int xfs_sb_version_hasextflgbit(xfs_sb_t *sbp) { - return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_EXTFLGBIT); + return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 && + (sbp->sb_versionnum & XFS_SB_VERSION_EXTFLGBIT); } static inline int xfs_sb_version_hassector(xfs_sb_t *sbp) { - return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_SECTORBIT); + return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 && + (sbp->sb_versionnum & XFS_SB_VERSION_SECTORBIT); } static inline int xfs_sb_version_hasasciici(xfs_sb_t *sbp) { - return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ + return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 && (sbp->sb_versionnum & XFS_SB_VERSION_BORGBIT); } static inline int xfs_sb_version_hasmorebits(xfs_sb_t *sbp) { - return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT); + return XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 && + (sbp->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT); } /* @@ -463,22 +471,20 @@ static inline int xfs_sb_version_hasmore static inline int xfs_sb_version_haslazysbcount(xfs_sb_t *sbp) { - return (xfs_sb_version_hasmorebits(sbp) && \ - ((sbp)->sb_features2 & XFS_SB_VERSION2_LAZYSBCOUNTBIT)); + return xfs_sb_version_hasmorebits(sbp) && + (sbp->sb_features2 & XFS_SB_VERSION2_LAZYSBCOUNTBIT); } static inline int xfs_sb_version_hasattr2(xfs_sb_t *sbp) { - return (xfs_sb_version_hasmorebits(sbp)) && \ - ((sbp)->sb_features2 & XFS_SB_VERSION2_ATTR2BIT); + return xfs_sb_version_hasmorebits(sbp) && + (sbp->sb_features2 & XFS_SB_VERSION2_ATTR2BIT); } static inline void xfs_sb_version_addattr2(xfs_sb_t *sbp) { - ((sbp)->sb_versionnum = \ - ((sbp)->sb_versionnum | XFS_SB_VERSION_MOREBITSBIT), \ - ((sbp)->sb_features2 = \ - ((sbp)->sb_features2 | XFS_SB_VERSION2_ATTR2BIT))); + sbp->sb_versionnum |= XFS_SB_VERSION_MOREBITSBIT; + sbp->sb_features2 |= XFS_SB_VERSION2_ATTR2BIT; } static inline void xfs_sb_version_removeattr2(xfs_sb_t *sbp) -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:06:52 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_63 autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2G6qLc031621 for ; Tue, 2 Dec 2008 10:06:52 -0600 X-ASG-Debug-ID: 1228234011-6da201700000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 41E84164F1BF for ; Tue, 2 Dec 2008 08:06:52 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id dHWBv2Q59089jHMG for ; Tue, 02 Dec 2008 08:06:52 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xlz-0007Vh-QO for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:51 +0000 Message-Id: <20081202160651.749289000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:45 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 15/22] replace b_fspriv with b_mount Subject: [patch 15/22] replace b_fspriv with b_mount Content-Disposition: inline; filename=xfs-add-bp_mount-field X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234012 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com Replace the b_fspriv pointer and it's ugly accessors with a properly types xfs_mount pointer. Also switch log reocvery over to it instead of using b_fspriv for the mount pointer. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_buf.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_buf.c 2008-11-15 15:27:32.000000000 +0100 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_buf.c 2008-11-15 15:28:01.000000000 +0100 @@ -1085,7 +1085,7 @@ xfs_bawrite( bp->b_flags &= ~(XBF_READ | XBF_DELWRI | XBF_READ_AHEAD); bp->b_flags |= (XBF_WRITE | XBF_ASYNC | _XBF_RUN_QUEUES); - bp->b_fspriv3 = mp; + bp->b_mount = mp; bp->b_strat = xfs_bdstrat_cb; return xfs_bdstrat_cb(bp); } @@ -1098,7 +1098,7 @@ xfs_bdwrite( XB_TRACE(bp, "bdwrite", 0); bp->b_strat = xfs_bdstrat_cb; - bp->b_fspriv3 = mp; + bp->b_mount = mp; bp->b_flags &= ~XBF_READ; bp->b_flags |= (XBF_DELWRI | XBF_ASYNC); Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_buf.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_buf.h 2008-11-15 15:28:08.000000000 +0100 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_buf.h 2008-11-15 15:29:12.000000000 +0100 @@ -168,7 +168,7 @@ typedef struct xfs_buf { struct completion b_iowait; /* queue for I/O waiters */ void *b_fspriv; void *b_fspriv2; - void *b_fspriv3; + struct xfs_mount *b_mount; unsigned short b_error; /* error code on I/O */ unsigned int b_page_count; /* size of page array */ unsigned int b_offset; /* page offset in first page */ @@ -335,8 +335,6 @@ extern void xfs_buf_trace(xfs_buf_t *, c #define XFS_BUF_SET_FSPRIVATE(bp, val) ((bp)->b_fspriv = (void*)(val)) #define XFS_BUF_FSPRIVATE2(bp, type) ((type)(bp)->b_fspriv2) #define XFS_BUF_SET_FSPRIVATE2(bp, val) ((bp)->b_fspriv2 = (void*)(val)) -#define XFS_BUF_FSPRIVATE3(bp, type) ((type)(bp)->b_fspriv3) -#define XFS_BUF_SET_FSPRIVATE3(bp, val) ((bp)->b_fspriv3 = (void*)(val)) #define XFS_BUF_SET_START(bp) do { } while (0) #define XFS_BUF_SET_BRELSE_FUNC(bp, func) ((bp)->b_relse = (func)) 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 2008-11-15 15:25:29.000000000 +0100 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c 2008-11-15 15:26:27.000000000 +0100 @@ -847,13 +847,7 @@ retry: int xfs_bdstrat_cb(struct xfs_buf *bp) { - xfs_mount_t *mp; - - mp = XFS_BUF_FSPRIVATE3(bp, xfs_mount_t *); - if (!XFS_FORCED_SHUTDOWN(mp)) { - xfs_buf_iorequest(bp); - return 0; - } else { + if (XFS_FORCED_SHUTDOWN(bp->b_mount)) { xfs_buftrace("XFS__BDSTRAT IOERROR", bp); /* * Metadata write that didn't get logged but @@ -866,6 +860,9 @@ xfs_bdstrat_cb(struct xfs_buf *bp) else return (xfs_bioerror(bp)); } + + xfs_buf_iorequest(bp); + return 0; } /* Index: linux-2.6-xfs/fs/xfs/xfs_buf_item.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_buf_item.c 2008-11-15 15:24:38.000000000 +0100 +++ linux-2.6-xfs/fs/xfs/xfs_buf_item.c 2008-11-15 15:25:05.000000000 +0100 @@ -707,8 +707,8 @@ xfs_buf_item_init( * the first. If we do already have one, there is * nothing to do here so return. */ - if (XFS_BUF_FSPRIVATE3(bp, xfs_mount_t *) != mp) - XFS_BUF_SET_FSPRIVATE3(bp, mp); + if (bp->b_mount != mp) + bp->b_mount = mp; XFS_BUF_SET_BDSTRAT_FUNC(bp, xfs_bdstrat_cb); if (XFS_BUF_FSPRIVATE(bp, void *) != NULL) { lip = XFS_BUF_FSPRIVATE(bp, xfs_log_item_t *); Index: linux-2.6-xfs/fs/xfs/xfs_rw.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_rw.c 2008-11-15 15:26:37.000000000 +0100 +++ linux-2.6-xfs/fs/xfs/xfs_rw.c 2008-11-15 15:27:17.000000000 +0100 @@ -406,7 +406,7 @@ xfs_bwrite( * XXXsup how does this work for quotas. */ XFS_BUF_SET_BDSTRAT_FUNC(bp, xfs_bdstrat_cb); - XFS_BUF_SET_FSPRIVATE3(bp, mp); + bp->b_mount = mp; XFS_BUF_WRITE(bp); if ((error = XFS_bwrite(bp))) { Index: linux-2.6-xfs/fs/xfs/xfs_log_recover.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_log_recover.c 2008-11-15 15:31:41.000000000 +0100 +++ linux-2.6-xfs/fs/xfs/xfs_log_recover.c 2008-11-15 15:35:12.000000000 +0100 @@ -267,21 +267,16 @@ STATIC void xlog_recover_iodone( struct xfs_buf *bp) { - xfs_mount_t *mp; - - ASSERT(XFS_BUF_FSPRIVATE(bp, void *)); - if (XFS_BUF_GETERROR(bp)) { /* * We're not going to bother about retrying * this during recovery. One strike! */ - mp = XFS_BUF_FSPRIVATE(bp, xfs_mount_t *); xfs_ioerror_alert("xlog_recover_iodone", - mp, bp, XFS_BUF_ADDR(bp)); - xfs_force_shutdown(mp, SHUTDOWN_META_IO_ERROR); + bp->b_mount, bp, XFS_BUF_ADDR(bp)); + xfs_force_shutdown(bp->b_mount, SHUTDOWN_META_IO_ERROR); } - XFS_BUF_SET_FSPRIVATE(bp, NULL); + bp->b_mount = NULL; XFS_BUF_CLR_IODONE_FUNC(bp); xfs_biodone(bp); } @@ -2225,9 +2220,8 @@ xlog_recover_do_buffer_trans( XFS_BUF_STALE(bp); error = xfs_bwrite(mp, bp); } else { - ASSERT(XFS_BUF_FSPRIVATE(bp, void *) == NULL || - XFS_BUF_FSPRIVATE(bp, xfs_mount_t *) == mp); - XFS_BUF_SET_FSPRIVATE(bp, mp); + ASSERT(bp->b_mount == NULL || bp->b_mount == mp); + bp->b_mount = mp; XFS_BUF_SET_IODONE_FUNC(bp, xlog_recover_iodone); xfs_bdwrite(mp, bp); } @@ -2490,9 +2484,8 @@ xlog_recover_do_inode_trans( write_inode_buffer: if (ITEM_TYPE(item) == XFS_LI_INODE) { - ASSERT(XFS_BUF_FSPRIVATE(bp, void *) == NULL || - XFS_BUF_FSPRIVATE(bp, xfs_mount_t *) == mp); - XFS_BUF_SET_FSPRIVATE(bp, mp); + ASSERT(bp->b_mount == NULL || bp->b_mount == mp); + bp->b_mount = mp; XFS_BUF_SET_IODONE_FUNC(bp, xlog_recover_iodone); xfs_bdwrite(mp, bp); } else { @@ -2623,9 +2616,8 @@ xlog_recover_do_dquot_trans( memcpy(ddq, recddq, item->ri_buf[1].i_len); ASSERT(dq_f->qlf_size == 2); - ASSERT(XFS_BUF_FSPRIVATE(bp, void *) == NULL || - XFS_BUF_FSPRIVATE(bp, xfs_mount_t *) == mp); - XFS_BUF_SET_FSPRIVATE(bp, mp); + ASSERT(bp->b_mount == NULL || bp->b_mount == mp); + bp->b_mount = mp; XFS_BUF_SET_IODONE_FUNC(bp, xlog_recover_iodone); xfs_bdwrite(mp, bp); -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:06:52 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2G6qd8031616 for ; Tue, 2 Dec 2008 10:06:52 -0600 X-ASG-Debug-ID: 1228234011-5d7002320000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 3506B164F1B5 for ; Tue, 2 Dec 2008 08:06:52 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id HQ2E34FPn3P5VFXO for ; Tue, 02 Dec 2008 08:06:52 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xlz-0007UY-La for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:51 +0000 Message-Id: <20081202160651.583993000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:44 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 14/22] remove leftovers of shared read-only support Subject: [patch 14/22] remove leftovers of shared read-only support Content-Disposition: inline; filename=xfs-kill-m_mk_sharedro X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234012 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com We never supported shared read-only filesystems, so remove the dead code left over from IRIX for it. Signed-off-by: Christoph Hellwig Index: xfs-master/fs/xfs/xfs_mount.c =================================================================== --- xfs-master.orig/fs/xfs/xfs_mount.c 2008-12-01 19:26:02.000000000 +0100 +++ xfs-master/fs/xfs/xfs_mount.c 2008-12-01 19:28:02.000000000 +0100 @@ -1352,24 +1352,6 @@ xfs_log_sbcount( return error; } -STATIC void -xfs_mark_shared_ro( - xfs_mount_t *mp, - xfs_buf_t *bp) -{ - xfs_dsb_t *sb = XFS_BUF_TO_SBP(bp); - __uint16_t version; - - if (!(sb->sb_flags & XFS_SBF_READONLY)) - sb->sb_flags |= XFS_SBF_READONLY; - - version = be16_to_cpu(sb->sb_versionnum); - if ((version & XFS_SB_VERSION_NUMBITS) != XFS_SB_VERSION_4 || - !(version & XFS_SB_VERSION_SHAREDBIT)) - version |= XFS_SB_VERSION_SHAREDBIT; - sb->sb_versionnum = cpu_to_be16(version); -} - int xfs_unmountfs_writesb(xfs_mount_t *mp) { @@ -1385,12 +1367,6 @@ xfs_unmountfs_writesb(xfs_mount_t *mp) sbp = xfs_getsb(mp, 0); - /* - * mark shared-readonly if desired - */ - if (mp->m_mk_sharedro) - xfs_mark_shared_ro(mp, sbp); - XFS_BUF_UNDONE(sbp); XFS_BUF_UNREAD(sbp); XFS_BUF_UNDELAYWRITE(sbp); @@ -1402,8 +1378,6 @@ xfs_unmountfs_writesb(xfs_mount_t *mp) if (error) xfs_ioerror_alert("xfs_unmountfs_writesb", mp, sbp, XFS_BUF_ADDR(sbp)); - if (error && mp->m_mk_sharedro) - xfs_fs_cmn_err(CE_ALERT, mp, "Superblock write error detected while unmounting. Filesystem may not be marked shared readonly"); xfs_buf_relse(sbp); } return error; Index: xfs-master/fs/xfs/xfs_mount.h =================================================================== --- xfs-master.orig/fs/xfs/xfs_mount.h 2008-12-01 19:27:59.000000000 +0100 +++ xfs-master/fs/xfs/xfs_mount.h 2008-12-01 19:28:02.000000000 +0100 @@ -301,7 +301,6 @@ typedef struct xfs_mount { int m_sinoalign; /* stripe unit inode alignment */ int m_attr_magicpct;/* 37% of the blocksize */ int m_dir_magicpct; /* 37% of the dir blocksize */ - __uint8_t m_mk_sharedro; /* mark shared ro on unmount */ __uint8_t m_sectbb_log; /* sectlog - BBSHIFT */ const struct xfs_nameops *m_dirnameops; /* vector of dir name ops */ int m_dirblksize; /* directory block sz--bytes */ Index: xfs-master/fs/xfs/linux-2.6/xfs_super.c =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_super.c 2008-12-01 19:27:52.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_super.c 2008-12-01 19:28:02.000000000 +0100 @@ -1388,35 +1388,6 @@ xfs_finish_flags( return XFS_ERROR(EROFS); } -#if 0 /* shared mounts were never supported on Linux */ - /* - * check for shared mount. - */ - if (ap->flags & XFSMNT_SHARED) { - if (!xfs_sb_version_hasshared(&mp->m_sb)) - return XFS_ERROR(EINVAL); - - /* - * For IRIX 6.5, shared mounts must have the shared - * version bit set, have the persistent readonly - * field set, must be version 0 and can only be mounted - * read-only. - */ - if (!ronly || !(mp->m_sb.sb_flags & XFS_SBF_READONLY) || - (mp->m_sb.sb_shared_vn != 0)) - return XFS_ERROR(EINVAL); - - mp->m_flags |= XFS_MOUNT_SHARED; - - /* - * Shared XFS V0 can't deal with DMI. Return EINVAL. - */ - if (mp->m_sb.sb_shared_vn == 0 && - (mp->m_flags & XFS_MOUNT_DMAPI)) - return XFS_ERROR(EINVAL); - } -#endif - return 0; } -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:06:52 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2G6pSn031610 for ; Tue, 2 Dec 2008 10:06:52 -0600 X-ASG-Debug-ID: 1228234010-619902170000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id AB6F6164F1B5 for ; Tue, 2 Dec 2008 08:06:50 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id V8KE82WzWFfDw80p for ; Tue, 02 Dec 2008 08:06:50 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xly-0007Ke-9i for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:50 +0000 Message-Id: <20081202160650.198364000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:35 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 05/22] cleanup the inode reclaim path Subject: [patch 05/22] cleanup the inode reclaim path Content-Disposition: inline; filename=xfs-cleanup-xfs_ireclaim X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234010 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com Merge xfs_iextract and xfs_idestory into xfs_ireclaim as they are never called individually. Also rewrite most comments in this area as they were serverly out of date. Signed-off-by: Christoph Hellwig Index: xfs-master/fs/xfs/xfs_iget.c =================================================================== --- xfs-master.orig/fs/xfs/xfs_iget.c 2008-12-01 19:26:04.000000000 +0100 +++ xfs-master/fs/xfs/xfs_iget.c 2008-12-01 19:27:15.000000000 +0100 @@ -450,65 +450,109 @@ xfs_iput_new( IRELE(ip); } - /* - * This routine embodies the part of the reclaim code that pulls - * the inode from the inode hash table and the mount structure's - * inode list. - * This should only be called from xfs_reclaim(). + * This is called free all the memory associated with an inode. + * It must free the inode itself and any buffers allocated for + * if_extents/if_data and if_broot. It must also free the lock + * associated with the inode. + * + * Note: because we don't initialise everything on reallocation out + * of the zone, we must ensure we nullify everything correctly before + * freeing the structure. */ void -xfs_ireclaim(xfs_inode_t *ip) +xfs_ireclaim( + struct xfs_inode *ip) { - /* - * Remove from old hash list and mount list. - */ - XFS_STATS_INC(xs_ig_reclaims); + struct xfs_mount *mp = ip->i_mount; + struct xfs_perag *pag; - xfs_iextract(ip); + XFS_STATS_INC(xs_ig_reclaims); /* - * Here we do a spurious inode lock in order to coordinate with inode - * cache radix tree lookups. This is because the lookup can reference - * the inodes in the cache without taking references. We make that OK - * here by ensuring that we wait until the inode is unlocked after the - * lookup before we go ahead and free it. We get both the ilock and - * the iolock because the code may need to drop the ilock one but will - * still hold the iolock. + * Remove the inode from the per-AG radix tree. It doesn't matter + * if it was never added to it because radix_tree_delete can deal + * with that case just fine. */ - xfs_ilock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL); + pag = xfs_get_perag(mp, ip->i_ino); + write_lock(&pag->pag_ici_lock); + radix_tree_delete(&pag->pag_ici_root, XFS_INO_TO_AGINO(mp, ip->i_ino)); + write_unlock(&pag->pag_ici_lock); + xfs_put_perag(mp, pag); /* - * Release dquots (and their references) if any. An inode may escape - * xfs_inactive and get here via vn_alloc->vn_reclaim path. + * Here we do an (almost) spurious inode lock in order to coordinate + * with inode cache radix tree lookups. This is because the lookup + * can reference the inodes in the cache without taking references. + * + * We make that OK here by ensuring that we wait until the inode is + * unlocked after the lookup before we go ahead and free it. We get + * both the ilock and the iolock because the code may need to drop the + * ilock one but will still hold the iolock. */ - XFS_QM_DQDETACH(ip->i_mount, ip); - + xfs_ilock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL); /* - * Free all memory associated with the inode. + * Release dquots (and their references) if any. */ + XFS_QM_DQDETACH(ip->i_mount, ip); xfs_iunlock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL); - xfs_idestroy(ip); -} -/* - * This routine removes an about-to-be-destroyed inode from - * all of the lists in which it is located with the exception - * of the behavior chain. - */ -void -xfs_iextract( - xfs_inode_t *ip) -{ - xfs_mount_t *mp = ip->i_mount; - xfs_perag_t *pag = xfs_get_perag(mp, ip->i_ino); + switch (ip->i_d.di_mode & S_IFMT) { + case S_IFREG: + case S_IFDIR: + case S_IFLNK: + xfs_idestroy_fork(ip, XFS_DATA_FORK); + break; + } - write_lock(&pag->pag_ici_lock); - radix_tree_delete(&pag->pag_ici_root, XFS_INO_TO_AGINO(mp, ip->i_ino)); - write_unlock(&pag->pag_ici_lock); - xfs_put_perag(mp, pag); + if (ip->i_afp) + xfs_idestroy_fork(ip, XFS_ATTR_FORK); + +#ifdef XFS_INODE_TRACE + ktrace_free(ip->i_trace); +#endif +#ifdef XFS_BMAP_TRACE + ktrace_free(ip->i_xtrace); +#endif +#ifdef XFS_BTREE_TRACE + ktrace_free(ip->i_btrace); +#endif +#ifdef XFS_RW_TRACE + ktrace_free(ip->i_rwtrace); +#endif +#ifdef XFS_ILOCK_TRACE + ktrace_free(ip->i_lock_trace); +#endif +#ifdef XFS_DIR2_TRACE + ktrace_free(ip->i_dir_trace); +#endif + if (ip->i_itemp) { + /* + * Only if we are shutting down the fs will we see an + * inode still in the AIL. If it is there, we should remove + * it to prevent a use-after-free from occurring. + */ + xfs_log_item_t *lip = &ip->i_itemp->ili_item; + struct xfs_ail *ailp = lip->li_ailp; - mp->m_ireclaims++; + ASSERT(((lip->li_flags & XFS_LI_IN_AIL) == 0) || + XFS_FORCED_SHUTDOWN(ip->i_mount)); + if (lip->li_flags & XFS_LI_IN_AIL) { + spin_lock(&ailp->xa_lock); + if (lip->li_flags & XFS_LI_IN_AIL) + xfs_trans_ail_delete(ailp, lip); + else + spin_unlock(&ailp->xa_lock); + } + xfs_inode_item_destroy(ip); + ip->i_itemp = NULL; + } + /* asserts to verify all state is correct here */ + ASSERT(atomic_read(&ip->i_iocount) == 0); + ASSERT(atomic_read(&ip->i_pincount) == 0); + ASSERT(!spin_is_locked(&ip->i_flags_lock)); + ASSERT(completion_done(&ip->i_flush)); + kmem_zone_free(xfs_inode_zone, ip); } /* Index: xfs-master/fs/xfs/xfs_inode.h =================================================================== --- xfs-master.orig/fs/xfs/xfs_inode.h 2008-12-01 19:26:04.000000000 +0100 +++ xfs-master/fs/xfs/xfs_inode.h 2008-12-01 19:27:15.000000000 +0100 @@ -531,8 +531,6 @@ int xfs_itruncate_finish(struct xfs_tra xfs_fsize_t, int, int); int xfs_iunlink(struct xfs_trans *, xfs_inode_t *); -void xfs_idestroy(xfs_inode_t *); -void xfs_iextract(xfs_inode_t *); void xfs_iext_realloc(xfs_inode_t *, int, int); void xfs_ipin(xfs_inode_t *); void xfs_iunpin(xfs_inode_t *); Index: xfs-master/fs/xfs/xfs_mount.h =================================================================== --- xfs-master.orig/fs/xfs/xfs_mount.h 2008-12-01 19:26:35.000000000 +0100 +++ xfs-master/fs/xfs/xfs_mount.h 2008-12-01 19:27:15.000000000 +0100 @@ -241,7 +241,6 @@ typedef struct xfs_mount { xfs_agnumber_t m_agirotor; /* last ag dir inode alloced */ spinlock_t m_agirotor_lock;/* .. and lock protecting it */ xfs_agnumber_t m_maxagi; /* highest inode alloc group */ - uint m_ireclaims; /* count of calls to reclaim*/ uint m_readio_log; /* min read size log bytes */ uint m_readio_blocks; /* min read size blocks */ uint m_writeio_log; /* min write size log bytes */ Index: xfs-master/fs/xfs/xfs_inode.c =================================================================== --- xfs-master.orig/fs/xfs/xfs_inode.c 2008-12-01 19:26:04.000000000 +0100 +++ xfs-master/fs/xfs/xfs_inode.c 2008-12-01 19:27:15.000000000 +0100 @@ -2450,78 +2450,6 @@ xfs_idestroy_fork( } /* - * This is called free all the memory associated with an inode. - * It must free the inode itself and any buffers allocated for - * if_extents/if_data and if_broot. It must also free the lock - * associated with the inode. - * - * Note: because we don't initialise everything on reallocation out - * of the zone, we must ensure we nullify everything correctly before - * freeing the structure. - */ -void -xfs_idestroy( - xfs_inode_t *ip) -{ - switch (ip->i_d.di_mode & S_IFMT) { - case S_IFREG: - case S_IFDIR: - case S_IFLNK: - xfs_idestroy_fork(ip, XFS_DATA_FORK); - break; - } - if (ip->i_afp) - xfs_idestroy_fork(ip, XFS_ATTR_FORK); - -#ifdef XFS_INODE_TRACE - ktrace_free(ip->i_trace); -#endif -#ifdef XFS_BMAP_TRACE - ktrace_free(ip->i_xtrace); -#endif -#ifdef XFS_BTREE_TRACE - ktrace_free(ip->i_btrace); -#endif -#ifdef XFS_RW_TRACE - ktrace_free(ip->i_rwtrace); -#endif -#ifdef XFS_ILOCK_TRACE - ktrace_free(ip->i_lock_trace); -#endif -#ifdef XFS_DIR2_TRACE - ktrace_free(ip->i_dir_trace); -#endif - if (ip->i_itemp) { - /* - * Only if we are shutting down the fs will we see an - * inode still in the AIL. If it is there, we should remove - * it to prevent a use-after-free from occurring. - */ - xfs_log_item_t *lip = &ip->i_itemp->ili_item; - struct xfs_ail *ailp = lip->li_ailp; - - ASSERT(((lip->li_flags & XFS_LI_IN_AIL) == 0) || - XFS_FORCED_SHUTDOWN(ip->i_mount)); - if (lip->li_flags & XFS_LI_IN_AIL) { - spin_lock(&ailp->xa_lock); - if (lip->li_flags & XFS_LI_IN_AIL) - xfs_trans_ail_delete(ailp, lip); - else - spin_unlock(&ailp->xa_lock); - } - xfs_inode_item_destroy(ip); - ip->i_itemp = NULL; - } - /* asserts to verify all state is correct here */ - ASSERT(atomic_read(&ip->i_iocount) == 0); - ASSERT(atomic_read(&ip->i_pincount) == 0); - ASSERT(!spin_is_locked(&ip->i_flags_lock)); - ASSERT(completion_done(&ip->i_flush)); - kmem_zone_free(xfs_inode_zone, ip); -} - - -/* * Increment the pin count of the given buffer. * This value is protected by ipinlock spinlock in the mount structure. */ -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:06:52 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2G6oYX031609 for ; Tue, 2 Dec 2008 10:06:52 -0600 X-ASG-Debug-ID: 1228234010-5d7002310000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 47FCF164F1B5 for ; Tue, 2 Dec 2008 08:06:50 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id 4hTfaFm5u4hWYr9L for ; Tue, 02 Dec 2008 08:06:50 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xlx-0007Hp-Si for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:49 +0000 Message-Id: <20081202160649.790190000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:32 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 02/22] remove useless mnt_want_write call in xfs_write Subject: [patch 02/22] remove useless mnt_want_write call in xfs_write Content-Disposition: inline; filename=xfs-remove-mnt_want_write X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234010 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com When mnt_want_write was introduced a call to it was added around xfs_ichgtime, but there is no need for this because a file can't be open read/write on a r/o mount, and a mount can't degrade r/o while we still have files open for writing. As the mnt_want_write changes were never merged into the CVS tree this patch is for mainline only. Signed-off-by: Christoph Hellwig --- linux-2.6/fs/xfs/linux-2.6/xfs_lrw.c 2008-08-14 14:52:15.000000000 -0300 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_lrw.c 2008-08-14 14:54:53.000000000 -0300 @@ -51,7 +51,6 @@ #include "xfs_vnodeops.h" #include -#include #include @@ -668,15 +667,8 @@ start: if (new_size > xip->i_size) xip->i_new_size = new_size; - /* - * We're not supposed to change timestamps in readonly-mounted - * filesystems. Throw it away if anyone asks us. - */ - if (likely(!(ioflags & IO_INVIS) && - !mnt_want_write(file->f_path.mnt))) { + if (likely(!(ioflags & IO_INVIS))) xfs_ichgtime(xip, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); - mnt_drop_write(file->f_path.mnt); - } /* * If the offset is beyond the size of the file, we have a couple -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:06:53 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2G6rjX031657 for ; Tue, 2 Dec 2008 10:06:53 -0600 X-ASG-Debug-ID: 1228234012-5c7b02810000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id A0F05164F1BF for ; Tue, 2 Dec 2008 08:06:52 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id cShg7ZyyzIlhVF75 for ; Tue, 02 Dec 2008 08:06:52 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xm0-0007YW-92 for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:52 +0000 Message-Id: <20081202160652.147347000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:48 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 18/22] kill xfs_unmount_flush Subject: [patch 18/22] kill xfs_unmount_flush Content-Disposition: inline; filename=xfs-kill-xfs_unmountfs_flush X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234012 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com There's almost nothing left in this function, instead remove the IRELE on the real times inodes and the call to XFS_QM_UNMOUNT into xfs_unmountfs. For the regular unmount case that means it now also happenes after dmapi notification, but otherwise there is no difference in behaviour. Signed-off-by: Christoph Hellwig Index: xfs-master/fs/xfs/xfs_mount.c =================================================================== --- xfs-master.orig/fs/xfs/xfs_mount.c 2008-12-01 19:28:02.000000000 +0100 +++ xfs-master/fs/xfs/xfs_mount.c 2008-12-01 19:28:11.000000000 +0100 @@ -1220,6 +1220,16 @@ xfs_unmountfs( __uint64_t resblks; int error; + /* + * Release dquot that rootinode, rbmino and rsumino might be holding, + * and release the quota inodes. + */ + XFS_QM_UNMOUNT(mp); + + if (mp->m_rbmip) + IRELE(mp->m_rbmip); + if (mp->m_rsumip) + IRELE(mp->m_rsumip); IRELE(mp->m_rootip); /* Index: xfs-master/fs/xfs/xfs_mount.h =================================================================== --- xfs-master.orig/fs/xfs/xfs_mount.h 2008-12-01 19:28:08.000000000 +0100 +++ xfs-master/fs/xfs/xfs_mount.h 2008-12-01 19:28:11.000000000 +0100 @@ -510,7 +510,6 @@ extern void xfs_mountfs_check_barriers(x extern void xfs_unmountfs(xfs_mount_t *); extern int xfs_unmountfs_writesb(xfs_mount_t *); -extern int xfs_unmount_flush(xfs_mount_t *, int); extern int xfs_mod_incore_sb(xfs_mount_t *, xfs_sb_field_t, int64_t, int); extern int xfs_mod_incore_sb_unlocked(xfs_mount_t *, xfs_sb_field_t, int64_t, int); Index: xfs-master/fs/xfs/xfs_vfsops.c =================================================================== --- xfs-master.orig/fs/xfs/xfs_vfsops.c 2008-12-01 19:28:07.000000000 +0100 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. - * All Rights Reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -#include "xfs.h" -#include "xfs_fs.h" -#include "xfs_types.h" -#include "xfs_bit.h" -#include "xfs_log.h" -#include "xfs_inum.h" -#include "xfs_trans.h" -#include "xfs_sb.h" -#include "xfs_ag.h" -#include "xfs_dir2.h" -#include "xfs_dmapi.h" -#include "xfs_mount.h" -#include "xfs_da_btree.h" -#include "xfs_bmap_btree.h" -#include "xfs_ialloc_btree.h" -#include "xfs_alloc_btree.h" -#include "xfs_dir2_sf.h" -#include "xfs_attr_sf.h" -#include "xfs_dinode.h" -#include "xfs_inode.h" -#include "xfs_inode_item.h" -#include "xfs_btree.h" -#include "xfs_alloc.h" -#include "xfs_ialloc.h" -#include "xfs_quota.h" -#include "xfs_error.h" -#include "xfs_bmap.h" -#include "xfs_rw.h" -#include "xfs_buf_item.h" -#include "xfs_log_priv.h" -#include "xfs_dir2_trace.h" -#include "xfs_extfree_item.h" -#include "xfs_acl.h" -#include "xfs_attr.h" -#include "xfs_mru_cache.h" -#include "xfs_filestream.h" -#include "xfs_fsops.h" -#include "xfs_vnodeops.h" -#include "xfs_utils.h" -#include "xfs_sync.h" - - -/* - * xfs_unmount_flush implements a set of flush operation on special - * inodes, which are needed as a separate set of operations so that - * they can be called as part of relocation process. - */ -int -xfs_unmount_flush( - xfs_mount_t *mp, /* Mount structure we are getting - rid of. */ - int relocation) /* Called from vfs relocation. */ -{ - /* - * Release dquot that rootinode, rbmino and rsumino might be holding, - * flush and purge the quota inodes. - */ - XFS_QM_UNMOUNT(mp); - - if (mp->m_rbmip) - IRELE(mp->m_rbmip); - if (mp->m_rsumip) - IRELE(mp->m_rsumip); - - return 0; -} Index: xfs-master/fs/xfs/linux-2.6/xfs_super.c =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_super.c 2008-12-01 19:28:02.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_super.c 2008-12-01 19:28:11.000000000 +0100 @@ -1043,7 +1043,6 @@ xfs_fs_put_super( struct xfs_mount *mp = XFS_M(sb); struct xfs_inode *rip = mp->m_rootip; int unmount_event_flags = 0; - int error; xfs_syncd_stop(mp); xfs_sync_inodes(mp, SYNC_ATTR|SYNC_DELWRI); @@ -1071,8 +1070,6 @@ xfs_fs_put_super( xfs_filestream_unmount(mp); XFS_bflush(mp->m_ddev_targp); - error = xfs_unmount_flush(mp, 0); - WARN_ON(error); if (mp->m_flags & XFS_MOUNT_DMAPI) { XFS_SEND_UNMOUNT(mp, rip, DM_RIGHT_NULL, 0, 0, @@ -1535,8 +1532,6 @@ xfs_fs_fill_super( xfs_filestream_unmount(mp); XFS_bflush(mp->m_ddev_targp); - error = xfs_unmount_flush(mp, 0); - WARN_ON(error); xfs_unmountfs(mp); goto out_free_sb; Index: xfs-master/fs/xfs/Makefile =================================================================== --- xfs-master.orig/fs/xfs/Makefile 2008-12-01 19:26:35.000000000 +0100 +++ xfs-master/fs/xfs/Makefile 2008-12-01 19:28:11.000000000 +0100 @@ -85,7 +85,6 @@ xfs-y += xfs_alloc.o \ xfs_trans_inode.o \ xfs_trans_item.o \ xfs_utils.o \ - xfs_vfsops.o \ xfs_vnodeops.o \ xfs_rw.o \ xfs_dmops.o \ -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:06:53 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-4.1 required=5.0 tests=AWL,BAYES_00,LOCAL_GNU_PATCH autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2G6ra0031671 for ; Tue, 2 Dec 2008 10:06:53 -0600 X-ASG-Debug-ID: 1228234012-5c7d02620000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 0C3F3164F1BF for ; Tue, 2 Dec 2008 08:06:52 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id ZEn7HJiDezutfwce for ; Tue, 02 Dec 2008 08:06:52 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xm0-0007dc-Ls for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:52 +0000 Message-Id: <20081202160652.542003000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:50 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 20/22] move vn_iowait / vn_iowake into xfs_aops.c Subject: [patch 20/22] move vn_iowait / vn_iowake into xfs_aops.c Content-Disposition: inline; filename=xfs-move-vn_iowait X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234013 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com The whole machinery to wait on I/O completion is related to the I/O path and should be there instead of in xfs_vnode.c. Also give the functions more descriptive names. Signed-off-by: Christoph Hellwig Index: xfs-master/fs/xfs/linux-2.6/xfs_aops.c =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_aops.c 2008-12-02 11:26:38.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_aops.c 2008-12-02 11:26:47.000000000 +0100 @@ -42,6 +42,40 @@ #include #include + +/* + * Prime number of hash buckets since address is used as the key. + */ +#define NVSYNC 37 +#define to_ioend_wq(v) (&xfs_ioend_wq[((unsigned long)v) % NVSYNC]) +static wait_queue_head_t xfs_ioend_wq[NVSYNC]; + +void __init +xfs_ioend_init(void) +{ + int i; + + for (i = 0; i < NVSYNC; i++) + init_waitqueue_head(&xfs_ioend_wq[i]); +} + +void +xfs_ioend_wait( + xfs_inode_t *ip) +{ + wait_queue_head_t *wq = to_ioend_wq(ip); + + wait_event(*wq, (atomic_read(&ip->i_iocount) == 0)); +} + +STATIC void +xfs_ioend_wake( + xfs_inode_t *ip) +{ + if (atomic_dec_and_test(&ip->i_iocount)) + wake_up(to_ioend_wq(ip)); +} + STATIC void xfs_count_page_state( struct page *page, @@ -164,7 +198,7 @@ xfs_destroy_ioend( __FILE__, __LINE__); } - vn_iowake(ip); + xfs_ioend_wake(ip); mempool_free(ioend, xfs_ioend_pool); } @@ -516,7 +550,7 @@ xfs_cancel_ioend( unlock_buffer(bh); } while ((bh = next_bh) != NULL); - vn_iowake(XFS_I(ioend->io_inode)); + xfs_ioend_wake(XFS_I(ioend->io_inode)); mempool_free(ioend, xfs_ioend_pool); } while ((ioend = next) != NULL); } Index: xfs-master/fs/xfs/linux-2.6/xfs_aops.h =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_aops.h 2008-12-02 11:24:22.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_aops.h 2008-12-02 11:26:47.000000000 +0100 @@ -43,4 +43,7 @@ typedef struct xfs_ioend { extern const struct address_space_operations xfs_address_space_operations; extern int xfs_get_blocks(struct inode *, sector_t, struct buffer_head *, int); +extern void xfs_ioend_init(void); +extern void xfs_ioend_wait(struct xfs_inode *); + #endif /* __XFS_AOPS_H__ */ Index: xfs-master/fs/xfs/linux-2.6/xfs_super.c =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_super.c 2008-12-02 11:26:30.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_super.c 2008-12-02 11:26:47.000000000 +0100 @@ -1822,7 +1822,7 @@ init_xfs_fs(void) XFS_BUILD_OPTIONS " enabled\n"); ktrace_init(64); - vn_init(); + xfs_ioend_init(); xfs_dir_startup(); error = xfs_init_zones(); Index: xfs-master/fs/xfs/linux-2.6/xfs_sync.c =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_sync.c 2008-12-02 11:24:22.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_sync.c 2008-12-02 11:26:47.000000000 +0100 @@ -133,7 +133,7 @@ xfs_sync_inodes_ag( lock_flags |= XFS_IOLOCK_SHARED; error = xfs_flush_pages(ip, 0, -1, fflag, FI_NONE); if (flags & SYNC_IOWAIT) - vn_iowait(ip); + xfs_ioend_wait(ip); } xfs_ilock(ip, XFS_ILOCK_SHARED); Index: xfs-master/fs/xfs/linux-2.6/xfs_vnode.c =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_vnode.c 2008-12-02 11:26:38.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_vnode.c 2008-12-02 11:26:47.000000000 +0100 @@ -32,40 +32,6 @@ #include "xfs_mount.h" -/* - * Dedicated vnode inactive/reclaim sync wait queues. - * Prime number of hash buckets since address is used as the key. - */ -#define NVSYNC 37 -#define vptosync(v) (&vsync[((unsigned long)v) % NVSYNC]) -static wait_queue_head_t vsync[NVSYNC]; - -void __init -vn_init(void) -{ - int i; - - for (i = 0; i < NVSYNC; i++) - init_waitqueue_head(&vsync[i]); -} - -void -vn_iowait( - xfs_inode_t *ip) -{ - wait_queue_head_t *wq = vptosync(ip); - - wait_event(*wq, (atomic_read(&ip->i_iocount) == 0)); -} - -void -vn_iowake( - xfs_inode_t *ip) -{ - if (atomic_dec_and_test(&ip->i_iocount)) - wake_up(vptosync(ip)); -} - #ifdef XFS_INODE_TRACE #define KTRACE_ENTER(ip, vk, s, line, ra) \ Index: xfs-master/fs/xfs/linux-2.6/xfs_vnode.h =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_vnode.h 2008-12-02 11:26:38.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_vnode.h 2008-12-02 11:26:47.000000000 +0100 @@ -54,16 +54,6 @@ struct attrlist_cursor_kern; Prevent VM access to the pages until the operation completes. */ - -extern void vn_init(void); - -/* - * Yeah, these don't take vnode anymore at all, all this should be - * cleaned up at some point. - */ -extern void vn_iowait(struct xfs_inode *ip); -extern void vn_iowake(struct xfs_inode *ip); - #define IHOLD(ip) \ do { \ ASSERT(atomic_read(&VFS_I(ip)->i_count) > 0) ; \ Index: xfs-master/fs/xfs/xfs_inode.c =================================================================== --- xfs-master.orig/fs/xfs/xfs_inode.c 2008-12-02 11:24:22.000000000 +0100 +++ xfs-master/fs/xfs/xfs_inode.c 2008-12-02 11:26:47.000000000 +0100 @@ -1322,8 +1322,8 @@ xfs_itrunc_trace( * direct I/O with the truncate operation. Also, because we hold * the IOLOCK in exclusive mode, we prevent new direct I/Os from being * started until the truncate completes and drops the lock. Essentially, - * the vn_iowait() call forms an I/O barrier that provides strict ordering - * between direct I/Os and the truncate operation. + * the xfs_ioend_wait() call forms an I/O barrier that provides strict + * ordering between direct I/Os and the truncate operation. * * The flags parameter can have either the value XFS_ITRUNC_DEFINITE * or XFS_ITRUNC_MAYBE. The XFS_ITRUNC_MAYBE value should be used @@ -1354,7 +1354,7 @@ xfs_itruncate_start( /* wait for the completion of any pending DIOs */ if (new_size == 0 || new_size < ip->i_size) - vn_iowait(ip); + xfs_ioend_wait(ip); /* * Call toss_pages or flushinval_pages to get rid of pages Index: xfs-master/fs/xfs/xfs_vnodeops.c =================================================================== --- xfs-master.orig/fs/xfs/xfs_vnodeops.c 2008-12-02 11:24:22.000000000 +0100 +++ xfs-master/fs/xfs/xfs_vnodeops.c 2008-12-02 11:26:47.000000000 +0100 @@ -338,7 +338,7 @@ xfs_setattr( } /* wait for all I/O to complete */ - vn_iowait(ip); + xfs_ioend_wait(ip); if (!code) code = xfs_itruncate_data(ip, iattr->ia_size); @@ -2758,7 +2758,7 @@ xfs_reclaim( return 0; } - vn_iowait(ip); + xfs_ioend_wait(ip); ASSERT(XFS_FORCED_SHUTDOWN(ip->i_mount) || ip->i_delayed_blks == 0); @@ -3149,7 +3149,8 @@ xfs_free_file_space( need_iolock = 0; if (need_iolock) { xfs_ilock(ip, XFS_IOLOCK_EXCL); - vn_iowait(ip); /* wait for the completion of any pending DIOs */ + /* wait for the completion of any pending DIOs */ + xfs_ioend_wait(ip); } rounding = max_t(uint, 1 << mp->m_sb.sb_blocklog, PAGE_CACHE_SIZE); -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:07:21 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2G7Lox031738 for ; Tue, 2 Dec 2008 10:07:21 -0600 X-ASG-Debug-ID: 1228234040-60d502620000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id F10A3164F1E0 for ; Tue, 2 Dec 2008 08:07:20 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id MgcLIBZ1B2LVMaLy for ; Tue, 02 Dec 2008 08:07:20 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xly-0007Jd-4q for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:50 +0000 Message-Id: <20081202160650.066779000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:34 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 04/22] remove unused prototypes for xfs_ihash_init / xfs_ihash_free Subject: [patch 04/22] remove unused prototypes for xfs_ihash_init / xfs_ihash_free Content-Disposition: inline; filename=xfs-kill-xfs_ihash_init-exit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234040 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/xfs_inode.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_inode.h 2008-11-19 20:07:01.000000000 +0100 +++ linux-2.6-xfs/fs/xfs/xfs_inode.h 2008-11-19 20:07:05.000000000 +0100 @@ -493,8 +493,6 @@ static inline void xfs_ifunlock(xfs_inod /* * xfs_iget.c prototypes. */ -void xfs_ihash_init(struct xfs_mount *); -void xfs_ihash_free(struct xfs_mount *); xfs_inode_t *xfs_inode_incore(struct xfs_mount *, xfs_ino_t, struct xfs_trans *); int xfs_iget(struct xfs_mount *, struct xfs_trans *, xfs_ino_t, -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:07:52 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2G7qJg031846 for ; Tue, 2 Dec 2008 10:07:52 -0600 X-ASG-Debug-ID: 1228234071-60da02680000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 088C3164F1F7 for ; Tue, 2 Dec 2008 08:07:51 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id mjS26WKDOZhmpU2b for ; Tue, 02 Dec 2008 08:07:51 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xm1-0007eb-0g for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:53 +0000 Message-Id: <20081202160652.907502000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:52 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 22/22] use inode_change_ok for setattr permission checking Subject: [patch 22/22] use inode_change_ok for setattr permission checking Content-Disposition: inline; filename=xfs-setattr-use-inode_change_ok X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234072 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com Instead of implementing our own checks use inode_change_ok to check for necessary permission in setattr. There is a slight change in behaviour as inode_change_ok doesn't allow i_mode updates to add the suid or sgid without superuser privilegues while the old XFS code just stripped away those bits from the file mode. (First sent on Semptember 29th) Signed-off-by: Christoph Hellwig Index: xfs-master/fs/xfs/xfs_vnodeops.c =================================================================== --- xfs-master.orig/fs/xfs/xfs_vnodeops.c 2008-12-02 14:00:52.000000000 +0100 +++ xfs-master/fs/xfs/xfs_vnodeops.c 2008-12-02 14:00:52.000000000 +0100 @@ -70,7 +70,6 @@ xfs_setattr( gid_t gid=0, igid=0; int timeflags = 0; struct xfs_dquot *udqp, *gdqp, *olddquot1, *olddquot2; - int file_owner; int need_iolock = 1; xfs_itrace_entry(ip); @@ -81,6 +80,10 @@ xfs_setattr( if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); + code = -inode_change_ok(inode, iattr); + if (code) + return code; + olddquot1 = olddquot2 = NULL; udqp = gdqp = NULL; @@ -158,56 +161,6 @@ xfs_setattr( xfs_ilock(ip, lock_flags); - /* boolean: are we the file owner? */ - file_owner = (current_fsuid() == ip->i_d.di_uid); - - /* - * Change various properties of a file. - * Only the owner or users with CAP_FOWNER - * capability may do these things. - */ - if (mask & (ATTR_MODE|ATTR_UID|ATTR_GID)) { - /* - * CAP_FOWNER overrides the following restrictions: - * - * The user ID of the calling process must be equal - * to the file owner ID, except in cases where the - * CAP_FSETID capability is applicable. - */ - if (!file_owner && !capable(CAP_FOWNER)) { - code = XFS_ERROR(EPERM); - goto error_return; - } - - /* - * CAP_FSETID overrides the following restrictions: - * - * The effective user ID of the calling process shall match - * the file owner when setting the set-user-ID and - * set-group-ID bits on that file. - * - * The effective group ID or one of the supplementary group - * IDs of the calling process shall match the group owner of - * the file when setting the set-group-ID bit on that file - */ - if (mask & ATTR_MODE) { - mode_t m = 0; - - if ((iattr->ia_mode & S_ISUID) && !file_owner) - m |= S_ISUID; - if ((iattr->ia_mode & S_ISGID) && - !in_group_p((gid_t)ip->i_d.di_gid)) - m |= S_ISGID; -#if 0 - /* Linux allows this, Irix doesn't. */ - if ((iattr->ia_mode & S_ISVTX) && !S_ISDIR(ip->i_d.di_mode)) - m |= S_ISVTX; -#endif - if (m && !capable(CAP_FSETID)) - iattr->ia_mode &= ~m; - } - } - /* * Change file ownership. Must be the owner or privileged. */ @@ -224,22 +177,6 @@ xfs_setattr( uid = (mask & ATTR_UID) ? iattr->ia_uid : iuid; /* - * CAP_CHOWN overrides the following restrictions: - * - * If _POSIX_CHOWN_RESTRICTED is defined, this capability - * shall override the restriction that a process cannot - * change the user ID of a file it owns and the restriction - * that the group ID supplied to the chown() function - * shall be equal to either the group ID or one of the - * supplementary group IDs of the calling process. - */ - if ((iuid != uid || - (igid != gid && !in_group_p((gid_t)gid))) && - !capable(CAP_CHOWN)) { - code = XFS_ERROR(EPERM); - goto error_return; - } - /* * Do a quota reservation only if uid/gid is actually * going to change. */ @@ -276,36 +213,22 @@ xfs_setattr( code = XFS_ERROR(EINVAL); goto error_return; } + /* * Make sure that the dquots are attached to the inode. */ - if ((code = XFS_QM_DQATTACH(mp, ip, XFS_QMOPT_ILOCKED))) + code = XFS_QM_DQATTACH(mp, ip, XFS_QMOPT_ILOCKED); + if (code) goto error_return; - } - - /* - * Change file access or modified times. - */ - if (mask & (ATTR_ATIME|ATTR_MTIME)) { - if (!file_owner) { - if ((mask & (ATTR_MTIME_SET|ATTR_ATIME_SET)) && - !capable(CAP_FOWNER)) { - code = XFS_ERROR(EPERM); - goto error_return; - } - } - } - /* - * Now we can make the changes. Before we join the inode - * to the transaction, if ATTR_SIZE is set then take care of - * the part of the truncation that must be done without the - * inode lock. This needs to be done before joining the inode - * to the transaction, because the inode cannot be unlocked - * once it is a part of the transaction. - */ - if (mask & ATTR_SIZE) { - code = 0; + /* + * Now we can make the changes. Before we join the inode + * to the transaction, if ATTR_SIZE is set then take care of + * the part of the truncation that must be done without the + * inode lock. This needs to be done before joining the inode + * to the transaction, because the inode cannot be unlocked + * once it is a part of the transaction. + */ if (iattr->ia_size > ip->i_size) { /* * Do the first part of growing a file: zero any data @@ -360,17 +283,10 @@ xfs_setattr( } commit_flags = XFS_TRANS_RELEASE_LOG_RES; xfs_ilock(ip, XFS_ILOCK_EXCL); - } - if (tp) { xfs_trans_ijoin(tp, ip, lock_flags); xfs_trans_ihold(tp, ip); - } - /* - * Truncate file. Must have write permission and not be a directory. - */ - if (mask & ATTR_SIZE) { /* * Only change the c/mtime if we are changing the size * or we are explicitly asked to change it. This handles @@ -410,20 +326,9 @@ xfs_setattr( */ xfs_iflags_set(ip, XFS_ITRUNCATED); } - } - - /* - * Change file access modes. - */ - if (mask & ATTR_MODE) { - ip->i_d.di_mode &= S_IFMT; - ip->i_d.di_mode |= iattr->ia_mode & ~S_IFMT; - - inode->i_mode &= S_IFMT; - inode->i_mode |= iattr->ia_mode & ~S_IFMT; - - xfs_trans_log_inode (tp, ip, XFS_ILOG_CORE); - timeflags |= XFS_ICHGTIME_CHG; + } else if (tp) { + xfs_trans_ijoin(tp, ip, lock_flags); + xfs_trans_ihold(tp, ip); } /* @@ -471,6 +376,24 @@ xfs_setattr( timeflags |= XFS_ICHGTIME_CHG; } + /* + * Change file access modes. + */ + if (mask & ATTR_MODE) { + umode_t mode = iattr->ia_mode; + + if (!in_group_p(inode->i_gid) && !capable(CAP_FSETID)) + mode &= ~S_ISGID; + + ip->i_d.di_mode &= S_IFMT; + ip->i_d.di_mode |= mode & ~S_IFMT; + + inode->i_mode &= S_IFMT; + inode->i_mode |= mode & ~S_IFMT; + + xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); + timeflags |= XFS_ICHGTIME_CHG; + } /* * Change file access or modified times. -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:07:51 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2G7pUP031826 for ; Tue, 2 Dec 2008 10:07:51 -0600 X-ASG-Debug-ID: 1228234070-5c7d026f0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 00D8C164F1EF for ; Tue, 2 Dec 2008 08:07:50 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id qXvYRtMlLi4hFPHw for ; Tue, 02 Dec 2008 08:07:50 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xlz-0007Qj-24 for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:51 +0000 Message-Id: <20081202160650.974883000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:40 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 10/22] kill dead quota flags Subject: [patch 10/22] kill dead quota flags Content-Disposition: inline; filename=xfs-kill-dead-quota-flags X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234071 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com Signed-off-by: Christoph Hellwig Index: xfs-master/fs/xfs/xfs_quota.h =================================================================== --- xfs-master.orig/fs/xfs/xfs_quota.h 2008-12-01 19:26:03.000000000 +0100 +++ xfs-master/fs/xfs/xfs_quota.h 2008-12-01 19:27:41.000000000 +0100 @@ -84,11 +84,9 @@ typedef struct xfs_dqblk { #define XFS_DQ_USER 0x0001 /* a user quota */ #define XFS_DQ_PROJ 0x0002 /* project quota */ #define XFS_DQ_GROUP 0x0004 /* a group quota */ -#define XFS_DQ_FLOCKED 0x0008 /* flush lock taken */ -#define XFS_DQ_DIRTY 0x0010 /* dquot is dirty */ -#define XFS_DQ_WANT 0x0020 /* for lookup/reclaim race */ -#define XFS_DQ_INACTIVE 0x0040 /* dq off mplist & hashlist */ -#define XFS_DQ_MARKER 0x0080 /* sentinel */ +#define XFS_DQ_DIRTY 0x0008 /* dquot is dirty */ +#define XFS_DQ_WANT 0x0010 /* for lookup/reclaim race */ +#define XFS_DQ_INACTIVE 0x0020 /* dq off mplist & hashlist */ #define XFS_DQ_ALLTYPES (XFS_DQ_USER|XFS_DQ_PROJ|XFS_DQ_GROUP) -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:07:22 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2G7MGk031743 for ; Tue, 2 Dec 2008 10:07:22 -0600 X-ASG-Debug-ID: 1228234041-5c7c02a60000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id AF100164F1E2 for ; Tue, 2 Dec 2008 08:07:21 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id qRs4QcLXk3cHS6nI for ; Tue, 02 Dec 2008 08:07:21 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xly-0007PQ-TY for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:50 +0000 Message-Id: <20081202160650.829703000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:39 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 09/22] remove dead code from sv_t implementation Subject: [patch 09/22] remove dead code from sv_t implementation Content-Disposition: inline; filename=xfs-simplify-sv X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234041 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/linux-2.6/sv.h =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/sv.h 2008-09-29 10:45:36.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/sv.h 2008-09-29 10:49:16.000000000 +0200 @@ -32,23 +32,15 @@ typedef struct sv_s { wait_queue_head_t waiters; } sv_t; -#define SV_FIFO 0x0 /* sv_t is FIFO type */ -#define SV_LIFO 0x2 /* sv_t is LIFO type */ -#define SV_PRIO 0x4 /* sv_t is PRIO type */ -#define SV_KEYED 0x6 /* sv_t is KEYED type */ -#define SV_DEFAULT SV_FIFO - - -static inline void _sv_wait(sv_t *sv, spinlock_t *lock, int state, - unsigned long timeout) +static inline void _sv_wait(sv_t *sv, spinlock_t *lock) { DECLARE_WAITQUEUE(wait, current); add_wait_queue_exclusive(&sv->waiters, &wait); - __set_current_state(state); + __set_current_state(TASK_UNINTERRUPTIBLE); spin_unlock(lock); - schedule_timeout(timeout); + schedule(); remove_wait_queue(&sv->waiters, &wait); } @@ -58,13 +50,7 @@ static inline void _sv_wait(sv_t *sv, sp #define sv_destroy(sv) \ /*NOTHING*/ #define sv_wait(sv, pri, lock, s) \ - _sv_wait(sv, lock, TASK_UNINTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT) -#define sv_wait_sig(sv, pri, lock, s) \ - _sv_wait(sv, lock, TASK_INTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT) -#define sv_timedwait(sv, pri, lock, s, svf, ts, rts) \ - _sv_wait(sv, lock, TASK_UNINTERRUPTIBLE, timespec_to_jiffies(ts)) -#define sv_timedwait_sig(sv, pri, lock, s, svf, ts, rts) \ - _sv_wait(sv, lock, TASK_INTERRUPTIBLE, timespec_to_jiffies(ts)) + _sv_wait(sv, lock) #define sv_signal(sv) \ wake_up(&(sv)->waiters) #define sv_broadcast(sv) \ -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:07:52 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_62 autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2G7pWF031831 for ; Tue, 2 Dec 2008 10:07:52 -0600 X-ASG-Debug-ID: 1228234071-5c7b028b0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 535D5164F1EF for ; Tue, 2 Dec 2008 08:07:51 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id 1k8dUtqvCRiEd8VI for ; Tue, 02 Dec 2008 08:07:51 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xlz-0007W8-Ua for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:51 +0000 Message-Id: <20081202160651.861936000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:46 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 16/22] use xfs_trans_ijoin in xfs_trans_iget Subject: [patch 16/22] use xfs_trans_ijoin in xfs_trans_iget Content-Disposition: inline; filename=xfs-cleanup-xfs_trans_iget X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234071 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com Use xfs_trans_ijoin in xfs_trans_iget in case we need to join an inode into a transaction instead of opencoding it. Based on a discussion with and an incomplete patch from Niv Sardi. Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/xfs_trans_inode.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/xfs_trans_inode.c 2008-11-19 19:43:42.000000000 +0100 +++ linux-2.6-xfs/fs/xfs/xfs_trans_inode.c 2008-11-19 19:55:45.000000000 +0100 @@ -85,7 +85,6 @@ xfs_trans_iget( { int error; xfs_inode_t *ip; - xfs_inode_log_item_t *iip; /* * If the transaction pointer is NULL, just call the normal @@ -138,34 +137,7 @@ xfs_trans_iget( } ASSERT(ip != NULL); - /* - * Get a log_item_desc to point at the new item. - */ - if (ip->i_itemp == NULL) - xfs_inode_item_init(ip, mp); - iip = ip->i_itemp; - (void) xfs_trans_add_item(tp, (xfs_log_item_t *)(iip)); - - xfs_trans_inode_broot_debug(ip); - - /* - * If the IO lock has been acquired, mark that in - * the inode log item so we'll know to unlock it - * when the transaction commits. - */ - ASSERT(iip->ili_flags == 0); - if (lock_flags & XFS_IOLOCK_EXCL) { - iip->ili_flags |= XFS_ILI_IOLOCKED_EXCL; - } else if (lock_flags & XFS_IOLOCK_SHARED) { - iip->ili_flags |= XFS_ILI_IOLOCKED_SHARED; - } - - /* - * Initialize i_transp so we can find it with xfs_inode_incore() - * above. - */ - ip->i_transp = tp; - + xfs_trans_ijoin(tp, ip, lock_flags); *ipp = ip; return 0; } -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:11:50 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2GBoUJ032511 for ; Tue, 2 Dec 2008 10:11:50 -0600 X-ASG-Debug-ID: 1228234309-5c7c02c80000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 29EEE164F2B1 for ; Tue, 2 Dec 2008 08:11:50 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id 6FDwE6X4dV77P1EB for ; Tue, 02 Dec 2008 08:11:50 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xlx-0007Gl-Nt for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:49 +0000 Message-Id: <20081202160649.658660000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:31 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 01/22] fix compile on 32 bit systems Subject: [patch 01/22] fix compile on 32 bit systems Content-Disposition: inline; filename=xfs-fix-32bit-compile X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234310 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com The recent compat patches make xfs_file.c include xfs_ioctl32.h unconditional, which breaks the build on 32 bit systems which don't have the various compat defintions. Remove the include and move the defintion of xfs_file_compat_ioctl to xfs_ioctl.h so that we can avoid including all the compat defintions in xfs_file.c Signed-off-by: Christoph Hellwig Index: xfs-master/fs/xfs/linux-2.6/xfs_file.c =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_file.c 2008-12-02 11:43:38.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_file.c 2008-12-02 11:44:06.000000000 +0100 @@ -36,9 +36,9 @@ #include "xfs_inode.h" #include "xfs_error.h" #include "xfs_rw.h" -#include "xfs_ioctl32.h" #include "xfs_vnodeops.h" #include "xfs_da_btree.h" +#include "xfs_ioctl.h" #include #include Index: xfs-master/fs/xfs/linux-2.6/xfs_ioctl.h =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_ioctl.h 2008-12-02 11:44:10.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_ioctl.h 2008-12-02 11:44:52.000000000 +0100 @@ -67,4 +67,16 @@ xfs_attrmulti_attr_remove( char *name, __uint32_t flags); +extern long +xfs_file_compat_ioctl( + struct file *file, + unsigned int cmd, + unsigned long arg); + +extern long +xfs_file_compat_ioctl_invis( + struct file *file, + unsigned int cmd, + unsigned long arg); + #endif Index: xfs-master/fs/xfs/linux-2.6/xfs_ioctl32.h =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_ioctl32.h 2008-12-02 11:44:10.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_ioctl32.h 2008-12-02 11:44:18.000000000 +0100 @@ -20,9 +20,6 @@ #include -extern long xfs_file_compat_ioctl(struct file *, unsigned, unsigned long); -extern long xfs_file_compat_invis_ioctl(struct file *, unsigned, unsigned long); - /* * on 32-bit arches, ioctl argument structures may have different sizes * and/or alignment. We define compat structures which match the -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:11:51 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_65 autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2GBpd9032518 for ; Tue, 2 Dec 2008 10:11:51 -0600 X-ASG-Debug-ID: 1228234310-5c7d02930000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 33C86164F2B3 for ; Tue, 2 Dec 2008 08:11:51 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id insYWziRYCrnhPJF for ; Tue, 02 Dec 2008 08:11:51 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xly-0007OP-OF for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:50 +0000 Message-Id: <20081202160650.663976000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:38 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 08/22] reduce l_icloglock roundtrips Subject: [patch 08/22] reduce l_icloglock roundtrips Content-Disposition: inline; filename=xfs-reduce-log-lock-roundtrips X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234311 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com All but one caller of xlog_state_want_sync drop and re-acquire l_icloglock around the call to it, just so that xlog_state_want_sync can acquire and drop it. Move all lock operation out of l_icloglock and assert that the lock is held when it is called. Note that it would make sense to extende this scheme to xlog_state_release_iclog, but the locking in there is more complicated and we'd like to keep the atomic_dec_and_lock optmization for those callers not having l_icloglock yet. (First sent on Semptember 29th) Signed-off-by: Christoph Hellwig Index: xfs-master/fs/xfs/xfs_log.c =================================================================== --- xfs-master.orig/fs/xfs/xfs_log.c 2008-12-02 11:07:00.000000000 +0100 +++ xfs-master/fs/xfs/xfs_log.c 2008-12-02 11:13:33.000000000 +0100 @@ -729,8 +729,8 @@ xfs_log_unmount_write(xfs_mount_t *mp) spin_lock(&log->l_icloglock); iclog = log->l_iclog; atomic_inc(&iclog->ic_refcnt); - spin_unlock(&log->l_icloglock); xlog_state_want_sync(log, iclog); + spin_unlock(&log->l_icloglock); error = xlog_state_release_iclog(log, iclog); spin_lock(&log->l_icloglock); @@ -767,9 +767,9 @@ xfs_log_unmount_write(xfs_mount_t *mp) spin_lock(&log->l_icloglock); iclog = log->l_iclog; atomic_inc(&iclog->ic_refcnt); - spin_unlock(&log->l_icloglock); xlog_state_want_sync(log, iclog); + spin_unlock(&log->l_icloglock); error = xlog_state_release_iclog(log, iclog); spin_lock(&log->l_icloglock); @@ -1984,7 +1984,9 @@ xlog_write(xfs_mount_t * mp, if (iclog->ic_size - log_offset <= sizeof(xlog_op_header_t)) { xlog_state_finish_copy(log, iclog, record_cnt, data_cnt); record_cnt = data_cnt = 0; + spin_lock(&log->l_icloglock); xlog_state_want_sync(log, iclog); + spin_unlock(&log->l_icloglock); if (commit_iclog) { ASSERT(flags & XLOG_COMMIT_TRANS); *commit_iclog = iclog; @@ -3193,7 +3195,7 @@ try_again: STATIC void xlog_state_want_sync(xlog_t *log, xlog_in_core_t *iclog) { - spin_lock(&log->l_icloglock); + ASSERT(spin_is_locked(&log->l_icloglock)); if (iclog->ic_state == XLOG_STATE_ACTIVE) { xlog_state_switch_iclogs(log, iclog, 0); @@ -3201,10 +3203,7 @@ xlog_state_want_sync(xlog_t *log, xlog_i ASSERT(iclog->ic_state & (XLOG_STATE_WANT_SYNC|XLOG_STATE_IOERROR)); } - - spin_unlock(&log->l_icloglock); -} /* xlog_state_want_sync */ - +} /***************************************************************************** -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:11:52 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2GBqAM032525 for ; Tue, 2 Dec 2008 10:11:52 -0600 X-ASG-Debug-ID: 1228234311-5c7b02a70000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id C7E0F164F2B5 for ; Tue, 2 Dec 2008 08:11:51 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id 0oKyr8JAT7b1fql1 for ; Tue, 02 Dec 2008 08:11:51 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xlz-0007TT-C3 for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:51 +0000 Message-Id: <20081202160651.264876000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:42 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 12/22] kill dead inode flags Subject: [patch 12/22] kill dead inode flags Content-Disposition: inline; filename=xfs-kill-dead-inode-flags X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234311 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com There are a few inode flags around that aren't used anywhere, so remove them. Also update xfsidbg to display all used inode flags correctly. (First sent on July 23nd) Signed-off-by: Christoph Hellwig Index: xfs-master/fs/xfs/linux-2.6/xfs_aops.c =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_aops.c 2008-12-02 11:12:44.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_aops.c 2008-12-02 11:15:28.000000000 +0100 @@ -317,14 +317,9 @@ xfs_map_blocks( xfs_iomap_t *mapp, int flags) { - xfs_inode_t *ip = XFS_I(inode); - int error, nmaps = 1; + int nmaps = 1; - error = xfs_iomap(ip, offset, count, - flags, mapp, &nmaps); - if (!error && (flags & (BMAPI_WRITE|BMAPI_ALLOCATE))) - xfs_iflags_set(ip, XFS_IMODIFIED); - return -error; + return -xfs_iomap(XFS_I(inode), offset, count, flags, mapp, &nmaps); } STATIC_INLINE int Index: xfs-master/fs/xfs/linux-2.6/xfs_file.c =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_file.c 2008-12-02 11:07:08.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_file.c 2008-12-02 11:15:28.000000000 +0100 @@ -283,11 +283,8 @@ xfs_file_ioctl( unsigned int cmd, unsigned long p) { - int error; struct inode *inode = filp->f_path.dentry->d_inode; - error = xfs_ioctl(XFS_I(inode), filp, 0, cmd, (void __user *)p); - xfs_iflags_set(XFS_I(inode), XFS_IMODIFIED); /* NOTE: some of the ioctl's return positive #'s as a * byte count indicating success, such as @@ -295,7 +292,7 @@ xfs_file_ioctl( * like most other routines. This means true * errors need to be returned as a negative value. */ - return error; + return xfs_ioctl(XFS_I(inode), filp, 0, cmd, (void __user *)p); } STATIC long @@ -304,11 +301,8 @@ xfs_file_ioctl_invis( unsigned int cmd, unsigned long p) { - int error; struct inode *inode = filp->f_path.dentry->d_inode; - error = xfs_ioctl(XFS_I(inode), filp, IO_INVIS, cmd, (void __user *)p); - xfs_iflags_set(XFS_I(inode), XFS_IMODIFIED); /* NOTE: some of the ioctl's return positive #'s as a * byte count indicating success, such as @@ -316,7 +310,7 @@ xfs_file_ioctl_invis( * like most other routines. This means true * errors need to be returned as a negative value. */ - return error; + return xfs_ioctl(XFS_I(inode), filp, IO_INVIS, cmd, (void __user *)p); } /* Index: xfs-master/fs/xfs/linux-2.6/xfs_iops.c =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_iops.c 2008-12-02 11:13:27.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_iops.c 2008-12-02 11:15:28.000000000 +0100 @@ -159,8 +159,6 @@ xfs_init_security( } error = xfs_attr_set(ip, name, value, length, ATTR_SECURE); - if (!error) - xfs_iflags_set(ip, XFS_IMODIFIED); kfree(name); kfree(value); @@ -261,7 +259,6 @@ xfs_vn_mknod( error = _ACL_INHERIT(inode, mode, default_acl); if (unlikely(error)) goto out_cleanup_inode; - xfs_iflags_set(ip, XFS_IMODIFIED); _ACL_FREE(default_acl); } @@ -377,7 +374,6 @@ xfs_vn_link( if (unlikely(error)) return -error; - xfs_iflags_set(XFS_I(dir), XFS_IMODIFIED); atomic_inc(&inode->i_count); d_instantiate(dentry, inode); return 0; @@ -888,7 +884,6 @@ xfs_setup_inode( inode->i_ctime.tv_sec = ip->i_d.di_ctime.t_sec; inode->i_ctime.tv_nsec = ip->i_d.di_ctime.t_nsec; xfs_diflags_to_iflags(inode, ip); - xfs_iflags_clear(ip, XFS_IMODIFIED); switch (inode->i_mode & S_IFMT) { case S_IFREG: Index: xfs-master/fs/xfs/linux-2.6/xfs_super.c =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_super.c 2008-12-02 11:06:57.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_super.c 2008-12-02 11:15:28.000000000 +0100 @@ -1025,7 +1025,6 @@ xfs_fs_clear_inode( XFS_STATS_DEC(vn_active); xfs_inactive(ip); - xfs_iflags_clear(ip, XFS_IMODIFIED); } STATIC void Index: xfs-master/fs/xfs/xfs_iget.c =================================================================== --- xfs-master.orig/fs/xfs/xfs_iget.c 2008-12-02 11:13:13.000000000 +0100 +++ xfs-master/fs/xfs/xfs_iget.c 2008-12-02 11:15:28.000000000 +0100 @@ -362,7 +362,6 @@ again: } xfs_put_perag(mp, pag); - xfs_iflags_set(ip, XFS_IMODIFIED); *ipp = ip; ASSERT(ip->i_df.if_ext_max == Index: xfs-master/fs/xfs/xfs_inode.h =================================================================== --- xfs-master.orig/fs/xfs/xfs_inode.h 2008-12-02 11:13:13.000000000 +0100 +++ xfs-master/fs/xfs/xfs_inode.h 2008-12-02 11:15:28.000000000 +0100 @@ -403,17 +403,12 @@ static inline void xfs_ifunlock(xfs_inod /* * In-core inode flags. */ -#define XFS_IGRIO 0x0001 /* inode used for guaranteed rate i/o */ -#define XFS_IUIOSZ 0x0002 /* inode i/o sizes have been explicitly set */ -#define XFS_IQUIESCE 0x0004 /* we have started quiescing for this inode */ -#define XFS_IRECLAIM 0x0008 /* we have started reclaiming this inode */ -#define XFS_ISTALE 0x0010 /* inode has been staled */ -#define XFS_IRECLAIMABLE 0x0020 /* inode can be reclaimed */ -#define XFS_INEW 0x0040 -#define XFS_IFILESTREAM 0x0080 /* inode is in a filestream directory */ -#define XFS_IMODIFIED 0x0100 /* XFS inode state possibly differs */ - /* to the Linux inode state. */ -#define XFS_ITRUNCATED 0x0200 /* truncated down so flush-on-close */ +#define XFS_IRECLAIM 0x0001 /* we have started reclaiming this inode */ +#define XFS_ISTALE 0x0002 /* inode has been staled */ +#define XFS_IRECLAIMABLE 0x0004 /* inode can be reclaimed */ +#define XFS_INEW 0x0008 /* inode has just been allocated */ +#define XFS_IFILESTREAM 0x0010 /* inode is in a filestream directory */ +#define XFS_ITRUNCATED 0x0020 /* truncated down so flush-on-close */ /* * Flags for inode locking. -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:12:21 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2GCL11032653 for ; Tue, 2 Dec 2008 10:12:21 -0600 X-ASG-Debug-ID: 1228234341-5c7d029a0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 41C00164F2E4 for ; Tue, 2 Dec 2008 08:12:21 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id IYdlbNA02eAyuLHO for ; Tue, 02 Dec 2008 08:12:21 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xly-0007In-0h for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:50 +0000 Message-Id: <20081202160649.932903000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:33 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 03/22] remove unused behvavior cruft in xfs_super.h Subject: [patch 03/22] remove unused behvavior cruft in xfs_super.h Content-Disposition: inline; filename=xfs-remove-dmapi-cruft X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234341 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com Signed-off-by: Christoph Hellwig Index: xfs-master/fs/xfs/linux-2.6/xfs_super.h =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_super.h 2008-12-02 11:21:33.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_super.h 2008-12-02 11:21:49.000000000 +0100 @@ -20,24 +20,12 @@ #include -#ifdef CONFIG_XFS_DMAPI -# define vfs_insertdmapi(vfs) vfs_insertops(vfsp, &xfs_dmops) -# define vfs_initdmapi() dmapi_init() -# define vfs_exitdmapi() dmapi_uninit() -#else -# define vfs_insertdmapi(vfs) do { } while (0) -# define vfs_initdmapi() do { } while (0) -# define vfs_exitdmapi() do { } while (0) -#endif - #ifdef CONFIG_XFS_QUOTA -# define vfs_insertquota(vfs) vfs_insertops(vfsp, &xfs_qmops) extern void xfs_qm_init(void); extern void xfs_qm_exit(void); # define vfs_initquota() xfs_qm_init() # define vfs_exitquota() xfs_qm_exit() #else -# define vfs_insertquota(vfs) do { } while (0) # define vfs_initquota() do { } while (0) # define vfs_exitquota() do { } while (0) #endif -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:12:22 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2GCLit032660 for ; Tue, 2 Dec 2008 10:12:22 -0600 X-ASG-Debug-ID: 1228234341-6e6301d20000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 5B313164F2E9 for ; Tue, 2 Dec 2008 08:12:21 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id duvCLPQxRVOZS592 for ; Tue, 02 Dec 2008 08:12:21 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xly-0007LA-Ex for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:50 +0000 Message-Id: <20081202160650.360918000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:36 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 06/22] kill xfs_buf_iostart Subject: [patch 06/22] kill xfs_buf_iostart Content-Disposition: inline; filename=xfs-bdwrite_cleanup X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234341 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com xfs_buf_iostart is a "shared" helper for xfs_buf_read_flags, xfs_bawrite, and xfs_bdwrite - except that there isn't much shared code but rather special cases for each caller. So remove this function and move the functionality to the caller. xfs_bawrite and xfs_bdwrite are now big enough to be moved out of line and the xfs_buf_read_flags is moved into a new helper called _xfs_buf_read. (First sent on August 2nd) Signed-off-by: Christoph Hellwig Index: xfs-master/fs/xfs/linux-2.6/xfs_buf.c =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_buf.c 2008-12-01 19:26:04.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_buf.c 2008-12-01 19:27:31.000000000 +0100 @@ -630,6 +630,29 @@ xfs_buf_get_flags( return NULL; } +STATIC int +_xfs_buf_read( + xfs_buf_t *bp, + xfs_buf_flags_t flags) +{ + int status; + + XB_TRACE(bp, "_xfs_buf_read", (unsigned long)flags); + + ASSERT(!(flags & (XBF_DELWRI|XBF_WRITE))); + ASSERT(bp->b_bn != XFS_BUF_DADDR_NULL); + + bp->b_flags &= ~(XBF_WRITE | XBF_ASYNC | XBF_DELWRI | \ + XBF_READ_AHEAD | _XBF_RUN_QUEUES); + bp->b_flags |= flags & (XBF_READ | XBF_ASYNC | \ + XBF_READ_AHEAD | _XBF_RUN_QUEUES); + + status = xfs_buf_iorequest(bp); + if (!status && !(flags & XBF_ASYNC)) + status = xfs_buf_iowait(bp); + return status; +} + xfs_buf_t * xfs_buf_read_flags( xfs_buftarg_t *target, @@ -646,7 +669,7 @@ xfs_buf_read_flags( if (!XFS_BUF_ISDONE(bp)) { XB_TRACE(bp, "read", (unsigned long)flags); XFS_STATS_INC(xb_get_read); - xfs_buf_iostart(bp, flags); + _xfs_buf_read(bp, flags); } else if (flags & XBF_ASYNC) { XB_TRACE(bp, "read_async", (unsigned long)flags); /* @@ -1048,50 +1071,39 @@ xfs_buf_ioerror( XB_TRACE(bp, "ioerror", (unsigned long)error); } -/* - * Initiate I/O on a buffer, based on the flags supplied. - * The b_iodone routine in the buffer supplied will only be called - * when all of the subsidiary I/O requests, if any, have been completed. - */ int -xfs_buf_iostart( - xfs_buf_t *bp, - xfs_buf_flags_t flags) +xfs_bawrite( + void *mp, + struct xfs_buf *bp) { - int status = 0; + XB_TRACE(bp, "bawrite", 0); - XB_TRACE(bp, "iostart", (unsigned long)flags); + ASSERT(bp->b_bn != XFS_BUF_DADDR_NULL); - if (flags & XBF_DELWRI) { - bp->b_flags &= ~(XBF_READ | XBF_WRITE | XBF_ASYNC); - bp->b_flags |= flags & (XBF_DELWRI | XBF_ASYNC); - xfs_buf_delwri_queue(bp, 1); - return 0; - } + xfs_buf_delwri_dequeue(bp); - bp->b_flags &= ~(XBF_READ | XBF_WRITE | XBF_ASYNC | XBF_DELWRI | \ - XBF_READ_AHEAD | _XBF_RUN_QUEUES); - bp->b_flags |= flags & (XBF_READ | XBF_WRITE | XBF_ASYNC | \ - XBF_READ_AHEAD | _XBF_RUN_QUEUES); + bp->b_flags &= ~(XBF_READ | XBF_DELWRI | XBF_READ_AHEAD); + bp->b_flags |= (XBF_WRITE | XBF_ASYNC | _XBF_RUN_QUEUES); + + bp->b_fspriv3 = mp; + bp->b_strat = xfs_bdstrat_cb; + return xfs_bdstrat_cb(bp); +} - BUG_ON(bp->b_bn == XFS_BUF_DADDR_NULL); +void +xfs_bdwrite( + void *mp, + struct xfs_buf *bp) +{ + XB_TRACE(bp, "bdwrite", 0); - /* For writes allow an alternate strategy routine to precede - * the actual I/O request (which may not be issued at all in - * a shutdown situation, for example). - */ - status = (flags & XBF_WRITE) ? - xfs_buf_iostrategy(bp) : xfs_buf_iorequest(bp); + bp->b_strat = xfs_bdstrat_cb; + bp->b_fspriv3 = mp; - /* Wait for I/O if we are not an async request. - * Note: async I/O request completion will release the buffer, - * and that can already be done by this point. So using the - * buffer pointer from here on, after async I/O, is invalid. - */ - if (!status && !(flags & XBF_ASYNC)) - status = xfs_buf_iowait(bp); + bp->b_flags &= ~XBF_READ; + bp->b_flags |= (XBF_DELWRI | XBF_ASYNC); - return status; + xfs_buf_delwri_queue(bp, 1); } STATIC_INLINE void Index: xfs-master/fs/xfs/linux-2.6/xfs_buf.h =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_buf.h 2008-12-01 19:26:04.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_buf.h 2008-12-01 19:27:31.000000000 +0100 @@ -214,9 +214,10 @@ extern void xfs_buf_lock(xfs_buf_t *); extern void xfs_buf_unlock(xfs_buf_t *); /* Buffer Read and Write Routines */ +extern int xfs_bawrite(void *mp, xfs_buf_t *bp); +extern void xfs_bdwrite(void *mp, xfs_buf_t *bp); extern void xfs_buf_ioend(xfs_buf_t *, int); extern void xfs_buf_ioerror(xfs_buf_t *, int); -extern int xfs_buf_iostart(xfs_buf_t *, xfs_buf_flags_t); extern int xfs_buf_iorequest(xfs_buf_t *); extern int xfs_buf_iowait(xfs_buf_t *); extern void xfs_buf_iomove(xfs_buf_t *, size_t, size_t, xfs_caddr_t, @@ -366,14 +367,6 @@ extern void xfs_buf_trace(xfs_buf_t *, c #define XFS_BUF_TARGET(bp) ((bp)->b_target) #define XFS_BUFTARG_NAME(target) xfs_buf_target_name(target) -static inline int xfs_bawrite(void *mp, xfs_buf_t *bp) -{ - bp->b_fspriv3 = mp; - bp->b_strat = xfs_bdstrat_cb; - xfs_buf_delwri_dequeue(bp); - return xfs_buf_iostart(bp, XBF_WRITE | XBF_ASYNC | _XBF_RUN_QUEUES); -} - static inline void xfs_buf_relse(xfs_buf_t *bp) { if (!bp->b_relse) @@ -414,17 +407,6 @@ static inline int XFS_bwrite(xfs_buf_t * return error; } -/* - * No error can be returned from xfs_buf_iostart for delwri - * buffers as they are queued and no I/O is issued. - */ -static inline void xfs_bdwrite(void *mp, xfs_buf_t *bp) -{ - bp->b_strat = xfs_bdstrat_cb; - bp->b_fspriv3 = mp; - (void)xfs_buf_iostart(bp, XBF_DELWRI | XBF_ASYNC); -} - #define XFS_bdstrat(bp) xfs_buf_iorequest(bp) #define xfs_iowait(bp) xfs_buf_iowait(bp) -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:12:22 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2GCMPb032661 for ; Tue, 2 Dec 2008 10:12:22 -0600 X-ASG-Debug-ID: 1228234341-60d3026a0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 78208164F2EA for ; Tue, 2 Dec 2008 08:12:21 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id tSB1cukgzpC9tIrC for ; Tue, 02 Dec 2008 08:12:21 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xly-0007MK-Jg for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:50 +0000 Message-Id: <20081202160650.515494000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:37 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 07/22] stop using igrab in xfs_vn_link Subject: [patch 07/22] stop using igrab in xfs_vn_link Content-Disposition: inline; filename=xfs-stop-using-igrab-in-xfs_link X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234341 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com ->link is guranteed to get an already reference inode passed so we can do a simple increment of i_count instead of using igrab and thus avoid banging on the global inode_lock. This is what most filesystems already do. Also move the increment after the call to xfs_link to simplify error handling. (First sent on July 26th) Signed-off-by: Christoph Hellwig Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_iops.c =================================================================== --- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_iops.c 2008-10-25 13:00:29.000000000 +0200 +++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_iops.c 2008-10-25 13:13:24.000000000 +0200 @@ -366,21 +366,18 @@ xfs_vn_link( struct inode *dir, struct dentry *dentry) { - struct inode *inode; /* inode of guy being linked to */ + struct inode *inode = old_dentry->d_inode; struct xfs_name name; int error; - inode = old_dentry->d_inode; xfs_dentry_to_name(&name, dentry); - igrab(inode); error = xfs_link(XFS_I(dir), XFS_I(inode), &name); - if (unlikely(error)) { - iput(inode); + if (unlikely(error)) return -error; - } xfs_iflags_set(XFS_I(dir), XFS_IMODIFIED); + atomic_inc(&inode->i_count); d_instantiate(dentry, inode); return 0; } -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:12:52 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2GCp9u032767 for ; Tue, 2 Dec 2008 10:12:51 -0600 X-ASG-Debug-ID: 1228234371-5d7002690000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 42586164F30E for ; Tue, 2 Dec 2008 08:12:51 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id 1MgvsIWN3eIkbK84 for ; Tue, 02 Dec 2008 08:12:51 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xlz-0007U7-HS for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:51 +0000 Message-Id: <20081202160651.426074000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:43 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 13/22] remove unused m_inode_quiesce member from struct xfs_mount Subject: [patch 13/22] remove unused m_inode_quiesce member from struct xfs_mount Content-Disposition: inline; filename=xfs-kill-m_inode_quiesce X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234371 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com (First sent on July 23rd) Signed-off-by: Christoph Hellwig Index: xfs-master/fs/xfs/xfs_mount.h =================================================================== --- xfs-master.orig/fs/xfs/xfs_mount.h 2008-12-01 19:27:15.000000000 +0100 +++ xfs-master/fs/xfs/xfs_mount.h 2008-12-01 19:27:59.000000000 +0100 @@ -302,7 +302,6 @@ typedef struct xfs_mount { int m_attr_magicpct;/* 37% of the blocksize */ int m_dir_magicpct; /* 37% of the dir blocksize */ __uint8_t m_mk_sharedro; /* mark shared ro on unmount */ - __uint8_t m_inode_quiesce;/* call quiesce on new inodes. */ __uint8_t m_sectbb_log; /* sectlog - BBSHIFT */ const struct xfs_nameops *m_dirnameops; /* vector of dir name ops */ int m_dirblksize; /* directory block sz--bytes */ -- From SRS0+bbc73c9829aeeb7e6db8+1927+infradead.org+hch@bombadil.srs.infradead.org Tue Dec 2 10:12:52 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2GCqlF000317 for ; Tue, 2 Dec 2008 10:12:52 -0600 X-ASG-Debug-ID: 1228234371-5c7d02a00000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 90F93164F30E for ; Tue, 2 Dec 2008 08:12:51 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id PAjHgoXckVKsOtOX for ; Tue, 02 Dec 2008 08:12:51 -0800 (PST) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1L7Xm0-0007e8-Qm for xfs@oss.sgi.com; Tue, 02 Dec 2008 16:06:52 +0000 Message-Id: <20081202160652.734778000@bombadil.infradead.org> References: <20081202160430.775774000@bombadil.infradead.org> User-Agent: quilt/0.46-1 Date: Tue, 02 Dec 2008 11:04:51 -0500 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [patch 21/22] move inode tracing out of xfs_vnode. Subject: [patch 21/22] move inode tracing out of xfs_vnode. Content-Disposition: inline; filename=xfs-move-itrace X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1228234371 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com Move the inode tracing into xfs_iget.c / xfs_inode.h and kill xfs_vnode.c now that it's empty. Signed-off-by: Christoph Hellwig Index: xfs-master/fs/xfs/Makefile =================================================================== --- xfs-master.orig/fs/xfs/Makefile 2008-12-02 11:26:30.000000000 +0100 +++ xfs-master/fs/xfs/Makefile 2008-12-02 11:27:01.000000000 +0100 @@ -107,7 +107,6 @@ xfs-y += $(addprefix $(XFS_LINUX)/, \ xfs_lrw.o \ xfs_super.o \ xfs_sync.o \ - xfs_vnode.o \ xfs_xattr.o) # Objects in support/ Index: xfs-master/fs/xfs/linux-2.6/xfs_vnode.c =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_vnode.c 2008-12-02 11:26:47.000000000 +0100 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. - * All Rights Reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -#include "xfs.h" -#include "xfs_vnodeops.h" -#include "xfs_bmap_btree.h" -#include "xfs_inode.h" - -/* - * And this gunk is needed for xfs_mount.h" - */ -#include "xfs_log.h" -#include "xfs_trans.h" -#include "xfs_sb.h" -#include "xfs_dmapi.h" -#include "xfs_inum.h" -#include "xfs_ag.h" -#include "xfs_mount.h" - - -#ifdef XFS_INODE_TRACE - -#define KTRACE_ENTER(ip, vk, s, line, ra) \ - ktrace_enter( (ip)->i_trace, \ -/* 0 */ (void *)(__psint_t)(vk), \ -/* 1 */ (void *)(s), \ -/* 2 */ (void *)(__psint_t) line, \ -/* 3 */ (void *)(__psint_t)atomic_read(&VFS_I(ip)->i_count), \ -/* 4 */ (void *)(ra), \ -/* 5 */ NULL, \ -/* 6 */ (void *)(__psint_t)current_cpu(), \ -/* 7 */ (void *)(__psint_t)current_pid(), \ -/* 8 */ (void *)__return_address, \ -/* 9 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL) - -/* - * Vnode tracing code. - */ -void -_xfs_itrace_entry(xfs_inode_t *ip, const char *func, inst_t *ra) -{ - KTRACE_ENTER(ip, INODE_KTRACE_ENTRY, func, 0, ra); -} - -void -_xfs_itrace_exit(xfs_inode_t *ip, const char *func, inst_t *ra) -{ - KTRACE_ENTER(ip, INODE_KTRACE_EXIT, func, 0, ra); -} - -void -xfs_itrace_hold(xfs_inode_t *ip, char *file, int line, inst_t *ra) -{ - KTRACE_ENTER(ip, INODE_KTRACE_HOLD, file, line, ra); -} - -void -_xfs_itrace_ref(xfs_inode_t *ip, char *file, int line, inst_t *ra) -{ - KTRACE_ENTER(ip, INODE_KTRACE_REF, file, line, ra); -} - -void -xfs_itrace_rele(xfs_inode_t *ip, char *file, int line, inst_t *ra) -{ - KTRACE_ENTER(ip, INODE_KTRACE_RELE, file, line, ra); -} -#endif /* XFS_INODE_TRACE */ Index: xfs-master/fs/xfs/xfs_iget.c =================================================================== --- xfs-master.orig/fs/xfs/xfs_iget.c 2008-12-02 11:22:30.000000000 +0100 +++ xfs-master/fs/xfs/xfs_iget.c 2008-12-02 11:27:19.000000000 +0100 @@ -805,3 +805,51 @@ xfs_isilocked( } #endif +#ifdef XFS_INODE_TRACE + +#define KTRACE_ENTER(ip, vk, s, line, ra) \ + ktrace_enter((ip)->i_trace, \ +/* 0 */ (void *)(__psint_t)(vk), \ +/* 1 */ (void *)(s), \ +/* 2 */ (void *)(__psint_t) line, \ +/* 3 */ (void *)(__psint_t)atomic_read(&VFS_I(ip)->i_count), \ +/* 4 */ (void *)(ra), \ +/* 5 */ NULL, \ +/* 6 */ (void *)(__psint_t)current_cpu(), \ +/* 7 */ (void *)(__psint_t)current_pid(), \ +/* 8 */ (void *)__return_address, \ +/* 9 */ NULL, NULL, NULL, NULL, NULL, NULL, NULL) + +/* + * Vnode tracing code. + */ +void +_xfs_itrace_entry(xfs_inode_t *ip, const char *func, inst_t *ra) +{ + KTRACE_ENTER(ip, INODE_KTRACE_ENTRY, func, 0, ra); +} + +void +_xfs_itrace_exit(xfs_inode_t *ip, const char *func, inst_t *ra) +{ + KTRACE_ENTER(ip, INODE_KTRACE_EXIT, func, 0, ra); +} + +void +xfs_itrace_hold(xfs_inode_t *ip, char *file, int line, inst_t *ra) +{ + KTRACE_ENTER(ip, INODE_KTRACE_HOLD, file, line, ra); +} + +void +_xfs_itrace_ref(xfs_inode_t *ip, char *file, int line, inst_t *ra) +{ + KTRACE_ENTER(ip, INODE_KTRACE_REF, file, line, ra); +} + +void +xfs_itrace_rele(xfs_inode_t *ip, char *file, int line, inst_t *ra) +{ + KTRACE_ENTER(ip, INODE_KTRACE_RELE, file, line, ra); +} +#endif /* XFS_INODE_TRACE */ Index: xfs-master/fs/xfs/linux-2.6/xfs_vnode.h =================================================================== --- xfs-master.orig/fs/xfs/linux-2.6/xfs_vnode.h 2008-12-02 11:26:47.000000000 +0100 +++ xfs-master/fs/xfs/linux-2.6/xfs_vnode.h 2008-12-02 11:27:01.000000000 +0100 @@ -54,19 +54,6 @@ struct attrlist_cursor_kern; Prevent VM access to the pages until the operation completes. */ -#define IHOLD(ip) \ -do { \ - ASSERT(atomic_read(&VFS_I(ip)->i_count) > 0) ; \ - atomic_inc(&(VFS_I(ip)->i_count)); \ - xfs_itrace_hold((ip), __FILE__, __LINE__, (inst_t *)__return_address); \ -} while (0) - -#define IRELE(ip) \ -do { \ - xfs_itrace_rele((ip), __FILE__, __LINE__, (inst_t *)__return_address); \ - iput(VFS_I(ip)); \ -} while (0) - /* * Dealing with bad inodes */ @@ -103,39 +90,4 @@ static inline void vn_atime_to_time_t(st PAGECACHE_TAG_DIRTY) -/* - * Tracking vnode activity. - */ -#if defined(XFS_INODE_TRACE) - -#define INODE_TRACE_SIZE 16 /* number of trace entries */ -#define INODE_KTRACE_ENTRY 1 -#define INODE_KTRACE_EXIT 2 -#define INODE_KTRACE_HOLD 3 -#define INODE_KTRACE_REF 4 -#define INODE_KTRACE_RELE 5 - -extern void _xfs_itrace_entry(struct xfs_inode *, const char *, inst_t *); -extern void _xfs_itrace_exit(struct xfs_inode *, const char *, inst_t *); -extern void xfs_itrace_hold(struct xfs_inode *, char *, int, inst_t *); -extern void _xfs_itrace_ref(struct xfs_inode *, char *, int, inst_t *); -extern void xfs_itrace_rele(struct xfs_inode *, char *, int, inst_t *); -#define xfs_itrace_entry(ip) \ - _xfs_itrace_entry(ip, __func__, (inst_t *)__return_address) -#define xfs_itrace_exit(ip) \ - _xfs_itrace_exit(ip, __func__, (inst_t *)__return_address) -#define xfs_itrace_exit_tag(ip, tag) \ - _xfs_itrace_exit(ip, tag, (inst_t *)__return_address) -#define xfs_itrace_ref(ip) \ - _xfs_itrace_ref(ip, __FILE__, __LINE__, (inst_t *)__return_address) - -#else -#define xfs_itrace_entry(a) -#define xfs_itrace_exit(a) -#define xfs_itrace_exit_tag(a, b) -#define xfs_itrace_hold(a, b, c, d) -#define xfs_itrace_ref(a) -#define xfs_itrace_rele(a, b, c, d) -#endif - #endif /* __XFS_VNODE_H__ */ Index: xfs-master/fs/xfs/xfs_inode.h =================================================================== --- xfs-master.orig/fs/xfs/xfs_inode.h 2008-12-02 11:22:30.000000000 +0100 +++ xfs-master/fs/xfs/xfs_inode.h 2008-12-02 11:27:01.000000000 +0100 @@ -536,6 +536,51 @@ void xfs_lock_two_inodes(xfs_inode_t *, void xfs_synchronize_atime(xfs_inode_t *); void xfs_mark_inode_dirty_sync(xfs_inode_t *); +#if defined(XFS_INODE_TRACE) + +#define INODE_TRACE_SIZE 16 /* number of trace entries */ +#define INODE_KTRACE_ENTRY 1 +#define INODE_KTRACE_EXIT 2 +#define INODE_KTRACE_HOLD 3 +#define INODE_KTRACE_REF 4 +#define INODE_KTRACE_RELE 5 + +extern void _xfs_itrace_entry(struct xfs_inode *, const char *, inst_t *); +extern void _xfs_itrace_exit(struct xfs_inode *, const char *, inst_t *); +extern void xfs_itrace_hold(struct xfs_inode *, char *, int, inst_t *); +extern void _xfs_itrace_ref(struct xfs_inode *, char *, int, inst_t *); +extern void xfs_itrace_rele(struct xfs_inode *, char *, int, inst_t *); +#define xfs_itrace_entry(ip) \ + _xfs_itrace_entry(ip, __func__, (inst_t *)__return_address) +#define xfs_itrace_exit(ip) \ + _xfs_itrace_exit(ip, __func__, (inst_t *)__return_address) +#define xfs_itrace_exit_tag(ip, tag) \ + _xfs_itrace_exit(ip, tag, (inst_t *)__return_address) +#define xfs_itrace_ref(ip) \ + _xfs_itrace_ref(ip, __FILE__, __LINE__, (inst_t *)__return_address) + +#else +#define xfs_itrace_entry(a) +#define xfs_itrace_exit(a) +#define xfs_itrace_exit_tag(a, b) +#define xfs_itrace_hold(a, b, c, d) +#define xfs_itrace_ref(a) +#define xfs_itrace_rele(a, b, c, d) +#endif + +#define IHOLD(ip) \ +do { \ + ASSERT(atomic_read(&VFS_I(ip)->i_count) > 0) ; \ + atomic_inc(&(VFS_I(ip)->i_count)); \ + xfs_itrace_hold((ip), __FILE__, __LINE__, (inst_t *)__return_address); \ +} while (0) + +#define IRELE(ip) \ +do { \ + xfs_itrace_rele((ip), __FILE__, __LINE__, (inst_t *)__return_address); \ + iput(VFS_I(ip)); \ +} while (0) + #endif /* __KERNEL__ */ int xfs_inotobp(struct xfs_mount *, struct xfs_trans *, -- From sandeen@sandeen.net Tue Dec 2 10:48:21 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2GmLC6005666 for ; Tue, 2 Dec 2008 10:48:21 -0600 X-ASG-Debug-ID: 1228236499-6199035e0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from sandeen.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 24952164F9C6 for ; Tue, 2 Dec 2008 08:48:19 -0800 (PST) Received: from sandeen.net (sandeen.net [209.173.210.139]) by cuda.sgi.com with ESMTP id kuvG5EFf7LE0RYwQ for ; Tue, 02 Dec 2008 08:48:19 -0800 (PST) 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 6642AAC6272; Tue, 2 Dec 2008 10:43:17 -0600 (CST) Message-ID: <493565A5.8070504@sandeen.net> Date: Tue, 02 Dec 2008 10:43:17 -0600 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: Christoph Hellwig CC: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [patch 01/22] fix compile on 32 bit systems Subject: Re: [patch 01/22] fix compile on 32 bit systems References: <20081202160430.775774000@bombadil.infradead.org> <20081202160649.658660000@bombadil.infradead.org> In-Reply-To: <20081202160649.658660000@bombadil.infradead.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Barracuda-Connect: sandeen.net[209.173.210.139] X-Barracuda-Start-Time: 1228236500 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.11743 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- ACK on this. I ran into this too on a backport but didn't think it was a problem upstream, thanks! -Eric From arekm@maven.pl Tue Dec 2 12:50:32 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_54 autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2IoUgA012720 for ; Tue, 2 Dec 2008 12:50:32 -0600 X-ASG-Debug-ID: 1228243828-677703e10000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from main.carme.maven.pl (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 3A6A51651279 for ; Tue, 2 Dec 2008 10:50:28 -0800 (PST) Received: from main.carme.maven.pl (main.carme.maven.pl [193.239.45.138]) by cuda.sgi.com with ESMTP id QF9GGLyfk4PlACNX for ; Tue, 02 Dec 2008 10:50:28 -0800 (PST) Received: from chello089076027073.chello.pl ([89.76.27.73]:4164 helo=maven.pl) by main.carme.maven.pl with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1L7aKI-0000Uf-NN for xfs@oss.sgi.com; Tue, 02 Dec 2008 19:50:26 +0100 Received: from arekm by maven.pl with local (Exim 4.69) (envelope-from ) id 1L7aJn-0003nN-Hn for xfs@oss.sgi.com; Tue, 02 Dec 2008 19:49:56 +0100 From: Arkadiusz Miskiewicz To: xfs@oss.sgi.com X-ASG-Orig-Subj: 2.6.27.7 vanilla, project quota enabled and process stuck in D state (repeatable every time) Subject: 2.6.27.7 vanilla, project quota enabled and process stuck in D state (repeatable every time) Date: Tue, 2 Dec 2008 19:49:55 +0100 User-Agent: PLD Linux KMail/1.9.10 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Message-Id: <200812021949.55463.arekm@maven.pl> X-Barracuda-Connect: main.carme.maven.pl[193.239.45.138] X-Barracuda-Start-Time: 1228243829 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.11752 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id mB2IoUgA012720 Hello, I'm trying to use xfs project quota on kernel 2.6.27.7 (vanilla, no additional patches), x86_64 UP machine (SMP kernel). mounted /home with usrquota,prjquota [arekm@arm ~]$ mount|grep xfs /dev/sda1 on / type xfs (rw) /dev/sda3 on /home type xfs (rw,usrquota,prjquota) /dev/hdb on /mnt/storage2 type xfs (rw) played a bit with setting quota/reporting it and such. $ cat /etc/projects 10:/home/users/arekm/public_html 10:/home/users/arekm/rpm 20:/home/users/arekm/tcl 20:/home/users/arekm/tcl-test I did for example xfs_quota -x -c "project -s 10" and allowed it to finish. I also started it second time and aborted with ctrl+c after few seconds (which I assume should have no effect since initial -s 10 was finished properly earlier). Played more with xfs_quota report and such. Now some processes that are using /home/users/arekm/rpm are hanging in D-state like: SysRq : Show Blocked State task PC stack pid father patch D ffff88003a7dd080 0 3971 3965 ffff880034453cd8 0000000000000086 0000000000000000 ffff8800344770d0 ffff880034453cd8 ffff8800354d2440 ffffffff805d0340 ffff8800354d27b8 00000000000041ed 00000000fffc7a61 ffff8800354d27b8 0000000000000250 Call Trace: [] ? kmem_zone_alloc+0x94/0xe0 [xfs] [] __down_write_nested+0x8d/0xd0 [] __down_write+0xb/0x10 [] down_write+0x9/0x10 [] xfs_ilock+0x76/0x90 [xfs] [] xfs_lock_two_inodes+0x70/0x120 [xfs] [] xfs_remove+0x141/0x3a0 [xfs] [] ? _spin_lock+0x9/0x10 [] xfs_setup_inode+0x673/0xa00 [xfs] [] vfs_unlink+0xf9/0x140 [] do_unlinkat+0x1a3/0x1c0 [] ? audit_syscall_entry+0x150/0x180 [] sys_unlink+0x11/0x20 [] system_call_fastpath+0x16/0x1b reboot, retry with patch (which accesses /home/users/arekm/rpm) and stuck in D-state again. touch home/users/arekm/rpm/xyz - doesn't stuck. cp /bin/bash /home/users/arekm/rpm/ - doesn't stuck. Did reboot and third test. D-state again for patch (this is interesting since uncompressing into /home/users/arekm/rpm/ succeeds but applying patch to uncompressed tree fails). SysRq : Show Blocked State task PC stack pid father patch D ffff88003a7d07c0 0 3631 3625 ffff88003443bcd8 0000000000000082 0000000000000000 ffff88003444e4a8 ffff88003443bcd8 ffff88003553e500 ffffffff805d0340 ffff88003553e878 00000000000041ed 00000000fffc4120 ffff88003553e878 0000000000000250 Call Trace: [] ? kmem_zone_alloc+0x94/0xe0 [xfs] [] __down_write_nested+0x8d/0xd0 [] __down_write+0xb/0x10 [] down_write+0x9/0x10 [] xfs_ilock+0x76/0x90 [xfs] [] xfs_lock_two_inodes+0x70/0x120 [xfs] [] xfs_remove+0x141/0x3a0 [xfs] [] ? _spin_lock+0x9/0x10 [] xfs_setup_inode+0x673/0xa00 [xfs] [] vfs_unlink+0xf9/0x140 [] do_unlinkat+0x1a3/0x1c0 [] ? audit_syscall_entry+0x150/0x180 [] sys_unlink+0x11/0x20 [] system_call_fastpath+0x16/0x1b I'm able to make it D-stuck quite reliably. Any ideas? Going to do xfs_repair just in case and retest. -- Arkadiusz Miśkiewicz PLD/Linux Team arekm / maven.pl http://ftp.pld-linux.org/ From arekm@maven.pl Tue Dec 2 13:08:55 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2J8txe013224 for ; Tue, 2 Dec 2008 13:08:55 -0600 X-ASG-Debug-ID: 1228244933-04aa00620000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from main.carme.maven.pl (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 27AED165704D for ; Tue, 2 Dec 2008 11:08:53 -0800 (PST) Received: from main.carme.maven.pl (main.carme.maven.pl [193.239.45.138]) by cuda.sgi.com with ESMTP id 6cLmJvCzuCuyhpMl for ; Tue, 02 Dec 2008 11:08:53 -0800 (PST) Received: from chello089076027073.chello.pl ([89.76.27.73]:2030 helo=maven.pl) by main.carme.maven.pl with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1L7aXI-0000uP-RI for xfs@oss.sgi.com; Tue, 02 Dec 2008 20:03:52 +0100 Received: from arekm by maven.pl with local (Exim 4.69) (envelope-from ) id 1L7aWn-0003rp-NQ for xfs@oss.sgi.com; Tue, 02 Dec 2008 20:03:22 +0100 From: Arkadiusz Miskiewicz To: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: 2.6.27.7 vanilla, project quota enabled and process stuck in D state (repeatable every time) Subject: Re: 2.6.27.7 vanilla, project quota enabled and process stuck in D state (repeatable every time) Date: Tue, 2 Dec 2008 20:03:21 +0100 User-Agent: PLD Linux KMail/1.9.10 References: <200812021949.55463.arekm@maven.pl> In-Reply-To: <200812021949.55463.arekm@maven.pl> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Message-Id: <200812022003.21645.arekm@maven.pl> X-Barracuda-Connect: main.carme.maven.pl[193.239.45.138] X-Barracuda-Start-Time: 1228244934 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0129 1.0000 -1.9367 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -1.94 X-Barracuda-Spam-Status: No, SCORE=-1.94 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.11752 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id mB2J8txe013224 On Tuesday 02 of December 2008, Arkadiusz Miskiewicz wrote: > Going to do xfs_repair just in case and retest. Didn't help, xfs_repair for small two things in phase 6 but nothing serious. Again d-state for patch. xfs_repair found just these (sorry, in polish) błędna liczba nused w wolnym bloku 16777216 dla i-węzła katalogu 237689990 przebudowywanie i-węzła katalogu 237689990 błędna liczba nused w wolnym bloku 16777216 dla i-węzła katalogu 873160686 przebudowywanie i-węzła katalogu 873160686 -- Arkadiusz Miśkiewicz PLD/Linux Team arekm / maven.pl http://ftp.pld-linux.org/ From jengelh@medozas.de Tue Dec 2 14:02:29 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_42 autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB2K2SYo015280 for ; Tue, 2 Dec 2008 14:02:29 -0600 X-ASG-Debug-ID: 1228248146-12f900090000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from sovereign.computergmbh.de (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 831F91658AC1 for ; Tue, 2 Dec 2008 12:02:26 -0800 (PST) Received: from sovereign.computergmbh.de (sovereign.computergmbh.de [85.214.69.204]) by cuda.sgi.com with ESMTP id wmowfBLIrHDVcXty for ; Tue, 02 Dec 2008 12:02:26 -0800 (PST) Received: by sovereign.computergmbh.de (Postfix, from userid 25121) id EDA0118038544; Tue, 2 Dec 2008 21:02:25 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by sovereign.computergmbh.de (Postfix) with ESMTP id E4F051C00EF63 for ; Tue, 2 Dec 2008 21:02:25 +0100 (CET) Date: Tue, 2 Dec 2008 21:02:25 +0100 (CET) From: Jan Engelhardt Sender: jengelh@sovereign.computergmbh.de To: xfs@oss.sgi.com X-ASG-Orig-Subj: Disk full during delayed allocation Subject: Disk full during delayed allocation Message-ID: User-Agent: Alpine 1.10 (LNX 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Barracuda-Connect: sovereign.computergmbh.de[85.214.69.204] X-Barracuda-Start-Time: 1228248147 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.11756 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Hi, on space-constrained filesystems, I noticed that extracting lots of files [about 10k] bumps the Used count up quickly leading to a disk full unless the extraction process (rpm here) is halted, synced, and then continued. I believe this is fully within XFS's standard behavior, but I would like to learn more how exactly this can happen. My guess is that this is due to the "dynamic journal/log" size XFS employs - on a filesystem just mkfs'ed, about 4256KB (for a volume of 128MB) are used, compared to e.g. reiser3 where the full 32MB for the journal are used (according to df) right from the start. Is this so? # df; killall -CONT rpm; sleep 1; killall -STOP rpm; df; sync; df; Filesystem 1K-blocks Used Available Use% Mounted on /lo/src.fs 93504 29396 64108 32% /usr/src /lo/src.fs 93504 49072 44432 53% /usr/src /lo/src.fs 93504 35632 57872 39% /usr/src From billodo@sgi.com Tue Dec 2 19:23:33 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB31NWIO001916 for ; Tue, 2 Dec 2008 19:23:33 -0600 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay3.corp.sgi.com (Postfix) with ESMTP id D035CAC002 for ; Tue, 2 Dec 2008 17:23:28 -0800 (PST) Received: from lnx-billodo.americas.sgi.com (lnx-billodo.americas.sgi.com [128.162.232.245]) by estes.americas.sgi.com (Postfix) with ESMTP id 7F5217000103; Tue, 2 Dec 2008 19:23:28 -0600 (CST) Received: by lnx-billodo.americas.sgi.com (Postfix, from userid 56393) id CCB3C17E01F; Tue, 2 Dec 2008 19:28:59 -0600 (CST) Date: Tue, 2 Dec 2008 19:28:59 -0600 From: "Bill O'Donnell" To: Christoph Hellwig Cc: xfs@sgi.com Subject: Re: [PATCH 5/9] add support for large btree blocks with CRCs and additional RAS information Message-ID: <20081203012859.GA16811@sgi.com> References: <20080925225633.GF9822@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080925225633.GF9822@lst.de> User-Agent: Mutt/1.5.16 (2007-06-09) On Fri, Sep 26, 2008 at 12:56:33AM +0200, Christoph Hellwig wrote: | Add support for larger btree blocks that contains a CRC32C checksum, a | filesystem uuid and block number for detecting filesystem consistency | and out of place writes. The use of these blocks is triggered by the | crc superblock patches just added. | | Note that we currently do not log the crc of the block, but re-created | it during log recovery. With the pending patch to also checksum the log | this should be safe against filesystem corruption but doesn't really | follow the end to end argument. Also poking into the buffer to find | out whether this is a btree buffer during log recovery is not a very | clean way to implement this. I'll look into how well adding crcs | to the buffer log items for every btree is going to work and hope | I can switch to that variant for the next version. looks good... will need to put this through the QA wringer. -- Bill O'Donnell SGI billodo@sgi.com From billodo@sgi.com Tue Dec 2 19:27:03 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB31R32L002110 for ; Tue, 2 Dec 2008 19:27:03 -0600 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay1.corp.sgi.com (Postfix) with ESMTP id 1780F8F8062 for ; Tue, 2 Dec 2008 17:27:00 -0800 (PST) Received: from lnx-billodo.americas.sgi.com (lnx-billodo.americas.sgi.com [128.162.232.245]) by estes.americas.sgi.com (Postfix) with ESMTP id AC7547000103; Tue, 2 Dec 2008 19:26:59 -0600 (CST) Received: by lnx-billodo.americas.sgi.com (Postfix, from userid 56393) id 0670317E01F; Tue, 2 Dec 2008 19:32:31 -0600 (CST) Date: Tue, 2 Dec 2008 19:32:31 -0600 From: "Bill O'Donnell" To: Christoph Hellwig Cc: xfs@sgi.com, Dave Chinner Subject: Re: [PATCH 6/9] Add CRC checks to the superblock. Message-ID: <20081203013230.GB16811@sgi.com> References: <20080925225639.GG9822@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080925225639.GG9822@lst.de> User-Agent: Mutt/1.5.16 (2007-06-09) On Fri, Sep 26, 2008 at 12:56:39AM +0200, Christoph Hellwig wrote: | From: Dave Chinner | | [hch: minor adaptions] I suggest a more comprehensive header here. Otherwise code looks good. | | | Signed-off-by: Dave Chinner | Signed-off-by: Christoph Hellwig | From billodo@sgi.com Tue Dec 2 19:29:03 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB31T2fS002325 for ; Tue, 2 Dec 2008 19:29:03 -0600 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay3.corp.sgi.com (Postfix) with ESMTP id 3F58AAC001 for ; Tue, 2 Dec 2008 17:29:02 -0800 (PST) Received: from lnx-billodo.americas.sgi.com (lnx-billodo.americas.sgi.com [128.162.232.245]) by estes.americas.sgi.com (Postfix) with ESMTP id DE83A7000103; Tue, 2 Dec 2008 19:29:01 -0600 (CST) Received: by lnx-billodo.americas.sgi.com (Postfix, from userid 56393) id 3940317E01F; Tue, 2 Dec 2008 19:34:33 -0600 (CST) Date: Tue, 2 Dec 2008 19:34:33 -0600 From: "Bill O'Donnell" To: Christoph Hellwig Cc: xfs@sgi.com, Dave Chinner Subject: Re: [PATCH 7/9] Add CRC checks to the AGI Message-ID: <20081203013433.GC16811@sgi.com> References: <20080925225642.GH9822@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080925225642.GH9822@lst.de> User-Agent: Mutt/1.5.16 (2007-06-09) On Fri, Sep 26, 2008 at 12:56:42AM +0200, Christoph Hellwig wrote: | From: Dave Chinner | | [hch: minor adaptions] | I suggest a more comprehensive header. Code looks good otherwise. From billodo@sgi.com Tue Dec 2 19:30:36 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB31UaS2002574 for ; Tue, 2 Dec 2008 19:30:36 -0600 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay2.corp.sgi.com (Postfix) with ESMTP id 3C248304085 for ; Tue, 2 Dec 2008 17:30:33 -0800 (PST) Received: from lnx-billodo.americas.sgi.com (lnx-billodo.americas.sgi.com [128.162.232.245]) by estes.americas.sgi.com (Postfix) with ESMTP id 34C977000103; Tue, 2 Dec 2008 19:30:33 -0600 (CST) Received: by lnx-billodo.americas.sgi.com (Postfix, from userid 56393) id 8548D17E01F; Tue, 2 Dec 2008 19:36:04 -0600 (CST) Date: Tue, 2 Dec 2008 19:36:04 -0600 From: "Bill O'Donnell" To: Christoph Hellwig Cc: xfs@sgi.com, Dave Chinner Subject: Re: [PATCH 8/9] Add CRC checks to the AGF Message-ID: <20081203013604.GD16811@sgi.com> References: <20080925225646.GI9822@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080925225646.GI9822@lst.de> User-Agent: Mutt/1.5.16 (2007-06-09) On Fri, Sep 26, 2008 at 12:56:46AM +0200, Christoph Hellwig wrote: | From: Dave Chinner | | [hch: minor adaptions] | suggest a more comprehensive header... code looks good otherwise. From billodo@sgi.com Tue Dec 2 19:36:55 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB31ataF002988 for ; Tue, 2 Dec 2008 19:36:55 -0600 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay1.corp.sgi.com (Postfix) with ESMTP id AF6E98F8064 for ; Tue, 2 Dec 2008 17:36:54 -0800 (PST) Received: from lnx-billodo.americas.sgi.com (lnx-billodo.americas.sgi.com [128.162.232.245]) by estes.americas.sgi.com (Postfix) with ESMTP id 83FCF7000103; Tue, 2 Dec 2008 19:36:54 -0600 (CST) Received: by lnx-billodo.americas.sgi.com (Postfix, from userid 56393) id D678F17E01F; Tue, 2 Dec 2008 19:42:25 -0600 (CST) Date: Tue, 2 Dec 2008 19:42:25 -0600 From: "Bill O'Donnell" To: Christoph Hellwig Cc: xfs@sgi.com Subject: Re: [PATCH 9/9] Replace log checksumming code with CRCs. Message-ID: <20081203014225.GE16811@sgi.com> References: <20080925225650.GJ9822@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080925225650.GJ9822@lst.de> User-Agent: Mutt/1.5.16 (2007-06-09) On Fri, Sep 26, 2008 at 12:56:50AM +0200, Christoph Hellwig wrote: | From: Dave Chinner | | The log has debug only checksum validation; replace this with | stronger CRCs and always use it. | | So far we only checksum the payload in every log buffer. For the final | version this needs to be extended to include the headers, too. | | | [hch: minor adaptions] looks good. From david@fromorbit.com Tue Dec 2 20:13:00 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB32D0W6005255 for ; Tue, 2 Dec 2008 20:13:00 -0600 X-ASG-Debug-ID: 1228270377-660600380000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from ipmail05.adl2.internode.on.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 99233166646B for ; Tue, 2 Dec 2008 18:12:58 -0800 (PST) Received: from ipmail05.adl2.internode.on.net (ipmail05.adl2.internode.on.net [203.16.214.145]) by cuda.sgi.com with ESMTP id 7XzGMkrd6Eoh1h1S for ; Tue, 02 Dec 2008 18:12:58 -0800 (PST) Received: from ppp121-44-151-211.lns10.syd7.internode.on.net (HELO disturbed) ([121.44.151.211]) by ipmail05.adl2.internode.on.net with ESMTP; 03 Dec 2008 12:42:22 +1030 Received: from dave by disturbed with local (Exim 4.69) (envelope-from ) id 1L7hDy-0007v8-7a; Wed, 03 Dec 2008 13:12:22 +1100 Date: Wed, 3 Dec 2008 13:12:22 +1100 From: Dave Chinner To: Christoph Hellwig Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [patch 03/22] remove unused behvavior cruft in xfs_super.h Subject: Re: [patch 03/22] remove unused behvavior cruft in xfs_super.h Message-ID: <20081203021222.GB18236@disturbed> Mail-Followup-To: Christoph Hellwig , xfs@oss.sgi.com References: <20081202160430.775774000@bombadil.infradead.org> <20081202160649.932903000@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081202160649.932903000@bombadil.infradead.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Barracuda-Connect: ipmail05.adl2.internode.on.net[203.16.214.145] X-Barracuda-Start-Time: 1228270379 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0011 1.0000 -2.0137 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.01 X-Barracuda-Spam-Status: No, SCORE=-2.01 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.11778 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- On Tue, Dec 02, 2008 at 11:04:33AM -0500, Christoph Hellwig wrote: > > Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner -- Dave Chinner david@fromorbit.com From david@fromorbit.com Tue Dec 2 20:16:45 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB32GjCJ005795 for ; Tue, 2 Dec 2008 20:16:45 -0600 X-ASG-Debug-ID: 1228270603-660800760000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from ipmail05.adl2.internode.on.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 249D41665633 for ; Tue, 2 Dec 2008 18:16:44 -0800 (PST) Received: from ipmail05.adl2.internode.on.net (ipmail05.adl2.internode.on.net [203.16.214.145]) by cuda.sgi.com with ESMTP id MnMvtseSVj5iZGxz for ; Tue, 02 Dec 2008 18:16:44 -0800 (PST) Received: from ppp121-44-151-211.lns10.syd7.internode.on.net (HELO disturbed) ([121.44.151.211]) by ipmail05.adl2.internode.on.net with ESMTP; 03 Dec 2008 12:41:12 +1030 Received: from dave by disturbed with local (Exim 4.69) (envelope-from ) id 1L7hCg-0007sn-3Z; Wed, 03 Dec 2008 13:11:02 +1100 Date: Wed, 3 Dec 2008 13:11:02 +1100 From: Dave Chinner To: Christoph Hellwig Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [patch 02/22] remove useless mnt_want_write call in xfs_write Subject: Re: [patch 02/22] remove useless mnt_want_write call in xfs_write Message-ID: <20081203021102.GA18236@disturbed> Mail-Followup-To: Christoph Hellwig , xfs@oss.sgi.com References: <20081202160430.775774000@bombadil.infradead.org> <20081202160649.790190000@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081202160649.790190000@bombadil.infradead.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Barracuda-Connect: ipmail05.adl2.internode.on.net[203.16.214.145] X-Barracuda-Start-Time: 1228270605 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0003 1.0000 -2.0190 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.11778 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- On Tue, Dec 02, 2008 at 11:04:32AM -0500, Christoph Hellwig wrote: > > When mnt_want_write was introduced a call to it was added around > xfs_ichgtime, but there is no need for this because a file can't be open > read/write on a r/o mount, and a mount can't degrade r/o while we still > have files open for writing. As the mnt_want_write changes were never > merged into the CVS tree this patch is for mainline only. > > > Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner -- Dave Chinner david@fromorbit.com From sandeen@sandeen.net Tue Dec 2 20:25:55 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB32Pt4u006245 for ; Tue, 2 Dec 2008 20:25:55 -0600 X-ASG-Debug-ID: 1228271153-660600d00000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from sandeen.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 57720161A23C for ; Tue, 2 Dec 2008 18:25:53 -0800 (PST) Received: from sandeen.net (sandeen.net [209.173.210.139]) by cuda.sgi.com with ESMTP id lT9CwjaYzN4EhWue for ; Tue, 02 Dec 2008 18:25:53 -0800 (PST) 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 BD4F39F08EF; Tue, 2 Dec 2008 20:20:19 -0600 (CST) Message-ID: <4935ECE3.70607@sandeen.net> Date: Tue, 02 Dec 2008 20:20:19 -0600 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: Christoph Hellwig CC: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [patch 01/22] fix compile on 32 bit systems Subject: Re: [patch 01/22] fix compile on 32 bit systems References: <20081202160430.775774000@bombadil.infradead.org> <20081202160649.658660000@bombadil.infradead.org> In-Reply-To: <20081202160649.658660000@bombadil.infradead.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Barracuda-Connect: sandeen.net[209.173.210.139] X-Barracuda-Start-Time: 1228271154 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.11780 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- (to be formal about it) > Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen From sandeen@sandeen.net Tue Dec 2 20:27:06 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB32R6tg006360 for ; Tue, 2 Dec 2008 20:27:06 -0600 X-ASG-Debug-ID: 1228271225-660600e30000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from sandeen.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id AAD6A162E532 for ; Tue, 2 Dec 2008 18:27:05 -0800 (PST) Received: from sandeen.net (sandeen.net [209.173.210.139]) by cuda.sgi.com with ESMTP id YS6PQLsGr1HIYFZz for ; Tue, 02 Dec 2008 18:27:05 -0800 (PST) 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 C228DAABFC0; Tue, 2 Dec 2008 20:22:04 -0600 (CST) Message-ID: <4935ED4C.2070205@sandeen.net> Date: Tue, 02 Dec 2008 20:22:04 -0600 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: Christoph Hellwig CC: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [patch 04/22] remove unused prototypes for xfs_ihash_init / xfs_ihash_free Subject: Re: [patch 04/22] remove unused prototypes for xfs_ihash_init / xfs_ihash_free References: <20081202160430.775774000@bombadil.infradead.org> <20081202160650.066779000@bombadil.infradead.org> In-Reply-To: <20081202160650.066779000@bombadil.infradead.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Barracuda-Connect: sandeen.net[209.173.210.139] X-Barracuda-Start-Time: 1228271225 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.11780 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen From david@fromorbit.com Tue Dec 2 20:13:49 2008 Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB32DnO6005315 for ; Tue, 2 Dec 2008 20:13:49 -0600 X-ASG-Debug-ID: 1228270427-660700460000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from ipmail05.adl2.internode.on.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id EB26B166647C for ; Tue, 2 Dec 2008 18:13:48 -0800 (PST) Received: from ipmail05.adl2.internode.on.net (ipmail05.adl2.internode.on.net [203.16.214.145]) by cuda.sgi.com with ESMTP id R14PNDkxlPMFZIt1 for ; Tue, 02 Dec 2008 18:13:48 -0800 (PST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAL95NUl5LJfT/2dsb2JhbADSfoJ/ X-IronPort-AV: E=Sophos;i="4.33,705,1220193000"; d="scan'208";a="268308608" Received: from ppp121-44-151-211.lns10.syd7.internode.on.net (HELO disturbed) ([121.44.151.211]) by ipmail05.adl2.internode.on.net with ESMTP; 03 Dec 2008 12:43:22 +1030 Received: from dave by disturbed with local (Exim 4.69) (envelope-from ) id 1L7hEw-0007wu-7n; Wed, 03 Dec 2008 13:13:22 +1100 Date: Wed, 3 Dec 2008 13:13:22 +1100 From: Dave Chinner To: Christoph Hellwig Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [patch 04/22] remove unused prototypes for xfs_ihash_init / xfs_ihash_free Subject: Re: [patch 04/22] remove unused prototypes for xfs_ihash_init / xfs_ihash_free Message-ID: <20081203021322.GC18236@disturbed> Mail-Followup-To: Christoph Hellwig , xfs@oss.sgi.com References: <20081202160430.775774000@bombadil.infradead.org> <20081202160650.066779000@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081202160650.066779000@bombadil.infradead.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Barracuda-Connect: ipmail05.adl2.internode.on.net[203.16.214.145] X-Barracuda-Start-Time: 1228270428 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0001 1.0000 -2.0203 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.11778 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- On Tue, Dec 02, 2008 at 11:04:34AM -0500, Christoph Hellwig wrote: > > Signed-off-by: Christoph Hellwig I must have missed these when removing the ihash.... Reviewed-by: Dave Chinner -- Dave Chinner david@fromorbit.com From david@fromorbit.com Tue Dec 2 20:34:57 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB32Yuja007031 for ; Tue, 2 Dec 2008 20:34:57 -0600 X-ASG-Debug-ID: 1228271694-660901780000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from ipmail05.adl2.internode.on.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 1438D1664BF7 for ; Tue, 2 Dec 2008 18:34:55 -0800 (PST) Received: from ipmail05.adl2.internode.on.net (ipmail05.adl2.internode.on.net [203.16.214.145]) by cuda.sgi.com with ESMTP id ebzFvap36RSD3zdx for ; Tue, 02 Dec 2008 18:34:55 -0800 (PST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEABd9NUl5LJfT/2dsb2JhbADSf4J/ X-IronPort-AV: E=Sophos;i="4.33,705,1220193000"; d="scan'208";a="268318492" Received: from ppp121-44-151-211.lns10.syd7.internode.on.net (HELO disturbed) ([121.44.151.211]) by ipmail05.adl2.internode.on.net with ESMTP; 03 Dec 2008 12:59:52 +1030 Received: from dave by disturbed with local (Exim 4.69) (envelope-from ) id 1L7hUt-0008Ji-0m; Wed, 03 Dec 2008 13:29:51 +1100 Date: Wed, 3 Dec 2008 13:29:50 +1100 From: Dave Chinner To: Christoph Hellwig Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [patch 05/22] cleanup the inode reclaim path Subject: Re: [patch 05/22] cleanup the inode reclaim path Message-ID: <20081203022950.GD18236@disturbed> Mail-Followup-To: Christoph Hellwig , xfs@oss.sgi.com References: <20081202160430.775774000@bombadil.infradead.org> <20081202160650.198364000@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081202160650.198364000@bombadil.infradead.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Barracuda-Connect: ipmail05.adl2.internode.on.net[203.16.214.145] X-Barracuda-Start-Time: 1228271696 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.11780 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- On Tue, Dec 02, 2008 at 11:04:35AM -0500, Christoph Hellwig wrote: > Merge xfs_iextract and xfs_idestory into xfs_ireclaim as they are never xfs_idestroy > called individually. Also rewrite most comments in this area as they > were serverly out of date. severely > > Signed-off-by: Christoph Hellwig > > Index: xfs-master/fs/xfs/xfs_iget.c > =================================================================== > --- xfs-master.orig/fs/xfs/xfs_iget.c 2008-12-01 19:26:04.000000000 +0100 > +++ xfs-master/fs/xfs/xfs_iget.c 2008-12-01 19:27:15.000000000 +0100 > @@ -450,65 +450,109 @@ xfs_iput_new( > IRELE(ip); > } > > - > /* > - * This routine embodies the part of the reclaim code that pulls > - * the inode from the inode hash table and the mount structure's > - * inode list. > - * This should only be called from xfs_reclaim(). > + * This is called free all the memory associated with an inode. * xfs_ireclaim is called to free.... > + * It must free the inode itself and any buffers allocated for > + * if_extents/if_data and if_broot. It must also free the lock > + * associated with the inode. > + * > + * Note: because we don't initialise everything on reallocation out > + * of the zone, we must ensure we nullify everything correctly before > + * freeing the structure. > */ > void > -xfs_ireclaim(xfs_inode_t *ip) > +xfs_ireclaim( > + struct xfs_inode *ip) > { > - /* > - * Remove from old hash list and mount list. > - */ > - XFS_STATS_INC(xs_ig_reclaims); > + struct xfs_mount *mp = ip->i_mount; > + struct xfs_perag *pag; > > - xfs_iextract(ip); > + XFS_STATS_INC(xs_ig_reclaims); > > /* > - * Here we do a spurious inode lock in order to coordinate with inode > - * cache radix tree lookups. This is because the lookup can reference > - * the inodes in the cache without taking references. We make that OK > - * here by ensuring that we wait until the inode is unlocked after the > - * lookup before we go ahead and free it. We get both the ilock and > - * the iolock because the code may need to drop the ilock one but will > - * still hold the iolock. > + * Remove the inode from the per-AG radix tree. It doesn't matter > + * if it was never added to it because radix_tree_delete can deal > + * with that case just fine. > */ > - xfs_ilock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL); > + pag = xfs_get_perag(mp, ip->i_ino); > + write_lock(&pag->pag_ici_lock); > + radix_tree_delete(&pag->pag_ici_root, XFS_INO_TO_AGINO(mp, ip->i_ino)); > + write_unlock(&pag->pag_ici_lock); > + xfs_put_perag(mp, pag); > > /* > - * Release dquots (and their references) if any. An inode may escape > - * xfs_inactive and get here via vn_alloc->vn_reclaim path. > + * Here we do an (almost) spurious inode lock in order to coordinate > + * with inode cache radix tree lookups. This is because the lookup > + * can reference the inodes in the cache without taking references. > + * > + * We make that OK here by ensuring that we wait until the inode is > + * unlocked after the lookup before we go ahead and free it. We get > + * both the ilock and the iolock because the code may need to drop the > + * ilock one but will still hold the iolock. > */ Hmmm - I need to check if this is still true. We now use igrab() to get a reference on all lookups except the reclaim lookup. In the case of a racing reclaim lookup, we check for the reclaim flags on the inode after the lookup but before we try to lock the inode. Hence this lock check probably doesn't do anything anymore, but I need to look a bit closer.... Other than the typos, the code looks ok, so: Reviewed-by: Dave Chinner Cheers, Dave. -- Dave Chinner david@fromorbit.com From david@fromorbit.com Tue Dec 2 20:37:58 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB32bwj9007258 for ; Tue, 2 Dec 2008 20:37:58 -0600 X-ASG-Debug-ID: 1228271876-660801a40000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from ipmail05.adl2.internode.on.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id C7CB21664C10 for ; Tue, 2 Dec 2008 18:37:56 -0800 (PST) Received: from ipmail05.adl2.internode.on.net (ipmail05.adl2.internode.on.net [203.16.214.145]) by cuda.sgi.com with ESMTP id tjyAnG15L7krGIDY for ; Tue, 02 Dec 2008 18:37:56 -0800 (PST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEABd9NUl5LJfT/2dsb2JhbADSf4J/ X-IronPort-AV: E=Sophos;i="4.33,705,1220193000"; d="scan'208";a="268324488" Received: from ppp121-44-151-211.lns10.syd7.internode.on.net (HELO disturbed) ([121.44.151.211]) by ipmail05.adl2.internode.on.net with ESMTP; 03 Dec 2008 13:07:55 +1030 Received: from dave by disturbed with local (Exim 4.69) (envelope-from ) id 1L7hcg-0008UF-P7; Wed, 03 Dec 2008 13:37:54 +1100 Date: Wed, 3 Dec 2008 13:37:54 +1100 From: Dave Chinner To: Christoph Hellwig Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [patch 06/22] kill xfs_buf_iostart Subject: Re: [patch 06/22] kill xfs_buf_iostart Message-ID: <20081203023754.GE18236@disturbed> Mail-Followup-To: Christoph Hellwig , xfs@oss.sgi.com References: <20081202160430.775774000@bombadil.infradead.org> <20081202160650.360918000@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081202160650.360918000@bombadil.infradead.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Barracuda-Connect: ipmail05.adl2.internode.on.net[203.16.214.145] X-Barracuda-Start-Time: 1228271877 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.11780 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- On Tue, Dec 02, 2008 at 11:04:36AM -0500, Christoph Hellwig wrote: > xfs_buf_iostart is a "shared" helper for xfs_buf_read_flags, > xfs_bawrite, and xfs_bdwrite - except that there isn't much shared > code but rather special cases for each caller. > > So remove this function and move the functionality to the caller. > xfs_bawrite and xfs_bdwrite are now big enough to be moved out of > line and the xfs_buf_read_flags is moved into a new helper called > _xfs_buf_read. > > (First sent on August 2nd) > > Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner -- Dave Chinner david@fromorbit.com From david@fromorbit.com Tue Dec 2 20:39:52 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB32dqZ2007461 for ; Tue, 2 Dec 2008 20:39:52 -0600 X-ASG-Debug-ID: 1228271989-660901b30000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from ipmail05.adl2.internode.on.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id B0A0D1664C33 for ; Tue, 2 Dec 2008 18:39:50 -0800 (PST) Received: from ipmail05.adl2.internode.on.net (ipmail05.adl2.internode.on.net [203.16.214.145]) by cuda.sgi.com with ESMTP id rGlVj07GeOuWf3mA for ; Tue, 02 Dec 2008 18:39:50 -0800 (PST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEABd9NUl5LJfT/2dsb2JhbADSf4J/ X-IronPort-AV: E=Sophos;i="4.33,705,1220193000"; d="scan'208";a="268325747" Received: from ppp121-44-151-211.lns10.syd7.internode.on.net (HELO disturbed) ([121.44.151.211]) by ipmail05.adl2.internode.on.net with ESMTP; 03 Dec 2008 13:09:49 +1030 Received: from dave by disturbed with local (Exim 4.69) (envelope-from ) id 1L7heW-00004z-SY; Wed, 03 Dec 2008 13:39:48 +1100 Date: Wed, 3 Dec 2008 13:39:48 +1100 From: Dave Chinner To: Christoph Hellwig Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [patch 07/22] stop using igrab in xfs_vn_link Subject: Re: [patch 07/22] stop using igrab in xfs_vn_link Message-ID: <20081203023948.GF18236@disturbed> Mail-Followup-To: Christoph Hellwig , xfs@oss.sgi.com References: <20081202160430.775774000@bombadil.infradead.org> <20081202160650.515494000@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081202160650.515494000@bombadil.infradead.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Barracuda-Connect: ipmail05.adl2.internode.on.net[203.16.214.145] X-Barracuda-Start-Time: 1228271991 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0010 1.0000 -2.0145 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.01 X-Barracuda-Spam-Status: No, SCORE=-2.01 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.11780 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- On Tue, Dec 02, 2008 at 11:04:37AM -0500, Christoph Hellwig wrote: > ->link is guranteed to get an already reference inode passed so we > can do a simple increment of i_count instead of using igrab and thus > avoid banging on the global inode_lock. This is what most filesystems > already do. > > Also move the increment after the call to xfs_link to simplify error > handling. > > (First sent on July 26th) > > Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner -- Dave Chinner david@fromorbit.com From david@fromorbit.com Tue Dec 2 20:56:25 2008 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id mB32uPTu008724 for ; Tue, 2 Dec 2008 20:56:25 -0600 X-ASG-Debug-ID: 1228272982-12c8001d0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from ipmail05.adl2.internode.on.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 3CC3716104C9 for ; Tue, 2 Dec 2008 18:56:23 -0800 (PST) Received: from ipmail05.adl2.internode.on.net (ipmail05.adl2.internode.on.net [203.16.214.145]) by cuda.sgi.com with ESMTP id GrqJaRGYEKAS2iIg for ; Tue, 02 Dec 2008 18:56:23 -0800 (PST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAEuENUl5LJfT/2dsb2JhbADSf4J/ X-IronPort-AV: E=Sophos;i="4.33,705,1220193000"; d="scan'208";a="268335536" Received: from ppp121-44-151-211.lns10.syd7.internode.on.net (HELO disturbed) ([121.44.151.211]) by ipmail05.adl2.internode.on.net with ESMTP; 03 Dec 2008 13:26:15 +1030 Received: from dave by disturbed with local (Exim 4.69) (envelope-from ) id 1L7huQ-0000U5-AT; Wed, 03 Dec 2008 13:56:14 +1100 Date: Wed, 3 Dec 2008 13:56:14 +1100 From: Dave Chinner To: Christoph Hellwig Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [patch 08/22] reduce l_icloglock roundtrips Subject: Re: [patch 08/22] reduce l_icloglock roundtrips Message-ID: <20081203025614.GG18236@disturbed> Mail-Followup-To: Christoph Hellwig , xfs@oss.sgi.com References: <20081202160430.775774000@bombadil.infradead.org> <20081202160650.663976000@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081202160650.663976000@bombadil.infradead.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Barracuda-Connect: ipmail05.adl2.internode.on.net[203.16.214.145] X-Barracuda-Start-Time: 1228272984 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0209 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using