From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758504AbbA2Wzi (ORCPT ); Thu, 29 Jan 2015 17:55:38 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:56895 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751999AbbA2Wzd (ORCPT ); Thu, 29 Jan 2015 17:55:33 -0500 From: Arnd Bergmann 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 Date: Thu, 29 Jan 2015 23:19:11 +0100 Message-ID: <6288705.r5DnSskuxD@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20150129190102.GF9981@birch.djwong.org> References: <20150129020025.GE9981@birch.djwong.org> <2747023.BlTyJ4fNVf@wuerfel> <20150129190102.GF9981@birch.djwong.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:29D6/nsaZ5XNgraW/sXbgtvnpPdHZMleK3wYgpVGPM3A0k3n/nN bc8uQw71zkvGcbjdOYHnnfG7upL2aJ7LGeN4p1HhpBaZFg44oxqArHDIkDx6WspYjbxIgL9 HxdEVO+LsxwFmevyEUHbO12YaOOaefzkcWDCAjdZp/CGQ5bTt2UyBMzY0108QD5j/ItJRiH GCQd/nn1ZvPwayRBK7Aow== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 29 January 2015 11:01:02 Darrick J. Wong wrote: > It won't do all-ones, because the underlying blkdev_issue_zeroout call only > knows how to tell the device to write zeroes or perform a discard if the flag > is set and the device is whitelisted. This patch only exposes the existing > kernel call to userspace. > > (All-ones could be plumbed into the storage stack, but that would have to be a > separate patch.) I see. I've just checked the code in the mmc core and it seems to get the correct information for both mmc and sd devices (they use different bits to announce the feature). So as long as the devices follow the spec, everything is fine here. Thanks Darrick and Robert for the quick reply! Arnd