Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp97114ybf; Wed, 26 Feb 2020 09:28:14 -0800 (PST) X-Google-Smtp-Source: APXvYqyb0FvrJwS2+naQlNB4Y7iWjUUZGI/ch/Slv59OrO7XW6TdjWFTz4AqvIi/H5bisKodr5gR X-Received: by 2002:aca:c0c5:: with SMTP id q188mr19429oif.169.1582738094404; Wed, 26 Feb 2020 09:28:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582738094; cv=none; d=google.com; s=arc-20160816; b=vD2QqR1DujNBPgXZONMWIIOhtLy4JwN3cnOvY+VRFRnQyUb42TE2R63TKCtnSKJVfa fv+2KGIaW+hlxwcD4sRpxGTZG6vUVY+aaaqDxtwJNElPBwrvEUDchSfcjmWay/DESSCy vIo6MjEeHfySfFuHHIiaHTWM9g/6s7zFiNJgY0izSqSRgHQJym0Pm9uorb6Lpt56hG8C YpTxk3BXEE3YqbTdUJoCwabmDu+Myb8BSxU4OnNF7+1/QxLH+q13P2a3Nm2k0r//PA3l Ckh5wIzTEKSpyj+WjUcYcd2mUHEA5j3fNFHzQ4st32Pb/d3SVM/1m9depYe242faQ1WH h08w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=5kbZw0VY3UrzBSmhH8lLEFEq0A/ukOeQs2R5new8HXo=; b=WK8dGRZ5C2nBawJoHqIxSAWo5GBvzKR6+RJccMYQfuvUIgr0xznlGQ/jJptMLROOKR +uhTIRCEKkoa+5ls1bjevgBGNn0feHDD2azH6Uo7YFJrjymfK41GvP+i8146ioiVy1aj uHLTWjrjK9zwIlFEnQrkLP6+VWcM6BBJZbAwJOF9TSK6AfV/R5maH0pu9nKeRx3hdxoQ 1oA8EBrJUNWXEVShnsT7Hbz28SOSQz0l6A3isIx2V1i7cIGxiUcCaLxAz43s7a+QhOi2 BVlrbSCTvQ6E9b+uqpeisK6Mz0ejCT5/gmzJqfiXII7mJlofgI65htMuz59iLzT/+IM4 xcWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6si98377otq.217.2020.02.26.09.28.01; Wed, 26 Feb 2020 09:28:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726752AbgBZR04 (ORCPT + 99 others); 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-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@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