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=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 F0C3BC49361 for ; Fri, 18 Jun 2021 07:07:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D806761396 for ; Fri, 18 Jun 2021 07:07:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233062AbhFRHJh (ORCPT ); Fri, 18 Jun 2021 03:09:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229782AbhFRHJe (ORCPT ); Fri, 18 Jun 2021 03:09:34 -0400 Received: from mail-vs1-xe2b.google.com (mail-vs1-xe2b.google.com [IPv6:2607:f8b0:4864:20::e2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAA12C061574 for ; Fri, 18 Jun 2021 00:07:25 -0700 (PDT) Received: by mail-vs1-xe2b.google.com with SMTP id b1so4437244vsh.7 for ; Fri, 18 Jun 2021 00:07:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tlodzRLKjYsmSIvJvfyHmyRZLG20ROka1PyN+VfwfnY=; b=mdFl213r1n1uA6uKofvIKHWo5sizoJZyxajbWz27X3DF1VPnIRBBR8iCB7pGgabrWv 0JKDQLz2F+SRodYFTB4NF/9URm8CCY9XPrzZ1jV7oFeOJOBt9hKPZOhLFvkyBXgOXhd8 hA8SqcnfTAKYGkMOMHfAzHP2bOY32bYG7Hw8g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tlodzRLKjYsmSIvJvfyHmyRZLG20ROka1PyN+VfwfnY=; b=mRLAkL8CqPMc4VPaUlXgLO6At/zB8WzuzJOcYdIvB10joQLb14mde3U8MRdkrvqMbD dHBG1eGMWJwrfYXfo9aGign7NnLSWENE8UKmDKRALDqGf0dNsv3aNXH/vVW4tIVYRvbD UTXu312LenPVU4+XNI2WnYtJM/L3vUsiv7KWLQZSqNBhGTiBKwTRh46yp20FVQvZ3a6D xMuA0Z8H4mxy3IPg0zbEwtnOKMSS9CvUvx6qQ9P3+GmSlGHTgBEJQ+CgULJm6NYnud1F /aUS3Q9smOSawf33dSViKJWLZPy5CuYBU4bmu0oeA+vT7RRIt8vk+i3PFw9AE4rs4p+s s23A== X-Gm-Message-State: AOAM532GL/IXnFeONx4G8cGPTcIYt454QHGX4y4ucOnO/3hFsjKKD/Qv veX5QpYyYLxdLjGmZ+BeCUgF54disImhK3I36rsjSQ== X-Google-Smtp-Source: ABdhPJyvf5sruheatAks9eE+EGnBl6isJKiLy/2d9eFZrcjA+lnmitpD0wWr1RLBJMvgKuMZ7wE0T+qIjzgo250CRGI= X-Received: by 2002:a67:bb14:: with SMTP id m20mr5468628vsn.0.1624000045114; Fri, 18 Jun 2021 00:07:25 -0700 (PDT) MIME-Version: 1.0 References: <20210614174454.903555-1-vgoyal@redhat.com> <20210614174454.903555-2-vgoyal@redhat.com> In-Reply-To: <20210614174454.903555-2-vgoyal@redhat.com> From: Miklos Szeredi Date: Fri, 18 Jun 2021 09:07:14 +0200 Message-ID: Subject: Re: [PATCH v2 1/2] init/do_mounts.c: Add a path to boot from tag based filesystems To: Vivek Goyal Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, virtio-fs-list , Stefan Hajnoczi , "Dr. David Alan Gilbert" , Al Viro , David Howells , Richard Weinberger , Christoph Hellwig , Dominique Martinet , v9fs-developer@lists.sourceforge.net Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 14 Jun 2021 at 19:45, Vivek Goyal wrote: > > We want to be able to mount virtiofs as rootfs and pass appropriate > kernel command line. Right now there does not seem to be a good way > to do that. If I specify "root=myfs rootfstype=virtiofs", system > panics. > > virtio-fs: tag not found > .. > .. > [ end Kernel panic - not syncing: VFS: Unable to mount root fs on > +unknown-block(0,0) ] > > Basic problem here is that kernel assumes that device identifier > passed in "root=" is a block device. But there are few execptions > to this rule to take care of the needs of mtd, ubi, NFS and CIFS. > > For example, mtd and ubi prefix "mtd:" or "ubi:" respectively. > > "root=mtd:" or "root=ubi:" > > NFS and CIFS use "root=/dev/nfs" and CIFS passes "root=/dev/cifs" and > actual root device details come from filesystem specific kernel > command line options. > > virtiofs does not seem to fit in any of the above categories. In fact > we have 9pfs which can be used to boot from but it also does not > have a proper syntax to specify rootfs and does not fit into any of > the existing syntax. They both expect a device "tag" to be passed > in a device to be mounted. And filesystem knows how to parse and > use "tag". > > So there seem to be a class of filesystems which specify root device > using a "tag" which is understood by the filesystem. And filesystem > simply expects that "tag" to be passed as "source" of mount and > how to mount filesystem using that "tag" is responsibility of filesystem. > > This patch proposes that we internally create a list of filesystems > which pass a "tag" in "root=" and expect that tag to be passed > as "source" of mount. With this patch I can boot into virtiofs rootfs > with following syntax. > > "root=myfs rootfstype=virtiofs rw" The syntax and the implementation looks good. Acked-by: Miklos Szeredi From mboxrd@z Thu Jan 1 00:00:00 1970 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tlodzRLKjYsmSIvJvfyHmyRZLG20ROka1PyN+VfwfnY=; b=mdFl213r1n1uA6uKofvIKHWo5sizoJZyxajbWz27X3DF1VPnIRBBR8iCB7pGgabrWv 0JKDQLz2F+SRodYFTB4NF/9URm8CCY9XPrzZ1jV7oFeOJOBt9hKPZOhLFvkyBXgOXhd8 hA8SqcnfTAKYGkMOMHfAzHP2bOY32bYG7Hw8g= MIME-Version: 1.0 References: <20210614174454.903555-1-vgoyal@redhat.com> <20210614174454.903555-2-vgoyal@redhat.com> In-Reply-To: <20210614174454.903555-2-vgoyal@redhat.com> From: Miklos Szeredi Date: Fri, 18 Jun 2021 09:07:14 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" Subject: Re: [Virtio-fs] [PATCH v2 1/2] init/do_mounts.c: Add a path to boot from tag based filesystems List-Id: Development discussions about virtio-fs List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vivek Goyal Cc: David Howells , Christoph Hellwig , Richard Weinberger , Dominique Martinet , linux-kernel@vger.kernel.org, virtio-fs-list , Al Viro , linux-fsdevel@vger.kernel.org, v9fs-developer@lists.sourceforge.net On Mon, 14 Jun 2021 at 19:45, Vivek Goyal wrote: > > We want to be able to mount virtiofs as rootfs and pass appropriate > kernel command line. Right now there does not seem to be a good way > to do that. If I specify "root=myfs rootfstype=virtiofs", system > panics. > > virtio-fs: tag not found > .. > .. > [ end Kernel panic - not syncing: VFS: Unable to mount root fs on > +unknown-block(0,0) ] > > Basic problem here is that kernel assumes that device identifier > passed in "root=" is a block device. But there are few execptions > to this rule to take care of the needs of mtd, ubi, NFS and CIFS. > > For example, mtd and ubi prefix "mtd:" or "ubi:" respectively. > > "root=mtd:" or "root=ubi:" > > NFS and CIFS use "root=/dev/nfs" and CIFS passes "root=/dev/cifs" and > actual root device details come from filesystem specific kernel > command line options. > > virtiofs does not seem to fit in any of the above categories. In fact > we have 9pfs which can be used to boot from but it also does not > have a proper syntax to specify rootfs and does not fit into any of > the existing syntax. They both expect a device "tag" to be passed > in a device to be mounted. And filesystem knows how to parse and > use "tag". > > So there seem to be a class of filesystems which specify root device > using a "tag" which is understood by the filesystem. And filesystem > simply expects that "tag" to be passed as "source" of mount and > how to mount filesystem using that "tag" is responsibility of filesystem. > > This patch proposes that we internally create a list of filesystems > which pass a "tag" in "root=" and expect that tag to be passed > as "source" of mount. With this patch I can boot into virtiofs rootfs > with following syntax. > > "root=myfs rootfstype=virtiofs rw" The syntax and the implementation looks good. Acked-by: Miklos Szeredi