From patchwork Fri Sep 4 08:05:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Matias_Bj=C3=B8rling?= X-Patchwork-Id: 7120281 Return-Path: X-Original-To: patchwork-linux-fsdevel@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 A6EF49F7CA for ; Fri, 4 Sep 2015 08:06:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9578220880 for ; Fri, 4 Sep 2015 08:06:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3123A20827 for ; Fri, 4 Sep 2015 08:06:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753551AbbIDIFa (ORCPT ); Fri, 4 Sep 2015 04:05:30 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:35850 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750749AbbIDIFR (ORCPT ); Fri, 4 Sep 2015 04:05:17 -0400 Received: by wibz8 with SMTP id z8so8923566wib.1 for ; Fri, 04 Sep 2015 01:05:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bjorling.me; s=google; h=message-id:date:from:organization:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=9muP2bztk7Ha+at8i833Ig1HFa6ysa6/bJ2y5Xpf6Vc=; b=dnxA1QffszEcmHcLtwfkpYKD8RsOJtvb5r0A5VyYBYNZysTRVkKkRWma2iNsivdiPb OIpCHh4ge63eLaM41b7U7QplM52+aS/e3HlcxB9wa8C4EXf6FARosHrFMFzDgsx36Ptd 6juom2cHk43y42u3X0nbwl4TziXZfuSg+DcgM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:organization:user-agent :mime-version:to:cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=9muP2bztk7Ha+at8i833Ig1HFa6ysa6/bJ2y5Xpf6Vc=; b=Mpruz2faGzX6aLwCqsX6bv4MREhWxpJ8kC2V1fmovK+Tqjz5LSugzKGh5P0PuP9A45 D+JfYLdGxpE/IG9BBgP8dj+O5nz5MJVGP4QK5nziSv1R6Nj2Y2zvPYAwkpbiVVLppRey xRuVeYvDZ+Mj6An03nTsD2BHtXmIYT3ro7RrEFygwIeWO+AlLthr11px4Q4/xrdZD5TA izwQWDRDY3l7f4fJt11Gq6tgFLfK/oLnjeEO/p3i4q7V27O1clTw/Qf4upUYiHpEGf6A lAc0JyClJFrIEaCL3ZY1zTIVlCvFS2Y1rgcwCARuMKHkbKeXjIeornLdulgdKS5coo94 IY9A== X-Gm-Message-State: ALoCoQmDYm/mRHzHtQ5bP0E0CjFH5CoVlmSfiEsVIXq/PZklDt5WWQUfc/WHJtqZvVdLG5jmbO9C X-Received: by 10.180.88.195 with SMTP id bi3mr4773426wib.64.1441353915615; Fri, 04 Sep 2015 01:05:15 -0700 (PDT) Received: from [192.168.1.131] (6164198-cl69.boa.fiberby.dk. [193.106.164.198]) by smtp.googlemail.com with ESMTPSA id c11sm2821693wib.1.2015.09.04.01.05.14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Sep 2015 01:05:15 -0700 (PDT) Message-ID: <55E950BA.50203@bjorling.me> Date: Fri, 04 Sep 2015 10:05:14 +0200 From: =?UTF-8?B?TWF0aWFzIEJqw7hybGluZw==?= Organization: Paletta User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Dongsheng Yang , hch@infradead.org, axboe@fb.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org CC: jg@lightnvm.io, Stephen.Bates@pmcs.com, keith.busch@intel.com, =?UTF-8?B?TWF0aWFzIEJqw7hybGluZw==?= Subject: Re: [PATCH v7 1/5] lightnvm: Support for Open-Channel SSDs References: <1438957791-24632-1-git-send-email-mb@lightnvm.io> <1438957791-24632-2-git-send-email-mb@lightnvm.io> <55E67218.9010701@cn.fujitsu.com> <55E6D41A.5060100@bjorling.me> <55E94301.3010501@cn.fujitsu.com> In-Reply-To: <55E94301.3010501@cn.fujitsu.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 > > So here is a suggestion, register_bm again > if we found nvm_dev->bm == NULL in create_target(). And if it is still > NULL after that. return an error "nvm: no compatible bm was found" > and stop target creating. Otherwise, there would be a NULL Pointer > reference problem. > > That's a real problem I met in my testing and I did this change > in my local using. I hope that's useful to you. > Hi Yang, Similar to this? pr_info("nvm: registered %s with luns: %u blocks: %lu sector size: %d\n", --- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git i/drivers/lightnvm/core.c w/drivers/lightnvm/core.c index 5e4c2b8..0d2e5e3 100644 --- i/drivers/lightnvm/core.c +++ w/drivers/lightnvm/core.c @@ -262,8 +262,9 @@ int nvm_init(struct nvm_dev *dev) } if (!ret) { - pr_info("nvm: no compatible bm was found.\n"); - return 0; + pr_info("nvm: %s was not initialized due to no compatible bm.\n", + dev->name); + return -EINVAL; }