From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E931C48BE8 for ; Mon, 14 Jun 2021 08:58:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D520D61380 for ; Mon, 14 Jun 2021 08:58:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232609AbhFNJAE (ORCPT ); Mon, 14 Jun 2021 05:00:04 -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