From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755710AbZECSkh (ORCPT ); Sun, 3 May 2009 14:40:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753207AbZECSk0 (ORCPT ); Sun, 3 May 2009 14:40:26 -0400 Received: from srv5.dvmed.net ([207.36.208.214]:58147 "EHLO mail.dvmed.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752229AbZECSkZ (ORCPT ); Sun, 3 May 2009 14:40:25 -0400 Message-ID: <49FDE50A.4060503@garzik.org> Date: Sun, 03 May 2009 14:40:10 -0400 From: Jeff Garzik User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: Matthew Wilcox , Jens Axboe CC: Boaz Harrosh , Hugh Dickins , Matthew Wilcox , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, Bartlomiej Zolnierkiewicz , Mark Lord Subject: Re: New TRIM/UNMAP tree published (2009-05-02) References: <1238683047-13588-1-git-send-email-willy@linux.intel.com> <49D8A3D7.5070507@panasas.com> <20090503061150.GF10704@linux.intel.com> <20090503071619.GP8822@parisc-linux.org> <20090503144847.GR8822@parisc-linux.org> <49FDB21B.3080301@panasas.com> <20090503154216.GU8822@parisc-linux.org> <49FDC786.6070309@panasas.com> <49FDE3BB.505@garzik.org> In-Reply-To: <49FDE3BB.505@garzik.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -4.4 (----) X-Spam-Report: SpamAssassin version 3.2.5 on srv5.dvmed.net summary: Content analysis details: (-4.4 points, 5.0 required) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jeff Garzik wrote: > (2) determine at init if queue (a) supports explicit DISCARD and/or (b) > supports DISCARD flag passed with READ or WRITE As an aside -- does any existing command set support case #b, above? AFAICT, ATA, SCSI and NVMHCI all have a single, explicit hardware command to discard/deallocate unused sectors. Therefore, creating REQ_TYPE_DISCARD seems to eliminate any need for new hook ->prepare_discard(). This provides a 1:1 correspondence between hardware and struct request, most closely matching the setup of known hardware. Jeff