Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp1816933rwj; Sun, 18 Dec 2022 16:25:23 -0800 (PST) X-Google-Smtp-Source: AA0mqf5uHWqWx26ARVRGSCtJoEJO5M+SLEBGyG1Qbs2fu2vfOsywXNJnFinJzbBuR2FKzXbziGLT X-Received: by 2002:a17:90a:f598:b0:218:f15f:4b41 with SMTP id ct24-20020a17090af59800b00218f15f4b41mr41597537pjb.27.1671409523389; Sun, 18 Dec 2022 16:25:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671409523; cv=none; d=google.com; s=arc-20160816; b=PXWk9Ze+cC4LZmWoeAS4BPGw4FAAIAYZINQE8nj2vTWrcNaluM38J4NXlZg51nWAD/ Omw8TVBQHwcKf9s3lprE5ifuMNqiFyxMTWcuVU4UXUCR4lAVKavSBlGlzIzl9wdzmLx3 /GPcl4MI70LAbfxqNqN/huTkuV+Z5msT00QdjCG6w4LXs2yYH50G+baCjMRPSJ8oax7/ YBgNhpT0ERhxa6t6GIe/YkvVU49kn/80G6frGj4BSHo3zZza2ASwYv4YQl7oUjIPnONe uTcyQFJXcaqSQ78CF2GiEWlroBJTUB27vmuB1siW7vM+P9Y+DZx9EVR4AthX3anvcGeX O25Q== 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=v+jzIl87dUoe95Agy9D7U8yZIxMn7NM1PIcIYD/J044=; b=GSwA5PSzRXPy2Ksq14eu3Ag8ghI9vBwYWGEFM4NUfhpiRLoLtJSD2NzO+AfWwnwrZg IetpiDMNOZothm470NXImTodxhLeiZsE0rJht9ZtinsLG885BWX80jaqg9tj0XXM6HwP c7C9QCoRVKIFr4snYaYXQxojLvDkDhzLSDZYWQLm/EvaTynU9bDNFuYpgrEIwSe9HIYd JxObX0KnuLWW9NbwaFQt94/9odFgpHKODY2aC/ZZG3D70JiL93bFaRodSpvW/H6F+3Rn O3oC0qaFpVGUbznWNFurJ/+DIB1dpjj+X7HbpC+7WghPV0tRZWB6OJ1FhrJj5F+gcP4P b/wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@icloud.com header.s=1a1hai header.b=0SDetpPh; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=icloud.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pi12-20020a17090b1e4c00b002216b23e148si16495835pjb.155.2022.12.18.16.25.14; Sun, 18 Dec 2022 16:25:23 -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=@icloud.com header.s=1a1hai header.b=0SDetpPh; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=icloud.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231312AbiLRXZO (ORCPT + 70 others); Sun, 18 Dec 2022 18:25:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231301AbiLRXYb (ORCPT ); Sun, 18 Dec 2022 18:24:31 -0500 Received: from ms11p00im-qufo17281301.me.com (ms11p00im-qufo17281301.me.com [17.58.38.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E24C3BF41 for ; Sun, 18 Dec 2022 15:24:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1671405867; bh=v+jzIl87dUoe95Agy9D7U8yZIxMn7NM1PIcIYD/J044=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=0SDetpPh6gsvgVh5fPfHcFgdx8+4mpb2OVQq71isvMmbgVGi3B6/4ZeNiGqHySz6W SJc1QKqpKEg4XktEWctZaK7Nnqp+bUzorWVL65KHUm+M08EoU7eI14VYie/43MkOru V32SlIg2lBv7R16fUiOVECLOxQYwwe3TSkD39996F60Dltw600bBLmFaNen9jrZxor j3Nt3W5330JV3rZouStavQrXABi5Fp/f5m24N5WcW/tnu1Jt8kYXF+JUzjX7hiWKOT cSMD+Glf4Eys1GC+ompx0clnWGZE3R+S8vztJ/B5YxsbXaQs35YgK82EdQEE124TnX s0+mQqoTJ3VEQ== Received: from thundercleese.localdomain (ms11p00im-dlb-asmtpmailmevip.me.com [17.57.154.19]) by ms11p00im-qufo17281301.me.com (Postfix) with ESMTPSA id 79DE4CC038B; Sun, 18 Dec 2022 23:24:26 +0000 (UTC) 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 v2 08/10] Add new mount modes Date: Sun, 18 Dec 2022 23:22:23 +0000 Message-Id: <20221218232217.1713283-9-evanhensbergen@icloud.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221218232217.1713283-1-evanhensbergen@icloud.com> References: <20221217183142.1425132-1-evanhensbergen@icloud.com> <20221218232217.1713283-1-evanhensbergen@icloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: a50t9E4pmabKJ_W7baQHBp4N-A3esUcN X-Proofpoint-GUID: a50t9E4pmabKJ_W7baQHBp4N-A3esUcN X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.425,18.0.572,17.11.62.513.0000000_definitions?= =?UTF-8?Q?=3D2022-01-14=5F01:2022-01-14=5F01,2020-02-14=5F11,2021-12-02?= =?UTF-8?Q?=5F01_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 clxscore=1015 mlxscore=0 spamscore=0 adultscore=0 bulkscore=0 malwarescore=0 mlxlogscore=999 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2212180222 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,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-kernel@vger.kernel.org Add some additional mount modes for cache management including specifying directio as a mount option and an option for ignore qid.version for determining whether or not a file is cacheable. Signed-off-by: Eric Van Hensbergen --- fs/9p/v9fs.c | 16 ++++++++++++++-- fs/9p/v9fs.h | 5 ++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c index f8e952c013f9..43d3806150a9 100644 --- a/fs/9p/v9fs.c +++ b/fs/9p/v9fs.c @@ -38,7 +38,7 @@ enum { /* String options */ Opt_uname, Opt_remotename, Opt_cache, Opt_cachetag, /* Options that take no arguments */ - Opt_nodevmap, Opt_noxattr, + Opt_nodevmap, Opt_noxattr, Opt_directio, Opt_ignoreqv, /* Access options */ Opt_access, Opt_posixacl, /* Lock timeout option */ @@ -56,6 +56,8 @@ static const match_table_t tokens = { {Opt_remotename, "aname=%s"}, {Opt_nodevmap, "nodevmap"}, {Opt_noxattr, "noxattr"}, + {Opt_directio, "directio"}, + {Opt_ignoreqv, "ignoreqv"}, {Opt_cache, "cache=%s"}, {Opt_cachetag, "cachetag=%s"}, {Opt_access, "access=%s"}, @@ -125,7 +127,7 @@ int v9fs_show_options(struct seq_file *m, struct dentry *root) if (v9ses->nodev) seq_puts(m, ",nodevmap"); if (v9ses->cache) - seq_printf(m, ",%s", v9fs_cache_modes[v9ses->cache]); + seq_printf(m, ",cache=%s", v9fs_cache_modes[v9ses->cache]); #ifdef CONFIG_9P_FSCACHE if (v9ses->cachetag && v9ses->cache == CACHE_FSCACHE) seq_printf(m, ",cachetag=%s", v9ses->cachetag); @@ -147,6 +149,10 @@ int v9fs_show_options(struct seq_file *m, struct dentry *root) break; } + if (v9ses->flags & V9FS_IGNORE_QV) + seq_puts(m, ",ignoreqv"); + if (v9ses->flags & V9FS_DIRECT_IO) + seq_puts(m, ",directio"); if (v9ses->flags & V9FS_POSIX_ACL) seq_puts(m, ",posixacl"); @@ -276,6 +282,12 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts) case Opt_noxattr: v9ses->flags |= V9FS_NO_XATTR; break; + case Opt_directio: + v9ses->flags |= V9FS_DIRECT_IO; + break; + case Opt_ignoreqv: + v9ses->flags |= V9FS_IGNORE_QV; + break; case Opt_cachetag: #ifdef CONFIG_9P_FSCACHE kfree(v9ses->cachetag); diff --git a/fs/9p/v9fs.h b/fs/9p/v9fs.h index a08cf6618c86..c80c318ff31c 100644 --- a/fs/9p/v9fs.h +++ b/fs/9p/v9fs.h @@ -37,7 +37,10 @@ enum p9_session_flags { V9FS_ACCESS_USER = 0x08, V9FS_ACCESS_CLIENT = 0x10, V9FS_POSIX_ACL = 0x20, - V9FS_NO_XATTR = 0x40 + V9FS_NO_XATTR = 0x40, + V9FS_IGNORE_QV = 0x80, + V9FS_DIRECT_IO = 0x100, + V9FS_SYNC = 0x200 }; /* possible values of ->cache */ -- 2.37.2