Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2326233ybh; Mon, 16 Mar 2020 00:45:46 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuNXuhSkTCJ9nYDNjDzYDEyf1RILkFWi2e5M7+xnEtGEW3YmqpGtgF2C8F6XfXoL6lvUYhy X-Received: by 2002:aca:210c:: with SMTP id 12mr15445808oiz.0.1584344746282; Mon, 16 Mar 2020 00:45:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584344746; cv=none; d=google.com; s=arc-20160816; b=hvSXLrbpN6vMjNlkgQfpmjdEUHdifvI8vvd40GTSwzmFwXPWtG3oTYwtonhRvG0Pep 0Q++zjM2MpCl4hCyEuax/gyvksw4Y0HfQp4QSivws4IPbKE0aZy3ADXDIPp1A6yd0zmg kpIIRTYZJuU4y7jpGa7MdjW15UJfbgt1lYM3ODHEFJyGzx6AVLahwvYEE62l53Msfn2u kQ+i5xR+c1VsgEzX/ucGDdvyrV0iazC8zKjvev1GvtrBN+uMMtMLNEZ79OvWwcbaKt6u mveh46FYgIaB/QouURkgD7g5gzyPQ2FvfGeou+k8sYNfLvBs8RJuzn0ybk4ChxJnzMbJ CSXg== 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:references:cc:to :subject; bh=uJulup+/DTWn4AhMtB+xe0C+3CxE1FzNlRyRfsKaysQ=; b=Ph7QmiDZsmBsa7vPTWjd+wAeRwxk6FltxCtTJd3uq3yeP5bsSkV8eHrO28UO1e8b4V CZWXCeJWTxLi2vz/aX/UxkAQjLDdh0gg/21XCaS9kRBVpaJ62cAhuUZAu/hJd4QWsh5l OZDFTBYAf53P1UE1/CMH2XGSjvLNw4U+qh+QlFs4/BpljrMmHC9Nraaq/OAqSB6ij0Z6 4qnEkL/Th6059FIsnF4hPRv6SqE0Sj1BlEWjpWYakpb1a/fhxmjSSb8nfemYnf52kV+c TlajJrzOYad4/b6vh7MnafG+ALHY+XS9gyhw1vi+5ng7swvl7e61NKkvLfS/CfbE4BWu QbJQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r71si8977443oie.265.2020.03.16.00.45.33; Mon, 16 Mar 2020 00:45:46 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729962AbgCPHpK (ORCPT + 99 others); Mon, 16 Mar 2020 03:45:10 -0400 Received: from out30-54.freemail.mail.aliyun.com ([115.124.30.54]:60390 "EHLO out30-54.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729582AbgCPHpK (ORCPT ); Mon, 16 Mar 2020 03:45:10 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e07488;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=16;SR=0;TI=SMTPD_---0Tsj-C4w_1584344695; Received: from IT-FVFX43SYHV2H.local(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0Tsj-C4w_1584344695) by smtp.aliyun-inc.com(127.0.0.1); Mon, 16 Mar 2020 15:44:56 +0800 Subject: Re: [PATCH v2,2/2] doc: zh_CN: add translation for virtiofs To: Wang Wenhu , Jonathan Corbet , Vivek Goyal , Stefan Hajnoczi , Miklos Szeredi , Harry Wei , Mauro Carvalho Chehab , "Daniel W. S. Almeida" , Christian Brauner , Eric Biggers , "Matthew Wilcox (Oracle)" , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org Cc: kernel@vivo.com References: <20200315092810.87008-1-wenhu.wang@vivo.com> <20200315155258.91725-1-wenhu.wang@vivo.com> <20200315155258.91725-2-wenhu.wang@vivo.com> From: Alex Shi Message-ID: <5116273f-c88e-543f-7f91-a45ae2d3d505@linux.alibaba.com> Date: Mon, 16 Mar 2020 15:44:55 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200315155258.91725-2-wenhu.wang@vivo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reviewed-by: Alex Shi 在 2020/3/15 下午11:52, Wang Wenhu 写道: > Translate virtiofs.rst in Documentation/filesystems/ into Chinese. > > Acked-by: Stefan Hajnoczi > Signed-off-by: Wang Wenhu > --- > Changelog v2: > - add a blank line in the end of index.rst to index virtiofs.rst > - Asked-by Stefan Hajnoczi > - added SPDX header and Copyright info > --- > Documentation/filesystems/virtiofs.rst | 2 + > .../translations/zh_CN/filesystems/index.rst | 2 + > .../zh_CN/filesystems/virtiofs.rst | 61 +++++++++++++++++++ > 3 files changed, 65 insertions(+) > create mode 100644 Documentation/translations/zh_CN/filesystems/virtiofs.rst > > diff --git a/Documentation/filesystems/virtiofs.rst b/Documentation/filesystems/virtiofs.rst > index 4f338e3cb3f7..7c4301d962f8 100644 > --- a/Documentation/filesystems/virtiofs.rst > +++ b/Documentation/filesystems/virtiofs.rst > @@ -1,3 +1,5 @@ > +.. _virtiofs_index: > + > .. SPDX-License-Identifier: GPL-2.0 > > =================================================== > diff --git a/Documentation/translations/zh_CN/filesystems/index.rst b/Documentation/translations/zh_CN/filesystems/index.rst > index 0a2cabfeaf7b..fd3700a4db6d 100644 > --- a/Documentation/translations/zh_CN/filesystems/index.rst > +++ b/Documentation/translations/zh_CN/filesystems/index.rst > @@ -27,3 +27,5 @@ Linux Kernel中的文件系统 > .. toctree:: > :maxdepth: 2 > > + virtiofs > + > diff --git a/Documentation/translations/zh_CN/filesystems/virtiofs.rst b/Documentation/translations/zh_CN/filesystems/virtiofs.rst > new file mode 100644 > index 000000000000..cd836a9b2ac4 > --- /dev/null > +++ b/Documentation/translations/zh_CN/filesystems/virtiofs.rst > @@ -0,0 +1,61 @@ > +.. SPDX-License-Identifier: GPL-2.0 > +.. raw:: latex > + > + \renewcommand\thesection* > + \renewcommand\thesubsection* > + > +.. include:: ../disclaimer-zh_CN.rst > + > +:Original: :ref:`Documentation/filesystems/virtiofs.rst ` > + > +译者 > +:: > + > + 中文版维护者: 王文虎 Wang Wenhu > + 中文版翻译者: 王文虎 Wang Wenhu > + 中文版校译者: 王文虎 Wang Wenhu > + > +=========================================== > +virtiofs: virtio-fs 主机<->客机共享文件系统 > +=========================================== > + > +- Copyright (C) 2020 Vivo Communication Technology Co. Ltd. > + > +介绍 > +==== > +Linux的virtiofs文件系统实现了一个半虚拟化VIRTIO类型“virtio-fs”设备的驱动,通过该\ > +类型设备实现客机<->主机文件系统共享。它允许客机挂载一个已经导出到主机的目录。 > + > +客机通常需要访问主机或者远程系统上的文件。使用场景包括:在新客机安装时让文件对其\ > +可见;从主机上的根文件系统启动;对无状态或临时客机提供持久存储和在客机之间共享目录。 > + > +尽管在某些任务可能通过使用已有的网络文件系统完成,但是却需要非常难以自动化的配置\ > +步骤,且将存储网络暴露给客机。而virtio-fs设备通过提供不经过网络的文件系统访问文件\ > +的设计方式解决了这些问题。 > + > +另外,virto-fs设备发挥了主客机共存的优点提高了性能,并且提供了网络文件系统所不具备 > +的一些语义功能。 > + > +用法 > +==== > +以``myfs``标签将文件系统挂载到``/mnt``: > + > +.. code-block:: sh > + > + guest# mount -t virtiofs myfs /mnt > + > +请查阅 https://virtio-fs.gitlab.io/ 了解配置QEMU和virtiofsd守护程序的详细信息。 > + > +内幕 > +==== > +由于virtio-fs设备将FUSE协议用于文件系统请求,因此Linux的virtiofs文件系统与FUSE文\ > +件系统客户端紧密集成在一起。客机充当FUSE客户端而主机充当FUSE服务器,内核与用户空\ > +间之间的/dev/fuse接口由virtio-fs设备接口代替。 > + > +FUSE请求被置于虚拟队列中由主机处理。主机填充缓冲区中的响应部分,而客机处理请求的完成部分。 > + > +将/dev/fuse映射到虚拟队列需要解决/dev/fuse和虚拟队列之间语义上的差异。每次读取\ > +/dev/fuse设备时,FUSE客户端都可以选择要传输的请求,从而可以使某些请求优先于其他\ > +请求。虚拟队列有其队列语义,无法更改已入队请求的顺序。在虚拟队列已满的情况下尤 > +其关键,因为此时不可能加入高优先级的请求。为了解决此差异,virtio-fs设备采用“hiprio”\ > +(高优先级)虚拟队列,专门用于有别于普通请求的高优先级请求。 >