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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 E592BC4BA1E for ; Wed, 26 Feb 2020 17:26:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BE89424680 for ; Wed, 26 Feb 2020 17:26:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726778AbgBZR04 (ORCPT ); Wed, 26 Feb 2020 12:26:56 -0500 Received: from mx2.suse.de ([195.135.220.15]:47206 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726687AbgBZR04 (ORCPT ); Wed, 26 Feb 2020 12:26:56 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A247EABE9; Wed, 26 Feb 2020 17:26:54 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 7295E1E0EA2; Wed, 26 Feb 2020 18:26:53 +0100 (CET) Date: Wed, 26 Feb 2020 18:26:53 +0100 From: Jan Kara To: "Darrick J. Wong" Cc: Matthew Wilcox , Ritesh Harjani , jack@suse.cz, tytso@mit.edu, linux-ext4@vger.kernel.org, adilger.kernel@dilger.ca, linux-fsdevel@vger.kernel.org, hch@infradead.org, cmaiolino@redhat.com Subject: Re: [PATCHv3 6/6] Documentation: Correct the description of FIEMAP_EXTENT_LAST Message-ID: <20200226172653.GW10728@quack2.suse.cz> References: <279638c6939b1f6ef3ab32912cb51da1a967cf8e.1582702694.git.riteshh@linux.ibm.com> <20200226130503.GY24185@bombadil.infradead.org> <20200226161742.GB8036@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200226161742.GB8036@magnolia> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Wed 26-02-20 08:17:42, Darrick J. Wong wrote: > On Wed, Feb 26, 2020 at 05:05:03AM -0800, Matthew Wilcox wrote: > > On Wed, Feb 26, 2020 at 03:27:08PM +0530, Ritesh Harjani wrote: > > > Currently FIEMAP_EXTENT_LAST is not working consistently across > > > different filesystem's fiemap implementations and thus this feature > > > may be broken. So fix the documentation about this flag to meet the > > > right expectations. > > > > Are you saying filesystems have both false positives and false negatives? > > I can understand how a filesystem might fail to set FIEMAP_EXTENT_LAST, > > but not how a filesystem might set it when there's actually another > > extent beyond this one. > > > > > * FIEMAP_EXTENT_LAST > > > -This is the last extent in the file. A mapping attempt past this > > > -extent will return nothing. > > > +This is generally the last extent in the file. A mapping attempt past this > > > +extent may return nothing. But the user must still confirm by trying to map > > > +past this extent, since different filesystems implement this differently. > > "This flag means nothing and can be set arbitrarily by the fs for the lulz." > > Yuck. I was really hoping for "This is set on the last extent record in > the dataset generated by the query parameters", particularly becaue > that's how e2fsprogs utilties interpret that flag. The problem is that in some cases, we cannot determine whether the flag should be set without doing work equivalent to another fiemap call. And it just seems pointless to try to provide the flag in those cases. But I agree with Matthew that seeing the flag without the extent really being the last one shouldn't happen (unless someone is changing the file). Honza -- Jan Kara SUSE Labs, CR