Whamcloud - gitweb
Fix lock-match fallout from 1228: use the inode against which the intent lock
authorshaver <shaver>
Fri, 27 Jun 2003 17:25:31 +0000 (17:25 +0000)
committershaver <shaver>
Fri, 27 Jun 2003 17:25:31 +0000 (17:25 +0000)
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 [new file with mode: 0644]

diff --git a/lustre/tests/getdents.c b/lustre/tests/getdents.c
new file mode 100644 (file)
index 0000000..b4155a9
--- /dev/null
@@ -0,0 +1,31 @@
+#include <stdio.h>
+#include <sys/types.h>
+#include <dirent.h>
+#include <errno.h>
+
+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;
+}
+