From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin K. Petersen" Subject: Re: [PATCH 2/2] block: create ioctl to discard-or-zeroout a range of blocks Date: Thu, 03 Mar 2016 13:01:11 -0500 Message-ID: References: <20160302040932.16685.62789.stgit@birch.djwong.org> <20160302040947.16685.42926.stgit@birch.djwong.org> <20160302225601.GB21890@birch.djwong.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: (Linus Torvalds's message of "Wed, 2 Mar 2016 15:49:53 -0800") Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Linus Torvalds Cc: "Darrick J. Wong" , Jens Axboe , Christoph Hellwig , Andrew Morton , "Martin K. Petersen" , Linux API , Linux Kernel Mailing List , shane.seymour-ZPxbGqLxI0U@public.gmane.org, Bruce Fields , linux-fsdevel , Jeff Layton List-Id: linux-api@vger.kernel.org >>>>> "Linus" == Linus Torvalds writes: Linus> .. but the flag doesn't even set that. Even if you avoid TRIM, Linus> there is absolutely zero guarantees that WRITE_SAME would do Linus> "real storage blocks full of zeroes backing the LBAs they just Linus> wrote out". That's not entirely true. Writing the blocks may cause them to be allocated on the storage device (depending on which flags we feed it in WRITE SAME). The filesystems people were wanted the following semantics: - deallocate, don't care about contents for future reads (discard) - deallocate, guarantee zeroes on future reads (zeroout) - (re)allocate, guarantee zeroes on future reads (zeroout) Maybe we just need a better naming scheme... -- Martin K. Petersen Oracle Linux Engineering