public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Eric Van Hensbergen <ericvh@kernel.org>
Cc: torvalds@linux-foundation.org, v9fs@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] fs/9p patches for 6.9 merge window
Date: Mon, 8 Apr 2024 16:14:36 +0200	[thread overview]
Message-ID: <20240408141436.GA17022@redhat.com> (raw)
In-Reply-To: <ZfRkyxUf8TIgsYjA@1149290c588b>

Hello,

the commit 724a08450f74 ("fs/9p: simplify iget to remove unnecessary paths")
from this PR breaks my setup.

On the host:

	$ cat /etc/fstab
	/dev/mapper/volgrp-root /                       ext4    defaults        1 1
	/dev/mapper/volgrp-home /home                   ext4    defaults        1 2

	$ qemu-system-x86_64 -kernel ./arch/x86/boot/bzImage \
		-append 'rw rootfstype=9p rootflags=version=9p2000.L,trans=virtio' \
		-fsdev local,id=FSID_1,path=/home/oleg/TEST_GUEST/,security_model=none \
		-device virtio-9p-pci,fsdev=FSID_1,mount_tag=/dev/root \
		-fsdev local,id=FSID_2,path=/,security_model=none,readonly \
		-device virtio-9p-pci,fsdev=FSID_2,mount_tag=hostfs \
		-nographic -serial mon:stdio

In the guest:

	# mount -t 9p hostfs /host -o version=9p2000.L,trans=virtio,access=any

Now, before this patch:

	/# cd /host
	/host# strace -e stat perl -e '-d "home"'
	...
	stat("home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
	+++ exited with 0 +++
	/host# cd home
	/host/home#

After this patch:

	# cd /host
	/host# strace -e stat perl -e '-d "home"'
	...
	stat("home", 0x1397298)                 = -1 ELOOP (Too many levels of symbolic links)
	+++ exited with 0 +++
	/host# cd home
	-bash: cd: home: Too many levels of symbolic links
	/host# dmesg
	...
	[   54.255756] VFS: Lookup of 'home' in 9p 9p would have caused loop
	[   72.190399] VFS: Lookup of 'home' in 9p 9p would have caused loop
	[   72.191535] VFS: Lookup of 'home' in 9p 9p would have caused loop
	[   72.192488] VFS: Lookup of 'home' in 9p 9p would have caused loop

Oleg.


On 03/15, Eric Van Hensbergen wrote:
>
> The following changes since commit 6613476e225e090cc9aad49be7fa504e290dd33d:
>
>   Linux 6.8-rc1 (2024-01-21 14:11:32 -0800)
>
> are available in the Git repository at:
>
>   git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs.git tags/9p-for-6.9
>
> for you to fetch changes up to be57855f505003c5cafff40338d5d0f23b00ba4d:
>
>   fs/9p: fix dups even in uncached mode (2024-01-26 16:46:56 +0000)
>
> ----------------------------------------------------------------
> fs/9p changes for the 6.9 merge window
>
> This pull request includes a number of patches
> addressing improvements in the cache portions of the 9p
> client.
>
> The biggest improvements have to do with fixing handling
> of inodes and eliminating duplicate structures and unnecessary
> allocation/release of inode structures and many associated
> unnecessary protocol traffic.  This also dramatically
> reduced code complexity across the code and sets us up to add
> proper temporal cache capabilities.
>
> Signed-off-by: Eric Van Hensbergen <ericvh@kernel.org>
>
> ----------------------------------------------------------------
> Eric Van Hensbergen (8):
>       fs/9p: switch vfsmount to use v9fs_get_new_inode
>       fs/9p: convert mkdir to use get_new_inode
>       fs/9p: remove walk and inode allocation from symlink
>       fs/9p: Eliminate redundant non-cache path in mknod
>       fs/9p: Eliminate now unused v9fs_get_inode
>       fs/9p: rework qid2ino logic
>       fs/9p: simplify iget to remove unnecessary paths
>       fs/9p: fix dups even in uncached mode
>
>  fs/9p/v9fs.h           |  31 +++++-----------------------
>  fs/9p/v9fs_vfs.h       |  11 ++++++----
>  fs/9p/vfs_dir.c        |   4 ++--
>  fs/9p/vfs_inode.c      | 150 +++++++++++++++++++--------------------------------------------------------------------------------------------------------------------
>  fs/9p/vfs_inode_dotl.c | 194 ++++++++++++++++++++++++++++++++-----------------------------------------------------------------------------------------------------------------------------------------------
>  fs/9p/vfs_super.c      |  45 +----------------------------------------
>  6 files changed, 71 insertions(+), 364 deletions(-)


  parent reply	other threads:[~2024-04-08 14:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15 15:10 [GIT PULL] fs/9p patches for 6.9 merge window Eric Van Hensbergen
2024-03-15 17:17 ` Linus Torvalds
2024-03-15 17:20 ` pr-tracker-bot
2024-04-08 14:14 ` Oleg Nesterov [this message]
2024-04-10 17:20   ` Eric Van Hensbergen
2024-04-10 18:57     ` Eric Van Hensbergen
2024-04-11  9:29       ` Oleg Nesterov

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=20240408141436.GA17022@redhat.com \
    --to=oleg@redhat.com \
    --cc=ericvh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=v9fs@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox