Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2123438rwl; Thu, 13 Apr 2023 01:51:01 -0700 (PDT) X-Google-Smtp-Source: AKy350ajwRDDv2DvP4CN55myaJldDuL4mcaOHbUgBgWqWvOwchAmWKFB3LYpmxFu9P1Z08uFD4jw X-Received: by 2002:a17:906:7387:b0:932:4255:5902 with SMTP id f7-20020a170906738700b0093242555902mr1492324ejl.76.1681375860940; Thu, 13 Apr 2023 01:51:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681375860; cv=none; d=google.com; s=arc-20160816; b=ixe93D8jSMS5Bi5py4YVPzy1CvUVmGypdZVKdJ+jrGN1p3PzRdu/Jo193njtaVvizc Szzb0Ot+rCUS7TwGWeMg5h7TUyGTR5cgChQrU480lOh8OQJ/vXfNESFBGyKpFepE418N MsI2Tvie1yDznQVhGaqko3ar71KCG+x/SVYVF+05xwxdY/r4QZrayQd1ESvsL/OJK7EQ yYlX/AQj3fDHt1GM2PCUL7MttNsjG1KUHd5IeHsD52gPpuVfxcz7JO58JVXy7jqQ1HYt eRufgKM03hrkeDt6ZJxJrvyz5UPvROzq0qeDIph+BnBEDAk2e0h7kdvPmJZSAjb7/bJt 1ufQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KiBBvPcLWpcg6K6Pmd0AtAxNME4Yy5xrjkD7fmrXZyM=; b=isgWMcQtjyj3Z9asB8i5fZNA5VCokyxZXesX1MkpioE8aegBmoVV5zH4yjiSYnWW1i X3KvoY9SupYavvFw3/afxPmVAwQPDPbUZ03v9A5ca9uXZ1IefAdC6OJGiTfRn0HRlYlG ttnkDQ/IPNRzNpGesNmoeKhdMG5e4zcCM+t6nY0PMZKjFsQxYEK9w2KbZx45TlGXO7Ss yTg96XpHhx9/fMM9AsTDSI23FWOEezi554Aey/E3cW2s+eNT+NwU3IGGsLvFA+D5znbA 4Ulx0uZJJcEq5vlA7G91Stg3vkXGJ7wTGBjlXgaZ5wCb+LRF8ncB5/HkmwhMVESjMNPz aNzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=fDJakotF; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t24-20020a056402021800b005048457c9aasi1288404edv.264.2023.04.13.01.50.36; Thu, 13 Apr 2023 01:51:00 -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=@gmail.com header.s=20221208 header.b=fDJakotF; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230122AbjDMIlt (ORCPT + 99 others); Thu, 13 Apr 2023 04:41:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230060AbjDMIln (ORCPT ); Thu, 13 Apr 2023 04:41:43 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA31C9004; Thu, 13 Apr 2023 01:41:39 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-6375ec15c48so883383b3a.1; Thu, 13 Apr 2023 01:41:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681375299; x=1683967299; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KiBBvPcLWpcg6K6Pmd0AtAxNME4Yy5xrjkD7fmrXZyM=; b=fDJakotFHS1ZrJgf2CV0cmz61+0aDbITryi9ucO2cTTk5/DlIZzgQI9LGeBwa/eDtu AnRX+tsdV9LmdB9USFN3WhQ/xtcl1N/e7+eLEW1tR05rC1iuEyFp5FNBm5QcqOm8W3v0 r40XPsmupAPuoxuCo5a8cvLVKC1fa3OQFHB9GlEWXKaEXxPxl10qwI6BtCRzXwHUZjTj JPDu9nzBpS08IqYQYoDNEEG3X1kHz6LHTRQZiwzZtPNxh+Q+82Y/5FlSrv09G3/DFjr+ X2xdoWHbkskiaLhLyxJfM6+3oB2CP8oxNChmhh3S7oFfDhrs1OiwDabKXEtG/KC7tnJQ wCPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681375299; x=1683967299; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KiBBvPcLWpcg6K6Pmd0AtAxNME4Yy5xrjkD7fmrXZyM=; b=TW1oFppf1WHsz/ozBKe2+j1B4M7leI8ebI/FXyc5aOsK/NL5A3Y91M3VxpAO0Nsf5b B7ZDxmG/Lz3EffOIK2hO7TrDKQQSI+n9bxH+LdoevYidhd82crTZUNS/P8r+zDPiI6EU ydMqp+GELkO4+w/dCOtSXwP/cmQtBiR57txnaFdFzYasz60fYEtrkNg8FsNnpIg6cdaQ t4yOEBgehAkWS++GqFsWhv9VoSnCv9rMdYhOefiFc1xbAagI1q86Plr+sgRczS95qp5U CrrXlKB0IHAKkzQTINjGrGzvyDQb/d0B/KaevFj8FKuM5aeSnsvypFxPn0NBX6fGhXm4 K1sg== X-Gm-Message-State: AAQBX9f73nAZnv4dzgE5iailZAkJh5Q1SPY12+S1TJkw1acbdABGr19F 9ht+Nv4DMGM9mKKpZY33lDt9WgWItas= X-Received: by 2002:a05:6a00:a86:b0:63a:ece0:48d0 with SMTP id b6-20020a056a000a8600b0063aece048d0mr2278352pfl.28.1681375298926; Thu, 13 Apr 2023 01:41:38 -0700 (PDT) Received: from rh-tp.. ([2406:7400:63:7035:9095:349e:5f0b:ded0]) by smtp.gmail.com with ESMTPSA id g8-20020aa78188000000b0063b23c92d02sm817243pfi.212.2023.04.13.01.41.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Apr 2023 01:41:38 -0700 (PDT) From: "Ritesh Harjani (IBM)" To: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org Cc: Jan Kara , Christoph Hellwig , "Darrick J . Wong" , Ojaswin Mujoo , Disha Goel , "Ritesh Harjani (IBM)" , Christoph Hellwig Subject: [RFCv3 08/10] iomap: Remove IOMAP_DIO_NOSYNC unused dio flag Date: Thu, 13 Apr 2023 14:10:30 +0530 Message-Id: <48a867b27a62045987f55b576b7688d16a896d52.1681365596.git.ritesh.list@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 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) --- 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