	These are selected bits out of the 
		lfs-patches-v0.21-base-2.3.27-pre1.diff.A
	file

	This file contains  readdir64()  things

diff -ur linux-23027p1/fs/readdir.c linux-23027p1m1/fs/readdir.c
--- linux-23027p1/fs/readdir.c	Mon Aug 23 21:15:53 1999
+++ linux-23027p1m1/fs/readdir.c	Mon Nov  8 22:58:51 1999
@@ -196,3 +196,105 @@
 	unlock_kernel();
 	return error;
 }
+
+/*
+ * New, even-more-improved getdents64() (for LFS) interface. 
+ */
+struct linux_dirent64 {
+	__u64		d_ino;		/* 64 bits *should* be enough */
+	__u32		d_off;		/* position within directory */
+	__u32		d_flags;	/* what is stored in  d_data[] */
+	__u32		d_data[8];	/* for future extensions */
+	__u16		d_reclen;
+	char		d_name[1];	/* We must not include limits.h! */
+};
+
+struct getdents_callback64 {
+	struct linux_dirent64 * current_dir;
+	struct linux_dirent64 * previous;
+	int count;
+	int error;
+	int ctrlflags;
+};
+
+static long filldir64(void * __buf, const char * name, int namlen, off_t offset, ino_t ino)
+{
+	struct linux_dirent64 * dirent;
+	struct getdents_callback64 * buf = (struct getdents_callback64 *) __buf;
+	int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1);
+	__u64 ino64;
+
+	buf->error = -EINVAL;	/* only used if we fail.. */
+	if (reclen > buf->count)
+		return -EINVAL;
+	dirent = buf->previous;
+	if (dirent)
+		put_user(offset, &dirent->d_off);
+	dirent = buf->current_dir;
+	buf->previous = dirent;
+	ino64 = ino;
+	copy_to_user(&dirent->d_reclen, &ino64, sizeof(ino64));
+	copy_to_user(dirent->d_name, name, namlen);
+	put_user(0, dirent->d_name + namlen);
+	((char *) dirent) += reclen;
+	buf->current_dir = dirent;
+	buf->count -= reclen;
+	return 0;
+}
+
+asmlinkage long sys_getdents64(unsigned int fd, void * dirent, unsigned int count, long flags)
+{
+	struct file * file;
+	struct dentry * dentry;
+	struct inode * inode;
+	struct linux_dirent64 * lastdirent;
+	struct getdents_callback64 buf;
+	int error;
+
+	if (flags) return -EINVAL; /* until flags defined.. */
+
+	lock_kernel();
+	error = -EBADF;
+	file = fget(fd);
+	if (!file)
+		goto out;
+
+	dentry = file->f_dentry;
+	if (!dentry)
+		goto out_putf;
+
+	inode = dentry->d_inode;
+	if (!inode)
+		goto out_putf;
+
+	buf.current_dir = (struct linux_dirent64 *) dirent;
+	buf.previous = NULL;
+	buf.count = count;
+	buf.error = 0;
+
+	error = -ENOTDIR;
+	if (!file->f_op || !file->f_op->readdir)
+		goto out_putf;
+
+	/*
+	 * Get the inode's semaphore to prevent changes
+	 * to the directory while we read it.
+	 */
+	down(&inode->i_sem);
+	error = file->f_op->readdir(file, &buf, filldir64);
+	up(&inode->i_sem);
+	if (error < 0)
+		goto out_putf;
+	error = buf.error;
+	lastdirent = buf.previous;
+	if (lastdirent) {
+		put_user(file->f_pos, &lastdirent->d_off);
+		error = count - buf.count;
+	}
+
+out_putf:
+	fput(file);
+out:
+	unlock_kernel();
+	return error;
+}
diff -ur linux-23027p1/include/linux/dirent.h linux-23027p1m1/include/linux/dirent.h
--- linux-23027p1/include/linux/dirent.h	Wed Jul 10 07:38:08 1996
+++ linux-23027p1m1/include/linux/dirent.h	Mon Nov  8 22:58:52 1999
@@ -8,4 +8,13 @@
 	char		d_name[256]; /* We must not include limits.h! */
 };
 
+struct dirent64 {
+	__u64		d_ino;		/* 64 bits *should* be enough */
+	__u32		d_off;		/* position within directory */
+	__u32		d_flags;	/* what is stored in  d_data[] */
+	__u32		d_data[8];	/* for future extensions */
+	__u16		d_reclen;
+	char		d_name[256];	/* We must not include limits.h! */
+};
+
 #endif
