Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1374138lqe; Mon, 8 Apr 2024 07:16:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW1Qbh5fb+z/MGFqvcZdo0B6b6Xir0oQeVMn+4k7nsKRrfBg1RccMVCpGDdrORlnDVMpTHsoD+hTVVNpPQmqjVKjQUh0w2EQC/fQF+9oA== X-Google-Smtp-Source: AGHT+IFbY7eeEpyUPD4VN4m0o9nnTynP3ZrNPdZi9rw7TTgW6fbz4qAcLbEtVg9SpsgQ+6HrmLzI X-Received: by 2002:a05:6a20:7fa1:b0:1a3:6fbb:e31f with SMTP id d33-20020a056a207fa100b001a36fbbe31fmr11419717pzj.4.1712585794485; Mon, 08 Apr 2024 07:16:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712585794; cv=pass; d=google.com; s=arc-20160816; b=x/MjVc3ZR4i7P6Hj0Dw++Zp0Wsm04EC654dVh2aTyti0+YFpQ/CchJmjdWB2HacfQk 6/wOC2yNJ/I/fyApqDbN8q9+LeS8Sg/HgSZoDsXOxv+ASxb1soBNLJFtkKS/LxNlVhJM agaH7eYyyC8KbvdHL9bgVEv0XWOnNQEtYzXdvRGS3exkC/+tbWV+tnp9Phe/fxT/qA/a i1iSAqSht/SqwwzZ3Ya8xGVy4LETRu5/C0CvS6lk6+dr6BvXtLAMwhaZrYFVUcTekqob uFhsCj1kun9eX17UaNGeC7s/WruAPYWt/stX8QmIwuPQ6xHjRlr9I7KH4CwHqArSpHUr Va1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=KxQpQ0JV3Kh0ccjtCEfCfei5HklU4KnXtidfDbxOXYE=; fh=XWkvrT7A11QP9QDANv0Jpb+ddrTOYBmxNKua1ipBeng=; b=Y3RN3lFW+nPjaBDUGtwvG6pKU/CeabDdGCa/MZ1fqNukK/juMQQzYYZy7OvcclIuw9 YHv0M/ZqXc5UgNMJScGqGI9sCsUWYdbGK+USD3I4xXAXppvn+yMgsF2qq4x0DX8jobP2 QmbqTdQ1OVDe3fN3qWu8kKhi+HP9h4WzwrtOpzdg2FzA5M57XmQsc2ccVChKfuOkJ9xR YbzKmN123UakGHYUpcnUv/B3p0gbt5DPO02VDsIsRolfkgGfNy/WwivjI3LIFGg29zWx QfHHGUM2e8I2ZkMMeu1305I4jywgSAjOUA2DWUEFLvDkV+Q9fspkb4O7Fyx2JMLkcLg2 w/WQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DW29XpT3; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-135493-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135493-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b4-20020a056a000cc400b006e7213b671csi6514599pfv.262.2024.04.08.07.16.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 07:16:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-135493-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DW29XpT3; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-135493-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135493-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id F40C42813AB for ; Mon, 8 Apr 2024 14:16:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4745585C5D; Mon, 8 Apr 2024 14:16:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DW29XpT3" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C34CF8173C for ; Mon, 8 Apr 2024 14:16:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712585777; cv=none; b=Nx73nfDXmtNGpdk9jy5iCXTNYkoZSMhR7fQsKcfyP6sVU6b6P1oOhHeaQxXXtknVyUUnxStgbfZvg/AY55Bs84nANSL3cgCEdg4lOnxspOum1vAfWELnK40TCoLG0DoeebWspY6aoRin6eN+6qn+1VUO8lxSaxiRXoNFBOQxUBc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712585777; c=relaxed/simple; bh=yE9IqkLYteQKNkzA2HhdoHss7PriQykcItE9+d3aVvM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oJqwkw+puekGZN6bM7fL5qc/G9vLPXwG6Hl4O7mqNI7kX9ArMkrjzyE/ro0mlqZySZALPbgXHm44qZAoMfPRA03ELx0BdWLar7be8zM3s25woD3xxQcMiQKVbzJ4Ur20HBZy/NpEEwLKeqCMFuIptEC9GvazzmK4Gfce8f1HXCI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=DW29XpT3; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712585774; 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=KxQpQ0JV3Kh0ccjtCEfCfei5HklU4KnXtidfDbxOXYE=; b=DW29XpT3kjyY/BuGFDCfRb2w999LH71dpQRwxmzbyr1OlWqgPrt6NKYs6jVN3leWyFaR5W n9dtcU6FTXJLxspe9G0Ex8RrihiCscQ8mBAQxV62rz6lOF+1QZINgN5fVIBKMfU12gDEbS 2BKqndhWHGxsxMOqMByU98f/co3rjN4= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-626-pGle7iBYM76sGtRzn5ldzw-1; Mon, 08 Apr 2024 10:16:09 -0400 X-MC-Unique: pGle7iBYM76sGtRzn5ldzw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 06E703810D53; Mon, 8 Apr 2024 14:16:08 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.226.180]) by smtp.corp.redhat.com (Postfix) with SMTP id D1F3C17ABB; Mon, 8 Apr 2024 14:16:06 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Mon, 8 Apr 2024 16:14:42 +0200 (CEST) Date: Mon, 8 Apr 2024 16:14:36 +0200 From: Oleg Nesterov To: Eric Van Hensbergen 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 Message-ID: <20240408141436.GA17022@redhat.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 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 > > ---------------------------------------------------------------- > 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(-)