Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1387878pxj; Fri, 18 Jun 2021 06:09:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz64B5Py4RSAdCRtHjzqfkSdBbom2MP+kIQ1BgkKFAvq582zjfMrQTlY+h0Q2a6Ncb0oS3v X-Received: by 2002:a05:6402:31a5:: with SMTP id dj5mr4860255edb.229.1624021767570; Fri, 18 Jun 2021 06:09:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624021767; cv=none; d=google.com; s=arc-20160816; b=rr1VQlQMKpgV5KwZVO2VnzvJkCEvM+sk7QoUzdSKQQwN/z8CG29BGVgzjVp+PfaaNZ 3IKfjXJ+iB++K+KtvYle7EuDMqh0hbRgLOAv0ubf1FSTCmx5If7u5wqKmY7kgufEm8rk YibV9K64tg/v5848V8c99AButkWGnXay/6GM5QtMexRBU4Tk3dPEFuyR2UyIocMwe+nt oiKBuA2KcOOxjdwfLxtuTDir9+TxQtvEI+Wh2xclzhWq1UypfkI1gIXP3ZoU8cSpSCJX vlE00aNCKTyy2cjoXPjhE4dGf/9j2V05VCT1Y1qehYq86FPa0F57CTVZH2s1iMmtfl3n a38g== 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:dkim-signature; bh=O7yYJwP0hLqEgWbtE3UdqtU4/CGBcO2PNzuDJpFqL/M=; b=CQjItIbFASAdT2be9mBcWb6MrN33qV94jcOMgefIWuUZvfc/mkBzyNc8n8imFVcMcJ sFaOVNbH2bhM5zGuxKdgeEynUebQ9tD6cegVr6z93iV7UcdELR8bovfMxMYn/+YN5KQ7 id/Sy+bUg3k0mOO8XhWhmxDn1KWP9xBT0sCUFknNUwVNKYvfuOqNyx7bm67fsXxpjnTT /NCWhf8NB0lz4SAR5ZwxQNCmjuRZdj1nJbr2UV3P08SOd+R5stuONMwpUxSPQc7iyZVm pJuTpnVPAgLwQ8bdvd37tIzRz9Uf7a3656k2HfWV1ZurQaufewZ9eVzydrBEgYsa4oIS AGPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="FH/ZqPNC"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v13si10625248edl.474.2021.06.18.06.09.04; Fri, 18 Jun 2021 06:09:27 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="FH/ZqPNC"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232052AbhFRMza (ORCPT + 99 others); Fri, 18 Jun 2021 08:55:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:36142 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230070AbhFRMz3 (ORCPT ); Fri, 18 Jun 2021 08:55:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624020800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=O7yYJwP0hLqEgWbtE3UdqtU4/CGBcO2PNzuDJpFqL/M=; b=FH/ZqPNCngEvlXV63ukao0iuXjSNs629jv9AiJ1/mMPNAfsulZbxm1BM1v6x1Ye72I2Tbi ZUDVnOQ9eMRos3arvyNEMF6VVMyqIlA9kV8RnODKwWitiKeB5GRw0ZbzUA3JPkZnC5jHC8 4y4CKSOoa0YhtXt5AZvnWT5h+PAQxJ4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-329-ZLKhS9mkOo-68xNIRpssBA-1; Fri, 18 Jun 2021 08:53:16 -0400 X-MC-Unique: ZLKhS9mkOo-68xNIRpssBA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5327B100C611; Fri, 18 Jun 2021 12:53:15 +0000 (UTC) Received: from horse.redhat.com (ovpn-114-2.rdu2.redhat.com [10.10.114.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id CD50B60FC2; Fri, 18 Jun 2021 12:53:08 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id 65EBC22054F; Fri, 18 Jun 2021 08:53:08 -0400 (EDT) Date: Fri, 18 Jun 2021 08:53:08 -0400 From: Vivek Goyal To: Miklos Szeredi 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 Subject: Re: [PATCH v2 1/2] init/do_mounts.c: Add a path to boot from tag based filesystems Message-ID: <20210618125308.GB1234055@redhat.com> References: <20210614174454.903555-1-vgoyal@redhat.com> <20210614174454.903555-2-vgoyal@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 18, 2021 at 09:07:14AM +0200, Miklos Szeredi wrote: > 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 Thanks Miklos. Now Christoph has come up with another patch series to achieve the same. And that patches series looks better than my patches. https://lore.kernel.org/linux-fsdevel/20210617153649.1886693-1-hch@lst.de/ There are couple of minor issues to be taken care of. I am hoping after that these patches can be merged. Thanks Vivek