From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 3/3] block: implement (some of) fallocate for block devices Date: Sat, 5 Mar 2016 12:57:28 -0800 Message-ID: <20160305205728.GA4834@infradead.org> References: <20160305005556.29738.66782.stgit@birch.djwong.org> <20160305005617.29738.85316.stgit@birch.djwong.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Linus Torvalds Cc: "Darrick J. Wong" , Jens Axboe , Christoph Hellwig , Theodore Ts'o , "Martin K. Petersen" , Linux API , Dave Chinner , Linux Kernel Mailing List , shane.seymour-ZPxbGqLxI0U@public.gmane.org, Bruce Fields , linux-fsdevel , Jeff Layton , Andrew Morton List-Id: linux-api@vger.kernel.org On Fri, Mar 04, 2016 at 07:06:38PM -0800, Linus Torvalds wrote: > > + if ((mode & FALLOC_FL_PUNCH_HOLE) && > > + (!blk_queue_discard(q) || !q->limits.discard_zeroes_data)) > > + return -EOPNOTSUPP; > > I'm ok with this, but suspect that some users would prefer to just > turn this into ZERO_RANGE silently. > > Comments from people who would be expected to use this? A hole punch should be a hole punch, and not silently allocate blocks isntead of deallocating them. It's not even a fallback, it's pretty much the opposite for some workloads.