Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5031999rwl; Mon, 10 Apr 2023 22:35:47 -0700 (PDT) X-Google-Smtp-Source: AKy350bciqEjry/RjxgD5CRblmEfa3YgHVPSDrwpovnrUx7Uar+sKgEIgTpZKJEiCrP7VuVq/R79 X-Received: by 2002:a17:906:37cd:b0:94e:13e9:3926 with SMTP id o13-20020a17090637cd00b0094e13e93926mr1101334ejc.19.1681191347289; Mon, 10 Apr 2023 22:35:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681191347; cv=none; d=google.com; s=arc-20160816; b=shGX03O+02KKD9t6kZfkinCMpMHzfiz4OhUOEbUD24Bsl82kP/6PvVzKJ0Wx/PeL1b qufWmLc7msbWRhPkk9Mn95Z0geGB6qFmvopb4KU2i/vN6am7E/tWD8X0a+aaWP5/PlcU YEAg1tb5YzxK4YBa+fBa5PJe5tf+6lMUJIHBeaymIrxMBxI9nahrLTmM79W7H1+5vUBf yg9C/tST+Cay99/Vh3BBLCLmw8DsUe0TltPpRXfewyy+yKwYl35r+ETXljdIByRp/prK zbVCJZvo7h//DXTJNUZR6d+iFhlCG9j0BoMa8VpKMSYEzWDeu6Od7D7oik4Bwyvs6pB2 IOiw== 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=tWtmYvDUHt8kYg5jqqc4Ct59dpDebanm65gdKYnekzw=; b=izaJqjtzBpcdo/PjdRugGGeP3OK5VRd/PraQ+iwaNaeleA8Vx4bpda5jnpxU5kMQAR LoiGMc0a7ovguaPC+DPfODGTctpcG1LMIFro1n/3PBy+8/ubTEeQ4AvM3/7MW81sysk+ 9Vr8C2ZprFuBkdfq0aunkyScvUDJr0X1WaI4ynz3TsG5/kpgJRdMl7z2M27co0bvZRa6 BeDf8vW3c5NVq38otlKSGz9GtnWPqPQK/r7Y1alSMEXWstTqHhEu70mbBIfgSr4drXPj M0UaHeDLt4F/gGbrf6ixYWQafeepZTq8kgPrHiXPDz1q8YgX5dcnwy5wlWKvJ7nPA8E6 uwNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mq4EBG43; 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 lv13-20020a170906bc8d00b0094a9abf0c47si2956073ejb.562.2023.04.10.22.35.23; Mon, 10 Apr 2023 22:35:47 -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=20210112 header.b=mq4EBG43; 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 S229974AbjDKFWn (ORCPT + 99 others); Tue, 11 Apr 2023 01:22:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229998AbjDKFW2 (ORCPT ); Tue, 11 Apr 2023 01:22:28 -0400 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EEAE26A3; Mon, 10 Apr 2023 22:22:27 -0700 (PDT) Received: by mail-pl1-x62f.google.com with SMTP id ke16so6713600plb.6; Mon, 10 Apr 2023 22:22:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1681190546; x=1683782546; 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=tWtmYvDUHt8kYg5jqqc4Ct59dpDebanm65gdKYnekzw=; b=mq4EBG43+CLN9nHjNO7faU/506EBO6W9CSZATwWvbY9nnYrq2eb4re5Rm+aMJ+9UsE Z2ZjORVIUkf7zIKQ60M6ZXl9Moyhaxbk8rLGs/VQyCd5796uwjRxxoahPmBfq8x5EMfe ucxz07cxJN7YJ66yOXLI58c9h5EkKzWPILRiZ2i3Kpf1CRxPUwWD/9SIWM5wZf2DiiDJ apofFTOyQaQr424id2oeMezGgRw0wG+AAOWVkfxILGmjYRcUSd/YmLVYzckC49Y6alF1 NcQxwx3MZ5e3TVdA7eEnZDfMwtLyu3EJG5BlAErYEWmAH1JLtwg11GXYupDobxkPa7Of z7ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681190546; x=1683782546; 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=tWtmYvDUHt8kYg5jqqc4Ct59dpDebanm65gdKYnekzw=; b=HdCJ9RQn6PcOKCX678BSg37EHTlSXJsPqklR+18rV0i6BDa8HiF8Sv28JovjGyT2WQ sjGkNrIl9YAb3YqH3oIldrboz9vU3wL0TM7JY/+aur86k43UARmip2WPCI+PGArJdRM2 cRSea/G69fmIRWUazlLsKEi3bTyqux8siF6LBNwyfTQotRNMcwCxSBSqAoocG29TkbP+ U7Ls+D24wSi1n9gS5kTcGvy8Mf0vAUGJpI6N4ZwxjQ92iE6qHfZdwmn2+iOQmQiwvw06 rn6j8oh/34YUmwwXp7KBOH6kH6C7cFkRDVSM6a5r80ngWWx66tUCIbwRBQjAAP7H5zIR haIQ== X-Gm-Message-State: AAQBX9cI5ERRgT9UZo3n8BX/Jrj3TS79YP06AosQcRGJW9KeB9FqT9CM 0Yit6bjQELODj+OsiL4cpab2cear51U= X-Received: by 2002:a17:90a:aa82:b0:246:9ef5:3c45 with SMTP id l2-20020a17090aaa8200b002469ef53c45mr2201648pjq.13.1681190546594; Mon, 10 Apr 2023 22:22:26 -0700 (PDT) Received: from rh-tp.ibmuc.com ([2406:7400:63:7035:9095:349e:5f0b:ded0]) by smtp.gmail.com with ESMTPSA id v19-20020a17090abb9300b00246d7cd7327sm646154pjr.51.2023.04.10.22.22.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Apr 2023 22:22:26 -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 , "Ritesh Harjani (IBM)" Subject: [RFCv2 6/8] iomap: Remove IOMAP_DIO_NOSYNC unused dio flag Date: Tue, 11 Apr 2023 10:51:54 +0530 Message-Id: <86d8ef97a805c61761846ee7371c95131ec679be.1681188927.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=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 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. 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