From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751017AbcFCC4U (ORCPT ); Thu, 2 Jun 2016 22:56:20 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:19069 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750731AbcFCC4S (ORCPT ); Thu, 2 Jun 2016 22:56:18 -0400 To: Sitsofe Wheeler Cc: Shaohua Li , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, snitzer@redhat.com, axboe@fb.com, martin.petersen@oracle.com, Kernel-team@fb.com Subject: Re: [PATCH] block: correctly fallback for zeroout From: "Martin K. Petersen" Organization: Oracle Corporation References: <20160526180813.GA49039@shli-mbp.local> <20160527054918.GA9521@sucs.org> Date: Thu, 02 Jun 2016 22:56:05 -0400 In-Reply-To: <20160527054918.GA9521@sucs.org> (Sitsofe Wheeler's message of "Fri, 27 May 2016 06:49:21 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>>> "Sitsofe" == Sitsofe Wheeler writes: Sitsofe> The original SCSI WRITE SAME has overloaded semantics - not Sitsofe> only does it mean "write this data multiple times" but it can Sitsofe> also be used to mean "discard this range" too. If the kernel's Sitsofe> command was modelled on the SCSI original perhaps this Sitsofe> conflation clouded things? REQ_WRITE_SAME in the context of the kernel explicitly means "write payload to this block range". A REQ_DISCARD command may be serviced using WRITE SAME(16) with the UNMAP bit set in the SCSI disk driver but that's entirely orthogonal. -- Martin K. Petersen Oracle Linux Engineering