From patchwork Sat Feb 18 00:33:13 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: 58865 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp149052wrn; Fri, 17 Feb 2023 16:51:54 -0800 (PST) X-Google-Smtp-Source: AK7set/GQigHMn9dVyFX96FXeZmALwPa9i4Zd9Gvt2d4Ej2uhbR60lfZW+9CzDnql+9LWFYGEby5 X-Received: by 2002:a62:1cc8:0:b0:5a9:c682:f489 with SMTP id c191-20020a621cc8000000b005a9c682f489mr5086868pfc.3.1676681513972; Fri, 17 Feb 2023 16:51:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676681513; cv=none; d=google.com; s=arc-20160816; b=eAMMv4URNqzoEnUnULVHRbOKUUe6lH4XrfLnD5dmLm1XvT57PrkLvhWbWD64L8hC1o f9mi/gJY2QCH46m2Fh5eqf+lI2clnTxk8f2F5ShH2VdghGNDv01XxNDQN1woJIyBpQXi dCzqTrAgUdGFrZ9/G8ewuZsypstd+wcDG1yYhZSylJMLtUZJMHzZr+QVWUWZRKEUUkAn dz2Ya7LX+Of/VkLWmBzlad5Bzrg2I3t+y3evCbdhM1a1maZ0FkEophWsFXPRfb9+duXh hQeWKLE155zMMqck0HdnwYaOPB+oWUSI8/GAGdFuNqTOLjD6Lgze9ZvrB8s7FSyAy3JG +roQ== 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=Fw9lpMcRlQ98cMWAJ6yr69bVmkSt3U+zp7vHa9aUgRs=; b=wYBCbAM3q5iuWMxfX9oCY8bHxvKvBjSAQ7erXm4ZXiKwlKIJnuXSfm9CKupNkSqfjm 5ufc3vnUE6CkRh3us3CpoJBHT7c+bkY0y7zbGlolyI1q7rAPcL5vZNDhoAC+oVWhWHRh dQ4sg3RvZ9SCj1P/a3nSa+0wAoEIHFG3K91a+xhpYqWwCYAILAenDtaw6KY93zcRJlnH 9H9psUplQ1qqsLBMS6eJPRXVfQ+sepGRK9mHhc5KPeEZebRKbhRaPKeXE60Ab2BwCfXM waQlXhVXncykIwWanqhkwBsgg8UVQIpAoKEvawPNVppjygX+cG/NWJWt7mShUw7NA/mZ zQvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uoiSvOjV; 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 195-20020a6302cc000000b004fc235bd318si5028763pgc.669.2023.02.17.16.51.41; Fri, 17 Feb 2023 16:51:53 -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=uoiSvOjV; 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 S229709AbjBRAs7 (ORCPT + 99 others); Fri, 17 Feb 2023 19:48:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbjBRAs4 (ORCPT ); Fri, 17 Feb 2023 19:48:56 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10DFF53EC8; Fri, 17 Feb 2023 16:48:30 -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 sin.source.kernel.org (Postfix) with ESMTPS id 99FFFCE2D11; Sat, 18 Feb 2023 00:33:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17A3FC433EF; Sat, 18 Feb 2023 00:33:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676680434; bh=PwWjKgBCrFlHwrWRE5cwXvsrY7AklcLgKZPzMWv8M98=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uoiSvOjVFdldq06YEWUWJ5d6yYyCFmNKfK/nQJ1caAuYFBSe7ItFqXHlKS9KpiDJb MSsdsh4qjW9ARIQiNRph5Oo4iG0l1JDWo7qyb67VWywhZy7Dywf1a7xANo3+otCeum GJ9XzUoh9k+IeI7+mGixH2//iLtq8jT8swpMNuKcsuSABU0n7xrejOOIThxQV3L8iI MSdh9sPUNQS7hNH8DRYKMfA+gocsbqWcCxOCX5k/OPtHxLqSW3D4lpZgHvTTDFNx08 tqSwZFSqXIshydzqltmUOmhWXj+UD5dqeCchUFrIMIE3GNcsjsq41AlA5uz+B1MiwH FuDUdno65CPvg== 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 v4 01/11] net/9p: Adjust maximum MSIZE to account for p9 header Date: Sat, 18 Feb 2023 00:33:13 +0000 Message-Id: <20230218003323.2322580-2-ericvh@kernel.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230218003323.2322580-1-ericvh@kernel.org> References: <20230124023834.106339-1-ericvh@kernel.org> <20230218003323.2322580-1-ericvh@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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?1758127994939256517?= X-GMAIL-MSGID: =?utf-8?q?1758127994939256517?= Add maximum p9 header size to MSIZE to make sure we can have page aligned data. Signed-off-by: Eric Van Hensbergen Reviewed-by: Dominique Martinet --- net/9p/client.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/net/9p/client.c b/net/9p/client.c index 622ec6a586ee..6c2a768a6ab1 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -28,7 +28,11 @@ #define CREATE_TRACE_POINTS #include -#define DEFAULT_MSIZE (128 * 1024) +/* DEFAULT MSIZE = 32 pages worth of payload + P9_HDRSZ + + * room for write (16 extra) or read (11 extra) operands. + */ + +#define DEFAULT_MSIZE ((128 * 1024) + P9_IOHDRSZ) /* Client Option Parsing (code inspired by NFS code) * - a little lazy - parse all client options