Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6539008ybl; Wed, 15 Jan 2020 06:20:59 -0800 (PST) X-Google-Smtp-Source: APXvYqwxAfkAmKXXepIDBi3TjmgiZXc18QpkSZXEJXTpoleuoE/hb2m/gLwogVDYD+KAm8ozM4ap X-Received: by 2002:aca:f305:: with SMTP id r5mr21908551oih.174.1579098059670; Wed, 15 Jan 2020 06:20:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579098059; cv=none; d=google.com; s=arc-20160816; b=F5JxIY3SW6D7AQ9We69ryHsd9X8r676VhQrzk/292WnuSqDpeF1B7MxbyW1aGQx1jM GRA/tigTT9r3Xs16dnCOO/DLWD8O2vWPgvXw3dRD7LZU+BwomMYju5FrAe5lyXlUIkY4 j2P88mWKeuXZbllgncveEobiDE3MFPKL8dC1OgSHSFc7HdsjkMY8f2u82VmoIGKazf+F Tjj0I3+co4/Q0Q/IcegKRrunSsl8LgcepWc83Rmj3bR2V2aF8EhD9j5o4q2RWCEH5Prt l/g530TgxHZHFkR/fWWhP7WnNKZjK8pgfA+5wyVqE+gijKkHKRmta4P2Swye3KOgUf6/ +cvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-transfer-encoding :content-id:mime-version:subject:cc:to:references:in-reply-to:from :organization:dkim-signature; bh=HtSguD4DonoXKrAZPQ1DK5ewTREMerhNuGoZ0KSdPnQ=; b=FmA1H29rhuL9X6t8ESMY5+K606QTINlLVAfu61j7ld49rXo0rhowUk3j3ggYzCtT7f BWUiLGljR2X6aI3xI+Drni1mr+Az4vFtYfYZWpqOasY919XA43At7u70Lu7SV9c5eVqZ ngCudd1jG3dSXahfx6rS2CMpb/2gwIMbiF97icYphE7oKCn/Y/AcfWHMUzsWPdnolSO5 /6S8ataGhC4VXh5k7gQr3ua2PbQZUq8jTAaoqUvK3QOUEJvGjr7MQp7gYgwDoXDf48yJ sisI180+FTQ+6Qcn4F6nXTabxzbB0tlBBl6e5ZvNV6Uv+6V/OWHdsDUadLKDzVSRTX7F 2sng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VFbqD0Pr; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h64si9958773oif.215.2020.01.15.06.20.48; Wed, 15 Jan 2020 06:20:59 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VFbqD0Pr; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728984AbgAOOU3 (ORCPT + 99 others); Wed, 15 Jan 2020 09:20:29 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:55712 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728939AbgAOOU3 (ORCPT ); Wed, 15 Jan 2020 09:20:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579098028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HtSguD4DonoXKrAZPQ1DK5ewTREMerhNuGoZ0KSdPnQ=; b=VFbqD0PrToG09vUgR/3iqeQcBTMeI8eu6/AhiSGvVSZcLRN/93a1EddrNhFFJmVzgsRn+w P+ItHXWknOBej6kH1sQzL6gkjUUeqtLzeP3wbazGY3pz9TRhsDt+JSk8Dq/1TRPNbKA//P JZBU5Wbr+H/MKl4aq91iLTprlyO9h1M= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-50-Bu9W6yxqPZODu82iaD6qdw-1; Wed, 15 Jan 2020 09:20:24 -0500 X-MC-Unique: Bu9W6yxqPZODu82iaD6qdw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C2BB5107ACFA; Wed, 15 Jan 2020 14:20:22 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-52.rdu2.redhat.com [10.10.120.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1B4B060E1C; Wed, 15 Jan 2020 14:20:19 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <27181AE2-C63F-4932-A022-8B0563C72539@dilger.ca> References: <27181AE2-C63F-4932-A022-8B0563C72539@dilger.ca> <4467.1579020509@warthog.procyon.org.uk> <00fc7691-77d5-5947-5493-5c97f262da81@gmx.com> To: Andreas Dilger Cc: dhowells@redhat.com, Qu Wenruo , linux-fsdevel , Al Viro , Christoph Hellwig , "Theodore Y. Ts'o" , "Darrick J. Wong" , Chris Mason , Josef Bacik , David Sterba , linux-ext4 , linux-xfs , linux-btrfs , Linux Kernel Mailing List Subject: Re: Problems with determining data presence by examining extents? MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24869.1579098019.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Wed, 15 Jan 2020 14:20:19 +0000 Message-ID: <24870.1579098019@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Andreas Dilger wrote: > > Would you like to explain why you want to know such fs internal info? > = > I believe David wants it to store sparse files as an cache and use FIEMA= P to > determine if the blocks are cached locally, or if they need to be fetche= d from > the server. If the filesystem doesn't store the written blocks accurate= ly, > there is no way for the local cache to know whether it is holding valid = data > or not. More or less. I have no particular attachment to bmap or FIEMAP as the interface to use. I'm just interested in finding out quickly if the data = I want is present. If call_read_iter() will return a short read on hitting a hole, I can mana= ge if I can find out if just the first byte is present. Finding out if the block is present allows me to avoid shaping read reques= ts from VM readahead into 256k blocks - which may require the allocation of e= xtra pages for bufferage. David