Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4608804pxv; Tue, 27 Jul 2021 11:30:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3l6Jel348pCDsqvfW4udOyF6pq1XEac6+s1egqt4qqNE8QkLAhbyImV6c2QqCncXZm8Ds X-Received: by 2002:a5e:8208:: with SMTP id l8mr20124730iom.197.1627410658570; Tue, 27 Jul 2021 11:30:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627410658; cv=none; d=google.com; s=arc-20160816; b=lEpCUxicHAIztlvAB776hnW4Mek5NP4P9MOiBeaWIQmqyrf6SPJyTgR6MkcEmtnlBl GHhBMPEEH+UVf6IXh3Ak2nYHeRkMtWxnl4aEKQ7+gWHBAUyIDO2+dWVFCxKZ2tQBZbjv vK5p8edHcy2rqbEHKZwoPggBcJJZVs8kaxf+6kBe5ld1Bw/vbNxzAaJZ4G7sx6Pn3GyX adpJ2kL2Kls5uw1afJYz0KQk+8GA+jTG4gRUCNOdHWvwFSaioD/XJWF5PeHnH5NhHb+/ VKZpTOQ6GuAgKmXJXXW11cbCu3TKtZ12sm1hnOjJh71r9HjfDJqF6L/6DiGnok+xzPt/ b0uw== 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=6sBKpIHNRZeimmd/He7f5ljIel5Vq9B+zrMnU0hHa2g=; b=pWi7UyOYCdi1D4h2pKLulSOVsTQOicnU8w/WW1LX27my54AuVDFGgUhUOzPo1j/18A CZBrAfIY2d7zdYvmFjb9cU7PG4bIgwlXZXjXVAGoqtUOBOs3GLcol5zhI6xackk5A3cZ N9Zy9BQXL32n0BCfV/iGBKTNo+UFqEPGO3lSh+LM3jdlliDWpgoaobJq//3OOkM5WyoS Ms3CiqW5v4cQ8OuoAZ39xrgxTLwIN3KXzjId4R6aBRcwApLNy+/fLOm81tQi6p1+J0tp rHnYbL9yQyL0b6Ve8YdvrfV+yBE/XeO+fYOcGw4n4uf8nXRHaKqRt1CX6sDJ76QPxujE 6qsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ms+otwzj; 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 187si3936118iow.86.2021.07.27.11.30.46; Tue, 27 Jul 2021 11:30:58 -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=Ms+otwzj; 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 S231781AbhG0S3o (ORCPT + 99 others); Tue, 27 Jul 2021 14:29:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:32295 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229797AbhG0S3n (ORCPT ); Tue, 27 Jul 2021 14:29:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627410583; 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=6sBKpIHNRZeimmd/He7f5ljIel5Vq9B+zrMnU0hHa2g=; b=Ms+otwzjdJqv70rjGgQvIsKUwWmhFcMM1qBLuiogx9aLMxPZoeDuic4HithFWRFdeL51Ms dcD8Y3GcFaJugjmBhcljjwgqjQzkRWxKKH9rb3CGDhLHp0bZ5WRjNJRKZjF0QU11xbdFRR 3w+qTVgXbIrmY11/AJ7TKzBK37Ayf98= 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-120-qAq-TvmDOOeU7tGrk7_3kw-1; Tue, 27 Jul 2021 14:29:41 -0400 X-MC-Unique: qAq-TvmDOOeU7tGrk7_3kw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 96D7194EE1; Tue, 27 Jul 2021 18:29:40 +0000 (UTC) Received: from horse.redhat.com (unknown [10.22.19.133]) by smtp.corp.redhat.com (Postfix) with ESMTP id 836F860862; Tue, 27 Jul 2021 18:29:33 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id 14B85224201; Tue, 27 Jul 2021 14:29:33 -0400 (EDT) Date: Tue, 27 Jul 2021 14:29:33 -0400 From: Vivek Goyal To: viro@zeniv.linux.org.uk Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, hch@lst.de, virtio-fs@redhat.com, v9fs-developer@lists.sourceforge.net, stefanha@redhat.com, miklos@szeredi.hu Subject: Re: [PATCH v3 0/3] support booting of arbitrary non-blockdevice file systems Message-ID: References: <20210714202321.59729-1-vgoyal@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210714202321.59729-1-vgoyal@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 14, 2021 at 04:23:18PM -0400, Vivek Goyal wrote: > Hi, > > This is V3 of patches. Christoph had posted V2 here. Hi, Ping? Vivek > > https://lore.kernel.org/linux-fsdevel/20210621062657.3641879-1-hch@lst.de/ > > There was a small issue in last patch series that list_bdev_fs_names() > did not put an extra '\0' at the end as current callers were expecting. > > To fix this, I have modified list_bdev_fs_names() and split_fs_names() > to return number of null terminated strings they have parsed. And > modified callers to use that to loop through strings (instead of > relying on an extra null at the end). > > Christoph was finding it hard to find time so I took his patches, > added my changes in patch3 and reposting the patch series. > > I have tested it with 9p, virtiofs and ext4 filesystems as rootfs > and it works for me. > > Thanks > Vivek > > Christoph Hellwig (3): > init: split get_fs_names > init: allow mounting arbitrary non-blockdevice filesystems as root > fs: simplify get_filesystem_list / get_all_fs_names > > fs/filesystems.c | 27 ++++++++------ > include/linux/fs.h | 2 +- > init/do_mounts.c | 90 +++++++++++++++++++++++++++++++++------------- > 3 files changed, 83 insertions(+), 36 deletions(-) > > -- > 2.31.1 >