From 6d82ac272e0ef33942702278ab94a207655ee214 Mon Sep 17 00:00:00 2001 From: shaver Date: Fri, 27 Jun 2003 17:25:31 +0000 Subject: [PATCH] Fix lock-match fallout from 1228: use the inode against which the intent lock was granted, often not the one against which the lock was requested, when matching l_data. Also, match locks in ll_dir_readpage. Remove some deadwood fops-functions. --- lustre/tests/getdents.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 lustre/tests/getdents.c diff --git a/lustre/tests/getdents.c b/lustre/tests/getdents.c new file mode 100644 index 0000000..b4155a9 --- /dev/null +++ b/lustre/tests/getdents.c @@ -0,0 +1,31 @@ +#include +#include +#include +#include + +int main(int argc, char **argv) +{ + DIR *dir; + struct dirent64 *entry; + + if (argc < 2) { + fprintf(stderr, "Usage: %s dirname\n", argv[0]); + return 1; + } + + dir = opendir(argv[1]); + if (!dir) { + int rc = errno; + perror("opendir"); + return rc; + } + + while ((entry = readdir64(dir))) { + puts(entry->d_name); + } + + closedir(dir); + + return 0; +} + -- 1.8.3.1