Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4278867ybg; Mon, 21 Oct 2019 06:37:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZmiROKVFNk8iMXzzGaKTuWwWK1Ac0rqDaMK21kbxcBOiOLwNMQKmMHBBognM8yXngkYB2 X-Received: by 2002:a50:d70c:: with SMTP id t12mr25021241edi.252.1571665069790; Mon, 21 Oct 2019 06:37:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571665069; cv=none; d=google.com; s=arc-20160816; b=VANbzuLOg2kPUqt/bc248rod93z7EUYt+ZJ2fH7iPIsju49/3GCb8oCd+lxLiqez8e haLjjikeMzx4bx0SINwmQVkaE9q/MY013NQfr0MVjNQlXX1oRLdmfMdzlDdd/O0mNjcV OPPM+8T8m5/+FHG8wBmhii98IHRp372uwG8BabeZcRtpwtU3znQmqfHPJVExfwry9HLR xEd0mS7xyWbGFABAitspu76+KGy6eS71eVrIwN1fLPlW+EwC3VkTGstoL4iMgFUlgfQM pNkRfsdWtmsUv6UDn9XUd6GBy8UOg4P3pkJ6Qib3DP6lckPk20oebsTExIwvwO+Cx9LD ZUVg== 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=ahtCFsv3AWBeic/u+343Q55prJjKRRczVR7HnkS3RJk=; b=zTK/pAOxQIsBH7pPxhA/ZquN5xrFygz5mqOvTPpwAfDTGzGE2wbCHT0hZzU46nwVOv GUFlM/uFTTOJJtUIECyUdixshYtSxrpt/iHZ5Oxbzp+fbVJlq0kRp845SXllZdZriEIr k6+pdOlfu37mO2fSrGPJyRJKIS40KoIUUUNO21tkhwOTwLXpA8x0aXv532EaL1fXPmFv ESwTqHJpsWQmB1nDLIT7BmFhV5AeIK9LuQaOKytfnHvRa48Bhtk3htOE0Q/tnGBEYSrX xToAvdQiu2JVD6zrHuCUbhXowsGCwAkmKleDL7PgV5LK4yiAnQD471VMIsXSIK23sliz WYww== 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 g21si8597266ejk.23.2019.10.21.06.37.24; Mon, 21 Oct 2019 06:37:49 -0700 (PDT) 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 S1728699AbfJUNhS (ORCPT + 99 others); Mon, 21 Oct 2019 09:37:18 -0400 Received: from mx2.suse.de ([195.135.220.15]:53954 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728670AbfJUNhS (ORCPT ); Mon, 21 Oct 2019 09:37:18 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7D0DCAEAF; Mon, 21 Oct 2019 13:37:16 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 097D31E4AA0; Mon, 21 Oct 2019 15:37:15 +0200 (CEST) Date: Mon, 21 Oct 2019 15:37:15 +0200 From: Jan Kara To: Matthew Bobrowski Cc: tytso@mit.edu, jack@suse.cz, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, hch@infradead.org, david@fromorbit.com, darrick.wong@oracle.com Subject: Re: [PATCH v5 04/12] ext4: introduce new callback for IOMAP_REPORT Message-ID: <20191021133715.GD25184@quack2.suse.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Mon 21-10-19 20:18:09, Matthew Bobrowski wrote: > As part of the ext4_iomap_begin() cleanups that precede this patch, > here we also split up the IOMAP_REPORT branch into a completely > separate ->iomap_begin() callback named > ext4_iomap_begin_report(). Again, the raionale for this change is to > reduce the overall clutter that's starting to become apparent as we > start to port more functionality over to the iomap infrastructure. > > Signed-off-by: Matthew Bobrowski The patch looks good to me. You can add: Reviewed-by: Jan Kara One nit below. > + ext4_es_find_extent_range(inode, &ext4_es_is_delayed, > + map->m_lblk, end, &es); > + > + if (!es.es_len || es.es_lblk > end) > + return false; > + > + if (es.es_lblk > map->m_lblk) { > + map->m_len = es.es_lblk - map->m_lblk; > + return false; > + } > + > + if (es.es_lblk <= map->m_lblk) This condition must be always true AFAICT. > + offset = map->m_lblk - es.es_lblk; > + > + map->m_lblk = es.es_lblk + offset; > + map->m_len = es.es_len - offset; > + > + return true; > +} Honza -- Jan Kara SUSE Labs, CR