Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2527665rwl; Thu, 13 Apr 2023 07:37:02 -0700 (PDT) X-Google-Smtp-Source: AKy350YBp6q6q7T4ZVh+ztXG3L7eJ1VCbI8cZJCEwy6dp+bCSTtMpPKbcTNv6Y3qp6vH3YEcgS1C X-Received: by 2002:aa7:d712:0:b0:504:8c4a:d1e with SMTP id t18-20020aa7d712000000b005048c4a0d1emr3038543edq.8.1681396622372; Thu, 13 Apr 2023 07:37:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681396622; cv=none; d=google.com; s=arc-20160816; b=EKTnIPm0oxSq0dOkyI0JWy4Mj6PW7K+AE1q6g/nJyDNMDHSUkZB07DxMicjLVfmoio DiNSFdxS0o98jVG27cUUTzbrFdtxUd/aJRcjMr9TifbiCf/TPz0dQyrMiVCceorcenut rVFJ5bNSlHVrmO9IFHJIhBjEsGdvCFTgbeTYVxybMTCceaIuJOFaq0/bSxX2TfdC/RkH KRZ5lWs3VmyafMTZDIMkw5zAyxq1ahdSXswmOxrymiKcUlMrTZumV/1+BEvM8SlqnUfq nMoyZ0q8azd2BqGHvnHlpBbCXwwVjTA1DqRprKrfJEiENJwBVrE7BOZUyv4q9qZ1TZL2 KSjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=V1ySEtB0S5Zmt1B4tGK5stBlL1HrVD3tWP03ySH3ifY=; b=PorFC12/VETxFjIwRc39NPvHs4xd9bZAgPPpXDjADcLCGRvzMP+q5OSSYRSqw6QhSI tuxcb2oiwvI0QuUMAjDF3CRz1x3QxBgSKtxZFgxvpi6M7w9ts350L9Egue9gi4LFEOHt rF8F07goXnZFaiwNO0VKvR6JCt35NoywZBtxj747uRgJDhfMgo250R3diAQSlBIvLj0N 0xYqq9m3IXwZ1rpcsECcrypz83LNm3J6lvvA24MsnmEED1GGOVET62rhN+rgZy0Y1VLH 4/9tF0Wnw9anWtbd9B+Ny7uu5xNv1wGrePYYu0lXgJX2Lx2NawjJ0/NwZGJP0D1GQETO 9hvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FI72byrQ; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v23-20020aa7dbd7000000b00502a9229b00si1932759edt.457.2023.04.13.07.36.25; Thu, 13 Apr 2023 07:37:02 -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=@kernel.org header.s=k20201202 header.b=FI72byrQ; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229647AbjDMOfM (ORCPT + 99 others); Thu, 13 Apr 2023 10:35:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229633AbjDMOfB (ORCPT ); Thu, 13 Apr 2023 10:35:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E11FB7D9C; Thu, 13 Apr 2023 07:34:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 69AAD636F2; Thu, 13 Apr 2023 14:34:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0485C433D2; Thu, 13 Apr 2023 14:34:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681396491; bh=Izgd1lPSNsSfYsO8CvPujUw68wzoAf+eYqztB6GEfnM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FI72byrQyViDnEtGxWSM4Eb3yGuvD955CQ9d7Lncd0u9oRfajt+efILeZya7FMPPB a8aAcMo9OdRCuH7eZZp02bTCdro1vmQakzRK2vDjwdExAWR5YzfpvAIKhJZ54zFbbM RwX8pEN8HcoHKMCElSaeGnzvoyI7ecyR4Pfy+NIUBq/gzMN7h4kEj5ELVYKkQ75/GM 6BXTGgZgg1bTzp8sBC5atNyhlAS+WCYpPkSh7eK9G0jODffNKaNdsdovDcmGxyPuXU SYmCmSnjjrXfPhPA1MDyMQo5Mx1loilXoStXe8rFIom69uZ8pOhIHHvpswxjvrGpiU +DtE3+744CJqA== Date: Thu, 13 Apr 2023 07:34:51 -0700 From: "Darrick J. Wong" To: "Ritesh Harjani (IBM)" Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, Jan Kara , Christoph Hellwig , Ojaswin Mujoo , Disha Goel , Christoph Hellwig Subject: Re: [RFCv3 08/10] iomap: Remove IOMAP_DIO_NOSYNC unused dio flag Message-ID: <20230413143451.GB360877@frogsfrogsfrogs> References: <48a867b27a62045987f55b576b7688d16a896d52.1681365596.git.ritesh.list@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48a867b27a62045987f55b576b7688d16a896d52.1681365596.git.ritesh.list@gmail.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Thu, Apr 13, 2023 at 02:10:30PM +0530, Ritesh Harjani (IBM) wrote: > IOMAP_DIO_NOSYNC earlier was added for use in btrfs. But it seems for > aio dsync writes this is not useful anyway. For aio dsync case, we > we queue the request and return -EIOCBQUEUED. Now, since IOMAP_DIO_NOSYNC > doesn't let iomap_dio_complete() to call generic_write_sync(), > hence we may lose the sync write. > > Hence kill this flag as it is not in use by any FS now. > > Tested-by: Disha Goel > Reviewed-by: Christoph Hellwig > Signed-off-by: Ritesh Harjani (IBM) Reviewed-by: Darrick J. Wong --D > --- > fs/iomap/direct-io.c | 2 +- > include/linux/iomap.h | 6 ------ > 2 files changed, 1 insertion(+), 7 deletions(-) > > diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c > index f771001574d0..36ab1152dbea 100644 > --- a/fs/iomap/direct-io.c > +++ b/fs/iomap/direct-io.c > @@ -541,7 +541,7 @@ __iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter, > } > > /* for data sync or sync, we need sync completion processing */ > - if (iocb_is_dsync(iocb) && !(dio_flags & IOMAP_DIO_NOSYNC)) { > + if (iocb_is_dsync(iocb)) { > dio->flags |= IOMAP_DIO_NEED_SYNC; > > /* > diff --git a/include/linux/iomap.h b/include/linux/iomap.h > index 0f8123504e5e..e2b836c2e119 100644 > --- a/include/linux/iomap.h > +++ b/include/linux/iomap.h > @@ -377,12 +377,6 @@ struct iomap_dio_ops { > */ > #define IOMAP_DIO_PARTIAL (1 << 2) > > -/* > - * The caller will sync the write if needed; do not sync it within > - * iomap_dio_rw. Overrides IOMAP_DIO_FORCE_WAIT. > - */ > -#define IOMAP_DIO_NOSYNC (1 << 3) > - > ssize_t iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter, > const struct iomap_ops *ops, const struct iomap_dio_ops *dops, > unsigned int dio_flags, void *private, size_t done_before); > -- > 2.39.2 >