From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752504Ab0BKLP7 (ORCPT ); Thu, 11 Feb 2010 06:15:59 -0500 Received: from mail-bw0-f219.google.com ([209.85.218.219]:41066 "EHLO mail-bw0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751020Ab0BKLP5 (ORCPT ); Thu, 11 Feb 2010 06:15:57 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=McqU1yMkeRGUAT8gQLLJrHZ8SAp3GgDZIIrvqelqGBS8hs2bsa1eFMfbuB250JIm58 DsG5VOwhlopspCO+8Epquh67ij5Gm70uDTG9od30qRu0FTyk8uGQsn0qK2WwvDtVYyb+ 0SzVCyrl97llmIbAS23DG8FZOMRBsmaQvVtmo= From: Dmitry Monakhov To: linux-kernel@vger.kernel.org Cc: linux-btrfs@vger.kernel.org Subject: Re: [PATCH 4/4] btrfs: add discard_compat support References: <1265885625-21608-1-git-send-email-dmonakhov@openvz.org> <1265886074-22135-1-git-send-email-dmonakhov@openvz.org> Date: Thu, 11 Feb 2010 14:15:51 +0300 In-Reply-To: <1265886074-22135-1-git-send-email-dmonakhov@openvz.org> (Dmitry Monakhov's message of "Thu, 11 Feb 2010 14:01:14 +0300") Message-ID: <87tytoqazc.fsf@openvz.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dmitry Monakhov writes: > If any device in the list has no native discard support we add > discard compat support. Devices with native discard support still > getting real discard requests. Note: Seems what enabling discard requests result in triggering hidden bug. Orphan list corruption. ------------[ cut here ]------------ WARNING: at lib/list_debug.c:26 __list_add+0x3f/0x81() Hardware name: list_add corruption. next->prev should be prev (ffff88012029eb20), but was ffff88012239c730. (next=ffff8801223bc348). Modules linked in: btrfs zlib_deflate libcrc32c cpufreq_ondemand acpi_cpufreq freq_table ppdev parport_pc parport pcspkr [last unloaded: btrfs] Pid: 1254, comm: fsstress Not tainted 2.6.33-rc5 #3 Call Trace: [] warn_slowpath_common+0x7c/0x94 [] warn_slowpath_fmt+0x41/0x43 [] ? btrfs_unlink_inode+0x243/0x258 [btrfs] [] __list_add+0x3f/0x81 [] btrfs_orphan_add+0x61/0x80 [btrfs] [] btrfs_unlink+0xb2/0xf2 [btrfs] [] vfs_unlink+0x67/0xa2 [] ? lookup_hash+0x36/0x3a [] do_unlinkat+0xcd/0x15b [] ? path_put+0x22/0x27 [] ? audit_syscall_entry+0x11e/0x14a [] sys_unlink+0x16/0x18 [] system_call_fastpath+0x16/0x1b ---[ end trace 18d84c057a649cf7 ]--- ------------[ cut here ]------------ kernel BUG at fs/btrfs/inode.c:3320! invalid opcode: 0000 [#1] SMP last sysfs file: /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/uevent CPU 3 Pid: 1250, comm: fsstress Tainted: G W 2.6.33-rc5 #3 DH55TC / RIP: 0010:[] [] btrfs_setattr+0x101/0x244 [btrfs] RSP: 0018:ffff88012095de08 EFLAGS: 00010292 RAX: 0000000000000021 RBX: ffff8801223b4bd8 RCX: 000000000000711a RDX: 0000000000000000 RSI: 0000000000000046 RDI: ffffffff81730984 RBP: ffff88012095de48 R08: ffff88012095ddb4 R09: 0000000000000000 R10: 0000000000000001 R11: ffff88012095dd00 R12: ffff88012095ded8 R13: ffff88012029e800 R14: ffff88012233d140 R15: 0000000000000000 FS: 00007f313c3c6700(0000) GS:ffff8800282c0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fffa0ac3f4c CR3: 00000001212c7000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process fsstress (pid: 1250, threadinfo ffff88012095c000, task ffff880122c68000) Stack: ffff8801223b4cb0 ffff88011c452180 ffff88012095de28 ffff88012095ded8 <0> ffff88011c452180 ffff8801223b4bd8 0000000000000008 0000000000000008 <0> ffff88012095deb8 ffffffff810f5e52 ffff88012095df38 ffffffff810ee418 Call Trace: [] notify_change+0x17b/0x2c9 [] ? user_path_at+0x64/0x93 [] do_truncate+0x6a/0x87 [] ? generic_permission+0x1c/0x9f [] ? get_write_access+0x1d/0x48 [] sys_truncate+0x11c/0x160 [] system_call_fastpath+0x16/0x1b Code: e0 48 89 de 4c 89 f7 49 89 46 20 e8 66 f3 ff ff 85 c0 74 1b 89 c2 48 c7 c6 e0 b4 10 a0 48 c7 c7 9c d1 10 a0 31 c0 e8 7c 5c 25 e1 <0f> 0b eb 3d 49 8b 46 10 4c 89 ee 4c 89 f7 48 89 45 c8 e8 47 7d RIP [] btrfs_setattr+0x101/0x244 [btrfs] RSP ---[ end trace 18d84c057a649cf8 ]---