Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1334217imm; Wed, 23 May 2018 14:23:22 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo9wcOGtKg6DF+myOUsOy7Upt90wvcTQE0+xfh5IuKQqBcYWBxvSjBSgEzVtoX5NKOsFQFk X-Received: by 2002:a65:6690:: with SMTP id b16-v6mr2866661pgw.218.1527110602291; Wed, 23 May 2018 14:23:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527110602; cv=none; d=google.com; s=arc-20160816; b=VgcGQKR4PB0g8N1+9Mqwt9IzvZKON+HAJ7H0EBG1oLFNNswcwaD248tSisFAdac6nP 6lUBVoi/ahbapTlGOB4i1QvD/hA0vi0X9GEhp3M+jnALiIXiuo1XbbihmUmiyOkXOixZ cSMA89Uiult30KxuoRLZ8V1cbB8mLOohSGMhTJyGqHJnFXwq4aRkAyJYkvZgzsLQ0KP9 egg9T8KBkwRzXAD4U09u4zi7rCeuY0GdseDq9HK8/1zUy41Wr7cRwnS4ObKSq0/RQF6I 0rawRgTBQZcsX1sDaeqP5dgxOdcCRIANHaU6WfnWjTDzYeAP24cnW201qX/wssJKLrBb DYGA== 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=zDDFIt1WaDeYvOvsHJdlSv8SbieO5Ft6SkQr28PUT2U=; b=lwVrFl6Fq40Z2M7m+NsW6jWFaqUy5ltzDV60WO21GDy7pPtFLjQN6VY6jvRlhYbYmj bhOFQqNb02AjcWQ6MM9IIzEK+oSeWBDKGH19rFuMhagzF8pjydOuI449yMdY5rJfcN8L Bep6lntAQYK06ExLH09a057JKIxHD3khay21LUDoJ+pwTGAAPz9Y0tatcl9KU2kDgREK SjbKJTYGw8cwAcYXxQKVh2NL+FrsmyBowQTIH+6R+zijhDY1YEr5Svwp3E61/w9GGTTm EiMpIG6qz+KkQroYwupnAjpsx3x2CJlThwFOZTnVfjLzar1thHZnJu7JsfnZyFmQNNxs STPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=dqJGvK1d; 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.23.07; Wed, 23 May 2018 14:23:22 -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=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=dqJGvK1d; 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 S934942AbeEWVWw (ORCPT + 99 others); Wed, 23 May 2018 17:22:52 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:50837 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934077AbeEWVWj (ORCPT ); Wed, 23 May 2018 17:22:39 -0400 Received: by mail-it0-f67.google.com with SMTP id p3-v6so6332577itc.0 for ; Wed, 23 May 2018 14:22:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=zDDFIt1WaDeYvOvsHJdlSv8SbieO5Ft6SkQr28PUT2U=; b=dqJGvK1dMRGNwBHtZSY4oQ5Q5h/ihkAdG6ZVkdFFBHkGpTityiQFNsCku/706nh8cp GnjNRt/EaD65kCrwQ4aT3ZX8iwMpdjZHevsynbgYOEQW7dF5G4UPljtM/sEK/uMT3Ioe 6gQudbzM8gu2jwe8ct7E622XcsNqZwF+j99H8BlhUQEXOr0cHr1IqNQqUkTwyeIIf498 A8C4vpWSYzftI6uNDGh/H41WoiRjPmPTz8Tc9v+AvTF4blqPmKnC47K0qarkTobGV4Kc WKEBX0DH46Rtw/C+yMELF3oR6C+4Bfd845a5DRvLBcx/B0og7MVASsOc0IfEUEIHrIhm MQ4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zDDFIt1WaDeYvOvsHJdlSv8SbieO5Ft6SkQr28PUT2U=; b=JYu19/qoAEtTROx77NV3jsWHU2ELZDSFtE22b2HVLniIPNhbqPwBNFqq/15uYPA3J3 WG0ZtlC8gRALPsOgD1+IrOqz9Rnar4mWaFLUYbYzwsXHj4fi6THvdHd2qGkuI3X+4zcZ rcyzrwBv7jwAcSKoKM6rZ9CStdc2ukWixYejjAz6Y3R0VN+Irpbd5rSD+cbgzvR4ZSoy 1MKuoFBQTPi+B/HYdwiPS265JMEFp6tYxAJ3/g41oIibQD82Y8SEt7q+Fmd0beDXLel/ Hy5TV9kESOqD9ESx4Y6ry6NJKZIJouJVcJOIO/jgJ1gzdK3wuXM34Csr4ucTjvikyHHp gxxA== X-Gm-Message-State: ALKqPwf+e3fLomxQxBtKuTRlvRgwVcm3K/3S+ZrJAPXfTICVtslkvZ/M flIHeLZNJRFCLYBt/Fq54w3oYlkmDzs= X-Received: by 2002:a24:f687:: with SMTP id u129-v6mr6796630ith.35.1527110558646; Wed, 23 May 2018 14:22:38 -0700 (PDT) Received: from [192.168.1.211] (107.191.0.158.static.utbb.net. [107.191.0.158]) by smtp.gmail.com with ESMTPSA id n64-v6sm1644603itc.32.2018.05.23.14.22.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 May 2018 14:22:37 -0700 (PDT) Subject: Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI To: Randy Dunlap , 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> From: Jens Axboe Message-ID: <4f95332f-e298-8d7d-1284-5363c10412a8@kernel.dk> Date: Wed, 23 May 2018 15:22:35 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: 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 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. -- Jens Axboe