From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757682AbbA3Asj (ORCPT ); Thu, 29 Jan 2015 19:48:39 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:38495 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751534AbbA3Ash (ORCPT ); Thu, 29 Jan 2015 19:48:37 -0500 To: "Darrick J. Wong" Cc: Jens Axboe , Christoph Hellwig , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, Jeff Layton , "J. Bruce Fields" Subject: Re: [RESEND] [PATCH] block: create ioctl to discard-or-zeroout a range of blocks From: "Martin K. Petersen" Organization: Oracle References: <20150129020025.GE9981@birch.djwong.org> Date: Thu, 29 Jan 2015 19:48:06 -0500 In-Reply-To: <20150129020025.GE9981@birch.djwong.org> (Darrick J. Wong's message of "Wed, 28 Jan 2015 18:00:25 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: acsinet22.oracle.com [141.146.126.238] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>>> "Darrick" == Darrick J Wong writes: Darrick> Create a new ioctl to expose the block layer's newfound ability Darrick> to issue either a zeroing discard, a WRITE SAME with a zero Darrick> page, or a regular write with the zero page. This BLKZEROOUT2 Darrick> ioctl takes {start, length, flags} as parameters. So far, the Darrick> only flag available is to enable the zeroing discard part -- Darrick> without it, the call invokes the old BLKZEROOUT behavior. Darrick> start and length have the same meaning as in BLKZEROOUT. Darrick> Furthermore, because BLKZEROOUT2 issues commands directly to Darrick> the storage device, we must invalidate the page cache (as a Darrick> regular O_DIRECT write would do) to avoid returning stale cache Darrick> contents at a later time. Looks good to me, Darrick. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering