Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752435AbcCRDU5 (ORCPT ); Thu, 17 Mar 2016 23:20:57 -0400 Received: from imap.thunk.org ([74.207.234.97]:59396 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752403AbcCRDUs (ORCPT ); Thu, 17 Mar 2016 23:20:48 -0400 Date: Thu, 17 Mar 2016 23:20:23 -0400 From: "Theodore Ts'o" To: Chris Mason , Andreas Dilger , Linus Torvalds , Gregory Farnum , Eric Sandeen , "Darrick J. Wong" , Dave Chinner , Ric Wheeler , Andy Lutomirski , One Thousand Gnomes , Martin Petersen , Christoph Hellwig , Jens Axboe , Andrew Morton , Linux API , Linux Kernel Mailing List , shane.seymour@hpe.com, Bruce Fields , linux-fsdevel , Jeff Layton Subject: Re: [PATCH 2/2] block: create ioctl to discard-or-zeroout a range of blocks Message-ID: <20160318032023.GK23593@thunk.org> Mail-Followup-To: Theodore Ts'o , Chris Mason , Andreas Dilger , Linus Torvalds , Gregory Farnum , Eric Sandeen , "Darrick J. Wong" , Dave Chinner , Ric Wheeler , Andy Lutomirski , One Thousand Gnomes , Martin Petersen , Christoph Hellwig , Jens Axboe , Andrew Morton , Linux API , Linux Kernel Mailing List , shane.seymour@hpe.com, Bruce Fields , linux-fsdevel , Jeff Layton References: <20160315225224.GD23848@thunk.org> <20160316015139.GC5826@birch.djwong.org> <7674C689-C07E-4D38-85EB-4FD9B55CBB35@dilger.ca> <20160317001502.GF23593@thunk.org> <56E9FB73.6040803@redhat.com> <20160317183512.GA76233@clm-mbp.thefacebook.com> <819F38A3-51A7-4874-8314-8A6004495716@dilger.ca> <20160317210018.GA78710@clm-mbp.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160317210018.GA78710@clm-mbp.thefacebook.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1026 Lines: 22 On Thu, Mar 17, 2016 at 02:00:18PM -0700, Chris Mason wrote: > > Thinking more, my guess is that google will just keep doing what they > are already doing ;) But there could be a flag in sysfs dedicated to > trim-for-fallocate so admins can see what their devices are reporting. > readonly in mainline, if someone wants to patch it in their large data > center it wouldn't be hard. That's true, because one of the major use cases is SATA drives where trim isn't available. Even for SAS drives where you have WRITE SAME, you wouldn't want to use it for large fallocate regions. So I see using reliable trim as a zeroing mechanism to be orthogonal to the question of NO_HIIDE_STALE. I do think that using TRIM in various causes where we are doing an fallocate does make sense for non-rotational devices. In general TRIM should be fast enough that that I'd be surprised that people would be complaining --- especially since most of the time, fallocate isn't on the timing-critical path of most applications. - Ted