From: David Howells <dhowells@redhat.com>
To: NeilBrown <neil@brown.name>
Cc: dhowells@redhat.com, Marc Dionne <marc.dionne@auristor.com>,
linux-afs@lists.infradead.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/2] afs: use d_time instead of d_fsdata
Date: Thu, 02 Jul 2026 10:09:30 +0100 [thread overview]
Message-ID: <140096.1782983370@warthog.procyon.org.uk> (raw)
In-Reply-To: <20260702020350.3403907-2-neilb@ownmail.net>
NeilBrown <neilb@ownmail.net> wrote:
> afs uses ->d_fsdata to store version information for the parent
> directory. ->d_time is arguably a better field to store this
> information as the version is like a time stamp, and ->d_time is an
> unsigned long, while ->d_fsdata is a void *.
Might it be better to rename ->d_time to ->d_version, since that would seem to
be more in line with how it's used?
> Interestingly the value stored in ->d_time or d_fsdata is u64 which does
> not fit in "unsigned long" or "void *" on 32 bit hosts. Maybe that
> doesn't matter.
Hmmm... It looks like NFS may have a bug here:
static int nfs_dentry_verify_change(struct inode *dir, struct dentry *dentry)
{
if (nfs_server_capable(dir, NFS_CAP_CASE_INSENSITIVE) &&
d_really_is_negative(dentry))
return dentry->d_time == inode_peek_iversion_raw(dir);
return nfs_verify_change_attribute(dir, dentry->d_time);
}
dentry->d_time may be 32-bits, but inode_peek_iversion_raw() is always 64 bits
and i_version is set to the 64-bit fattr->change_attr.
David
next prev parent reply other threads:[~2026-07-02 9:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 1:58 [PATCH 0/2] afs: avoid unhash/rehash NeilBrown
2026-07-02 1:58 ` [PATCH 1/2] afs: use d_time instead of d_fsdata NeilBrown
2026-07-02 8:54 ` David Howells
2026-07-02 10:12 ` NeilBrown
2026-07-02 9:09 ` David Howells [this message]
2026-07-02 10:27 ` NeilBrown
2026-07-02 10:53 ` David Howells
2026-07-02 1:58 ` [PATCH 2/2] afs: don't unhash/rehash dentries during unlink/rename NeilBrown
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=140096.1782983370@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=linux-afs@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=marc.dionne@auristor.com \
--cc=neil@brown.name \
/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