From b54023a293c1342e5f9d1c19d93b8fb87e09cfe0 Mon Sep 17 00:00:00 2001 From: jacob Date: Fri, 5 Mar 2004 19:02:55 +0000 Subject: [PATCH] Merge b1_2 changes to b_bgl again in preparation for landing b_bgl somewhere before landing 0conf swab fixes on b_bgl --- lustre/liblustre/dir.c | 2 +- lustre/liblustre/tests/test_common.c | 12 ++++++++++++ lustre/liblustre/tests/test_common.h | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lustre/liblustre/dir.c b/lustre/liblustre/dir.c index cceb1e0..c236d73 100644 --- a/lustre/liblustre/dir.c +++ b/lustre/liblustre/dir.c @@ -75,7 +75,7 @@ static int llu_dir_do_readpage(struct inode *inode, struct page *page) } rc = ldlm_lock_match(obddev->obd_namespace, LDLM_FL_BLOCK_GRANTED, - &res_id, LDLM_PLAIN, NULL, 0, LCK_PR, &lockh); + &res_id, LDLM_PLAIN, NULL, LCK_PR, &lockh); if (!rc) { llu_prepare_mdc_op_data(&data, inode, NULL, NULL, 0, 0); diff --git a/lustre/liblustre/tests/test_common.c b/lustre/liblustre/tests/test_common.c index 6f6676e..a87f0fa 100644 --- a/lustre/liblustre/tests/test_common.c +++ b/lustre/liblustre/tests/test_common.c @@ -181,6 +181,18 @@ int t_open(const char *path) return fd; } +int t_opendir(const char *path) +{ + int fd; + + fd = open(path, O_RDONLY); + if (fd < 0) { + printf("opendir(%s) error: %s\n", path, strerror(errno)); + EXIT_RET(fd); + } + return fd; +} + void t_close(int fd) { int rc; diff --git a/lustre/liblustre/tests/test_common.h b/lustre/liblustre/tests/test_common.h index 9d537cc..c3687b9 100644 --- a/lustre/liblustre/tests/test_common.h +++ b/lustre/liblustre/tests/test_common.h @@ -21,6 +21,7 @@ void t_chmod(const char *path, const char *format, ...); void t_rename(const char *oldpath, const char *newpath); int t_open_readonly(const char *path); int t_open(const char *path); +int t_opendir(const char *path); void t_close(int fd); int t_check_stat(const char *name, struct stat *buf); int t_check_stat_fail(const char *name); -- 1.8.3.1