James, I took a look at v3.11 upstream kernel, it already requires iterate replacing readdir in struct file_operations, by kernel commit 2233f31aade393641f0eaed43a71110e629bb900
commit 2233f31aade393641f0eaed43a71110e629bb900
Author: Al Viro <viro@zeniv.linux.org.uk>
Date: Wed May 22 21:44:23 2013 -0400
[readdir] ->readdir() is gone
everything's converted to ->iterate()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 0706d32..bdd82b2 100644
— a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -414,7 +414,7 @@ prototypes:
ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
- int (*readdir) (struct file *, void *, filldir_t);
+ int (*iterate) (struct file *, struct dir_context *);
unsigned int (*poll) (struct file *, struct poll_table_struct *);
long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
long (*compat_ioctl) (struct file *, unsigned int, unsigned long);
<snip>
[mpfssvr@linux-lustre]$git tag --contains 2233f31aade393641f0eaed43a71110e629bb900
v3.11
v3.11-rc1
v3.11-rc2
v3.11-rc3
v3.11-rc4
v3.11-rc5
v3.11-rc6
v3.11-rc7
v3.12-rc1
v3.12-rc2
So I think we need a similar patch like https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=0b09d381bb2b4ccab15711cf98858a7146b24749 rather than just coping with struct dir_context. In fact, struct dir_context is introduced in the same kernel commit as .iterate. So whenever dir_context is there, .iterate exists. Please check your local tree to see if it somehow missed the commit.
All patches have landed. This ticket can be closed.