From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E03AC433B4 for ; Thu, 6 May 2021 15:08:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 20DC361168 for ; Thu, 6 May 2021 15:08:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234971AbhEFPJP (ORCPT ); Thu, 6 May 2021 11:09:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:59832 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234901AbhEFPJP (ORCPT ); Thu, 6 May 2021 11:09:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 25C656102A; Thu, 6 May 2021 15:08:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620313697; bh=oyr+XBP7Bz+PMsRDON0jst54egtaEfqr+lGI+69AiYk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EGY0k99JiiPP7xYFNfEY/3qNoTW4VBLOTXA/X1PCDXSyXcEHYcfpZ9aXUa8V89Gst WkaSvqpAcvHt66WvdszAKUUq4R925OmqjsbQvnTm5oa8kncy38c2+1ECnyvNun1qUc 3ge7bwIpnCgM0Ad6IyenMguu6JOgoVZQWoAxF5hN1GmooK2gPJ8msmScnDZVDUiLkI k45jla5rddaXWeNPlR2d7QehBPjvb2m0K+3/frRFXtg5+4szdpUnZxLKZsGwVd2Ovq rGF1dgJFqfGLBnUp4M4ywpBZfuayvimoKsgTnxMENtUk1iGEIQVu4a8nPkbYA46wNN bUFlSyjV+F/Xw== Date: Thu, 6 May 2021 08:08:16 -0700 From: "Darrick J. Wong" To: Christoph Hellwig Cc: Leah Rumancik , linux-ext4@vger.kernel.org, tytso@mit.edu Subject: Re: [PATCH v3 2/3] ext4: add ioctl EXT4_IOC_CHECKPOINT Message-ID: <20210506150816.GE8532@magnolia> References: <20210504163550.1486337-1-leah.rumancik@gmail.com> <20210504163550.1486337-2-leah.rumancik@gmail.com> <20210505212711.GA8532@magnolia> <20210506071836.GA337144@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210506071836.GA337144@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, May 06, 2021 at 08:18:36AM +0100, Christoph Hellwig wrote: > On Wed, May 05, 2021 at 02:27:11PM -0700, Darrick J. Wong wrote: > > Er... what specifically does "data" mean? File data, or just the dirent > > blocks? > > > > I think this is only true if discard_zeroes_data == 1, right? The last > > I looked, ext4 was calling REQ_OP_DISCARD, not REQ_OP_WRITE_ZEROES. > > > > Also, there are some SSDs that "implement" discard as nop, which means > > that the old contents can still be read by re-reading the LBAs. What > > about those? > > Not just some, but most at least for corner cases. ATA TRIM, SCSI UNMAP > and NVMe Deallocate all explicitly allow for keeping some of the old > data, and devices make use of that when the discard requests does not > map to their internal granularities. Heh, so that's a "stable" behavior. :) > > (Also wondering if this is where FS_SECRM_FL files should get their > > freed file blocks erased with REQ_OP_SECURE_ERASE...) > > Only implemented for mmc.. If the wording got tweaked to "...not readable via LBA interface after delete" then you could also REQ_OP_WRITE_ZEROES, which would work on a broader range of hardware. --D