From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754606AbcDDGwY (ORCPT ); Mon, 4 Apr 2016 02:52:24 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:47389 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751847AbcDDGwX (ORCPT ); Mon, 4 Apr 2016 02:52:23 -0400 Date: Sun, 3 Apr 2016 23:52:20 -0700 From: Christoph Hellwig To: Al Viro Cc: Jens Axboe , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org Subject: Re: [RFC] weird semantics of SG_DXFER_TO_FROM_DEV in BLK_DEV_SKD (drivers/block/skd*) Message-ID: <20160404065220.GA9447@infradead.org> References: <20160404033845.GE17997@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160404033845.GE17997@ZenIV.linux.org.uk> User-Agent: Mutt/1.5.24 (2015-08-30) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 04, 2016 at 04:38:45AM +0100, Al Viro wrote: > I've no idea if anything is still using SG_DXFER_TO_FROM_DEV, but this > behaviour AFAICS doesn't match that of write() on /dev/sg* (both > in and out are done) or normal SG_IO (either both in and out, in case if it > hits bio_map_user_iov(), or only out if it hits bio_copy_user_iov()). In > all cases the out part is done. Here it is skipped. > > Not sure who (if anybody) maintains it these days, but that behaviour looks > wrong... The right fix is to kill the duplicate SG_IO implementation and use the block layer one. The driver actually is a pretty straight SCSI implementation, so making it a block driver has been a mistake from the start. I'll see if I can maybe get hold of hardware for the driver - it seems pretty much unmaintained unfortunately.