Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2576302pxj; Mon, 14 Jun 2021 01:59:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4bn82P2cc6v5+4ICuB/CpDjucVfwigIIbgtCJSoh/aR+Z+YLNqF3FCvx8TBxYhN3VUGx1 X-Received: by 2002:a17:906:5949:: with SMTP id g9mr14278956ejr.296.1623661157368; Mon, 14 Jun 2021 01:59:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623661157; cv=none; d=google.com; s=arc-20160816; b=AP13ykhoHSlbtQUzw84ONlMCQfY8UTHsqLSBj6nfoR8ZFkKotmg80/RqDeA/QEEZiH C6aS8zwiTrt8GlNmd8RaCOB0zH218d5Nztiujkj0KXDaFTxjjc/cjiFtLsa0TpOCTJnN zB5yoiis4cQtZmCbCidIcnTIswvMvRoKBI5q+VRCr5bj9GUlAqHn8cKloKdBBOYtgpVo rV1U5t7asO+kiDPJjn7tQudMknwppR5RWp5rk18CSBtzekNdfVuL88xG98myJqqur55U fRTy2PBM9E5cFREBJsw416S7kUmwleY5JFp1T3B/ipuP3oYKH8NSoDmjzkIaqurBKIm8 YTgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=HqC8ppzjbq58szsRQXJPohMw0oo3DrYRjFPAskvtlgs=; b=LPHLiDHq+m1WFVvnxqEOXS/VOH85RUUECic2Jx5PjQe+X0zMhPV/d+eWo0P3K1my5/ 62GcI73asHEk6WMm1kQ3G00M8uLVi2q1io/fpXfeZp4obD/a8M6Qlq1UK5k1X8meSCzG I50exvnzeE6ZfRU7wHnc8KqObjdGjJV92V1IfEzpiNBsaRPbrQbVW6ti+dJG5zcUlZjO pHyo2MBtYWapBH4ep7YBcyz5S0Q154wpATyg5Pa03xyg7GzJ4kk/C+5DE1vJ6657q5I/ Uooy1B8IgT7h25MWl5UPGXq4xg6Hd+Uj7/YM1WTCt+QMJDpSd9p5d4jI8qOTOHKofQez kFQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v28si11757459ejk.538.2021.06.14.01.58.53; Mon, 14 Jun 2021 01:59:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232589AbhFNJAD (ORCPT + 99 others); Mon, 14 Jun 2021 05:00:03 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:59441 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232528AbhFNJAC (ORCPT ); Mon, 14 Jun 2021 05:00:02 -0400 Received: (Authenticated sender: josh@joshtriplett.org) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 247DD100008; Mon, 14 Jun 2021 08:57:55 +0000 (UTC) Date: Mon, 14 Jun 2021 01:57:54 -0700 From: Josh Triplett To: Changbin Du Cc: Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , linux-kernel@vger.kernel.org, v9fs-developer@lists.sourceforge.net Subject: Re: [PATCH v3 0/3] 9p: add support for root file systems Message-ID: References: <20210606230922.77268-1-changbin.du@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210606230922.77268-1-changbin.du@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 07, 2021 at 07:09:19AM +0800, Changbin Du wrote: > Just like cifs and nfs, this short series enables rootfs support for 9p. > Bellow is an example which mounts v9fs with tag 'r' as rootfs in qemu > guest via virtio transport. > > $ qemu-system-x86_64 -enable-kvm -cpu host -m 1024 \ > -virtfs local,path=$rootfs_dir,mount_tag=r,security_model=passthrough,id=r \ > -kernel /path/to/linux/arch/x86/boot/bzImage -nographic \ > -append "root=/dev/v9fs v9fsroot=r,trans=virtio rw console=ttyS0 3" Rather than inventing a pseudo-device /dev/v9fs for this, would it potentially work to use the existing rootfstype and rootflags options for this? rootfstype already determines what filesystem should be used to mount the root, and rootflags already provides options for that filesystem. For instance, for the above example: rootfstype=9p root=r rootflags=trans=virtio That would require a bit of fiddling to make rootfstype=9p allow a root that's just the mount_tag. If that isn't an option, then even with root=/dev/v9fs I think it still makes sense to use the existing rootflags for "trans=virtio" rather than creating a new "v9fsroot" option for that. - Josh Triplett