Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Paulo Alcantara <pc@manguebit.com>
Cc: dhowells@redhat.com, Steve French <sfrench@samba.org>,
	Shyam Prasad N <sprasad@microsoft.com>,
	linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cifs: Fix reacquisition of volume cookie on still-live connection
Date: Wed, 17 Apr 2024 15:38:13 +0100	[thread overview]
Message-ID: <277920.1713364693@warthog.procyon.org.uk> (raw)
In-Reply-To: <1a94a15e6863d3844f0bcb58b7b1e17a@manguebit.com>

Paulo Alcantara <pc@manguebit.com> wrote:

> Consider the following example where a tcon is reused from different
> CIFS superblocks:
> 
>   mount.cifs //srv/share /mnt/1 -o ${opts} # new super, new tcon
>   mount.cifs //srv/share/dir /mnt/2 -o ${opts} # new super, reused tcon
> 
> So, /mnt/1/dir/foo and /mnt/2/foo will lead to different inodes.
> 
> The two mounts are accessing the same tcon (\\srv\share) but the new
> superblock was created because the prefix path "\dir" didn't match in
> cifs_match_super().  Trust me, that's a very common scenario.

Why does it need to lead to a different superblock, assuming ${opts} is the
same in both cases?  Can we not do as NFS does and share the superblock,
walking during the mount process through the directory prefix to the root
object?

In other words, why does:

    mount.cifs //srv/share /mnt/1 -o ${opts}
    mount.cifs //srv/share/dir /mnt/2 -o ${opts}

give you a different result to:

    mount.cifs //srv/share /mnt/1 -o ${opts}
    mount --bind /mnt/1/dir /mnt/2

David


  reply	other threads:[~2024-04-17 14:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-04 15:21 [PATCH] cifs: Fix reacquisition of volume cookie on still-live connection David Howells
2024-04-04 16:07 ` Paulo Alcantara
2024-04-16 16:58   ` David Howells
2024-04-17 14:09     ` Paulo Alcantara
2024-04-17 14:38       ` David Howells [this message]
2024-04-17 18:59         ` Tom Talpey
2024-04-18 13:32           ` David Howells
2024-04-17 21:25         ` Paulo Alcantara
2024-04-18 13:43           ` David Howells
2024-04-19 20:04             ` Paulo Alcantara
2024-04-17 13:41   ` David Howells

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=277920.1713364693@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pc@manguebit.com \
    --cc=sfrench@samba.org \
    --cc=sprasad@microsoft.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox