Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1335177imm; Wed, 23 May 2018 14:24:30 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo+cRaw0phlYtqWyuqHa5uRD9rEDlapSDemqcD5o+RdldMPBC6+htw4uA2+LIN7QW8HN6UH X-Received: by 2002:a63:6f05:: with SMTP id k5-v6mr3604007pgc.62.1527110670154; Wed, 23 May 2018 14:24:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527110670; cv=none; d=google.com; s=arc-20160816; b=uvlfxq8mNFzSsN0nUbttoOf/Dw0e8Mn0FyZTk00yhmwIeRw/5/Tzgf4ZnNk8DW1GFv 6xwDgkPBGelR8RCtjP4TuNrkr5XU8WtXCG4AC5sAqM4e2Hsx5O5JdFgmXEhws6PMLNfq awMujryUgZtc+HPnQ5xyQ0RPN+Z7j3NrgFEE+KTsvc1oE6auHPAmaVnXVIFxDCK8pkAa hPFFGIaIN6p1uXviaR+N4lOMtSbpWVLHku946IjfyQq2jRddQdwSc8h38oJ46UxE/9Z2 XbRLcB9/Jfr8chIF7Fn2mNIi+SAKn6mynlHfKAOsmVCHcJdGVFp72IEqaWg8nNLBRiu+ BhBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=f2LNoKH/r72qOvwAkEC5LoUstXPpc26Iwgt7vLiUSUE=; b=eEwS71q+CrdhibRF/waIctwQ1Hob/lLDYWV9REGm6kT7eUXSCYWIQqx1ZLf+Rq38rp ByUzT0ScYxIFY70WVWfZSwtj/5ImvE9rBKjWvaWi+EVCkiIbBagI+SO1si02NS+kcomY sY+pX31JsNTK9bKmfqXZXSYlPFF8yx2hU5jO2EuJ2D7e32ZgqfShMBc+vvNRN+xMHPsb 0p1BL9tmzpnbHovRQvtqHOxqT/+q30RDgmvdCXu3EBF5Ab4zfJ2LeUeiUgqlbdboOeXc 79bJZOsh1VdmoeKi66p1D/sCuybfM3uDDv8ak3P26Ms2jIWUomjoJGyEKjDPheeYVGFL j6ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=ypDA0wFl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y64-v6si20499985pfj.239.2018.05.23.14.24.15; Wed, 23 May 2018 14:24:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=ypDA0wFl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934968AbeEWVYH (ORCPT + 99 others); Wed, 23 May 2018 17:24:07 -0400 Received: from merlin.infradead.org ([205.233.59.134]:54312 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933945AbeEWVYE (ORCPT ); Wed, 23 May 2018 17:24:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=f2LNoKH/r72qOvwAkEC5LoUstXPpc26Iwgt7vLiUSUE=; b=ypDA0wFlzQ4jKVUuhC4lmH1sob /sDWRHF7sT/7VYs/YgfpF0QZpF1AIsKcp/Xd22GPsreYJiKM+BNq/QSAjIjDPZ3IVVyKNZax8pvfu JLh8A89TJlvSMX9wBYaGXs66YVpn/v+LlvQwOsn8zfAZlszKXgApB3fnRJ59rh40sHMgn4INn1ca7 XS/t5SleYCOOeN407a4bgx1J3KyOUG4vqQ7EFcsCeIiJfKPuyYGNpClzlbAveGIra+MXf+OvypxQM MXIlntJF0uT1kOW+nzLo7jFpjby76cJzoqUtrnG0t+8yhll+K33njd2z10MHZ37jpJqN+FZXx+Nh6 BK4kc5wA==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=dragon.dunlab) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLbEo-0000jz-1g; Wed, 23 May 2018 21:24:02 +0000 Subject: Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI To: Jens Axboe , Kees Cook Cc: Christoph Hellwig , "Martin K. Petersen" , James Bottomley , Tejun Heo , Borislav Petkov , "David S. Miller" , "Manoj N. Kumar" , "Matthew R. Ochs" , Uma Krishnan , linux-block , linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org, LKML References: <20180522183613.GA3784@infradead.org> <732f4249-5681-4a54-ec21-4ecc3d3a74e5@kernel.dk> <20180522191309.GA23615@infradead.org> <8d4af5c4-96fa-54ee-d5c1-b887b1de5a3c@kernel.dk> <9A0BC289-4203-4C77-A012-AAB07F42061F@kernel.dk> <20180523142545.GA16248@infradead.org> <24d36869-e037-042d-cb16-20a81b34eb76@kernel.dk> <4f95332f-e298-8d7d-1284-5363c10412a8@kernel.dk> From: Randy Dunlap Message-ID: <6e824073-aaff-5d2e-5179-c6b890fda1d0@infradead.org> Date: Wed, 23 May 2018 14:23:59 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <4f95332f-e298-8d7d-1284-5363c10412a8@kernel.dk> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/23/2018 02:22 PM, Jens Axboe wrote: > On 5/23/18 3:20 PM, Randy Dunlap wrote: >> On 05/23/2018 02:14 PM, Jens Axboe wrote: >>> On 5/23/18 2:52 PM, Kees Cook wrote: >>>> On Wed, May 23, 2018 at 7:31 AM, Jens Axboe wrote: >>>>> On 5/23/18 8:25 AM, Christoph Hellwig wrote: >>>>>> On Wed, May 23, 2018 at 08:13:56AM -0600, Jens Axboe wrote: >>>>>>>> Should I move to code to a new drivers/scsi/scsi_sense.c and add it to >>>>>>>> drivers/scsi/Makefile as: >>>>>>>> >>>>>>>> obj-$(CONFIG_BLK_SCSI_REQUEST) += scsi_sense.o >>>>>>>> >>>>>>>> Every place I want to use the code is already covered by >>>>>>>> CONFIG_BLK_SCSI_REQUEST, so it seems like I just need to know where to >>>>>>>> put the .c file. :P >>>>>>> >>>>>>> I think this is so much saner than a SCSI select or dependency, so I'll >>>>>>> have to disagree with Martin and Christoph. Just put it in drivers/scsi, >>>>>>> if it's the location they care about. >>>>>> >>>>>> I actually plan to remove CONFIG_BLK_SCSI_REQUEST in a merge window >>>>>> or two. The only users are scsi and the ide layer, (virtio_blk >>>>>> support has already been accidentally disabled for a while), and getting >>>>>> rid of it allows to to shrink and simply the scsi data structures. >>>>>> >>>>>> But if you want this for now lets keep scsi_sense.c in drivers/scsi >>>>>> but depend on CONFIG_BLK_SCSI_REQUEST, that is easy enough to fix up. >>>>> >>>>> It could be a stand-alone dependency, doesn't have to be BLK_SCSI_REQUEST. >>>>> BLA_SCSI_SENSE or something would do. I don't care too much about that, >>>>> mostly getting rid of the entire stack dependency. >>>> >>>> Aaand, I can't do this and leave it in drivers/scsi because of drivers/Makefile: >>>> >>>> obj-$(CONFIG_SCSI) += scsi/ >>>> >>>> So: this needs to live in block/ just like CONFIG_BLK_SCSI_REQUEST's >>>> scsi_ioctl.c. I will split it into CONFIG_BLK_SCSI_SENSE, but I'll >>>> still need to move the code from drivers/scsi/ to block/. Is this >>>> okay? >>> >>> Ugh, so that would necessitate a change there too. As I said before, >>> I don't really care where it lives. I know the SCSI folks seem bothered >>> by moving it, but in reality, it's not like this stuff will likely ever >>> really change. Of the two choices (select entire SCSI stack, or just move >>> this little bit), I know what I would consider the saner option... >>> >> >> or option 3: >> >> obj-y += scsi/ >> >> so that make descends into drivers/scsi/ and then builds whatever is needed, >> depending on individual kconfig options. > > Right, that was the initial option, the later two are the other options. > Sorry, I'm late to the party. -- ~Randy