From patchwork Wed Feb 11 22:15:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Roger C. Pao (Enmotus)" X-Patchwork-Id: 5814701 Return-Path: X-Original-To: patchwork-linux-nvdimm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DEA789F30C for ; Wed, 11 Feb 2015 22:22:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7472E201C0 for ; Wed, 11 Feb 2015 22:22:37 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D980020035 for ; Wed, 11 Feb 2015 22:22:35 +0000 (UTC) Received: from ml01.vlan14.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B1E01812FE; Wed, 11 Feb 2015 14:22:35 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mail-lb0-x22b.google.com (mail-lb0-x22b.google.com [IPv6:2a00:1450:4010:c04::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CA291812FE for ; Wed, 11 Feb 2015 14:22:33 -0800 (PST) Received: by mail-lb0-f171.google.com with SMTP id b6so6088923lbj.2 for ; Wed, 11 Feb 2015 14:22:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=8ID9eS7XU0905A+AWyHlActqWsR6Kv2LmA0OBomGCoU=; b=gpOpU/dE4xjJOTbL7I1k1EslCTGhuVxCj29lNJRTkyYCgmj4N3msL7oUXM1QHPnWyb 4zPmhlrQubzqOCAX8+8SunMNzZQiobjz39+VE6IhplirQ4aE4pX0ewVQtk6c5CgOQ4WY IGEt22P/MuFSVS4zuGBN03YeBWUJCO1e9WD+FjOgSjRFTGwd13QoBoa835npbv88SkIW Gy1EtDggQ+2SbeB5+3/b1KaDy6wFBcJ3mbvb8I29D0qKiYLQXVSEScLPKzr6q9yipq2w ZElIgkXOXGiDHnX1F4ouC3Agk8VKKQByP14isDOCKcuCb7Alt7O2LrguWWbwD5j7l6js ekQg== MIME-Version: 1.0 X-Received: by 10.112.162.167 with SMTP id yb7mr689245lbb.76.1423692932747; Wed, 11 Feb 2015 14:15:32 -0800 (PST) Received: by 10.112.40.66 with HTTP; Wed, 11 Feb 2015 14:15:32 -0800 (PST) Date: Wed, 11 Feb 2015 14:15:32 -0800 Message-ID: From: "Roger C. Pao (Enmotus)" To: "linux-nvdimm@lists.01.org" Subject: [Linux-nvdimm] One liner patch for prd to avoid "kernel BUG at drivers/block/pmem.c:176!" X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, HTML_MESSAGE, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP [rcpao@test27 Downloads]$ cat prd-20150210a-blk_queue_max_segment_size.patch if (unlikely(!disk)) { [rcpao@test27 Downloads]$ I'm just the messenger. Patch provided by From: Hugh Daschbach Date: Tue, 10 Feb 2015 20:27:08 -0800 --- Feb 10 09:43:42 test27.engr.enmotus.com kernel: ------------[ cut here ]------------ Feb 10 09:43:42 test27.engr.enmotus.com kernel: kernel BUG at drivers/block/pmem.c:176! Feb 10 09:43:43 test27.engr.enmotus.com kernel: invalid opcode: 0000 [#2] SMP Feb 10 09:43:43 test27.engr.enmotus.com kernel: Modules linked in: en_tier(PO) en_block(O) des3_ede_x86_64 des_generic md4 nls_utf8 cifs rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache pmem bnep bluetooth rfkill fuse xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw x86_pkg_temp_thermal coretemp kvm_intel kvm crct10dif_pclmul iTCO_wdt joydev iTCO_vendor_support crc32_pclmul crc32c_intel ghash_clmulni_intel mei_me sb_edac pcspkr mei lpc_ich nfsd i2c_i801 ipmi_si tpm_tis edac_core ipmi_msghandler tpm mfd_core shpchp wmi ioatdma auth_rpcgss nfs_acl lockd grace Feb 10 09:43:43 test27.engr.enmotus.com kernel: sunrpc mgag200 drm_kms_helper ttm isci drm igb libsas ptp pps_core dca scsi_transport_sas i2c_algo_bit [last unloaded: en_block] Feb 10 09:43:43 test27.engr.enmotus.com kernel: CPU: 7 PID: 20863 Comm: evsp Tainted: P D O 3.18.0-rc1+ #1 Feb 10 09:43:43 test27.engr.enmotus.com kernel: Hardware name: Supermicro X9DRH-iF-NV/X9DRH-iF-NV, BIOS 3.1 06/27/2014 Feb 10 09:43:43 test27.engr.enmotus.com kernel: task: ffff880333920000 ti: ffff88032024c000 task.ti: ffff88032024c000 Feb 10 09:43:43 test27.engr.enmotus.com kernel: RIP: 0010:[] [] pmem_make_request+0x160/0x1c0 [pmem] Feb 10 09:43:43 test27.engr.enmotus.com kernel: RSP: 0018:ffff88032024fa68 EFLAGS: 00010206 Feb 10 09:43:43 test27.engr.enmotus.com kernel: RAX: ffff88006a891b88 RBX: 0000000000002000 RCX: 0000000000000000 Feb 10 09:43:43 test27.engr.enmotus.com kernel: RDX: ffff880457e0e400 RSI: ffffea000cd38000 RDI: 0000000000000001 Feb 10 09:43:43 test27.engr.enmotus.com kernel: RBP: ffff88032024fac8 R08: 0000000000000000 R09: 0000000000000400 Feb 10 09:43:43 test27.engr.enmotus.com kernel: R10: ffff88006a891b00 R11: 0000000000000000 R12: 0000000000002000 Feb 10 09:43:43 test27.engr.enmotus.com kernel: R13: 0000000000000000 R14: 00000000007fff99 R15: 0000000000000000 Feb 10 09:43:43 test27.engr.enmotus.com kernel: FS: 00007f07166b9800(0000) GS:ffff88047fdc0000(0000) knlGS:0000000000000000 Feb 10 09:43:43 test27.engr.enmotus.com kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Feb 10 09:43:43 test27.engr.enmotus.com kernel: CR2: 00007fff5cfa9b10 CR3: 00000003338c1000 CR4: 00000000001407e0 Feb 10 09:43:43 test27.engr.enmotus.com kernel: Stack: Feb 10 09:43:43 test27.engr.enmotus.com kernel: ffff88032024fa78 ffffffff8119ab05 000000012024fb08 ffff8804680cf980 Feb 10 09:43:43 test27.engr.enmotus.com kernel: 0000000000000017 00000000e36a2c6d 000000102024fae8 ffff88006a891b00 Feb 10 09:43:43 test27.engr.enmotus.com kernel: ffff880333920000 ffff88006a891b00 0000000000002000 ffffea000cd38080 Feb 10 09:43:43 test27.engr.enmotus.com kernel: Call Trace: Feb 10 09:43:43 test27.engr.enmotus.com kernel: [] ? mempool_alloc_slab+0x15/0x20 Feb 10 09:43:43 test27.engr.enmotus.com kernel: [] generic_make_request+0xf8/0x150 Feb 10 09:43:43 test27.engr.enmotus.com kernel: [] submit_bio+0x78/0x190 Feb 10 09:43:43 test27.engr.enmotus.com kernel: [] en_block_do_io+0x155/0x330 [en_tier] Feb 10 09:43:43 test27.engr.enmotus.com kernel: [] en_block_write+0x1f/0x30 [en_tier] Feb 10 09:43:43 test27.engr.enmotus.com kernel: [] en_write_sectors+0x5e/0xe0 [en_tier] Feb 10 09:43:43 test27.engr.enmotus.com kernel: [] en_write_metadata+0x5a/0xd0 [en_tier] Feb 10 09:43:43 test27.engr.enmotus.com kernel: [] en_write_ddf_pdrecord+0x77/0xf0 [en_tier] Feb 10 09:43:43 test27.engr.enmotus.com kernel: [] en_ddf_update_pdr+0xd0/0x190 [en_tier] Feb 10 09:43:43 test27.engr.enmotus.com kernel: [] en_ddf_add_pdisk+0x1dc/0x2e0 [en_tier] Feb 10 09:43:43 test27.engr.enmotus.com kernel: [] en_init_pdisk_meta+0x50/0x110 [en_tier] Feb 10 09:43:43 test27.engr.enmotus.com kernel: [] en_process_init+0x15e/0x2c0 [en_tier] Feb 10 09:43:43 test27.engr.enmotus.com kernel: [] en_cmd_init+0xdf/0x2c0 [en_tier] Feb 10 09:43:43 test27.engr.enmotus.com kernel: [] en_cmdline_parse+0x275/0x4c0 [en_tier] Feb 10 09:43:43 test27.engr.enmotus.com kernel: [] ? inode_has_perm.isra.30+0x27/0x40 Feb 10 09:43:43 test27.engr.enmotus.com kernel: [] en_be_log_write+0x293/0x2c0 [en_tier] Feb 10 09:43:43 test27.engr.enmotus.com kernel: [] en_cmd_user_process+0xc7/0x140 [en_tier] Feb 10 09:43:43 test27.engr.enmotus.com kernel: [] en_user_write+0x76/0xa0 [en_tier] Feb 10 09:43:43 test27.engr.enmotus.com kernel: [] vfs_write+0xb7/0x1f0 Feb 10 09:43:43 test27.engr.enmotus.com kernel: [] SyS_write+0x55/0xd0 Feb 10 09:43:43 test27.engr.enmotus.com kernel: [] system_call_fastpath+0x12/0x17 Feb 10 09:43:43 test27.engr.enmotus.com kernel: Code: 8b 54 19 08 41 0f 46 c4 89 d6 44 29 ee 39 f0 0f 47 c6 41 01 c5 29 c3 41 29 c4 44 39 ea 75 cc 41 83 c7 01 45 31 ed eb c3 0f 1f 00 <0f> 0b 66 0f 1f 44 00 00 be fb ff ff ff e9 79 ff ff ff 80 3d 0b Feb 10 09:43:43 test27.engr.enmotus.com kernel: RIP [] pmem_make_request+0x160/0x1c0 [pmem] Feb 10 09:43:43 test27.engr.enmotus.com kernel: RSP Feb 10 09:43:43 test27.engr.enmotus.com kernel: ---[ end trace 73f040217b1381f1 ]--- diff --git a/drivers/block/pmem.c b/drivers/block/pmem.c index 1bd9ab0..0b3c8d6 100644 --- a/drivers/block/pmem.c +++ b/drivers/block/pmem.c @@ -297,6 +299,7 @@ static struct pmem_device *pmem_alloc(phys_addr_t phys_addr, size_t disk_size, blk_queue_make_request(pmem->pmem_queue, pmem_make_request); blk_queue_max_hw_sectors(pmem->pmem_queue, 1024); blk_queue_bounce_limit(pmem->pmem_queue, BLK_BOUNCE_ANY); + blk_queue_max_segment_size(pmem->pmem_queue, PAGE_SIZE); disk = alloc_disk(0);