All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
	viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
	virtio-fs@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [Virtio-fs] [PATCH 3/2] fs: simplify get_filesystem_list / get_all_fs_names
Date: Wed, 30 Jun 2021 13:33:58 -0400	[thread overview]
Message-ID: <20210630173358.GD75386@redhat.com> (raw)
In-Reply-To: <20210630053601.GA29241@lst.de>

On Wed, Jun 30, 2021 at 07:36:01AM +0200, Christoph Hellwig wrote:
> On Tue, Jun 29, 2021 at 04:50:48PM -0400, Vivek Goyal wrote:
> > May be we should modify mount_block_root() code so that it does not
> > require that extra "\0". Possibly zero initialize page and that should
> > make sure list_bdev_fs_names() does not have to worry about it.
> > 
> > It is possible that a page gets full from the list of filesystems, and
> > last byte on page is terminating null. In that case just zeroing page
> > will not help. We can keep track of some sort of end pointer and make
> > sure we are not searching beyond that for valid filesystem types.
> > 
> > end = page + PAGE_SIZE - 1;
> > 
> > mount_block_root()
> > {
> > 	for (p = fs_names; p < end && *p; p += strlen(p)+1) {
> > 	}
> > }
> 
> Maybe.  To honest I'd prefer to not even touch this unrelated code given
> how full of landmines it is :)

Agreed. It probably is better to make such changes incrementally. 

Given third patch is nice to have cleanup kind of thing, can we first
just merge first two patches to support non-block device filesystems as
rootfs.

We will really like to have a method to properly boot virtiofs as rootfs.

Thanks
Vivek


WARNING: multiple messages have this Message-ID (diff)
From: Vivek Goyal <vgoyal@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-fsdevel@vger.kernel.org, virtio-fs@redhat.com,
	viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org
Subject: Re: [Virtio-fs] [PATCH 3/2] fs: simplify get_filesystem_list / get_all_fs_names
Date: Wed, 30 Jun 2021 13:33:58 -0400	[thread overview]
Message-ID: <20210630173358.GD75386@redhat.com> (raw)
In-Reply-To: <20210630053601.GA29241@lst.de>

On Wed, Jun 30, 2021 at 07:36:01AM +0200, Christoph Hellwig wrote:
> On Tue, Jun 29, 2021 at 04:50:48PM -0400, Vivek Goyal wrote:
> > May be we should modify mount_block_root() code so that it does not
> > require that extra "\0". Possibly zero initialize page and that should
> > make sure list_bdev_fs_names() does not have to worry about it.
> > 
> > It is possible that a page gets full from the list of filesystems, and
> > last byte on page is terminating null. In that case just zeroing page
> > will not help. We can keep track of some sort of end pointer and make
> > sure we are not searching beyond that for valid filesystem types.
> > 
> > end = page + PAGE_SIZE - 1;
> > 
> > mount_block_root()
> > {
> > 	for (p = fs_names; p < end && *p; p += strlen(p)+1) {
> > 	}
> > }
> 
> Maybe.  To honest I'd prefer to not even touch this unrelated code given
> how full of landmines it is :)

Agreed. It probably is better to make such changes incrementally. 

Given third patch is nice to have cleanup kind of thing, can we first
just merge first two patches to support non-block device filesystems as
rootfs.

We will really like to have a method to properly boot virtiofs as rootfs.

Thanks
Vivek


  reply	other threads:[~2021-06-30 17:34 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-21  6:26 support booting of arbitrary non-blockdevice file systems v2 Christoph Hellwig
2021-06-21  6:26 ` [Virtio-fs] " Christoph Hellwig
2021-06-21  6:26 ` [PATCH 1/2] init: split get_fs_names Christoph Hellwig
2021-06-21  6:26   ` [Virtio-fs] " Christoph Hellwig
2021-06-21 14:46   ` Al Viro
2021-06-21 14:46     ` [Virtio-fs] " Al Viro
2021-06-21 14:51     ` Al Viro
2021-06-21 14:51       ` [Virtio-fs] " Al Viro
2021-06-21 14:53     ` Christoph Hellwig
2021-06-21 14:53       ` [Virtio-fs] " Christoph Hellwig
2021-06-21 14:59       ` Al Viro
2021-06-21 14:59         ` [Virtio-fs] " Al Viro
2021-06-21 15:09   ` Matthew Wilcox
2021-06-21 15:09     ` [Virtio-fs] " Matthew Wilcox
2021-06-21 15:22     ` Christoph Hellwig
2021-06-21 15:22       ` [Virtio-fs] " Christoph Hellwig
2021-06-21  6:26 ` [PATCH 2/2] init: allow mounting arbitrary non-blockdevice filesystems as root Christoph Hellwig
2021-06-21  6:26   ` [Virtio-fs] " Christoph Hellwig
2021-06-21 13:31 ` [Virtio-fs] support booting of arbitrary non-blockdevice file systems v2 Stefan Hajnoczi
2021-06-21 13:31   ` Stefan Hajnoczi
2021-06-21 14:35 ` Vivek Goyal
2021-06-21 14:35   ` [Virtio-fs] " Vivek Goyal
2021-06-22  8:12 ` [PATCH 3/2] fs: simplify get_filesystem_list / get_all_fs_names Christoph Hellwig
2021-06-22  8:12   ` [Virtio-fs] " Christoph Hellwig
2021-06-22  8:36   ` Stefan Hajnoczi
2021-06-22  8:36     ` Stefan Hajnoczi
2021-06-29 20:50     ` Vivek Goyal
2021-06-29 20:50       ` Vivek Goyal
2021-06-30  5:36       ` Christoph Hellwig
2021-06-30  5:36         ` Christoph Hellwig
2021-06-30 17:33         ` Vivek Goyal [this message]
2021-06-30 17:33           ` Vivek Goyal
2021-07-07 21:04         ` Vivek Goyal
2021-07-07 21:04           ` Vivek Goyal
2021-07-07 21:06           ` Vivek Goyal
2021-07-07 21:06             ` Vivek Goyal
2021-07-08 12:59             ` Vivek Goyal
2021-07-08 12:59               ` Vivek Goyal
2021-07-12 18:21               ` Vivek Goyal
2021-07-12 18:21                 ` Vivek Goyal
2021-07-13  5:40                 ` Christoph Hellwig
2021-07-13  5:40                   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210630173358.GD75386@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefanha@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=virtio-fs@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.