Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4539106imw; Tue, 12 Jul 2022 09:38:13 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u4tLkhmY/EFSnT2D7YZY63u0X3vTx4j+EMwNscfBRP/1Vi29nGioIGzwF/qd/c0bSFrQUi X-Received: by 2002:a17:906:cc13:b0:72b:31d5:a899 with SMTP id ml19-20020a170906cc1300b0072b31d5a899mr20781535ejb.184.1657643893256; Tue, 12 Jul 2022 09:38:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657643893; cv=none; d=google.com; s=arc-20160816; b=FNjhHFTMkMDF/0ejePsagtlQLinc3OoVK+nH7DPpXIVLAvJO/YwC7tQjELzsABvDjg eqUe3dZOeH0E1LXxT+Acbwf8klJ19RmQ6XyOuSn8V7Th5w9QKd9eqBs8729y3ucIa/bj vs3n7Z+dgkM3UMSdTdqj1Rv1ifuKNHqf5eZzP6AceI8snfspsXl4qmlP/cmIrPTTMx34 qNVQqU28DMr3XS3LosVXwd6+L4F5kwbdQbTfs0lMuc5f1N3rHfvuCibEX/3b3E649WkK X5CbArnMLpvuE/8hIIF8LHlnh7MVVIb0tvFNDkKSOiSvjDstuhz2gpbtid7Ote3FYvEE vOZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:date:from:references:in-reply-to :message-id:dkim-signature; bh=3fYK9aLEk4+QTiWncARzWNrEsKD8KVzMmkos5F1PmkE=; b=sTNptJnmV3knfoSgekP2guhVAsZcI8L1Srt0Ww0bvS/coB7uAZMcayfqKIvvSGYqBy 8P+TR18a6kYmmTUxqr5SRg+UZophxNmo8KZpuU7kIyjMtk05zeRtHm9ddX+5davG5/l0 fbhIgsHHkqTG0rQkvbtWWQ/wLZnr7g77yJQTI2uOUGBsNDNHMurartBsDT7K+6ewm/EG INjBZ7OgydwA9scWy/wl81ewjK26XMdowWcxOSHb/jBMwF35hpBf7M5ty+7pRh8lxi9K kZWru9+cJ6NJQXDsVG4UupsmCJBdQnBVOrGvt1K1K9SHmL2oeIIJJ4C9Z9nSqZb91+Y5 N6rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@crudebyte.com header.s=lizzy header.b=ETBrDOby; 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=crudebyte.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o5-20020a170906974500b0072b4791e326si14102963ejy.181.2022.07.12.09.37.47; Tue, 12 Jul 2022 09:38:13 -0700 (PDT) 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=@crudebyte.com header.s=lizzy header.b=ETBrDOby; 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=crudebyte.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233898AbiGLQZm (ORCPT + 99 others); Tue, 12 Jul 2022 12:25:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232533AbiGLQZj (ORCPT ); Tue, 12 Jul 2022 12:25:39 -0400 X-Greylist: delayed 1803 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 12 Jul 2022 09:25:37 PDT Received: from lizzy.crudebyte.com (lizzy.crudebyte.com [91.194.90.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F03B3CA6D0; Tue, 12 Jul 2022 09:25:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=crudebyte.com; s=lizzy; h=Cc:To:Subject:Date:From:References:In-Reply-To: Message-Id:Content-Type:Content-Transfer-Encoding:MIME-Version:Content-ID: Content-Description; bh=3fYK9aLEk4+QTiWncARzWNrEsKD8KVzMmkos5F1PmkE=; b=ETBrD ObyYRP1acCvA1v2Xk+F1rfuh1bcGPDlekNgLxXeQywThYUkGAguSb2jIssNRU3xbZKaunKjyo1abp QST18cOxcaSxdFjgPc4ZtfDwMpuXDReB/Is0OyhOXqgENfp177oFsPM657gANtc2J7fMrYLV3tq// xBXWuS75YGx7iq7jUkb6C6UhWzzLUF0tZDOWahVs7dNSpHokcvbKIJ0NoQeSFuMXy2fAbWvvdqGLL kB5Av52kVNYvNj0oRZYAzf/KucbHAaRQA4j9RGZA0m1/VgiiUuQN8AkDDXo8OU6/CsgJXoz5p2mHi CtTdv4ashnNp2sMyBCrd9LO3q4Lgg==; Message-Id: <0a5679aea70e506433887cb67129241dfc32502b.1657636554.git.linux_oss@crudebyte.com> In-Reply-To: References: From: Christian Schoenebeck Date: Tue, 12 Jul 2022 16:31:31 +0200 Subject: [PATCH v5 09/11] 9p: add P9_ERRMAX for 9p2000 and 9p2000.u To: v9fs-developer@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Dominique Martinet , Eric Van Hensbergen , Latchesar Ionkov , Nikolay Kichukov X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 Add P9_ERRMAX macro to 9P protocol header which reflects the maximum error string length of Rerror replies for 9p2000 and 9p2000.u protocol versions. Unfortunately a maximum error string length is not defined by the 9p2000 spec, picking 128 as value for now, as this seems to be a common max. size for POSIX error strings in practice. 9p2000.L protocol version uses Rlerror replies instead which does not contain an error string. Signed-off-by: Christian Schoenebeck --- This could probably be merged with the next patch, on doubt I posted it separately as squashing is easy. The advantage of a separate patch is making the discussion of the chosen value of max. 128 bytes more prominent. include/net/9p/9p.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index 24a509f559ee..13abe013af21 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h @@ -331,6 +331,9 @@ enum p9_qid_t { /* size of header for zero copy read/write */ #define P9_ZC_HDR_SZ 4096 +/* maximum length of an error string */ +#define P9_ERRMAX 128 + /** * struct p9_qid - file system entity information * @type: 8-bit type &p9_qid_t -- 2.30.2