linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Christian Brauner <christian@brauner.io>,
	Steve French <smfrench@gmail.com>,
	Matthew Wilcox <willy@infradead.org>
Cc: David Howells <dhowells@redhat.com>,
	Jeff Layton <jlayton@kernel.org>,
	Gao Xiang <hsiangkao@linux.alibaba.com>,
	Dominique Martinet <asmadeus@codewreck.org>,
	Marc Dionne <marc.dionne@auristor.com>,
	Paulo Alcantara <pc@manguebit.com>,
	Shyam Prasad N <sprasad@microsoft.com>,
	Tom Talpey <tom@talpey.com>,
	Eric Van Hensbergen <ericvh@kernel.org>,
	Ilya Dryomov <idryomov@gmail.com>,
	netfs@lists.linux.dev, linux-afs@lists.infradead.org,
	linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org,
	ceph-devel@vger.kernel.org, v9fs@lists.linux.dev,
	linux-erofs@lists.ozlabs.org, linux-fsdevel@vger.kernel.org,
	linux-mm@kvack.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 14/27] afs: Fix directory format encoding struct
Date: Thu, 24 Oct 2024 15:05:12 +0100	[thread overview]
Message-ID: <20241024140539.3828093-15-dhowells@redhat.com> (raw)
In-Reply-To: <20241024140539.3828093-1-dhowells@redhat.com>

The AFS directory format structure, union afs_xdr_dir_block::meta, has too
many alloc counter slots declared and so pushes the hash table along and
over the data.  This doesn't cause a problem at the moment because I'm
currently ignoring the hash table and only using the correct number of
alloc_ctrs in the code anyway.  In future, however, I should start using
the hash table to try and speed up afs_lookup().

Fix this by using the correct constant to declare the counter array.

Fixes: 4ea219a839bf ("afs: Split the directory content defs into a header")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
---
 fs/afs/xdr_fs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/afs/xdr_fs.h b/fs/afs/xdr_fs.h
index 8ca868164507..cc5f143d21a3 100644
--- a/fs/afs/xdr_fs.h
+++ b/fs/afs/xdr_fs.h
@@ -88,7 +88,7 @@ union afs_xdr_dir_block {
 
 	struct {
 		struct afs_xdr_dir_hdr	hdr;
-		u8			alloc_ctrs[AFS_DIR_MAX_BLOCKS];
+		u8			alloc_ctrs[AFS_DIR_BLOCKS_WITH_CTR];
 		__be16			hashtable[AFS_DIR_HASHTBL_SIZE];
 	} meta;
 



  parent reply	other threads:[~2024-10-24 14:07 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-24 14:04 [PATCH 00/27] netfs: Read performance improvements and "single-blob" support David Howells
2024-10-24 14:04 ` [PATCH 01/27] netfs: Remove call to folio_index() David Howells
2024-10-24 14:05 ` [PATCH 02/27] netfs: Fix a few minor bugs in netfs_page_mkwrite() David Howells
2024-10-24 14:05 ` [PATCH 03/27] netfs: Remove unnecessary references to pages David Howells
2024-10-24 14:05 ` [PATCH 04/27] netfs: Use a folio_queue allocation and free functions David Howells
2024-10-24 14:05 ` [PATCH 05/27] netfs: Add a tracepoint to log the lifespan of folio_queue structs David Howells
2024-10-24 14:05 ` [PATCH 06/27] netfs: Abstract out a rolling folio buffer implementation David Howells
2024-10-24 14:05 ` [PATCH 07/27] netfs: Make netfs_advance_write() return size_t David Howells
2024-10-24 14:05 ` [PATCH 08/27] netfs: Split retry code out of fs/netfs/write_collect.c David Howells
2024-10-24 14:05 ` [PATCH 09/27] netfs: Drop the error arg from netfs_read_subreq_terminated() David Howells
2024-10-24 14:05 ` [PATCH 10/27] netfs: Drop the was_async " David Howells
2024-10-24 14:05 ` [PATCH 11/27] netfs: Don't use bh spinlock David Howells
2024-10-24 14:05 ` [PATCH 12/27] afs: Don't use mutex for I/O operation lock David Howells
2024-10-24 14:05 ` [PATCH 13/27] afs: Fix EEXIST error returned from afs_rmdir() to be ENOTEMPTY David Howells
2024-10-24 14:05 ` David Howells [this message]
2024-10-24 14:05 ` [PATCH 15/27] netfs: Remove some extraneous directory invalidations David Howells
2024-10-24 14:05 ` [PATCH 16/27] cachefiles: Add some subrequest tracepoints David Howells
2024-10-24 14:05 ` [PATCH 17/27] cachefiles: Add auxiliary data trace David Howells
2024-10-24 14:05 ` [PATCH 18/27] afs: Add more tracepoints to do with tracking validity David Howells
2024-10-24 14:05 ` [PATCH 19/27] netfs: Add functions to build/clean a buffer in a folio_queue David Howells
2024-10-24 14:05 ` [PATCH 20/27] netfs: Add support for caching single monolithic objects such as AFS dirs David Howells
2024-10-24 14:05 ` [PATCH 21/27] afs: Make afs_init_request() get a key if not given a file David Howells
2024-10-24 14:05 ` [PATCH 22/27] afs: Use netfslib for directories David Howells
2024-10-24 14:05 ` [PATCH 23/27] afs: Use netfslib for symlinks, allowing them to be cached David Howells
2024-10-24 14:05 ` [PATCH 24/27] afs: Eliminate afs_read David Howells
2024-10-24 14:05 ` [PATCH 25/27] afs: Make {Y,}FS.FetchData an asynchronous operation David Howells
2024-10-24 14:05 ` [PATCH 26/27] netfs: Change the read result collector to only use one work item David Howells
2024-10-24 14:05 ` [PATCH 27/27] afs: Make afs_mkdir() locally initialise a new directory's content 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=20241024140539.3828093-15-dhowells@redhat.com \
    --to=dhowells@redhat.com \
    --cc=asmadeus@codewreck.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=christian@brauner.io \
    --cc=ericvh@kernel.org \
    --cc=hsiangkao@linux.alibaba.com \
    --cc=idryomov@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=marc.dionne@auristor.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfs@lists.linux.dev \
    --cc=pc@manguebit.com \
    --cc=smfrench@gmail.com \
    --cc=sprasad@microsoft.com \
    --cc=tom@talpey.com \
    --cc=v9fs@lists.linux.dev \
    --cc=willy@infradead.org \
    /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