Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2298662rwb; Thu, 27 Jul 2023 05:24:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlH5AywrV0vQrXfObaijF8/0lLnJH1cB2HBWH6Px4tZRUWQ//qi20M6gTd20pYgmqyGEljpW X-Received: by 2002:a17:90a:e28d:b0:261:2824:6b8c with SMTP id d13-20020a17090ae28d00b0026128246b8cmr2975136pjz.13.1690460657446; Thu, 27 Jul 2023 05:24:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690460657; cv=none; d=google.com; s=arc-20160816; b=pveyqDb6JNHwbtwvzY2jrLTs8Qhftlmf6h4/Qr237AeWKyIFZTX0qCVnhwjJ4SVLD8 J1hAkRIWodl6bbZr3KjJ3pAGUyp5N43hQk1+yJ/OYnBpjrEjf+CYBwJu8+bls94VeLK+ 0XM4kj2oTtmqROxpEnYOmCsiw0+kwn0cSmoE4059bSEpb6ovmYqENmlqae5an1mIOIih w4aTMBm2hFT+nUyfBEPs1tSwUyxL7wmp45f3JbKKT/8GPR9xIbfK0NFoExgKshdmNipg vchxx8OpYBOUo2B+YPAF0C1IrkDEcCXuviV+mVmrrj6v4oTJXIStvA8T1JFDqA7Xu9kC Nr9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:mime-version:date :dkim-signature:message-id; bh=clY2DTVayhXqVADxhzKRwCzc3igKW/rfMyB/3mrQaIk=; fh=eOJbknS184ueP0Z32O/k3SkCaNq1DsLcmTlCKkt6P/I=; b=YSwN4hObW5LyaCnUfscS95wvcgtzy8l6TPgvN2i8US+V9qB4AwNyPJfVV0mkQDMPdd 4F3GYPI+bq4FixPpEbhtqJwyyE5zxy0uYBdsNQlPdWojhADCmiMS3SZBu+L9DhUCmvmP jkEurbZVTofUG78xFfc+SA1n6Zt4nOlzf3HNuiICUTghQOhWbKAy3mgZ/WJ7sjyhfVXB 98/9Mdlvg6LD8bmN3N9Oo4W1X4BbuOEfZOkKFBk0A1tnkVZu8BwT6i2bsyfzFNTzx/Hq QEMPKuUgDF1oEq8YmWIzpXz3MFgwtgOuKRxbb/KURes8OtTxDDHUX5LWOxY9pP8QjsCP i/Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Jh8EACm9; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hi16-20020a17090b30d000b002686dc89da0si1137573pjb.20.2023.07.27.05.24.00; Thu, 27 Jul 2023 05:24:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Jh8EACm9; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230154AbjG0MQj (ORCPT + 99 others); Thu, 27 Jul 2023 08:16:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233068AbjG0MQi (ORCPT ); Thu, 27 Jul 2023 08:16:38 -0400 X-Greylist: delayed 339 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 27 Jul 2023 05:16:37 PDT Received: from out-81.mta0.migadu.com (out-81.mta0.migadu.com [91.218.175.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 465F6271E for ; Thu, 27 Jul 2023 05:16:37 -0700 (PDT) Message-ID: <304a5afb-e962-5f60-76a3-f3d079403196@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1690459854; 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=clY2DTVayhXqVADxhzKRwCzc3igKW/rfMyB/3mrQaIk=; b=Jh8EACm9tjMTMGn8W0LOXDpWwUM8hAukxZOUc+ZujHljEIAJEXfK/Q27dU82+2AwfxMQ+u 6CCEzchZIoNM3kyVEgWSO/unDHTNx8F6N32NlSpFEEIYUGY32Y4sZX9tqgISt3KCdEmvxr EtTbHQ0h21kxAV4ugyGONOCqRnk3oWA= Date: Thu, 27 Jul 2023 20:10:47 +0800 MIME-Version: 1.0 Subject: Re: [PATCH 1/7] iomap: merge iomap_seek_hole() and iomap_seek_data() Content-Language: en-US To: Dave Chinner Cc: io-uring@vger.kernel.org, Jens Axboe , Dominique Martinet , Pavel Begunkov , Christian Brauner , Alexander Viro , Stefan Roesch , Clay Harris , "Darrick J . Wong" , linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, Wanpeng Li References: <20230726102603.155522-1-hao.xu@linux.dev> <20230726102603.155522-2-hao.xu@linux.dev> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Hao Xu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On 7/27/23 05:50, Dave Chinner wrote: > On Wed, Jul 26, 2023 at 06:25:57PM +0800, Hao Xu wrote: >> From: Hao Xu >> >> The two functions share almost same code, merge them together. >> No functional change in this patch. > > No, please don't. seek data and seek hole have subtly different > semantics and return values, and we've explicitly kept them separate > because it's much easier to maintain them as separate functions with > separate semantics than combine them into a single function with > lots of non-obvious conditional behaviour. > > The fact that the new iomap_seek() API requires a boolean "SEEK_DATA > or SEEK_HOLE" field to indicate that the caller wants makes it clear > that this isn't actually an improvement over explicit > iomap_seek_data() and iomap_seek_hole() API calls. > > -Dave. I'll revert it back in next version. Thanks.