From marvin24@gmx.de Mon Jun 1 05:34:05 2009 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=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.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n51AY4sK257123 for ; Mon, 1 Jun 2009 05:34:05 -0500 X-ASG-Debug-ID: 1243852459-0e2a01080000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail.gmx.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with SMTP id B13E61D37E69 for ; Mon, 1 Jun 2009 03:34:19 -0700 (PDT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by cuda.sgi.com with SMTP id xqhlRAV7YDCzAKGE for ; Mon, 01 Jun 2009 03:34:19 -0700 (PDT) Received: (qmail invoked by alias); 01 Jun 2009 10:34:18 -0000 Received: from unknown (EHLO localhost.localdomain) [78.52.34.214] by mail.gmx.net (mp002) with SMTP; 01 Jun 2009 12:34:18 +0200 X-Authenticated: #9962044 X-Provags-ID: V01U2FsdGVkX1+Fk1weEX6FjzMq0MxJunJSnSXgNZtOh1XeZGRvWu Nzw81m+2jR8Mp1 From: Marvin To: xfs@oss.sgi.com X-ASG-Orig-Subj: fsr stucks in D-state Subject: fsr stucks in D-state Date: Mon, 1 Jun 2009 12:33:39 +0200 User-Agent: KMail/1.11.2 (Linux/2.6.30-rc7; KDE/4.2.2; x86_64; ; ) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906011233.39721.marvin24@gmx.de> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.6 X-Barracuda-Connect: mail.gmx.net[213.165.64.20] X-Barracuda-Start-Time: 1243852460 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.27300 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Hi, I observed a hang in D-state when using xfs_fsr. - xfsprogs is from git (3.0.2) - kernel also (2.6.30-rc7...) I tried 2.6.29.4 and it worked flawless. Machine is powerpc32. Here is the sysrq-t trace: xfs_fsr D 480f7f3c 0 4211 4210 Call Trace: [d1adfc40] [00001032] 0x1032 (unreliable) [d1adfd00] [c0008dd8] __switch_to+0x4c/0x6c [d1adfd20] [c02c5294] __schedule+0x230/0x360 [d1adfd70] [c02c53ec] schedule+0x28/0x54 [d1adfd80] [c02c7964] rwsem_down_failed_common+0x104/0x25c [d1adfdb0] [c02c7ae4] rwsem_down_write_failed+0x28/0x40 [d1adfde0] [c02c6994] down_write+0x30/0x40 [d1adfdf0] [c012399c] xfs_ilock+0x9c/0xa0 [d1adfe00] [c014375c] xfs_inactive+0x2e8/0x48c [d1adfe40] [c015113c] xfs_fs_clear_inode+0x40/0x50 [d1adfe50] [c00ab764] clear_inode+0x68/0xec [d1adfe60] [c00ac02c] generic_delete_inode+0x16c/0x170 [d1adfe80] [c00aaf20] iput+0x70/0x90 [d1adfe90] [c00a7424] dentry_iput+0xc8/0x154 [d1adfeb0] [c00a75e0] d_kill+0x50/0x8c [d1adfed0] [c00a80cc] dput+0x110/0x210 [d1adfef0] [c0095b50] __fput+0x178/0x204 [d1adff10] [c0091eec] filp_close+0x6c/0xa0 [d1adff30] [c0091fd4] sys_close+0xb4/0x124 [d1adff40] [c0011fc4] ret_from_syscall+0x0/0x38 --- Exception: c01 at 0x480f7f3c LR = 0x1000397c Greetings Marvin From Richard.Ems@cape-horn-eng.com Mon Jun 1 09:32:33 2009 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 (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n51EWW6G011805 for ; Mon, 1 Jun 2009 09:32:32 -0500 X-ASG-Debug-ID: 1243867150-49fe01b40000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from smtprelay10.ispgateway.de (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id EBD08148AB52 for ; Mon, 1 Jun 2009 07:39:10 -0700 (PDT) Received: from smtprelay10.ispgateway.de (smtprelay10.ispgateway.de [80.67.31.44]) by cuda.sgi.com with ESMTP id n4NMsecvgKZTHCS5 for ; Mon, 01 Jun 2009 07:39:10 -0700 (PDT) Received: from [62.43.225.238] (helo=[192.168.30.191]) by smtprelay10.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1MB8ZC-0004GJ-R9; Mon, 01 Jun 2009 16:32:46 +0200 Message-ID: <4A23E68E.6070400@cape-horn-eng.com> Date: Mon, 01 Jun 2009 16:32:46 +0200 From: Richard Ems User-Agent: Thunderbird 2.0.0.21 (X11/20090310) MIME-Version: 1.0 To: Eric Sandeen CC: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Invalid argument Subject: Re: xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Invalid argument References: <4A180FCD.9080905@cape-horn-eng.com> <4A181B40.9080608@sandeen.net> <20090523180721.94212hyfjppuupmo@webmail.df.eu> <4A1833D7.30608@sandeen.net> <20090523194552.66062w3zquwvms00@webmail.df.eu> <4A1844AF.7030906@sandeen.net> <4A184DAC.8060400@sandeen.net> In-Reply-To: <4A184DAC.8060400@sandeen.net> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Df-Sender: 337294 X-Barracuda-Connect: smtprelay10.ispgateway.de[80.67.31.44] X-Barracuda-Start-Time: 1243867150 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.27304 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Eric Sandeen wrote: > if you growfs to a nr of blocks that is about 55 blocks less than the > actual device size, it should succeed for you. There's a case where the > last AG would be too small and it tries to compensate but there's an > overflow, I'll send a patch. Yes, it worked growing to a smaller size. Thanks again, Richard -- Richard Ems mail: Richard.Ems@Cape-Horn-Eng.com Cape Horn Engineering S.L. C/ Dr. J.J. Dómine 1, 5º piso 46011 Valencia Tel : +34 96 3242923 / Fax 924 http://www.cape-horn-eng.com From a.beregalov@gmail.com Mon Jun 1 10:22:43 2009 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 cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n51FMgxH016777 for ; Mon, 1 Jun 2009 10:22:42 -0500 X-ASG-Debug-ID: 1243870160-43ff03630000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail-bw0-f226.google.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 76084148B17F for ; Mon, 1 Jun 2009 08:29:20 -0700 (PDT) Received: from mail-bw0-f226.google.com (mail-bw0-f226.google.com [209.85.218.226]) by cuda.sgi.com with ESMTP id dfy5BBVVZX8Ru2km for ; Mon, 01 Jun 2009 08:29:20 -0700 (PDT) Received: by bwz26 with SMTP id 26so7151114bwz.20 for ; Mon, 01 Jun 2009 08:22:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=XqUWFtCzZJ36lG32bMrBUSZXUfLnobM4Hm85lExw2Es=; b=jlZxdj6G2tbF4rMHJfunsj+W/qCu1qs4lTaqaxKMcGrDHEcshTvh/JljlMCZTeoI0w 0uTnVjwyAnClYQFraW3oxU8hvJf9VWtacO7ncvkXy24OqtyzpV9ao/9l5Di1lR5jq1ZY S/h4aiZ6KaOSoD501CQYOhNx5f2K+y3ByEtyA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=MgvmjK9F36w1mHyVTeCiJQEAJpjv0Q7sG8P533twBVTM5UL5QObMYP/O34cEX9mpz1 ssC+ZlqbFZO7xXxT9zvmSmuF6I4JvMFW1NVTbyfaTrg+sVcg0+eEsOipLfVAU3mT8jTR Uuib9jzXZreuzJ0yxmr11wboklQ5qzLG3iw2M= MIME-Version: 1.0 Received: by 10.204.58.79 with SMTP id f15mr5804561bkh.202.1243869776933; Mon, 01 Jun 2009 08:22:56 -0700 (PDT) Date: Mon, 1 Jun 2009 19:22:56 +0400 Message-ID: X-ASG-Orig-Subj: 2.6.30-rc6: BUG at fs/xfs/support/debug.c:109! Subject: 2.6.30-rc6: BUG at fs/xfs/support/debug.c:109! From: Alexander Beregalov To: Kernel Testers List , xfs@oss.sgi.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Barracuda-Connect: mail-bw0-f226.google.com[209.85.218.226] X-Barracuda-Start-Time: 1243870161 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: -1.52 X-Barracuda-Spam-Status: No, SCORE=-1.52 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.27306 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Hi Assertion failed: *nmap >= 1, file: fs/xfs/xfs_bmap.c, line: 4846 ------------[ cut here ]------------ kernel BUG at fs/xfs/support/debug.c:109! invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC last sysfs file: /sys/kernel/uevent_seqnum CPU 0 Modules linked in: Pid: 30665, comm: emerge Not tainted 2.6.30-rc6-00144-g5805977 #1 PowerEdge 1950 RIP: 0010:[] [] assfail+0x2b/0x30 RSP: 0018:ffff8800303c1b98 EFLAGS: 00010246 RAX: 0000000000000054 RBX: 0000000000000000 RCX: 0000000000000301 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001 RBP: ffff8800303c1ba8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: 0000000800000000 R13: ffff880078c0ccc0 R14: 0000000000000002 R15: ffff88007eb3f000 FS: 00007f7e92dbc6f0(0000) GS:ffff880005000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000001b0a024 CR3: 0000000074cb0000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process emerge (pid: 30665, threadinfo ffff8800303c0000, task ffff88007e335e10) Stack: ffff8800051cefa0 00000000780d89a3 ffff8800303c1d88 ffffffff803d6bad ffffffff804c9ad8 ffffffff814497f8 ffff880045a72000 ffff880045a72aa8 ffffffff81449800 0000000000000000 0000000000000000 00000000780d89a3 Call Trace: [] xfs_bmapi+0xad/0x1ad0 [] ? _atomic_dec_and_lock+0x88/0xb0 [] ? xfs_buf_free+0xd7/0x130 [] ? _spin_unlock+0x3f/0x80 [] ? xfs_buf_rele+0x124/0x190 [] ? xfs_buf_unlock+0x3d/0x80 [] ? xfs_trans_brelse+0x219/0x2e0 [] ? xfs_da_brelse+0x7f/0x150 [] xfs_dir2_leaf_getdents+0x640/0x7b0 [] ? filldir+0x0/0x100 [] ? filldir+0x0/0x100 [] xfs_readdir+0x12c/0x140 [] ? filldir+0x0/0x100 [] xfs_file_readdir+0x47/0x70 [] vfs_readdir+0xd0/0xf0 [] sys_getdents+0x96/0x110 [] system_call_fastpath+0x16/0x1b Code: 55 89 d1 48 89 e5 48 89 f2 48 83 ec 10 48 89 fe 65 48 8b 04 25 28 00 00 00 48 89 45 f8 31 c0 48 c7 c7 38 73 83 80 e8 25 a4 29 00 <0f> 0b eb fe 90 55 48 89 e5 41 57 49 89 d7 41 56 41 55 49 89 cd RIP [] assfail+0x2b/0x30 RSP ---[ end trace bf7e45980908c8f7 ]--- From felixb@sgi.com Mon Jun 1 11:09:15 2009 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 relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n51G9FLb019948 for ; Mon, 1 Jun 2009 11:09:15 -0500 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay1.corp.sgi.com (Postfix) with ESMTP id 3CF498F807A for ; Mon, 1 Jun 2009 09:09:29 -0700 (PDT) Received: from eagdhcp-232-182.americas.sgi.com (eagdhcp-232-182.americas.sgi.com [128.162.232.182]) by estes.americas.sgi.com (Postfix) with ESMTP id 12ACF700016A; Mon, 1 Jun 2009 11:09:29 -0500 (CDT) Cc: Kernel Testers List , xfs@oss.sgi.com Message-Id: From: Felix Blyakher To: Alexander Beregalov In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Subject: Re: 2.6.30-rc6: BUG at fs/xfs/support/debug.c:109! Date: Mon, 1 Jun 2009 11:09:29 -0500 References: X-Mailer: Apple Mail (2.926) X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Jun 1, 2009, at 10:22 AM, Alexander Beregalov wrote: > Hi > > Assertion failed: *nmap >= 1, file: fs/xfs/xfs_bmap.c, line: 4846 Alexander, what test triggered this assertion? > > ------------[ cut here ]------------ > kernel BUG at fs/xfs/support/debug.c:109! > invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC > last sysfs file: /sys/kernel/uevent_seqnum > CPU 0 > Modules linked in: > Pid: 30665, comm: emerge Not tainted 2.6.30-rc6-00144-g5805977 #1 > PowerEdge 1950 > RIP: 0010:[] [] assfail+0x2b/0x30 > RSP: 0018:ffff8800303c1b98 EFLAGS: 00010246 > RAX: 0000000000000054 RBX: 0000000000000000 RCX: 0000000000000301 > RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001 > RBP: ffff8800303c1ba8 R08: 0000000000000000 R09: 0000000000000000 > R10: 0000000000000001 R11: 0000000000000001 R12: 0000000800000000 > R13: ffff880078c0ccc0 R14: 0000000000000002 R15: ffff88007eb3f000 > FS: 00007f7e92dbc6f0(0000) GS:ffff880005000000(0000) knlGS: > 0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 0000000001b0a024 CR3: 0000000074cb0000 CR4: 00000000000006e0 > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 > Process emerge (pid: 30665, threadinfo ffff8800303c0000, task > ffff88007e335e10) > Stack: > ffff8800051cefa0 00000000780d89a3 ffff8800303c1d88 ffffffff803d6bad > ffffffff804c9ad8 ffffffff814497f8 ffff880045a72000 ffff880045a72aa8 > ffffffff81449800 0000000000000000 0000000000000000 00000000780d89a3 > Call Trace: > [] xfs_bmapi+0xad/0x1ad0 xfs_bmapi() here doesn't make sense at all. Up to this point the stack backtrace seems to be right. Strange ... Felix > > [] ? _atomic_dec_and_lock+0x88/0xb0 > [] ? xfs_buf_free+0xd7/0x130 > [] ? _spin_unlock+0x3f/0x80 > [] ? xfs_buf_rele+0x124/0x190 > [] ? xfs_buf_unlock+0x3d/0x80 > [] ? xfs_trans_brelse+0x219/0x2e0 > [] ? xfs_da_brelse+0x7f/0x150 > [] xfs_dir2_leaf_getdents+0x640/0x7b0 > [] ? filldir+0x0/0x100 > [] ? filldir+0x0/0x100 > [] xfs_readdir+0x12c/0x140 > [] ? filldir+0x0/0x100 > [] xfs_file_readdir+0x47/0x70 > [] vfs_readdir+0xd0/0xf0 > [] sys_getdents+0x96/0x110 > [] system_call_fastpath+0x16/0x1b > Code: 55 89 d1 48 89 e5 48 89 f2 48 83 ec 10 48 89 fe 65 48 8b 04 25 > 28 00 00 00 48 89 45 f8 31 c0 48 c7 c7 38 73 83 80 e8 25 a4 29 00 <0f> > 0b eb fe 90 55 48 89 e5 41 57 49 89 d7 41 56 41 55 49 89 cd > RIP [] assfail+0x2b/0x30 > RSP > ---[ end trace bf7e45980908c8f7 ]--- > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs From felixb@sgi.com Mon Jun 1 11:45:56 2009 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 relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n51GjtR2022203 for ; Mon, 1 Jun 2009 11:45:56 -0500 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay1.corp.sgi.com (Postfix) with ESMTP id EFBCD8F8050 for ; Mon, 1 Jun 2009 09:46:12 -0700 (PDT) Received: from eagdhcp-232-182.americas.sgi.com (eagdhcp-232-182.americas.sgi.com [128.162.232.182]) by estes.americas.sgi.com (Postfix) with ESMTP id 9C128700016A; Mon, 1 Jun 2009 11:46:12 -0500 (CDT) Cc: Linux Kernel Mailing List , Kernel Testers List , Alex Samad , Dave Chinner , xfs mailing list Message-Id: <36C1B891-5BC9-4149-AF22-58BC22AD7A3A@sgi.com> From: Felix Blyakher To: "Rafael J. Wysocki" In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Subject: Re: [Bug #13375] Kernel crash with 2.6.29 + nfs + xfs (radix-tree) Date: Mon, 1 Jun 2009 11:46:12 -0500 References: X-Mailer: Apple Mail (2.926) X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean [cc'ing the xfs mailing list] On May 30, 2009, at 2:55 PM, Rafael J. Wysocki wrote: > This message has been generated automatically as a part of a report > of regressions introduced between 2.6.28 and 2.6.29. > > The following bug entry is on the current list of known regressions > introduced between 2.6.28 and 2.6.29. Please verify if it still > should > be listed and let me know (either way). > > > Bug-Entry : http://bugzilla.kernel.org/show_bug.cgi?id=13375 > Subject : Kernel crash with 2.6.29 + nfs + xfs (radix-tree) > Submitter : Alex Samad > Date : 2009-05-20 0:37 (11 days old) > References : http://marc.info/?l=linux-kernel&m=124278675503699&w=4 > > > -- > To unsubscribe from this list: send the line "unsubscribe linux- > kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ From a.beregalov@gmail.com Mon Jun 1 12:37:53 2009 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 cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n51HbqVH025820 for ; Mon, 1 Jun 2009 12:37:52 -0500 X-ASG-Debug-ID: 1243877888-7ee401270000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail-fx0-f177.google.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 7F5AE2C2B82 for ; Mon, 1 Jun 2009 10:38:08 -0700 (PDT) Received: from mail-fx0-f177.google.com (mail-fx0-f177.google.com [209.85.220.177]) by cuda.sgi.com with ESMTP id 6DIUmbS94EKvd86Y for ; Mon, 01 Jun 2009 10:38:08 -0700 (PDT) Received: by fxm25 with SMTP id 25so7279684fxm.20 for ; Mon, 01 Jun 2009 10:38:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Jtu1iooZ+RGMe7zLzV0BkAq5iWE7NNABwzlQxzDWflk=; b=J4GqaAsmxfX1G473eq6P2ao8Z7Ve6DZf6b8AOzhxL2OwtOz64big+CBX1g6cpscbI9 qdzpgRH2R46BIrAOsYTHeGOiAyNoXt+qofKj4hjx2VWlp10JWHVJYjq23PRN+CRJXx3B KidqN4VlyMq3iy8YAs0t0g0BauSNwZlAtWFhc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=jFStMwuRyiU+DSqGO6mUiB3+pt3QkrSfPZCuypBozG8rBfwDMEfD6J0W2fzsIx4+NC 0kCNnsZ76I58bC/wT2l3n9RoRpCPORGAdr8Uv1LIa8naLmVMgrjQQjd3UxVuxvEXgxNw dhP4pJbUwUdFFHIO0lD7mwM83Nl9JRRlObyjk= MIME-Version: 1.0 Received: by 10.204.97.140 with SMTP id l12mr5919995bkn.133.1243877887521; Mon, 01 Jun 2009 10:38:07 -0700 (PDT) In-Reply-To: References: Date: Mon, 1 Jun 2009 21:38:07 +0400 Message-ID: X-ASG-Orig-Subj: Re: 2.6.30-rc6: BUG at fs/xfs/support/debug.c:109! Subject: Re: 2.6.30-rc6: BUG at fs/xfs/support/debug.c:109! From: Alexander Beregalov To: Felix Blyakher Cc: Kernel Testers List , xfs@oss.sgi.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Barracuda-Connect: mail-fx0-f177.google.com[209.85.220.177] X-Barracuda-Start-Time: 1243877889 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: -1.52 X-Barracuda-Spam-Status: No, SCORE=-1.52 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.27315 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean 2009/6/1 Felix Blyakher : > > On Jun 1, 2009, at 10:22 AM, Alexander Beregalov wrote: > >> Hi >> >> Assertion failed: *nmap >=3D 1, file: fs/xfs/xfs_bmap.c, line: 4846 > > Alexander, what test triggered this assertion? > >> >> ------------[ cut here ]------------ >> kernel BUG at fs/xfs/support/debug.c:109! >> invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC >> last sysfs file: /sys/kernel/uevent_seqnum >> CPU 0 >> Modules linked in: >> Pid: 30665, comm: emerge Not tainted 2.6.30-rc6-00144-g5805977 #1 >> PowerEdge 1950 >> RIP: 0010:[] =C2=A0[] assfail+0x2b/0= x30 >> RSP: 0018:ffff8800303c1b98 =C2=A0EFLAGS: 00010246 >> RAX: 0000000000000054 RBX: 0000000000000000 RCX: 0000000000000301 >> RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001 >> RBP: ffff8800303c1ba8 R08: 0000000000000000 R09: 0000000000000000 >> R10: 0000000000000001 R11: 0000000000000001 R12: 0000000800000000 >> R13: ffff880078c0ccc0 R14: 0000000000000002 R15: ffff88007eb3f000 >> FS: =C2=A000007f7e92dbc6f0(0000) GS:ffff880005000000(0000) >> knlGS:0000000000000000 >> CS: =C2=A00010 DS: 0000 ES: 0000 CR0: 0000000080050033 >> CR2: 0000000001b0a024 CR3: 0000000074cb0000 CR4: 00000000000006e0 >> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 >> DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 >> Process emerge (pid: 30665, threadinfo ffff8800303c0000, task >> ffff88007e335e10) >> Stack: >> ffff8800051cefa0 00000000780d89a3 ffff8800303c1d88 ffffffff803d6bad >> ffffffff804c9ad8 ffffffff814497f8 ffff880045a72000 ffff880045a72aa8 >> ffffffff81449800 0000000000000000 0000000000000000 00000000780d89a3 >> Call Trace: >> [] xfs_bmapi+0xad/0x1ad0 > > xfs_bmapi() here doesn't make sense at all. > Up to this point the stack backtrace seems to be right. > Strange ... It was Gentoo's `emerge --metadata`. It reads many small files (ebuilds). I am sure it cannot be easily reproduced. It runs fine everyday. I do not have a testcase. I can try to run it forever in loop if you need. From a.beregalov@gmail.com Mon Jun 1 12:42:56 2009 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 cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n51HguTN026084 for ; Mon, 1 Jun 2009 12:42:56 -0500 X-ASG-Debug-ID: 1243878191-139900850000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail-bw0-f226.google.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id C29972C2BD3 for ; Mon, 1 Jun 2009 10:43:12 -0700 (PDT) Received: from mail-bw0-f226.google.com (mail-bw0-f226.google.com [209.85.218.226]) by cuda.sgi.com with ESMTP id 9ytrj1H1r2s1eufX for ; Mon, 01 Jun 2009 10:43:12 -0700 (PDT) Received: by bwz26 with SMTP id 26so7231994bwz.20 for ; Mon, 01 Jun 2009 10:43:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=iU5emfcUCghLF4LyVPp+awHve3Ls91MDZdZ6eziddjc=; b=CIy3eEDJRtS+E0jloGaqvM8QjnqIz5BAY8tUcUtic8gRgwKLDWWbtotLz7+RQFV7WI kwK9kQh25jPwcS6QiCW8TLXz7KT8HRlBX1AaVBz95os1hsDwSexriSdLQDY8TmHDd2aL UgV917SZVuXyqQox82xoSfxAypPM+RTPCwR0U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=b7gcwm7G+qO7ShXfR4/CV0gmDw6yFBNsL4g6uZG376Ffu/iGy6qClqElWmjxSOb9Ed 4pUHOim51ke1y1UnbkpWvH2+YpM+LDO5QlNJNUMAvrnxDaBtLaH9UIBMkhpM4+hsVFwa Tslz/MaqwWmC60sNsvY4TxrKnSSDPPY9CfBOo= MIME-Version: 1.0 Received: by 10.204.71.68 with SMTP id g4mr5949579bkj.81.1243878191496; Mon, 01 Jun 2009 10:43:11 -0700 (PDT) In-Reply-To: References: Date: Mon, 1 Jun 2009 21:43:11 +0400 Message-ID: X-ASG-Orig-Subj: Re: 2.6.30-rc6: BUG at fs/xfs/support/debug.c:109! Subject: Re: 2.6.30-rc6: BUG at fs/xfs/support/debug.c:109! From: Alexander Beregalov To: Felix Blyakher Cc: Kernel Testers List , xfs@oss.sgi.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Barracuda-Connect: mail-bw0-f226.google.com[209.85.218.226] X-Barracuda-Start-Time: 1243878192 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.27315 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean By the way, Felix, your last pull request was a month ago. Final release of 2.6.30 is coming soon, could you please send the fixes to Linus? Just in case you do not read LKML. From felixb@sgi.com Mon Jun 1 12:53:05 2009 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 relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n51Hr5jr026703 for ; Mon, 1 Jun 2009 12:53:05 -0500 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay2.corp.sgi.com (Postfix) with ESMTP id 2EE8B304062 for ; Mon, 1 Jun 2009 10:53:19 -0700 (PDT) Received: from eagdhcp-232-182.americas.sgi.com (eagdhcp-232-182.americas.sgi.com [128.162.232.182]) by estes.americas.sgi.com (Postfix) with ESMTP id F3FDD700016A; Mon, 1 Jun 2009 12:53:18 -0500 (CDT) Cc: Kernel Testers List , xfs@oss.sgi.com Message-Id: <304A466C-12DD-4505-9FEA-02AF294FEED1@sgi.com> From: Felix Blyakher To: Alexander Beregalov In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Subject: Re: 2.6.30-rc6: BUG at fs/xfs/support/debug.c:109! Date: Mon, 1 Jun 2009 12:53:19 -0500 References: X-Mailer: Apple Mail (2.926) X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Jun 1, 2009, at 12:43 PM, Alexander Beregalov wrote: > By the way, > Felix, your last pull request was a month ago. > Final release of 2.6.30 is coming soon, could you please send the > fixes to Linus? > > Just in case you do not read LKML. Yes, I do. And it is on the top of my todo list today. Thanks, for heads up, though. Felix From felixb@sgi.com Mon Jun 1 12:58:42 2009 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 relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n51HwgVC027097 for ; Mon, 1 Jun 2009 12:58:42 -0500 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay1.corp.sgi.com (Postfix) with ESMTP id A88C88F80AC for ; Mon, 1 Jun 2009 10:58:56 -0700 (PDT) Received: from eagdhcp-232-182.americas.sgi.com (eagdhcp-232-182.americas.sgi.com [128.162.232.182]) by estes.americas.sgi.com (Postfix) with ESMTP id 811A8700016A; Mon, 1 Jun 2009 12:58:56 -0500 (CDT) Cc: Kernel Testers List , xfs@oss.sgi.com Message-Id: From: Felix Blyakher To: Alexander Beregalov In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Subject: Re: 2.6.30-rc6: BUG at fs/xfs/support/debug.c:109! Date: Mon, 1 Jun 2009 12:58:56 -0500 References: X-Mailer: Apple Mail (2.926) X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Jun 1, 2009, at 12:38 PM, Alexander Beregalov wrote: > It was Gentoo's `emerge --metadata`. It reads many small files > (ebuilds). > I am sure it cannot be easily reproduced. Right. Otherwise many more people would've reported it. > It runs fine everyday. I do not have a testcase. > I can try to run it forever in loop if you need. Yes, that will be good. The problem is that the traces are confusing. From one side readdir stack makes sense based on your description of the load, but OTOH the panic is from xfs_bmapi(), which doesn't fit in that backtrace at all. It seems like backtrace is from the concurrently running different thread. Don't have good idea for this bug atm. Felix From felixb@oss.sgi.com Mon Jun 1 13:47:26 2009 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,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.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n51IlQaY030976 for ; Mon, 1 Jun 2009 13:47:26 -0500 Received: (from felixb@localhost) by oss.sgi.com (8.14.3/8.14.3/Submit) id n51IlLGU030945; Mon, 1 Jun 2009 13:47:21 -0500 Date: Mon, 1 Jun 2009 13:47:21 -0500 Message-Id: <200906011847.n51IlLGU030945@oss.sgi.com> From: xfs@oss.sgi.com To: xfs@oss.sgi.com Subject: [XFS updates] XFS development tree branch, master, updated. v2.6.29-6708-g4156e73 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 096324873f9c7172a17aff9db1356f4f01b77afe X-Git-Newrev: 4156e735d3abde8e9243b5d22f7999dd3fffab2e 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 4156e73 xfs: prevent deadlock in xfs_qm_shake() from 096324873f9c7172a17aff9db1356f4f01b77afe (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 4156e735d3abde8e9243b5d22f7999dd3fffab2e Author: Felix Blyakher Date: Mon Jun 1 13:13:24 2009 -0500 xfs: prevent deadlock in xfs_qm_shake() It's possible to recurse into filesystem from the memory allocation, which deadlocks in xfs_qm_shake(). Add check for __GFP_FS, and bail out if it is not set. Signed-off-by: Felix Blyakher Signed-off-by: Hedi Berriche Reviewed-by: Christoph Hellwig Reviewed-by: Andi Kleen Signed-off-by: Felix Blyakher ----------------------------------------------------------------------- Summary of changes: fs/xfs/linux-2.6/kmem.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- XFS development tree From felixb@oss.sgi.com Mon Jun 1 23:23:23 2009 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, J_CHICKENPOX_43 autolearn=no version=3.3.0-rupdated Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n524NNod070065 for ; Mon, 1 Jun 2009 23:23:23 -0500 Received: (from felixb@localhost) by oss.sgi.com (8.14.3/8.14.3/Submit) id n524NLSH070026; Mon, 1 Jun 2009 23:23:21 -0500 Date: Mon, 1 Jun 2009 23:23:21 -0500 Message-Id: <200906020423.n524NLSH070026@oss.sgi.com> From: xfs@oss.sgi.com To: xfs@oss.sgi.com Subject: [XFS updates] XFS development tree branch, for-linus, updated. v2.6.29-7201-g1b17d76 X-Git-Refname: refs/heads/for-linus X-Git-Reftype: branch X-Git-Oldrev: 28e211700a81b0a934b6c7a4b8e7dda843634d2f X-Git-Newrev: 1b17d766463d51904cb242f194a780737e5f73ef 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, for-linus has been updated 1b17d76 xfs: prevent deadlock in xfs_qm_shake() e6da7c9 xfs: fix overflow in xfs_growfs_data_private 1f23920 xfs: fix double unlock in xfs_swap_extents() from 28e211700a81b0a934b6c7a4b8e7dda843634d2f (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 1b17d766463d51904cb242f194a780737e5f73ef Author: Felix Blyakher Date: Mon Jun 1 13:13:24 2009 -0500 xfs: prevent deadlock in xfs_qm_shake() It's possible to recurse into filesystem from the memory allocation, which deadlocks in xfs_qm_shake(). Add check for __GFP_FS, and bail out if it is not set. Signed-off-by: Felix Blyakher Signed-off-by: Hedi Berriche Reviewed-by: Christoph Hellwig Reviewed-by: Andi Kleen Signed-off-by: Felix Blyakher commit e6da7c9fed111ba1243297ee6eda8e24ae11c384 Author: Eric Sandeen Date: Sat May 23 14:30:12 2009 -0500 xfs: fix overflow in xfs_growfs_data_private In the case where growing a filesystem would leave the last AG too small, the fixup code has an overflow in the calculation of the new size with one fewer ag, because "nagcount" is a 32 bit number. If the new filesystem has > 2^32 blocks in it this causes a problem resulting in an EINVAL return from growfs: # xfs_io -f -c "truncate 19998630180864" fsfile # mkfs.xfs -f -bsize=4096 -dagsize=76288719b,size=3905982455b fsfile # mount -o loop fsfile /mnt # xfs_growfs /mnt meta-data=/dev/loop0 isize=256 agcount=52, agsize=76288719 blks = sectsz=512 attr=2 data = bsize=4096 blocks=3905982455, imaxpct=5 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 log =internal bsize=4096 blocks=32768, version=2 = sectsz=512 sunit=0 blks, lazy-count=0 realtime =none extsz=4096 blocks=0, rtextents=0 xfs_growfs: XFS_IOC_FSGROWFSDATA xfsctl failed: Invalid argument Reported-by: richard.ems@cape-horn-eng.com Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig Reviewed-by: Felix Blyakher Signed-off-by: Felix Blyakher commit 1f23920dbf1377fa9e4aef4f3d20c34a06a71a35 Author: Felix Blyakher Date: Thu May 7 19:49:45 2009 -0500 xfs: fix double unlock in xfs_swap_extents() Regreesion from commit ef8f7fc, which rearranged the code in xfs_swap_extents() leading to double unlock of xfs inode ilock. That resulted in xfs_fsr deadlocking itself on platforms, which don't handle double unlock of rw_semaphore nicely. It caused the count go negative, which represents the write holder, without really having one. ia64 is one of the platforms where deadlock was easily reproduced and the fix was tested. Signed-off-by: Eric Sandeen Reviewed-by: Eric Sandeen Signed-off-by: Felix Blyakher ----------------------------------------------------------------------- Summary of changes: fs/xfs/linux-2.6/kmem.h | 2 +- fs/xfs/xfs_dfrag.c | 8 +++++--- fs/xfs/xfs_fsops.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) hooks/post-receive -- XFS development tree From felixb@sgi.com Mon Jun 1 23:26:41 2009 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 relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n524QfE6070255 for ; Mon, 1 Jun 2009 23:26:41 -0500 Received: from attica.americas.sgi.com (attica.americas.sgi.com [128.162.236.44]) by relay3.corp.sgi.com (Postfix) with ESMTP id 879AEAC006; Mon, 1 Jun 2009 21:26:54 -0700 (PDT) Received: by attica.americas.sgi.com (Postfix, from userid 29043) id 66DB5A1FAB93; Mon, 1 Jun 2009 23:26:53 -0500 (CDT) Date: Mon, 01 Jun 2009 23:26:53 -0500 To: torvalds@linux-foundation.org Cc: linux-kernel@vger.kernel.org, xfs@oss.sgi.com, akpm@linux-foundation.org Subject: [GIT PULL] XFS update for 2.6.30-rc8 User-Agent: Heirloom mailx 12.2 01/07/07 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20090602042653.66DB5A1FAB93@attica.americas.sgi.com> From: felixb@sgi.com (Felix Blyakher) X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean The following changes since commit d9244b5d2fbfe9fa540024b410047af13ceec90f: Linus Torvalds (1): Merge branch 'hwmon-for-linus' of git://git.kernel.org/.../jdelvare/staging are available in the git repository at: git://oss.sgi.com/xfs/xfs for-linus Eric Sandeen (1): xfs: fix overflow in xfs_growfs_data_private Felix Blyakher (2): xfs: fix double unlock in xfs_swap_extents() xfs: prevent deadlock in xfs_qm_shake() fs/xfs/linux-2.6/kmem.h | 2 +- fs/xfs/xfs_dfrag.c | 8 +++++--- fs/xfs/xfs_fsops.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) From marvin24@gmx.de Tue Jun 2 01:30:08 2009 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=BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n526U6qI078834 for ; Tue, 2 Jun 2009 01:30:08 -0500 X-ASG-Debug-ID: 1243924221-155101750000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail.gmx.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with SMTP id 40B612C5858 for ; Mon, 1 Jun 2009 23:30:21 -0700 (PDT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by cuda.sgi.com with SMTP id bSU6tQLtRnoqZDHO for ; Mon, 01 Jun 2009 23:30:21 -0700 (PDT) Received: (qmail invoked by alias); 02 Jun 2009 06:30:20 -0000 Received: from g227064093.adsl.alicedsl.de (EHLO localhost.localdomain) [92.227.64.93] by mail.gmx.net (mp054) with SMTP; 02 Jun 2009 08:30:20 +0200 X-Authenticated: #9962044 X-Provags-ID: V01U2FsdGVkX18xdhATC+gxPoFKOoTIsZhgPMnYbFDqPH4HQNrfir 9plmo25PYQOdq+ From: Marvin To: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: fsr stucks in D-state Subject: Re: fsr stucks in D-state Date: Tue, 2 Jun 2009 08:30:18 +0200 User-Agent: KMail/1.11.2 (Linux/2.6.30-rc7; KDE/4.2.2; x86_64; ; ) References: <200906011233.39721.marvin24@gmx.de> In-Reply-To: <200906011233.39721.marvin24@gmx.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906020830.18866.marvin24@gmx.de> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.57 X-Barracuda-Connect: mail.gmx.net[213.165.64.20] X-Barracuda-Start-Time: 1243924222 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.27357 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Hi again, On Monday 01 June 2009 12:33:39 Marvin wrote: > Hi, > > I observed a hang in D-state when using xfs_fsr. > > - xfsprogs is from git (3.0.2) > - kernel also (2.6.30-rc7...) I pulled from "git://oss.sgi.com/xfs/xfs for-linus", which seems to include some deadlock fixes. Now, fsr no longer deadlocks, so this seems to be fixed. Sorry for the noise. Marvin > I tried 2.6.29.4 and it worked flawless. Machine is powerpc32. > > Here is the sysrq-t trace: > > xfs_fsr D 480f7f3c 0 4211 4210 > Call Trace: > [d1adfc40] [00001032] 0x1032 (unreliable) > [d1adfd00] [c0008dd8] __switch_to+0x4c/0x6c > [d1adfd20] [c02c5294] __schedule+0x230/0x360 > [d1adfd70] [c02c53ec] schedule+0x28/0x54 > [d1adfd80] [c02c7964] rwsem_down_failed_common+0x104/0x25c > [d1adfdb0] [c02c7ae4] rwsem_down_write_failed+0x28/0x40 > [d1adfde0] [c02c6994] down_write+0x30/0x40 > [d1adfdf0] [c012399c] xfs_ilock+0x9c/0xa0 > [d1adfe00] [c014375c] xfs_inactive+0x2e8/0x48c > [d1adfe40] [c015113c] xfs_fs_clear_inode+0x40/0x50 > [d1adfe50] [c00ab764] clear_inode+0x68/0xec > [d1adfe60] [c00ac02c] generic_delete_inode+0x16c/0x170 > [d1adfe80] [c00aaf20] iput+0x70/0x90 > [d1adfe90] [c00a7424] dentry_iput+0xc8/0x154 > [d1adfeb0] [c00a75e0] d_kill+0x50/0x8c > [d1adfed0] [c00a80cc] dput+0x110/0x210 > [d1adfef0] [c0095b50] __fput+0x178/0x204 > [d1adff10] [c0091eec] filp_close+0x6c/0xa0 > [d1adff30] [c0091fd4] sys_close+0xb4/0x124 > [d1adff40] [c0011fc4] ret_from_syscall+0x0/0x38 > --- Exception: c01 at 0x480f7f3c > LR = 0x1000397c > > Greetings > > Marvin From a.beregalov@gmail.com Tue Jun 2 03:21:34 2009 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 cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n528LX3J084197 for ; Tue, 2 Jun 2009 03:21:33 -0500 X-ASG-Debug-ID: 1243931294-46e201420000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail-bw0-f226.google.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 8CE54148D4BC for ; Tue, 2 Jun 2009 01:28:14 -0700 (PDT) Received: from mail-bw0-f226.google.com (mail-bw0-f226.google.com [209.85.218.226]) by cuda.sgi.com with ESMTP id 3cOEoghzuSDLp0rH for ; Tue, 02 Jun 2009 01:28:14 -0700 (PDT) Received: by bwz26 with SMTP id 26so7541023bwz.20 for ; Tue, 02 Jun 2009 01:21:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=udLN/cX+yssfeYtV7FNS26uecqXv1apDdCbhV/HV59A=; b=wfrCz8Lp5AUOHeWo/Cu9Vf5F5AfvZw7SYVrRSRqSqkRpc4iQFHqAXKKcFdP3gzehNQ 1rloGZgkKO34pSNaPoWbZblscP3uydEYyFwY6VhNKaK2suXvkDOqq0TScLg9/2P4PjI7 Z6omz9crslLOYnG/2Xw969K6bHJNi9U3b+oN8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=fcWPGBpkbEieCKS2Rv1Rt99v/ujz/THEKBUXdMdBG1K5YXlu7joXsjVC0Z84wSaENw T9HFnlXRTZ4WqkIC1OqJId+ASxyCiYDANsMjRH7yrbf88F6eYLrDtS0aM1H3HnHww7z6 qL1TIHzz1F6M9NiYCFj2KfuSb3OtG21rjGro0= MIME-Version: 1.0 Received: by 10.204.65.17 with SMTP id g17mr6454073bki.193.1243930907080; Tue, 02 Jun 2009 01:21:47 -0700 (PDT) In-Reply-To: References: Date: Tue, 2 Jun 2009 12:21:47 +0400 Message-ID: X-ASG-Orig-Subj: Re: 2.6.30-rc6: BUG at fs/xfs/support/debug.c:109! Subject: Re: 2.6.30-rc6: BUG at fs/xfs/support/debug.c:109! From: Alexander Beregalov To: Felix Blyakher Cc: Kernel Testers List , xfs@oss.sgi.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Barracuda-Connect: mail-bw0-f226.google.com[209.85.218.226] X-Barracuda-Start-Time: 1243931296 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.27361 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean 2009/6/1 Felix Blyakher : > > On Jun 1, 2009, at 12:38 PM, Alexander Beregalov wrote: > >> It was Gentoo's `emerge --metadata`. It reads many small files (ebuilds). >> I am sure it cannot be easily reproduced. > > Right. Otherwise many more people would've reported it. > >> It runs fine everyday. I do not have a testcase. >> I can try to run it forever in loop if you need. > > Yes, that will be good. > The problem is that the traces are confusing. From one > side readdir stack makes sense based on your description > of the load, but OTOH the panic is from xfs_bmapi(), which > doesn't fit in that backtrace at all. It seems like > backtrace is from the concurrently running different thread. > Don't have good idea for this bug atm. The host is still running, SysRq-W shows two precesses with the same stacktraces. SysRq : Show Blocked State task PC stack pid father emerge D 0000000000000000 3856 8399 8387 ffff880078da7b48 0000000000000046 ffff8800074b4b40 ffff880078da7af4 0000000000000001 000000000000d948 00000000001d2000 0000000000000001 ffff8800074b4b40 ffff88007f4725a0 ffff8800074b4eb8 0000000100000246 Call Trace: [] ? do_lookup+0xd8/0x270 [] __mutex_lock_common+0x16d/0x4f0 [] ? do_lookup+0xd8/0x270 [] ? trace_hardirqs_on+0x20/0x40 [] ? do_lookup+0xd8/0x270 [] mutex_lock_nested+0x48/0x70 [] do_lookup+0xd8/0x270 [] __link_path_walk+0x2b6/0xf00 [] ? do_path_lookup+0xec/0x200 [] ? do_path_lookup+0xec/0x200 [] path_walk+0x7e/0x100 [] do_path_lookup+0xb6/0x200 [] do_filp_open+0xf8/0x9e0 [] ? alloc_fd+0x49/0x170 [] ? _spin_unlock+0x3f/0x80 [] ? alloc_fd+0x139/0x170 [] do_sys_open+0x9b/0x130 [] sys_open+0x2e/0x50 [] system_call_fastpath+0x16/0x1b emerge D 0000000000000000 3280 1643 1901 ffff88000f43bb48 0000000000000046 ffff88002dc33870 ffff88000f43baf4 0000000000000001 000000000000d948 00000000001d2000 0000000000000003 ffff88002dc33870 ffff88007ea30000 ffff88002dc33be8 0000000300000246 Call Trace: [] ? do_lookup+0xd8/0x270 [] ? do_lookup+0xd8/0x270 [] __mutex_lock_common+0x16d/0x4f0 [] ? do_lookup+0xd8/0x270 [] ? trace_hardirqs_on+0x20/0x40 [] ? do_lookup+0xd8/0x270 [] mutex_lock_nested+0x48/0x70 [] do_lookup+0xd8/0x270 [] __link_path_walk+0x2b6/0xf00 [] ? do_path_lookup+0xec/0x200 [] ? do_path_lookup+0xec/0x200 [] path_walk+0x7e/0x100 [] do_path_lookup+0xb6/0x200 [] do_filp_open+0xf8/0x9e0 [] ? alloc_fd+0x49/0x170 [] ? _spin_unlock+0x3f/0x80 [] ? alloc_fd+0x139/0x170 [] do_sys_open+0x9b/0x130 [] sys_open+0x2e/0x50 [] system_call_fastpath+0x16/0x1b I will try to reproduce it. From mw@dermichi.com Tue Jun 2 05:29:12 2009 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=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.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n52ATBSM091152 for ; Tue, 2 Jun 2009 05:29:11 -0500 X-ASG-Debug-ID: 1243938559-1aee02930000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from firestarter.dermichi.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 016721B419A0 for ; Tue, 2 Jun 2009 03:29:19 -0700 (PDT) Received: from firestarter.dermichi.com (firestarter.dermichi.com [83.64.48.195]) by cuda.sgi.com with ESMTP id NSyuUhuko8lR31VM for ; Tue, 02 Jun 2009 03:29:19 -0700 (PDT) Received: from cerberus.net4you.net ([194.177.153.130] helo=[192.168.200.110]) by firestarter.dermichi.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1MBRF5-0001CP-Fq; Tue, 02 Jun 2009 12:29:15 +0200 Message-ID: <4A24FEF9.6050309@dermichi.com> Date: Tue, 02 Jun 2009 12:29:13 +0200 From: Michael Weissenbacher User-Agent: Thunderbird 2.0.0.21 (X11/20090409) MIME-Version: 1.0 To: Eric Sandeen , Christoph Hellwig CC: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: regarding the inode64 mount option Subject: Re: regarding the inode64 mount option References: <4A1E81D8.7010706@dermichi.com> <20090528145612.GA14684@infradead.org> <4A1EAB31.7090604@sandeen.net> In-Reply-To: <4A1EAB31.7090604@sandeen.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Barracuda-Connect: firestarter.dermichi.com[83.64.48.195] X-Barracuda-Start-Time: 1243938561 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.27370 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Hi Eric + Christoph! > http://sandeen.net/wordpress/?p=9 This is a scary list indeed! Does this apply only to Fedora on i686 or also to x86_64? In general, does the inode64 option make sense at all on a partition that is <1TB in size? > Actually they should still be accessible, we just won't create new > inodes not addressable by 32bit inode numbers. Well, in my tests it didn't work. I tried this is on fedora core 6 with vanilla kernel 2.6.28.10 x86_64. See here: (when mounted without inode64) [root@mojave ~]# ls /backup/ -lha ls: cannot access /backup/mojave_gentoo_backup: Invalid argument total 8.0K drwxr-xr-x 6 root root 99 2009-05-25 18:07 . drwxr-xr-x 26 root root 4.0K 2009-05-28 17:38 .. drwxr-xr-x 4 amandabackup disk 51 2009-05-07 15:46 amanda_holdings ?????????? ? ? ? ? ? mojave_gentoo_backup drwx--x--x 4 root root 41 2009-04-29 11:57 servers drwxrwxrwt 2 root root 6 2009-06-02 10:38 tmp [root@mojave ~]# ls /backup/mojave_gentoo_backup -lha ls: cannot access /backup/mojave_gentoo_backup: Invalid argument [root@mojave ~]# (when mounted with inode64) [root@mojave ~]# ls /backup/ -lha total 12K drwxr-xr-x 6 root root 99 2009-05-25 18:07 . drwxr-xr-x 26 root root 4.0K 2009-05-28 17:38 .. drwxr-xr-x 4 amandabackup disk 51 2009-05-07 15:46 amanda_holdings drwxr-xr-x 23 root root 4.0K 2009-05-05 10:53 mojave_gentoo_backup drwx--x--x 4 root root 41 2009-04-29 11:57 servers drwxrwxrwt 2 root root 6 2009-06-02 10:38 tmp [root@mojave ~]# ls /backup/mojave_gentoo_backup/ -lha total 27M drwxr-xr-x 23 root root 4.0K 2009-05-05 10:53 . drwxr-xr-x 6 root root 99 2009-05-25 18:07 .. drwxr-xr-x 2 root root 10 2009-05-05 11:53 backup (snipped) The filesystem is consistent - xfs_check (3.0.1) doesn't report any problems. thanks, Michael From a.beregalov@gmail.com Tue Jun 2 06:32:17 2009 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 (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n52BWHH4094353 for ; Tue, 2 Jun 2009 06:32:17 -0500 X-ASG-Debug-ID: 1243942352-0cac02ff0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail-fx0-f177.google.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 0C1C72C61B9 for ; Tue, 2 Jun 2009 04:32:33 -0700 (PDT) Received: from mail-fx0-f177.google.com (mail-fx0-f177.google.com [209.85.220.177]) by cuda.sgi.com with ESMTP id vUAqDc9jvMBuRJUi for ; Tue, 02 Jun 2009 04:32:33 -0700 (PDT) Received: by fxm25 with SMTP id 25so7705757fxm.20 for ; Tue, 02 Jun 2009 04:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=5uM19+pS4LFP3ocAAtjcGdO9pb4OKxQtJzS3uuMpk8o=; b=u4iZFd+OE4HNoYmWR/+UqtxeqVmHzS5yrsp3Sr4rrHgLIle1gvms0upvAmAW2gkcxA MKxVjCtpFhHrtZNSzYmkennEwfrme5CEb6D33XLhbj7tUL3RAfXiJx+8t73CzLp5pBlv UP4xZ+3AuFUkjcOT3WCJaRkxKyRC/Ttgm9HVg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Ff0b9w5Y7a+mZYiptkgb4WqZ/x6K+voSRd/LYEfVDjqClQ+1vwb5DRuvtRtBVWU3yN oiJI/lWT+T3sVt/gEwzpdCQawXpGY2tJ3x8shlagQKFRn6J+1CEN00ACngtypQuW4+uB TGRNdo7RyMAbhzz3zHcRFrMvdO5YELAC74NP8= MIME-Version: 1.0 Received: by 10.204.52.2 with SMTP id f2mr6790086bkg.90.1243942352236; Tue, 02 Jun 2009 04:32:32 -0700 (PDT) In-Reply-To: References: Date: Tue, 2 Jun 2009 15:32:32 +0400 Message-ID: X-ASG-Orig-Subj: Re: 2.6.30-rc6: BUG at fs/xfs/support/debug.c:109! Subject: Re: 2.6.30-rc6: BUG at fs/xfs/support/debug.c:109! From: Alexander Beregalov To: Felix Blyakher Cc: Kernel Testers List , xfs@oss.sgi.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Barracuda-Connect: mail-fx0-f177.google.com[209.85.220.177] X-Barracuda-Start-Time: 1243942354 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: -1.52 X-Barracuda-Spam-Status: No, SCORE=-1.52 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.27374 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Again similar trace: Assertion failed: *nmap >= 1, file: fs/xfs/xfs_bmap.c, line: 4846 ------------[ cut here ]------------ kernel BUG at fs/xfs/support/debug.c:109! invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC last sysfs file: /sys/kernel/uevent_seqnum CPU 0 Modules linked in: Pid: 1988, comm: emerge Not tainted 2.6.30-rc7-00227-gd9244b5 #66 PowerEdge 1950 RIP: 0010:[] [] assfail+0x2b/0x30 RSP: 0018:ffff88006db6bb98 EFLAGS: 00010246 RAX: 0000000000000054 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff880077336558 RDI: 0000000010000000 RBP: ffff88006db6bba8 R08: ffff880077335e10 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000001 R12: 0000000800000000 R13: ffff8800581f2980 R14: 0000000000000002 R15: ffff88007eb87000 FS: 00007f63e31586f0(0000) GS:ffff880005000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000001d04024 CR3: 000000005a70e000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process emerge (pid: 1988, threadinfo ffff88006db6a000, task ffff880077335e10) Stack: ffff88006db6bbd8 00000000b772307d ffff88006db6bd88 ffffffff803d6bdd ffff880077335e10 ffffffff802d429b ffff880050450480 ffff88007e32e800 ffff88006db6bc08 ffffffff80280e6d 0000000000000000 00000000b772307d Call Trace: [] xfs_bmapi+0xad/0x1ad0 [] ? kmem_cache_free+0xbb/0x140 [] ? trace_hardirqs_on_caller+0x17d/0x1e0 [] ? xfs_buf_free+0xd7/0x130 [] ? _spin_unlock+0x3f/0x80 [] ? xfs_buf_rele+0x124/0x190 [] ? xfs_buf_unlock+0x3d/0x80 [] ? xfs_trans_brelse+0x219/0x2e0 [] ? xfs_da_brelse+0x7f/0x150 [] xfs_dir2_leaf_getdents+0x640/0x7b0 [] ? filldir+0x0/0x100 [] ? filldir+0x0/0x100 [] xfs_readdir+0x12c/0x140 [] ? filldir+0x0/0x100 [] xfs_file_readdir+0x47/0x70 [] vfs_readdir+0xd0/0xf0 [] sys_getdents+0x96/0x110 [] system_call_fastpath+0x16/0x1b Code: 55 89 d1 48 89 e5 48 89 f2 48 83 ec 10 48 89 fe 65 48 8b 04 25 28 00 00 00 48 89 45 f8 31 c0 48 c7 c7 78 73 83 80 e8 c5 a4 29 00 <0f> 0b eb fe 90 55 48 89 e5 41 57 49 89 d7 41 56 41 55 49 89 cd RIP [] assfail+0x2b/0x30 RSP From BATV+4d015a9e3df6a7aca34c+2109+infradead.org+hch@bombadil.srs.infradead.org Tue Jun 2 07:14:01 2009 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 (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n52CDwxN096844 for ; Tue, 2 Jun 2009 07:14:00 -0500 X-ASG-Debug-ID: 1243945241-160001610000-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 339D7148D91B for ; Tue, 2 Jun 2009 05:20:41 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id DEFIvqQLn1MONyNd for ; Tue, 02 Jun 2009 05:20:41 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MBSse-0004Gy-P6; Tue, 02 Jun 2009 12:14:12 +0000 Date: Tue, 2 Jun 2009 08:14:12 -0400 From: Christoph Hellwig To: Marvin Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: fsr stucks in D-state Subject: Re: fsr stucks in D-state Message-ID: <20090602121412.GA16032@infradead.org> References: <200906011233.39721.marvin24@gmx.de> <200906020830.18866.marvin24@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200906020830.18866.marvin24@gmx.de> 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: 1243945243 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Tue, Jun 02, 2009 at 08:30:18AM +0200, Marvin wrote: > I pulled from "git://oss.sgi.com/xfs/xfs for-linus", which seems to include > some deadlock fixes. Now, fsr no longer deadlocks, so this seems to be fixed. > Sorry for the noise. I'm pretty sure the fix was: xfs: fix double unlock in xfs_swap_extents() from Felix. From BATV+4d015a9e3df6a7aca34c+2109+infradead.org+hch@bombadil.srs.infradead.org Tue Jun 2 07:38:37 2009 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 (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n52Ccaax098184 for ; Tue, 2 Jun 2009 07:38:36 -0500 X-ASG-Debug-ID: 1243946333-2f7102c80000-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 DF5F12C68D7 for ; Tue, 2 Jun 2009 05:38:53 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id F8Cj85D7Rl1XX66D for ; Tue, 02 Jun 2009 05:38:53 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MBTGX-0001BJ-1J; Tue, 02 Jun 2009 12:38:53 +0000 Date: Tue, 2 Jun 2009 08:38:53 -0400 From: Christoph Hellwig To: Eric Sandeen Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 8/9] Enable generic filesystems to be fsck'd Subject: Re: [PATCH 8/9] Enable generic filesystems to be fsck'd Message-ID: <20090602123852.GA4101@infradead.org> References: <1243450413-12681-1-git-send-email-sandeen@sandeen.net> <1243450413-12681-9-git-send-email-sandeen@sandeen.net> <20090528125128.GA13425@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090528125128.GA13425@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: 1243946333 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Thu, May 28, 2009 at 08:51:28AM -0400, Christoph Hellwig wrote: > On Wed, May 27, 2009 at 01:53:32PM -0500, Eric Sandeen wrote: > > This includes a fair bit of rearranging to avoid code duplication, > > but the goal is to allow 'fsck -n -t $FSTYP $device' to be run on > > any generic filesystem. > > > > Any FS for which this doesn't work will need it's own fsck routine. > > Looks generally good, some comments: > > - I would get rid of _check_generic_test_fs and just opencode the > _check_generic_filesystem $TEST_DEV in the two callers. > - why the odd calling convention of _is_mounted which allows to > optionally pass the fstype? Currently we only have one caller > that doesn't pass it, and if we grow one that needs it I would > rather always pass it explicitly.. > > Btw, I seems like _check_testdir is never actually called, and I can't > really see a reason why it would be different from _check_test_fs. Here's a version with those changes and additionally making sure _check_test_fs continues to be a no-op for nfs and udf. Index: xfstests-dev/common.rc =================================================================== --- xfstests-dev.orig/common.rc 2009-06-02 12:12:24.000000000 +0000 +++ xfstests-dev/common.rc 2009-06-02 12:21:36.000000000 +0000 @@ -707,29 +707,29 @@ [ "$?" == "0" ] || _notrun "$qa_user user not defined." } -# check that a FS is mounted as XFS. if so, return mount point +# check that a FS on a device is mounted +# if so, return mount point # -_xfs_mounted() +_is_mounted() { if [ $# -ne 1 ] then - echo "Usage: _xfs_mounted device" 1>&2 + echo "Usage: _is_mounted device" 1>&2 exit 1 fi device=$1 - if _mount | grep "$device " | $AWK_PROG ' - /type xfs/ { print $3 ; exit 0 } - END { exit 1 } + if _mount | grep "$device " | $AWK_PROG -v pattern="type $FSTYP" ' + pattern { print $3 ; exit 0 } + END { exit 1 } ' then - echo "_xfs_mounted: $device is not a mounted XFS FS" + echo "_is_mounted: $device is not a mounted $FSTYP FS" exit 1 fi } - # remount a FS to a new mode (ro or rw) # _remount() @@ -749,14 +749,105 @@ fi } -# run xfs_check and friends on a FS. +# Run the apropriate repair/check on a filesystem # # if the filesystem is mounted, it's either remounted ro before being # checked or it's unmounted and then remounted # +# If set, we remount ro instead of unmounting for fsck USE_REMOUNT=0 +_umount_or_remount_ro() +{ + if [ $# -ne 1 ] + then + echo "Usage: _umount_or_remount_ro device" 1>&2 + exit 1 + fi + device=$1 + + if [ $USE_REMOUNT -eq 0 ] + then + mountpoint=`_is_mounted $device` + $UMOUNT_PROG $device + else + _remount $device ro + fi + echo "$mountpoint" +} + +_mount_or_remount_rw() +{ + if [ $# -ne 3 ] + then + echo "Usage: _mount_or_remount_rw opts device mountpoint" 1>&2 + exit 1 + fi + mount_opts=$1 + device=$2 + mountpoint=$3 + + if [ $USE_REMOUNT -eq 0 ] + then + if ! _mount -t $FSTYP $mount_opts $device $mountpoint + then + echo "!!! failed to remount $device on $mountpoint" + return 0 # ok=0 + fi + else + _remount $device rw + fi + + return 1 # ok=1 +} + +_check_generic_filesystem() +{ + device=$1 + + # If type is set, we're mounted + type=`_fs_type $device` + ok=1 + + if [ "$type" = "$FSTYP" ] + then + # mounted ... + mountpoint=`_umount_or_remount_ro $device` + fi + + fsck -t $FSTYP -n $device >$tmp.fsck 2>&1 + if [ $? -ne 0 ] + then + echo "_check_generic_filesystem: filesystem on $device is inconsistent (see $seq.full)" + + echo "_check_generic filesystem: filesystem on $device is inconsistent" >>$here/$seq.full + echo "*** fsck.$FSTYP output ***" >>$here/$seq.full + cat $tmp.fsck >>$here/$seq.full + echo "*** end fsck.$FSTYP output" >>$here/$seq.full + + ok=0 + fi + rm -f $tmp.fsck + + if [ $ok -eq 0 ] + then + echo "*** mount output ***" >>$here/$seq.full + _mount >>$here/$seq.full + echo "*** end mount output" >>$here/$seq.full + elif [ "$type" = "$FSTYP" ] + then + # was mounted ... + _mount_or_remount_rw "$MOUNT_OPTIONS" $device $mountpoint + ok=$? + fi + + [ $ok -eq 0 ] && exit 1 + return 0 +} + +# run xfs_check and friends on a FS. + _check_xfs_filesystem() { if [ $# -ne 3 ] @@ -787,15 +878,8 @@ if [ "$type" = "xfs" ] then - # mounted... - - if [ $USE_REMOUNT -eq 0 ] - then - mountpoint=`_xfs_mounted $device` - $UMOUNT_PROG $device - else - _remount $device ro - fi + # mounted ... + mountpoint=`_umount_or_remount_ro $device` fi $XFS_LOGPRINT_PROG -t $extra_log_options $device 2>&1 \ @@ -848,17 +932,7 @@ echo "*** end mount output" >>$here/$seq.full elif [ "$type" = "xfs" ] then - # mounted... - if [ $USE_REMOUNT -eq 0 ] - then - if ! _mount -t xfs $extra_mount_options $device $mountpoint - then - echo "!!! failed to remount $device on $mountpoint" - ok=0 - fi - else - _remount $device rw - fi + _mount_or_remount_rw "$extra_mount_options" $device $mountpoint fi [ $ok -eq 0 ] && exit 1 @@ -908,12 +982,8 @@ } -_check_test_fs() +_check_xfs_test_fs() { - if [ "$FSTYP" != "xfs" ]; then - return - fi - TEST_LOG="none" TEST_RT="none" [ "$USE_EXTERNAL" = yes -a ! -z "$TEST_LOGDEV" ] && \ @@ -932,6 +1002,24 @@ fi } +_check_test_fs() +{ + case $FSTYP in + xfs) + _check_xfs_test_fs + ;; + nfs) + # no way to check consistency for nfs + ;; + udf) + # do nothing for now + ;; + *) + _check_generic_filesystem $TEST_DEV + ;; + esac +} + _check_scratch_fs() { case $FSTYP in @@ -953,6 +1041,7 @@ # Don't know how to check an NFS filesystem, yet. ;; *) + _check_generic_filesystem $SCRATCH_DEV ;; esac } @@ -987,25 +1076,6 @@ echo "$os/$platform $host $kernel" } -_check_testdir() -{ - case $FSTYP in - xfs) - _check_test_fs - ;; - udf) - _cleanup_testdir - _check_scratch_fs - _scratch_mount - ;; - nfs*) - # Don't know how to check an NFS filesystem, yet. - ;; - *) - ;; - esac -} - _setup_udf_scratchdir() { [ "$FSTYP" != "udf" ] \ From felixb@sgi.com Tue Jun 2 08:24:36 2009 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 relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n52DOaYG100807 for ; Tue, 2 Jun 2009 08:24:36 -0500 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay2.corp.sgi.com (Postfix) with ESMTP id 12D3C30408F for ; Tue, 2 Jun 2009 06:24:51 -0700 (PDT) Received: from [IPv6???1] (sshgate.corp.sgi.com [198.149.20.12]) by estes.americas.sgi.com (Postfix) with ESMTP id 4F2317000103; Tue, 2 Jun 2009 08:24:49 -0500 (CDT) Cc: Eric Sandeen , Christoph Hellwig , xfs@oss.sgi.com Message-Id: <8637EA4C-FD28-4733-9532-062DFBA746DA@sgi.com> From: Felix Blyakher To: Michael Weissenbacher In-Reply-To: <4A24FEF9.6050309@dermichi.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: regarding the inode64 mount option Date: Tue, 2 Jun 2009 08:24:47 -0500 References: <4A1E81D8.7010706@dermichi.com> <20090528145612.GA14684@infradead.org> <4A1EAB31.7090604@sandeen.net> <4A24FEF9.6050309@dermichi.com> X-Mailer: Apple Mail (2.930.3) X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Jun 2, 2009, at 5:29 AM, Michael Weissenbacher wrote: > Hi Eric + Christoph! >> http://sandeen.net/wordpress/?p=9 > This is a scary list indeed! Does this apply only to Fedora on i686 > or also to x86_64? > > In general, does the inode64 option make sense at all on a partition > that is <1TB in size? inode64 doesn't do anything on a partition smaller than 1TB. >> Actually they should still be accessible, we just won't create new >> inodes not addressable by 32bit inode numbers. > Well, in my tests it didn't work. Indeed. (I thought I already replied stating this, but found my mail in Drafts folder). What you're seeing is expected result, which was observed in our environment as well. [snip] > The filesystem is consistent - xfs_check (3.0.1) doesn't report any > problems. Right, filesystem is still consistent. And xfs_check/xfs_repair has no idea that filesystem may be mounted without the inode64. Felix From sandeen@sandeen.net Tue Jun 2 10:10:42 2009 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 (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n52FAfiZ107769 for ; Tue, 2 Jun 2009 10:10:42 -0500 X-ASG-Debug-ID: 1243955844-521303a40000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mx2.redhat.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 8E3981041671 for ; Tue, 2 Jun 2009 08:17:24 -0700 (PDT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by cuda.sgi.com with ESMTP id G8ryaZ0Y5QEjrkAX for ; Tue, 02 Jun 2009 08:17:24 -0700 (PDT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n52FAk71015096; Tue, 2 Jun 2009 11:10:47 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n52FAkn0015097; Tue, 2 Jun 2009 11:10:46 -0400 Received: from neon.msp.redhat.com (neon.msp.redhat.com [10.15.80.10]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n52FAjfP021047; Tue, 2 Jun 2009 11:10:45 -0400 Message-ID: <4A2540F4.4050204@sandeen.net> Date: Tue, 02 Jun 2009 10:10:44 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Christoph Hellwig CC: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 8/9] Enable generic filesystems to be fsck'd Subject: Re: [PATCH 8/9] Enable generic filesystems to be fsck'd References: <1243450413-12681-1-git-send-email-sandeen@sandeen.net> <1243450413-12681-9-git-send-email-sandeen@sandeen.net> <20090528125128.GA13425@infradead.org> <20090602123852.GA4101@infradead.org> In-Reply-To: <20090602123852.GA4101@infradead.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-Barracuda-Connect: mx2.redhat.com[66.187.237.31] X-Barracuda-Start-Time: 1243955846 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: -1.42 X-Barracuda-Spam-Status: No, SCORE=-1.42 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=MARKETING_SUBJECT X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.27389 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.60 MARKETING_SUBJECT Subject contains popular marketing words X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Christoph Hellwig wrote: > On Thu, May 28, 2009 at 08:51:28AM -0400, Christoph Hellwig wrote: >> On Wed, May 27, 2009 at 01:53:32PM -0500, Eric Sandeen wrote: >>> This includes a fair bit of rearranging to avoid code duplication, >>> but the goal is to allow 'fsck -n -t $FSTYP $device' to be run on >>> any generic filesystem. >>> >>> Any FS for which this doesn't work will need it's own fsck routine. >> Looks generally good, some comments: >> >> - I would get rid of _check_generic_test_fs and just opencode the >> _check_generic_filesystem $TEST_DEV in the two callers. >> - why the odd calling convention of _is_mounted which allows to >> optionally pass the fstype? Currently we only have one caller >> that doesn't pass it, and if we grow one that needs it I would >> rather always pass it explicitly.. >> >> Btw, I seems like _check_testdir is never actually called, and I can't >> really see a reason why it would be different from _check_test_fs. > > Here's a version with those changes and additionally making sure > _check_test_fs continues to be a no-op for nfs and udf. Thanks :) nitpicky comments below, mostly probably nitpicking stuff that was in my original patch ;) > Index: xfstests-dev/common.rc > =================================================================== > --- xfstests-dev.orig/common.rc 2009-06-02 12:12:24.000000000 +0000 > +++ xfstests-dev/common.rc 2009-06-02 12:21:36.000000000 +0000 > @@ -707,29 +707,29 @@ > [ "$?" == "0" ] || _notrun "$qa_user user not defined." > } > > -# check that a FS is mounted as XFS. if so, return mount point > +# check that a FS on a device is mounted > +# if so, return mount point > # > -_xfs_mounted() > +_is_mounted() > { > if [ $# -ne 1 ] > then > - echo "Usage: _xfs_mounted device" 1>&2 > + echo "Usage: _is_mounted device" 1>&2 > exit 1 > fi > > device=$1 > > - if _mount | grep "$device " | $AWK_PROG ' > - /type xfs/ { print $3 ; exit 0 } > - END { exit 1 } > + if _mount | grep "$device " | $AWK_PROG -v pattern="type $FSTYP" ' > + pattern { print $3 ; exit 0 } > + END { exit 1 } > ' > then > - echo "_xfs_mounted: $device is not a mounted XFS FS" > + echo "_is_mounted: $device is not a mounted $FSTYP FS" > exit 1 > fi > } > > - > # remount a FS to a new mode (ro or rw) > # > _remount() > @@ -749,14 +749,105 @@ > fi > } > > -# run xfs_check and friends on a FS. > +# Run the apropriate repair/check on a filesystem appropriate (that was probably my typo to start with!) > # > # if the filesystem is mounted, it's either remounted ro before being > # checked or it's unmounted and then remounted > # > > +# If set, we remount ro instead of unmounting for fsck > USE_REMOUNT=0 > > +_umount_or_remount_ro() > +{ > + if [ $# -ne 1 ] > + then > + echo "Usage: _umount_or_remount_ro device" 1>&2 might be clearer > + exit 1 > + fi > + device=$1 > + > + if [ $USE_REMOUNT -eq 0 ] > + then > + mountpoint=`_is_mounted $device` > + $UMOUNT_PROG $device > + else > + _remount $device ro > + fi > + echo "$mountpoint" Maybe we should move the mountpoint assignment outside the conditional, since we echo it unconditionally. Only the !USE_REMOUNT case cares anyway but still... > +} > + > +_mount_or_remount_rw() > +{ > + if [ $# -ne 3 ] > + then > + echo "Usage: _mount_or_remount_rw opts device mountpoint" 1>&2 > + exit 1 > + fi > + mount_opts=$1 > + device=$2 > + mountpoint=$3 > + > + if [ $USE_REMOUNT -eq 0 ] > + then > + if ! _mount -t $FSTYP $mount_opts $device $mountpoint > + then > + echo "!!! failed to remount $device on $mountpoint" > + return 0 # ok=0 > + fi > + else > + _remount $device rw > + fi > + > + return 1 # ok=1 > +} # Check a generic filesystem in no-op mode; this assumes that the # underlying fsck program accepts "-n" for a no-op (check-only) run, # and that it will still return an errno for corruption in this mode. # # Filesystems which don't support this will need to define their # own check routine. > +_check_generic_filesystem() > +{ > + device=$1 > + > + # If type is set, we're mounted > + type=`_fs_type $device` > + ok=1 > + > + if [ "$type" = "$FSTYP" ] > + then > + # mounted ... > + mountpoint=`_umount_or_remount_ro $device` > + fi > + > + fsck -t $FSTYP -n $device >$tmp.fsck 2>&1 > + if [ $? -ne 0 ] > + then > + echo "_check_generic_filesystem: filesystem on $device is inconsistent (see $seq.full)" > + > + echo "_check_generic filesystem: filesystem on $device is inconsistent" >>$here/$seq.full > + echo "*** fsck.$FSTYP output ***" >>$here/$seq.full > + cat $tmp.fsck >>$here/$seq.full > + echo "*** end fsck.$FSTYP output" >>$here/$seq.full > + > + ok=0 > + fi > + rm -f $tmp.fsck > + > + if [ $ok -eq 0 ] > + then > + echo "*** mount output ***" >>$here/$seq.full > + _mount >>$here/$seq.full > + echo "*** end mount output" >>$here/$seq.full > + elif [ "$type" = "$FSTYP" ] > + then > + # was mounted ... > + _mount_or_remount_rw "$MOUNT_OPTIONS" $device $mountpoint oops tab vs. space here > + ok=$? > + fi > + > + [ $ok -eq 0 ] && exit 1 > + return 0 > +} > + > +# run xfs_check and friends on a FS. > + > _check_xfs_filesystem() > { > if [ $# -ne 3 ] > @@ -787,15 +878,8 @@ > > if [ "$type" = "xfs" ] > then > - # mounted... > - > - if [ $USE_REMOUNT -eq 0 ] > - then > - mountpoint=`_xfs_mounted $device` > - $UMOUNT_PROG $device > - else > - _remount $device ro > - fi > + # mounted ... > + mountpoint=`_umount_or_remount_ro $device` > fi > > $XFS_LOGPRINT_PROG -t $extra_log_options $device 2>&1 \ > @@ -848,17 +932,7 @@ > echo "*** end mount output" >>$here/$seq.full > elif [ "$type" = "xfs" ] > then > - # mounted... > - if [ $USE_REMOUNT -eq 0 ] > - then > - if ! _mount -t xfs $extra_mount_options $device $mountpoint > - then > - echo "!!! failed to remount $device on $mountpoint" > - ok=0 > - fi > - else > - _remount $device rw > - fi > + _mount_or_remount_rw "$extra_mount_options" $device $mountpoint > fi > > [ $ok -eq 0 ] && exit 1 > @@ -908,12 +982,8 @@ > > } > > -_check_test_fs() > +_check_xfs_test_fs() > { > - if [ "$FSTYP" != "xfs" ]; then > - return > - fi > - > TEST_LOG="none" > TEST_RT="none" > [ "$USE_EXTERNAL" = yes -a ! -z "$TEST_LOGDEV" ] && \ > @@ -932,6 +1002,24 @@ > fi > } > > +_check_test_fs() > +{ > + case $FSTYP in > + xfs) > + _check_xfs_test_fs > + ;; > + nfs) > + # no way to check consistency for nfs > + ;; > + udf) > + # do nothing for now > + ;; > + *) > + _check_generic_filesystem $TEST_DEV fix indentation here ... > + ;; > + esac > +} > + > _check_scratch_fs() > { > case $FSTYP in > @@ -953,6 +1041,7 @@ > # Don't know how to check an NFS filesystem, yet. > ;; > *) > + _check_generic_filesystem $SCRATCH_DEV > ;; > esac > } > @@ -987,25 +1076,6 @@ > echo "$os/$platform $host $kernel" > } > > -_check_testdir() > -{ > - case $FSTYP in > - xfs) > - _check_test_fs > - ;; > - udf) > - _cleanup_testdir > - _check_scratch_fs > - _scratch_mount > - ;; > - nfs*) > - # Don't know how to check an NFS filesystem, yet. > - ;; > - *) > - ;; > - esac > -} > - > _setup_udf_scratchdir() > { > [ "$FSTYP" != "udf" ] \ > From felixb@sgi.com Tue Jun 2 11:13:09 2009 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 relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n52GD85X111227 for ; Tue, 2 Jun 2009 11:13:09 -0500 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay2.corp.sgi.com (Postfix) with ESMTP id 6979030408F for ; Tue, 2 Jun 2009 09:13:23 -0700 (PDT) Received: from eagdhcp-233-184.americas.sgi.com (eagdhcp-233-184.americas.sgi.com [128.162.233.184]) by estes.americas.sgi.com (Postfix) with ESMTP id 36EE77000103; Tue, 2 Jun 2009 11:13:23 -0500 (CDT) Cc: Michael Weissenbacher , xfs@oss.sgi.com Message-Id: <7945FF47-2A9B-46D8-9A49-3D7070AAC1E8@sgi.com> From: Felix Blyakher To: Christoph Hellwig In-Reply-To: <20090528145612.GA14684@infradead.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Subject: Re: regarding the inode64 mount option Date: Tue, 2 Jun 2009 11:13:22 -0500 References: <4A1E81D8.7010706@dermichi.com> <20090528145612.GA14684@infradead.org> X-Mailer: Apple Mail (2.926) X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean [my unsent mail from yesterday, mostly for the second blob] On May 28, 2009, at 9:56 AM, Christoph Hellwig wrote: > On Thu, May 28, 2009 at 02:21:44PM +0200, Michael Weissenbacher wrote: >> Hi XFS-List! >> I understand that the inode64 mount option allows inodes to be >> created beyond 1TB. There are also certain performance problems >> that can be cured by using this option when handling LOTS of >> inodes. During my tests i noticed that enabling it is like a one- >> way street. Inodes created with inode64 enabled aren't accessible >> when the option is left out. > > Actually they should still be accessible, we just won't create new > inodes not addressable by 32bit inode numbers. The inodes are indeed accessible by most apps, but those 32bit apps using stat() (vs. stat64() ) will get confused and may bailout processing such inodes all together. >> Now i got a few questions: >> - Does the inode64 option work only on 64bit architectures or is it >> also possible to use it with i686 > > It is available for 32bit kernels starting with kernel 2.6.29. > >> - Is there a way to convert the inodes back > > There's an xfs_reno tool ported from IRIX to renumber the inodes. > I'll > see if I can finally get it packaged. > >> - Why doesn't the filesystem remember that inode64 was used in the >> past and enable it automatically > > Good question. We could introduce a flag in the superblock for this. Agree, it's a good idea to record that inode64 was used on previous mount, but I don't think we should enable it automatically. Though, providing the warning will be good. Felix From sandeen@sandeen.net Tue Jun 2 12:16:38 2009 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,J_CHICKENPOX_31, J_CHICKENPOX_42,J_CHICKENPOX_43,J_CHICKENPOX_44,J_CHICKENPOX_45, J_CHICKENPOX_48,J_CHICKENPOX_52,J_CHICKENPOX_56,J_CHICKENPOX_62, J_CHICKENPOX_63,J_CHICKENPOX_66,J_CHICKENPOX_92 autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n52HGb5l115046 for ; Tue, 2 Jun 2009 12:16:37 -0500 X-ASG-Debug-ID: 1243963400-725202650000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mx2.redhat.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 2DF811042A7C for ; Tue, 2 Jun 2009 10:23:20 -0700 (PDT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by cuda.sgi.com with ESMTP id sCR1celo8GNkGz9Y for ; Tue, 02 Jun 2009 10:23:20 -0700 (PDT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n52HGoNd018534 for ; Tue, 2 Jun 2009 13:16:50 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n52HGnUr003014 for ; Tue, 2 Jun 2009 13:16:50 -0400 Received: from neon.msp.redhat.com (neon.msp.redhat.com [10.15.80.10]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n52HGmo3011924 for ; Tue, 2 Jun 2009 13:16:49 -0400 Message-ID: <4A255E80.9000209@sandeen.net> Date: Tue, 02 Jun 2009 12:16:48 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: xfs mailing list X-ASG-Orig-Subj: [PATCH V3] xfstests: add aio-dio-regress tests Subject: [PATCH V3] xfstests: add aio-dio-regress tests Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-Barracuda-Connect: mx2.redhat.com[66.187.237.31] X-Barracuda-Start-Time: 1243963403 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-ASG-Whitelist: BODY (http://marc\.info/\?) X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Pull in the aio-dio-regress test suite from http://git.kernel.org/?p=linux/kernel/git/zab/aio-dio-regress.git This now has all the right copyright signoffs too. Signed-off-by: Eric Sandeen --- .gitignore | 6 207 | 57 ++ 207.out | 3 208 | 57 ++ 208.out | 3 209 | 57 ++ 209.out | 3 210 | 57 ++ 210.out | 3 211 | 57 ++ 211.out | 3 212 | 58 +++ 212.out | 3 group | 6 src/Makefile | 6 src/aio-dio-regress/Makefile | 20 + src/aio-dio-regress/SOURCE | 7 src/aio-dio-regress/aio-dio-extend-stat.c | 181 +++++++++ src/aio-dio-regress/aio-dio-invalidate-failure.c | 174 +++++++++ src/aio-dio-regress/aio-dio-invalidate-readahead.c | 191 ++++++++++ src/aio-dio-regress/aio-dio-subblock-eof-read.c | 115 ++++++ src/aio-dio-regress/aio-free-ring-with-bogus-nr-pages.c | 85 ++++ src/aio-dio-regress/aio-io-setup-with-nonwritable-context-pointer.c | 51 ++ diff --git a/.gitignore b/.gitignore index 2cd722b..d7cbab1 100644 --- a/.gitignore +++ b/.gitignore @@ -88,3 +88,9 @@ src/unwritten_sync src/usemem src/writemod src/xfsctl +src/aio-dio-regress/aio-dio-extend-stat +src/aio-dio-regress/aio-dio-invalidate-failure +src/aio-dio-regress/aio-dio-invalidate-readahead +src/aio-dio-regress/aio-dio-subblock-eof-read +src/aio-dio-regress/aio-free-ring-with-bogus-nr-pages +src/aio-dio-regress/aio-io-setup-with-nonwritable-context-pointer diff --git a/207 b/207 new file mode 100755 index 0000000..1ac249f --- /dev/null +++ b/207 @@ -0,0 +1,57 @@ +#! /bin/sh +# FS QA Test No. 207 +# +# Run aio-dio-extend-stat - test race in dio aio completion +# +#----------------------------------------------------------------------- +# Copyright (c) 2009 Eric Sandeen. 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 +#----------------------------------------------------------------------- +# +# creator +owner=sandeen@sandeen.net + +seq=`basename $0` +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -f $tmp.* +} + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter + +# real QA test starts here + +_supported_fs generic +_supported_os Linux + +AIO_TEST=aio-dio-extend-stat + +rm -f $TEST_DIR/aio-testfile +echo "==${AIO_TEST}==" +src/aio-dio-regress/$AIO_TEST $TEST_DIR/aio-testfile 2>&1 +status=$? +rm -f $TEST_DIR/aio-testfile + +exit diff --git a/207.out b/207.out new file mode 100644 index 0000000..1841efb --- /dev/null +++ b/207.out @@ -0,0 +1,3 @@ +QA output created by 207 +==aio-dio-extend-stat== +4000 iterations of racing extensions and collection passed diff --git a/208 b/208 new file mode 100755 index 0000000..61bfbae --- /dev/null +++ b/208 @@ -0,0 +1,57 @@ +#! /bin/sh +# FS QA Test No. 208 +# +# Run aio-dio-invalidate-failure - test race in read cache invalidation +# +#----------------------------------------------------------------------- +# Copyright (c) 2009 Eric Sandeen. 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 +#----------------------------------------------------------------------- +# +# creator +owner=sandeen@sandeen.net + +seq=`basename $0` +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -f $tmp.* +} + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter + +# real QA test starts here + +_supported_fs generic +_supported_os Linux + +AIO_TEST=aio-dio-invalidate-failure + +rm -f $TEST_DIR/aio-testfile +echo "==${AIO_TEST}==" +src/aio-dio-regress/$AIO_TEST $TEST_DIR/aio-testfile 2>&1 +status=$? +rm -f $TEST_DIR/aio-testfile + +exit diff --git a/208.out b/208.out new file mode 100644 index 0000000..c222c41 --- /dev/null +++ b/208.out @@ -0,0 +1,3 @@ +QA output created by 208 +==aio-dio-invalidate-failure== +ran for 200 seconds without error, passing diff --git a/209 b/209 new file mode 100755 index 0000000..444178b --- /dev/null +++ b/209 @@ -0,0 +1,57 @@ +#! /bin/sh +# FS QA Test No. 209 +# +# Run aio-dio-invalidate-readahead - test sync DIO invalidation of readahead +# +#----------------------------------------------------------------------- +# Copyright (c) 2009 Eric Sandeen. 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 +#----------------------------------------------------------------------- +# +# creator +owner=sandeen@sandeen.net + +seq=`basename $0` +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -f $tmp.* +} + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter + +# real QA test starts here + +_supported_fs generic +_supported_os Linux + +AIO_TEST=aio-dio-invalidate-readahead + +rm -f $TEST_DIR/aio-testfile +echo "==${AIO_TEST}==" +src/aio-dio-regress/$AIO_TEST $TEST_DIR/aio-testfile 2>&1 +status=$? +rm -f $TEST_DIR/aio-testfile + +exit diff --git a/209.out b/209.out new file mode 100644 index 0000000..db90b67 --- /dev/null +++ b/209.out @@ -0,0 +1,3 @@ +QA output created by 209 +==aio-dio-invalidate-readahead== +test ran for 30 seconds without error diff --git a/210 b/210 new file mode 100755 index 0000000..594cae5 --- /dev/null +++ b/210 @@ -0,0 +1,57 @@ +#! /bin/sh +# FS QA Test No. 210 +# +# Run aio-dio-subblock-eof-read - test AIO read of last block of DIO file +# +#----------------------------------------------------------------------- +# Copyright (c) 2009 Eric Sandeen. 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 +#----------------------------------------------------------------------- +# +# creator +owner=sandeen@sandeen.net + +seq=`basename $0` +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -f $tmp.* +} + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter + +# real QA test starts here + +_supported_fs generic +_supported_os Linux + +AIO_TEST=aio-dio-subblock-eof-read + +rm -f $TEST_DIR/aio-testfile +echo "==${AIO_TEST}==" +src/aio-dio-regress/$AIO_TEST $TEST_DIR/aio-testfile 2>&1 +status=$? +rm -f $TEST_DIR/aio-testfile + +exit diff --git a/210.out b/210.out new file mode 100644 index 0000000..01012fb --- /dev/null +++ b/210.out @@ -0,0 +1,3 @@ +QA output created by 210 +==aio-dio-subblock-eof-read== +AIO read of last block in file succeeded. diff --git a/211 b/211 new file mode 100755 index 0000000..1ce9121 --- /dev/null +++ b/211 @@ -0,0 +1,57 @@ +#! /bin/sh +# FS QA Test No. 211 +# +# Run aio-free-ring-with-bogus-nr-pages - test aio_setup_ring with bad nr_pages +# +#----------------------------------------------------------------------- +# Copyright (c) 2009 Eric Sandeen. 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 +#----------------------------------------------------------------------- +# +# creator +owner=sandeen@sandeen.net + +seq=`basename $0` +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -f $tmp.* +} + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter + +# real QA test starts here + +_supported_fs generic +_supported_os Linux + +AIO_TEST=aio-free-ring-with-bogus-nr-pages + +rm -f $TEST_DIR/aio-testfile +echo "==${AIO_TEST}==" +src/aio-dio-regress/$AIO_TEST $TEST_DIR/aio-testfile 2>&1 +status=$? +rm -f $TEST_DIR/aio-testfile + +exit diff --git a/211.out b/211.out new file mode 100644 index 0000000..bec76b7 --- /dev/null +++ b/211.out @@ -0,0 +1,3 @@ +QA output created by 211 +==aio-free-ring-with-bogus-nr-pages== +aio-free-ring-with-bogus-nr-pages: Success! diff --git a/212 b/212 new file mode 100755 index 0000000..9b58863 --- /dev/null +++ b/212 @@ -0,0 +1,58 @@ +#! /bin/sh +# FS QA Test No. 212 +# +# Run aio-io-setup-with-nonwritable-context-pointer - +# Test what happens when a non-writable context pointer is passed to io_setup +# +#----------------------------------------------------------------------- +# Copyright (c) 2009 Eric Sandeen. 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 +#----------------------------------------------------------------------- +# +# creator +owner=sandeen@sandeen.net + +seq=`basename $0` +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -f $tmp.* +} + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter + +# real QA test starts here + +_supported_fs generic +_supported_os Linux + +AIO_TEST=aio-io-setup-with-nonwritable-context-pointer + +rm -f $TEST_DIR/aio-testfile +echo "==${AIO_TEST}==" +src/aio-dio-regress/$AIO_TEST $TEST_DIR/aio-testfile 2>&1 +status=$? +rm -f $TEST_DIR/aio-testfile + +exit diff --git a/212.out b/212.out new file mode 100644 index 0000000..259d895 --- /dev/null +++ b/212.out @@ -0,0 +1,3 @@ +QA output created by 212 +==aio-io-setup-with-nonwritable-context-pointer== +aio-io-setup-with-nonwritable-context-pointer: Success! diff --git a/group b/group index 0551d06..b72fe7b 100644 --- a/group +++ b/group @@ -311,3 +311,9 @@ atime 204 metadata rw auto 205 metadata rw auto 206 growfs auto quick +207 generic auto aio quick +208 generic auto aio +209 generic auto aio +210 generic auto aio quick +211 generic auto aio quick +212 generic auto aio quick diff --git a/src/Makefile b/src/Makefile index 634e1b3..6e68b79 100644 --- a/src/Makefile +++ b/src/Makefile @@ -35,10 +35,14 @@ ifeq ($(PKG_PLATFORM),linux) TARGETS += t_immutable endif +ifeq ($(HAVE_AIO), true) +SUBDIRS += aio-dio-regress +endif + CFILES = $(TARGETS:=.c) LDIRT = $(TARGETS) -default: $(TARGETS) +default: $(TARGETS) $(SUBDIRS) include $(BUILDRULES) LINKTEST = $(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS) diff --git a/src/aio-dio-regress/Makefile b/src/aio-dio-regress/Makefile new file mode 100644 index 0000000..9968093 --- /dev/null +++ b/src/aio-dio-regress/Makefile @@ -0,0 +1,20 @@ +TOPDIR = ../.. +include $(TOPDIR)/include/builddefs + +TARGETS = $(basename $(wildcard *.c)) + +CFILES = $(TARGETS:=.c) +LDIRT = $(TARGETS) + +LIBAIO = -laio -lpthread + +default: $(TARGETS) + +include $(BUILDRULES) + +$(TARGETS): %: %.c + $(CC) -g -Wall $(LIBAIO) -o $@ $*.c + +install: + $(INSTALL) -m 755 -d $(PKG_LIB_DIR)/src/aio-dio-regress + $(INSTALL) -m 755 $(TARGETS) $(PKG_LIB_DIR)/src/aio-dio-regress diff --git a/src/aio-dio-regress/SOURCE b/src/aio-dio-regress/SOURCE new file mode 100644 index 0000000..b45ff0b --- /dev/null +++ b/src/aio-dio-regress/SOURCE @@ -0,0 +1,7 @@ +From: +http://www.kernel.org/pub/scm/linux/kernel/git/zab/aio-dio-regress.git + +description AIO and DIO regression tests +owner Zach Brown +URL git://git.kernel.org/pub/scm/linux/kernel/git/zab/aio-dio-regress.git + http://www.kernel.org/pub/scm/linux/kernel/git/zab/aio-dio-regress.git diff --git a/src/aio-dio-regress/aio-dio-extend-stat.c b/src/aio-dio-regress/aio-dio-extend-stat.c new file mode 100644 index 0000000..c274e58 --- /dev/null +++ b/src/aio-dio-regress/aio-dio-extend-stat.c @@ -0,0 +1,181 @@ +/* + * aio-dio-extend-stat - test race in dio aio completion + * Copyright (C) 2006 Rafal Wijata + * + * 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; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will 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 to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#define __USE_GNU +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef O_DIRECT +#define O_DIRECT 040000 /* direct disk access hint */ +#endif + +/* + * This was originally submitted to + * http://bugzilla.kernel.org/show_bug.cgi?id=6831 by + * Rafal Wijata . It caught a race in dio aio completion + * that would call aio_complete() before the dio callers would update i_size. + * A stat after io_getevents() would not see the new file size. + * + * The bug was fixed in the fs/direct-io.c completion reworking that appeared + * in 2.6.20. This test should fail on 2.6.19. + */ + +#define BUFSIZE 1024 + +static unsigned char buf[BUFSIZE] __attribute((aligned (4096))); + +/* + * this was arbitrarily chosen to take about two seconds on a dual athlon in a + * debugging kernel.. it trips up long before that. + */ +#define MAX_AIO_EVENTS 4000 + +#define fail(fmt , args...) do {\ + printf(fmt , ##args); \ + exit(1); \ +} while (0) + +void fun_write1(void* ptr); +void fun_writeN(void* ptr); +void fun_read(void* ptr); + +int handle = 0; +io_context_t ctxp; +struct iocb *iocbs[MAX_AIO_EVENTS]; +struct io_event ioevents[MAX_AIO_EVENTS]; + +volatile int submittedSize = 0; //synchronization + +int main(int argc, char **argv) +{ + pthread_t thread_read; + pthread_t thread_write; + int i; + int ret; + + if (argc != 2) + fail("only arg should be file name\n"); + + for (i = 0; i < BUFSIZE; ++i) + buf[i] = 'A' + (char)(i % ('Z'-'A'+1)); + + buf[BUFSIZE-1] = '\n'; + + handle = open(argv[1], O_CREAT | O_TRUNC | O_DIRECT | O_RDWR, 0600); + if (handle == -1) + fail("failed to open test file %s, errno: %d\n", + argv[1], errno); + + memset(&ctxp, 0, sizeof(ctxp)); + ret = io_setup(MAX_AIO_EVENTS, &ctxp); + if (ret) + fail("io_setup returned %d\n", ret); + + for (i = 0; i < MAX_AIO_EVENTS; ++i) { + + iocbs[i] = calloc(1, sizeof(struct iocb)); + if (iocbs[i] == NULL) + fail("failed to allocate an iocb\n"); + +/* iocbs[i]->data = i; */ + iocbs[i]->aio_fildes = handle; + iocbs[i]->aio_lio_opcode = IO_CMD_PWRITE; + iocbs[i]->aio_reqprio = 0; + iocbs[i]->u.c.buf = buf; + iocbs[i]->u.c.nbytes = BUFSIZE; + iocbs[i]->u.c.offset = BUFSIZE*i; + } + + pthread_create(&thread_read, NULL, (void*)&fun_read, NULL); + pthread_create(&thread_write, NULL, (void*)&fun_writeN, NULL); + + pthread_join(thread_read, NULL); + pthread_join(thread_write, NULL); + + io_destroy(ctxp); + close(handle); + + printf("%u iterations of racing extensions and collection passed\n", + MAX_AIO_EVENTS); + + return 0; +} + +void fun_read(void *ptr) +{ + long n = MAX_AIO_EVENTS; + struct stat filestat; + long long exSize; + long i; + long r; + + while (n > 0) { + r = io_getevents(ctxp, 1, MAX_AIO_EVENTS, ioevents, NULL); + if (r < 0) + fail("io_getevents returned %ld\n", r); + + n -= r; + for (i = 0; i < r; ++i) { + if (ioevents[i].obj->u.c.nbytes != BUFSIZE) + fail("error in block: expacted %d bytes, " + "receiced %ld\n", BUFSIZE, + ioevents[i].obj->u.c.nbytes); + + exSize = ioevents[i].obj->u.c.offset + + ioevents[i].obj->u.c.nbytes; + fstat(handle, &filestat); + if (filestat.st_size < exSize) + fail("write of %lu bytes @%llu finished, " + "expected filesize at least %llu, but " + "got %ld\n", ioevents[i].obj->u.c.nbytes, + ioevents[i].obj->u.c.offset, exSize, + filestat.st_size); + } + } +} + +void fun_writeN(void *ptr) +{ + int i; + int ret; + + for(i = 0; i < MAX_AIO_EVENTS; ++i) { + ret = io_submit(ctxp, 1, &(iocbs[i])); + if (ret != 1) + fail("io_subit returned %d instead of 1\n", ret); + } +} + +void fun_write1(void *ptr) +{ + int ret; + + ret = io_submit(ctxp, MAX_AIO_EVENTS, iocbs); + if (ret != MAX_AIO_EVENTS) + fail("io_subit returned %d instead of %u\n", ret, + MAX_AIO_EVENTS); +} diff --git a/src/aio-dio-regress/aio-dio-invalidate-failure.c b/src/aio-dio-regress/aio-dio-invalidate-failure.c new file mode 100644 index 0000000..a1a5df2 --- /dev/null +++ b/src/aio-dio-regress/aio-dio-invalidate-failure.c @@ -0,0 +1,174 @@ +/* + * aio-dio-invalidate-failure - test race in read cache invalidation + * Copyright (C) 2007 Zach Brown + * + * 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; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will 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 to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#define _XOPEN_SOURCE 500 /* pwrite */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * DIO invalidates the read cache after it writes. At one point it tried to + * return EIO if this failed. When called from AIO, though, this EIO return + * would clobber EIOCBQUEUED and cause fs/aio.c and fs/direct-io.c to complete + * an iocb twice. This typically references freed memory from an interrupt + * handler and oopses. + * + * This test hits the race after at most two minutes on a single spindle. It + * spins performing large dio writes. It also spins racing buffered writes. + * It assumes it's on ext3 using ordered writes. The ordered write bhs can be + * pinned by jbd as a transaction commits. If invalidate_inode_pages2_range() + * hits pages backed by those buffers ->releasepage will fail and it'll try to + * return -EIO. + */ +#ifndef O_DIRECT +#define O_DIRECT 040000 /* direct disk access hint */ +#endif + +#define GINORMOUS (32 * 1024 * 1024) + + +/* This test never survived to 180 seconds on a single spindle */ +#define SECONDS 200 + +static unsigned char buf[GINORMOUS] __attribute((aligned (4096))); + +#define fail(fmt , args...) do {\ + printf(fmt , ##args); \ + exit(1); \ +} while (0) + +void spin_dio(int fd) +{ + io_context_t ctx; + struct iocb iocb; + struct iocb *iocbs[1] = { &iocb }; + struct io_event event; + int ret; + + io_prep_pwrite(&iocb, fd, buf, GINORMOUS, 0); + + ret = io_queue_init(1, &ctx); + if (ret) + fail("io_queue_init returned %d", ret); + + while (1) { + ret = io_submit(ctx, 1, iocbs); + if (ret != 1) + fail("io_submit returned %d instead of 1", ret); + + ret = io_getevents(ctx, 1, 1, &event, NULL); + if (ret != 1) + fail("io_getevents returned %d instead of 1", ret); + + if (event.res == -EIO) { + printf("invalidation returned -EIO, OK\n"); + exit(0); + } + + if (event.res != GINORMOUS) + fail("event res %ld\n", event.res); + } +} + +void spin_buffered(int fd) +{ + int ret; + + while (1) { + ret = pwrite(fd, buf, GINORMOUS, 0); + if (ret != GINORMOUS) + fail("buffered write returned %d", ret); + } +} + +static void alarm_handler(int signum) +{ +} + +int main(int argc, char **argv) +{ + pid_t buffered_pid; + pid_t dio_pid; + pid_t pid; + int fd; + int fd2; + int status; + + if (argc != 2) + fail("only arg should be file name"); + + fd = open(argv[1], O_DIRECT|O_CREAT|O_RDWR, 0644); + if (fd < 0) + fail("open dio failed: %d\n", errno); + + fd2 = open(argv[1], O_RDWR, 0644); + if (fd < 0) + fail("open failed: %d\n", errno); + + buffered_pid = fork(); + if (buffered_pid < 0) + fail("fork failed: %d\n", errno); + + if (buffered_pid == 0) { + spin_buffered(fd2); + exit(0); + } + + dio_pid = fork(); + if (dio_pid < 0) { + kill(buffered_pid, SIGKILL); + fail("fork failed: %d\n", errno); + } + + if (dio_pid == 0) { + spin_dio(fd); + exit(0); + } + + signal(SIGALRM, alarm_handler); + alarm(SECONDS); + + pid = wait(&status); + if (pid < 0 && errno == EINTR) { + /* if we timed out then we're done */ + kill(buffered_pid, SIGKILL); + kill(dio_pid, SIGKILL); + printf("ran for %d seconds without error, passing\n", SECONDS); + exit(0); + } + + if (pid == dio_pid) + kill(buffered_pid, SIGKILL); + else + kill(dio_pid, SIGKILL); + + /* + * pass on the child's pass/fail return code or fail if the child + * didn't exit cleanly. + */ + exit(WIFEXITED(status) ? WEXITSTATUS(status) : 1); +} diff --git a/src/aio-dio-regress/aio-dio-invalidate-readahead.c b/src/aio-dio-regress/aio-dio-invalidate-readahead.c new file mode 100644 index 0000000..58ea8c0 --- /dev/null +++ b/src/aio-dio-regress/aio-dio-invalidate-readahead.c @@ -0,0 +1,191 @@ +/* + * aio-dio-invalidate-readahead - test sync DIO invalidation of readahead + * Copyright (C) 2007 Zach Brown + * + * 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; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will 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 to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#define _XOPEN_SOURCE 500 /* pwrite */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * sync DIO invalidates the read cache after it finishes the write. This + * is to invalidate cached pages which might have been brought in during + * the write. + * + * In http://lkml.org/lkml/2007/10/26/478 a user reported this failing + * for his case of readers and writers racing. It turned out that his + * reader wasn't actually racing with the writer, but read-ahead from + * the reader pushed reads up into the region that the writer was working + * on. + * + * This test reproduces his case. We have a writing thread tell + * a reading thread how far into the file it will find new data. + * The reader reads behind the writer, checking for stale data. + * If the kernel fails to invalidate the read-ahead after the + * write then the reader will see stale data. + */ +#ifndef O_DIRECT +#define O_DIRECT 040000 /* direct disk access hint */ +#endif + +#define FILE_SIZE (8 * 1024 * 1024) + +/* this test always failed before 10 seconds on a single spindle */ +#define SECONDS 30 + +#define fail(fmt , args...) do {\ + printf(fmt , ##args); \ + exit(1); \ +} while (0) + +int page_size; + +pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; +pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +loff_t write_pos = 0; +loff_t read_pos = 0; +unsigned char byte = 0; + +static void *writer(void *arg) +{ + char *path = arg; + loff_t off; + void *buf; + int ret; + int fd; + time_t start = time(NULL); + + buf = memalign(page_size, page_size); + if (buf == NULL) + fail("failed to allocate an aligned page"); + + fd = open(path, O_DIRECT|O_CREAT|O_RDWR|O_TRUNC, 0644); + if (fd < 0) + fail("dio open failed: %d\n", errno); + + while (1) { + if ((time(NULL) - start) > SECONDS) { + printf("test ran for %u seconds without error\n", + SECONDS); + exit(0); + } + + pthread_mutex_lock(&mut); + while (read_pos != write_pos) + pthread_cond_wait(&cond, &mut); + byte++; + write_pos = 0; + pthread_mutex_unlock(&mut); + + memset(buf, byte, page_size); + + for (off = 0; off < FILE_SIZE; off += page_size) { + + ret = pwrite(fd, buf, page_size, off); + if (ret != page_size) + fail("write returned %d", ret); + + if ((rand() % 4) == 0) { + pthread_mutex_lock(&mut); + write_pos = off; + pthread_cond_signal(&cond); + pthread_mutex_unlock(&mut); + }; + } + } +} + +static void *reader(void *arg) +{ + char *path = arg; + unsigned char old; + loff_t read_to = 0; + void *found; + int fd; + int ret; + void *buf; + loff_t off; + + setvbuf(stdout, NULL, _IONBF, 0); + + buf = memalign(page_size, page_size); + if (buf == NULL) + fail("failed to allocate an aligned page"); + + fd = open(path, O_CREAT|O_RDONLY, 0644); + if (fd < 0) + fail("buffered open failed: %d\n", errno); + + while (1) { + pthread_mutex_lock(&mut); + read_pos = read_to; + pthread_cond_signal(&cond); + while (read_pos == write_pos) + pthread_cond_wait(&cond, &mut); + read_to = write_pos; + off = read_pos; + old = byte - 1; + pthread_mutex_unlock(&mut); + + for (; off < read_to; off += page_size) { + + ret = pread(fd, buf, page_size, off); + if (ret != page_size) + fail("write returned %d", ret); + + found = memchr(buf, old, page_size); + if (found) + fail("reader found old byte at pos %lu", + (unsigned long)off + + (unsigned long)found - + (unsigned long)buf); + } + } +} + +int main(int argc, char **argv) +{ + pthread_t reader_thread; + pthread_t writer_thread; + int ret; + + page_size = getpagesize(); + + if (argc != 2) + fail("only arg should be file name"); + + ret = pthread_create(&writer_thread, NULL, writer, argv[1]); + if (ret == 0) + ret = pthread_create(&reader_thread, NULL, reader, argv[1]); + if (ret) + fail("failed to start reader and writer threads: %d", ret); + + pthread_join(writer_thread, NULL); + pthread_join(reader_thread, NULL); + exit(0); +} diff --git a/src/aio-dio-regress/aio-dio-subblock-eof-read.c b/src/aio-dio-regress/aio-dio-subblock-eof-read.c new file mode 100644 index 0000000..cbcff97 --- /dev/null +++ b/src/aio-dio-regress/aio-dio-subblock-eof-read.c @@ -0,0 +1,115 @@ +/* + * aio-dio-subblock-eof-read - test AIO read of last block of DIO file + * Copyright (C) 2005 Jeff Moyer + * + * 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; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will 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 to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Code taken from an example posted to linux-aio at kvack.org + * http://marc.info/?l=linux-aio&m=112263621431161&w=2 + * Original Author: Drangon Zhou + * Munged & rewritten by Jeff Moyer. + * + * Description: This source code implements a test to ensure that an AIO + * read of the last block in a file opened with O_DIRECT returns the proper + * amount of data. In the past, there was a bug that resulted in a return + * value of the requested block size, when in fact there was only a fraction + * of that data available. Thus, if the last data block contained 300 bytes + * worth of data, and the user issued a 4k read, we want to ensure that + * the return value is 300, not 4k. + */ + +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include + +/* Create a file of a size that is not a multiple of block size */ +#define FILE_SIZE 300 + +#define fail(fmt , args...) \ +do { \ + printf(fmt , ##args); \ + exit(1); \ +} while (0) + +static unsigned char buffer[4096] __attribute((aligned (4096))); + +int +main(int argc, char **argv) +{ + int ret; + int fd; + const char *filename; + struct iocb myiocb; + struct iocb *cb = &myiocb; + io_context_t ioctx; + struct io_event ie; + + if (argc != 2) + fail("only arg should be file name"); + + filename = argv[1]; + fd = open(filename, O_CREAT|O_RDWR|O_DIRECT, 0600); + if (fd < 0) + fail("open returned error %d\n", errno); + + ret = ftruncate(fd, FILE_SIZE); + if (ret < 0) + fail("truncate returned error %d\n", errno); + + /* <1> use normal disk read, this should be ok */ + ret = read(fd, buffer, 4096); + if (ret != FILE_SIZE) + fail("buffered read returned %d, should be 300\n", ret); + + /* <2> use AIO disk read, it sees error. */ + memset(&myiocb, 0, sizeof(myiocb)); + cb->data = 0; + cb->key = 0; + cb->aio_lio_opcode = IO_CMD_PREAD; + cb->aio_reqprio = 0; + cb->aio_fildes = fd; + cb->u.c.buf = buffer; + cb->u.c.nbytes = 4096; + cb->u.c.offset = 0; + + ret = io_queue_init(1, &ioctx); + if (ret != 0) + fail("io_queue_init returned error %d\n", ret); + + ret = io_submit(ioctx, 1, &cb); + if (ret != 1) + fail("io_submit returned error %d\n", ret); + + ret = io_getevents(ioctx, 1, 1, &ie, NULL); + if (ret != 1) + fail("io_getevents returned %d\n", ret); + + /* + * If all goes well, we should see 300 bytes read. If things + * are broken, we may very well see a result of 4k. + */ + if (ie.res != FILE_SIZE) + fail("AIO read of last block in file returned %d bytes, " + "expected %d\n", ret, FILE_SIZE); + + printf("AIO read of last block in file succeeded.\n"); + return 0; +} diff --git a/src/aio-dio-regress/aio-free-ring-with-bogus-nr-pages.c b/src/aio-dio-regress/aio-free-ring-with-bogus-nr-pages.c new file mode 100644 index 0000000..f133fc0 --- /dev/null +++ b/src/aio-dio-regress/aio-free-ring-with-bogus-nr-pages.c @@ -0,0 +1,85 @@ +/* + * aio-free-ring-with-bogus-nr-pages - test aio_setup_ring with bad nr_pages + * Copyright (C) 2006 Kostantin Khorenko + * Copyright (C) 2006 Jeff Moyer + * + * 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; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will 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 to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Code taken from an example posted to Red Hat bugzilla #220971 + * + * Original Author: Kostantin Khorenko from OpenVZ/Virtuozzo + * Munged by Jeff Moyer. + * + * Description: "aio_setup_ring() function initializes info->nr_pages + * variable incorrectly, then this variable can be used in error path + * to free the allocated resources. By this way an unprivileged user + * can crash the node." + * + * At the beginning of aio_setup_ring, info->nr_pages is initialized + * to the requested number of pages. However, it is supposed to + * indicate how many pages are mapped in info->ring_pages. Thus, if + * the call to do_mmap fails: + * + * info->mmap_base = do_mmap(NULL, 0, info->mmap_size, + * PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, + * 0); + * if (IS_ERR((void *)info->mmap_base)) { + * up_write(&ctx->mm->mmap_sem); + * printk("mmap err: %ld\n", -info->mmap_base); + * info->mmap_size = 0; + * aio_free_ring(ctx); <--------- + * return -EAGAIN; + * } + * + * we end up calling aio_free_ring with a bogus array and cause an oops. + * + * This is a destructive test. + */ +#include +#include +#include +#include +#include +#include + +int main(int __attribute__((unused)) argc, char **argv) +{ + long res; + io_context_t ctx; + void* map; + + while (1) { + map = mmap(NULL, 100, PROT_READ, MAP_ANONYMOUS|MAP_PRIVATE, + 0, 0); + if (map == MAP_FAILED) + break; + map = mmap(NULL, 100, PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, + 0, 0); + if (map == MAP_FAILED) + break; + } + + memset(&ctx, 0, sizeof(ctx)); + res = io_setup(10000, &ctx); + if (res != -ENOMEM) { + printf("%s: Error: io_setup returned %ld, expected -ENOMEM\n", + basename(argv[0]), res); + return 1; + } else + printf("%s: Success!\n", basename(argv[0])); + return 0; +} diff --git a/src/aio-dio-regress/aio-io-setup-with-nonwritable-context-pointer.c b/src/aio-dio-regress/aio-io-setup-with-nonwritable-context-pointer.c new file mode 100644 index 0000000..092cbb4 --- /dev/null +++ b/src/aio-dio-regress/aio-io-setup-with-nonwritable-context-pointer.c @@ -0,0 +1,51 @@ +/* + * aio-io-setup-with-nonwritable-context-pointer - + * Test what happens when a non-writable context pointer is passed to io_setup + * Copyright (C) 2007 Jeff Moyer + * + * 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; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will 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 to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * Author: Jeff Moyer + * + * Description: Pass a non-writable context pointer to io_setup to see if + * the kernel deals with it correctly. In the past, the reference counting + * in this particular error path was off and this operation would cause an + * oops. + * + * This is a destructive test. + */ +#include +#include +#include +#include +#include + +int +main(int __attribute__((unused)) argc, char **argv) +{ + void *addr; + + addr = mmap(NULL, 4096, PROT_READ, MAP_SHARED|MAP_ANONYMOUS, 0, 0); + if (!addr) { + perror("mmap"); + exit(1); + } + io_setup(1, addr /* un-writable pointer */); + + printf("%s: Success!\n", basename(argv[0])); + return 0; +} From BATV+4d015a9e3df6a7aca34c+2109+infradead.org+hch@bombadil.srs.infradead.org Tue Jun 2 12:25:30 2009 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 (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n52HPT6W115510 for ; Tue, 2 Jun 2009 12:25:30 -0500 X-ASG-Debug-ID: 1243963932-618202f60000-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 D37561042B54 for ; Tue, 2 Jun 2009 10:32:13 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id YyVCa9xAzwo9Hx3u for ; Tue, 02 Jun 2009 10:32:13 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MBXk6-0005z9-72; Tue, 02 Jun 2009 17:25:42 +0000 Date: Tue, 2 Jun 2009 13:25:42 -0400 From: Christoph Hellwig To: Eric Sandeen Cc: Christoph Hellwig , xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 8/9] Enable generic filesystems to be fsck'd Subject: Re: [PATCH 8/9] Enable generic filesystems to be fsck'd Message-ID: <20090602172542.GA21701@infradead.org> References: <1243450413-12681-1-git-send-email-sandeen@sandeen.net> <1243450413-12681-9-git-send-email-sandeen@sandeen.net> <20090528125128.GA13425@infradead.org> <20090602123852.GA4101@infradead.org> <4A2540F4.4050204@sandeen.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A2540F4.4050204@sandeen.net> 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: 1243963934 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Tue, Jun 02, 2009 at 10:10:44AM -0500, Eric Sandeen wrote: > Maybe we should move the mountpoint assignment outside the conditional, > since we echo it unconditionally. Only the !USE_REMOUNT case cares > anyway but still... It's only used to be passed as an argument to _mount_or_remount_rw where we only care for the !USE_REMOUNT case. So I've left this one as-is and fixed up all other issues. Index: xfstests-dev/common.rc =================================================================== --- xfstests-dev.orig/common.rc 2009-06-02 12:12:24.000000000 +0000 +++ xfstests-dev/common.rc 2009-06-02 17:10:20.000000000 +0000 @@ -707,29 +707,29 @@ [ "$?" == "0" ] || _notrun "$qa_user user not defined." } -# check that a FS is mounted as XFS. if so, return mount point +# check that a FS on a device is mounted +# if so, return mount point # -_xfs_mounted() +_is_mounted() { if [ $# -ne 1 ] then - echo "Usage: _xfs_mounted device" 1>&2 + echo "Usage: _is_mounted device" 1>&2 exit 1 fi device=$1 - if _mount | grep "$device " | $AWK_PROG ' - /type xfs/ { print $3 ; exit 0 } - END { exit 1 } + if _mount | grep "$device " | $AWK_PROG -v pattern="type $FSTYP" ' + pattern { print $3 ; exit 0 } + END { exit 1 } ' then - echo "_xfs_mounted: $device is not a mounted XFS FS" + echo "_is_mounted: $device is not a mounted $FSTYP FS" exit 1 fi } - # remount a FS to a new mode (ro or rw) # _remount() @@ -749,14 +749,112 @@ fi } -# run xfs_check and friends on a FS. +# Run the appropriate repair/check on a filesystem # # if the filesystem is mounted, it's either remounted ro before being # checked or it's unmounted and then remounted # +# If set, we remount ro instead of unmounting for fsck USE_REMOUNT=0 +_umount_or_remount_ro() +{ + if [ $# -ne 1 ] + then + echo "Usage: _umount_or_remount_ro " 1>&2 + exit 1 + fi + device=$1 + + if [ $USE_REMOUNT -eq 0 ] + then + mountpoint=`_is_mounted $device` + $UMOUNT_PROG $device + else + _remount $device ro + fi + echo "$mountpoint" +} + +_mount_or_remount_rw() +{ + if [ $# -ne 3 ] + then + echo "Usage: _mount_or_remount_rw " 1>&2 + exit 1 + fi + mount_opts=$1 + device=$2 + mountpoint=$3 + + if [ $USE_REMOUNT -eq 0 ] + then + if ! _mount -t $FSTYP $mount_opts $device $mountpoint + then + echo "!!! failed to remount $device on $mountpoint" + return 0 # ok=0 + fi + else + _remount $device rw + fi + + return 1 # ok=1 +} + +# Check a generic filesystem in no-op mode; this assumes that the +# underlying fsck program accepts "-n" for a no-op (check-only) run, +# and that it will still return an errno for corruption in this mode. +# +# Filesystems which don't support this will need to define their +# own check routine. +# +_check_generic_filesystem() +{ + device=$1 + + # If type is set, we're mounted + type=`_fs_type $device` + ok=1 + + if [ "$type" = "$FSTYP" ] + then + # mounted ... + mountpoint=`_umount_or_remount_ro $device` + fi + + fsck -t $FSTYP -n $device >$tmp.fsck 2>&1 + if [ $? -ne 0 ] + then + echo "_check_generic_filesystem: filesystem on $device is inconsistent (see $seq.full)" + + echo "_check_generic filesystem: filesystem on $device is inconsistent" >>$here/$seq.full + echo "*** fsck.$FSTYP output ***" >>$here/$seq.full + cat $tmp.fsck >>$here/$seq.full + echo "*** end fsck.$FSTYP output" >>$here/$seq.full + + ok=0 + fi + rm -f $tmp.fsck + + if [ $ok -eq 0 ] + then + echo "*** mount output ***" >>$here/$seq.full + _mount >>$here/$seq.full + echo "*** end mount output" >>$here/$seq.full + elif [ "$type" = "$FSTYP" ] + then + # was mounted ... + _mount_or_remount_rw "$MOUNT_OPTIONS" $device $mountpoint + ok=$? + fi + + [ $ok -eq 0 ] && exit 1 + return 0 +} + +# run xfs_check and friends on a FS. + _check_xfs_filesystem() { if [ $# -ne 3 ] @@ -787,15 +885,8 @@ if [ "$type" = "xfs" ] then - # mounted... - - if [ $USE_REMOUNT -eq 0 ] - then - mountpoint=`_xfs_mounted $device` - $UMOUNT_PROG $device - else - _remount $device ro - fi + # mounted ... + mountpoint=`_umount_or_remount_ro $device` fi $XFS_LOGPRINT_PROG -t $extra_log_options $device 2>&1 \ @@ -848,17 +939,7 @@ echo "*** end mount output" >>$here/$seq.full elif [ "$type" = "xfs" ] then - # mounted... - if [ $USE_REMOUNT -eq 0 ] - then - if ! _mount -t xfs $extra_mount_options $device $mountpoint - then - echo "!!! failed to remount $device on $mountpoint" - ok=0 - fi - else - _remount $device rw - fi + _mount_or_remount_rw "$extra_mount_options" $device $mountpoint fi [ $ok -eq 0 ] && exit 1 @@ -908,12 +989,8 @@ } -_check_test_fs() +_check_xfs_test_fs() { - if [ "$FSTYP" != "xfs" ]; then - return - fi - TEST_LOG="none" TEST_RT="none" [ "$USE_EXTERNAL" = yes -a ! -z "$TEST_LOGDEV" ] && \ @@ -932,6 +1009,24 @@ fi } +_check_test_fs() +{ + case $FSTYP in + xfs) + _check_xfs_test_fs + ;; + nfs) + # no way to check consistency for nfs + ;; + udf) + # do nothing for now + ;; + *) + _check_generic_filesystem $TEST_DEV + ;; + esac +} + _check_scratch_fs() { case $FSTYP in @@ -953,6 +1048,7 @@ # Don't know how to check an NFS filesystem, yet. ;; *) + _check_generic_filesystem $SCRATCH_DEV ;; esac } @@ -987,25 +1083,6 @@ echo "$os/$platform $host $kernel" } -_check_testdir() -{ - case $FSTYP in - xfs) - _check_test_fs - ;; - udf) - _cleanup_testdir - _check_scratch_fs - _scratch_mount - ;; - nfs*) - # Don't know how to check an NFS filesystem, yet. - ;; - *) - ;; - esac -} - _setup_udf_scratchdir() { [ "$FSTYP" != "udf" ] \ From rherndon@sgi.com Tue Jun 2 14:21:54 2009 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=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.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n52JLrMT124315 for ; Tue, 2 Jun 2009 14:21:54 -0500 Received: from attica.americas.sgi.com (attica.americas.sgi.com [128.162.236.44]) by relay2.corp.sgi.com (Postfix) with ESMTP id 7EC753040C0 for ; Tue, 2 Jun 2009 12:22:08 -0700 (PDT) Received: by attica.americas.sgi.com (Postfix, from userid 105247) id 03E33A1FAB93; Tue, 2 Jun 2009 14:22:07 -0500 (CDT) From: robert herndon To: xfs@oss.sgi.com Cc: robert herndon Subject: [PATCH] Fix mode for include/install-sh so that attempts Date: Tue, 2 Jun 2009 14:22:07 -0500 Message-Id: <1243970527-8611-1-git-send-email-rherndon@attica.americas.sgi.com> X-Mailer: git-send-email 1.5.4.rc3 X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean From: robert herndon --- doc/INSTALL | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) mode change 100644 => 100755 include/install-sh diff --git a/doc/INSTALL b/doc/INSTALL index 2ecbf6c..35d34ce 100644 --- a/doc/INSTALL +++ b/doc/INSTALL @@ -1,5 +1,5 @@ This document describes how to configure and build the open source XFS -commands and utilites ("xfsprogs") from source, and how to install and +commands and utilities ("xfsprogs") from source, and how to install and run them. See the README file in the top level directory for details about how @@ -42,8 +42,11 @@ Linux Instructions # make # su root # make install - [and optionally, for the development libraries and headers] + [and optionally, for the development libraries and basic headers; + this is required to build xfsdump and dmapi] # make install-dev + [and optionally, for the development libraries and full headers; + this is required to build xfstests] Note that there are so many "install" variants out there that we wrote our own script (see "install-sh" in the top level directory). diff --git a/include/install-sh b/include/install-sh old mode 100644 new mode 100755 -- 1.5.6 From rherndon@sgi.com Tue Jun 2 14:22:19 2009 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=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.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n52JMJmc124344 for ; Tue, 2 Jun 2009 14:22:19 -0500 Received: from attica.americas.sgi.com (attica.americas.sgi.com [128.162.236.44]) by relay3.corp.sgi.com (Postfix) with ESMTP id 8860EAC001 for ; Tue, 2 Jun 2009 12:22:33 -0700 (PDT) Received: by attica.americas.sgi.com (Postfix, from userid 105247) id F3736A1FAB93; Tue, 2 Jun 2009 14:22:32 -0500 (CDT) From: robert herndon To: xfs@oss.sgi.com Cc: robert herndon Subject: [PATCH] Update xfsdump's doc/INSTALL to document method/necessity Date: Tue, 2 Jun 2009 14:22:32 -0500 Message-Id: <1243970552-9444-1-git-send-email-rherndon@attica.americas.sgi.com> X-Mailer: git-send-email 1.5.4.rc3 X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean From: robert herndon --- doc/INSTALL | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/doc/INSTALL b/doc/INSTALL index 6c32f28..7cd71b4 100644 --- a/doc/INSTALL +++ b/doc/INSTALL @@ -1,5 +1,5 @@ This document describes how to configure and build the open source XFS -commands and utilites ("xfsdump") from source, and how to install and +commands and utilities ("xfsdump") from source, and how to install and run them. 0. If you have the binary rpm, simply install it and skip to step 2 (below). @@ -13,6 +13,9 @@ run them. 1. Configure, build and install the package + Ensure that you have installed the required libraries and + header files. See doc/INSTALL in the xfsprogs repository. + The xfsdump package uses autoconf/configure and expects a GNU build environment (your platform must at least have both autoconf and gmake). You will also need to have installed either the e2fsprogs-devel package -- 1.5.6 From rherndon@sgi.com Tue Jun 2 14:22:43 2009 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=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.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n52JMhrk124378 for ; Tue, 2 Jun 2009 14:22:43 -0500 Received: from attica.americas.sgi.com (attica.americas.sgi.com [128.162.236.44]) by relay2.corp.sgi.com (Postfix) with ESMTP id 997923040CA for ; Tue, 2 Jun 2009 12:23:00 -0700 (PDT) Received: by attica.americas.sgi.com (Postfix, from userid 105247) id 5C8AFA1FAB93; Tue, 2 Jun 2009 14:23:00 -0500 (CDT) From: robert herndon To: xfs@oss.sgi.com Cc: robert herndon Subject: [PATCH] Update dmapi's doc/INSTALL to document method/necessity Date: Tue, 2 Jun 2009 14:23:00 -0500 Message-Id: <1243970580-12580-1-git-send-email-rherndon@attica.americas.sgi.com> X-Mailer: git-send-email 1.5.4.rc3 X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean From: robert herndon --- doc/INSTALL | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/doc/INSTALL b/doc/INSTALL index ec5a4ef..19493f7 100644 --- a/doc/INSTALL +++ b/doc/INSTALL @@ -12,6 +12,9 @@ library from source, and how to install it. 1. Configure, build and install the package + Ensure that you have installed the required libraries and + header files. See doc/INSTALL in the xfsprogs repository. + The "dmapi" package uses autoconf/configure and expects a GNU build environment (your platform must at least have both autoconf and gmake). -- 1.5.6 From rherndon@sgi.com Tue Jun 2 14:23:07 2009 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_43 autolearn=no version=3.3.0-rupdated Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n52JN6Yi124416 for ; Tue, 2 Jun 2009 14:23:06 -0500 Received: from attica.americas.sgi.com (attica.americas.sgi.com [128.162.236.44]) by relay2.corp.sgi.com (Postfix) with ESMTP id 517573040C0 for ; Tue, 2 Jun 2009 12:23:24 -0700 (PDT) Received: by attica.americas.sgi.com (Postfix, from userid 105247) id 19363A1FAB93; Tue, 2 Jun 2009 14:23:24 -0500 (CDT) From: robert herndon To: xfs@oss.sgi.com Cc: robert herndon Subject: [PATCH] Update xfstests' README to document method/necessity Date: Tue, 2 Jun 2009 14:23:24 -0500 Message-Id: <1243970604-13732-1-git-send-email-rherndon@attica.americas.sgi.com> X-Mailer: git-send-email 1.5.4.rc3 X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean From: robert herndon --- README | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/README b/README index 375e07c..f9725b4 100644 --- a/README +++ b/README @@ -18,6 +18,17 @@ Preparing system for tests (IRIX and Linux): - compile XFS into your kernel or load XFS modules - install user tools including mkfs.xfs, xfs_db & xfs_bmap + - install header files required to build xfstests' programs: + + # cd <...>/xfsprogs + # make install-qa + + % cd <...>/xfstests + % make xfstests + + This creates the directory /usr/include/xfs and installs + files there that are required to compile the programs in + this directory. - If you wish to run the udf components of the suite install mkfs_udf and udf_db for IRIX and mkudffs for Linux. Also download and build the Philips UDF Verification Software from -- 1.5.6 From sandeen@sandeen.net Tue Jun 2 14:47:52 2009 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,J_CHICKENPOX_43 autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n52Jlp3d125756 for ; Tue, 2 Jun 2009 14:47:51 -0500 X-ASG-Debug-ID: 1243972088-6de101720000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mx2.redhat.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 15B392C9006; Tue, 2 Jun 2009 12:48:08 -0700 (PDT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by cuda.sgi.com with ESMTP id jlEYgop9KIamZTHB; Tue, 02 Jun 2009 12:48:08 -0700 (PDT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n52Jm7F1027249; Tue, 2 Jun 2009 15:48:07 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n52Jm7Nf020183; Tue, 2 Jun 2009 15:48:07 -0400 Received: from neon.msp.redhat.com (neon.msp.redhat.com [10.15.80.10]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n52Jm6Zj006463; Tue, 2 Jun 2009 15:48:06 -0400 Message-ID: <4A2581F6.8070705@sandeen.net> Date: Tue, 02 Jun 2009 14:48:06 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: robert herndon CC: xfs@oss.sgi.com, robert herndon X-ASG-Orig-Subj: Re: [PATCH] Update xfstests' README to document method/necessity Subject: Re: [PATCH] Update xfstests' README to document method/necessity References: <1243970604-13732-1-git-send-email-rherndon@attica.americas.sgi.com> In-Reply-To: <1243970604-13732-1-git-send-email-rherndon@attica.americas.sgi.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-Barracuda-Connect: mx2.redhat.com[66.187.237.31] X-Barracuda-Start-Time: 1243972089 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.27406 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean robert herndon wrote: > From: robert herndon > > --- > README | 11 +++++++++++ > 1 files changed, 11 insertions(+), 0 deletions(-) > > diff --git a/README b/README > index 375e07c..f9725b4 100644 > --- a/README > +++ b/README > @@ -18,6 +18,17 @@ Preparing system for tests (IRIX and Linux): > > - compile XFS into your kernel or load XFS modules > - install user tools including mkfs.xfs, xfs_db & xfs_bmap > + - install header files required to build xfstests' programs: > + > + # cd <...>/xfsprogs > + # make install-qa With any luck, this will be going away soon, actually. It's only required for loggen, and we're looking for ways around that. See for example [PATCH, RFC] xfsprogs: add xfs_loggen and/or [PATCH 1/9 V2] Use xfs.h rather than libxfs.h on the list. -Eric From rherndon@sgi.com Tue Jun 2 16:08:40 2009 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_43 autolearn=no version=3.3.0-rupdated Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n52L8eOE129873 for ; Tue, 2 Jun 2009 16:08:40 -0500 Received: from attica.americas.sgi.com (attica.americas.sgi.com [128.162.236.44]) by relay2.corp.sgi.com (Postfix) with ESMTP id 206D23040C0; Tue, 2 Jun 2009 14:08:55 -0700 (PDT) Received: by attica.americas.sgi.com (Postfix, from userid 105247) id 8391CA1FAB93; Tue, 2 Jun 2009 16:08:54 -0500 (CDT) From: Robert Herndon To: xfs@oss.sgi.com Cc: Robert Herndon Subject: [PATCH] README: add hint on install-qa Date: Tue, 2 Jun 2009 16:08:54 -0500 Message-Id: <1243976934-18008-1-git-send-email-rherndon@sgi.com> X-Mailer: git-send-email 1.5.4.rc3 X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Signed-off-by: Robert Herndon --- README | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/README b/README index 375e07c..964578d 100644 --- a/README +++ b/README @@ -18,6 +18,17 @@ Preparing system for tests (IRIX and Linux): - compile XFS into your kernel or load XFS modules - install user tools including mkfs.xfs, xfs_db & xfs_bmap + - install header files required to build xfstests' programs: + + # cd <...>/xfsprogs + # make install-qa + + % cd <...>/xfstests + % make xfstests + + This creates the directory /usr/include/xfs and installs + files there that are required to compile the programs in + this directory. - If you wish to run the udf components of the suite install mkfs_udf and udf_db for IRIX and mkudffs for Linux. Also download and build the Philips UDF Verification Software from -- 1.5.6 From rherndon@sgi.com Tue Jun 2 16:44:24 2009 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 relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n52LiNR1131753 for ; Tue, 2 Jun 2009 16:44:23 -0500 Received: from attica.americas.sgi.com (attica.americas.sgi.com [128.162.236.44]) by relay2.corp.sgi.com (Postfix) with ESMTP id 445743040C8; Tue, 2 Jun 2009 14:44:41 -0700 (PDT) Received: by attica.americas.sgi.com (Postfix, from userid 105247) id 9B0C4A1FAB93; Tue, 2 Jun 2009 16:44:40 -0500 (CDT) From: Robert Herndon To: xfs@oss.sgi.com Cc: Robert Herndon Subject: [PATCH] Add -x mode to include/install-sh; add build hints to doc/INSTALL. Date: Tue, 2 Jun 2009 16:44:40 -0500 Message-Id: <1243979080-5665-1-git-send-email-rherndon@sgi.com> X-Mailer: git-send-email 1.5.4.rc3 X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Signed-off-by: Robert Herndon --- doc/INSTALL | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) mode change 100644 => 100755 include/install-sh diff --git a/doc/INSTALL b/doc/INSTALL index 2ecbf6c..b3a7a3c 100644 --- a/doc/INSTALL +++ b/doc/INSTALL @@ -1,5 +1,5 @@ This document describes how to configure and build the open source XFS -commands and utilites ("xfsprogs") from source, and how to install and +commands and utilities ("xfsprogs") from source, and how to install and run them. See the README file in the top level directory for details about how @@ -42,8 +42,12 @@ Linux Instructions # make # su root # make install - [and optionally, for the development libraries and headers] + [and optionally, for the development libraries and basic headers; + this is required to build xfsdump and dmapi] # make install-dev + [and optionally, for the development libraries and full headers; + this is required to build xfstests] + # make install-qa Note that there are so many "install" variants out there that we wrote our own script (see "install-sh" in the top level directory). @@ -98,7 +102,8 @@ Mac OS X Instructions $ make $ su root # make install - [and optionally, for the development libraries and headers] + [and optionally, for the development libraries and headers; + this is required to build xfsdump and dmapi] # make install-dev diff --git a/include/install-sh b/include/install-sh old mode 100644 new mode 100755 -- 1.5.4.rc3 From rherndon@sgi.com Tue Jun 2 16:53:49 2009 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 relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n52LrmKR132228 for ; Tue, 2 Jun 2009 16:53:48 -0500 Received: from attica.americas.sgi.com (attica.americas.sgi.com [128.162.236.44]) by relay3.corp.sgi.com (Postfix) with ESMTP id 104C7AC007; Tue, 2 Jun 2009 14:54:03 -0700 (PDT) Received: by attica.americas.sgi.com (Postfix, from userid 105247) id 4E320A1FAB93; Tue, 2 Jun 2009 16:54:02 -0500 (CDT) From: Robert Herndon To: xfs@oss.sgi.com Cc: Robert Herndon Subject: [PATCH] Add hint to see xfsprogs' doc/INSTALL in doc/INSTALL. Date: Tue, 2 Jun 2009 16:54:02 -0500 Message-Id: <1243979642-10017-1-git-send-email-rherndon@sgi.com> X-Mailer: git-send-email 1.5.4.rc3 X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Signed-off-by: Robert Herndon --- doc/INSTALL | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/doc/INSTALL b/doc/INSTALL index 6c32f28..7cd71b4 100644 --- a/doc/INSTALL +++ b/doc/INSTALL @@ -1,5 +1,5 @@ This document describes how to configure and build the open source XFS -commands and utilites ("xfsdump") from source, and how to install and +commands and utilities ("xfsdump") from source, and how to install and run them. 0. If you have the binary rpm, simply install it and skip to step 2 (below). @@ -13,6 +13,9 @@ run them. 1. Configure, build and install the package + Ensure that you have installed the required libraries and + header files. See doc/INSTALL in the xfsprogs repository. + The xfsdump package uses autoconf/configure and expects a GNU build environment (your platform must at least have both autoconf and gmake). You will also need to have installed either the e2fsprogs-devel package -- 1.5.4.rc3 From rherndon@sgi.com Tue Jun 2 16:56:31 2009 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 relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n52LuVbU132343 for ; Tue, 2 Jun 2009 16:56:31 -0500 Received: from attica.americas.sgi.com (attica.americas.sgi.com [128.162.236.44]) by relay3.corp.sgi.com (Postfix) with ESMTP id A920CAC001; Tue, 2 Jun 2009 14:56:48 -0700 (PDT) Received: by attica.americas.sgi.com (Postfix, from userid 105247) id D087CA1FAB93; Tue, 2 Jun 2009 16:56:47 -0500 (CDT) From: Robert Herndon To: xfs@oss.sgi.com Cc: Robert Herndon Subject: [PATCH] Add hint to see xfsprogs' doc/INSTALL in doc/INSTALL. Date: Tue, 2 Jun 2009 16:56:47 -0500 Message-Id: <1243979807-20093-1-git-send-email-rherndon@sgi.com> X-Mailer: git-send-email 1.5.4.rc3 X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Signed-off-by: Robert Herndon --- doc/INSTALL | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/doc/INSTALL b/doc/INSTALL index ec5a4ef..19493f7 100644 --- a/doc/INSTALL +++ b/doc/INSTALL @@ -12,6 +12,9 @@ library from source, and how to install it. 1. Configure, build and install the package + Ensure that you have installed the required libraries and + header files. See doc/INSTALL in the xfsprogs repository. + The "dmapi" package uses autoconf/configure and expects a GNU build environment (your platform must at least have both autoconf and gmake). -- 1.5.4.rc3 From BATV+ac29816878cb286aebda+2110+infradead.org+hch@bombadil.srs.infradead.org Wed Jun 3 11:40:16 2009 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 (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n53GeErp183884 for ; Wed, 3 Jun 2009 11:40:16 -0500 X-ASG-Debug-ID: 1244047231-323f016e0000-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 C9EA62CCB36; Wed, 3 Jun 2009 09:40:31 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id KQphx35eFGKsJCmV; Wed, 03 Jun 2009 09:40:31 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MBtVu-0000Ee-JZ; Wed, 03 Jun 2009 16:40:30 +0000 Date: Wed, 3 Jun 2009 12:40:30 -0400 From: Christoph Hellwig To: Robert Herndon Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH] README: add hint on install-qa Subject: Re: [PATCH] README: add hint on install-qa Message-ID: <20090603164029.GA30759@infradead.org> References: <1243976934-18008-1-git-send-email-rherndon@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1243976934-18008-1-git-send-email-rherndon@sgi.com> 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: 1244047231 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Tue, Jun 02, 2009 at 04:08:54PM -0500, Robert Herndon wrote: > + - install header files required to build xfstests' programs: > + > + # cd <...>/xfsprogs > + # make install-qa > + > + % cd <...>/xfstests > + % make xfstests > + > + This creates the directory /usr/include/xfs and installs > + files there that are required to compile the programs in > + this directory. Note that this is only required for loggen, and we're currently discussing options how to get rid of this. I would keep the patch on hold for now. From BATV+ac29816878cb286aebda+2110+infradead.org+hch@bombadil.srs.infradead.org Wed Jun 3 11:43:39 2009 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 (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n53GhcXg184041 for ; Wed, 3 Jun 2009 11:43:38 -0500 X-ASG-Debug-ID: 1244047828-202a02bd0000-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 031DC10453BC; Wed, 3 Jun 2009 09:50:29 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id oDHyUnUN2pCgtFKQ; Wed, 03 Jun 2009 09:50:29 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MBtZD-0004VF-0K; Wed, 03 Jun 2009 16:43:55 +0000 Date: Wed, 3 Jun 2009 12:43:54 -0400 From: Christoph Hellwig To: Robert Herndon Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH] Add -x mode to include/install-sh; add build hints to doc/INSTALL. Subject: Re: [PATCH] Add -x mode to include/install-sh; add build hints to doc/INSTALL. Message-ID: <20090603164354.GB30759@infradead.org> References: <1243979080-5665-1-git-send-email-rherndon@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1243979080-5665-1-git-send-email-rherndon@sgi.com> 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: 1244047830 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Should be two separate patches/commits, please. It would be useful to mention what package this is again in the subject line: [PATCH] xfsprogs: add -x mode to include/install-sh [PATCH] xfsprogs: add build hints to doc/INSTALL (also note that commit subject lines after the prefix are not capitalized. > # make install-dev > + [and optionally, for the development libraries and full headers; > + this is required to build xfstests] > + # make install-qa It's not actually required anymore. From sandeen@redhat.com Wed Jun 3 12:01:06 2009 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n53H16r2184773 for ; Wed, 3 Jun 2009 12:01:06 -0500 X-ASG-Debug-ID: 1244048483-590e00530000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mx2.redhat.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id B4C992CC393 for ; Wed, 3 Jun 2009 10:01:23 -0700 (PDT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by cuda.sgi.com with ESMTP id VOL1N5QbhNTcIl1Y for ; Wed, 03 Jun 2009 10:01:23 -0700 (PDT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n53H1Nvt006250 for ; Wed, 3 Jun 2009 13:01:23 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n53H1Mo1017792 for ; Wed, 3 Jun 2009 13:01:22 -0400 Received: from neon.msp.redhat.com (neon.msp.redhat.com [10.15.80.10]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n53H1KKo012070 for ; Wed, 3 Jun 2009 13:01:21 -0400 Message-ID: <4A26AC60.6060401@redhat.com> Date: Wed, 03 Jun 2009 12:01:20 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: xfs mailing list X-ASG-Orig-Subj: [PATCH] xfstests: Make the SCRATCH_DEV optional Subject: [PATCH] xfstests: Make the SCRATCH_DEV optional Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-Barracuda-Connect: mx2.redhat.com[66.187.237.31] X-Barracuda-Start-Time: 1244048483 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.27485 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Tests will fail gracefully if there is no SCRATCH_DEV defined, so change the check script to allow it, and update README to reflect this. This just makes it simpler to set up the tests, at the expense of coverage. Long term it might be nice to allow either SCRATCH_DEV xor TEST_DEV to be missing, but for now this is simple. Signed-off-by: Eric Sandeen --- diff --git a/README b/README index 375e07c..210bded 100644 --- a/README +++ b/README @@ -26,25 +26,26 @@ Preparing system for tests (IRIX and Linux): set the environment variable DISABLE_UDF_TEST to 1. - - create two partitions to use for testing + - create one or two partitions to use for testing - one TEST partition - format as XFS, mount & optionally populate with NON-IMPORTANT stuff - - one SCRATCH partition + - one SCRATCH partition (optional) - leave empty and expect this partition to be clobbered - by some tests. + by some tests. If this is not provided, many tests will + not be run. (these must be two DIFFERENT partitions) - setup your environment - setenv TEST_DEV "device containing TEST PARTITION" - setenv TEST_DIR "mount point of TEST PARTITION" - - setenv SCRATCH_DEV "device containing SCRATCH PARTITION" - - setenv SCRATCH_MNT "mount point for SCRATCH PARTITION" - - setenv TAPE_DEV "tape device for testing xfsdump" - - setenv RMT_TAPE_DEV "remote tape device for testing xfsdump" - - setenv RMT_IRIXTAPE_DEV "remote IRIX tape device for testing xfsdump" - optionally: + - setenv SCRATCH_DEV "device containing SCRATCH PARTITION" + - setenv SCRATCH_MNT "mount point for SCRATCH PARTITION" + - setenv TAPE_DEV "tape device for testing xfsdump" + - setenv RMT_TAPE_DEV "remote tape device for testing xfsdump" + - setenv RMT_IRIXTAPE_DEV "remote IRIX tape device for testing xfsdump" - setenv SCRATCH_LOGDEV "device for scratch-fs external log" - setenv SCRATCH_RTDEV "device for scratch-fs realtime data" - setenv TEST_LOGDEV "device for test-fs external log" diff --git a/check b/check index 348b68e..55e90a1 100755 --- a/check +++ b/check @@ -160,26 +160,28 @@ MOUNT_OPTIONS -- $FULL_MOUNT_OPTIONS EOF -umount $SCRATCH_DEV 2>/dev/null -# call the overridden mkfs - make sure the FS is built -# the same as we'll create it later. - -if ! _scratch_mkfs $flag >$tmp.err 2>&1 -then - echo "our local _scratch_mkfs routine ..." - cat $tmp.err - echo "check: failed to mkfs \$SCRATCH_DEV using specified options" - exit 1 -fi - -# call the overridden mount - make sure the FS mounts with -# the same options that we'll mount with later. -if ! _scratch_mount >$tmp.err 2>&1 -then - echo "our local mount routine ..." - cat $tmp.err - echo "check: failed to mount \$SCRATCH_DEV using specified options" - exit 1 +if [ ! -z "$SCRATCH_DEV"]; then + umount $SCRATCH_DEV 2>/dev/null + # call the overridden mkfs - make sure the FS is built + # the same as we'll create it later. + + if ! _scratch_mkfs $flag >$tmp.err 2>&1 + then + echo "our local _scratch_mkfs routine ..." + cat $tmp.err + echo "check: failed to mkfs \$SCRATCH_DEV using specified options" + exit 1 + fi + + # call the overridden mount - make sure the FS mounts with + # the same options that we'll mount with later. + if ! _scratch_mount >$tmp.err 2>&1 + then + echo "our local mount routine ..." + cat $tmp.err + echo "check: failed to mount \$SCRATCH_DEV using specified options" + exit 1 + fi fi seq="check" From sandeen@redhat.com Wed Jun 3 12:16:56 2009 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n53HGtUO185629 for ; Wed, 3 Jun 2009 12:16:56 -0500 X-ASG-Debug-ID: 1244049826-202b039b0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mx2.redhat.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 052B11050C3F for ; Wed, 3 Jun 2009 10:23:46 -0700 (PDT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by cuda.sgi.com with ESMTP id LMHQbW936iouZufa for ; Wed, 03 Jun 2009 10:23:46 -0700 (PDT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n53HHCj4012631 for ; Wed, 3 Jun 2009 13:17:12 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n53HHBs9022250 for ; Wed, 3 Jun 2009 13:17:11 -0400 Received: from neon.msp.redhat.com (neon.msp.redhat.com [10.15.80.10]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n53HHAqt014606 for ; Wed, 3 Jun 2009 13:17:11 -0400 Message-ID: <4A26B016.2080108@redhat.com> Date: Wed, 03 Jun 2009 12:17:10 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: xfs mailing list X-ASG-Orig-Subj: [PATCH] xfstests: don't run 122 if required headers aren't found Subject: [PATCH] xfstests: don't run 122 if required headers aren't found Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-Barracuda-Connect: mx2.redhat.com[66.187.237.31] X-Barracuda-Start-Time: 1244049827 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.27486 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Now that libxfs etc is optional, 122 (which compiles on the fly) is failing if those extra headers are missing. Signed-off-by: Eric Sandeen --- diff --git a/122 b/122 index 7123753..9fbe437 100755 --- a/122 +++ b/122 @@ -191,7 +191,8 @@ awk ' echo 'return 0; }' >>$cprog # create and run program -cc -o $oprog $cprog +cc -o $oprog $cprog >> $seq.full 2>&1 || \ + _notrun "Could not compile test program (see end of $seq.full)" $oprog | _type_size_filter > $progout # From BATV+ac29816878cb286aebda+2110+infradead.org+hch@bombadil.srs.infradead.org Wed Jun 3 12:18:47 2009 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.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n53HIlTH185701 for ; Wed, 3 Jun 2009 12:18:47 -0500 X-ASG-Debug-ID: 1244049544-765b03700000-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 4C6E91BC8AE0 for ; Wed, 3 Jun 2009 10:19:04 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id sXnjmPHY5OaaXma7 for ; Wed, 03 Jun 2009 10:19:04 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MBu7E-0000Ee-EU; Wed, 03 Jun 2009 17:19:04 +0000 Date: Wed, 3 Jun 2009 13:19:04 -0400 From: Christoph Hellwig To: Eric Sandeen Cc: xfs mailing list X-ASG-Orig-Subj: Re: [PATCH] xfstests: Make the SCRATCH_DEV optional Subject: Re: [PATCH] xfstests: Make the SCRATCH_DEV optional Message-ID: <20090603171904.GA22100@infradead.org> References: <4A26AC60.6060401@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A26AC60.6060401@redhat.com> 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: 1244049545 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Wed, Jun 03, 2009 at 12:01:20PM -0500, Eric Sandeen wrote: > Tests will fail gracefully if there is no SCRATCH_DEV defined, so change > > the check script to allow it, and update README to reflect this. > > This just makes it simpler to set up the tests, at the expense of > coverage. > > Long term it might be nice to allow either SCRATCH_DEV xor TEST_DEV > to be missing, but for now this is simple. Looks good, Reviewed-by: Christoph Hellwig From BATV+ac29816878cb286aebda+2110+infradead.org+hch@bombadil.srs.infradead.org Wed Jun 3 12:50:49 2009 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 (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n53HokLR187158 for ; Wed, 3 Jun 2009 12:50:49 -0500 X-ASG-Debug-ID: 1244051858-1e1b00490000-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 7561C1050FC9 for ; Wed, 3 Jun 2009 10:57:38 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id RuGbih7GEdil4fIH for ; Wed, 03 Jun 2009 10:57:38 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MBucB-0001lZ-Dt; Wed, 03 Jun 2009 17:51:03 +0000 Date: Wed, 3 Jun 2009 13:51:03 -0400 From: Christoph Hellwig To: Eric Sandeen Cc: xfs mailing list X-ASG-Orig-Subj: Re: [PATCH] xfstests: don't run 122 if required headers aren't found Subject: Re: [PATCH] xfstests: don't run 122 if required headers aren't found Message-ID: <20090603175103.GA4538@infradead.org> References: <4A26B016.2080108@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A26B016.2080108@redhat.com> 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: 1244051858 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Wed, Jun 03, 2009 at 12:17:10PM -0500, Eric Sandeen wrote: > Now that libxfs etc is optional, 122 (which compiles on the fly) > is failing if those extra headers are missing. Oh, the great 122 tests. Indeed without all the headers defining the structures we can't actually check their size. Signed-off-by: Christoph Hellwig From richardc@efilmgroup.com Wed Jun 3 13:09:11 2009 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: *** X-Spam-Status: No, score=3.3 required=5.0 tests=BAYES_50,HTML_MESSAGE, URIBL_GREY autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n53I9Act188085 for ; Wed, 3 Jun 2009 13:09:11 -0500 X-ASG-Debug-ID: 1244052567-2f8803b70000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from server1.goffgrafix.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 98CC91BC8634 for ; Wed, 3 Jun 2009 11:09:27 -0700 (PDT) Received: from server1.goffgrafix.com (server1.goffgrafix.com [208.43.246.226]) by cuda.sgi.com with ESMTP id w6YogyOUH6eCJApu for ; Wed, 03 Jun 2009 11:09:27 -0700 (PDT) Received: from c-76-118-59-6.hsd1.ma.comcast.net ([76.118.59.6] helo=Distrobution) by server1.goffgrafix.com with esmtpa (Exim 4.69) (envelope-from ) id 1MBukn-0001tn-Jo; Wed, 03 Jun 2009 13:59:58 -0400 From: "Richard Cohen" To: X-ASG-Orig-Subj: Online training benefits for emergency responders Subject: Online training benefits for emergency responders Date: Wed, 3 Jun 2009 13:59:53 -0400 Message-ID: <744F3701B00F4189AD4E457F5A921B37@Distrobution> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0157_01C9E453.957E7140" X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: Acni9sO070hKwzIlS1SHrXC6yI0nRgAtnQrAADH0WmA= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server1.goffgrafix.com X-AntiAbuse: Original Domain - oss.sgi.com X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - efilmgroup.com X-Barracuda-Connect: server1.goffgrafix.com[208.43.246.226] X-Barracuda-Start-Time: 1244052567 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: -1.51 X-Barracuda-Spam-Status: No, SCORE=-1.51 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=BSF_SC0_SA_TO_FROM_DOMAIN_MATCH, BSF_SC7_SA_HREF_HTTP_MISMATCH, HTML_MESSAGE, HTTP_ESCAPED_HOST X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.27489 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_SC7_SA_HREF_HTTP_MISMATCH BODY: Custom Phishing Mismatch 0.00 HTTP_ESCAPED_HOST URI: Uses %-escapes inside a URL's hostname 0.00 HTML_MESSAGE BODY: HTML included in message 0.01 BSF_SC0_SA_TO_FROM_DOMAIN_MATCH Sender Domain Matches Recipient Domain X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean This is a multi-part message in MIME format. ------=_NextPart_000_0157_01C9E453.957E7140 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit A cost-effective alternative to offsite training Online safety training for firefighters and other first responders Emergency Film Group, the leader in DVD-based emergency response training, has now partnered with Mastery Technologies to provide video-based training on demand. Over 100 interactive courses are available - take one course or many. These courses are SCORM compliant, and can be used on your existing Learning Management System (LMS), or we will set one up for you. Why online training? * 24 hour access eliminates travel time, scheduling conflicts, and training delays. * Automated record keeping for Compliance and easy reporting. Track progress for individuals, divisions and groups. * Track employees' progress toward training goals from any internet connection. Spend your time managing, not juggling classes or instructors. * We can build your LMS to be fully branded and customized for your company. * CEU's awarded by the International Association for Continuing Education and Training. For a list of all courses available, visit http://www.trainingentry.net/efilmgroup/index. To learn how Online Training can be incorporated into your organization, view this 25-minute webinar at http://www.masterytech.com/demos/webinar-safety-mastery/index.htm. Richard Cohen Vice President, Distribution EMERGENCY FILM GROUP P.O. BOX 1928 140 COOKE STREET EDGARTOWN, MA 02539 800-842-0999 (www.efilmgroup.com ) This message was sent from Emergency Film Group, 140 Cooke St., Edgartown, MA 02539. To unsubscribe, please reply with "unsubscribe" in the subject line. No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.339 / Virus Database: 270.12.48/2147 - Release Date: 06/01/09 06:09:00 No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.339 / Virus Database: 270.12.50/2150 - Release Date: 06/02/09 06:47:00 ------=_NextPart_000_0157_01C9E453.957E7140 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

 

 

 

A cost-effective alternative to offsite = training

Online safety training for firefighters and other first responders =

 

Emergency = Film Group, the leader in DVD-based emergency response training, has now partnered with Mastery Technologies to provide video-based training = on demand. Over 100 interactive courses are available - take one course = or many. These courses are SCORM compliant, and can be used on your = existing Learning Management System (LMS), or we will set one up for = you. 

 

Why online = training?

  • 24 = hour access eliminates travel time, scheduling conflicts, and training = delays.
  • Automated record keeping for Compliance and easy reporting. Track = progress for individuals, divisions and groups. =
  • Track employees' progress toward training goals from any internet = connection. Spend your time managing, not juggling classes or = instructors.
  • We can = build your LMS to be fully branded and customized for your = company.
  • CEU's = awarded by the International Association for Continuing Education and Training.  

For a list of all courses available, = visit http://www.trainingentry.net/efilmgroup/index.

To learn = how Online Training can be incorporated into your organization, view this = 25-minute webinar at http://www.masterytech.com/demos/webinar-safety-ma= stery/index.htm.

 =

Richard Cohen

Vice President, Distribution =

EMERGENCY FILM = GROUP

P.O. BOX 1928

140 COOKE STREET

EDGARTOWN, MA = 02539

800-842-0999=

(www.efilmgroup.com)=

 =

 

  



 

This message was sent from Emergency Film = Group, 140 Cooke St., Edgartown, MA 02539. To unsubscribe, please reply with “unsubscribe” in the = subject line.

 

 

 

No virus found in this incoming = message.
Checked by AVG - www.avg.com
Version: 8.5.339 / Virus Database: 270.12.48/2147 - Release Date: = 06/01/09 06:09:00

No virus found in this incoming = message.
Checked by AVG - www.avg.com
Version: 8.5.339 / Virus Database: 270.12.50/2150 - Release Date: = 06/02/09 06:47:00

------=_NextPart_000_0157_01C9E453.957E7140-- From sandeen@redhat.com Wed Jun 3 13:47:13 2009 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,URIBL_BLACK autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n53IlCpd189542 for ; Wed, 3 Jun 2009 13:47:13 -0500 X-ASG-Debug-ID: 1244054849-216502520000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mx2.redhat.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 6D8572CD5CF for ; Wed, 3 Jun 2009 11:47:29 -0700 (PDT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by cuda.sgi.com with ESMTP id meBlWQ0EgtuQntWn for ; Wed, 03 Jun 2009 11:47:29 -0700 (PDT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n53IlTBG017019 for ; Wed, 3 Jun 2009 14:47:29 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n53IlS44018252 for ; Wed, 3 Jun 2009 14:47:28 -0400 Received: from neon.msp.redhat.com (neon.msp.redhat.com [10.15.80.10]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n53IlR9K030330 for ; Wed, 3 Jun 2009 14:47:27 -0400 Message-ID: <4A26C53F.5080105@redhat.com> Date: Wed, 03 Jun 2009 13:47:27 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: xfs mailing list X-ASG-Orig-Subj: [PATCH] xfstests: Check for xlog_assign_lsn in xfs headers Subject: [PATCH] xfstests: Check for xlog_assign_lsn in xfs headers Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-Barracuda-Connect: mx2.redhat.com[66.187.237.31] X-Barracuda-Start-Time: 1244054850 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.27491 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Check for xlog_assign_lsn in xfs headers Checking for libxfs.h isn't enough; some debian installs have libxfs.h but no xlog_assign_lsn, and the loggen build still fails. Signed-off-by: Eric Sandeen Tested-by: Aneesh Kumar K.V --- diff --git a/aclocal.m4 b/aclocal.m4 index ac616d1..8a61e39 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -421,6 +421,13 @@ AC_DEFUN([AC_PACKAGE_WANT_XFS_LIBXFS_H], AC_SUBST(have_libxfs) ]) +AC_DEFUN([AC_PACKAGE_WANT_XLOG_ASSIGN_LSN], + [ + AC_CHECK_DECL(xlog_assign_lsn, + [ have_xlog_assign_lsn=true ], [ have_xlog_assign_lsn=false ], + [[#include ]]) + ]) + AC_DEFUN([AC_PACKAGE_NEED_XFS_XQM_H], [ AC_CHECK_HEADERS([xfs/xqm.h]) if test "$ac_cv_header_xfs_xqm_h" != "yes"; then diff --git a/configure.in b/configure.in index 210a91e..6c2afe7 100644 --- a/configure.in +++ b/configure.in @@ -46,6 +46,7 @@ in AC_MULTILIB($enable_lib64) AC_PACKAGE_NEED_XFS_XFS_H AC_PACKAGE_WANT_XFS_LIBXFS_H + AC_PACKAGE_WANT_XLOG_ASSIGN_LSN AC_PACKAGE_NEED_XFS_XQM_H AC_PACKAGE_NEED_XFSCTL_MACRO AC_PACKAGE_NEED_XFS_HANDLE_H diff --git a/include/builddefs.in b/include/builddefs.in index e8f4b6b..7827ed5 100644 --- a/include/builddefs.in +++ b/include/builddefs.in @@ -15,6 +15,7 @@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ HAVE_LIBXFS = @have_libxfs@ +HAVE_XLOG_ASSIGN_LSN = @have_xlog_assign_lsn@ LIBXFS = @libxfs@ LIBACL = @libacl@ LIBATTR = @libattr@ diff --git a/m4/package_xfslibs.m4 b/m4/package_xfslibs.m4 index 903e4a7..870882f 100644 --- a/m4/package_xfslibs.m4 +++ b/m4/package_xfslibs.m4 @@ -13,6 +13,14 @@ AC_DEFUN([AC_PACKAGE_WANT_LIBXFS_H], AC_SUBST(have_libxfs) ]) +AC_DEFUN([AC_PACKAGE_WANT_XLOG_ASSIGN_LSN], + [ + AC_CHECK_DECL(xlog_assign_lsn, + [ have_xlog_assign_lsn=true ], [ have_xlog_assign_lsn=false ], + [[#include ]]) + AC_SUBST(have_have_xlog_assign_lsn) + ]) + AC_DEFUN([AC_PACKAGE_NEED_XFS_XQM_H], [ AC_CHECK_HEADERS([xfs/xqm.h]) if test "$ac_cv_header_xfs_xqm_h" != "yes"; then diff --git a/src/Makefile b/src/Makefile index 515e16e..7b01754 100644 --- a/src/Makefile +++ b/src/Makefile @@ -17,7 +17,7 @@ LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize \ fs_perms testx looptest locktest unwritten_mmap \ bulkstat_unlink_test bulkstat_unlink_test_modified t_dir_offset -ifeq ($(HAVE_LIBXFS), true) +ifeq ($(HAVE_XLOG_ASSIGN_LSN), true) LINUX_TARGETS += loggen endif From BATV+ac29816878cb286aebda+2110+infradead.org+hch@bombadil.srs.infradead.org Wed Jun 3 14:35:37 2009 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 (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n53JZa6q191503 for ; Wed, 3 Jun 2009 14:35:37 -0500 X-ASG-Debug-ID: 1244057754-4e1301ef0000-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 D47452CCF99 for ; Wed, 3 Jun 2009 12:35:54 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id OKg4N2vj6ueqZBEx for ; Wed, 03 Jun 2009 12:35:54 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MBwFe-0003uq-FO; Wed, 03 Jun 2009 19:35:54 +0000 Date: Wed, 3 Jun 2009 15:35:54 -0400 From: Christoph Hellwig To: Eric Sandeen Cc: xfs mailing list X-ASG-Orig-Subj: Re: [PATCH] xfstests: don't run 122 if required headers aren't found Subject: Re: [PATCH] xfstests: don't run 122 if required headers aren't found Message-ID: <20090603193554.GA4516@infradead.org> References: <4A26B016.2080108@redhat.com> <20090603175103.GA4538@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090603175103.GA4538@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: 1244057754 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Wed, Jun 03, 2009 at 01:51:03PM -0400, Christoph Hellwig wrote: > On Wed, Jun 03, 2009 at 12:17:10PM -0500, Eric Sandeen wrote: > > Now that libxfs etc is optional, 122 (which compiles on the fly) > > is failing if those extra headers are missing. > > Oh, the great 122 tests. Indeed without all the headers defining > the structures we can't actually check their size. > > > Signed-off-by: Christoph Hellwig Umm, should be: Reviewed-by: Christoph Hellwig From BATV+ac29816878cb286aebda+2110+infradead.org+hch@bombadil.srs.infradead.org Wed Jun 3 14:38:30 2009 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 (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n53JcS0t191661 for ; Wed, 3 Jun 2009 14:38:30 -0500 X-ASG-Debug-ID: 1244057926-3f3303090000-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 88D0C2CD52E for ; Wed, 3 Jun 2009 12:38:46 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id 0zzcosYGkSo20w9N for ; Wed, 03 Jun 2009 12:38:46 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MBwIQ-0004t3-4Z; Wed, 03 Jun 2009 19:38:46 +0000 Date: Wed, 3 Jun 2009 15:38:46 -0400 From: Christoph Hellwig To: Eric Sandeen Cc: xfs mailing list X-ASG-Orig-Subj: Re: [PATCH V3] xfstests: add aio-dio-regress tests Subject: Re: [PATCH V3] xfstests: add aio-dio-regress tests Message-ID: <20090603193845.GB4516@infradead.org> References: <4A255E80.9000209@sandeen.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A255E80.9000209@sandeen.net> 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: 1244057926 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Tue, Jun 02, 2009 at 12:16:48PM -0500, Eric Sandeen wrote: > +AIO_TEST=aio-dio-extend-stat > + > +rm -f $TEST_DIR/aio-testfile > +echo "==${AIO_TEST}==" > +src/aio-dio-regress/$AIO_TEST $TEST_DIR/aio-testfile 2>&1 the AIO_TEST variable seems superflous in all these tests. Also the echo isn't really strictly needed if only running one thing anyway. Modulo these nitpicks looks good to me, Reviewed-by: Christoph Hellwig From BATV+ac29816878cb286aebda+2110+infradead.org+hch@bombadil.srs.infradead.org Wed Jun 3 14:43:37 2009 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 (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n53Jha2d191938 for ; Wed, 3 Jun 2009 14:43:37 -0500 X-ASG-Debug-ID: 1244058628-3cb5029f0000-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 3D93B102FCC8 for ; Wed, 3 Jun 2009 12:50:28 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id 0e0sn110Oli3wE86 for ; Wed, 03 Jun 2009 12:50:28 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MBwNK-0001az-H6; Wed, 03 Jun 2009 19:43:50 +0000 Date: Wed, 3 Jun 2009 15:43:50 -0400 From: Christoph Hellwig To: Eric Sandeen Cc: xfs mailing list X-ASG-Orig-Subj: Re: [PATCH] xfstests: Check for xlog_assign_lsn in xfs headers Subject: Re: [PATCH] xfstests: Check for xlog_assign_lsn in xfs headers Message-ID: <20090603194350.GA5313@infradead.org> References: <4A26C53F.5080105@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A26C53F.5080105@redhat.com> 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: 1244058629 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Wed, Jun 03, 2009 at 01:47:27PM -0500, Eric Sandeen wrote: > Check for xlog_assign_lsn in xfs headers > > Checking for libxfs.h isn't enough; some debian installs > have libxfs.h but no xlog_assign_lsn, and the loggen build still > fails. > > Signed-off-by: Eric Sandeen > Tested-by: Aneesh Kumar K.V I don't actually have a box with an old enough libxfs.h, but the test looks sane to me. Reviewed-by: Christoph Hellwig From rherndon@sgi.com Wed Jun 3 15:00:54 2009 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 relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n53K0rFp192774 for ; Wed, 3 Jun 2009 15:00:54 -0500 Received: from attica.americas.sgi.com (attica.americas.sgi.com [128.162.236.44]) by relay2.corp.sgi.com (Postfix) with ESMTP id 029DA30407A; Wed, 3 Jun 2009 13:01:09 -0700 (PDT) Received: by attica.americas.sgi.com (Postfix, from userid 105247) id 4033BA0A6D48; Wed, 3 Jun 2009 15:01:08 -0500 (CDT) From: Robert Herndon To: xfs@oss.sgi.com Cc: Robert Herndon Subject: [PATCH] xfsprogs: add -x flags to include/install-sh Date: Wed, 3 Jun 2009 15:01:08 -0500 Message-Id: <1244059268-2135-1-git-send-email-rherndon@sgi.com> X-Mailer: git-send-email 1.5.4.rc3 X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Signed-off-by: Robert Herndon --- 0 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 include/install-sh diff --git a/include/install-sh b/include/install-sh old mode 100644 new mode 100755 -- 1.5.6 From sandeen@sandeen.net Wed Jun 3 15:46:11 2009 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_43, J_CHICKENPOX_54,J_CHICKENPOX_64,J_CHICKENPOX_92,URIBL_BLACK autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n53KkAmO194761 for ; Wed, 3 Jun 2009 15:46:10 -0500 X-ASG-Debug-ID: 1244061987-133101100000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mx2.redhat.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id B05AB2CDE0C for ; Wed, 3 Jun 2009 13:46:27 -0700 (PDT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by cuda.sgi.com with ESMTP id rKQyaV3ETpFLCS4u for ; Wed, 03 Jun 2009 13:46:27 -0700 (PDT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n53KkQPs029507 for ; Wed, 3 Jun 2009 16:46:26 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n53KkPiE023907 for ; Wed, 3 Jun 2009 16:46:25 -0400 Received: from neon.msp.redhat.com (neon.msp.redhat.com [10.15.80.10]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n53KkNAX019974 for ; Wed, 3 Jun 2009 16:46:23 -0400 Message-ID: <4A26E11F.2080103@sandeen.net> Date: Wed, 03 Jun 2009 15:46:23 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: xfs mailing list X-ASG-Orig-Subj: Re: [PATCH, RFC] xfstests: random fallocate calls in fsx Subject: Re: [PATCH, RFC] xfstests: random fallocate calls in fsx References: <4A0B420E.3070908@sandeen.net> In-Reply-To: <4A0B420E.3070908@sandeen.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-Barracuda-Connect: mx2.redhat.com[66.187.237.31] X-Barracuda-Start-Time: 1244061987 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: -1.42 X-Barracuda-Spam-Status: No, SCORE=-1.42 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=COMMA_SUBJECT X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.27492 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.60 COMMA_SUBJECT Subject is like 'Re: FDSDS, this is a subject' X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Eric Sandeen wrote: > Seems to work for me. Any comments/suggestions? > > I can probably make it fall back to the xfs ioctl if fallocate > isn't supported, if strongly desired. ping? -Eric > diff --git a/aclocal.m4 b/aclocal.m4 > index 52f1c7d..120c1e0 100644 > --- a/aclocal.m4 > +++ b/aclocal.m4 > @@ -511,3 +511,14 @@ AC_DEFUN([AC_PACKAGE_NEED_XFSCTL_MACRO], > ]) > ]) > > +AC_DEFUN([AC_PACKAGE_WANT_FALLOCATE], > + [ AC_MSG_CHECKING([for fallocate]) > + AC_TRY_COMPILE([ > +#include > + ], [ > + fallocate(0, 0, 0, 0); > + ], have_fallocate=true > + AC_MSG_RESULT(true), > + AC_MSG_RESULT(false)) > + AC_SUBST(have_fallocate) > + ]) > diff --git a/configure.in b/configure.in > index 32a2496..61adac7 100644 > --- a/configure.in > +++ b/configure.in > @@ -62,6 +62,7 @@ in > AC_PACKAGE_WANT_GDBM > AC_PACKAGE_WANT_AIO > AC_PACKAGE_WANT_DMAPI > + AC_PACKAGE_WANT_FALLOCATE > ;; > esac > > diff --git a/include/builddefs.in b/include/builddefs.in > index 636f632..6a51b99 100644 > --- a/include/builddefs.in > +++ b/include/builddefs.in > @@ -56,6 +56,7 @@ RPM_VERSION = @rpm_version@ > ENABLE_SHARED = @enable_shared@ > HAVE_DB = @have_db@ > HAVE_AIO = @have_aio@ > +HAVE_FALLOCATE = @have_fallocate@ > HAVE_DMAPI = @have_dmapi@ > HAVE_ATTR_LIST = @have_attr_list@ > > diff --git a/ltp/Makefile b/ltp/Makefile > index bcdac84..3b81101 100644 > --- a/ltp/Makefile > +++ b/ltp/Makefile > @@ -25,6 +25,10 @@ LCFLAGS += -DAIO > LIBAIO = -laio -lpthread > endif > > +ifeq ($(HAVE_FALLOCATE), true) > +LCFLAGS += -DFALLOCATE > +endif > + > default: $(TARGETS) > > include $(BUILDRULES) > diff --git a/ltp/fsx.c b/ltp/fsx.c > index e4c528d..fe01f6e 100644 > --- a/ltp/fsx.c > +++ b/ltp/fsx.c > @@ -32,6 +32,9 @@ > #ifdef AIO > #include > #endif > +#ifdef FALLOCATE > +#include > +#endif > > #ifndef MAP_FILE > # define MAP_FILE 0 > @@ -65,6 +68,7 @@ int logcount = 0; /* total ops */ > #define OP_MAPREAD 5 > #define OP_MAPWRITE 6 > #define OP_SKIPPED 7 > +#define OP_FALLOCATE 8 > > #undef PAGE_SIZE > #define PAGE_SIZE getpagesize() > @@ -105,6 +109,11 @@ long numops = -1; /* -N flag */ > int randomoplen = 1; /* -O flag disables it */ > int seed = 1; /* -S flag */ > int mapped_writes = 1; /* -W flag disables */ > +#ifdef FALLOCATE > +int fallocate_calls = 1; /* -F flag disables */ > +#else > +int fallocate_calls = 0; /* -F flag disables */ > +#endif > int mapped_reads = 1; /* -R flag disables it */ > int fsxgoodfd = 0; > int o_direct; /* -Z */ > @@ -202,6 +211,7 @@ logdump(void) > { > int i, count, down; > struct log_entry *lp; > + char *falloc_type[3] = {"PAST_EOF", "EXTENDING", "INTERIOR"}; > > prt("LOG DUMP (%d total operations):\n", logcount); > if (logcount < LOGSIZE) { > @@ -265,6 +275,14 @@ logdump(void) > badoff < lp->args[!!down]) > prt("\t******WWWW"); > break; > + case OP_FALLOCATE: > + /* 0: offset 1: length 2: where alloced */ > + prt("FALLOCATE %s\tfrom 0x%x to 0x%x", > + falloc_type[lp->args[2]], lp->args[0], lp->args[0] + lp->args[1]); > + if (badoff >= lp->args[0] && > + badoff < lp->args[0] + lp->args[1]) > + prt("\t******FFFF"); > + break; > case OP_SKIPPED: > prt("SKIPPED (no operation)"); > break; > @@ -770,6 +788,64 @@ dotruncate(unsigned size) > } > } > > +#ifdef FALLOCATE > +/* fallocate is basically a no-op unless extending, then a lot like a truncate */ > +void > +dofallocate(unsigned offset, unsigned length) > +{ > + unsigned end_offset; > + int keep_size; > + > + if (length == 0) { > + if (!quiet && testcalls > simulatedopcount) > + prt("skipping zero length fallocate\n"); > + log4(OP_SKIPPED, OP_FALLOCATE, offset, length); > + return; > + } > + > + keep_size = random() % 2; > + > + end_offset = keep_size ? 0 : offset + length; > + > + if (end_offset > biggest) { > + biggest = end_offset; > + if (!quiet && testcalls > simulatedopcount) > + prt("fallocating to largest ever: 0x%x\n", end_offset); > + } > + > + /* > + * last arg: > + * 1: allocate past EOF > + * 2: extending prealloc > + * 3: interior prealloc > + */ > + log4(OP_FALLOCATE, offset, length, (end_offset > file_size) ? (keep_size ? 1 : 2) : 3); > + > + if (end_offset > file_size) { > + memset(good_buf + file_size, '\0', end_offset - file_size); > + file_size = end_offset; > + } > + > + if (testcalls <= simulatedopcount) > + return; > + > + if ((progressinterval && testcalls % progressinterval == 0) || > + (debug && (monitorstart == -1 || monitorend == -1 || > + end_offset <= monitorend))) > + prt("%lu falloc\tfrom 0x%x to 0x%x\n", testcalls, offset, length); > + if (fallocate(fd, keep_size ? FALLOC_FL_KEEP_SIZE : 0, (loff_t)offset, (loff_t)length) == -1) { > + prt("fallocate: %x to %x\n", offset, length); > + prterr("dofallocate: fallocate"); > + report_failure(161); > + } > +} > +#else > +void > +dofallocate(unsigned offset, unsigned length) > +{ > + return; > +} > +#endif > > void > writefileimage() > @@ -823,7 +899,7 @@ test(void) > unsigned long offset; > unsigned long size = maxoplen; > unsigned long rv = random(); > - unsigned long op = rv % (3 + !lite + mapped_writes); > + unsigned long op = rv % (3 + !lite + mapped_writes + fallocate_calls); > > /* turn off the map read if necessary */ > > @@ -845,22 +921,33 @@ test(void) > prt("%lu...\n", testcalls); > > /* > - * READ: op = 0 > - * WRITE: op = 1 > - * MAPREAD: op = 2 > - * TRUNCATE: op = 3 > - * MAPWRITE: op = 3 or 4 > + * lite !lite > + * READ: op = 0 0 > + * WRITE: op = 1 1 > + * MAPREAD: op = 2 2 > + * TRUNCATE: op = - 3 > + * MAPWRITE: op = 3 4 > + * FALLOCATE: op = - 5 > */ > if (lite ? 0 : op == 3 && (style & 1) == 0) /* vanilla truncate? */ > dotruncate(random() % maxfilelen); > else { > if (randomoplen) > size = random() % (maxoplen+1); > + > + /* truncate */ > if (lite ? 0 : op == 3) > dotruncate(size); > else { > offset = random(); > - if (op == 1 || op == (lite ? 3 : 4)) { > + /* fallocate */ > + if (op == 5) { > + offset %= maxfilelen; > + if (offset + size > maxfilelen) > + size = maxfilelen - offset; > + dofallocate(offset, size); > + /* write / mapwrite */ > + } else if (op == 1 || op == (lite ? 3 : 4)) { > offset %= maxfilelen; > if (offset + size > maxfilelen) > size = maxfilelen - offset; > @@ -868,6 +955,7 @@ test(void) > domapwrite(offset, size); > else > dowrite(offset, size); > + /* read / mapread */ > } else { > if (file_size) > offset %= file_size; > @@ -904,7 +992,7 @@ void > usage(void) > { > fprintf(stdout, "usage: %s", > - "fsx [-dnqxALOWZ] [-b opnum] [-c Prob] [-l flen] [-m start:end] [-o oplen] [-p progressinterval] [-r readbdy] [-s style] [-t truncbdy] [-w writebdy] [-D startingop] [-N numops] [-P dirpath] [-S seed] fname\n\ > + "fsx [-dnqxAFLOWZ] [-b opnum] [-c Prob] [-l flen] [-m start:end] [-o oplen] [-p progressinterval] [-r readbdy] [-s style] [-t truncbdy] [-w writebdy] [-D startingop] [-N numops] [-P dirpath] [-S seed] fname\n\ > -b opnum: beginning operation number (default 1)\n\ > -c P: 1 in P chance of file close+open at each op (default infinity)\n\ > -d: debug output for all operations\n\ > @@ -925,8 +1013,11 @@ usage(void) > #ifdef AIO > " -A: Use the AIO system calls\n" > #endif > -" -D startingop: debug output starting at specified operation\n\ > - -L: fsxLite - no file creations & no file size changes\n\ > +" -D startingop: debug output starting at specified operation\n" > +#ifdef FALLOCATE > +" -F: Do not use fallocate (preallocation) calls\n" > +#endif > +" -L: fsxLite - no file creations & no file size changes\n\ > -N numops: total # operations to do (default infinity)\n\ > -O: use oplen (see -o flag) for every op (default random)\n\ > -P: save .fsxlog and .fsxgood files in dirpath (default ./)\n\ > @@ -1092,7 +1183,7 @@ main(int argc, char **argv) > > setvbuf(stdout, (char *)0, _IOLBF, 0); /* line buffered stdout */ > > - while ((ch = getopt(argc, argv, "b:c:dfl:m:no:p:qr:s:t:w:xyAD:LN:OP:RS:WZ")) > + while ((ch = getopt(argc, argv, "b:c:dfl:m:no:p:qr:s:t:w:xyAD:FLN:OP:RS:WZ")) > != EOF) > switch (ch) { > case 'b': > @@ -1186,6 +1277,9 @@ main(int argc, char **argv) > if (debugstart < 1) > usage(); > break; > + case 'F': > + fallocate_calls = 0; > + break; > case 'L': > lite = 1; > break; > @@ -1331,6 +1425,16 @@ main(int argc, char **argv) > } else > check_trunc_hack(); > > +#ifdef FALLOCATE > + if (!lite && fallocate_calls) { > + if (fallocate(fd, 0, 0, 1) && errno == EOPNOTSUPP) { > + warn("main: filesystem does not support fallocate, disabling"); > + fallocate_calls = 0; > + } else > + ftruncate(fd, 0); > + } > +#endif > + > while (numops == -1 || numops--) > test(); > > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs > From sandeen@sandeen.net Wed Jun 3 17:01:09 2009 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_72 autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n53M186P197953 for ; Wed, 3 Jun 2009 17:01:08 -0500 X-ASG-Debug-ID: 1244066485-5c3a01670000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mx2.redhat.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 626362BEF97 for ; Wed, 3 Jun 2009 15:01:25 -0700 (PDT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by cuda.sgi.com with ESMTP id SEaN4g5FHZeWE64G for ; Wed, 03 Jun 2009 15:01:25 -0700 (PDT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n53M1Gox022509; Wed, 3 Jun 2009 18:01:16 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n53M1EVR012909; Wed, 3 Jun 2009 18:01:15 -0400 Received: from neon.msp.redhat.com (neon.msp.redhat.com [10.15.80.10]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n53M1Dib032761; Wed, 3 Jun 2009 18:01:13 -0400 Message-ID: <4A26F2A9.8050300@sandeen.net> Date: Wed, 03 Jun 2009 17:01:13 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Christoph Hellwig CC: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 5/7] xfs: introduce a per-ag inode iterator Subject: Re: [PATCH 5/7] xfs: introduce a per-ag inode iterator References: <20090514171233.942489000@bombadil.infradead.org> <20090514171558.869514000@bombadil.infradead.org> In-Reply-To: <20090514171558.869514000@bombadil.infradead.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-Barracuda-Connect: mx2.redhat.com[66.187.237.31] X-Barracuda-Start-Time: 1244066486 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.2.13 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Christoph Hellwig wrote: > From: Dave Chinner > > Given that we walk across the per-ag inode lists so often, it makes sense to > introduce an iterator for this. > > Convert the sync and reclaim code to use this new iterator, quota code will > follow in the next patch. > > [hch: merged the lookup and execute callbacks back into one to get the > pag_ici_lock locking correct and simplify the code flow] > > Signed-off-by: Dave Chinner > Signed-off-by: Christoph Hellwig Somehow I'm finding this hard to review, but... > Index: xfs/fs/xfs/linux-2.6/xfs_sync.c > =================================================================== > --- xfs.orig/fs/xfs/linux-2.6/xfs_sync.c 2009-05-14 16:20:37.012658983 +0200 > +++ xfs/fs/xfs/linux-2.6/xfs_sync.c 2009-05-14 16:22:26.321659103 +0200 ... > +STATIC int > +xfs_inode_ag_walk( > + struct xfs_mount *mp, > + xfs_agnumber_t ag, > + int (*execute)(struct xfs_inode *ip, > + struct xfs_perag *pag, int flags), > + int flags, > + int tag) > +{ > + struct xfs_perag *pag = &mp->m_perag[ag]; > + uint32_t first_index; > + int last_error = 0; > + int skipped; > + > +restart: > + skipped = 0; > + first_index = 0; > + do { > + int error = 0; > + xfs_inode_t *ip; > + > + ip = xfs_inode_ag_lookup(mp, pag, &first_index, tag); > + if (!ip) > + break; > + > + error = execute(ip, pag, flags); > + if (error == EAGAIN) { > + skipped++; > + continue; > + } > + if (error) > + last_error = error; > + /* > + * bail out if the filesystem is corrupted. > + */ > + if (error == EFSCORRUPTED) > + break; Ok so here we are looking for EFSCORRUPTED from the "execute" function. This might be xfs_sync_inode_data, xfs_sync_inode_attr, or xfs_reclaim_inode_now. But ... > + > + } while (1); ... > @@ -85,12 +201,17 @@ xfs_sync_inode_valid( > STATIC int > xfs_sync_inode_data( > struct xfs_inode *ip, > + struct xfs_perag *pag, > int flags) > { > struct inode *inode = VFS_I(ip); > struct address_space *mapping = inode->i_mapping; > int error = 0; > > + error = xfs_sync_inode_valid(ip, pag); > + if (error) > + return 0;xfs_sync_inode_attr( > + xfs_sync_inode_valid can return 0, ENOENT, or EFSCORRUPTED. Aren't we losing the error here... > if (mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) { > if (!xfs_ilock_nowait(ip, XFS_IOLOCK_SHARED)) { > if (flags & SYNC_TRYLOCK) > @@ -106,16 +227,22 @@ xfs_sync_inode_data( > out_wait: > if (flags & SYNC_IOWAIT) > xfs_ioend_wait(ip); > + IRELE(ip); > return error; > } > > STATIC int > xfs_sync_inode_attr( > struct xfs_inode *ip, > + struct xfs_perag *pag, > int flags) > { > int error = 0; > > + error = xfs_sync_inode_valid(ip, pag); > + if (error) > + return 0; and here? so xfs_sync_inode_data / xfs_sync_inode_attr are the "execute" in xfs_inode_ag_walk(): > + error = execute(ip, pag, flags); > + if (error == EAGAIN) { > + skipped++; > + continue; > + } > + if (error) > + last_error = error; above, and I think they're ignoring the return from xfs_sync_inode_valid(), therefore xfs_inode_ag_walk won't see EFSCORRUPTED from it either ... right? -Eric From sandeen@sandeen.net Wed Jun 3 17:18:26 2009 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_72 autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n53MIQJC198814 for ; Wed, 3 Jun 2009 17:18:26 -0500 X-ASG-Debug-ID: 1244067523-16d302300000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mx2.redhat.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id E04AB1BC9054 for ; Wed, 3 Jun 2009 15:18:43 -0700 (PDT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by cuda.sgi.com with ESMTP id gsbRePDjUOqin3kt for ; Wed, 03 Jun 2009 15:18:43 -0700 (PDT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n53MIXbb029210; Wed, 3 Jun 2009 18:18:33 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n53MIQ8m017972; Wed, 3 Jun 2009 18:18:31 -0400 Received: from neon.msp.redhat.com (neon.msp.redhat.com [10.15.80.10]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n53MIPGw003417; Wed, 3 Jun 2009 18:18:26 -0400 Message-ID: <4A26F6B1.20509@sandeen.net> Date: Wed, 03 Jun 2009 17:18:25 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Christoph Hellwig CC: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 5/7] xfs: introduce a per-ag inode iterator Subject: Re: [PATCH 5/7] xfs: introduce a per-ag inode iterator References: <20090514171233.942489000@bombadil.infradead.org> <20090514171558.869514000@bombadil.infradead.org> In-Reply-To: <20090514171558.869514000@bombadil.infradead.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-Barracuda-Connect: mx2.redhat.com[66.187.237.31] X-Barracuda-Start-Time: 1244067523 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.2.13 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Christoph Hellwig wrote: > From: Dave Chinner > > Given that we walk across the per-ag inode lists so often, it makes sense to > introduce an iterator for this. > > Convert the sync and reclaim code to use this new iterator, quota code will > follow in the next patch. > > [hch: merged the lookup and execute callbacks back into one to get the > pag_ici_lock locking correct and simplify the code flow] > > Signed-off-by: Dave Chinner > Signed-off-by: Christoph Hellwig And a similar error handling question... > Index: xfs/fs/xfs/linux-2.6/xfs_sync.c > =================================================================== > --- xfs.orig/fs/xfs/linux-2.6/xfs_sync.c 2009-05-14 16:20:37.012658983 +0200 > +++ xfs/fs/xfs/linux-2.6/xfs_sync.c 2009-05-14 16:22:26.321659103 +0200 ... > +STATIC int > +xfs_inode_ag_walk( > + struct xfs_mount *mp, > + xfs_agnumber_t ag, > + int (*execute)(struct xfs_inode *ip, > + struct xfs_perag *pag, int flags), > + int flags, > + int tag) > +{ > + struct xfs_perag *pag = &mp->m_perag[ag]; > + uint32_t first_index; > + int last_error = 0; > + int skipped; > + > +restart: > + skipped = 0; > + first_index = 0; > + do { > + int error = 0; > + xfs_inode_t *ip; > + > + ip = xfs_inode_ag_lookup(mp, pag, &first_index, tag); > + if (!ip) > + break; > + > + error = execute(ip, pag, flags); > + if (error == EAGAIN) { > + skipped++; > + continue; > + } Ok, it's looking for EAGAIN here, I'm assuming this is for when we are calling xfs_reclaim_inode_now, because... ... > -STATIC void > -xfs_reclaim_inodes_ag( > - xfs_mount_t *mp, > - int ag, > - int mode) > +STATIC int > +xfs_reclaim_inode_now( > + struct xfs_inode *ip, > + struct xfs_perag *pag, > + int flags) > { > - xfs_inode_t *ip = NULL; > - xfs_perag_t *pag = &mp->m_perag[ag]; > - int nr_found; > - uint32_t first_index; > - int skipped; > - > -restart: > - first_index = 0; > - skipped = 0; > - do { ... > - > - /* > - * hmmm - this is an inode already in reclaim. Do > - * we even bother catching it here? > - */ > - if (xfs_reclaim_inode(ip, 0, mode)) > - skipped++; > - } while (nr_found); ... because before, that's what we did above, after testing for a non-0 return from xfs_reclaim_inode. But xfs_reclaim_inode_now() returns 0 or the result of xfs_reclaim_inode, which is 0/1, so above: > + error = execute(ip, pag, flags); > + if (error == EAGAIN) { > + skipped++; > + continue; > + } isn't going to see EAGAIN from xfs_reclaim_inode_now... am I following this right? -Eric From jeffpc@josefsipek.net Wed Jun 3 18:19:31 2009 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.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n53NJUvY201555 for ; Wed, 3 Jun 2009 18:19:31 -0500 X-ASG-Debug-ID: 1244071180-1a8f00780000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from josefsipek.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 95DDE121102A for ; Wed, 3 Jun 2009 16:19:40 -0700 (PDT) Received: from josefsipek.net (josefsipek.net [141.211.133.196]) by cuda.sgi.com with ESMTP id 4YOjIooJFqWjvZBC for ; Wed, 03 Jun 2009 16:19:40 -0700 (PDT) Received: by josefsipek.net (Postfix, from userid 1000) id 3BDA11C00DCC; Wed, 3 Jun 2009 19:19:39 -0400 (EDT) Date: Wed, 3 Jun 2009 19:19:39 -0400 From: "Josef 'Jeff' Sipek" To: Eric Sandeen Cc: xfs mailing list X-ASG-Orig-Subj: Re: [PATCH, RFC] xfstests: random fallocate calls in fsx Subject: Re: [PATCH, RFC] xfstests: random fallocate calls in fsx Message-ID: <20090603231939.GA9167@josefsipek.net> References: <4A0B420E.3070908@sandeen.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A0B420E.3070908@sandeen.net> User-Agent: Mutt/1.5.18 (2008-05-17) X-Barracuda-Connect: josefsipek.net[141.211.133.196] X-Barracuda-Start-Time: 1244071180 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: -1.42 X-Barracuda-Spam-Status: No, SCORE=-1.42 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=COMMA_SUBJECT X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.18 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.60 COMMA_SUBJECT Subject is like 'Re: FDSDS, this is a subject' X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Good idea. On Wed, May 13, 2009 at 04:56:30PM -0500, Eric Sandeen wrote: > Seems to work for me. Any comments/suggestions? > > I can probably make it fall back to the xfs ioctl if fallocate > isn't supported, if strongly desired. Is the ioctl going away anytime soon? If not, it might be worth having fsx use _both_ if possible, or just the ioctl if fallocate doesn't seem to be available. > @@ -770,6 +788,64 @@ dotruncate(unsigned size) > } > } > > +#ifdef FALLOCATE > +/* fallocate is basically a no-op unless extending, then a lot like a truncate */ > +void > +dofallocate(unsigned offset, unsigned length) > +{ > + unsigned end_offset; > + int keep_size; > + > + if (length == 0) { > + if (!quiet && testcalls > simulatedopcount) > + prt("skipping zero length fallocate\n"); > + log4(OP_SKIPPED, OP_FALLOCATE, offset, length); > + return; > + } > + > + keep_size = random() % 2; > + > + end_offset = keep_size ? 0 : offset + length; I prefer seeing explicit ( ) in this case. ... -- Reality is merely an illusion, albeit a very persistent one. - Albert Einstein From jeffpc@josefsipek.net Wed Jun 3 18:25:48 2009 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.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n53NPmkL201795 for ; Wed, 3 Jun 2009 18:25:48 -0500 X-ASG-Debug-ID: 1244071565-0baa025b0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from josefsipek.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 9913B11934EC for ; Wed, 3 Jun 2009 16:26:05 -0700 (PDT) Received: from josefsipek.net (josefsipek.net [141.211.133.196]) by cuda.sgi.com with ESMTP id uTMkrasj77JokZfY for ; Wed, 03 Jun 2009 16:26:05 -0700 (PDT) Received: by josefsipek.net (Postfix, from userid 1000) id 3D12C1C00DCC; Wed, 3 Jun 2009 19:26:05 -0400 (EDT) Date: Wed, 3 Jun 2009 19:26:05 -0400 From: "Josef 'Jeff' Sipek" To: Christoph Hellwig Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 7/7] xfs: split xfs_sync_inodes Subject: Re: [PATCH 7/7] xfs: split xfs_sync_inodes Message-ID: <20090603232605.GB9167@josefsipek.net> References: <20090514171233.942489000@bombadil.infradead.org> <20090514171559.231368000@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090514171559.231368000@bombadil.infradead.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Barracuda-Connect: josefsipek.net[141.211.133.196] X-Barracuda-Start-Time: 1244071565 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: -1.52 X-Barracuda-Spam-Status: No, SCORE=-1.52 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=BSF_RULE_7582B X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.18 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE_7582B Custom Rule 7582B X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Thu, May 14, 2009 at 01:12:40PM -0400, Christoph Hellwig wrote: > xfs_sync_inodes is used to write back either file data or inode metadata. > In generally we always do these separately, except for one fishy case in > xfs_fs_put_super that does both. So separate xfs_sync_inodes into > separate xfs_sync_data and xfs_sync_attr functions. In xfs_fs_put_super > we first call the data sync and then the attr sync as that was the previous > order. The moved log force in that path doesn't make a different because ^^^^^^^^^ Typo. > Index: xfs/fs/xfs/linux-2.6/xfs_super.c > =================================================================== > --- xfs.orig/fs/xfs/linux-2.6/xfs_super.c 2009-05-14 19:09:00.178792110 +0200 > +++ xfs/fs/xfs/linux-2.6/xfs_super.c 2009-05-14 19:09:05.278808755 +0200 > @@ -1070,7 +1070,18 @@ xfs_fs_put_super( > int unmount_event_flags = 0; > > xfs_syncd_stop(mp); > - xfs_sync_inodes(mp, SYNC_ATTR|SYNC_DELWRI); > + > + if (!(sb->s_flags & MS_RDONLY)) { > + /* > + * XXX(hch): this should be SYNC_WAIT. > + * > + * Or more likely no needed at all because the VFS is already ^^ Typo. -- Real Programmers consider "what you see is what you get" to be just as bad a concept in Text Editors as it is in women. No, the Real Programmer wants a "you asked for it, you got it" text editor -- complicated, cryptic, powerful, unforgiving, dangerous. From jeffpc@josefsipek.net Wed Jun 3 18:28:52 2009 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 (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n53NSquK201949 for ; Wed, 3 Jun 2009 18:28:52 -0500 X-ASG-Debug-ID: 1244072143-395d00f00000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from josefsipek.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 0D92810521C5 for ; Wed, 3 Jun 2009 16:35:43 -0700 (PDT) Received: from josefsipek.net (josefsipek.net [141.211.133.196]) by cuda.sgi.com with ESMTP id eJBGr7JU9nClVfnp for ; Wed, 03 Jun 2009 16:35:43 -0700 (PDT) Received: by josefsipek.net (Postfix, from userid 1000) id 2150C1C00DCC; Wed, 3 Jun 2009 19:29:07 -0400 (EDT) Date: Wed, 3 Jun 2009 19:29:07 -0400 From: "Josef 'Jeff' Sipek" To: Christoph Hellwig Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 6/7] xfs: use generic inode iterator in xfs_qm_dqrele_all_inodes Subject: Re: [PATCH 6/7] xfs: use generic inode iterator in xfs_qm_dqrele_all_inodes Message-ID: <20090603232907.GC9167@josefsipek.net> References: <20090514171233.942489000@bombadil.infradead.org> <20090514171559.029154000@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090514171559.029154000@bombadil.infradead.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Barracuda-Connect: josefsipek.net[141.211.133.196] X-Barracuda-Start-Time: 1244072145 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: -1.42 X-Barracuda-Spam-Status: No, SCORE=-1.42 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=MARKETING_SUBJECT X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.19 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.60 MARKETING_SUBJECT Subject contains popular marketing words X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Thu, May 14, 2009 at 01:12:39PM -0400, Christoph Hellwig wrote: > Use xfs_inode_ag_iterator instead of opencoding the inode walk in the > quota code. Mark xfs_inode_ag_iterator and xfs_sync_inode_valid non-static > to allow using them from the quota code. Nice cleanup. I don't see any problems with it. Jeff. -- Keyboard not found! Press F1 to enter Setup From jeffpc@josefsipek.net Wed Jun 3 18:30:31 2009 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 (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n53NUUbh202044 for ; Wed, 3 Jun 2009 18:30:30 -0500 X-ASG-Debug-ID: 1244072243-367701300000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from josefsipek.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 8135610522FC for ; Wed, 3 Jun 2009 16:37:23 -0700 (PDT) Received: from josefsipek.net (josefsipek.net [141.211.133.196]) by cuda.sgi.com with ESMTP id sTwwYQuDIEezvBzM for ; Wed, 03 Jun 2009 16:37:23 -0700 (PDT) Received: by josefsipek.net (Postfix, from userid 1000) id BB6D81C00DCC; Wed, 3 Jun 2009 19:30:47 -0400 (EDT) Date: Wed, 3 Jun 2009 19:30:47 -0400 From: "Josef 'Jeff' Sipek" To: Christoph Hellwig Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 8/7] xfs: remove SYNC_IOWAIT Subject: Re: [PATCH 8/7] xfs: remove SYNC_IOWAIT Message-ID: <20090603233047.GD9167@josefsipek.net> References: <20090514171233.942489000@bombadil.infradead.org> <20090528121915.GA30037@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090528121915.GA30037@infradead.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Barracuda-Connect: josefsipek.net[141.211.133.196] X-Barracuda-Start-Time: 1244072243 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.2.19 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Thu, May 28, 2009 at 08:19:16AM -0400, Christoph Hellwig wrote: > We want to wait for all I/O to finish when we do data integrity syncs. So > there is no reason to keep SYNC_WAIT separate from SYNC_IOWAIT. This > causes a little change in behaviour for the ENOSPC flushing code which no ^^ Typo, otherwise good. Jeff. -- My public GPG key can be found at http://www.josefsipek.net/gpg/public-0xC7958FFE.txt From SRS0+kQpQ+89+fromorbit.com=david@internode.on.net Thu Jun 4 04:15:45 2009 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.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n549FiGO232228 for ; Thu, 4 Jun 2009 04:15:45 -0500 X-ASG-Debug-ID: 1244106960-078700640000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail.internode.on.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id AD3701D3A9DA for ; Thu, 4 Jun 2009 02:16:00 -0700 (PDT) Received: from mail.internode.on.net (bld-mail19.adl2.internode.on.net [150.101.137.104]) by cuda.sgi.com with ESMTP id tohNKFugoU6rKIAt for ; Thu, 04 Jun 2009 02:16:00 -0700 (PDT) Received: from discord (unverified [121.44.1.36]) by mail.internode.on.net (SurgeMail 3.8f2) with ESMTP id 530899-1927428 for ; Thu, 04 Jun 2009 18:45:59 +0930 (CST) Received: from dave by discord with local (Exim 4.69) (envelope-from ) id 1MC93G-0006ol-3s for xfs@oss.sgi.com; Thu, 04 Jun 2009 19:15:58 +1000 Date: Thu, 4 Jun 2009 19:15:58 +1000 From: Dave Chinner To: xfs@oss.sgi.com X-ASG-Orig-Subj: [PATCH] [XFSQA] Add license boilerplate to 205 Subject: [PATCH] [XFSQA] Add license boilerplate to 205 Message-ID: <20090604091558.GS16929@discord.disaster> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Barracuda-Connect: bld-mail19.adl2.internode.on.net[150.101.137.104] X-Barracuda-Start-Time: 1244106961 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.2.21 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean [XFSQA] Add license boilerplate to 205 Signed-off-by: Dave Chinner --- 205 | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/205 b/205 index 502adc7..c85e102 100755 --- a/205 +++ b/205 @@ -5,6 +5,19 @@ # #----------------------------------------------------------------------- # Copyright (c) 2009 Dave Chinner +# +# 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 #----------------------------------------------------------------------- # # creator From SRS0+jKn/+89+fromorbit.com=david@internode.on.net Thu Jun 4 04:23:17 2009 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 (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n549NG9D232558 for ; Thu, 4 Jun 2009 04:23:16 -0500 X-ASG-Debug-ID: 1244107412-544300a30000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail.internode.on.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id AE2F62CFE08 for ; Thu, 4 Jun 2009 02:23:33 -0700 (PDT) Received: from mail.internode.on.net (bld-mail18.adl2.internode.on.net [150.101.137.103]) by cuda.sgi.com with ESMTP id vXyPYxGQa2ywTcoB for ; Thu, 04 Jun 2009 02:23:33 -0700 (PDT) Received: from discord (unverified [121.44.1.36]) by mail.internode.on.net (SurgeMail 3.8f2) with ESMTP id 538880-1927428 for multiple; Thu, 04 Jun 2009 18:53:32 +1030 (CDT) Received: from dave by discord with local (Exim 4.69) (envelope-from ) id 1MC9AY-0006p4-Tk; Thu, 04 Jun 2009 19:23:30 +1000 Date: Thu, 4 Jun 2009 19:23:30 +1000 From: Dave Chinner To: Alexander Beregalov Cc: Kernel Testers List , xfs@oss.sgi.com X-ASG-Orig-Subj: Re: 2.6.30-rc6: BUG at fs/xfs/support/debug.c:109! Subject: Re: 2.6.30-rc6: BUG at fs/xfs/support/debug.c:109! Message-ID: <20090604092330.GT16929@discord.disaster> 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-Barracuda-Connect: bld-mail18.adl2.internode.on.net[150.101.137.103] X-Barracuda-Start-Time: 1244107414 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.2.21 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Mon, Jun 01, 2009 at 07:22:56PM +0400, Alexander Beregalov wrote: > Hi > > Assertion failed: *nmap >= 1, file: fs/xfs/xfs_bmap.c, line: 4846 ..... > Call Trace: > [] xfs_bmapi+0xad/0x1ad0 > [] xfs_dir2_leaf_getdents+0x640/0x7b0 > [] xfs_readdir+0x12c/0x140 > [] xfs_file_readdir+0x47/0x70 > [] vfs_readdir+0xd0/0xf0 > [] sys_getdents+0x96/0x110 > [] system_call_fastpath+0x16/0x1b I'd say this indicates a corrupted directory. Can you run 'xfs_repair -n' over the filesystem and see if it finds a bad directory? Cheers, Dave. -- Dave Chinner david@fromorbit.com From SRS0+9w2/+89+fromorbit.com=david@internode.on.net Thu Jun 4 04:45:04 2009 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 (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n549j3pj233848 for ; Thu, 4 Jun 2009 04:45:04 -0500 X-ASG-Debug-ID: 1244109116-3c43033f0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail.internode.on.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 48C361053373 for ; Thu, 4 Jun 2009 02:51:57 -0700 (PDT) Received: from mail.internode.on.net (bld-mail13.adl6.internode.on.net [150.101.137.98]) by cuda.sgi.com with ESMTP id Z3wbhHZS4GvkOJKt for ; Thu, 04 Jun 2009 02:51:57 -0700 (PDT) Received: from discord (unverified [121.44.1.36]) by mail.internode.on.net (SurgeMail 3.8f2) with ESMTP id 574545-1927428 for multiple; Thu, 04 Jun 2009 19:15:18 +0930 (CST) Received: from dave by discord with local (Exim 4.69) (envelope-from ) id 1MC9VY-0006pw-Is; Thu, 04 Jun 2009 19:45:12 +1000 Date: Thu, 4 Jun 2009 19:45:12 +1000 From: Dave Chinner To: Christoph Hellwig Cc: Eric Sandeen , xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 5/5] xfs: fix xfs_quiesce_data Subject: Re: [PATCH 5/5] xfs: fix xfs_quiesce_data Message-ID: <20090604094512.GU16929@discord.disaster> References: <20090426140305.113371000@bombadil.infradead.org> <20090426140708.279368000@bombadil.infradead.org> <4A071F06.8040106@sandeen.net> <20090511201511.GB14195@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090511201511.GB14195@infradead.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Barracuda-Connect: bld-mail13.adl6.internode.on.net[150.101.137.98] X-Barracuda-Start-Time: 1244109119 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.2.21 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Mon, May 11, 2009 at 04:15:11PM -0400, Christoph Hellwig wrote: > On Sun, May 10, 2009 at 01:37:58PM -0500, Eric Sandeen wrote: > > I guess I too would like a reason for the filestream_flush move > > somewhere in the changelog... > > Hehe, maybe Dave can chime in. Or I can test if it actually affects > anything and maybe move it out to another patch. The lack of > reliability of the filesystreams tests doesn't make this any easier to > test. (Just catching up on my mail backlog) I think that the filestream_flush() call should actually be after the data flush. filestream_flush() is used to clear the filestream association cache which holds references to the inodes. Where the flush is currently placed is destroying the association that defines the AG the data should be written to before the data is written. As a result it may not end up in the AG carefully associated with the inode during the write() syscall. This may be one of the reasons for the filestreams tests failing frequently.... Cheers, Dave. -- Dave Chinner david@fromorbit.com From BATV+b120f952b32a2b3cb0f4+2111+infradead.org+hch@bombadil.srs.infradead.org Thu Jun 4 05:40:58 2009 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 (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n54Aevgd236783 for ; Thu, 4 Jun 2009 05:40:58 -0500 X-ASG-Debug-ID: 1244112075-0c96006e0000-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 6F0BA2D024A for ; Thu, 4 Jun 2009 03:41:15 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id C9mUBNAsxn2i13Pt for ; Thu, 04 Jun 2009 03:41:15 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MCANm-0002IR-R9; Thu, 04 Jun 2009 10:41:14 +0000 Date: Thu, 4 Jun 2009 06:41:14 -0400 From: Christoph Hellwig To: Dave Chinner Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH] [XFSQA] Add license boilerplate to 205 Subject: Re: [PATCH] [XFSQA] Add license boilerplate to 205 Message-ID: <20090604104114.GA8413@infradead.org> References: <20090604091558.GS16929@discord.disaster> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090604091558.GS16929@discord.disaster> 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: 1244112075 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Thanks, looks good. On Thu, Jun 04, 2009 at 07:15:58PM +1000, Dave Chinner wrote: > [XFSQA] Add license boilerplate to 205 > > Signed-off-by: Dave Chinner > --- > 205 | 13 +++++++++++++ > 1 files changed, 13 insertions(+), 0 deletions(-) > > diff --git a/205 b/205 > index 502adc7..c85e102 100755 > --- a/205 > +++ b/205 > @@ -5,6 +5,19 @@ > # > #----------------------------------------------------------------------- > # Copyright (c) 2009 Dave Chinner > +# > +# 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 > #----------------------------------------------------------------------- > # > # creator > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs ---end quoted text--- From BATV+b120f952b32a2b3cb0f4+2111+infradead.org+hch@bombadil.srs.infradead.org Thu Jun 4 05:45:02 2009 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 (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n54Aj2up237010 for ; Thu, 4 Jun 2009 05:45:02 -0500 X-ASG-Debug-ID: 1244112320-0c6200d80000-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 7F4F02D027E for ; Thu, 4 Jun 2009 03:45:20 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id FFT5PhVz9M82881G for ; Thu, 04 Jun 2009 03:45:20 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MCARk-0002lt-1P; Thu, 04 Jun 2009 10:45:20 +0000 Date: Thu, 4 Jun 2009 06:45:20 -0400 From: Christoph Hellwig To: "Josef 'Jeff' Sipek" Cc: Christoph Hellwig , xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 7/7] xfs: split xfs_sync_inodes Subject: Re: [PATCH 7/7] xfs: split xfs_sync_inodes Message-ID: <20090604104520.GB8413@infradead.org> References: <20090514171233.942489000@bombadil.infradead.org> <20090514171559.231368000@bombadil.infradead.org> <20090603232605.GB9167@josefsipek.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090603232605.GB9167@josefsipek.net> 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: 1244112320 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Wed, Jun 03, 2009 at 07:26:05PM -0400, Josef 'Jeff' Sipek wrote: > > order. The moved log force in that path doesn't make a different because > ^^^^^^^^^ > > Typo. > > > + * Or more likely no needed at all because the VFS is already > ^^ > > Typo. Thanks, fixed both for the next iteration. From BATV+b120f952b32a2b3cb0f4+2111+infradead.org+hch@bombadil.srs.infradead.org Thu Jun 4 05:45:45 2009 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 (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n54AjiqV237054 for ; Thu, 4 Jun 2009 05:45:45 -0500 X-ASG-Debug-ID: 1244112362-0c82009c0000-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 159F22D0284 for ; Thu, 4 Jun 2009 03:46:02 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id 3OJsBkJSPkCOLdKF for ; Thu, 04 Jun 2009 03:46:02 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MCASQ-0004Ci-Oq; Thu, 04 Jun 2009 10:46:02 +0000 Date: Thu, 4 Jun 2009 06:46:02 -0400 From: Christoph Hellwig To: "Josef 'Jeff' Sipek" Cc: Christoph Hellwig , xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 8/7] xfs: remove SYNC_IOWAIT Subject: Re: [PATCH 8/7] xfs: remove SYNC_IOWAIT Message-ID: <20090604104602.GC8413@infradead.org> References: <20090514171233.942489000@bombadil.infradead.org> <20090528121915.GA30037@infradead.org> <20090603233047.GD9167@josefsipek.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090603233047.GD9167@josefsipek.net> 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: 1244112363 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Wed, Jun 03, 2009 at 07:30:47PM -0400, Josef 'Jeff' Sipek wrote: > > causes a little change in behaviour for the ENOSPC flushing code which no > ^^ > Typo, otherwise good. Thanks, fixed for the next iteration. From BATV+b120f952b32a2b3cb0f4+2111+infradead.org+hch@bombadil.srs.infradead.org Thu Jun 4 05:59:49 2009 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 (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n54Axm1b237745 for ; Thu, 4 Jun 2009 05:59:49 -0500 X-ASG-Debug-ID: 1244113206-0c9601580000-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 BE1E32CFE5C for ; Thu, 4 Jun 2009 04:00:06 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id hRefzU367HQoPRQ0 for ; Thu, 04 Jun 2009 04:00:06 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MCAg2-0000Tc-B9; Thu, 04 Jun 2009 11:00:06 +0000 Date: Thu, 4 Jun 2009 07:00:06 -0400 From: Christoph Hellwig To: Eric Sandeen Cc: Christoph Hellwig , xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 5/7] xfs: introduce a per-ag inode iterator Subject: Re: [PATCH 5/7] xfs: introduce a per-ag inode iterator Message-ID: <20090604110006.GA22115@infradead.org> References: <20090514171233.942489000@bombadil.infradead.org> <20090514171558.869514000@bombadil.infradead.org> <4A26F2A9.8050300@sandeen.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A26F2A9.8050300@sandeen.net> 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: 1244113206 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Wed, Jun 03, 2009 at 05:01:13PM -0500, Eric Sandeen wrote: > Ok so here we are looking for EFSCORRUPTED from the "execute" function. > This might be xfs_sync_inode_data, xfs_sync_inode_attr, or > xfs_reclaim_inode_now. But ... > > xfs_sync_inode_valid can return 0, ENOENT, or EFSCORRUPTED. > > Aren't we losing the error here... We can get the EFSCORRUPTED from xfs_iflush. > > > > + error = xfs_sync_inode_valid(ip, pag); > > + if (error) > > + return 0; > > and here? > > so xfs_sync_inode_data / xfs_sync_inode_attr are the "execute" in > xfs_inode_ag_walk(): If you look at the old code we return early with 0 for the XFS_FORCED_SHUTDOWN case, which is the only reason xfs_sync_inode_valid return xfs_sync_inode_valid in the new code. We don't actually break out of the loop in the new code, but don't do any action so the behaviour is as similar as it gets. An EFSCORRUPTED later in the execute function (which AFAICS can only come from xfs_iflush) will end up pssed down to xfs_inode_ag_iterator. I can't say that I like this too much. And in the end only xfs_fs_quota_sync actually every propagates the return value from xfs_sync_inodes, and then just directly to userspace. So I think we are safe just propagating the EFSCORRUPTED down and make all this a lot more logical. From BATV+b120f952b32a2b3cb0f4+2111+infradead.org+hch@bombadil.srs.infradead.org Thu Jun 4 06:26:42 2009 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 (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n54BQfa2239491 for ; Thu, 4 Jun 2009 06:26:42 -0500 X-ASG-Debug-ID: 1244115217-12d202590000-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 BB7ED10541F2 for ; Thu, 4 Jun 2009 04:33:37 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id o9dCNW1SjOQsCUjA for ; Thu, 04 Jun 2009 04:33:37 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MCB61-0003rz-Ge; Thu, 04 Jun 2009 11:26:57 +0000 Date: Thu, 4 Jun 2009 07:26:57 -0400 From: Christoph Hellwig To: randrik@mail.ru, Martin Spott Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: Kernel crash with 2.6.29 + nfs + xfs (radix-tree) Subject: Re: Kernel crash with 2.6.29 + nfs + xfs (radix-tree) Message-ID: <20090604112657.GA10738@infradead.org> References: <20090520003745.GA27491@samad.com.au> <20090520090558.GQ16929@discord.disaster> <20090520095639.GA27496@samad.com.au> <20090526090916.GA17194@infradead.org> <20090527025457.GA32668@samad.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090527025457.GA32668@samad.com.au> 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: 1244115217 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Sorry guys, still haven't been able to track it down. Any chance one of you could run with CONFIG_XFS_DEBUG enabled and see if it trips over any of the asserts? From BATV+b120f952b32a2b3cb0f4+2111+infradead.org+hch@bombadil.srs.infradead.org Thu Jun 4 08:02:55 2009 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 (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n54D2siZ244899 for ; Thu, 4 Jun 2009 08:02:54 -0500 X-ASG-Debug-ID: 1244120989-1c2200820000-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 7E667148E6BD for ; Thu, 4 Jun 2009 06:09:49 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id LR931um4Tikr7Bbp for ; Thu, 04 Jun 2009 06:09:49 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MCCb8-0006ot-NX for xfs@oss.sgi.com; Thu, 04 Jun 2009 13:03:10 +0000 Date: Thu, 4 Jun 2009 09:03:10 -0400 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: [PATCH] xfstests: fix for bash 3.2 Subject: [PATCH] xfstests: fix for bash 3.2 Message-ID: <20090604130310.GA14560@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: 1244120990 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Bash 3.2 wants a space before the closing "]" in a test: Signed-off-by: Christoph Hellwig Index: xfstests-dev/check =================================================================== --- xfstests-dev.orig/check 2009-06-04 12:36:21.000000000 +0000 +++ xfstests-dev/check 2009-06-04 12:36:26.000000000 +0000 @@ -160,7 +160,7 @@ EOF -if [ ! -z "$SCRATCH_DEV"]; then +if [ ! -z "$SCRATCH_DEV" ]; then umount $SCRATCH_DEV 2>/dev/null # call the overridden mkfs - make sure the FS is built # the same as we'll create it later. From felixb@sgi.com Thu Jun 4 08:33:20 2009 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 relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n54DXKPv245916 for ; Thu, 4 Jun 2009 08:33:20 -0500 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay3.corp.sgi.com (Postfix) with ESMTP id 7B8DAAC0AA for ; Thu, 4 Jun 2009 06:33:35 -0700 (PDT) Received: from eagdhcp-232-199.americas.sgi.com (eagdhcp-232-199.americas.sgi.com [128.162.232.199]) by estes.americas.sgi.com (Postfix) with ESMTP id DB9527000103; Thu, 4 Jun 2009 08:33:34 -0500 (CDT) Cc: xfs@oss.sgi.com Message-Id: <5D22C0D8-9A67-4DC3-8848-45F3540A2183@sgi.com> From: Felix Blyakher To: Christoph Hellwig In-Reply-To: <20090604130310.GA14560@infradead.org> Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Subject: Re: [PATCH] xfstests: fix for bash 3.2 Date: Thu, 4 Jun 2009 08:33:33 -0500 References: <20090604130310.GA14560@infradead.org> X-Mailer: Apple Mail (2.926) X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Jun 4, 2009, at 8:03 AM, Christoph Hellwig wrote: > Bash 3.2 wants a space before the closing "]" in a test: > > > Signed-off-by: Christoph Hellwig Reviewed-by: Felix Blyakher > > > Index: xfstests-dev/check > =================================================================== > --- xfstests-dev.orig/check 2009-06-04 12:36:21.000000000 +0000 > +++ xfstests-dev/check 2009-06-04 12:36:26.000000000 +0000 > @@ -160,7 +160,7 @@ > > EOF > > -if [ ! -z "$SCRATCH_DEV"]; then > +if [ ! -z "$SCRATCH_DEV" ]; then > umount $SCRATCH_DEV 2>/dev/null > # call the overridden mkfs - make sure the FS is built > # the same as we'll create it later. > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs From sandeen@sandeen.net Thu Jun 4 09:46:43 2009 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 cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n54EkgbC249273 for ; Thu, 4 Jun 2009 09:46:42 -0500 X-ASG-Debug-ID: 1244127218-0d7c000a0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail.sandeen.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id A07AF1055CAF for ; Thu, 4 Jun 2009 07:53:38 -0700 (PDT) Received: from mail.sandeen.net (sandeen.net [209.173.210.139]) by cuda.sgi.com with ESMTP id FjmycVdLE6FUYHGb for ; Thu, 04 Jun 2009 07:53:38 -0700 (PDT) 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 mail.sandeen.net (Postfix) with ESMTP id 7F281A9B0BF; Thu, 4 Jun 2009 09:46:58 -0500 (CDT) Message-ID: <4A27DE61.5030704@sandeen.net> Date: Thu, 04 Jun 2009 09:46:57 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: Dave Chinner CC: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH] [XFSQA] Add license boilerplate to 205 Subject: Re: [PATCH] [XFSQA] Add license boilerplate to 205 References: <20090604091558.GS16929@discord.disaster> In-Reply-To: <20090604091558.GS16929@discord.disaster> 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: 1244127218 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.2.21 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Dave Chinner wrote: > [XFSQA] Add license boilerplate to 205 > > Signed-off-by: Dave Chinner looks good to me :) Reviewed-by: Eric Sandeen Thanks Dave. > --- > 205 | 13 +++++++++++++ > 1 files changed, 13 insertions(+), 0 deletions(-) > > diff --git a/205 b/205 > index 502adc7..c85e102 100755 > --- a/205 > +++ b/205 > @@ -5,6 +5,19 @@ > # > #----------------------------------------------------------------------- > # Copyright (c) 2009 Dave Chinner > +# > +# 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 > #----------------------------------------------------------------------- > # > # creator > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs > From BATV+b120f952b32a2b3cb0f4+2111+infradead.org+hch@bombadil.srs.infradead.org Thu Jun 4 12:17:11 2009 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,J_CHICKENPOX_72 autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n54HHAjT254477 for ; Thu, 4 Jun 2009 12:17:11 -0500 X-ASG-Debug-ID: 1244135847-087d02530000-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 8756E1A680CF for ; Thu, 4 Jun 2009 10:17:28 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id uWEuY6mi6PKQ7C8u for ; Thu, 04 Jun 2009 10:17:28 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MCGZC-0007zc-Kb; Thu, 04 Jun 2009 17:17:26 +0000 Date: Thu, 4 Jun 2009 13:17:26 -0400 From: Christoph Hellwig To: Eric Sandeen Cc: Christoph Hellwig , xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 5/7] xfs: introduce a per-ag inode iterator Subject: Re: [PATCH 5/7] xfs: introduce a per-ag inode iterator Message-ID: <20090604171726.GA13501@infradead.org> References: <20090514171233.942489000@bombadil.infradead.org> <20090514171558.869514000@bombadil.infradead.org> <4A26F6B1.20509@sandeen.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A26F6B1.20509@sandeen.net> 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: 1244135848 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Wed, Jun 03, 2009 at 05:18:25PM -0500, Eric Sandeen wrote: > Ok, it's looking for EAGAIN here, I'm assuming this is for when we are > calling xfs_reclaim_inode_now, because... > > ... > ... because before, that's what we did above, after testing for a non-0 > return from xfs_reclaim_inode. > > But xfs_reclaim_inode_now() returns 0 or the result of > xfs_reclaim_inode, which is 0/1, so above: Yeah. Updated patch below that besides addressing the other comments makes xfs_reclaim_inode return -EAGAIN if it has to skip an inode. Subject: xfs: introduce a per-ag inode iterator From: Dave Chinner From: Dave Chinner Given that we walk across the per-ag inode lists so often, it makes sense to introduce an iterator for this. Convert the sync and reclaim code to use this new iterator, quota code will follow in the next patch. Also change xfs_reclaim_inode to return -EGAIN instead of 1 for an inode already under reclaim. This simplifies the AG iterator and doesn't matter for the only other caller. [hch: merged the lookup and execute callbacks back into one to get the pag_ici_lock locking correct and simplify the code flow] Signed-off-by: Dave Chinner Signed-off-by: Christoph Hellwig Index: xfs/fs/xfs/linux-2.6/xfs_sync.c =================================================================== --- xfs.orig/fs/xfs/linux-2.6/xfs_sync.c 2009-06-04 12:50:25.380940755 +0200 +++ xfs/fs/xfs/linux-2.6/xfs_sync.c 2009-06-04 13:09:06.199942249 +0200 @@ -49,6 +49,123 @@ #include +STATIC xfs_inode_t * +xfs_inode_ag_lookup( + struct xfs_mount *mp, + struct xfs_perag *pag, + uint32_t *first_index, + int tag) +{ + int nr_found; + struct xfs_inode *ip; + + /* + * use a gang lookup to find the next inode in the tree + * as the tree is sparse and a gang lookup walks to find + * the number of objects requested. + */ + read_lock(&pag->pag_ici_lock); + if (tag == -1) { + nr_found = radix_tree_gang_lookup(&pag->pag_ici_root, + (void **)&ip, *first_index, 1); + } else { + nr_found = radix_tree_gang_lookup_tag(&pag->pag_ici_root, + (void **)&ip, *first_index, 1, tag); + } + if (!nr_found) + goto unlock; + + /* + * Update the index for the next lookup. Catch overflows + * into the next AG range which can occur if we have inodes + * in the last block of the AG and we are currently + * pointing to the last inode. + */ + *first_index = XFS_INO_TO_AGINO(mp, ip->i_ino + 1); + if (*first_index < XFS_INO_TO_AGINO(mp, ip->i_ino)) + goto unlock; + + return ip; + +unlock: + read_unlock(&pag->pag_ici_lock); + return NULL; +} + +STATIC int +xfs_inode_ag_walk( + struct xfs_mount *mp, + xfs_agnumber_t ag, + int (*execute)(struct xfs_inode *ip, + struct xfs_perag *pag, int flags), + int flags, + int tag) +{ + struct xfs_perag *pag = &mp->m_perag[ag]; + uint32_t first_index; + int last_error = 0; + int skipped; + +restart: + skipped = 0; + first_index = 0; + do { + int error = 0; + xfs_inode_t *ip; + + ip = xfs_inode_ag_lookup(mp, pag, &first_index, tag); + if (!ip) + break; + + error = execute(ip, pag, flags); + if (error == EAGAIN) { + skipped++; + continue; + } + if (error) + last_error = error; + /* + * bail out if the filesystem is corrupted. + */ + if (error == EFSCORRUPTED) + break; + + } while (1); + + if (skipped) { + delay(1); + goto restart; + } + + xfs_put_perag(mp, pag); + return last_error; +} + +STATIC int +xfs_inode_ag_iterator( + struct xfs_mount *mp, + int (*execute)(struct xfs_inode *ip, + struct xfs_perag *pag, int flags), + int flags, + int tag) +{ + int error = 0; + int last_error = 0; + xfs_agnumber_t ag; + + for (ag = 0; ag < mp->m_sb.sb_agcount; ag++) { + if (!mp->m_perag[ag].pag_ici_init) + continue; + error = xfs_inode_ag_walk(mp, ag, execute, flags, tag); + if (error) { + last_error = error; + if (error == EFSCORRUPTED) + break; + } + } + return XFS_ERROR(last_error); +} + /* must be called with pag_ici_lock held and releases it */ STATIC int xfs_sync_inode_valid( @@ -85,12 +202,17 @@ xfs_sync_inode_valid( STATIC int xfs_sync_inode_data( struct xfs_inode *ip, + struct xfs_perag *pag, int flags) { struct inode *inode = VFS_I(ip); struct address_space *mapping = inode->i_mapping; int error = 0; + error = xfs_sync_inode_valid(ip, pag); + if (error) + return error; + if (!mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) goto out_wait; @@ -107,16 +229,22 @@ xfs_sync_inode_data( out_wait: if (flags & SYNC_IOWAIT) xfs_ioend_wait(ip); + IRELE(ip); return error; } STATIC int xfs_sync_inode_attr( struct xfs_inode *ip, + struct xfs_perag *pag, int flags) { int error = 0; + error = xfs_sync_inode_valid(ip, pag); + if (error) + return error; + xfs_ilock(ip, XFS_ILOCK_SHARED); if (xfs_inode_clean(ip)) goto out_unlock; @@ -136,117 +264,33 @@ xfs_sync_inode_attr( out_unlock: xfs_iunlock(ip, XFS_ILOCK_SHARED); + IRELE(ip); return error; } -/* - * Sync all the inodes in the given AG according to the - * direction given by the flags. - */ -STATIC int -xfs_sync_inodes_ag( - xfs_mount_t *mp, - int ag, - int flags) -{ - xfs_perag_t *pag = &mp->m_perag[ag]; - int nr_found; - uint32_t first_index = 0; - int error = 0; - int last_error = 0; - - do { - xfs_inode_t *ip = NULL; - - /* - * use a gang lookup to find the next inode in the tree - * as the tree is sparse and a gang lookup walks to find - * the number of objects requested. - */ - read_lock(&pag->pag_ici_lock); - nr_found = radix_tree_gang_lookup(&pag->pag_ici_root, - (void**)&ip, first_index, 1); - - if (!nr_found) { - read_unlock(&pag->pag_ici_lock); - break; - } - - /* - * Update the index for the next lookup. Catch overflows - * into the next AG range which can occur if we have inodes - * in the last block of the AG and we are currently - * pointing to the last inode. - */ - first_index = XFS_INO_TO_AGINO(mp, ip->i_ino + 1); - if (first_index < XFS_INO_TO_AGINO(mp, ip->i_ino)) { - read_unlock(&pag->pag_ici_lock); - break; - } - - error = xfs_sync_inode_valid(ip, pag); - if (error) { - if (error == EFSCORRUPTED) - return 0; - continue; - } - - /* - * If we have to flush data or wait for I/O completion - * we need to hold the iolock. - */ - if (flags & SYNC_DELWRI) - error = xfs_sync_inode_data(ip, flags); - - if (flags & SYNC_ATTR) - error = xfs_sync_inode_attr(ip, flags); - - IRELE(ip); - - if (error) - last_error = error; - /* - * bail out if the filesystem is corrupted. - */ - if (error == EFSCORRUPTED) - return XFS_ERROR(error); - - } while (nr_found); - - return last_error; -} - int xfs_sync_inodes( xfs_mount_t *mp, int flags) { - int error; - int last_error; - int i; + int error = 0; int lflags = XFS_LOG_FORCE; if (mp->m_flags & XFS_MOUNT_RDONLY) return 0; - error = 0; - last_error = 0; if (flags & SYNC_WAIT) lflags |= XFS_LOG_SYNC; - for (i = 0; i < mp->m_sb.sb_agcount; i++) { - if (!mp->m_perag[i].pag_ici_init) - continue; - error = xfs_sync_inodes_ag(mp, i, flags); - if (error) - last_error = error; - if (error == EFSCORRUPTED) - break; - } if (flags & SYNC_DELWRI) - xfs_log_force(mp, 0, lflags); + error = xfs_inode_ag_iterator(mp, xfs_sync_inode_data, flags, -1); - return XFS_ERROR(last_error); + if (flags & SYNC_ATTR) + error = xfs_inode_ag_iterator(mp, xfs_sync_inode_attr, flags, -1); + + if (!error && (flags & SYNC_DELWRI)) + xfs_log_force(mp, 0, lflags); + return XFS_ERROR(error); } STATIC int @@ -613,7 +657,7 @@ xfs_reclaim_inode( xfs_ifunlock(ip); xfs_iunlock(ip, XFS_ILOCK_EXCL); } - return 1; + return -EAGAIN; } __xfs_iflags_set(ip, XFS_IRECLAIM); spin_unlock(&ip->i_flags_lock); @@ -698,72 +742,20 @@ xfs_inode_clear_reclaim_tag( xfs_put_perag(mp, pag); } - -STATIC void -xfs_reclaim_inodes_ag( - xfs_mount_t *mp, - int ag, - int mode) +STATIC int +xfs_reclaim_inode_now( + struct xfs_inode *ip, + struct xfs_perag *pag, + int flags) { - xfs_inode_t *ip = NULL; - xfs_perag_t *pag = &mp->m_perag[ag]; - int nr_found; - uint32_t first_index; - int skipped; - -restart: - first_index = 0; - skipped = 0; - do { - /* - * use a gang lookup to find the next inode in the tree - * as the tree is sparse and a gang lookup walks to find - * the number of objects requested. - */ - read_lock(&pag->pag_ici_lock); - nr_found = radix_tree_gang_lookup_tag(&pag->pag_ici_root, - (void**)&ip, first_index, 1, - XFS_ICI_RECLAIM_TAG); - - if (!nr_found) { - read_unlock(&pag->pag_ici_lock); - break; - } - - /* - * Update the index for the next lookup. Catch overflows - * into the next AG range which can occur if we have inodes - * in the last block of the AG and we are currently - * pointing to the last inode. - */ - first_index = XFS_INO_TO_AGINO(mp, ip->i_ino + 1); - if (first_index < XFS_INO_TO_AGINO(mp, ip->i_ino)) { - read_unlock(&pag->pag_ici_lock); - break; - } - - /* ignore if already under reclaim */ - if (xfs_iflags_test(ip, XFS_IRECLAIM)) { - read_unlock(&pag->pag_ici_lock); - continue; - } - + /* ignore if already under reclaim */ + if (xfs_iflags_test(ip, XFS_IRECLAIM)) { read_unlock(&pag->pag_ici_lock); - - /* - * hmmm - this is an inode already in reclaim. Do - * we even bother catching it here? - */ - if (xfs_reclaim_inode(ip, 0, mode)) - skipped++; - } while (nr_found); - - if (skipped) { - delay(1); - goto restart; + return 0; } - return; + read_unlock(&pag->pag_ici_lock); + return xfs_reclaim_inode(ip, 0, flags); } int @@ -771,14 +763,6 @@ xfs_reclaim_inodes( xfs_mount_t *mp, int mode) { - int i; - - for (i = 0; i < mp->m_sb.sb_agcount; i++) { - if (!mp->m_perag[i].pag_ici_init) - continue; - xfs_reclaim_inodes_ag(mp, i, mode); - } - return 0; + return xfs_inode_ag_iterator(mp, xfs_reclaim_inode_now, mode, + XFS_ICI_RECLAIM_TAG); } - - From maillists0@gmail.com Thu Jun 4 14:12:48 2009 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,HTML_MESSAGE autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n54JClup258126 for ; Thu, 4 Jun 2009 14:12:48 -0500 X-ASG-Debug-ID: 1244142785-6768019d0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from an-out-0708.google.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id DB14C1A6C2D8 for ; Thu, 4 Jun 2009 12:13:05 -0700 (PDT) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.250]) by cuda.sgi.com with ESMTP id lbejqOPvrYdxy6Ke for ; Thu, 04 Jun 2009 12:13:05 -0700 (PDT) Received: by an-out-0708.google.com with SMTP id c37so551859anc.32 for ; Thu, 04 Jun 2009 12:13:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=UMRiYPqUIYuoMMBYhsRiQM8U/mcDexy9qSpDckveYic=; b=nug9Dc10VelwPnsPnJucC/Edxpc8ohLCoJM5sG1brtJDpIiDgw35UqoKQbMGgN6yMl GNyjzdibA8oT0GSKkXpv/3Rf3znr98WYdB7x9/f2muj0Jfx8RZrHa0xkhfBgiGTKmjdO QlgW3IcXYTh4DjTYfmeJTlt0Cm2wsurj/F8DE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Ly0I1DqSQDue7T1sYL3S2GQX+I1NnV32nv6VKtuPaP1OlbvAUnamJAXsRY95ChO1Pa +8lU8poTTnaRE7b3CEQc1RQR1qilblFA4atRdZ4vAkThMArv1XaWcIU+jZNWCXAzH8B/ LU3tkwxIGt7xzSLG0VXZ4eTKbA32PIGJ1k/yY= MIME-Version: 1.0 Received: by 10.100.227.18 with SMTP id z18mr3064587ang.67.1244142781461; Thu, 04 Jun 2009 12:13:01 -0700 (PDT) Date: Thu, 4 Jun 2009 15:13:01 -0400 Message-ID: X-ASG-Orig-Subj: Repairing large partition Subject: Repairing large partition From: maillists0@gmail.com To: xfs@oss.sgi.com Content-Type: multipart/alternative; boundary=001636c9356a89f87b046b8a90f7 X-Barracuda-Connect: an-out-0708.google.com[209.85.132.250] X-Barracuda-Start-Time: 1244142785 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: -1.61 X-Barracuda-Spam-Status: No, SCORE=-1.61 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=HTML_MESSAGE, NO_REAL_NAME, SUBJECT_FUZZY_TION X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.28 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 NO_REAL_NAME From: does not include a real name 0.41 SUBJECT_FUZZY_TION Attempt to obfuscate words in Subject: 0.00 HTML_MESSAGE BODY: HTML included in message X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean --001636c9356a89f87b046b8a90f7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Pardon if this is the wrong list for this question. I had a 50T xfs partition, spread across 3 storage devices which were lvm'd. After a power failure, 2 disks on one device failed. It was raid5, so that data is unrecoverable. I replaced the failed disks and rebuilt that array. I can mount the partition and see data on the first 2 devices. 'I ran xfs_repair -n' to see what might be done a couple of days ago and it still hasn't finished. Does anyone know how I could recreate the partition to include the third device without losing data from the first two devices? Any help will be greatly appreciated, including a pointer to the appropriate docs. Thanks. --001636c9356a89f87b046b8a90f7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Pardon if this is the wrong list for this question.

I had a 50T xfs= partition, spread across 3 storage devices which were lvm'd. After a p= ower failure, 2 disks on one device failed. It was raid5, so that data is u= nrecoverable.

I replaced the failed disks and rebuilt that array. I can mount the par= tition and see data on the first 2 devices. 'I ran xfs_repair -n' t= o see what might be done a couple of days ago and it still hasn't finis= hed.=A0 Does anyone know how I could recreate the partition to include the = third device without losing data from the first two devices? Any help will = be greatly appreciated, including a pointer to the appropriate docs. Thanks= .
--001636c9356a89f87b046b8a90f7-- From sandeen@sandeen.net Thu Jun 4 16:18:11 2009 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 cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n54LIAST001045 for ; Thu, 4 Jun 2009 16:18:11 -0500 X-ASG-Debug-ID: 1244150707-585e01230000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail.sandeen.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id E1D7588C57D for ; Thu, 4 Jun 2009 14:25:07 -0700 (PDT) Received: from mail.sandeen.net (sandeen.net [209.173.210.139]) by cuda.sgi.com with ESMTP id iPpyBvRCtOBOrvCu for ; Thu, 04 Jun 2009 14:25:07 -0700 (PDT) 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 mail.sandeen.net (Postfix) with ESMTP id 48F7CA9DADE; Thu, 4 Jun 2009 16:18:27 -0500 (CDT) Message-ID: <4A283A22.8050003@sandeen.net> Date: Thu, 04 Jun 2009 16:18:26 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: maillists0@gmail.com CC: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: Repairing large partition Subject: Re: Repairing large partition References: In-Reply-To: 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: 1244150708 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: -1.61 X-Barracuda-Spam-Status: No, SCORE=-1.61 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=SUBJECT_FUZZY_TION X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.37 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.41 SUBJECT_FUZZY_TION Attempt to obfuscate words in Subject: X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean maillists0@gmail.com wrote: > Pardon if this is the wrong list for this question. > > I had a 50T xfs partition, spread across 3 storage devices which were > lvm'd. After a power failure, 2 disks on one device failed. It was > raid5, so that data is unrecoverable. > > I replaced the failed disks and rebuilt that array. I can mount the > partition and see data on the first 2 devices. 'I ran xfs_repair -n' to > see what might be done a couple of days ago and it still hasn't > finished. Does anyone know how I could recreate the partition to > include the third device without losing data from the first two devices? > Any help will be greatly appreciated, including a pointer to the > appropriate docs. Thanks. so was it a concat of 3 raid5s? -Eric From sandeen@sandeen.net Thu Jun 4 17:04:33 2009 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,J_CHICKENPOX_43 autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n54M4WI8003182 for ; Thu, 4 Jun 2009 17:04:33 -0500 X-ASG-Debug-ID: 1244153089-735a02270000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail.sandeen.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 3B6DC2D2B7E for ; Thu, 4 Jun 2009 15:04:49 -0700 (PDT) Received: from mail.sandeen.net (sandeen.net [209.173.210.139]) by cuda.sgi.com with ESMTP id xXKk1aLowMMQCDh4 for ; Thu, 04 Jun 2009 15:04:49 -0700 (PDT) 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 mail.sandeen.net (Postfix) with ESMTP id D44589BF089; Thu, 4 Jun 2009 17:04:48 -0500 (CDT) Message-ID: <4A2844FF.7010101@sandeen.net> Date: Thu, 04 Jun 2009 17:04:47 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: maillists0@gmail.com, xfs-oss X-ASG-Orig-Subj: Re: Repairing large partition Subject: Re: Repairing large partition References: <4A283A22.8050003@sandeen.net> In-Reply-To: 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: 1244153090 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: -1.61 X-Barracuda-Spam-Status: No, SCORE=-1.61 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=SUBJECT_FUZZY_TION X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.39 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.41 SUBJECT_FUZZY_TION Attempt to obfuscate words in Subject: X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean maillists0@gmail.com wrote: > > > On Thu, Jun 4, 2009 at 5:18 PM, Eric Sandeen > wrote: > > maillists0@gmail.com wrote: >> Pardon if this is the wrong list for this question. >> >> I had a 50T xfs partition, spread across 3 storage devices which >> were lvm'd. After a power failure, 2 disks on one device failed. It >> was raid5, so that data is unrecoverable. >> >> I replaced the failed disks and rebuilt that array. I can mount the >> partition and see data on the first 2 devices. I ran xfs_repair >> -n' to see what might be done a couple of days ago and it still >> hasn't finished. Does anyone know how I could recreate the >> partition to include the third device without losing data from the >> first two devices? Any help will be greatly appreciated, including >> a pointer to the appropriate docs. Thanks. > > so was it a concat of 3 raid5s? > > > Exactly. Ok, I'm not sure there are any appropriate docs for this case ... the trick will be that the files you can see may well have had portions of their data on the bad piece, and other portions on the good pieces, so even if you get the filesystem framework all back in place it might be a trick to see which remaining files are now corrupted. Of course inodes & directories that were on the bad piece are gone, so those files are pretty well lost. xfs_repair -n is a good idea for a start, I think; I'd be sure you have the latest version, and using -P has been reported to actually speed things up for some people with very large filesystems. xfs_repair is probably the only documented/supported thing to try, though normally for this kind of extensive damage I'd suggest doing it on a filesystem image to see how it ends up... not so feasible with your filesystem, I suppose. One other option -might- be to do xfs_info on the mountpoint, get all the fs geometry, and re-mkfs (preferably with the same mkfs.xfs version) a sparse filesystem image on a file with the exact same geometry. Then dd bits from that freshly mkfs'd filesystem image, at the right offsets, onto the recreated bad chunk of the concat. Again, I'd feel better if you could do a dry run of this somehow ... You could maybe practice this by doing an xfs_metadump -o of the block device, xfs_mdrestore the resulting metadata image back into a sparse filesystem metadata image, do the above mkfs & dd trick into that image, and xfs_repair the result. (you'd probably need some way to teach dd to honor the sparseness, see for example the make-sparse.c tool in http://bugzilla.kernel.org/show_bug.cgi?id=11525#c4) Just some random thoughts ... -Eric From a.beregalov@gmail.com Fri Jun 5 04:23:25 2009 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,J_CHICKENPOX_45 autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n559NOX8036359 for ; Fri, 5 Jun 2009 04:23:24 -0500 X-ASG-Debug-ID: 1244194221-1ab602600000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail-fx0-f225.google.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 1BE0D1058E63 for ; Fri, 5 Jun 2009 02:30:22 -0700 (PDT) Received: from mail-fx0-f225.google.com (mail-fx0-f225.google.com [209.85.220.225]) by cuda.sgi.com with ESMTP id 3Y4en6W52zZaAPsA for ; Fri, 05 Jun 2009 02:30:22 -0700 (PDT) Received: by fxm25 with SMTP id 25so1279271fxm.20 for ; Fri, 05 Jun 2009 02:23:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=P8B7lxhRcPC/m68ZGdeeQy80wMfuh3vFPGDuoqQ1vaE=; b=couvziYqF/UrGv//oJC8UjPLxkYwhfjJjBWn+TLorCpOr96OAW0PFopJgNNPgnb8Px sSSPDA6duNFrCq2Vth5Tr2b7jAulvVwzhxbW5acvSqJqlYzQ6VlNCjUcy5c6/M+QwsGG yQXHc8ACJ03s3XGAWNpwLpSIt281HhexKb2No= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=ubvkiM5dNmgOyUm3rtoXsMpvDHl5U3XXH++rC/mH3m/9E37XvQcBVdjfeo7VYGSMcD Yz7FTIE5ExK7tHoVi5IFu5jffjjUHtifsKkuXm6tM1zuuXP3rcOkQH/Bm9exxdR285QN AtYDYd1i9GjpYowRB0QC35DmCeJABJDvB7cn4= MIME-Version: 1.0 Received: by 10.204.77.102 with SMTP id f38mr2990203bkk.65.1244193818298; Fri, 05 Jun 2009 02:23:38 -0700 (PDT) In-Reply-To: <20090604092330.GT16929@discord.disaster> References: <20090604092330.GT16929@discord.disaster> Date: Fri, 5 Jun 2009 13:23:38 +0400 Message-ID: X-ASG-Orig-Subj: Re: 2.6.30-rc6: BUG at fs/xfs/support/debug.c:109! Subject: Re: 2.6.30-rc6: BUG at fs/xfs/support/debug.c:109! From: Alexander Beregalov To: Dave Chinner Cc: Kernel Testers List , xfs@oss.sgi.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Barracuda-Connect: mail-fx0-f225.google.com[209.85.220.225] X-Barracuda-Start-Time: 1244194224 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.2.81 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean 2009/6/4 Dave Chinner : > On Mon, Jun 01, 2009 at 07:22:56PM +0400, Alexander Beregalov wrote: >> Hi >> >> Assertion failed: *nmap >=3D 1, file: fs/xfs/xfs_bmap.c, line: 4846 > ..... >> Call Trace: >> =C2=A0[] xfs_bmapi+0xad/0x1ad0 >> =C2=A0[] xfs_dir2_leaf_getdents+0x640/0x7b0 >> =C2=A0[] xfs_readdir+0x12c/0x140 >> =C2=A0[] xfs_file_readdir+0x47/0x70 >> =C2=A0[] vfs_readdir+0xd0/0xf0 >> =C2=A0[] sys_getdents+0x96/0x110 >> =C2=A0[] system_call_fastpath+0x16/0x1b > > I'd say this indicates a corrupted directory. =C2=A0Can you run > 'xfs_repair -n' over the filesystem and see if it finds a bad > directory? Hi Dave It is a rootfs. xfs_repair found and fixed all errors, but after reboot the problem still persists (but at another stage of running `emerge`). localhost ~ # echo s > /proc/sysrq-trigger localhost ~ # echo s > /proc/sysrq-trigger localhost ~ # echo u > /proc/sysrq-trigger localhost ~ # xfs_repair -nd /dev/sda2 Phase 1 - find and verify superblock... Phase 2 - using internal log - scan filesystem freespace and inode maps... - found root inode chunk Phase 3 - for each AG... - scan (but don't clear) agi unlinked lists... - process known inodes and perform inode discovery... - agno =3D 0 - agno =3D 1 - agno =3D 2 - agno =3D 3 - agno =3D 4 - agno =3D 5 - agno =3D 6 - agno =3D 7 - agno =3D 8 - agno =3D 9 - agno =3D 10 - agno =3D 11 - agno =3D 12 - agno =3D 13 - agno =3D 14 - agno =3D 15 - process newly discovered inodes... Phase 4 - check for duplicate blocks... - setting up duplicate extent list... - check for inodes claiming duplicate blocks... - agno =3D 0 - agno =3D 1 - agno =3D 2 - agno =3D 4 - agno =3D 3 - agno =3D 5 - agno =3D 6 - agno =3D 7 - agno =3D 8 - agno =3D 9 - agno =3D 10 - agno =3D 11 - agno =3D 12 - agno =3D 13 - agno =3D 14 - agno =3D 15 No modify flag set, skipping phase 5 Phase 6 - check inode connectivity... - traversing filesystem ... - traversal finished ... - moving disconnected inodes to lost+found ... Phase 7 - verify link counts... No modify flag set, skipping filesystem flush and exiting. From hch@lst.de Fri Jun 5 05:26:11 2009 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 cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n55AQ6e5039136 for ; Fri, 5 Jun 2009 05:26:11 -0500 X-ASG-Debug-ID: 1244197583-1ca003640000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from verein.lst.de (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 1F55B1BCBC40 for ; Fri, 5 Jun 2009 03:26:24 -0700 (PDT) Received: from verein.lst.de (verein.lst.de [213.95.11.210]) by cuda.sgi.com with ESMTP id KAh9LIefZFSSZhMk for ; Fri, 05 Jun 2009 03:26:24 -0700 (PDT) X-ASG-Whitelist: Client Received: from verein.lst.de (localhost [127.0.0.1]) by verein.lst.de (8.12.3/8.12.3/Debian-7.1) with ESMTP id n55AQNDE030806 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 5 Jun 2009 12:26:23 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id n55AQNFW030804; Fri, 5 Jun 2009 12:26:23 +0200 Date: Fri, 5 Jun 2009 12:26:23 +0200 From: Christoph Hellwig To: viro@zeniv.linux.org.uk, xfs@oss.sgi.com X-ASG-Orig-Subj: [PATCH] xfs: remove ->write_super and stop maintaining ->s_dirt Subject: [PATCH] xfs: remove ->write_super and stop maintaining ->s_dirt Message-ID: <20090605102622.GA30685@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-Barracuda-Connect: verein.lst.de[213.95.11.210] X-Barracuda-Start-Time: 1244197585 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Al, can you put this in via the vfs tree? With people starting to change these bits now I think we're better off feeding this through the VFS tree early than later via the XFS tree. -- Subject: [PATCH] xfs: remove ->write_super and stop maintaining ->s_dirt From: Christoph Hellwig the write_super method is used for (1) writing back the superblock periodically from pdflush (2) called just before ->sync_fs for data integerity syncs We don't need (1) because we have our own peridoc writeout through xfssyncd, and we don't need (2) because xfs_fs_sync_fs performs a proper synchronous superblock writeout after all other data and metadata has been written out. Also remove ->s_dirt tracking as it's only used to decide when too call ->write_super. Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen Index: vfs-2.6/fs/xfs/linux-2.6/xfs_super.c =================================================================== --- vfs-2.6.orig/fs/xfs/linux-2.6/xfs_super.c 2009-05-11 11:13:24.528784658 +0200 +++ vfs-2.6/fs/xfs/linux-2.6/xfs_super.c 2009-05-11 22:09:29.802683006 +0200 @@ -1108,15 +1108,6 @@ xfs_fs_put_super( unlock_kernel(); } -STATIC void -xfs_fs_write_super( - struct super_block *sb) -{ - if (!(sb->s_flags & MS_RDONLY)) - xfs_sync_fsdata(XFS_M(sb), 0); - sb->s_dirt = 0; -} - STATIC int xfs_fs_sync_super( struct super_block *sb, @@ -1141,7 +1132,6 @@ xfs_fs_sync_super( error = xfs_quiesce_data(mp); else error = xfs_sync_fsdata(mp, 0); - sb->s_dirt = 0; if (unlikely(laptop_mode)) { int prev_sync_seq = mp->m_sync_seq; @@ -1447,7 +1437,6 @@ xfs_fs_fill_super( XFS_SEND_MOUNT(mp, DM_RIGHT_NULL, mtpt, mp->m_fsname); - sb->s_dirt = 1; sb->s_magic = XFS_SB_MAGIC; sb->s_blocksize = mp->m_sb.sb_blocksize; sb->s_blocksize_bits = ffs(sb->s_blocksize) - 1; @@ -1537,7 +1526,6 @@ static struct super_operations xfs_super .write_inode = xfs_fs_write_inode, .clear_inode = xfs_fs_clear_inode, .put_super = xfs_fs_put_super, - .write_super = xfs_fs_write_super, .sync_fs = xfs_fs_sync_super, .freeze_fs = xfs_fs_freeze, .statfs = xfs_fs_statfs, Index: vfs-2.6/fs/xfs/xfs_trans.c =================================================================== --- vfs-2.6.orig/fs/xfs/xfs_trans.c 2009-05-05 14:18:45.481659125 +0200 +++ vfs-2.6/fs/xfs/xfs_trans.c 2009-05-11 22:09:29.803682225 +0200 @@ -628,8 +628,6 @@ xfs_trans_apply_sb_deltas( xfs_trans_log_buf(tp, bp, offsetof(xfs_dsb_t, sb_icount), offsetof(xfs_dsb_t, sb_frextents) + sizeof(sbp->sb_frextents) - 1); - - tp->t_mountp->m_super->s_dirt = 1; } /* From BATV+464f3644bd103b0265ce+2112+infradead.org+hch@bombadil.srs.infradead.org Fri Jun 5 05:41:42 2009 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.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n55AfeEf040084 for ; Fri, 5 Jun 2009 05:41:42 -0500 X-ASG-Debug-ID: 1244198519-3de202a60000-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 53C961BCBCEF for ; Fri, 5 Jun 2009 03:41:59 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id WMRJLYiqOjbVEe9T for ; Fri, 05 Jun 2009 03:41:59 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MCWs1-0001F1-8H; Fri, 05 Jun 2009 10:41:57 +0000 Date: Fri, 5 Jun 2009 06:41:57 -0400 From: Christoph Hellwig To: Dave Chinner Cc: Christoph Hellwig , Eric Sandeen , xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 5/5] xfs: fix xfs_quiesce_data Subject: Re: [PATCH 5/5] xfs: fix xfs_quiesce_data Message-ID: <20090605104157.GA25032@infradead.org> References: <20090426140305.113371000@bombadil.infradead.org> <20090426140708.279368000@bombadil.infradead.org> <4A071F06.8040106@sandeen.net> <20090511201511.GB14195@infradead.org> <20090604094512.GU16929@discord.disaster> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090604094512.GU16929@discord.disaster> 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: 1244198519 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Thu, Jun 04, 2009 at 07:45:12PM +1000, Dave Chinner wrote: > On Mon, May 11, 2009 at 04:15:11PM -0400, Christoph Hellwig wrote: > > On Sun, May 10, 2009 at 01:37:58PM -0500, Eric Sandeen wrote: > > > I guess I too would like a reason for the filestream_flush move > > > somewhere in the changelog... > > > > Hehe, maybe Dave can chime in. Or I can test if it actually affects > > anything and maybe move it out to another patch. The lack of > > reliability of the filesystreams tests doesn't make this any easier to > > test. > > (Just catching up on my mail backlog) > > I think that the filestream_flush() call should actually be after > the data flush. filestream_flush() is used to clear the filestream > association cache which holds references to the inodes. > > Where the flush is currently placed is destroying the association > that defines the AG the data should be written to before the data is > written. As a result it may not end up in the AG carefully > associated with the inode during the write() syscall. > > This may be one of the reasons for the filestreams tests failing > frequently.... Makes sense. I stil get reliable failures on 171 and 172, but the others seem to pass with these changes. From news@mgras.net Fri Jun 5 06:21:03 2009 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=BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n55BL1AR042123 for ; Fri, 5 Jun 2009 06:21:02 -0500 X-ASG-Debug-ID: 1244200878-6b0b010a0000-w1Z2WR X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from foehn.mgras.de (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 0CA052D4F04 for ; Fri, 5 Jun 2009 04:21:18 -0700 (PDT) Received: from foehn.mgras.de (quickstep.mgras.net [213.146.115.59]) by cuda.sgi.com with ESMTP id BO7ow7yF5TirnXlz for ; Fri, 05 Jun 2009 04:21:18 -0700 (PDT) Received: from osprey.mgras.de (osprey.mgras.de [192.168.48.3]) by foehn.mgras.de (8.13.1/8.13.0) with ESMTP id n55BKTtJ017338 for ; Fri, 5 Jun 2009 13:20:30 +0200 (CEST) Received: (from news@localhost) by osprey.mgras.de (AIX5.1/8.11.6p2/8.11.0) id n55BKTe25990 for linux-xfs@oss.sgi.com; Fri, 5 Jun 2009 13:20:29 +0200 To: linux-xfs@oss.sgi.com Path: not-for-mail From: Martin Spott Newsgroups: list.linux-xfs X-ASG-Orig-Subj: Re: Kernel crash with 2.6.29 + nfs + xfs (radix-tree) Subject: Re: Kernel crash with 2.6.29 + nfs + xfs (radix-tree) Date: Fri, 5 Jun 2009 11:20:28 +0000 (UTC) Organization: home Lines: 18 Message-ID: References: <20090520003745.GA27491@samad.com.au> <20090604112657.GA10738@infradead.org> NNTP-Posting-Host: jive.mgras.de X-Trace: osprey.mgras.de 1244200828 30600 192.168.48.5 (5 Jun 2009 11:20:28 GMT) X-Complaints-To: usenet@mgras.net NNTP-Posting-Date: Fri, 5 Jun 2009 11:20:28 +0000 (UTC) User-Agent: tin/1.9.3-20080506 ("Dalintober") (UNIX) (Linux/2.6.29.3 (x86_64)) X-Barracuda-Connect: quickstep.mgras.net[213.146.115.59] X-Barracuda-Start-Time: 1244200880 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.2.90 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Hi Christoph, Christoph Hellwig wrote: > Sorry guys, still haven't been able to track it down. Any chance one > of you could run with CONFIG_XFS_DEBUG enabled and see if it trips > over any of the asserts? I'm running these systems as application servers for schools - with diskless clients. Therefore it's highly impractical to to any debugging during the week (they're going to kill me ;-) , but I'll try to so over the weekend. Cheers, Martin. -- Unix _IS_ user friendly - it's just selective about who its friends are ! -------------------------------------------------------------------------- From npai@busiboutique.net Fri Jun 5 07:19:28 2009 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: *** X-Spam-Status: No, score=3.4 required=5.0 tests=BAYES_50,HTML_FONT_SIZE_LARGE, HTML_MESSAGE,J_CHICKENPOX_52,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.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n55CJSO4045333 for ; Fri, 5 Jun 2009 07:19:28 -0500 X-ASG-Debug-ID: 1244204376-0de101350000-w1Z2WR X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from busiboutique.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with SMTP id 4AF321BCC0E9 for ; Fri, 5 Jun 2009 05:19:36 -0700 (PDT) Received: from busiboutique.net (busiboutique.net [91.121.4.179]) by cuda.sgi.com with SMTP id 3LoUFqCtwHcTMJS8 for ; Fri, 05 Jun 2009 05:19:36 -0700 (PDT) Received: (qmail 12096 invoked by uid 503); 5 Jun 2009 12:20:01 -0000 Received: from unknown (HELO 192.168.100.67) (CONTACT@BUSIBOUTIQUE.NET@80.13.89.19) by busiboutique.net with ESMTPA; 5 Jun 2009 12:20:01 -0000 X-MessageId: 677978846567846466858373667985847381856946786984||767378858845887083647983834683717346677977 Reply-To: fabienne@busiboutique.net Message-ID: <5a59ad78307a3456c7312d0c0d8daec2@busiboutique.net> From: "=?windows-1252?Q?Fabienne_/_BusiBoutique?=" To: X-ASG-Orig-Subj: =?windows-1252?Q?on_n'a_jamais_imprim=E9_aussi_discr=E8tement_!?= Subject: =?windows-1252?Q?on_n'a_jamais_imprim=E9_aussi_discr=E8tement_!?= Date: Fri, 5 Jun 2009 14:19:25 +0200 X-Priority: 1 X-Mailer: SMTP COMPONENT MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=SPLITOR00A_001_498854312D" X-Barracuda-Connect: busiboutique.net[91.121.4.179] X-Barracuda-Start-Time: 1244204377 X-Barracuda-Bayes: INNOCENT GLOBAL 0.5749 1.0000 0.7500 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: 0.75 X-Barracuda-Spam-Status: No, SCORE=0.75 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=HTML_FONT_SIZE_LARGE, HTML_MESSAGE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.94 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 HTML_MESSAGE BODY: HTML included in message 0.00 HTML_FONT_SIZE_LARGE BODY: HTML font size is large X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean This is a multi-part message in MIME format. ------=SPLITOR00A_001_498854312D Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable On n'a jamais imprim=E9 aussi discr=E8tement ! Introduit par SAMSUNG, le mod=E8le CLP-310 d'imprimante laser couleur est = le plus l=E9ger et le plus compact.=20 Il a recours =E0 la technologie No NOIS' (sans bruit) pour un = fonctionnement quasiment sans bruit et le changement ais=E9 de cartouche.=20 L'imprimante couleur laser CLP-310 est compacte et l=E9g=E8re.=20 Rendu des couleurs plus =E9clatant=2E (valable jusqu'au 30 Juin 2009) CLP-310 Samsung - Laser Couleur=20 Fonction : Impression couleur Vitesse (mono) : Jusqu'=E0 16 ppm en A4 Vitesse (couleur) : Jusqu'=E0 4 ppm en A4 M=E9moire/stockage : 32 Mo =20 Prix Incroyable !=20 seulement 73,00 =80- HT soit 87,31 =80- TTC Cette offre est accessible sur le site,=20 Oui je veux profiter imm=E9diatement de cette offre sp=E9ciale ! =20 Comme d'habitude chez BusiBoutique.Com, en commandant aujourd'hui, =20 vous recevez la livraison sous 24 =E0 72 heures chez vous,=20 ou =E0 l'adresse de votre choix.=20 A tout de suite, Pour b=E9n=E9ficier de cette offre, =20 cliquez sur le lien ci-dessus ou contactez le Service Direct. =20 par t=E9l=E9phone au 03 88 70 50 16 ou par email =E0 = direct@busiboutique.com .=20 Cette offre vous est r=E9serv=E9e, non cumulable et valable uniquement=20 chez BusiBoutique.com, dans la limite des stocks disponibles. =20 Attention, il n'y a que quelques machines disponibles !, =20 les premiers arriv=E9s seront les premiers servis=2E Cordialement=20 Fabienne du Service Direct=20 =20 Informatique FRIESS service BusiBoutique.Com=20 32, rue Principale 67270 ROHR=20 Tel. 03 88 70 50 16 - Fax 03 88 70 54 10=20 site : www.busiboutique.com ------=SPLITOR00A_001_498854312D Content-Type: text/html; charset="windows-1252" Content-Transfer-Encoding: quoted-printable

On n'a jamais imprim=E9 aussi discr=E8tement = !

Introduit par SAMSUNG, le mod=E8le CLP-310 d'imprimante laser = couleur est le plus l=E9ger et le plus = compact
Il a recours =E0 la technologie No NOIS' (sans = bruit) pour un fonctionnement quasiment sans bruit et le changement ais=E9 = de cartouche. 
L'imprimante couleur laser CLP-310 est compacte et = l=E9g=E8re. 
Rendu des couleurs plus =E9clatant.
(valable jusqu'au 30 Juin 2009)


CLP-310 = Samsung - Laser Couleur=20

Fonction : Impression = couleur
Vitesse (mono) : Jusqu'=E0 16 ppm en A4
Vitesse (couleur) : = Jusqu'=E0 4 ppm en A4
M=E9moire/stockage : 32 Mo

 

Prix Incroyable !

seulement 73,00 =80- HT soit 87,31 =80- TTC

Cette offre est accessible = sur le site, 
Oui je veux profiter imm=E9diatement de cette offre = sp=E9ciale !
   =

Comme d'habitude chez BusiBoutique.Com, = en commandant aujourd'hui, 
vous recevez la livraison sous = 24 =E0 72 heures chez vous,
ou =E0 l'adresse de votre choix. =

A tout de suite, Pour b=E9n=E9ficier de cette offre,  =
cliquez sur le lien ci-dessus ou contactez le Service Direct. =  
par t=E9l=E9phone au
03 88 70 50 16 ou par = email =E0 direct@busiboutique.com .

Cette offre = vous est r=E9serv=E9e, non cumulable et valable uniquement 
chez = BusiBoutique.com, dans la limite des stocks disponibles.  =

Attention, il n'y a que quelques machines disponibles = !, 
les premiers arriv=E9s seront les premiers = servis.


Cordialement

Fabienne du = Service Direct


Informatique FRIESS service BusiBoutique.Com =
32, rue Principale 67270 ROHR

Tel. 03 88 70 50 16 - Fax = 03 88 70 54 10
site : www.busiboutique.com =

 

Conform=E9ment =E0 = la loi informatique et libert=E9 du 6 janvier 1978, nous vous rappelons = que vous disposez d'un droit d'acc=E8s, de rectification et de suppression = aux informations vous concernant. Pour exercer ce droit ou pour ne plus = recevoir de nouveaux messages BusiBoutique par e-mail, cliquez sur ce lien ! =

------=SPLITOR00A_001_498854312D-- From sandeen@redhat.com Fri Jun 5 11:20:32 2009 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_31, J_CHICKENPOX_43,J_CHICKENPOX_53,J_CHICKENPOX_54,J_CHICKENPOX_62, J_CHICKENPOX_63,J_CHICKENPOX_64,J_CHICKENPOX_66 autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n55GKVkA054997 for ; Fri, 5 Jun 2009 11:20:31 -0500 X-ASG-Debug-ID: 1244218848-756501710000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mx2.redhat.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id ABE281BCE1FE for ; Fri, 5 Jun 2009 09:20:48 -0700 (PDT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by cuda.sgi.com with ESMTP id 6ulvwIprp0RWTBw2 for ; Fri, 05 Jun 2009 09:20:48 -0700 (PDT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n55GKmWV006123 for ; Fri, 5 Jun 2009 12:20:48 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n55GKlOg008817 for ; Fri, 5 Jun 2009 12:20:47 -0400 Received: from neon.msp.redhat.com (neon.msp.redhat.com [10.15.80.10]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n55GKiQ7005512 for ; Fri, 5 Jun 2009 12:20:45 -0400 Message-ID: <4A2945DC.8040809@redhat.com> Date: Fri, 05 Jun 2009 11:20:44 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: xfs mailing list X-ASG-Orig-Subj: [PATCH] xfstests: update aio-stress.c, with copyright information intact Subject: [PATCH] xfstests: update aio-stress.c, with copyright information intact Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-Barracuda-Connect: mx2.redhat.com[66.187.237.31] X-Barracuda-Start-Time: 1244218849 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.2.109 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Pulled from: http://ltp.cvs.sourceforge.net/viewvc/ltp/ltp/testcases/kernel/io/ltp-aiodio/aio-stress.c revision 1.8 There are a couple new options, but the main motivator is to get the license text intact again. Signed-off-by: Eric Sandeen --- iff --git a/ltp/aio-stress.c b/ltp/aio-stress.c index 6ebe082..ab9e006 100644 --- a/ltp/aio-stress.c +++ b/ltp/aio-stress.c @@ -1,7 +1,45 @@ /* + * Copyright (c) 2004 SuSE, Inc. All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of version 2 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. + * + * Further, this software is distributed without any warranty that it is + * free of the rightful claim of any third person regarding infringement + * or the like. Any license provided herein, whether implied or + * otherwise, applies only to this software file. Patent licenses, if + * any, provided herein do not apply to combinations of this program with + * other software, or any other product whatsoever. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write the Free Software Foundation, Inc., 59 + * Temple Place - Suite 330, Boston MA 02111-1307, USA. + * + * + * aio-stress + * + * will open or create each file on the command line, and start a series + * of aio to it. + * + * aio is done in a rotating loop. first file1 gets 8 requests, then + * file2, then file3 etc. As each file finishes writing, it is switched + * to reads + * + * io buffers are aligned in case you want to do raw io + * + * compile with gcc -Wall -laio -lpthread -o aio-stress aio-stress.c + * + * run aio-stress -h to see the options + * + * Please mail Chris Mason (mason@suse.com) with bug reports or patches */ #define _FILE_OFFSET_BITS 64 -#define PROG_VERSION "0.18" +#define PROG_VERSION "0.21" #define NEW_GETEVENTS #include @@ -50,6 +88,7 @@ unsigned long page_size_mask; int o_direct = 0; int o_sync = 0; int latency_stats = 0; +int completion_latency_stats = 0; int io_iter = 8; int iterations = RUN_FOREVER; int max_io_submit = 0; @@ -67,6 +106,7 @@ int padded_reclen = 0; int stonewall = 1; int verify = 0; char *verify_buf = NULL; +int unlink_files = 0; struct io_unit; struct thread_info; @@ -164,6 +204,8 @@ struct io_unit { long res; struct io_unit *next; + + struct timeval io_start_time; /* time of io_submit */ }; struct thread_info { @@ -203,15 +245,20 @@ struct thread_info { /* how much io this thread did in the last stage */ double stage_mb_trans; + + /* latency completion stats i/o time from io_submit until io_getevents */ + struct io_latency io_completion_latency; }; -static double time_since(struct timeval *tv) { +/* + * return seconds between start_tv and stop_tv in double precision + */ +static double time_since(struct timeval *start_tv, struct timeval *stop_tv) +{ double sec, usec; double ret; - struct timeval stop; - gettimeofday(&stop, NULL); - sec = stop.tv_sec - tv->tv_sec; - usec = stop.tv_usec - tv->tv_usec; + sec = stop_tv->tv_sec - start_tv->tv_sec; + usec = stop_tv->tv_usec - start_tv->tv_usec; if (sec > 0 && usec < 0) { sec--; usec += 1000000; @@ -222,11 +269,25 @@ static double time_since(struct timeval *tv) { return ret; } -static void calc_latency(struct timeval *tv, struct io_latency *lat) +/* + * return seconds between start_tv and now in double precision + */ +static double time_since_now(struct timeval *start_tv) +{ + struct timeval stop_time; + gettimeofday(&stop_time, NULL); + return time_since(start_tv, &stop_time); +} + +/* + * Add latency info to latency struct + */ +static void calc_latency(struct timeval *start_tv, struct timeval *stop_tv, + struct io_latency *lat) { double delta; int i; - delta = time_since(tv); + delta = time_since(start_tv, stop_tv); delta = delta * 1000; if (delta > lat->max) @@ -344,20 +405,19 @@ static void print_time(struct io_oper *oper) { double tput; double mb; - runtime = time_since(&oper->start_time); + runtime = time_since_now(&oper->start_time); mb = oper_mb_trans(oper); tput = mb / runtime; fprintf(stderr, "%s on %s (%.2f MB/s) %.2f MB in %.2fs\n", stage_name(oper->rw), oper->file_name, tput, mb, runtime); } -static void print_latency(struct thread_info *t) { - struct io_latency *lat = &t->io_submit_latency; +static void print_lat(char *str, struct io_latency *lat) { double avg = lat->total_lat / lat->total_io; int i; double total_counted = 0; - fprintf(stderr, "latency min %.2f avg %.2f max %.2f\n\t", - lat->min, avg, lat->max); + fprintf(stderr, "%s min %.2f avg %.2f max %.2f\n\t", + str, lat->min, avg, lat->max); for (i = 0 ; i < DEVIATIONS ; i++) { fprintf(stderr, " %.0f < %d", lat->deviations[i], deviations[i]); @@ -366,16 +426,30 @@ static void print_latency(struct thread_info *t) { if (total_counted && lat->total_io - total_counted) fprintf(stderr, " < %.0f", lat->total_io - total_counted); fprintf(stderr, "\n"); - memset(&t->io_submit_latency, 0, sizeof(t->io_submit_latency)); + memset(lat, 0, sizeof(*lat)); +} + +static void print_latency(struct thread_info *t) +{ + struct io_latency *lat = &t->io_submit_latency; + print_lat("latency", lat); +} + +static void print_completion_latency(struct thread_info *t) +{ + struct io_latency *lat = &t->io_completion_latency; + print_lat("completion latency", lat); } /* * updates the fields in the io operation struct that belongs to this * io unit, and make the io unit reusable again */ -void finish_io(struct thread_info *t, struct io_unit *io, long result) { +void finish_io(struct thread_info *t, struct io_unit *io, long result, + struct timeval *tv_now) { struct io_oper *oper = io->io_oper; + calc_latency(&io->io_start_time, tv_now, &t->io_completion_latency); io->res = result; io->busy = IO_FREE; io->next = t->free_ious; @@ -396,6 +470,7 @@ int read_some_events(struct thread_info *t) { int nr; int i; int min_nr = io_iter; + struct timeval stop_time; if (t->num_global_pending < io_iter) min_nr = t->num_global_pending; @@ -408,10 +483,11 @@ int read_some_events(struct thread_info *t) { if (nr <= 0) return nr; + gettimeofday(&stop_time, NULL); for (i = 0 ; i < nr ; i++) { event = t->events + i; event_io = (struct io_unit *)((unsigned long)event->obj); - finish_io(t, event_io, event->res); + finish_io(t, event_io, event->res, &stop_time); } return nr; } @@ -465,9 +541,11 @@ static int io_oper_wait(struct thread_info *t, struct io_oper *oper) { #else while(io_getevents(t->io_ctx, 1, &event, NULL) > 0) { #endif + struct timeval tv_now; event_io = (struct io_unit *)((unsigned long)event.obj); - finish_io(t, event_io, event.res); + gettimeofday(&tv_now, NULL); + finish_io(t, event_io, event.res, &tv_now); if (oper->num_pending == 0) break; @@ -641,7 +719,8 @@ int build_oper(struct thread_info *t, struct io_oper *oper, int num_ios, * runs through the iocbs in the array provided and updates * counters in the associated oper struct */ -static void update_iou_counters(struct iocb **my_iocbs, int nr) +static void update_iou_counters(struct iocb **my_iocbs, int nr, + struct timeval *tv_now) { struct io_unit *io; int i; @@ -649,6 +728,7 @@ static void update_iou_counters(struct iocb **my_iocbs, int nr) io = (struct io_unit *)(my_iocbs[i]); io->io_oper->num_pending++; io->io_oper->started_ios++; + io->io_start_time = *tv_now; /* set time of io_submit */ } } @@ -657,15 +737,18 @@ int run_built(struct thread_info *t, int num_ios, struct iocb **my_iocbs) { int ret; struct timeval start_time; + struct timeval stop_time; resubmit: gettimeofday(&start_time, NULL); ret = io_submit(t->io_ctx, num_ios, my_iocbs); - calc_latency(&start_time, &t->io_submit_latency); + gettimeofday(&stop_time, NULL); + calc_latency(&start_time, &stop_time, &t->io_submit_latency); + if (ret != num_ios) { /* some ios got through */ if (ret > 0) { - update_iou_counters(my_iocbs, ret); + update_iou_counters(my_iocbs, ret, &stop_time); my_iocbs += ret; t->num_global_pending += ret; num_ios -= ret; @@ -675,15 +758,19 @@ resubmit: * retry */ if (ret > 0 || ret == -EAGAIN) { + int old_ret = ret; if ((ret = read_some_events(t) > 0)) { goto resubmit; + } else { + fprintf(stderr, "ret was %d and now is %d\n", ret, old_ret); + abort(); } } fprintf(stderr, "ret %d (%s) on io_submit\n", ret, strerror(-ret)); return -1; } - update_iou_counters(my_iocbs, ret); + update_iou_counters(my_iocbs, ret, &stop_time); t->num_global_pending += ret; return 0; } @@ -972,7 +1059,7 @@ free_buffers: */ void global_thread_throughput(struct thread_info *t, char *this_stage) { int i; - double runtime = time_since(&global_stage_start_time); + double runtime = time_since_now(&global_stage_start_time); double total_mb = 0; double min_trans = 0; @@ -1013,121 +1100,109 @@ int worker(struct thread_info *t) aio_setup(&t->io_ctx, 512); restart: - printf("Starting %s iter:%d \n", __FUNCTION__,iteration); if (num_threads > 1) { - printf("num_threads %d \n", num_threads); pthread_mutex_lock(&stage_mutex); - threads_starting++; - if (threads_starting == num_threads) { - threads_ending = 0; - gettimeofday(&global_stage_start_time, NULL); - pthread_cond_broadcast(&stage_cond); - } - while (threads_starting != num_threads) - pthread_cond_wait(&stage_cond, &stage_mutex); + threads_starting++; + if (threads_starting == num_threads) { + threads_ending = 0; + gettimeofday(&global_stage_start_time, NULL); + pthread_cond_broadcast(&stage_cond); + } + while (threads_starting != num_threads) + pthread_cond_wait(&stage_cond, &stage_mutex); pthread_mutex_unlock(&stage_mutex); } if (t->active_opers) { -// printf("active_opers %p line:%d\n", t->active_opers, __LINE__); this_stage = stage_name(t->active_opers->rw); - gettimeofday(&stage_time, NULL); - t->stage_mb_trans = 0; + gettimeofday(&stage_time, NULL); + t->stage_mb_trans = 0; } + cnt = 0; /* first we send everything through aio */ -// printf("cnt:%d max_iterations:%d oper:%p\n",cnt, iterations,oper); - - while (t->active_opers && (cnt < iterations || iterations == RUN_FOREVER)) { -// printf("active_opers %p line:%d cnt:%d ", t->active_opers,__LINE__,cnt); - if (stonewall && threads_ending) { - oper = t->active_opers; - oper->stonewalled = 1; - oper_list_del(oper, &t->active_opers); - oper_list_add(oper, &t->finished_opers); -// printf(" if branch\n"); - } else { - run_active_list(t, io_iter, max_io_submit); -// printf(" else branch\n"); + while(t->active_opers && (cnt < iterations || iterations == RUN_FOREVER)) { + if (stonewall && threads_ending) { + oper = t->active_opers; + oper->stonewalled = 1; + oper_list_del(oper, &t->active_opers); + oper_list_add(oper, &t->finished_opers); + } else { + run_active_list(t, io_iter, max_io_submit); } - cnt++; + cnt++; } - if (latency_stats) print_latency(t); + if (completion_latency_stats) + print_completion_latency(t); + /* then we wait for all the operations to finish */ oper = t->finished_opers; -// printf("line:%d oper:%p\n", __LINE__, oper); do { - io_oper_wait(t, oper); - if (oper != NULL) { - oper = oper->next; - } - } while (oper != t->finished_opers); -// printf("finished_opers %p line:%d\n", t->finished_opers,__LINE__); + if (!oper) + break; + io_oper_wait(t, oper); + oper = oper->next; + } while(oper != t->finished_opers); /* then we do an fsync to get the timing for any future operations * right, and check to see if any of these need to get restarted */ oper = t->finished_opers; -// printf("oper %p line:%d\n", oper,__LINE__); - while (oper) { - if (fsync_stages) + while(oper) { + if (fsync_stages) fsync(oper->fd); - t->stage_mb_trans += oper_mb_trans(oper); - if (restart_oper(oper)) { - oper_list_del(oper, &t->finished_opers); - oper_list_add(oper, &t->active_opers); - oper = t->finished_opers; - continue; - } - oper = oper->next; - if (oper == t->finished_opers) - break; + t->stage_mb_trans += oper_mb_trans(oper); + if (restart_oper(oper)) { + oper_list_del(oper, &t->finished_opers); + oper_list_add(oper, &t->active_opers); + oper = t->finished_opers; + continue; + } + oper = oper->next; + if (oper == t->finished_opers) + break; } if (t->stage_mb_trans && t->num_files > 0) { -// printf("num_files %d line:%d\n", t->num_files,__LINE__); - double seconds = time_since(&stage_time); - fprintf(stderr, "thread %d %s totals (%.2f MB/s) %.2f MB in %.2fs\n", - t - global_thread_info, this_stage, t->stage_mb_trans/seconds, - t->stage_mb_trans, seconds); + double seconds = time_since_now(&stage_time); + fprintf(stderr, "thread %d %s totals (%.2f MB/s) %.2f MB in %.2fs\n", + t - global_thread_info, this_stage, t->stage_mb_trans/seconds, + t->stage_mb_trans, seconds); } if (num_threads > 1) { -// printf("num_threads %d line:%d\n", num_threads,__LINE__); - pthread_mutex_lock(&stage_mutex); - threads_ending++; - if (threads_ending == num_threads) { - threads_starting = 0; - pthread_cond_broadcast(&stage_cond); - global_thread_throughput(t, this_stage); - } -// printf("threads_ending %d line:%d\n", threads_ending,__LINE__); - while (threads_ending != num_threads) - pthread_cond_wait(&stage_cond, &stage_mutex); - pthread_mutex_unlock(&stage_mutex); + pthread_mutex_lock(&stage_mutex); + threads_ending++; + if (threads_ending == num_threads) { + threads_starting = 0; + pthread_cond_broadcast(&stage_cond); + global_thread_throughput(t, this_stage); + } + while(threads_ending != num_threads) + pthread_cond_wait(&stage_cond, &stage_mutex); + pthread_mutex_unlock(&stage_mutex); } - + /* someone got restarted, go back to the beginning */ if (t->active_opers && (cnt < iterations || iterations == RUN_FOREVER)) { - iteration++; + iteration++; goto restart; } /* finally, free all the ram */ -// printf("finished_opers %p line:%d\n", t->finished_opers,__LINE__); - while (t->finished_opers) { - oper = t->finished_opers; - oper_list_del(oper, &t->finished_opers); - status = finish_oper(t, oper); + while(t->finished_opers) { + oper = t->finished_opers; + oper_list_del(oper, &t->finished_opers); + status = finish_oper(t, oper); } if (t->num_global_pending) { fprintf(stderr, "global num pending is %d\n", t->num_global_pending); } io_queue_release(t->io_ctx); - + return status; } @@ -1138,7 +1213,6 @@ int run_workers(struct thread_info *t, int num_threads) int thread_ret; int i; -// printf("%s num_threads %d line:%d\n", __FUNCTION__,num_threads,__LINE__); for(i = 0 ; i < num_threads ; i++) { ret = pthread_create(&t[i].tid, NULL, (start_routine)worker, t + i); if (ret) { @@ -1178,6 +1252,10 @@ off_t parse_size(char *size_arg, off_t mult) { case 'K': mult = 1024; break; + case 'b': + case 'B': + mult = 1; + break; } ret = mult * num; return ret; @@ -1205,7 +1283,9 @@ void print_usage(void) { printf("\t-m shmfs mmap a file in /dev/shm for io buffers\n"); printf("\t-n no fsyncs between write stage and read stage\n"); printf("\t-l print io_submit latencies after each stage\n"); + printf("\t-L print io completion latencies after each stage\n"); printf("\t-t number of threads to run\n"); + printf("\t-u unlink files after completion\n"); printf("\t-v verification of bytes written\n"); printf("\t-x turn off thread stonewalling\n"); printf("\t-h this message\n"); @@ -1232,7 +1312,7 @@ int main(int ac, char **av) page_size_mask = getpagesize() - 1; while(1) { - c = getopt(ac, av, "a:b:c:C:m:s:r:d:i:I:o:t:lnhOSxv"); + c = getopt(ac, av, "a:b:c:C:m:s:r:d:i:I:o:t:lLnhOSxvu"); if (c < 0) break; @@ -1270,6 +1350,9 @@ int main(int ac, char **av) case 'l': latency_stats = 1; break; + case 'L': + completion_latency_stats = 1; + break; case 'm': if (!strcmp(optarg, "shm")) { fprintf(stderr, "using ipc shm\n"); @@ -1296,6 +1379,9 @@ int main(int ac, char **av) case 'x': stonewall = 0; break; + case 'u': + unlink_files = 1; + break; case 'v': verify = 1; break; @@ -1379,7 +1465,6 @@ int main(int ac, char **av) for (j = 0 ; j < num_contexts ; j++) { thread_index = open_fds % num_threads; open_fds++; -// fprintf(stderr, "adding file %s thread %d\n", av[i], thread_index); rwfd = open(av[i], O_CREAT | O_RDWR | o_direct | o_sync, 0600); assert(rwfd != -1); @@ -1407,25 +1492,21 @@ int main(int ac, char **av) if (num_threads > 1){ printf("Running multi thread version num_threads:%d\n", num_threads); run_workers(t, num_threads); - } - else { + } else { printf("Running single thread version \n"); - status = worker(t); + status = worker(t); } - - - for (i = optind ; i < ac ; i++) { - printf("Cleaning up file %s \n", av[i]); - unlink(av[i]); + if (unlink_files) { + for (i = optind ; i < ac ; i++) { + printf("Cleaning up file %s \n", av[i]); + unlink(av[i]); + } } if (status) { - printf("non zero return %d \n", status); - } - else{ - printf("aio-stress Completed successfully %d \n", status); + exit(1); } - - exit(0); + return status; } + From sandeen@sandeen.net Fri Jun 5 13:17:59 2009 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_72 autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n55IHxFn057979 for ; Fri, 5 Jun 2009 13:17:59 -0500 X-ASG-Debug-ID: 1244225897-646b001a0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mx2.redhat.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id DBCC72D6DB4 for ; Fri, 5 Jun 2009 11:18:17 -0700 (PDT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by cuda.sgi.com with ESMTP id 5gqOxwe53wXiWCaC for ; Fri, 05 Jun 2009 11:18:17 -0700 (PDT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n55II8PT000327; Fri, 5 Jun 2009 14:18:08 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n55II8AK009524; Fri, 5 Jun 2009 14:18:08 -0400 Received: from neon.msp.redhat.com (neon.msp.redhat.com [10.15.80.10]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n55II6CE023889; Fri, 5 Jun 2009 14:18:07 -0400 Message-ID: <4A29615E.2070303@sandeen.net> Date: Fri, 05 Jun 2009 13:18:06 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Christoph Hellwig CC: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 5/7] xfs: introduce a per-ag inode iterator Subject: Re: [PATCH 5/7] xfs: introduce a per-ag inode iterator References: <20090514171233.942489000@bombadil.infradead.org> <20090514171558.869514000@bombadil.infradead.org> <4A26F6B1.20509@sandeen.net> <20090604171726.GA13501@infradead.org> In-Reply-To: <20090604171726.GA13501@infradead.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-Barracuda-Connect: mx2.redhat.com[66.187.237.31] X-Barracuda-Start-Time: 1244225897 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.2.111 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Christoph Hellwig wrote: > On Wed, Jun 03, 2009 at 05:18:25PM -0500, Eric Sandeen wrote: >> Ok, it's looking for EAGAIN here, I'm assuming this is for when we are >> calling xfs_reclaim_inode_now, because... >> >> ... >> ... because before, that's what we did above, after testing for a non-0 >> return from xfs_reclaim_inode. >> >> But xfs_reclaim_inode_now() returns 0 or the result of >> xfs_reclaim_inode, which is 0/1, so above: > > Yeah. Updated patch below that besides addressing the other comments > makes xfs_reclaim_inode return -EAGAIN if it has to skip an inode. > > Subject: xfs: introduce a per-ag inode iterator > From: Dave Chinner > > From: Dave Chinner > > Given that we walk across the per-ag inode lists so often, it makes sense to > introduce an iterator for this. > > Convert the sync and reclaim code to use this new iterator, quota code will > follow in the next patch. > > Also change xfs_reclaim_inode to return -EGAIN instead of 1 for an inode > already under reclaim. This simplifies the AG iterator and doesn't > matter for the only other caller. > > [hch: merged the lookup and execute callbacks back into one to get the > pag_ici_lock locking correct and simplify the code flow] > > Signed-off-by: Dave Chinner > Signed-off-by: Christoph Hellwig Ok, I like this version :) Reviewed-by: Eric Sandeen > Index: xfs/fs/xfs/linux-2.6/xfs_sync.c > =================================================================== > --- xfs.orig/fs/xfs/linux-2.6/xfs_sync.c 2009-06-04 12:50:25.380940755 +0200 > +++ xfs/fs/xfs/linux-2.6/xfs_sync.c 2009-06-04 13:09:06.199942249 +0200 > @@ -49,6 +49,123 @@ > #include > > > +STATIC xfs_inode_t * > +xfs_inode_ag_lookup( > + struct xfs_mount *mp, > + struct xfs_perag *pag, > + uint32_t *first_index, > + int tag) > +{ > + int nr_found; > + struct xfs_inode *ip; > + > + /* > + * use a gang lookup to find the next inode in the tree > + * as the tree is sparse and a gang lookup walks to find > + * the number of objects requested. > + */ > + read_lock(&pag->pag_ici_lock); > + if (tag == -1) { > + nr_found = radix_tree_gang_lookup(&pag->pag_ici_root, > + (void **)&ip, *first_index, 1); > + } else { > + nr_found = radix_tree_gang_lookup_tag(&pag->pag_ici_root, > + (void **)&ip, *first_index, 1, tag); > + } > + if (!nr_found) > + goto unlock; > + > + /* > + * Update the index for the next lookup. Catch overflows > + * into the next AG range which can occur if we have inodes > + * in the last block of the AG and we are currently > + * pointing to the last inode. > + */ > + *first_index = XFS_INO_TO_AGINO(mp, ip->i_ino + 1); > + if (*first_index < XFS_INO_TO_AGINO(mp, ip->i_ino)) > + goto unlock; > + > + return ip; > + > +unlock: > + read_unlock(&pag->pag_ici_lock); > + return NULL; > +} > + > +STATIC int > +xfs_inode_ag_walk( > + struct xfs_mount *mp, > + xfs_agnumber_t ag, > + int (*execute)(struct xfs_inode *ip, > + struct xfs_perag *pag, int flags), > + int flags, > + int tag) > +{ > + struct xfs_perag *pag = &mp->m_perag[ag]; > + uint32_t first_index; > + int last_error = 0; > + int skipped; > + > +restart: > + skipped = 0; > + first_index = 0; > + do { > + int error = 0; > + xfs_inode_t *ip; > + > + ip = xfs_inode_ag_lookup(mp, pag, &first_index, tag); > + if (!ip) > + break; > + > + error = execute(ip, pag, flags); > + if (error == EAGAIN) { > + skipped++; > + continue; > + } > + if (error) > + last_error = error; > + /* > + * bail out if the filesystem is corrupted. > + */ > + if (error == EFSCORRUPTED) > + break; > + > + } while (1); > + > + if (skipped) { > + delay(1); > + goto restart; > + } > + > + xfs_put_perag(mp, pag); > + return last_error; > +} > + > +STATIC int > +xfs_inode_ag_iterator( > + struct xfs_mount *mp, > + int (*execute)(struct xfs_inode *ip, > + struct xfs_perag *pag, int flags), > + int flags, > + int tag) > +{ > + int error = 0; > + int last_error = 0; > + xfs_agnumber_t ag; > + > + for (ag = 0; ag < mp->m_sb.sb_agcount; ag++) { > + if (!mp->m_perag[ag].pag_ici_init) > + continue; > + error = xfs_inode_ag_walk(mp, ag, execute, flags, tag); > + if (error) { > + last_error = error; > + if (error == EFSCORRUPTED) > + break; > + } > + } > + return XFS_ERROR(last_error); > +} > + > /* must be called with pag_ici_lock held and releases it */ > STATIC int > xfs_sync_inode_valid( > @@ -85,12 +202,17 @@ xfs_sync_inode_valid( > STATIC int > xfs_sync_inode_data( > struct xfs_inode *ip, > + struct xfs_perag *pag, > int flags) > { > struct inode *inode = VFS_I(ip); > struct address_space *mapping = inode->i_mapping; > int error = 0; > > + error = xfs_sync_inode_valid(ip, pag); > + if (error) > + return error; > + > if (!mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) > goto out_wait; > > @@ -107,16 +229,22 @@ xfs_sync_inode_data( > out_wait: > if (flags & SYNC_IOWAIT) > xfs_ioend_wait(ip); > + IRELE(ip); > return error; > } > > STATIC int > xfs_sync_inode_attr( > struct xfs_inode *ip, > + struct xfs_perag *pag, > int flags) > { > int error = 0; > > + error = xfs_sync_inode_valid(ip, pag); > + if (error) > + return error; > + > xfs_ilock(ip, XFS_ILOCK_SHARED); > if (xfs_inode_clean(ip)) > goto out_unlock; > @@ -136,117 +264,33 @@ xfs_sync_inode_attr( > > out_unlock: > xfs_iunlock(ip, XFS_ILOCK_SHARED); > + IRELE(ip); > return error; > } > > -/* > - * Sync all the inodes in the given AG according to the > - * direction given by the flags. > - */ > -STATIC int > -xfs_sync_inodes_ag( > - xfs_mount_t *mp, > - int ag, > - int flags) > -{ > - xfs_perag_t *pag = &mp->m_perag[ag]; > - int nr_found; > - uint32_t first_index = 0; > - int error = 0; > - int last_error = 0; > - > - do { > - xfs_inode_t *ip = NULL; > - > - /* > - * use a gang lookup to find the next inode in the tree > - * as the tree is sparse and a gang lookup walks to find > - * the number of objects requested. > - */ > - read_lock(&pag->pag_ici_lock); > - nr_found = radix_tree_gang_lookup(&pag->pag_ici_root, > - (void**)&ip, first_index, 1); > - > - if (!nr_found) { > - read_unlock(&pag->pag_ici_lock); > - break; > - } > - > - /* > - * Update the index for the next lookup. Catch overflows > - * into the next AG range which can occur if we have inodes > - * in the last block of the AG and we are currently > - * pointing to the last inode. > - */ > - first_index = XFS_INO_TO_AGINO(mp, ip->i_ino + 1); > - if (first_index < XFS_INO_TO_AGINO(mp, ip->i_ino)) { > - read_unlock(&pag->pag_ici_lock); > - break; > - } > - > - error = xfs_sync_inode_valid(ip, pag); > - if (error) { > - if (error == EFSCORRUPTED) > - return 0; > - continue; > - } > - > - /* > - * If we have to flush data or wait for I/O completion > - * we need to hold the iolock. > - */ > - if (flags & SYNC_DELWRI) > - error = xfs_sync_inode_data(ip, flags); > - > - if (flags & SYNC_ATTR) > - error = xfs_sync_inode_attr(ip, flags); > - > - IRELE(ip); > - > - if (error) > - last_error = error; > - /* > - * bail out if the filesystem is corrupted. > - */ > - if (error == EFSCORRUPTED) > - return XFS_ERROR(error); > - > - } while (nr_found); > - > - return last_error; > -} > - > int > xfs_sync_inodes( > xfs_mount_t *mp, > int flags) > { > - int error; > - int last_error; > - int i; > + int error = 0; > int lflags = XFS_LOG_FORCE; > > if (mp->m_flags & XFS_MOUNT_RDONLY) > return 0; > - error = 0; > - last_error = 0; > > if (flags & SYNC_WAIT) > lflags |= XFS_LOG_SYNC; > > - for (i = 0; i < mp->m_sb.sb_agcount; i++) { > - if (!mp->m_perag[i].pag_ici_init) > - continue; > - error = xfs_sync_inodes_ag(mp, i, flags); > - if (error) > - last_error = error; > - if (error == EFSCORRUPTED) > - break; > - } > if (flags & SYNC_DELWRI) > - xfs_log_force(mp, 0, lflags); > + error = xfs_inode_ag_iterator(mp, xfs_sync_inode_data, flags, -1); > > - return XFS_ERROR(last_error); > + if (flags & SYNC_ATTR) > + error = xfs_inode_ag_iterator(mp, xfs_sync_inode_attr, flags, -1); > + > + if (!error && (flags & SYNC_DELWRI)) > + xfs_log_force(mp, 0, lflags); > + return XFS_ERROR(error); > } > > STATIC int > @@ -613,7 +657,7 @@ xfs_reclaim_inode( > xfs_ifunlock(ip); > xfs_iunlock(ip, XFS_ILOCK_EXCL); > } > - return 1; > + return -EAGAIN; > } > __xfs_iflags_set(ip, XFS_IRECLAIM); > spin_unlock(&ip->i_flags_lock); > @@ -698,72 +742,20 @@ xfs_inode_clear_reclaim_tag( > xfs_put_perag(mp, pag); > } > > - > -STATIC void > -xfs_reclaim_inodes_ag( > - xfs_mount_t *mp, > - int ag, > - int mode) > +STATIC int > +xfs_reclaim_inode_now( > + struct xfs_inode *ip, > + struct xfs_perag *pag, > + int flags) > { > - xfs_inode_t *ip = NULL; > - xfs_perag_t *pag = &mp->m_perag[ag]; > - int nr_found; > - uint32_t first_index; > - int skipped; > - > -restart: > - first_index = 0; > - skipped = 0; > - do { > - /* > - * use a gang lookup to find the next inode in the tree > - * as the tree is sparse and a gang lookup walks to find > - * the number of objects requested. > - */ > - read_lock(&pag->pag_ici_lock); > - nr_found = radix_tree_gang_lookup_tag(&pag->pag_ici_root, > - (void**)&ip, first_index, 1, > - XFS_ICI_RECLAIM_TAG); > - > - if (!nr_found) { > - read_unlock(&pag->pag_ici_lock); > - break; > - } > - > - /* > - * Update the index for the next lookup. Catch overflows > - * into the next AG range which can occur if we have inodes > - * in the last block of the AG and we are currently > - * pointing to the last inode. > - */ > - first_index = XFS_INO_TO_AGINO(mp, ip->i_ino + 1); > - if (first_index < XFS_INO_TO_AGINO(mp, ip->i_ino)) { > - read_unlock(&pag->pag_ici_lock); > - break; > - } > - > - /* ignore if already under reclaim */ > - if (xfs_iflags_test(ip, XFS_IRECLAIM)) { > - read_unlock(&pag->pag_ici_lock); > - continue; > - } > - > + /* ignore if already under reclaim */ > + if (xfs_iflags_test(ip, XFS_IRECLAIM)) { > read_unlock(&pag->pag_ici_lock); > - > - /* > - * hmmm - this is an inode already in reclaim. Do > - * we even bother catching it here? > - */ > - if (xfs_reclaim_inode(ip, 0, mode)) > - skipped++; > - } while (nr_found); > - > - if (skipped) { > - delay(1); > - goto restart; > + return 0; > } > - return; > + read_unlock(&pag->pag_ici_lock); > > + return xfs_reclaim_inode(ip, 0, flags); > } > > int > @@ -771,14 +763,6 @@ xfs_reclaim_inodes( > xfs_mount_t *mp, > int mode) > { > - int i; > - > - for (i = 0; i < mp->m_sb.sb_agcount; i++) { > - if (!mp->m_perag[i].pag_ici_init) > - continue; > - xfs_reclaim_inodes_ag(mp, i, mode); > - } > - return 0; > + return xfs_inode_ag_iterator(mp, xfs_reclaim_inode_now, mode, > + XFS_ICI_RECLAIM_TAG); > } > - > - > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs > From BATV+464f3644bd103b0265ce+2112+infradead.org+hch@bombadil.srs.infradead.org Fri Jun 5 14:10:28 2009 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 (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n55JARwu060813 for ; Fri, 5 Jun 2009 14:10:28 -0500 X-ASG-Debug-ID: 1244229450-2beb01600000-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 7FB508BBE00 for ; Fri, 5 Jun 2009 12:17:30 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id JfvPgvHHPY8vDc2k for ; Fri, 05 Jun 2009 12:17:30 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MCeo6-0005n3-IZ; Fri, 05 Jun 2009 19:10:30 +0000 Date: Fri, 5 Jun 2009 15:10:26 -0400 From: Christoph Hellwig To: Eric Sandeen Cc: xfs mailing list X-ASG-Orig-Subj: Re: [PATCH] xfstests: update aio-stress.c, with copyright information intact Subject: Re: [PATCH] xfstests: update aio-stress.c, with copyright information intact Message-ID: <20090605191020.GA11399@infradead.org> References: <4A2945DC.8040809@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A2945DC.8040809@redhat.com> 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: 1244229451 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Fri, Jun 05, 2009 at 11:20:44AM -0500, Eric Sandeen wrote: > Pulled from: > http://ltp.cvs.sourceforge.net/viewvc/ltp/ltp/testcases/kernel/io/ltp-aiodio/aio-stress.c > revision 1.8 > > There are a couple new options, but the main motivator is to > get the license text intact again. > > Signed-off-by: Eric Sandeen Looks good, Reviewed-by: Christoph Hellwig From BATV+464f3644bd103b0265ce+2112+infradead.org+hch@bombadil.srs.infradead.org Fri Jun 5 14:13:29 2009 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 (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n55JDTWV060898 for ; Fri, 5 Jun 2009 14:13:29 -0500 X-ASG-Debug-ID: 1244229632-162e02a30000-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 108418BBEBA; Fri, 5 Jun 2009 12:20:32 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id UTsdeuvD9uC360Nt; Fri, 05 Jun 2009 12:20:32 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MCerK-0000Gh-1k; Fri, 05 Jun 2009 19:13:46 +0000 Date: Fri, 5 Jun 2009 15:13:46 -0400 From: Christoph Hellwig To: Robert Herndon Cc: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH] xfsprogs: add -x flags to include/install-sh Subject: Re: [PATCH] xfsprogs: add -x flags to include/install-sh Message-ID: <20090605191345.GB11399@infradead.org> References: <1244059268-2135-1-git-send-email-rherndon@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1244059268-2135-1-git-send-email-rherndon@sgi.com> 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: 1244229633 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Thanks, I've put this into the xfsprogs, xfsdump and dmapi repositories. From sandeen@sandeen.net Fri Jun 5 14:15:41 2009 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 (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n55JFehw060998 for ; Fri, 5 Jun 2009 14:15:40 -0500 X-ASG-Debug-ID: 1244229763-15aa02c60000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mx2.redhat.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id BE8F98BBFEA for ; Fri, 5 Jun 2009 12:22:43 -0700 (PDT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by cuda.sgi.com with ESMTP id HpVdlX5nJSiQ8T3m for ; Fri, 05 Jun 2009 12:22:43 -0700 (PDT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n55JFejd014503; Fri, 5 Jun 2009 15:15:40 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n55JFegT025453; Fri, 5 Jun 2009 15:15:40 -0400 Received: from neon.msp.redhat.com (neon.msp.redhat.com [10.15.80.10]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n55JFcJJ001361; Fri, 5 Jun 2009 15:15:39 -0400 Message-ID: <4A296EDA.9020802@sandeen.net> Date: Fri, 05 Jun 2009 14:15:38 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Christoph Hellwig CC: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 6/7] xfs: use generic inode iterator in xfs_qm_dqrele_all_inodes Subject: Re: [PATCH 6/7] xfs: use generic inode iterator in xfs_qm_dqrele_all_inodes References: <20090514171233.942489000@bombadil.infradead.org> <20090514171559.029154000@bombadil.infradead.org> In-Reply-To: <20090514171559.029154000@bombadil.infradead.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-Barracuda-Connect: mx2.redhat.com[66.187.237.31] X-Barracuda-Start-Time: 1244229763 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: -1.42 X-Barracuda-Spam-Status: No, SCORE=-1.42 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=MARKETING_SUBJECT X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.116 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.60 MARKETING_SUBJECT Subject contains popular marketing words X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Christoph Hellwig wrote: > Use xfs_inode_ag_iterator instead of opencoding the inode walk in the > quota code. Mark xfs_inode_ag_iterator and xfs_sync_inode_valid non-static > to allow using them from the quota code. > > > Signed-off-by: Christoph Hellwig > > Index: xfs/fs/xfs/quota/xfs_qm_syscalls.c > =================================================================== > --- xfs.orig/fs/xfs/quota/xfs_qm_syscalls.c 2009-05-13 14:52:54.087659167 +0200 > +++ xfs/fs/xfs/quota/xfs_qm_syscalls.c 2009-05-13 14:57:36.531661369 +0200 ... > + error = xfs_sync_inode_valid(ip, pag); > + if (error) > + return 0; Does this need the same error propagation treatment as 5/7 ? -Eric From BATV+464f3644bd103b0265ce+2112+infradead.org+hch@bombadil.srs.infradead.org Fri Jun 5 14:17:30 2009 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.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n55JHT5G061051 for ; Fri, 5 Jun 2009 14:17:30 -0500 X-ASG-Debug-ID: 1244229468-2c9401e60000-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 B253F1A6D678 for ; Fri, 5 Jun 2009 12:17:48 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id NRbhzhwF7dZnWrPS for ; Fri, 05 Jun 2009 12:17:48 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MCevB-0000Zb-7Q; Fri, 05 Jun 2009 19:17:46 +0000 Date: Fri, 5 Jun 2009 15:17:45 -0400 From: Christoph Hellwig To: Eric Sandeen Cc: Christoph Hellwig , xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 6/7] xfs: use generic inode iterator in xfs_qm_dqrele_all_inodes Subject: Re: [PATCH 6/7] xfs: use generic inode iterator in xfs_qm_dqrele_all_inodes Message-ID: <20090605191744.GA17489@infradead.org> References: <20090514171233.942489000@bombadil.infradead.org> <20090514171559.029154000@bombadil.infradead.org> <4A296EDA.9020802@sandeen.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A296EDA.9020802@sandeen.net> 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: 1244229468 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Fri, Jun 05, 2009 at 02:15:38PM -0500, Eric Sandeen wrote: > Does this need the same error propagation treatment as 5/7 ? Yes, I've already fixed this up in my local copy: Subject: xfs: use generic inode iterator in xfs_qm_dqrele_all_inodes From: Christoph Hellwig Use xfs_inode_ag_iterator instead of opencoding the inode walk in the quota code. Mark xfs_inode_ag_iterator and xfs_sync_inode_valid non-static to allow using them from the quota code. Signed-off-by: Christoph Hellwig Reviewed-by: Josef 'Jeff' Sipek Index: xfs/fs/xfs/quota/xfs_qm_syscalls.c =================================================================== --- xfs.orig/fs/xfs/quota/xfs_qm_syscalls.c 2009-06-04 12:47:30.742821242 +0200 +++ xfs/fs/xfs/quota/xfs_qm_syscalls.c 2009-06-04 13:03:51.039832673 +0200 @@ -847,105 +847,55 @@ xfs_qm_export_flags( } -/* - * Release all the dquots on the inodes in an AG. - */ -STATIC void -xfs_qm_dqrele_inodes_ag( - xfs_mount_t *mp, - int ag, - uint flags) +STATIC int +xfs_dqrele_inode( + struct xfs_inode *ip, + struct xfs_perag *pag, + int flags) { - xfs_inode_t *ip = NULL; - xfs_perag_t *pag = &mp->m_perag[ag]; - int first_index = 0; - int nr_found; - - do { - /* - * use a gang lookup to find the next inode in the tree - * as the tree is sparse and a gang lookup walks to find - * the number of objects requested. - */ - read_lock(&pag->pag_ici_lock); - nr_found = radix_tree_gang_lookup(&pag->pag_ici_root, - (void**)&ip, first_index, 1); - - if (!nr_found) { - read_unlock(&pag->pag_ici_lock); - break; - } - - /* - * Update the index for the next lookup. Catch overflows - * into the next AG range which can occur if we have inodes - * in the last block of the AG and we are currently - * pointing to the last inode. - */ - first_index = XFS_INO_TO_AGINO(mp, ip->i_ino + 1); - if (first_index < XFS_INO_TO_AGINO(mp, ip->i_ino)) { - read_unlock(&pag->pag_ici_lock); - break; - } - - /* skip quota inodes */ - if (ip == XFS_QI_UQIP(mp) || ip == XFS_QI_GQIP(mp)) { - ASSERT(ip->i_udquot == NULL); - ASSERT(ip->i_gdquot == NULL); - read_unlock(&pag->pag_ici_lock); - continue; - } + int error; - /* - * If we can't get a reference on the inode, it must be - * in reclaim. Leave it for the reclaim code to flush. - */ - if (!igrab(VFS_I(ip))) { - read_unlock(&pag->pag_ici_lock); - continue; - } + /* skip quota inodes */ + if (ip == XFS_QI_UQIP(ip->i_mount) || ip == XFS_QI_GQIP(ip->i_mount)) { + ASSERT(ip->i_udquot == NULL); + ASSERT(ip->i_gdquot == NULL); read_unlock(&pag->pag_ici_lock); + return 0; + } - /* avoid new inodes though we shouldn't find any here */ - if (xfs_iflags_test(ip, XFS_INEW)) { - IRELE(ip); - continue; - } + error = xfs_sync_inode_valid(ip, pag); + if (error) + return error; - xfs_ilock(ip, XFS_ILOCK_EXCL); - if ((flags & XFS_UQUOTA_ACCT) && ip->i_udquot) { - xfs_qm_dqrele(ip->i_udquot); - ip->i_udquot = NULL; - } - if (flags & (XFS_PQUOTA_ACCT|XFS_GQUOTA_ACCT) && - ip->i_gdquot) { - xfs_qm_dqrele(ip->i_gdquot); - ip->i_gdquot = NULL; - } - xfs_iput(ip, XFS_ILOCK_EXCL); + xfs_ilock(ip, XFS_ILOCK_EXCL); + if ((flags & XFS_UQUOTA_ACCT) && ip->i_udquot) { + xfs_qm_dqrele(ip->i_udquot); + ip->i_udquot = NULL; + } + if (flags & (XFS_PQUOTA_ACCT|XFS_GQUOTA_ACCT) && ip->i_gdquot) { + xfs_qm_dqrele(ip->i_gdquot); + ip->i_gdquot = NULL; + } + xfs_iput(ip, XFS_ILOCK_EXCL); + IRELE(ip); - } while (nr_found); + return 0; } + /* * Go thru all the inodes in the file system, releasing their dquots. + * * Note that the mount structure gets modified to indicate that quotas are off - * AFTER this, in the case of quotaoff. This also gets called from - * xfs_rootumount. + * AFTER this, in the case of quotaoff. */ void xfs_qm_dqrele_all_inodes( struct xfs_mount *mp, uint flags) { - int i; - ASSERT(mp->m_quotainfo); - for (i = 0; i < mp->m_sb.sb_agcount; i++) { - if (!mp->m_perag[i].pag_ici_init) - continue; - xfs_qm_dqrele_inodes_ag(mp, i, flags); - } + xfs_inode_ag_iterator(mp, xfs_dqrele_inode, flags, -1); } /*------------------------------------------------------------------------*/ Index: xfs/fs/xfs/linux-2.6/xfs_sync.c =================================================================== --- xfs.orig/fs/xfs/linux-2.6/xfs_sync.c 2009-06-04 13:01:29.388941822 +0200 +++ xfs/fs/xfs/linux-2.6/xfs_sync.c 2009-06-04 13:02:26.249965001 +0200 @@ -141,7 +141,7 @@ restart: return last_error; } -STATIC int +int xfs_inode_ag_iterator( struct xfs_mount *mp, int (*execute)(struct xfs_inode *ip, @@ -167,7 +167,7 @@ xfs_inode_ag_iterator( } /* must be called with pag_ici_lock held and releases it */ -STATIC int +int xfs_sync_inode_valid( struct xfs_inode *ip, struct xfs_perag *pag) Index: xfs/fs/xfs/linux-2.6/xfs_sync.h =================================================================== --- xfs.orig/fs/xfs/linux-2.6/xfs_sync.h 2009-06-04 12:47:30.804939977 +0200 +++ xfs/fs/xfs/linux-2.6/xfs_sync.h 2009-06-04 13:02:26.249965001 +0200 @@ -54,4 +54,10 @@ void xfs_inode_set_reclaim_tag(struct xf void xfs_inode_clear_reclaim_tag(struct xfs_inode *ip); void __xfs_inode_clear_reclaim_tag(struct xfs_mount *mp, struct xfs_perag *pag, struct xfs_inode *ip); + +int xfs_sync_inode_valid(struct xfs_inode *ip, struct xfs_perag *pag); +int xfs_inode_ag_iterator(struct xfs_mount *mp, + int (*execute)(struct xfs_inode *ip, struct xfs_perag *pag, int flags), + int flags, int tag); + #endif From sandeen@sandeen.net Fri Jun 5 15:11:52 2009 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 (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n55KBpIX062755 for ; Fri, 5 Jun 2009 15:11:51 -0500 X-ASG-Debug-ID: 1244232729-22f400ce0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mx2.redhat.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 3065D2D728D for ; Fri, 5 Jun 2009 13:12:09 -0700 (PDT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by cuda.sgi.com with ESMTP id Rjz2EBKpXQlG7oEF for ; Fri, 05 Jun 2009 13:12:09 -0700 (PDT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n55KBvkG028017; Fri, 5 Jun 2009 16:11:57 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n55KBut6007696; Fri, 5 Jun 2009 16:11:57 -0400 Received: from neon.msp.redhat.com (neon.msp.redhat.com [10.15.80.10]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n55KBtK6010542; Fri, 5 Jun 2009 16:11:55 -0400 Message-ID: <4A297C0B.8060302@sandeen.net> Date: Fri, 05 Jun 2009 15:11:55 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Christoph Hellwig CC: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 6/7] xfs: use generic inode iterator in xfs_qm_dqrele_all_inodes Subject: Re: [PATCH 6/7] xfs: use generic inode iterator in xfs_qm_dqrele_all_inodes References: <20090514171233.942489000@bombadil.infradead.org> <20090514171559.029154000@bombadil.infradead.org> <4A296EDA.9020802@sandeen.net> <20090605191744.GA17489@infradead.org> In-Reply-To: <20090605191744.GA17489@infradead.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-Barracuda-Connect: mx2.redhat.com[66.187.237.31] X-Barracuda-Start-Time: 1244232730 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: -1.42 X-Barracuda-Spam-Status: No, SCORE=-1.42 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=MARKETING_SUBJECT X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.119 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.60 MARKETING_SUBJECT Subject contains popular marketing words X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Christoph Hellwig wrote: > On Fri, Jun 05, 2009 at 02:15:38PM -0500, Eric Sandeen wrote: >> Does this need the same error propagation treatment as 5/7 ? > > Yes, I've already fixed this up in my local copy: > > Subject: xfs: use generic inode iterator in xfs_qm_dqrele_all_inodes > From: Christoph Hellwig > > Use xfs_inode_ag_iterator instead of opencoding the inode walk in the > quota code. Mark xfs_inode_ag_iterator and xfs_sync_inode_valid non-static > to allow using them from the quota code. > > > Signed-off-by: Christoph Hellwig > Reviewed-by: Josef 'Jeff' Sipek Ok, this looks fine to me. Reviewed-by: Eric Sandeen > > Index: xfs/fs/xfs/quota/xfs_qm_syscalls.c > =================================================================== > --- xfs.orig/fs/xfs/quota/xfs_qm_syscalls.c 2009-06-04 12:47:30.742821242 +0200 > +++ xfs/fs/xfs/quota/xfs_qm_syscalls.c 2009-06-04 13:03:51.039832673 +0200 > @@ -847,105 +847,55 @@ xfs_qm_export_flags( > } > > > -/* > - * Release all the dquots on the inodes in an AG. > - */ > -STATIC void > -xfs_qm_dqrele_inodes_ag( > - xfs_mount_t *mp, > - int ag, > - uint flags) > +STATIC int > +xfs_dqrele_inode( > + struct xfs_inode *ip, > + struct xfs_perag *pag, > + int flags) > { > - xfs_inode_t *ip = NULL; > - xfs_perag_t *pag = &mp->m_perag[ag]; > - int first_index = 0; > - int nr_found; > - > - do { > - /* > - * use a gang lookup to find the next inode in the tree > - * as the tree is sparse and a gang lookup walks to find > - * the number of objects requested. > - */ > - read_lock(&pag->pag_ici_lock); > - nr_found = radix_tree_gang_lookup(&pag->pag_ici_root, > - (void**)&ip, first_index, 1); > - > - if (!nr_found) { > - read_unlock(&pag->pag_ici_lock); > - break; > - } > - > - /* > - * Update the index for the next lookup. Catch overflows > - * into the next AG range which can occur if we have inodes > - * in the last block of the AG and we are currently > - * pointing to the last inode. > - */ > - first_index = XFS_INO_TO_AGINO(mp, ip->i_ino + 1); > - if (first_index < XFS_INO_TO_AGINO(mp, ip->i_ino)) { > - read_unlock(&pag->pag_ici_lock); > - break; > - } > - > - /* skip quota inodes */ > - if (ip == XFS_QI_UQIP(mp) || ip == XFS_QI_GQIP(mp)) { > - ASSERT(ip->i_udquot == NULL); > - ASSERT(ip->i_gdquot == NULL); > - read_unlock(&pag->pag_ici_lock); > - continue; > - } > + int error; > > - /* > - * If we can't get a reference on the inode, it must be > - * in reclaim. Leave it for the reclaim code to flush. > - */ > - if (!igrab(VFS_I(ip))) { > - read_unlock(&pag->pag_ici_lock); > - continue; > - } > + /* skip quota inodes */ > + if (ip == XFS_QI_UQIP(ip->i_mount) || ip == XFS_QI_GQIP(ip->i_mount)) { > + ASSERT(ip->i_udquot == NULL); > + ASSERT(ip->i_gdquot == NULL); > read_unlock(&pag->pag_ici_lock); > + return 0; > + } > > - /* avoid new inodes though we shouldn't find any here */ > - if (xfs_iflags_test(ip, XFS_INEW)) { > - IRELE(ip); > - continue; > - } > + error = xfs_sync_inode_valid(ip, pag); > + if (error) > + return error; > > - xfs_ilock(ip, XFS_ILOCK_EXCL); > - if ((flags & XFS_UQUOTA_ACCT) && ip->i_udquot) { > - xfs_qm_dqrele(ip->i_udquot); > - ip->i_udquot = NULL; > - } > - if (flags & (XFS_PQUOTA_ACCT|XFS_GQUOTA_ACCT) && > - ip->i_gdquot) { > - xfs_qm_dqrele(ip->i_gdquot); > - ip->i_gdquot = NULL; > - } > - xfs_iput(ip, XFS_ILOCK_EXCL); > + xfs_ilock(ip, XFS_ILOCK_EXCL); > + if ((flags & XFS_UQUOTA_ACCT) && ip->i_udquot) { > + xfs_qm_dqrele(ip->i_udquot); > + ip->i_udquot = NULL; > + } > + if (flags & (XFS_PQUOTA_ACCT|XFS_GQUOTA_ACCT) && ip->i_gdquot) { > + xfs_qm_dqrele(ip->i_gdquot); > + ip->i_gdquot = NULL; > + } > + xfs_iput(ip, XFS_ILOCK_EXCL); > + IRELE(ip); > > - } while (nr_found); > + return 0; > } > > + > /* > * Go thru all the inodes in the file system, releasing their dquots. > + * > * Note that the mount structure gets modified to indicate that quotas are off > - * AFTER this, in the case of quotaoff. This also gets called from > - * xfs_rootumount. > + * AFTER this, in the case of quotaoff. > */ > void > xfs_qm_dqrele_all_inodes( > struct xfs_mount *mp, > uint flags) > { > - int i; > - > ASSERT(mp->m_quotainfo); > - for (i = 0; i < mp->m_sb.sb_agcount; i++) { > - if (!mp->m_perag[i].pag_ici_init) > - continue; > - xfs_qm_dqrele_inodes_ag(mp, i, flags); > - } > + xfs_inode_ag_iterator(mp, xfs_dqrele_inode, flags, -1); > } > > /*------------------------------------------------------------------------*/ > Index: xfs/fs/xfs/linux-2.6/xfs_sync.c > =================================================================== > --- xfs.orig/fs/xfs/linux-2.6/xfs_sync.c 2009-06-04 13:01:29.388941822 +0200 > +++ xfs/fs/xfs/linux-2.6/xfs_sync.c 2009-06-04 13:02:26.249965001 +0200 > @@ -141,7 +141,7 @@ restart: > return last_error; > } > > -STATIC int > +int > xfs_inode_ag_iterator( > struct xfs_mount *mp, > int (*execute)(struct xfs_inode *ip, > @@ -167,7 +167,7 @@ xfs_inode_ag_iterator( > } > > /* must be called with pag_ici_lock held and releases it */ > -STATIC int > +int > xfs_sync_inode_valid( > struct xfs_inode *ip, > struct xfs_perag *pag) > Index: xfs/fs/xfs/linux-2.6/xfs_sync.h > =================================================================== > --- xfs.orig/fs/xfs/linux-2.6/xfs_sync.h 2009-06-04 12:47:30.804939977 +0200 > +++ xfs/fs/xfs/linux-2.6/xfs_sync.h 2009-06-04 13:02:26.249965001 +0200 > @@ -54,4 +54,10 @@ void xfs_inode_set_reclaim_tag(struct xf > void xfs_inode_clear_reclaim_tag(struct xfs_inode *ip); > void __xfs_inode_clear_reclaim_tag(struct xfs_mount *mp, struct xfs_perag *pag, > struct xfs_inode *ip); > + > +int xfs_sync_inode_valid(struct xfs_inode *ip, struct xfs_perag *pag); > +int xfs_inode_ag_iterator(struct xfs_mount *mp, > + int (*execute)(struct xfs_inode *ip, struct xfs_perag *pag, int flags), > + int flags, int tag); > + > #endif > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs > From sandeen@sandeen.net Fri Jun 5 15:32:19 2009 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.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n55KWInk063333 for ; Fri, 5 Jun 2009 15:32:18 -0500 X-ASG-Debug-ID: 1244233956-6ed501320000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mx2.redhat.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id EA7601227B5E for ; Fri, 5 Jun 2009 13:32:36 -0700 (PDT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by cuda.sgi.com with ESMTP id Z1ZTd7VYhUSWZ6YQ for ; Fri, 05 Jun 2009 13:32:36 -0700 (PDT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n55KWRm7032346; Fri, 5 Jun 2009 16:32:27 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n55KWQE3012352; Fri, 5 Jun 2009 16:32:26 -0400 Received: from neon.msp.redhat.com (neon.msp.redhat.com [10.15.80.10]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n55KWPRm013585; Fri, 5 Jun 2009 16:32:25 -0400 Message-ID: <4A2980D9.9050901@sandeen.net> Date: Fri, 05 Jun 2009 15:32:25 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Christoph Hellwig CC: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 7/7] xfs: split xfs_sync_inodes Subject: Re: [PATCH 7/7] xfs: split xfs_sync_inodes References: <20090514171233.942489000@bombadil.infradead.org> <20090514171559.231368000@bombadil.infradead.org> In-Reply-To: <20090514171559.231368000@bombadil.infradead.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-Barracuda-Connect: mx2.redhat.com[66.187.237.31] X-Barracuda-Start-Time: 1244233956 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: -1.52 X-Barracuda-Spam-Status: No, SCORE=-1.52 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=BSF_RULE_7582B X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.121 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE_7582B Custom Rule 7582B X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Christoph Hellwig wrote: > xfs_sync_inodes is used to write back either file data or inode metadata. > In generally we always do these separately, except for one fishy case in ^^^ "In general" > xfs_fs_put_super that does both. So separate xfs_sync_inodes into > separate xfs_sync_data and xfs_sync_attr functions. In xfs_fs_put_super > we first call the data sync and then the attr sync as that was the previous > order. The moved log force in that path doesn't make a different because > we will force the log again as part of the real unmount process. > > The filesystem readonly checks are not performed by the new function but > instead moved into the callers, given that most callers alredy have it > further up in the stack. Also add debug checks that we do not pass in > incorrect flags in the new xfs_sync_data and xfs_sync_attr function and > fix the one place that did pass in a wrong flag. > > Also remove a comment mentioning xfs_sync_inodes that has been incorrect > for a while because we always take either the iolock or ilock in the > sync path these days. > > > Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen > Index: xfs/fs/xfs/linux-2.6/xfs_super.c > =================================================================== > --- xfs.orig/fs/xfs/linux-2.6/xfs_super.c 2009-05-14 19:09:00.178792110 +0200 > +++ xfs/fs/xfs/linux-2.6/xfs_super.c 2009-05-14 19:09:05.278808755 +0200 > @@ -1070,7 +1070,18 @@ xfs_fs_put_super( > int unmount_event_flags = 0; > > xfs_syncd_stop(mp); > - xfs_sync_inodes(mp, SYNC_ATTR|SYNC_DELWRI); > + > + if (!(sb->s_flags & MS_RDONLY)) { > + /* > + * XXX(hch): this should be SYNC_WAIT. > + * > + * Or more likely no needed at all because the VFS is already > + * calling ->sync_fs after shutting down all filestem > + * operations and just before calling ->put_super. > + */ > + xfs_sync_data(mp, 0); > + xfs_sync_attr(mp, 0); > + } > > #ifdef HAVE_DMAPI > if (mp->m_flags & XFS_MOUNT_DMAPI) { > Index: xfs/fs/xfs/linux-2.6/xfs_sync.c > =================================================================== > --- xfs.orig/fs/xfs/linux-2.6/xfs_sync.c 2009-05-14 19:09:04.687659175 +0200 > +++ xfs/fs/xfs/linux-2.6/xfs_sync.c 2009-05-14 19:09:05.279808603 +0200 > @@ -265,29 +265,40 @@ xfs_sync_inode_attr( > return error; > } > > +/* > + * Write out pagecache data for the whole filesystem. > + */ > int > -xfs_sync_inodes( > - xfs_mount_t *mp, > - int flags) > +xfs_sync_data( > + struct xfs_mount *mp, > + int flags) > { > - int error = 0; > - int lflags = XFS_LOG_FORCE; > + int error; > > - if (mp->m_flags & XFS_MOUNT_RDONLY) > - return 0; > + ASSERT((flags & ~(SYNC_TRYLOCK|SYNC_WAIT|SYNC_IOWAIT)) == 0); > > - if (flags & SYNC_WAIT) > - lflags |= XFS_LOG_SYNC; > + error = xfs_inode_ag_iterator(mp, xfs_sync_inode_data, flags, -1); > + if (error) > + return XFS_ERROR(error); > > - if (flags & SYNC_DELWRI) > - error = xfs_inode_ag_iterator(mp, xfs_sync_inode_data, flags, -1); > + xfs_log_force(mp, 0, > + (flags & SYNC_WAIT) ? > + XFS_LOG_FORCE | XFS_LOG_SYNC : > + XFS_LOG_FORCE); > + return 0; > +} > > - if (flags & SYNC_ATTR) > - error = xfs_inode_ag_iterator(mp, xfs_sync_inode_attr, flags, -1); > +/* > + * Write out inode metadata (attributes) for the whole filesystem. > + */ > +int > +xfs_sync_attr( > + struct xfs_mount *mp, > + int flags) > +{ > + ASSERT((flags & ~SYNC_WAIT) == 0); > > - if (!error && (flags & SYNC_DELWRI)) > - xfs_log_force(mp, 0, lflags); > - return XFS_ERROR(error); > + return xfs_inode_ag_iterator(mp, xfs_sync_inode_attr, flags, -1); > } > > STATIC int > @@ -401,12 +412,12 @@ xfs_quiesce_data( > int error; > > /* push non-blocking */ > - xfs_sync_inodes(mp, SYNC_DELWRI|SYNC_BDFLUSH); > + xfs_sync_data(mp, 0); > xfs_qm_sync(mp, SYNC_BDFLUSH); > xfs_filestream_flush(mp); > > /* push and block */ > - xfs_sync_inodes(mp, SYNC_DELWRI|SYNC_WAIT|SYNC_IOWAIT); > + xfs_sync_data(mp, SYNC_WAIT|SYNC_IOWAIT); > xfs_qm_sync(mp, SYNC_WAIT); > > /* write superblock and hoover up shutdown errors */ > @@ -435,7 +446,7 @@ xfs_quiesce_fs( > * logged before we can write the unmount record. > */ > do { > - xfs_sync_inodes(mp, SYNC_ATTR|SYNC_WAIT); > + xfs_sync_attr(mp, SYNC_WAIT); > pincount = xfs_flush_buftarg(mp->m_ddev_targp, 1); > if (!pincount) { > delay(50); > @@ -518,8 +529,8 @@ xfs_flush_inodes_work( > void *arg) > { > struct inode *inode = arg; > - xfs_sync_inodes(mp, SYNC_DELWRI | SYNC_TRYLOCK); > - xfs_sync_inodes(mp, SYNC_DELWRI | SYNC_TRYLOCK | SYNC_IOWAIT); > + xfs_sync_data(mp, SYNC_TRYLOCK); > + xfs_sync_data(mp, SYNC_TRYLOCK | SYNC_IOWAIT); > iput(inode); > } > > Index: xfs/fs/xfs/linux-2.6/xfs_quotaops.c > =================================================================== > --- xfs.orig/fs/xfs/linux-2.6/xfs_quotaops.c 2009-05-14 19:05:24.908659400 +0200 > +++ xfs/fs/xfs/linux-2.6/xfs_quotaops.c 2009-05-14 19:09:05.280834851 +0200 > @@ -50,9 +50,11 @@ xfs_fs_quota_sync( > { > struct xfs_mount *mp = XFS_M(sb); > > + if (sb->s_flags & MS_RDONLY) > + return -EROFS; > if (!XFS_IS_QUOTA_RUNNING(mp)) > return -ENOSYS; > - return -xfs_sync_inodes(mp, SYNC_DELWRI); > + return -xfs_sync_data(mp, 0); > } > > STATIC int > Index: xfs/fs/xfs/linux-2.6/xfs_sync.h > =================================================================== > --- xfs.orig/fs/xfs/linux-2.6/xfs_sync.h 2009-05-14 19:09:04.694659368 +0200 > +++ xfs/fs/xfs/linux-2.6/xfs_sync.h 2009-05-14 19:09:05.280834851 +0200 > @@ -29,8 +29,6 @@ typedef struct xfs_sync_work { > struct completion *w_completion; > } xfs_sync_work_t; > > -#define SYNC_ATTR 0x0001 /* sync attributes */ > -#define SYNC_DELWRI 0x0002 /* look at delayed writes */ > #define SYNC_WAIT 0x0004 /* wait for i/o to complete */ > #define SYNC_BDFLUSH 0x0008 /* BDFLUSH is calling -- don't block */ > #define SYNC_IOWAIT 0x0010 /* wait for all I/O to complete */ > @@ -41,7 +39,8 @@ void xfs_syncd_stop(struct xfs_mount *mp > > int xfs_inode_flush(struct xfs_inode *ip, int sync); > > -int xfs_sync_inodes(struct xfs_mount *mp, int flags); > +int xfs_sync_attr(struct xfs_mount *mp, int flags); > +int xfs_sync_data(struct xfs_mount *mp, int flags); > int xfs_sync_fsdata(struct xfs_mount *mp, int flags); > > int xfs_quiesce_data(struct xfs_mount *mp); > Index: xfs/fs/xfs/xfs_filestream.c > =================================================================== > --- xfs.orig/fs/xfs/xfs_filestream.c 2009-05-14 19:05:24.929659282 +0200 > +++ xfs/fs/xfs/xfs_filestream.c 2009-05-14 19:09:05.283807995 +0200 > @@ -542,10 +542,8 @@ xfs_filestream_associate( > * waiting for the lock because someone else is waiting on the lock we > * hold and we cannot drop that as we are in a transaction here. > * > - * Lucky for us, this inversion is rarely a problem because it's a > - * directory inode that we are trying to lock here and that means the > - * only place that matters is xfs_sync_inodes() and SYNC_DELWRI is > - * used. i.e. freeze, remount-ro, quotasync or unmount. > + * Lucky for us, this inversion is not a problem because it's a > + * directory inode that we are trying to lock here. > * > * So, if we can't get the iolock without sleeping then just give up > */ > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs > From sandeen@sandeen.net Fri Jun 5 15:37:15 2009 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.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n55KbEMH063556 for ; Fri, 5 Jun 2009 15:37:14 -0500 X-ASG-Debug-ID: 1244234252-6ee001510000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mx2.redhat.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 3A6151227BB4 for ; Fri, 5 Jun 2009 13:37:32 -0700 (PDT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by cuda.sgi.com with ESMTP id YxxXBAIcD1t0BKoJ for ; Fri, 05 Jun 2009 13:37:32 -0700 (PDT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n55KbPW9000974; Fri, 5 Jun 2009 16:37:25 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n55KbOu1014171; Fri, 5 Jun 2009 16:37:24 -0400 Received: from neon.msp.redhat.com (neon.msp.redhat.com [10.15.80.10]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n55KbM8V014378; Fri, 5 Jun 2009 16:37:23 -0400 Message-ID: <4A298202.8080904@sandeen.net> Date: Fri, 05 Jun 2009 15:37:22 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Christoph Hellwig CC: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 8/7] xfs: remove SYNC_IOWAIT Subject: Re: [PATCH 8/7] xfs: remove SYNC_IOWAIT References: <20090514171233.942489000@bombadil.infradead.org> <20090528121915.GA30037@infradead.org> In-Reply-To: <20090528121915.GA30037@infradead.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-Barracuda-Connect: mx2.redhat.com[66.187.237.31] X-Barracuda-Start-Time: 1244234253 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.2.121 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Christoph Hellwig wrote: > We want to wait for all I/O to finish when we do data integrity syncs. So > there is no reason to keep SYNC_WAIT separate from SYNC_IOWAIT. This > causes a little change in behaviour for the ENOSPC flushing code which no > does a second submission and wait of buffered I/O, but that should finish > ASAP as we already did an asynchronous writeout earlier. > > > Signed-off-by: Christoph Hellwig Seems ok to me. Reviewed-by: Eric Sandeen > Index: xfs/fs/xfs/linux-2.6/xfs_sync.c > =================================================================== > --- xfs.orig/fs/xfs/linux-2.6/xfs_sync.c 2009-05-27 12:59:57.115813662 +0200 > +++ xfs/fs/xfs/linux-2.6/xfs_sync.c 2009-05-27 13:01:14.634816358 +0200 > @@ -226,7 +226,7 @@ xfs_sync_inode_data( > xfs_iunlock(ip, XFS_IOLOCK_SHARED); > > out_wait: > - if (flags & SYNC_IOWAIT) > + if (flags & SYNC_WAIT) > xfs_ioend_wait(ip); > IRELE(ip); > return error; > @@ -277,7 +277,7 @@ xfs_sync_data( > { > int error; > > - ASSERT((flags & ~(SYNC_TRYLOCK|SYNC_WAIT|SYNC_IOWAIT)) == 0); > + ASSERT((flags & ~(SYNC_TRYLOCK|SYNC_WAIT)) == 0); > > error = xfs_inode_ag_iterator(mp, xfs_sync_inode_data, flags, -1); > if (error) > @@ -419,7 +419,7 @@ xfs_quiesce_data( > xfs_filestream_flush(mp); > > /* push and block */ > - xfs_sync_data(mp, SYNC_WAIT|SYNC_IOWAIT); > + xfs_sync_data(mp, SYNC_WAIT); > xfs_qm_sync(mp, SYNC_WAIT); > > /* write superblock and hoover up shutdown errors */ > @@ -532,7 +532,7 @@ xfs_flush_inodes_work( > { > struct inode *inode = arg; > xfs_sync_data(mp, SYNC_TRYLOCK); > - xfs_sync_data(mp, SYNC_TRYLOCK | SYNC_IOWAIT); > + xfs_sync_data(mp, SYNC_TRYLOCK | SYNC_WAIT); > iput(inode); > } > > Index: xfs/fs/xfs/linux-2.6/xfs_sync.h > =================================================================== > --- xfs.orig/fs/xfs/linux-2.6/xfs_sync.h 2009-05-27 13:00:29.045814647 +0200 > +++ xfs/fs/xfs/linux-2.6/xfs_sync.h 2009-05-27 13:01:39.162941539 +0200 > @@ -31,7 +31,6 @@ typedef struct xfs_sync_work { > > #define SYNC_WAIT 0x0004 /* wait for i/o to complete */ > #define SYNC_BDFLUSH 0x0008 /* BDFLUSH is calling -- don't block */ > -#define SYNC_IOWAIT 0x0010 /* wait for all I/O to complete */ > #define SYNC_TRYLOCK 0x0020 /* only try to lock inodes */ > > int xfs_syncd_init(struct xfs_mount *mp); > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs > From sandeen@sandeen.net Fri Jun 5 15:45:08 2009 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 (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n55Kj7ZK063796 for ; Fri, 5 Jun 2009 15:45:08 -0500 X-ASG-Debug-ID: 1244234725-069c02e20000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mx2.redhat.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 611EB2D7463 for ; Fri, 5 Jun 2009 13:45:26 -0700 (PDT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by cuda.sgi.com with ESMTP id HAl5dSjIM0qgogQr for ; Fri, 05 Jun 2009 13:45:26 -0700 (PDT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n55KjHva002905; Fri, 5 Jun 2009 16:45:17 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n55KjGVt016678; Fri, 5 Jun 2009 16:45:17 -0400 Received: from neon.msp.redhat.com (neon.msp.redhat.com [10.15.80.10]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n55KjF57015671; Fri, 5 Jun 2009 16:45:16 -0400 Message-ID: <4A2983DB.90300@sandeen.net> Date: Fri, 05 Jun 2009 15:45:15 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Christoph Hellwig CC: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: [PATCH 9/7] xfs: remove SYNC_BDFLUSH Subject: Re: [PATCH 9/7] xfs: remove SYNC_BDFLUSH References: <20090514171233.942489000@bombadil.infradead.org> <20090528121947.GB30037@infradead.org> In-Reply-To: <20090528121947.GB30037@infradead.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-Barracuda-Connect: mx2.redhat.com[66.187.237.31] X-Barracuda-Start-Time: 1244234726 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.2.121 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Christoph Hellwig wrote: > SYNC_BDFLUSH is a leftover from IRIX and rather misnamed for todays > code. Make xfs_sync_fsdata and xfs_dq_sync use the SYNC_TRYLOCK flag > for not blocking on logs just as the inode sync code already does. > > For xfs_sync_fsdata it's a trivial 1:1 replacement, but for xfs_qm_sync > I use the opportunity to decouple the non-blocking lock case from the > different flushing modes, similar to the inode sync code. > > > Signed-off-by: Christoph Hellwig Reviewed-by: Eric Sandeen > Index: xfs/fs/xfs/linux-2.6/xfs_sync.c > =================================================================== > --- xfs.orig/fs/xfs/linux-2.6/xfs_sync.c 2009-05-27 13:02:57.426938830 +0200 > +++ xfs/fs/xfs/linux-2.6/xfs_sync.c 2009-05-27 13:07:53.227939055 +0200 > @@ -350,7 +350,7 @@ xfs_sync_fsdata( > * If this is xfssyncd() then only sync the superblock if we can > * lock it without sleeping and it is not pinned. > */ > - if (flags & SYNC_BDFLUSH) { > + if (flags & SYNC_TRYLOCK) { > ASSERT(!(flags & SYNC_WAIT)); > > bp = xfs_getsb(mp, XFS_BUF_TRYLOCK); > @@ -415,7 +415,7 @@ xfs_quiesce_data( > > /* push non-blocking */ > xfs_sync_data(mp, 0); > - xfs_qm_sync(mp, SYNC_BDFLUSH); > + xfs_qm_sync(mp, SYNC_TRYLOCK); > xfs_filestream_flush(mp); > > /* push and block */ > @@ -565,8 +565,8 @@ xfs_sync_worker( > xfs_log_force(mp, (xfs_lsn_t)0, XFS_LOG_FORCE); > xfs_reclaim_inodes(mp, XFS_IFLUSH_DELWRI_ELSE_ASYNC); > /* dgc: errors ignored here */ > - error = xfs_qm_sync(mp, SYNC_BDFLUSH); > - error = xfs_sync_fsdata(mp, SYNC_BDFLUSH); > + error = xfs_qm_sync(mp, SYNC_TRYLOCK); > + error = xfs_sync_fsdata(mp, SYNC_TRYLOCK); > if (xfs_log_need_covered(mp)) > error = xfs_commit_dummy_trans(mp, XFS_LOG_FORCE); > } > Index: xfs/fs/xfs/quota/xfs_qm.c > =================================================================== > --- xfs.orig/fs/xfs/quota/xfs_qm.c 2009-05-27 13:04:00.607842293 +0200 > +++ xfs/fs/xfs/quota/xfs_qm.c 2009-05-27 13:10:21.688940102 +0200 > @@ -905,11 +905,6 @@ xfs_qm_dqdetach( > } > } > > -/* > - * This is called to sync quotas. We can be told to use non-blocking > - * semantics by either the SYNC_BDFLUSH flag or the absence of the > - * SYNC_WAIT flag. > - */ > int > xfs_qm_sync( > xfs_mount_t *mp, > @@ -918,17 +913,13 @@ xfs_qm_sync( > int recl, restarts; > xfs_dquot_t *dqp; > uint flush_flags; > - boolean_t nowait; > int error; > > if (!XFS_IS_QUOTA_RUNNING(mp) || !XFS_IS_QUOTA_ON(mp)) > return 0; > > + flush_flags = (flags & SYNC_WAIT) ? XFS_QMOPT_SYNC : XFS_QMOPT_DELWRI; > restarts = 0; > - /* > - * We won't block unless we are asked to. > - */ > - nowait = (boolean_t)(flags & SYNC_BDFLUSH || (flags & SYNC_WAIT) == 0); > > again: > xfs_qm_mplist_lock(mp); > @@ -948,18 +939,10 @@ xfs_qm_sync( > * don't 'seem' to be dirty. ie. don't acquire dqlock. > * This is very similar to what xfs_sync does with inodes. > */ > - if (flags & SYNC_BDFLUSH) { > - if (! XFS_DQ_IS_DIRTY(dqp)) > + if (flags & SYNC_TRYLOCK) { > + if (!XFS_DQ_IS_DIRTY(dqp)) > continue; > - } > - > - if (nowait) { > - /* > - * Try to acquire the dquot lock. We are NOT out of > - * lock order, but we just don't want to wait for this > - * lock, unless somebody wanted us to. > - */ > - if (! xfs_qm_dqlock_nowait(dqp)) > + if (!xfs_qm_dqlock_nowait(dqp)) > continue; > } else { > xfs_dqlock(dqp); > @@ -976,7 +959,7 @@ xfs_qm_sync( > /* XXX a sentinel would be better */ > recl = XFS_QI_MPLRECLAIMS(mp); > if (!xfs_dqflock_nowait(dqp)) { > - if (nowait) { > + if (flags & SYNC_TRYLOCK) { > xfs_dqunlock(dqp); > continue; > } > @@ -994,7 +977,6 @@ xfs_qm_sync( > * Let go of the mplist lock. We don't want to hold it > * across a disk write > */ > - flush_flags = (nowait) ? XFS_QMOPT_DELWRI : XFS_QMOPT_SYNC; > xfs_qm_mplist_unlock(mp); > xfs_dqtrace_entry(dqp, "XQM_SYNC: DQFLUSH"); > error = xfs_qm_dqflush(dqp, flush_flags); > Index: xfs/fs/xfs/linux-2.6/xfs_sync.h > =================================================================== > --- xfs.orig/fs/xfs/linux-2.6/xfs_sync.h 2009-05-27 13:07:58.997814418 +0200 > +++ xfs/fs/xfs/linux-2.6/xfs_sync.h 2009-05-27 13:08:19.922972203 +0200 > @@ -29,9 +29,8 @@ typedef struct xfs_sync_work { > struct completion *w_completion; > } xfs_sync_work_t; > > -#define SYNC_WAIT 0x0004 /* wait for i/o to complete */ > -#define SYNC_BDFLUSH 0x0008 /* BDFLUSH is calling -- don't block */ > -#define SYNC_TRYLOCK 0x0020 /* only try to lock inodes */ > +#define SYNC_WAIT 0x0001 /* wait for i/o to complete */ > +#define SYNC_TRYLOCK 0x0002 /* only try to lock inodes */ > > int xfs_syncd_init(struct xfs_mount *mp); > void xfs_syncd_stop(struct xfs_mount *mp); > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs > From sandeen@sandeen.net Fri Jun 5 16:17:39 2009 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 (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n55LHdgG064828 for ; Fri, 5 Jun 2009 16:17:39 -0500 X-ASG-Debug-ID: 1244236677-075a03740000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mx2.redhat.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id DA5B02D75CC for ; Fri, 5 Jun 2009 14:17:57 -0700 (PDT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by cuda.sgi.com with ESMTP id A8luaQXndeXDfFWL for ; Fri, 05 Jun 2009 14:17:57 -0700 (PDT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n55LHuc0010044 for ; Fri, 5 Jun 2009 17:17:56 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n55LHuQX026173 for ; Fri, 5 Jun 2009 17:17:56 -0400 Received: from neon.msp.redhat.com (neon.msp.redhat.com [10.15.80.10]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n55LHs3k020198 for ; Fri, 5 Jun 2009 17:17:55 -0400 Message-ID: <4A298B82.3050903@sandeen.net> Date: Fri, 05 Jun 2009 16:17:54 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: xfs mailing list X-ASG-Orig-Subj: [PATCH xfstests: Make "new" script insert appropriate license on tests Subject: [PATCH xfstests: Make "new" script insert appropriate license on tests Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-Barracuda-Connect: mx2.redhat.com[66.187.237.31] X-Barracuda-Start-Time: 1244236677 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.2.122 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Don't default to SGI copyright, someone else may be making this test... Signed-off-by: Eric Sandeen --- iff --git a/new b/new index 45ff163..8e32824 100755 --- a/new +++ b/new @@ -79,6 +79,8 @@ fi echo -n "Creating skeletal script for you to edit ..." +year=`date +%Y` + cat <$id #! /bin/sh # FS QA Test No. $id @@ -86,7 +88,20 @@ cat <$id # what am I here for? # #----------------------------------------------------------------------- -# Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) $year YOUR NAME HERE. 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 #----------------------------------------------------------------------- # # creator From BATV+464f3644bd103b0265ce+2112+infradead.org+hch@bombadil.srs.infradead.org Fri Jun 5 16:38:53 2009 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.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n55Lcr98065585 for ; Fri, 5 Jun 2009 16:38:53 -0500 X-ASG-Debug-ID: 1244237951-6ef1034d0000-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 549281228BA2 for ; Fri, 5 Jun 2009 14:39:11 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id 0ZmTFKW8VGu7YkTt for ; Fri, 05 Jun 2009 14:39:11 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MCh83-0002Cd-2E; Fri, 05 Jun 2009 21:39:11 +0000 Date: Fri, 5 Jun 2009 17:39:11 -0400 From: Christoph Hellwig To: Eric Sandeen Cc: xfs mailing list X-ASG-Orig-Subj: Re: [PATCH xfstests: Make "new" script insert appropriate license on tests Subject: Re: [PATCH xfstests: Make "new" script insert appropriate license on tests Message-ID: <20090605213910.GA7315@infradead.org> References: <4A298B82.3050903@sandeen.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A298B82.3050903@sandeen.net> 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: 1244237952 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Fri, Jun 05, 2009 at 04:17:54PM -0500, Eric Sandeen wrote: > Don't default to SGI copyright, someone else may be > making this test... Ah nice one. Reviewed-by: Christoph Hellwig Mabe it's also time to audit new if actually creates a skeleton up to the latest standards for test cases? From felixb@sgi.com Fri Jun 5 17:14:08 2009 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 relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n55ME8Fm066546 for ; Fri, 5 Jun 2009 17:14:08 -0500 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay1.corp.sgi.com (Postfix) with ESMTP id 919758F81B4 for ; Fri, 5 Jun 2009 15:14:24 -0700 (PDT) Received: from eagdhcp-232-151.americas.sgi.com (eagdhcp-232-151.americas.sgi.com [128.162.232.151]) by estes.americas.sgi.com (Postfix) with ESMTP id 52031700016A; Fri, 5 Jun 2009 17:14:24 -0500 (CDT) Cc: xfs mailing list Message-Id: From: Felix Blyakher To: Eric Sandeen In-Reply-To: <4A298B82.3050903@sandeen.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Subject: Re: [PATCH xfstests: Make "new" script insert appropriate license on tests Date: Fri, 5 Jun 2009 17:14:24 -0500 References: <4A298B82.3050903@sandeen.net> X-Mailer: Apple Mail (2.926) X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Jun 5, 2009, at 4:17 PM, Eric Sandeen wrote: > Don't default to SGI copyright, someone else may be > making this test... > > Signed-off-by: Eric Sandeen Reviewed-by: Felix Blyakher > > --- > > iff --git a/new b/new > index 45ff163..8e32824 100755 > --- a/new > +++ b/new > @@ -79,6 +79,8 @@ fi > > echo -n "Creating skeletal script for you to edit ..." > > +year=`date +%Y` > + > cat <$id > #! /bin/sh > # FS QA Test No. $id > @@ -86,7 +88,20 @@ cat <$id > # what am I here for? > # > #----------------------------------------------------------------------- > -# Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights > Reserved. > +# Copyright (c) $year YOUR NAME HERE. 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 > #----------------------------------------------------------------------- > # > # creator > > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs From richard@intrameta.com Fri Jun 5 17:24:24 2009 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=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.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n55MOOBx066788 for ; Fri, 5 Jun 2009 17:24:24 -0500 X-ASG-Debug-ID: 1244240680-6bae01c90000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail.sigil.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id E3D07122A63A for ; Fri, 5 Jun 2009 15:24:40 -0700 (PDT) Received: from mail.sigil.org (tx1-250.intrameta.com [69.13.51.250]) by cuda.sgi.com with ESMTP id 3EmCdUAOF3zOIpAc for ; Fri, 05 Jun 2009 15:24:40 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.sigil.org (Postfix) with ESMTP id 3C67BB249 for ; Fri, 5 Jun 2009 15:46:49 -0500 (CDT) X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Scanned: amavisd-new at sigil.org Received: from mail.sigil.org ([127.0.0.1]) by localhost (mail.sigil.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id LB2lBfHeeqXv for ; Fri, 5 Jun 2009 15:46:46 -0500 (CDT) Received: from magus.portal.sigil.org (ip72-202-157-83.ks.ks.cox.net [72.202.157.83]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sigil.org (Postfix) with ESMTPSA id 9A833B256 for ; Fri, 5 Jun 2009 15:46:45 -0500 (CDT) Date: Fri, 5 Jun 2009 17:22:37 -0500 From: Richard Kolkovich To: xfs@oss.sgi.com X-ASG-Orig-Subj: Segmentation fault during xfs_repair Subject: Segmentation fault during xfs_repair Message-ID: <20090605222236.GA39825@magus.portal.sigil.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-OS: FreeBSD magus 7.2-PRERELEASE i386 X-Composed-With: vim User-Agent: Mutt/1.5.19 (2009-01-05) X-Barracuda-Connect: tx1-250.intrameta.com[69.13.51.250] X-Barracuda-Start-Time: 1244240680 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.2.126 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Status: Clean We have a corrupted XFS partition on a storage server. Attempting to run xfs_repair the first time yielded the message about a corrupt log file, so I have run xfs_repair with -L to clear that. Now, xfs_repair segfaults in Phase 3. I have tried -P and a huge -m to no avail. It always seems to segfault at the same point: bad directory block magic # 0 in block 11 for directory inode 341521797 corrupt block 11 in directory inode 341521797 will junk block Segmentation fault (core dumped) Here is the backtrace: (gdb) bt #0 traverse_int_dir2block (mp=0x7fff4243c1d0, da_cursor=0x7fff4243bca0, rbno=0x7fff4243bd98) at dir2.c:358 #1 0x000000000041650e in process_node_dir2 () at dir2.c:1940 #2 process_leaf_node_dir2 (mp=0x7fff4243c1d0, ino=341521797, dip=0x27131600, ino_discovery=1, dirname=0x46bdcd "", parent=0x7fff4243c080, blkmap=0x7f8828b5c060, dot=0x7fff4243be6c, dotdot=0x7fff4243be68, repair=0x7fff4243be64, isnode=1) at dir2.c:2033 #3 0x00000000004182cc in process_dir2 (mp=0x7fff4243c1d0, ino=341521797, dip=0x27131600, ino_discovery=1, dino_dirty=0x7fff4243c090, dirname=0x46bdcd "", parent=0x7fff4243c080, blkmap=0x7f8828b5c060) at dir2.c:2086 #4 0x000000000040f9dc in process_dinode_int (mp=0x7fff4243c1d0, dino=0x27131600, agno=5, ino=5977477, was_free=0, dirty=0x7fff4243c090, used=0x7fff4243c094, verify_mode=0, uncertain=0, ino_discovery=1, check_dups=0, extra_attr_check=1, isa_dir=0x7fff4243c08c, parent=0x7fff4243c080) at dinode.c:2668 #5 0x000000000040fbae in process_dinode (mp=0x7fff4254c438, dino=0x7fff4254c418, agno=939524166, ino=5888, was_free=46501, dirty=0x3, used=0x7fff4243c094, ino_discovery=1, check_dups=0, extra_attr_check=1, isa_dir=0x7fff4243c08c, parent=0x7fff4243c080) at dinode.c:2779 #6 0x00000000004088f6 in process_inode_chunk (mp=0x7fff4243c1d0, agno=5, num_inos=, first_irec=0x2198f60, ino_discovery=1, check_dups=0, extra_attr_check=1, bogus=0x7fff4243c114) at dino_chunks.c:778 #7 0x0000000000408edd in process_aginodes (mp=0x7fff4243c1d0, pf_args=0x7f88284d97b0, agno=5, ino_discovery=1, check_dups=0, extra_attr_check=1) at dino_chunks.c:1024 #8 0x000000000041bfdf in process_ag_func (wq=0x2003730, agno=5, arg=0x7f88284d97b0) at phase3.c:161 #9 0x000000000041c79b in process_ags () at phase3.c:200 #10 phase3 (mp=0x7fff4243c1d0) at phase3.c:239 #11 0x0000000000432435 in main (argc=, argv=) at xfs_repair.c:719 I can provide the full core file, if need be (956M). The xfs_metadump can be found at: http://files.intrameta.com/metadump.gz (735M) Any suggestions/ideas on how to proceed are welcome. Please Reply-All, as I'm not subscribed to the ML. Thanks, -- Richard Kolkovich IntraMeta Corporation richard@intrameta.com From sandeen@sandeen.net Fri Jun 5 21:45:22 2009 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 cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n562jL91078978 for ; Fri, 5 Jun 2009 21:45:21 -0500 X-ASG-Debug-ID: 1244256339-59d203330000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail.sandeen.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id DC5FD121B40F for ; Fri, 5 Jun 2009 19:45:39 -0700 (PDT) Received: from mail.sandeen.net (sandeen.net [209.173.210.139]) by cuda.sgi.com with ESMTP id hvlbqEN6HOWw24Rb for ; Fri, 05 Jun 2009 19:45:39 -0700 (PDT) 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 mail.sandeen.net (Postfix) with ESMTP id 8DCB3A9DAD0; Fri, 5 Jun 2009 21:45:37 -0500 (CDT) Message-ID: <4A29D851.9000700@sandeen.net> Date: Fri, 05 Jun 2009 21:45:37 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: Richard Kolkovich CC: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: Segmentation fault during xfs_repair Subject: Re: Segmentation fault during xfs_repair References: <20090605222236.GA39825@magus.portal.sigil.org> In-Reply-To: <20090605222236.GA39825@magus.portal.sigil.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: 1244256339 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.2.140 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Richard Kolkovich wrote: > We have a corrupted XFS partition on a storage server. Attempting to run xfs_repair the first time yielded the message about a corrupt log file, so I have run xfs_repair with -L to clear that. Now, xfs_repair segfaults in Phase 3. I have tried -P and a huge -m to no avail. It always seems to segfault at the same point: > > bad directory block magic # 0 in block 11 for directory inode 341521797 > corrupt block 11 in directory inode 341521797 > will junk block > Segmentation fault (core dumped) For starters, which xfsprogs version.... if not latest, try latest... if latest, I'll grab that metadump image and see if I can reproduce it. -Eric > Here is the backtrace: > > (gdb) bt > #0 traverse_int_dir2block (mp=0x7fff4243c1d0, da_cursor=0x7fff4243bca0, rbno=0x7fff4243bd98) > at dir2.c:358 > #1 0x000000000041650e in process_node_dir2 () at dir2.c:1940 > #2 process_leaf_node_dir2 (mp=0x7fff4243c1d0, ino=341521797, dip=0x27131600, ino_discovery=1, > dirname=0x46bdcd "", parent=0x7fff4243c080, blkmap=0x7f8828b5c060, dot=0x7fff4243be6c, > dotdot=0x7fff4243be68, repair=0x7fff4243be64, isnode=1) at dir2.c:2033 > #3 0x00000000004182cc in process_dir2 (mp=0x7fff4243c1d0, ino=341521797, dip=0x27131600, > ino_discovery=1, dino_dirty=0x7fff4243c090, dirname=0x46bdcd "", parent=0x7fff4243c080, > blkmap=0x7f8828b5c060) at dir2.c:2086 > #4 0x000000000040f9dc in process_dinode_int (mp=0x7fff4243c1d0, dino=0x27131600, agno=5, > ino=5977477, was_free=0, dirty=0x7fff4243c090, used=0x7fff4243c094, verify_mode=0, > uncertain=0, ino_discovery=1, check_dups=0, extra_attr_check=1, isa_dir=0x7fff4243c08c, > parent=0x7fff4243c080) at dinode.c:2668 > #5 0x000000000040fbae in process_dinode (mp=0x7fff4254c438, dino=0x7fff4254c418, agno=939524166, > ino=5888, was_free=46501, dirty=0x3, used=0x7fff4243c094, ino_discovery=1, check_dups=0, > extra_attr_check=1, isa_dir=0x7fff4243c08c, parent=0x7fff4243c080) at dinode.c:2779 > #6 0x00000000004088f6 in process_inode_chunk (mp=0x7fff4243c1d0, agno=5, > num_inos=, first_irec=0x2198f60, ino_discovery=1, check_dups=0, > extra_attr_check=1, bogus=0x7fff4243c114) at dino_chunks.c:778 > #7 0x0000000000408edd in process_aginodes (mp=0x7fff4243c1d0, pf_args=0x7f88284d97b0, agno=5, > ino_discovery=1, check_dups=0, extra_attr_check=1) at dino_chunks.c:1024 > #8 0x000000000041bfdf in process_ag_func (wq=0x2003730, agno=5, arg=0x7f88284d97b0) > at phase3.c:161 > #9 0x000000000041c79b in process_ags () at phase3.c:200 > #10 phase3 (mp=0x7fff4243c1d0) at phase3.c:239 > #11 0x0000000000432435 in main (argc=, argv=) > at xfs_repair.c:719 > > I can provide the full core file, if need be (956M). The xfs_metadump can be found at: > > http://files.intrameta.com/metadump.gz (735M) > > Any suggestions/ideas on how to proceed are welcome. Please Reply-All, as I'm not subscribed to the ML. > > Thanks, > From richard@intrameta.com Fri Jun 5 22:16:25 2009 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=BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n563GOKQ081080 for ; Fri, 5 Jun 2009 22:16:25 -0500 X-ASG-Debug-ID: 1244258609-29fe01110000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail.sigil.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 695C21266E5A for ; Fri, 5 Jun 2009 20:23:29 -0700 (PDT) Received: from mail.sigil.org (tx1-250.intrameta.com [69.13.51.250]) by cuda.sgi.com with ESMTP id eZ5AKRg7AIHNlD81 for ; Fri, 05 Jun 2009 20:23:29 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.sigil.org (Postfix) with ESMTP id A8846B2A5; Fri, 5 Jun 2009 20:38:50 -0500 (CDT) X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Scanned: amavisd-new at sigil.org Received: from mail.sigil.org ([127.0.0.1]) by localhost (mail.sigil.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id z1Rwbm-CwgHR; Fri, 5 Jun 2009 20:38:49 -0500 (CDT) Received: from magus.portal.sigil.org (ip72-202-157-83.ks.ks.cox.net [72.202.157.83]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sigil.org (Postfix) with ESMTPSA id DC8E8B291; Fri, 5 Jun 2009 20:38:48 -0500 (CDT) Date: Fri, 5 Jun 2009 22:14:46 -0500 From: Richard Kolkovich To: Eric Sandeen Cc: "xfs@oss.sgi.com" X-ASG-Orig-Subj: Re: Segmentation fault during xfs_repair Subject: Re: Segmentation fault during xfs_repair Message-ID: <20090606031445.GB39825@magus.portal.sigil.org> References: <20090605222236.GA39825@magus.portal.sigil.org> <4A29D851.9000700@sandeen.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A29D851.9000700@sandeen.net> X-OS: FreeBSD magus 7.2-PRERELEASE i386 X-Composed-With: vim User-Agent: Mutt/1.5.19 (2009-01-05) X-Barracuda-Connect: tx1-250.intrameta.com[69.13.51.250] X-Barracuda-Start-Time: 1244258610 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.2.143 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Status: Clean On Fri, Jun 05, 2009 at 10:45:37PM -0400, Eric Sandeen wrote: > Richard Kolkovich wrote: > > We have a corrupted XFS partition on a storage server. Attempting to run xfs_repair the first time yielded the message about a corrupt log file, so I have run xfs_repair with -L to clear that. Now, xfs_repair segfaults in Phase 3. I have tried -P and a huge -m to no avail. It always seems to segfault at the same point: > > > > bad directory block magic # 0 in block 11 for directory inode 341521797 > > corrupt block 11 in directory inode 341521797 > > will junk block > > Segmentation fault (core dumped) > > For starters, which xfsprogs version.... if not latest, try latest... if > latest, I'll grab that metadump image and see if I can reproduce it. > > -Eric Sorry - forgot to mention that. Running on Fedora 11 (64bit). Tried using 2.10.2 (from yum) and building from latest stable source (3.0.1). Let me know if I should try a dev build. Thanks, -- Richard Kolkovich IntraMeta Corporation richard@intrameta.com From sandeen@sandeen.net Fri Jun 5 22:30:05 2009 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 cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n563U4Io082000 for ; Fri, 5 Jun 2009 22:30:04 -0500 X-ASG-Debug-ID: 1244259429-2a1601be0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail.sandeen.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 1231B1266ECB for ; Fri, 5 Jun 2009 20:37:09 -0700 (PDT) Received: from mail.sandeen.net (sandeen.net [209.173.210.139]) by cuda.sgi.com with ESMTP id BSpL2SSPCGI8E08a for ; Fri, 05 Jun 2009 20:37:09 -0700 (PDT) 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 mail.sandeen.net (Postfix) with ESMTP id E7567AC08EC; Fri, 5 Jun 2009 22:25:21 -0500 (CDT) Message-ID: <4A29E1A1.1010202@sandeen.net> Date: Fri, 05 Jun 2009 22:25:21 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: Richard Kolkovich CC: "xfs@oss.sgi.com" X-ASG-Orig-Subj: Re: Segmentation fault during xfs_repair Subject: Re: Segmentation fault during xfs_repair References: <20090605222236.GA39825@magus.portal.sigil.org> <4A29D851.9000700@sandeen.net> <20090606031445.GB39825@magus.portal.sigil.org> In-Reply-To: <20090606031445.GB39825@magus.portal.sigil.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: 1244259430 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.2.145 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Richard Kolkovich wrote: > On Fri, Jun 05, 2009 at 10:45:37PM -0400, Eric Sandeen wrote: >> Richard Kolkovich wrote: >>> We have a corrupted XFS partition on a storage server. >>> Attempting to run xfs_repair the first time yielded the message >>> about a corrupt log file, so I have run xfs_repair with -L to >>> clear that. Now, xfs_repair segfaults in Phase 3. I have tried >>> -P and a huge -m to no avail. It always seems to segfault at the >>> same point: >>> >>> bad directory block magic # 0 in block 11 for directory inode >>> 341521797 corrupt block 11 in directory inode 341521797 will junk >>> block Segmentation fault (core dumped) >> For starters, which xfsprogs version.... if not latest, try >> latest... if latest, I'll grab that metadump image and see if I can >> reproduce it. >> >> -Eric > > Sorry - forgot to mention that. > > Running on Fedora 11 (64bit). Tried using 2.10.2 (from yum) and > building from latest stable source (3.0.1). Let me know if I should > try a dev build. (Hm, did I really leave F11 at 2.10.2? I thought it was newer, but anyway) No, I doubt anything else has fixed this since 3.0.1 I'll try pulling down that metadump image & see what I can see. Feel free to file an xfsprogs bug with fedora, too, so the issue doesn't get lost... -Eric > Thanks, > From sandeen@sandeen.net Fri Jun 5 23:43:50 2009 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 cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n564hnkQ084813 for ; Fri, 5 Jun 2009 23:43:49 -0500 X-ASG-Debug-ID: 1244263447-5f5802d40000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail.sandeen.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 70EB22D8079 for ; Fri, 5 Jun 2009 21:44:07 -0700 (PDT) Received: from mail.sandeen.net (sandeen.net [209.173.210.139]) by cuda.sgi.com with ESMTP id SvtPnejOUdtzHRiT for ; Fri, 05 Jun 2009 21:44:07 -0700 (PDT) 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 mail.sandeen.net (Postfix) with ESMTP id 48927AC08EC; Fri, 5 Jun 2009 23:44:06 -0500 (CDT) Message-ID: <4A29F415.5020203@sandeen.net> Date: Fri, 05 Jun 2009 23:44:05 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: Richard Kolkovich CC: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: Segmentation fault during xfs_repair Subject: Re: Segmentation fault during xfs_repair References: <20090605222236.GA39825@magus.portal.sigil.org> In-Reply-To: <20090605222236.GA39825@magus.portal.sigil.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: 1244263448 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.2.148 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Richard Kolkovich wrote: > We have a corrupted XFS partition on a storage server. Attempting to run xfs_repair the first time yielded the message about a corrupt log file, so I have run xfs_repair with -L to clear that. Now, xfs_repair segfaults in Phase 3. I have tried -P and a huge -m to no avail. It always seems to segfault at the same point: > > bad directory block magic # 0 in block 11 for directory inode 341521797 > corrupt block 11 in directory inode 341521797 > will junk block > Segmentation fault (core dumped) ... > I can provide the full core file, if need be (956M). The xfs_metadump can be found at: > > http://files.intrameta.com/metadump.gz (735M) > > Any suggestions/ideas on how to proceed are welcome. Please Reply-All, as I'm not subscribed to the ML. Ok, on a -g (not -02) build: Program terminated with signal 11, Segmentation fault. #0 0x0000000000418d05 in traverse_int_dir2block (mp=0x7ffff4c4f150, da_cursor=0x7ffff4c4eb30, rbno=0x7ffff4c4ebdc) at dir2.c:356 356 da_cursor->level[i].hashval = (gdb) p i $1 = 46501 i is set from i = da_cursor->active = be16_to_cpu(node->hdr.level); (gdb) p node->hdr.level // note this is big endian $2 = 42421 that's a crazily deep btree, well beyond anything sane: #define XFS_DA_NODE_MAXDEPTH 5 /* max depth of Btree */ So repair really should be checking for this before it goes off and indexes it: 356 da_cursor->level[i].hashval = because the cursor only has this much in the array: dir2_level_state_t level[XFS_DA_NODE_MAXDEPTH]; I'll have to ponder what repair should do in this case ... and I'll see if there's something we can do in xfs_db to just whack out this problem and let repair continue for now. -Eric From sandeen@sandeen.net Sat Jun 6 00:09:55 2009 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 cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n5659s6U088127 for ; Sat, 6 Jun 2009 00:09:54 -0500 X-ASG-Debug-ID: 1244265012-5f3703ab0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail.sandeen.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 665652D81C0 for ; Fri, 5 Jun 2009 22:10:12 -0700 (PDT) Received: from mail.sandeen.net (sandeen.net [209.173.210.139]) by cuda.sgi.com with ESMTP id kINJbCMyinVaDi4k for ; Fri, 05 Jun 2009 22:10:12 -0700 (PDT) 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 mail.sandeen.net (Postfix) with ESMTP id A4654AC08EC; Sat, 6 Jun 2009 00:10:12 -0500 (CDT) Message-ID: <4A29FA34.5020809@sandeen.net> Date: Sat, 06 Jun 2009 00:10:12 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: Richard Kolkovich CC: xfs@oss.sgi.com X-ASG-Orig-Subj: Re: Segmentation fault during xfs_repair Subject: Re: Segmentation fault during xfs_repair References: <20090605222236.GA39825@magus.portal.sigil.org> <4A29F415.5020203@sandeen.net> In-Reply-To: <4A29F415.5020203@sandeen.net> 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: 1244265013 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.2.149 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Eric Sandeen wrote: > I'll have to ponder what repair should do in this case ... and I'll see > if there's something we can do in xfs_db to just whack out this problem > and let repair continue for now. > > -Eric > > This should get you over that hump I think: --- xfsprogs-3.0.1.orig/repair/dir2.c 2009-06-06 00:01:10.711081870 -0500 +++ xfsprogs-3.0.1/repair/dir2.c 2009-06-06 00:05:52.993365954 -0500 @@ -353,6 +353,14 @@ } } + if (i >= XFS_DA_NODE_MAXDEPTH) { + do_warn(_("bad header depth for directory inode %llu\n"), + da_cursor->ino); + da_brelse(bp); + i = -1; + goto error_out; + } + da_cursor->level[i].hashval = be32_to_cpu(node->btree[0].hashval); da_cursor->level[i].bp = bp; but I have to say, that is one fried filesystem you've got there.... -Eric From nobody@server20.speedpacket.com Sun Jun 7 11:23:48 2009 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=BAYES_50,SUBJ_ALL_CAPS autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n57GNjqJ176526 for ; Sun, 7 Jun 2009 11:23:48 -0500 X-ASG-Debug-ID: 1244392258-63b201290000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from server20.speedpacket.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 7A72D148ED27 for ; Sun, 7 Jun 2009 09:30:58 -0700 (PDT) Received: from server20.speedpacket.com (server20.speedpacket.com [84.40.22.45]) by cuda.sgi.com with ESMTP id 11UWCcgravBTfKe6 for ; Sun, 07 Jun 2009 09:30:58 -0700 (PDT) Received: from nobody by server20.speedpacket.com with local (Exim 4.69) (envelope-from ) id 1MDL9P-000659-Aj for xfs@oss.sgi.com; Sun, 07 Jun 2009 18:23:15 +0200 To: xfs@oss.sgi.com X-ASG-Orig-Subj: UPGRADE NOTICE!! Subject: UPGRADE NOTICE!! X-PHP-Script: www.geelonline.be/raffer/x.php for 80.255.59.242 From: Erasmusmc Technical Services Reply-To: stc697@gmail.com MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit Message-Id: Date: Sun, 07 Jun 2009 18:23:15 +0200 X-SPEEDPACKET-MailScanner-Information: Please contact the ISP for more information X-SPEEDPACKET-MailScanner-ID: 1MDL9P-000659-Aj X-SPEEDPACKET-MailScanner: Found to be clean X-SPEEDPACKET-MailScanner-MCPCheck: X-SPEEDPACKET-MailScanner-SpamCheck: X-SPEEDPACKET-MailScanner-From: nobody@server20.speedpacket.com X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server20.speedpacket.com X-AntiAbuse: Original Domain - oss.sgi.com X-AntiAbuse: Originator/Caller UID/GID - [99 32002] / [47 12] X-AntiAbuse: Sender Address Domain - server20.speedpacket.com X-Source: X-Source-Args: X-Source-Dir: X-Barracuda-Connect: server20.speedpacket.com[84.40.22.45] X-Barracuda-Start-Time: 1244392260 X-Barracuda-Bayes: INNOCENT GLOBAL 0.4935 1.0000 0.0000 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: 1.50 X-Barracuda-Spam-Status: No, SCORE=1.50 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=BSF_SC0_SA372b X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.282 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 1.50 BSF_SC0_SA372b Custom Rule SA372b X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Dear Erasmusmc Webmail Account Subscriber, We are currently performing maintenance on our Digital webmail Server. We intend upgrading our Digital Erasmusmc webmail Security Server for better online services due to spam mail and virus. In order to ensure you do not experience service interruption, Please you have to repond to this email immediately and enter your Username here (**********) and password here (**********) and Checkout your new features and enhancements with your new and improved Erasmusmc mail account. To enable us upgrade your Account for better online services please reply to this mail. NB: We request your username and password for Identification purpose only. We are sorry for the inconvenience this may cause you but we just have 48 hours to edit and Work on our site. ----Erasmusmc Webmail Technical Services.----- From news@mgras.net Sun Jun 7 12:29:21 2009 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 (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n57HTJQL180255 for ; Sun, 7 Jun 2009 12:29:21 -0500 X-ASG-Debug-ID: 1244396191-1259018e0000-w1Z2WR X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from foehn.mgras.de (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 3A976148F196 for ; Sun, 7 Jun 2009 10:36:31 -0700 (PDT) Received: from foehn.mgras.de (quickstep.mgras.net [213.146.115.59]) by cuda.sgi.com with ESMTP id bb5PBfNGKnoB3Wvw for ; Sun, 07 Jun 2009 10:36:31 -0700 (PDT) Received: from osprey.mgras.de (osprey.mgras.de [192.168.48.3]) by foehn.mgras.de (8.13.1/8.13.0) with ESMTP id n57HSk7i027958 for ; Sun, 7 Jun 2009 19:28:46 +0200 (CEST) Received: (from news@localhost) by osprey.mgras.de (AIX5.1/8.11.6p2/8.11.0) id n57HSjY34724 for linux-xfs@oss.sgi.com; Sun, 7 Jun 2009 19:28:45 +0200 To: linux-xfs@oss.sgi.com Path: not-for-mail From: Martin Spott Newsgroups: list.linux-xfs X-ASG-Orig-Subj: Re: Kernel crash with 2.6.29 + nfs + xfs (radix-tree) Subject: Re: Kernel crash with 2.6.29 + nfs + xfs (radix-tree) Date: Sun, 7 Jun 2009 17:28:45 +0000 (UTC) Organization: home Lines: 44 Message-ID: References: <20090520003745.GA27491@samad.com.au> <20090604112657.GA10738@infradead.org> NNTP-Posting-Host: jive.mgras.de X-Trace: osprey.mgras.de 1244395725 36062 192.168.48.5 (7 Jun 2009 17:28:45 GMT) X-Complaints-To: usenet@mgras.net NNTP-Posting-Date: Sun, 7 Jun 2009 17:28:45 +0000 (UTC) User-Agent: tin/1.9.3-20080506 ("Dalintober") (UNIX) (Linux/2.6.29.4 (x86_64)) X-Barracuda-Connect: quickstep.mgras.net[213.146.115.59] X-Barracuda-Start-Time: 1244396194 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: -1.52 X-Barracuda-Spam-Status: No, SCORE=-1.52 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.288 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Hi Christoph, Christoph Hellwig wrote: > Sorry guys, still haven't been able to track it down. Any chance one > of you could run with CONFIG_XFS_DEBUG enabled and see if it trips > over any of the asserts? "Say N unless you are an XFS developer, or you play one on TV." Very nice ;-) I'm have to regret that I'm neither an XFS developer nor do I pretend to be one. Yet, as I understand, I should see at least _some_ debug info via 'dmesg', if there is any. Apparently the kernel is now having XFS with debugging enabled: Jun 7 18:53:33 isnix1 kernel: SGI XFS with ACLs, security attributes, large block/inode numbers, debug enabled Jun 7 18:53:33 isnix1 kernel: SGI XFS Quota Management subsystem Jun 7 18:53:33 isnix1 kernel: XFS mounting filesystem cciss/c0d0p2 [...] .... but aside from the well-known messages as: Installing knfsd (copyright (C) 1996 okir@monad.swb.de). NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory NFSD: unable to find recovery directory /var/lib/nfs/v4recovery NFSD: starting 90-second grace period reconnect_path: npd != pd reconnect_path: npd != pd reconnect_path: npd != pd [...] .... I'm unable to find any helpful information in this context. Anything I could try - this sunday evening ? Cheers, Martin. -- Unix _IS_ user friendly - it's just selective about who its friends are ! -------------------------------------------------------------------------- From felixb@sgi.com Sun Jun 7 13:27:06 2009 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 relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n57IR5pe183381 for ; Sun, 7 Jun 2009 13:27:06 -0500 Received: from estes.americas.sgi.com (estes.americas.sgi.com [128.162.236.10]) by relay3.corp.sgi.com (Postfix) with ESMTP id 9FF14AC00A for ; Sun, 7 Jun 2009 11:27:22 -0700 (PDT) Received: from [IPv6???1] (sshgate.corp.sgi.com [198.149.20.12]) by estes.americas.sgi.com (Postfix) with ESMTP id 1CB5970001C8; Sun, 7 Jun 2009 13:27:22 -0500 (CDT) Cc: linux-xfs@oss.sgi.com Message-Id: <1641C8DC-0F15-4085-9A01-4B86E8B4BF6C@sgi.com> From: Felix Blyakher To: Martin Spott In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: Kernel crash with 2.6.29 + nfs + xfs (radix-tree) Date: Sun, 7 Jun 2009 13:27:20 -0500 References: <20090520003745.GA27491@samad.com.au> <20090604112657.GA10738@infradead.org> X-Mailer: Apple Mail (2.930.3) X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Jun 7, 2009, at 12:28 PM, Martin Spott wrote: > Hi Christoph, > > Christoph Hellwig wrote: > >> Sorry guys, still haven't been able to track it down. Any chance one >> of you could run with CONFIG_XFS_DEBUG enabled and see if it trips >> over any of the asserts? > > "Say N unless you are an XFS developer, or you play one on TV." Or unless you're told by an XFS developer :) > > > Very nice ;-) > > I'm have to regret that I'm neither an XFS developer nor do I pretend > to be one. Yet, as I understand, I should see at least _some_ debug > info via 'dmesg', if there is any. Apparently the kernel is now having > XFS with debugging enabled: > > Jun 7 18:53:33 isnix1 kernel: SGI XFS with ACLs, security > attributes, large block/inode numbers, debug enabled > Jun 7 18:53:33 isnix1 kernel: SGI XFS Quota Management subsystem > Jun 7 18:53:33 isnix1 kernel: XFS mounting filesystem cciss/c0d0p2 > [...] > > > .... but aside from the well-known messages as: > > Installing knfsd (copyright (C) 1996 okir@monad.swb.de). > NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery > directory > NFSD: unable to find recovery directory /var/lib/nfs/v4recovery > NFSD: starting 90-second grace period > reconnect_path: npd != pd > reconnect_path: npd != pd > reconnect_path: npd != pd > [...] > > > .... I'm unable to find any helpful information in this context. Have you already reproduced the crash with the debug kernel? The xfs debug module would not necessarily produce the verbose log. It does, however, have many asserts, which would crash much earlier and provide more hints as to the reasons to your original crash. > Anything I could try - this sunday evening ? If you haven't tried to reproduce the panic, try it now. Good luck! Felix > > > Cheers, > Martin. > -- > Unix _IS_ user friendly - it's just selective about who its friends > are ! > -------------------------------------------------------------------------- > > _______________________________________________ > xfs mailing list > xfs@oss.sgi.com > http://oss.sgi.com/mailman/listinfo/xfs From sandeen@sandeen.net Sun Jun 7 13:27:25 2009 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 cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n57IROSO183408 for ; Sun, 7 Jun 2009 13:27:25 -0500 X-ASG-Debug-ID: 1244399262-585503a10000-w1Z2WR X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail.sandeen.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 61EDB2DA882 for ; Sun, 7 Jun 2009 11:27:42 -0700 (PDT) Received: from mail.sandeen.net (sandeen.net [209.173.210.139]) by cuda.sgi.com with ESMTP id EcEcQS9Fdr2uInYX for ; Sun, 07 Jun 2009 11:27:42 -0700 (PDT) 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 mail.sandeen.net (Postfix) with ESMTP id 1E2F7AC08EC; Sun, 7 Jun 2009 13:27:37 -0500 (CDT) Message-ID: <4A2C0698.9060800@sandeen.net> Date: Sun, 07 Jun 2009 13:27:36 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: Martin Spott CC: linux-xfs@oss.sgi.com X-ASG-Orig-Subj: Re: Kernel crash with 2.6.29 + nfs + xfs (radix-tree) Subject: Re: Kernel crash with 2.6.29 + nfs + xfs (radix-tree) References: <20090520003745.GA27491@samad.com.au> <20090604112657.GA10738@infradead.org> In-Reply-To: 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: 1244399263 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.2.291 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Martin Spott wrote: > Hi Christoph, > > Christoph Hellwig wrote: > >> Sorry guys, still haven't been able to track it down. Any chance one >> of you could run with CONFIG_XFS_DEBUG enabled and see if it trips >> over any of the asserts? > > "Say N unless you are an XFS developer, or you play one on TV." > > Very nice ;-) > > I'm have to regret that I'm neither an XFS developer nor do I pretend > to be one. Yet, as I understand, I should see at least _some_ debug > info via 'dmesg', if there is any. CONFIG_XFS_DEBUG is more of addded checks and asserts, not so much in the way of extra messages - at least, until you actually hit a problem. -Eric From BATV+386b524bfa2c9398024b+2114+infradead.org+hch@bombadil.srs.infradead.org Sun Jun 7 13:55:47 2009 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 (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n57Itdrh184660 for ; Sun, 7 Jun 2009 13:55:47 -0500 X-ASG-Debug-ID: 1244400959-0ad400860000-w1Z2WR 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 918762DA993 for ; Sun, 7 Jun 2009 11:55:59 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id Kqg1jZZCvqfJmgoC for ; Sun, 07 Jun 2009 11:55:59 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MDNXC-00053Y-Jj; Sun, 07 Jun 2009 18:55:58 +0000 Date: Sun, 7 Jun 2009 14:55:58 -0400 From: Christoph Hellwig To: Martin Spott Cc: linux-xfs@oss.sgi.com X-ASG-Orig-Subj: Re: Kernel crash with 2.6.29 + nfs + xfs (radix-tree) Subject: Re: Kernel crash with 2.6.29 + nfs + xfs (radix-tree) Message-ID: <20090607185558.GA753@infradead.org> References: <20090520003745.GA27491@samad.com.au> <20090604112657.GA10738@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: 1244400959 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Sun, Jun 07, 2009 at 05:28:45PM +0000, Martin Spott wrote: > reconnect_path: npd != pd > reconnect_path: npd != pd > reconnect_path: npd != pd > [...] > > > .... I'm unable to find any helpful information in this context. > Anything I could try - this sunday evening ? That warning is what really makes me freak out, as it really, really shouldn't happen. Can you see if it gives any additional useful output with the patch below? Index: linux-2.6/fs/exportfs/expfs.c =================================================================== --- linux-2.6.orig/fs/exportfs/expfs.c 2009-06-07 20:40:09.085814403 +0200 +++ linux-2.6/fs/exportfs/expfs.c 2009-06-07 20:54:47.550942377 +0200 @@ -88,6 +88,14 @@ find_disconnected_root(struct dentry *de return dentry; } +static void dump_dentry(struct dentry *dentry, const char *var) +{ + printk("%s: dentry 0x%p inode 0x%p ino %lld name %s\n", + var, dentry, dentry->d_inode, + dentry->d_inode ? + (unsigned long long)dentry->d_inode->i_ino : 0, + dentry->d_name.name); +} /* * Make sure target_dir is fully connected to the dentry tree. @@ -187,8 +195,11 @@ reconnect_path(struct vfsmount *mnt, str */ if (npd == pd) noprogress = 0; - else + else { printk("%s: npd != pd\n", __func__); + dump_dentry(npd, "npd"); + dump_dentry(pd, "pd"); + } dput(npd); dput(ppd); if (IS_ROOT(pd)) { From news@mgras.net Sun Jun 7 13:55:53 2009 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=BAYES_00 autolearn=ham version=3.3.0-rupdated Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n57ItqJm184689 for ; Sun, 7 Jun 2009 13:55:52 -0500 X-ASG-Debug-ID: 1244400970-653d031f0000-w1Z2WR X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from foehn.mgras.de (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 4E13F2DA9A9 for ; Sun, 7 Jun 2009 11:56:11 -0700 (PDT) Received: from foehn.mgras.de (quickstep.mgras.net [213.146.115.59]) by cuda.sgi.com with ESMTP id G94rssRhQCAiyXpS for ; Sun, 07 Jun 2009 11:56:11 -0700 (PDT) Received: from osprey.mgras.de (osprey.mgras.de [192.168.48.3]) by foehn.mgras.de (8.13.1/8.13.0) with ESMTP id n57ItMcF029646 for ; Sun, 7 Jun 2009 20:55:22 +0200 (CEST) Received: (from news@localhost) by osprey.mgras.de (AIX5.1/8.11.6p2/8.11.0) id n57ItL612510 for linux-xfs@oss.sgi.com; Sun, 7 Jun 2009 20:55:21 +0200 To: linux-xfs@oss.sgi.com Path: not-for-mail From: Martin Spott Newsgroups: list.linux-xfs X-ASG-Orig-Subj: Re: Kernel crash with 2.6.29 + nfs + xfs (radix-tree) Subject: Re: Kernel crash with 2.6.29 + nfs + xfs (radix-tree) Date: Sun, 7 Jun 2009 18:55:21 +0000 (UTC) Organization: home Lines: 23 Message-ID: References: <20090520003745.GA27491@samad.com.au> <20090604112657.GA10738@infradead.org> <4A2C0698.9060800@sandeen.net> NNTP-Posting-Host: jive.mgras.de X-Trace: osprey.mgras.de 1244400921 8992 192.168.48.5 (7 Jun 2009 18:55:21 GMT) X-Complaints-To: usenet@mgras.net NNTP-Posting-Date: Sun, 7 Jun 2009 18:55:21 +0000 (UTC) User-Agent: tin/1.9.3-20080506 ("Dalintober") (UNIX) (Linux/2.6.29.4 (x86_64)) X-Barracuda-Connect: quickstep.mgras.net[213.146.115.59] X-Barracuda-Start-Time: 1244400972 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.2.292 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Eric Sandeen wrote: > CONFIG_XFS_DEBUG is more of addded checks and asserts, not so much in > the way of extra messages - at least, until you actually hit a problem. The problem I see is actually not logged as a crash in the 'usual' way (panics, oopses, traces the way I know), instead, the issue materializes in tons of messages of the sort: reconnect_path: npd != pd reconnect_path: npd != pd reconnect_path: npd != pd .... on a thorougly checked filesystem, plus the NFS service ceasing to serve clients. Obviously this is not covered by the added checks which are introduced by CONFIG_XFS_DEBUG. Cheers, Martin. -- Unix _IS_ user friendly - it's just selective about who its friends are ! -------------------------------------------------------------------------- From news@mgras.net Sun Jun 7 15:00:54 2009 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.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n57K0ra5187700 for ; Sun, 7 Jun 2009 15:00:54 -0500 X-ASG-Debug-ID: 1244404871-470501e10000-w1Z2WR X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from foehn.mgras.de (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 219341D3AC8C for ; Sun, 7 Jun 2009 13:01:11 -0700 (PDT) Received: from foehn.mgras.de (quickstep.mgras.net [213.146.115.59]) by cuda.sgi.com with ESMTP id KiM4XMCbnTAb3HLU for ; Sun, 07 Jun 2009 13:01:11 -0700 (PDT) Received: from osprey.mgras.de (osprey.mgras.de [192.168.48.3]) by foehn.mgras.de (8.13.1/8.13.0) with ESMTP id n57K0Mee029809 for ; Sun, 7 Jun 2009 22:00:22 +0200 (CEST) Received: (from news@localhost) by osprey.mgras.de (AIX5.1/8.11.6p2/8.11.0) id n57K0Lg15540 for linux-xfs@oss.sgi.com; Sun, 7 Jun 2009 22:00:21 +0200 To: linux-xfs@oss.sgi.com Path: not-for-mail From: Martin Spott Newsgroups: list.linux-xfs X-ASG-Orig-Subj: Re: Kernel crash with 2.6.29 + nfs + xfs (radix-tree) Subject: Re: Kernel crash with 2.6.29 + nfs + xfs (radix-tree) Date: Sun, 7 Jun 2009 20:00:21 +0000 (UTC) Organization: home Lines: 17 Message-ID: References: <20090520003745.GA27491@samad.com.au> <20090607185558.GA753@infradead.org> NNTP-Posting-Host: jive.mgras.de X-Trace: osprey.mgras.de 1244404821 36058 192.168.48.5 (7 Jun 2009 20:00:21 GMT) X-Complaints-To: usenet@mgras.net NNTP-Posting-Date: Sun, 7 Jun 2009 20:00:21 +0000 (UTC) User-Agent: tin/1.9.3-20080506 ("Dalintober") (UNIX) (Linux/2.6.29.4 (x86_64)) X-Barracuda-Connect: quickstep.mgras.net[213.146.115.59] X-Barracuda-Start-Time: 1244404873 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0002 1.0000 -2.0199 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.2.294 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Christoph Hellwig wrote: > That warning is what really makes me freak out, as it really, really > shouldn't happen. Can you see if it gives any additional useful output > with the patch below? Find here a package containing the respective syslog section plus a (I think so) non-obfuscated metadump (in order to corellate to the directory names to the syslog): http://foxtrot.mgras.net/static/xfs_debug-20090607.tgz Cheers, Martin. -- Unix _IS_ user friendly - it's just selective about who its friends are ! -------------------------------------------------------------------------- From BATV+386b524bfa2c9398024b+2114+infradead.org+hch@bombadil.srs.infradead.org Sun Jun 7 15:44:26 2009 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.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n57KiQ7A189466 for ; Sun, 7 Jun 2009 15:44:26 -0500 X-ASG-Debug-ID: 1244407485-79bc00c00000-w1Z2WR 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 DF0391D3AFF8 for ; Sun, 7 Jun 2009 13:44:45 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id BbL9eY1aj20K4ipE for ; Sun, 07 Jun 2009 13:44:45 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MDPES-0000VM-UY; Sun, 07 Jun 2009 20:44:44 +0000 Date: Sun, 7 Jun 2009 16:44:44 -0400 From: Christoph Hellwig To: Martin Spott Cc: linux-xfs@oss.sgi.com X-ASG-Orig-Subj: Re: Kernel crash with 2.6.29 + nfs + xfs (radix-tree) Subject: Re: Kernel crash with 2.6.29 + nfs + xfs (radix-tree) Message-ID: <20090607204444.GA335@infradead.org> References: <20090520003745.GA27491@samad.com.au> <20090607185558.GA753@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: 1244407485 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Sun, Jun 07, 2009 at 08:00:21PM +0000, Martin Spott wrote: > Christoph Hellwig wrote: > > > That warning is what really makes me freak out, as it really, really > > shouldn't happen. Can you see if it gives any additional useful output > > with the patch below? > > Find here a package containing the respective syslog section plus a (I > think so) non-obfuscated metadump (in order to corellate to the > directory names to the syslog): > > http://foxtrot.mgras.net/static/xfs_debug-20090607.tgz So we're getting duplicate in-core inodes for the same inode number somehow. That also explains the earlier radix-tree bug because we would delete the node from the radix tree when the first instance goes away, and then when we want to set/clear tags on it the radix-tree code would go boom. I still don't have a very good idea where we do have race for this, but it must be somewhere in the iget code, which was largely rewritten in 2.6.29. I recently started auditing the code and started to fix some locking issues in there, could you give the patch below a try? Index: xfs/fs/xfs/xfs_iget.c =================================================================== --- xfs.orig/fs/xfs/xfs_iget.c 2009-06-04 13:27:41.901946950 +0200 +++ xfs/fs/xfs/xfs_iget.c 2009-06-04 14:08:08.837816707 +0200 @@ -132,80 +132,89 @@ xfs_iget_cache_hit( int flags, int lock_flags) __releases(pag->pag_ici_lock) { + struct inode *inode = VFS_I(ip); struct xfs_mount *mp = ip->i_mount; - int error = EAGAIN; + int error; + + spin_lock(&ip->i_flags_lock); /* - * If INEW is set this inode is being set up - * If IRECLAIM is set this inode is being torn down - * Pause and try again. + * This inode is being torn down, pause and try again. */ - if (xfs_iflags_test(ip, (XFS_INEW|XFS_IRECLAIM))) { + if (ip->i_flags & XFS_IRECLAIM) { XFS_STATS_INC(xs_ig_frecycle); + error = EAGAIN; goto out_error; } - /* If IRECLAIMABLE is set, we've torn down the vfs inode part */ - if (xfs_iflags_test(ip, XFS_IRECLAIMABLE)) { + /* + * If we are racing with another cache hit that is currently recycling + * this inode out of the XFS_IRECLAIMABLE state, wait for the + * initialisation to complete before continuing. + */ + if (ip->i_flags & XFS_INEW) { + spin_unlock(&ip->i_flags_lock); + read_unlock(&pag->pag_ici_lock); - /* - * If lookup is racing with unlink, then we should return an - * error immediately so we don't remove it from the reclaim - * list and potentially leak the inode. - */ - if ((ip->i_d.di_mode == 0) && !(flags & XFS_IGET_CREATE)) { - error = ENOENT; - goto out_error; - } + XFS_STATS_INC(xs_ig_frecycle); + wait_on_inode(inode); + return EAGAIN; + } + /* + * If lookup is racing with unlink, then we should return an + * error immediately so we don't remove it from the reclaim + * list and potentially leak the inode. + */ + if (ip->i_d.di_mode == 0 && !(flags & XFS_IGET_CREATE)) { + error = ENOENT; + goto out_error; + } + + /* + * If IRECLAIMABLE is set, we've torn down the vfs inode part already. + * Need to carefully get it back into useable state. + */ + if (ip->i_flags & XFS_IRECLAIMABLE) { xfs_itrace_exit_tag(ip, "xfs_iget.alloc"); /* - * We need to re-initialise the VFS inode as it has been - * 'freed' by the VFS. Do this here so we can deal with - * errors cleanly, then tag it so it can be set up correctly - * later. + * We need to set XFS_INEW atomically with clearing the + * reclaimable tag so that we do have an indicator of the + * inode still being initialized. */ - if (!inode_init_always(mp->m_super, VFS_I(ip))) { + ip->i_flags |= XFS_INEW; + __xfs_inode_clear_reclaim_tag(pag, ip); + + spin_unlock(&ip->i_flags_lock); + read_unlock(&pag->pag_ici_lock); + + if (unlikely(!inode_init_always(mp->m_super, inode))) { + printk("node_init_always failed!!\n"); + + /* + * Re-initializing the inode failed, and we are in deep + * trouble. Try to re-add it to the reclaim list. + */ + read_lock(&pag->pag_ici_lock); + spin_lock(&ip->i_flags_lock); + + ip->i_flags &= ~XFS_INEW; + __xfs_inode_set_reclaim_tag(pag, ip); + error = ENOMEM; goto out_error; } - - /* - * We must set the XFS_INEW flag before clearing the - * XFS_IRECLAIMABLE flag so that if a racing lookup does - * not find the XFS_IRECLAIMABLE above but has the igrab() - * below succeed we can safely check XFS_INEW to detect - * that this inode is still being initialised. - */ - xfs_iflags_set(ip, XFS_INEW); - xfs_iflags_clear(ip, XFS_IRECLAIMABLE); - - /* clear the radix tree reclaim flag as well. */ - __xfs_inode_clear_reclaim_tag(mp, pag, ip); - } else if (!igrab(VFS_I(ip))) { + } else { /* If the VFS inode is being torn down, pause and try again. */ - XFS_STATS_INC(xs_ig_frecycle); - goto out_error; - } else if (xfs_iflags_test(ip, XFS_INEW)) { - /* - * We are racing with another cache hit that is - * currently recycling this inode out of the XFS_IRECLAIMABLE - * state. Wait for the initialisation to complete before - * continuing. - */ - wait_on_inode(VFS_I(ip)); - } + if (!igrab(inode)) + goto out_error; - if (ip->i_d.di_mode == 0 && !(flags & XFS_IGET_CREATE)) { - error = ENOENT; - iput(VFS_I(ip)); - goto out_error; + /* We've got a live one. */ + spin_unlock(&ip->i_flags_lock); + read_unlock(&pag->pag_ici_lock); } - /* We've got a live one. */ - read_unlock(&pag->pag_ici_lock); - if (lock_flags != 0) xfs_ilock(ip, lock_flags); @@ -215,6 +224,7 @@ xfs_iget_cache_hit( return 0; out_error: + spin_unlock(&ip->i_flags_lock); read_unlock(&pag->pag_ici_lock); return error; } Index: xfs/fs/xfs/linux-2.6/xfs_sync.c =================================================================== --- xfs.orig/fs/xfs/linux-2.6/xfs_sync.c 2009-06-04 13:40:09.135939715 +0200 +++ xfs/fs/xfs/linux-2.6/xfs_sync.c 2009-06-04 13:59:17.978816696 +0200 @@ -607,6 +607,17 @@ xfs_reclaim_inode( return 0; } +void +__xfs_inode_set_reclaim_tag( + struct xfs_perag *pag, + struct xfs_inode *ip) +{ + xfs_agino_t agino = XFS_INO_TO_AGINO(ip->i_mount, ip->i_ino); + + radix_tree_tag_set(&pag->pag_ici_root, agino, XFS_ICI_RECLAIM_TAG); + __xfs_iflags_set(ip, XFS_IRECLAIMABLE); +} + /* * We set the inode flag atomically with the radix tree tag. * Once we get tag lookups on the radix tree, this inode flag @@ -621,9 +632,7 @@ xfs_inode_set_reclaim_tag( read_lock(&pag->pag_ici_lock); spin_lock(&ip->i_flags_lock); - radix_tree_tag_set(&pag->pag_ici_root, - XFS_INO_TO_AGINO(mp, ip->i_ino), XFS_ICI_RECLAIM_TAG); - __xfs_iflags_set(ip, XFS_IRECLAIMABLE); + __xfs_inode_set_reclaim_tag(pag, ip); spin_unlock(&ip->i_flags_lock); read_unlock(&pag->pag_ici_lock); xfs_put_perag(mp, pag); @@ -631,30 +640,15 @@ xfs_inode_set_reclaim_tag( void __xfs_inode_clear_reclaim_tag( - xfs_mount_t *mp, - xfs_perag_t *pag, - xfs_inode_t *ip) -{ - radix_tree_tag_clear(&pag->pag_ici_root, - XFS_INO_TO_AGINO(mp, ip->i_ino), XFS_ICI_RECLAIM_TAG); -} - -void -xfs_inode_clear_reclaim_tag( - xfs_inode_t *ip) + struct xfs_perag *pag, + struct xfs_inode *ip) { - xfs_mount_t *mp = ip->i_mount; - xfs_perag_t *pag = xfs_get_perag(mp, ip->i_ino); + xfs_agino_t agino = XFS_INO_TO_AGINO(ip->i_mount, ip->i_ino); - read_lock(&pag->pag_ici_lock); - spin_lock(&ip->i_flags_lock); - __xfs_inode_clear_reclaim_tag(mp, pag, ip); - spin_unlock(&ip->i_flags_lock); - read_unlock(&pag->pag_ici_lock); - xfs_put_perag(mp, pag); + ip->i_flags &= ~XFS_IRECLAIMABLE; + radix_tree_tag_clear(&pag->pag_ici_root, agino, XFS_ICI_RECLAIM_TAG); } - STATIC void xfs_reclaim_inodes_ag( xfs_mount_t *mp, Index: xfs/fs/xfs/linux-2.6/xfs_sync.h =================================================================== --- xfs.orig/fs/xfs/linux-2.6/xfs_sync.h 2009-06-04 13:53:32.994814723 +0200 +++ xfs/fs/xfs/linux-2.6/xfs_sync.h 2009-06-04 13:58:54.746942001 +0200 @@ -51,7 +51,6 @@ int xfs_reclaim_inode(struct xfs_inode * int xfs_reclaim_inodes(struct xfs_mount *mp, int noblock, int mode); void xfs_inode_set_reclaim_tag(struct xfs_inode *ip); -void xfs_inode_clear_reclaim_tag(struct xfs_inode *ip); -void __xfs_inode_clear_reclaim_tag(struct xfs_mount *mp, struct xfs_perag *pag, - struct xfs_inode *ip); +void __xfs_inode_set_reclaim_tag(struct xfs_perag *pag, struct xfs_inode *ip); +void __xfs_inode_clear_reclaim_tag(struct xfs_perag *pag, struct xfs_inode *ip); #endif From news@mgras.net Sun Jun 7 16:27:30 2009 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.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n57LRTP0191192 for ; Sun, 7 Jun 2009 16:27:30 -0500 X-ASG-Debug-ID: 1244410068-22f0004b0000-w1Z2WR X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from foehn.mgras.de (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 8EF6D1D3B104 for ; Sun, 7 Jun 2009 14:27:48 -0700 (PDT) Received: from foehn.mgras.de (quickstep.mgras.net [213.146.115.59]) by cuda.sgi.com with ESMTP id uTWsUQITn9RX1ceG for ; Sun, 07 Jun 2009 14:27:48 -0700 (PDT) Received: from osprey.mgras.de (osprey.mgras.de [192.168.48.3]) by foehn.mgras.de (8.13.1/8.13.0) with ESMTP id n57LQxrJ000221 for ; Sun, 7 Jun 2009 23:27:00 +0200 (CEST) Received: (from news@localhost) by osprey.mgras.de (AIX5.1/8.11.6p2/8.11.0) id n57LQxi35220 for linux-xfs@oss.sgi.com; Sun, 7 Jun 2009 23:26:59 +0200 To: linux-xfs@oss.sgi.com Path: not-for-mail From: Martin Spott Newsgroups: list.linux-xfs X-ASG-Orig-Subj: Re: Kernel crash with 2.6.29 + nfs + xfs (radix-tree) Subject: Re: Kernel crash with 2.6.29 + nfs + xfs (radix-tree) Date: Sun, 7 Jun 2009 21:26:58 +0000 (UTC) Organization: home Lines: 16 Message-ID: References: <20090520003745.GA27491@samad.com.au> <20090607204444.GA335@infradead.org> NNTP-Posting-Host: jive.mgras.de X-Trace: osprey.mgras.de 1244410018 36008 192.168.48.5 (7 Jun 2009 21:26:58 GMT) X-Complaints-To: usenet@mgras.net NNTP-Posting-Date: Sun, 7 Jun 2009 21:26:58 +0000 (UTC) User-Agent: tin/1.9.3-20080506 ("Dalintober") (UNIX) (Linux/2.6.29.4 (x86_64)) X-Barracuda-Connect: quickstep.mgras.net[213.146.115.59] X-Barracuda-Start-Time: 1244410069 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0007 1.0000 -2.0166 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.2.300 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Christoph Hellwig wrote: > I recently started auditing the code and started to fix some locking > issues in there, could you give the patch below a try? http://foxtrot.mgras.net/static/messages-20090607.2.bz2 I'm sorry but I'll have to boot the system using the previous kernel, again, as people expect to have their system in a reliably working state again tomorrow morning. Cheers, Martin. -- Unix _IS_ user friendly - it's just selective about who its friends are ! -------------------------------------------------------------------------- From sandeen@sandeen.net Sun Jun 7 22:51:33 2009 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 cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n583pXuW203314 for ; Sun, 7 Jun 2009 22:51:33 -0500 X-ASG-Debug-ID: 1244433112-7b6300da0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail.sandeen.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 4DBAB2DB22B for ; Sun, 7 Jun 2009 20:51:52 -0700 (PDT) Received: from mail.sandeen.net (sandeen.net [209.173.210.139]) by cuda.sgi.com with ESMTP id sjQmZhOu8NzWfMdO for ; Sun, 07 Jun 2009 20:51:52 -0700 (PDT) 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 mail.sandeen.net (Postfix) with ESMTP id 46B98AC08EC; Sun, 7 Jun 2009 22:51:51 -0500 (CDT) Message-ID: <4A2C8AD8.9030107@sandeen.net> Date: Sun, 07 Jun 2009 22:51:52 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: xfs-oss CC: Richard Kolkovich X-ASG-Orig-Subj: [PATCH] xfs_repair: catch bad depth in traverse_int_dir2block Subject: [PATCH] xfs_repair: catch bad depth in traverse_int_dir2block 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: 1244433113 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.2.322 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean A bad on-disk tree depth in traverse_int_dir2block() can later cause a segfault when it's used as an array index in this function; if we get something beyond the max depth, just error out and the dir will get rebuilt. Reported-by: Richard Kolkovich Signed-off-by: Eric Sandeen --- diff --git a/repair/dir2.c b/repair/dir2.c index 9575fb1..2723e3b 100644 --- a/repair/dir2.c +++ b/repair/dir2.c @@ -339,9 +339,17 @@ traverse_int_dir2block(xfs_mount_t *mp, /* * maintain level counter */ - if (i == -1) + if (i == -1) { i = da_cursor->active = be16_to_cpu(node->hdr.level); - else { + if (i >= XFS_DA_NODE_MAXDEPTH) { + do_warn(_("bad header depth for directory " + "inode %llu\n"), + da_cursor->ino); + da_brelse(bp); + i = -1; + goto error_out; + } + } else { if (be16_to_cpu(node->hdr.level) == i - 1) { i--; } else { From lazareva@jtiauto.ru Mon Jun 8 00:39:47 2009 X-Spam-Checker-Version: SpamAssassin 3.3.0-rupdated (updated) on oss.sgi.com X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=BASE64_LENGTH_79_INF,BAYES_50, MIME_8BIT_HEADER autolearn=no version=3.3.0-rupdated Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n585dkGH209448 for ; Mon, 8 Jun 2009 00:39:46 -0500 X-ASG-Debug-ID: 1244439604-512f00850000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from yvltxr.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id AAD722DB2E9 for ; Sun, 7 Jun 2009 22:40:04 -0700 (PDT) Received: from yvltxr.com ([93.127.71.55]) by cuda.sgi.com with ESMTP id DZxpVQcxhMJrypEE for ; Sun, 07 Jun 2009 22:40:04 -0700 (PDT) From: Lazareva To: xfs@oss.sgi.com X-ASG-Orig-Subj: =?windows-1251?b?0ODx8fvr6uBfItHl6vDl8vtf4l/I7fLl8O3l8uUiXw==?= Subject: =?windows-1251?b?0ODx8fvr6uBfItHl6vDl8vtf4l/I7fLl8O3l8uUiXw==?= Date: Mon, 08 Jun 2009 08:39:32 +0200 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: base64 Content-Disposition: inline Message-Id: <090608083932NS.02616.lazareva@jtiauto.ru> X-Barracuda-Connect: UNKNOWN[93.127.71.55] X-Barracuda-Start-Time: 1244439605 X-Barracuda-Bayes: INNOCENT GLOBAL 0.4867 1.0000 0.0000 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=BSF_SC5_MJ1963, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.326 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean LdHl4+7k7f8g7PsgwuDsIO/w5eTx8uDi6//l7CDu9+Xt/CDo7fLl8OXx7fvpIOgg7vDo4+jt4Ov87fvpIPHg6fIsIPEg7+7s7vn8/iDq7vLu8O7j7iDi8eUg8eXq8OXy+yDx8uDt7uL/8vH/IO3lIPHl6vDl8u7sIQ0KDQotxGHt7fvpIGNh6fIg72/sb+Zl8iB55+1h8vwg8m8sIPdl428g7WUg5+1h/vIg5HB543VlIHXrdSDybywg9/JvIGNrcPviYf7yIG/yIEJhYyEgQmP/IHXt9G9w7GH2df8g7WEg5GHt7fvpIOxv7GXt8iDhZWPv62Hy7WEg5Ov/IGNrYfd14mHtdf8gdSBv5+1ha2/s62Xtdf8hDQoNCsRh7e376SBjYenyIO9v7G/mZfIgQmHsIHnn7WHy/F86DQoNCi3PcG9j8mXp+GH/IOxl8m/kdWthIHXn42/yb+LrZe11/yDtYWPyb//5dXggY/JlcGVvb/drb+IuDQotyuDqIO7y6vD78vwg6u7s7/z+8uXw7fvpIOrr8+EuIM/u+ODj7uLu5SDw8+ru4u7k8fLi7i4NCi1LYWsg4WVj7+th8u1vIO9v63n3dfL8IGF55HVvLCDideRlby4NCi3K4Oog7vLq8Pvy/CDq7uzv/P7y5fDt++kg6uvz4S4gz+744OPu4u7lIPDz6u7i7uTx8uLuLg0KLc9v6/znb+Jh8vxj/yDhZWPv62Hy7W8g/etla/Jwb/3tZXDjdWXpLiAzYe115mHy/CDvb2th52Htdf8g4m/k/+37eCBj92Xy93Vrb+IuDQotUGX2Ze/yIHnkYetl7XX/IGMg4XnsYeN1IO1l7Xnm7ft4IOdh73VjZekgdSD48mHs72/iIQ0KDQrPZXBl6fJ1IO1hIGNh6fIgY2Xp92FjXw0KDQpodHRwOi8vbG5rLnV6L2ExZGFjZQ0KDQrC8f8g6O307vDs4Pbo/yDx4Ony4CDz7ejq4O v87eAsIOgg4e7r/PjlIO3o4+TlIML7IP3y8yDo7fTu8Ozg9uj+IO3lIO3g6eTl8uUhIM3g5OXl7PH/LCD38u4gwuDsIOHz5OXyIOjt8uXw5fHl7SD98u7yIPHg6fIg6CDo7fTu8Ozg9uj/IPEg7eXj7iDv7uzu5uXyIMLg7CDs7e7j7iDw4OcuDQoNCg0KDQoNCg0KDQoNCg0KQ2Hsb2UgefJv7fdl7e1vZSB55G/ib+v8Y/LidWUg5Ov/IHVj8nXt7W8geG9wb/hl428gY2/hZWNl5O11a2Eg52Fr6/73YWXyY/8g4iDyb+wsIPfyb+H7IORvY/Jh4nXy/CBl428g5HB543XsfXx7Li4gy2HhcP7pZXANCtEg8u7x6ugg4u7r/O3u4+4g8eLl8vMg7eUg4ujk6Owu From BATV+aff378ae7d15d6d5419c+2115+infradead.org+hch@bombadil.srs.infradead.org Mon Jun 8 02:42:13 2009 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 (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n587gBjW215489 for ; Mon, 8 Jun 2009 02:42:13 -0500 X-ASG-Debug-ID: 1244447369-7b94005d0000-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 4FBE2148F40B for ; Mon, 8 Jun 2009 00:49:30 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id nGXNFPeLsyvqCL8M for ; Mon, 08 Jun 2009 00:49:30 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MDZV0-0007Yd-KY; Mon, 08 Jun 2009 07:42:30 +0000 Date: Mon, 8 Jun 2009 03:42:30 -0400 From: Christoph Hellwig To: Eric Sandeen Cc: xfs-oss , Richard Kolkovich X-ASG-Orig-Subj: Re: [PATCH] xfs_repair: catch bad depth in traverse_int_dir2block Subject: Re: [PATCH] xfs_repair: catch bad depth in traverse_int_dir2block Message-ID: <20090608074230.GA28066@infradead.org> References: <4A2C8AD8.9030107@sandeen.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A2C8AD8.9030107@sandeen.net> 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: 1244447370 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Sun, Jun 07, 2009 at 10:51:52PM -0500, Eric Sandeen wrote: > A bad on-disk tree depth in traverse_int_dir2block() can > later cause a segfault when it's used as an array index in > this function; if we get something beyond the max depth, > just error out and the dir will get rebuilt. > > Reported-by: Richard Kolkovich > Signed-off-by: Eric Sandeen > --- > > diff --git a/repair/dir2.c b/repair/dir2.c > index 9575fb1..2723e3b 100644 > --- a/repair/dir2.c > +++ b/repair/dir2.c > @@ -339,9 +339,17 @@ traverse_int_dir2block(xfs_mount_t *mp, > /* > * maintain level counter > */ > - if (i == -1) > + if (i == -1) { > i = da_cursor->active = be16_to_cpu(node->hdr.level); > - else { > + if (i >= XFS_DA_NODE_MAXDEPTH) { > + do_warn(_("bad header depth for directory " > + "inode %llu\n"), > + da_cursor->ino); > + da_brelse(bp); > + i = -1; > + goto error_out; > + } > + } else { >From reading the surrounding code this means the dir is now flagged as corrupted and we attemp to rebuild it. Which is the only thing we can do here for now. Reviewed-by: Christoph Hellwig It would be very good to have an xfsqa testcase with a forcibly corrupted directoty (checked in image or using xfs_db) to verify this behaviour. From BATV+aff378ae7d15d6d5419c+2115+infradead.org+hch@bombadil.srs.infradead.org Mon Jun 8 10:43:48 2009 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 (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n58Fhk4f235766 for ; Mon, 8 Jun 2009 10:43:48 -0500 X-ASG-Debug-ID: 1244475846-418400050000-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 82F2E2DD053 for ; Mon, 8 Jun 2009 08:44:06 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id C4Wu3TyYKmMfarmX for ; Mon, 08 Jun 2009 08:44:06 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MDh13-0007Mz-7P for xfs@oss.sgi.com; Mon, 08 Jun 2009 15:44:05 +0000 Date: Mon, 8 Jun 2009 11:44:05 -0400 From: Christoph Hellwig To: xfs@oss.sgi.com X-ASG-Orig-Subj: pull request: sync changes + misc other bits for 2.6.31 Subject: pull request: sync changes + misc other bits for 2.6.31 Message-ID: <20090608154405.GA28165@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: 1244475846 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean Hi Felix, please pull git://git.kernel.org/pub/scm/fs/xfs/xfs.git for the following changes: Christoph Hellwig (8): xfs: update max log size xfs: validate quota log items during log recovery xfs: kill xfs_qmops xfs: split inode flushing from xfs_sync_inodes_ag xfs: use generic inode iterator in xfs_qm_dqrele_all_inodes xfs: split xfs_sync_inodes xfs: remove SYNC_IOWAIT xfs: remove SYNC_BDFLUSH Dave Chinner (4): xfs: split inode data writeback from xfs_sync_inodes_ag xfs: factor out inode validation for sync xfs: remove unused parameter from xfs_reclaim_inodes xfs: introduce a per-ag inode iterator From sandeen@sandeen.net Mon Jun 8 10:44:21 2009 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 (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n58FiLV9235804 for ; Mon, 8 Jun 2009 10:44:21 -0500 X-ASG-Debug-ID: 1244476300-2821000e0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mx2.redhat.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 3FFF2148FB4B for ; Mon, 8 Jun 2009 08:51:40 -0700 (PDT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by cuda.sgi.com with ESMTP id zXGcfJbaDNlXpiQ0 for ; Mon, 08 Jun 2009 08:51:40 -0700 (PDT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n58Fidh9014007 for ; Mon, 8 Jun 2009 11:44:39 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n58Fiarn004303 for ; Mon, 8 Jun 2009 11:44:39 -0400 Received: from neon.msp.redhat.com (neon.msp.redhat.com [10.15.80.10]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n58FiZRg024313 for ; Mon, 8 Jun 2009 11:44:35 -0400 Message-ID: <4A2D31E3.3090108@sandeen.net> Date: Mon, 08 Jun 2009 10:44:35 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: xfs mailing list X-ASG-Orig-Subj: [PATCH] xfstests: Allow fsx tests to run on generic filesystems Subject: [PATCH] xfstests: Allow fsx tests to run on generic filesystems Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-Barracuda-Connect: mx2.redhat.com[66.187.237.31] X-Barracuda-Start-Time: 1244476301 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: -1.42 X-Barracuda-Spam-Status: No, SCORE=-1.42 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=MARKETING_SUBJECT X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.357 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.60 MARKETING_SUBJECT Subject contains popular marketing words X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean There is already logic in 075 to gracefully skip nfs for fsx invocations with -x (xfs-specific preallocation) - just extend this to any non-xfs filesystem, and add to test 112 as well. Later we can change this behavior to use fallocate and include more filesystems but this gets some fsx coverage for now. Test 127 doesn't seem to have anything xfs-specific, so mark that as generic too. Signed-off-by: Eric Sandeen --- diff --git a/075 b/075 index 7948c1f..49d006d 100755 --- a/075 +++ b/075 @@ -66,11 +66,11 @@ _do_test() echo "fsx.$_n : $_filter_param" echo "-----------------------------------------------" - if [ "$FSTYP" = "nfs" ] + if [ "$FSTYP" != "xfs" ] then if [ "$_n" = "1" -o "$_n" = "3" ] then - # HACK: nfs don't handle preallocation (-x) so just skip this test + # HACK: only xfs handles preallocation (-x) so just skip this test return fi fi @@ -124,7 +124,7 @@ _process_args() # real QA test starts here -_supported_fs xfs udf nfs +_supported_fs generic _supported_os IRIX Linux size10=`expr 10 \* 1024 \* 1024` # 10 megabytes diff --git a/112 b/112 index 70fa487..d6c2952 100755 --- a/112 +++ b/112 @@ -66,6 +66,15 @@ _do_test() echo "fsx.$_n : $_filter_param" echo "-----------------------------------------------" + if [ "$FSTYP" != "xfs" ] + then + if [ "$_n" = "1" -o "$_n" = "3" ] + then + # HACK: only xfs handles preallocation (-x) so just skip this test + return + fi + fi + # This cd and use of -P gets full debug on $here (not TEST_DEV) cd $out if ! $here/ltp/fsx $_param -P $here $seq.$_n >/dev/null @@ -113,7 +122,7 @@ _process_args() # real QA test starts here -_supported_fs xfs +_supported_fs generic _supported_os Linux [ -x $here/ltp/aio-stress ] || \ diff --git a/127 b/127 index 44db4fb..30f4fdb 100755 --- a/127 +++ b/127 @@ -103,7 +103,7 @@ _fsx_std_mmap() } # real QA test starts here -_supported_fs xfs +_supported_fs generic _supported_os Linux _setup_testdir From BATV+aff378ae7d15d6d5419c+2115+infradead.org+hch@bombadil.srs.infradead.org Mon Jun 8 11:16:26 2009 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.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n58GGQlI237151 for ; Mon, 8 Jun 2009 11:16:26 -0500 X-ASG-Debug-ID: 1244477806-0a5701050000-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 A25241234F94 for ; Mon, 8 Jun 2009 09:16:46 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id ERtewA31sILQHLJb for ; Mon, 08 Jun 2009 09:16:46 -0700 (PDT) X-ASG-Whitelist: Client Received: from hch by bombadil.infradead.org with local (Exim 4.69 #1 (Red Hat Linux)) id 1MDhWg-0005pQ-8U; Mon, 08 Jun 2009 16:16:46 +0000 Date: Mon, 8 Jun 2009 12:16:46 -0400 From: Christoph Hellwig To: Eric Sandeen Cc: xfs mailing list X-ASG-Orig-Subj: Re: [PATCH] xfstests: Allow fsx tests to run on generic filesystems Subject: Re: [PATCH] xfstests: Allow fsx tests to run on generic filesystems Message-ID: <20090608161646.GA14861@infradead.org> References: <4A2D31E3.3090108@sandeen.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A2D31E3.3090108@sandeen.net> 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: 1244477806 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Mon, Jun 08, 2009 at 10:44:35AM -0500, Eric Sandeen wrote: > There is already logic in 075 to gracefully skip nfs for fsx > invocations with -x (xfs-specific preallocation) - just extend > this to any non-xfs filesystem, and add to test 112 as well. > > Later we can change this behavior to use fallocate and include > more filesystems but this gets some fsx coverage for now. > > Test 127 doesn't seem to have anything xfs-specific, so mark > that as generic too. Good bandaid for now, but it would be even better to get a fsx version using the generic prealloc calls one day :) Reviewed-by: Christoph Hellwig From sandeen@sandeen.net Mon Jun 8 11:26:45 2009 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 (cuda1.sgi.com [192.48.157.11]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id n58GQir3237587 for ; Mon, 8 Jun 2009 11:26:44 -0500 X-ASG-Debug-ID: 1244478844-3d28003b0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mx2.redhat.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 08FE5148FE84 for ; Mon, 8 Jun 2009 09:34:04 -0700 (PDT) Received: from mx2.redhat.com (mx2.redhat.com [66.187.237.31]) by cuda.sgi.com with ESMTP id owQAn5u7wXs88FSY for ; Mon, 08 Jun 2009 09:34:04 -0700 (PDT) Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n58GQscN023085; Mon, 8 Jun 2009 12:26:54 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n58GQrNs017273; Mon, 8 Jun 2009 12:26:53 -0400 Received: from neon.msp.redhat.com (neon.msp.redhat.com [10.15.80.10]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n58GQqiu032347; Mon, 8 Jun 2009 12:26:53 -0400 Message-ID: <4A2D3BCC.2010000@sandeen.net> Date: Mon, 08 Jun 2009 11:26:52 -0500 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Christoph Hellwig CC: xfs mailing list X-ASG-Orig-Subj: Re: [PATCH] xfstests: Allow fsx tests to run on generic filesystems Subject: Re: [PATCH] xfstests: Allow fsx tests to run on generic filesystems References: <4A2D31E3.3090108@sandeen.net> <20090608161646.GA14861@infradead.org> In-Reply-To: <20090608161646.GA14861@infradead.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-Barracuda-Connect: mx2.redhat.com[66.187.237.31] X-Barracuda-Start-Time: 1244478845 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi