Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5435261imu; Tue, 13 Nov 2018 06:36:17 -0800 (PST) X-Google-Smtp-Source: AJdET5e51k+E5EO1MyGSXdFRcsyXKl9wCMnmpHS5K1sJT03lGOOw+zanh8/ZP3kYCqYcn6CUyrKO X-Received: by 2002:a63:4a0a:: with SMTP id x10mr4956612pga.237.1542119777408; Tue, 13 Nov 2018 06:36:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542119777; cv=none; d=google.com; s=arc-20160816; b=p6dwxAq69WPfZAyMN8KivSFjTWIQfU6X9+j7U4g9UtTAMrq0R78iQQoD0miSBympOu 7ddcMXjA5NMTQIwlaOdKEzMSAUVYX2y1D/XmDgny/wgK+0Rwi3BLqQn0cRS5tgJjjb3t 75vdT79srtWOkEL3n+HQV7z0TpyzI5Dza93xbd/S7+9kknUGuZE0722A012HDFIKjlsk uRty+NRZEoYnPsVw4LC+6cj0IqJFxBY+BVgJoYfQwq+/IHwo1uhwgfj/GdS8XEhuGgxU ufnGLZZsaNZ0o8nArJkJb305FFdF5w8wHbA2MpGuPKCtzMi/Q2dXne53Smnb1tf6QY2k ZdnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:subject:cc:to:from:date; bh=Y+otzGkALQmiuGtQYZP9cjs1SJbb8aYTcauPqfMltZI=; b=L3o42XJbZYfmr/GhxVzP+d7Wu0BO56FWdSZOgKC75DsWdgcKvH+yH2iWHDtBmeQE/w aJS71oHqBL6DkJ5LA1hXCx2Ksbka51zJBPRd8xw8jgUWYeN8iuKiidLDdObDVfHweSvh 53bTHN2IUfhRVCmaUEe3yZaa5bcCEp5MTfcGuE5YDnK0AxlcvOrkHxZuyGtkkHmIqTbY YxhAQspwqGofQvc4raBFkOIqGEOIS54rbbz+8JqS5pSpChaJLUgW1eIuLXlXRU2DoHYo 3PGRqImJQgt/7FoTnns9voqV/XmqN03WxY8PWS+94g1pbbJ6x6XMQk+lSo2oklCoKs74 vuvA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u126-v6si7659663pfu.157.2018.11.13.06.35.51; Tue, 13 Nov 2018 06:36:17 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731422AbeKNAdy (ORCPT + 99 others); Tue, 13 Nov 2018 19:33:54 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:42618 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726846AbeKNAdy (ORCPT ); Tue, 13 Nov 2018 19:33:54 -0500 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wADEYx4G023312 for ; Tue, 13 Nov 2018 09:35:28 -0500 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0b-001b2d01.pphosted.com with ESMTP id 2nr01wsgmm-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 13 Nov 2018 09:35:27 -0500 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 13 Nov 2018 14:35:26 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 13 Nov 2018 14:35:22 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wADEZMDN60358798 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 13 Nov 2018 14:35:22 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EA19911C064; Tue, 13 Nov 2018 14:35:21 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DFBC411C04A; Tue, 13 Nov 2018 14:35:21 +0000 (GMT) Received: from w530-pk1mzal (unknown [9.145.42.26]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 13 Nov 2018 14:35:21 +0000 (GMT) Received: from bblock by w530-pk1mzal with local (Exim 4.91) (envelope-from ) id 1gMZmj-0007AV-49; Tue, 13 Nov 2018 15:35:21 +0100 Date: Tue, 13 Nov 2018 15:35:20 +0100 From: Benjamin Block To: Christoph Hellwig Cc: axboe@kernel.dk, martin.petersen@oracle.com, ooo@electrozaur.com, Johannes Thumshirn , Benjamin Block , linux-scsi@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/8] bsg-lib: handle bidi requests without block layer help References: <20181111133211.13926-1-hch@lst.de> <20181111133211.13926-7-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181111133211.13926-7-hch@lst.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-TM-AS-GCONF: 00 x-cbid: 18111314-0028-0000-0000-000003194A93 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18111314-0029-0000-0000-000023D5B16A Message-Id: <20181113143520.GB7222@w530-pk1mzal> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-11-13_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1811130134 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 11, 2018 at 02:32:09PM +0100, Christoph Hellwig wrote: > We can just stash away the second request in struct bsg_job instead > of using the block layer req->next_rq field, allowing for the eventual > removal of the latter. > > Signed-off-by: Christoph Hellwig > --- > block/bsg-lib.c | 44 +++++++++++++++++++--- > block/bsg.c | 62 ++++++------------------------- > drivers/scsi/scsi_transport_sas.c | 1 - > include/linux/bsg-lib.h | 4 ++ > 4 files changed, 54 insertions(+), 57 deletions(-) > > diff --git a/block/bsg-lib.c b/block/bsg-lib.c > index 192129856342..005e2b75d775 100644 > --- a/block/bsg-lib.c > +++ b/block/bsg-lib.c > @@ -74,6 +74,9 @@ static int bsg_scsi_fill_hdr(struct request *rq, struct sg_io_v4 *hdr, > { > struct scsi_request *sreq = scsi_req(rq); > > + if (hdr->dout_xfer_len && hdr->din_xfer_len) > + return -EOPNOTSUPP; > + This seems like a non-obvious user-breakage. So apart from removing the in-kernel stuff that uses bidirectional commands you also forbid userspace from every using them? That seems wrong to me. There is other SCSI Command Sets than OSD that provide bidirectional commands, even SBC has some (i.e. X*WRITE*, COMPARE AND WRITE). -- With Best Regards, Benjamin Block / Linux on IBM Z Kernel Development IBM Systems & Technology Group / IBM Deutschland Research & Development GmbH Vorsitz. AufsR.: Martina Koederitz / Gesch?ftsf?hrung: Dirk Wittkopp Sitz der Gesellschaft: B?blingen / Registergericht: AmtsG Stuttgart, HRB 243294