From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [PATCH 3/3] block: implement (some of) fallocate for block devices Date: Fri, 4 Mar 2016 19:06:38 -0800 Message-ID: References: <20160305005556.29738.66782.stgit@birch.djwong.org> <20160305005617.29738.85316.stgit@birch.djwong.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: <20160305005617.29738.85316.stgit-PTl6brltDGh4DFYR7WNSRA@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: "Darrick J. Wong" Cc: 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 4, 2016 at 4:56 PM, Darrick J. Wong wrote: > + /* Only punch if the device can do zeroing discard. */ > + 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? Linus