Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp188783imd; Wed, 31 Oct 2018 17:05:55 -0700 (PDT) X-Google-Smtp-Source: AJdET5eGu/0tDMT1jhBpomsRXMj4TcjFRqIEhIQAMEcHWfDhIrQlcBhrSSfGO1QSxl2dNJ4X90pp X-Received: by 2002:a63:2744:: with SMTP id n65mr5033897pgn.65.1541030755878; Wed, 31 Oct 2018 17:05:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541030755; cv=none; d=google.com; s=arc-20160816; b=PuOHojqrae+3d8Htxv8IpyPPEtG5GCJkUcXu6veyT+wJEpYeUxhMs6X7UWbAqemk1D W6fGSDQ6h6yWyttkhxfoTHKk/GxKcgvxTCe34vdmU85dKVJgmoEhnh4Rz+4JuuJEuX5L IPsSIWJUpBtXbCUcVK70VPRNi/3L48J2pH+LebfRjj6/TSSTxNl+3Zpw4DFT4U2lK5Bj hATWW6ztpwYZgnC6cQLx+Yu/nm1dz2zb3QLsMEniSX2EIII4DyBv279T92PaFw6ajnEd 8xaK4yFUqMnWfQdzMepzBAV5KVZdPM7yG5uMDqnEDTOAMUcGFQC9Z5hjXZ74mIXnewqJ x82Q== 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:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=b1V8oEaWXihiKN7yHSA2kgIfscY0N1InxXnbrmnHvZg=; b=c6Mz8HimMoTCblaa2k4h8CUP1NUPVsEMwbBd9ZJvXCi00C5PQphPyxGLqRUe1/RRqz 6qBRuZB1zU6tB/sdVtQyQgd//oBsc53JW/HNRysilSNNbHRH4TerR8hKOwK4Vs6FdGgu T9VFvfkf7qpeVFkXNxEE/z3A0Q8h7e9ishdtDO5JV64NR0nNAJ6AQVH5wm8I7blcIfoT ReKx3LwkT9grxn7DtKt6T8WJuVeq+DK/UES0NHsjqBCIH9+kf1ofkfKDljHaaqzUmJ+c tpYrGF4+aNfQhUNMr6+TweXyjBVYNQsrxQ9Lr4elWcP9aw52Srjek8HvYfJD064/YVgZ b61g== ARC-Authentication-Results: i=1; mx.google.com; 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 s64-v6si29407974pfi.134.2018.10.31.17.05.40; Wed, 31 Oct 2018 17:05:55 -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; 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 S1726985AbeKAJEP (ORCPT + 99 others); Thu, 1 Nov 2018 05:04:15 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:36100 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726021AbeKAJEO (ORCPT ); Thu, 1 Nov 2018 05:04:14 -0400 Received: by mail-wm1-f68.google.com with SMTP id a8-v6so16004055wmf.1; Wed, 31 Oct 2018 17:03:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=b1V8oEaWXihiKN7yHSA2kgIfscY0N1InxXnbrmnHvZg=; b=BNp/EB3jKzDtXprw8g6GDBFNRnlRLaYJLdwidK07Dv1PO+8m/m+yVfPB3UW+L6Kw3q NDzt5LzMwOoBtDZ81dBPiQ5s/LEUVA3SjSRQkrAKE9o5SBZg+GGvtANNlaFXbbSMHXuH ea/Pn1Rn0zVOnaAjIVgLpbCPzQkX8NLVcrK5H6cLWCzKtT5wwxge0lev6KvJ+N9MWZXk WnQPZppXvWPiq8qtSTW3XI4Q8OzrVJiExKbk6GgcQrpHXeKSRtcfOUIs2eV9SjiQNEjH 1w77UMtMWiHynyxwF9NFJJHavxLMUjnTWUHyE5EYqArQvcaAC5ipkkYufUr0K/eFfOLl wMJA== X-Gm-Message-State: AGRZ1gLzOOxi282dB7BlZKnM4Kr/9piKBxfgjt4/oESaAiW8rgtiz3Ch 2fzz+TloDtGk78e3v0E+tpGp+0VM X-Received: by 2002:a1c:d750:: with SMTP id o77-v6mr3806569wmg.110.1541030625018; Wed, 31 Oct 2018 17:03:45 -0700 (PDT) Received: from [10.0.0.5] ([207.232.55.62]) by smtp.gmail.com with ESMTPSA id i204-v6sm34733528wmd.28.2018.10.31.17.03.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Oct 2018 17:03:44 -0700 (PDT) Subject: Re: remove exofs and the T10 OSD code V2 To: dgilbert@interlog.com, Christoph Hellwig , Jens Axboe , martin.petersen@oracle.com, Linus Torvalds References: <20181027082019.20838-1-hch@lst.de> <20181030074542.GB24697@lst.de> <57a73f2b-29be-6301-2f4b-df582b7d23ff@interlog.com> Cc: Nick Desaulniers , Nathan Chancellor , osd-dev@open-osd.org, linux-scsi@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org From: Boaz Harrosh Message-ID: Date: Thu, 1 Nov 2018 02:03:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <57a73f2b-29be-6301-2f4b-df582b7d23ff@interlog.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31/10/18 23:10, Douglas Gilbert wrote: > On 2018-10-31 4:57 p.m., Boaz Harrosh wrote: >> On 30/10/18 09:45, Christoph Hellwig wrote: >>> On Mon, Oct 29, 2018 at 02:42:12PM -0600, Jens Axboe wrote: >>>> LGTM, for both: >>> >>> I also have this one on top as requested by Martin. The core block >>> bidi support is unfortunately also used by bsg-lib, although it is >>> not anywhere near as invasive. But that is another argument for >>> looking into moving bsg-lib away from using block queues.. >>> >> >> BUT this patch is very very wrong. >> >> Totally apart from T10-OSD and its use in the field. Support for scsi BIDI >> commands is not exclusive to T10-OSD at all. Even the simple scsi-array >> command-set has BIDI operations defined. for example the write-return-xor >> and so on. >> >> Also some private administrative CDBs of some vendor devices uses SCSI-BIDI. >> So this patch just broke some drivers. (User-mode apps use bsg pass through) >> >> Also you might (try hard and) remove all usage of scsi-bidi as an initiator >> from the Linux Kernel. But what about target mode. As a target we have supported >> on the wire bidi protocols like write-return-xor and others for a long time. >> Are you willing to silently break all these setups in the field on the next update? >> Are you so sure these are never used? >> >> PLEASE, I beg of you guys. Do not remove SCSI-BIDI. It is a cry of generations. >> >> And I think by the rules of Linus, as far as target mode. You are not allowed >> to break users in this way. > > Hi, > I'm in the process of rebuilding the sg driver with the following goals: > > - undo 20 years of road wear, some of which is caused by literally > hundreds of "laparoscopic" patches that gradually ruin a driver, > at least from the maintainer's viewpoint. Comments that once made > sense become cryptic or just nonsense; naming schemes that > obliterate variable names to the extent that a random name > generator would be easier to follow; and just plain broken code. > For example, why sort out the existing locking at a particular > level when you can add a new lock in a completely non-orthogonal > way? [Yes, I looking at you, google.] Anyway, my first cut at this > is out there (on the linux-scsi list, see: "[PATCH v3 0/8] sg: > major cleanup, remove max_queue limit"). Not much new there, > unless you look very closely > > - the next step is to add to the sg driver async SCSI command > capability based on the sg_io_v4 structure previously only used > by the bsg driver and now removed from bsg. The main advantage > of the sg_io_v4 structure over previous pass-through interface > attempts is the support of SCSI bidi commands > > - as part of this effort introduce two new ioctls: SG_IOSUBMIT and > SG_IORECEIVE to replace the write()/read() technique currently > in use (since Linux 1.0 in 1992). The write()/read() technique > seems to be responsible for various security folks losing clumps > of their hair. One advantage of ioctls, as Alan Cox pointed out, > is the ability to write to and read back from the kernel in a way > that is naturally synchronized. [Actually, those security folks > shouldn't look too closely at sg_read() in that respect.] > > In discussions with several folks who are on the T10 committee, I > wondered why there was no READ GATHERED command (there has been a > WRITE SCATTERED for 2 years). The answer was lack of interest ***, > plus the difficultly of implementation. You see, READ GATHERED needs > to send a scatter gather list to the device and get the corresponding > data back (as a linear array). And that requires either: > a) bidi commands (scatter gather list in the data-out, corresponding > "read" data in the data-in), or > b) loooong SCSI commands, up to around 256 bytes long in which the > sgat list is the latter part of that command > > And the T10 folks say neither of those options is well supported or > is expensive. It is supported in Linux scsi/osd driver is a proof of that. And expensive it is not. I have demonstrated the ability to saturate a 10G link over a raid of devices from a single writer. In OSD everything is bidi. > I'm guessing they are referring to Linux and Windows. > I haven't argued much beyond that point, but it looks like a bit of > a chicken and egg situation. > > > Don't know too much about the T10 OSD stuff. But I can see that it > uses both long SCSI commands and a lot of bidi. IMO it seems to be > 10 or 20 years before its time. Maybe ibm/redhat need to > (re-)discover it for it to catch on. > > > Plus there are proprietary SCSI bidi commands out there. People contact > me and ask me how to issue them with sg3_utils package. Easy, I tell them, > just use sg_raw with a bsg device. Typically, in my experience, "no news > is good news" after suggestions like that. When I give bad advice, I > usually hear back relatively quickly. Anyone who wants SCSI bidi _async_ > support is currently out of luck. > Thank you Doug > Enough already > Doug Gilbert > > > *** example: loading all or most kernel modules in a few READ SCATTERED > commands might speed up boot time ... >