All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Randy Dunlap <rdunlap@infradead.org>, Kees Cook <keescook@chromium.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	James Bottomley <James.Bottomley@hansenpartnership.com>,
	Tejun Heo <tj@kernel.org>, Borislav Petkov <bp@alien8.de>,
	"David S. Miller" <davem@davemloft.net>,
	"Manoj N. Kumar" <manoj@linux.vnet.ibm.com>,
	"Matthew R. Ochs" <mrochs@linux.vnet.ibm.com>,
	Uma Krishnan <ukrishn@linux.vnet.ibm.com>,
	linux-block <linux-block@vger.kernel.org>,
	linux-ide@vger.kernel.org, linux-scsi@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI
Date: Wed, 23 May 2018 15:22:35 -0600	[thread overview]
Message-ID: <4f95332f-e298-8d7d-1284-5363c10412a8@kernel.dk> (raw)
In-Reply-To: <e9eb326b-aa80-07a3-4579-6828f22cdad2@infradead.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 <axboe@kernel.dk> 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

  reply	other threads:[~2018-05-23 21:22 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-22 18:15 [PATCH 0/6] block: Consolidate scsi sense buffer usage Kees Cook
2018-05-22 18:15 ` [PATCH 1/6] ide-cd: Drop unused sense buffers Kees Cook
2018-05-22 18:41   ` Christoph Hellwig
2018-05-22 18:15 ` [PATCH 2/6] scsi: cxlflash: " Kees Cook
2018-05-22 18:41   ` Christoph Hellwig
2018-05-22 21:03   ` Matthew R. Ochs
2018-05-22 18:15 ` [PATCH 3/6] block: Create scsi_sense.h for SCSI and ATAPI Kees Cook
2018-05-22 18:36   ` Christoph Hellwig
2018-05-22 18:50     ` Martin K. Petersen
2018-05-22 18:59       ` Kees Cook
2018-05-22 19:09         ` Jens Axboe
2018-05-22 19:13           ` Christoph Hellwig
2018-05-22 19:16             ` Jens Axboe
2018-05-22 23:31               ` Kees Cook
2018-05-22 23:34                 ` Randy Dunlap
2018-05-22 23:39                   ` Kees Cook
2018-05-22 23:41                     ` Randy Dunlap
2018-05-22 23:42                 ` Jens Axboe
2018-05-22 23:42                   ` Jens Axboe
2018-05-22 23:49                   ` Kees Cook
2018-05-22 23:49                     ` Kees Cook
2018-05-23 14:13                     ` Jens Axboe
2018-05-23 14:25                       ` Christoph Hellwig
2018-05-23 14:31                         ` Jens Axboe
2018-05-23 20:52                           ` Kees Cook
2018-05-23 21:06                             ` Martin K. Petersen
2018-05-23 21:17                               ` Kees Cook
2018-05-24  7:36                                 ` Christoph Hellwig
2018-05-23 21:14                             ` Jens Axboe
2018-05-23 21:20                               ` Randy Dunlap
2018-05-23 21:22                                 ` Jens Axboe [this message]
2018-05-23 21:23                                   ` Randy Dunlap
2018-05-24  8:00                               ` Christoph Hellwig
2018-05-24 17:06                                 ` Kees Cook
2018-05-25 14:48                                   ` Christoph Hellwig
2018-07-08 20:23                                   ` Christoph Hellwig
2018-07-09 15:56                                     ` Kees Cook
2018-07-31  7:53                                       ` Christoph Hellwig
2018-07-31 19:52                                         ` Kees Cook
2018-05-22 18:15 ` [PATCH 4/6] block: Consolidate scsi sense buffer usage Kees Cook
2018-05-22 18:15 ` [PATCH 5/6] libata-scsi: Move sense buffers onto stack Kees Cook
2018-05-22 18:15 ` [PATCH 6/6] scsi: Check sense buffer size at build time Kees Cook
2018-05-23  8:25   ` Sergei Shtylyov
2018-05-23 21:08     ` Kees Cook
2018-05-24 14:11   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4f95332f-e298-8d7d-1284-5363c10412a8@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=bp@alien8.de \
    --cc=davem@davemloft.net \
    --cc=hch@infradead.org \
    --cc=keescook@chromium.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=manoj@linux.vnet.ibm.com \
    --cc=martin.petersen@oracle.com \
    --cc=mrochs@linux.vnet.ibm.com \
    --cc=rdunlap@infradead.org \
    --cc=tj@kernel.org \
    --cc=ukrishn@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.