Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1527423imm; Wed, 1 Aug 2018 18:20:55 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdhzZbK+T0xtpOtoH62FsIWvXuAbcnnL9cZy9PRZO0dpb2FI2oOoW2ZAf/WpN8XpPpTJlY0 X-Received: by 2002:a63:dc17:: with SMTP id s23-v6mr679139pgg.40.1533172855940; Wed, 01 Aug 2018 18:20:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533172855; cv=none; d=google.com; s=arc-20160816; b=U/lcXDymdLL40cchW0Oefj5WHK4ieIh/ytVJf52bSfG5qfyEE8S8AZNJjI9xzxTUl6 5zOBlahYKrubcHIokHBxrxHX/pvE1+AmnE9MsEn5NaIOrveARsWO7MEyy4vnFHHBF8FN KMqkkVnAxiPIp0IEjWMnU7FCo7+9FxtA81W1r97S408a8T/TAVDz+iYRmPkiX20nvKOf qpamaLUt1MmXK+mWCHC2bjGWa3Z280uQrvGMAPexdQfnonY0Lvt+29VAJCOiOoJCzxSP xOEVpxScdiBe0Bnmnuaq7XO3FmAB6o3Zf27tLCux9T8Be6tOnha+aI+xLLK3dthjufh8 r4Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:arc-authentication-results; bh=nt3z9CJ14QGRK/7gzNBKM3pykMAJ7s1RWKIe3wxM4zg=; b=V6P0KYrzPJJ4WH7VXavwXLIh/LwxgOMIuiQP27zMmPVj+EJ2JX7QsT/SPvxwluatxu ykifT5buICWDvNFWr5+THTWe9jz9jeQd/6qM73hcdhMMHERqIHZiduv3Uv1V0X0Uf4xa etNLsaJD3gOoUEOZcqBXAiI2RCFWZfBdtSchrgpvx89RG+PTGg7A7r3R0joO/I/Pc0Ca EmDfVKQpD8h6TR59gPeYSD1cB+ymLSj37h840grFz87YKIaSU66bnSLfbEIbdON6p1tT Zvlt2fQA/BY2rX97xN6P/Q+H7KzSIFJjZwffOQsseoE0ZM4m7bHfFD2JNsMaIYZPHaey V9GA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w15-v6si364661ply.501.2018.08.01.18.20.41; Wed, 01 Aug 2018 18:20:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732385AbeHBDIY (ORCPT + 99 others); Wed, 1 Aug 2018 23:08:24 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:57472 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726444AbeHBDIY (ORCPT ); Wed, 1 Aug 2018 23:08:24 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 49CA75E034F41; Thu, 2 Aug 2018 09:19:46 +0800 (CST) Received: from [10.177.253.249] (10.177.253.249) by smtp.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.399.0; Thu, 2 Aug 2018 09:19:47 +0800 Subject: Re: [PATCH] net/9p/trans_virtio.c: add a terminal char for mount tag To: Dominique Martinet , Greg Kurz References: <5B6164F6.60004@huawei.com> <20180801081157.GA20127@nautica> <5B616E3B.4050205@huawei.com> <20180801125222.3ba39416@bahia.lan> <20180801120958.GA571@nautica> CC: "akpm@linux-foundation.org" , "Linux Kernel Mailing List" , From: piaojun Message-ID: <5B625BD1.8050602@huawei.com> Date: Thu, 2 Aug 2018 09:18:09 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20180801120958.GA571@nautica> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.253.249] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dominique and Greg, Thanks for your reviewing, and I will try to simplify other related code according your suggestions in patch v2. Thanks, Jun On 2018/8/1 20:09, Dominique Martinet wrote: > Greg Kurz wrote on Wed, Aug 01, 2018: >> So this patch basically turns chan->tag into a nul terminated string, >> which is indeed more convenient and robust. Maybe you can update the >> rest of the code accordingly and drop chan->tag_len then ? > > If we can use that to simplify some other part of the code, that's > certainly more appealing to me :) > > >> FWIW, 9P strings received from the client are also converted to >> nul terminated strings: > > Oh, good to know; I guess that makes sense when these strings come and > go from/to other components of the kernel that likely expect that. >