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=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,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 5A9C7C5519A for ; Mon, 27 Apr 2020 10:39:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3C4E3206B6 for ; Mon, 27 Apr 2020 10:39:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="kxOmwFjW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727007AbgD0Ki5 (ORCPT ); Mon, 27 Apr 2020 06:38:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726504AbgD0Ki4 (ORCPT ); Mon, 27 Apr 2020 06:38:56 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 044C9C0610D5; Mon, 27 Apr 2020 03:38:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Sw+Gz0B1RPAiyQjtRtSaz9HX0MO96kOBToT1rHJ/CnQ=; b=kxOmwFjWfczqIhl2MpNpVzUU7u NOZr4eVIT5rOYv4QZ0kXVdGssHpI3JnKHaXyhbJ4l9YGB5vSg8A+Exd1p0dkEP+SkENA/s52XleY0 qYjArcX12b5+x5tknzbxIT4ZH8DLYbhi3JPhwqQ4ZlTc1gWtZ6O9qJwek/B0Ow2dudfviR3ImuGXT KlTjJcXe7I+xwmg1HjhYdpqj4vgml0606SeajgkhTDHKZiF5g8PbKK3fcVJ7RfsjUTPuTBJus8TGc gGsV91mCXhq+1RgtogkVcYqrrnOKgpm5RrG35LbQf+okwPEdmGnbVyL8hQ7mkpSE8u4BXoGwHnldH o4bCwjDA==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jT1A6-0008KE-9g; Mon, 27 Apr 2020 10:38:54 +0000 Date: Mon, 27 Apr 2020 03:38:54 -0700 From: Christoph Hellwig To: Amir Goldstein Cc: Christoph Hellwig , Ritesh Harjani , Ext4 , Jan Kara , Theodore Tso , Andreas Dilger , "Darrick J. Wong" , Alexander Viro , Dan Carpenter , "Aneesh Kumar K . V" , Murphy Zhou , Miklos Szeredi , linux-fsdevel , overlayfs Subject: Re: [PATCH 0/5] ext4/overlayfs: fiemap related fixes Message-ID: <20200427103854.GA30463@infradead.org> References: <20200424101153.GC456@infradead.org> <20200424232024.A39974C046@d06av22.portsmouth.uk.ibm.com> <20200425094350.GA11881@infradead.org> <20200427062810.GA12930@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Apr 27, 2020 at 01:15:22PM +0300, Amir Goldstein wrote: > On Mon, Apr 27, 2020 at 9:28 AM Christoph Hellwig wrote: > > > > On Sat, Apr 25, 2020 at 01:49:43PM +0300, Amir Goldstein wrote: > > > I would use as generic helper name generic_fiemap_checks() > > > akin to generic_write_checks() and generic_remap_file_range_prep() => > > > generic_remap_checks(). > > > > None of the other fiemap helpers use the redundant generic_ prefix. > > Fine. I still don't like the name _validate() so much because it implies > yes or no, not length truncating. > > What's more, if we decide that FIEMAP_FLAG_SYNC handling should > be done inside this generic helper, we would definitely need to rename it > again. So how about going for something a bit more abstract like > fiemap_prep() or whatever. Ok, I'll rename it to fiemap_prep. > > What is your take about FIEMAP_FLAG_SYNC handling btw? Oh, I hadn't really noticed that mess. Taking it into fiemap_prep might make most sense, so that it nominally is under fs control for e.g. locking purposes.