From patchwork Tue Jan 24 02:38:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Van Hensbergen X-Patchwork-Id: 47493 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1930878wrn; Mon, 23 Jan 2023 18:40:51 -0800 (PST) X-Google-Smtp-Source: AMrXdXsQlUhkitODeMMYdZ3B6PEZihO79bjlhqb/rhwlt24L9QV1j9V5YJkNrhtUmAWNmRSQ8yxH X-Received: by 2002:a05:6402:44:b0:497:233d:3ef6 with SMTP id f4-20020a056402004400b00497233d3ef6mr26890808edu.17.1674528051110; Mon, 23 Jan 2023 18:40:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674528051; cv=none; d=google.com; s=arc-20160816; b=RcsIEFWwrEdAnpyX59AFEO41F1P7DUzge7nzG95zr+lOypy7F9j2zWoUNv7QZ4Jrj6 E7wGz5phYwpGLac0WK08XYnaWPsHS0wQ+OnqrmNnINF7JiURxJ2ApcXhhAD2zKle3FOH v+0eY/Ug7rcSB6lExDwGggObYFx7AF82c1vXxPesrAwuIQaEPtPVhjvnX3BLCOF1eDTJ Z70jeh0SN8Hvj5q6tlnpRAZRbq7P+idPuF1FO6uC3rO1gwYE2GimV5fIrgW/3fo5/5uj o+MRrv72YOMxrbSa5Az5Qrgr/g8ST4vGoLvfEA/kqGFU+G9CHp6/5JRDkeQTQC+0aLvL QXuQ== 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=gRV/L1eN8c4leoO294fZ9F5eOKzUWH55ikdGdVVmuQs=; b=XGeR1beOtbb7CPPlfbt1lT60ecDxuDVs7UYw5Kwn7DVrxBlaqhV5N/61VEgnr+ffnT bG8bobn6xeXsIlbkyDDlo2ImVLvbTwONAG3kM+Imgh853nLNGal4NBAzL43AveuRTsDc VSkDo/hvXaF/H1TmqjLAMnO7IgjCAFH9dRFenqlnT+RHGNiFIDvW77mouhrmKIN9XacA xrYWd9zzwBSNZXJiSpcORX8VLGnVzbiohwpzIydQzJMRdwZi9A368Rc77Vb5iZ4mGidt 53BFVbyOMCQGOjHM5Y58QLnk+PAUGuBAkwVXyuGDdNXETvmqqdwNPNHQ6tvMI42o00eP 8BDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gkJ9v5kW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t27-20020a056402241b00b00499b2eb6a0csi1451211eda.348.2023.01.23.18.40.28; Mon, 23 Jan 2023 18:40:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=gkJ9v5kW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S232375AbjAXCjX (ORCPT + 99 others); Mon, 23 Jan 2023 21:39:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229891AbjAXCjN (ORCPT ); Mon, 23 Jan 2023 21:39:13 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE341305C0; Mon, 23 Jan 2023 18:39:12 -0800 (PST) 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 6832561177; Tue, 24 Jan 2023 02:39:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 078C8C433A0; Tue, 24 Jan 2023 02:39:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674527951; bh=r7VYuVAQDU98smxxlBwk5mo68iLowdZ4mILXuE17YKU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gkJ9v5kWcBQBfa/RHAY1Rw2Z0lqvwf1OKfWPlU5tPMvcYSXK0d7OVByjst0yLnQVC XcfmaGqackGZpX2HwhdmxyU5uANvWXetBOqZ/DBvPuDULogWdyvuHdEqPBQbtPzCNl wbUuJoJTOEpua93DHHh+keVwC2cUZmlWj7Z7pteWjmvQLEQQW5H+PWB3L9ivotdHxc fWv6Rt/A2XJeaxJ/98txAdfm7Vcz8FGr6rkZViw5h1GyRRTRlgbson2mYMuRE/VJvz Bi5dl/0+RKm2HJ+kjX9qNQrwIfOlQmmylajH6XudaCAZsJKcz5BhiWpPkXToNBDakb EeARun7tP+HKw== From: Eric Van Hensbergen To: v9fs-developer@lists.sourceforge.net, asmadeus@codewreck.org, rminnich@gmail.com, lucho@ionkov.net Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux_oss@crudebyte.com, Eric Van Hensbergen Subject: [PATCH v3 04/11] Remove unnecessary superblock flags Date: Tue, 24 Jan 2023 02:38:27 +0000 Message-Id: <20230124023834.106339-5-ericvh@kernel.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230124023834.106339-1-ericvh@kernel.org> References: <20221218232217.1713283-1-evanhensbergen@icloud.com> <20230124023834.106339-1-ericvh@kernel.org> MIME-Version: 1.0 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752596107610556100?= X-GMAIL-MSGID: =?utf-8?q?1755869925340363177?= These flags just add unnecessary extra operations. When 9p is run without cache, it inherently implements these options so we don't need them in the superblock (which ends up sending extraneous fsyncs, etc.). User can still request these options on mount, but we don't need to set them as default. Signed-off-by: Eric Van Hensbergen --- fs/9p/vfs_super.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c index 266c4693e20c..65d96fa94ba2 100644 --- a/fs/9p/vfs_super.c +++ b/fs/9p/vfs_super.c @@ -84,9 +84,7 @@ v9fs_fill_super(struct super_block *sb, struct v9fs_session_info *v9ses, sb->s_bdi->io_pages = v9ses->maxdata >> PAGE_SHIFT; } - sb->s_flags |= SB_ACTIVE | SB_DIRSYNC; - if (!v9ses->cache) - sb->s_flags |= SB_SYNCHRONOUS; + sb->s_flags |= SB_ACTIVE; #ifdef CONFIG_9P_FS_POSIX_ACL if ((v9ses->flags & V9FS_ACL_MASK) == V9FS_POSIX_ACL)