From 2e4a75ce419c2e954cda881bc4dc8466ff651c0a Mon Sep 17 00:00:00 2001 From: pschwan <pschwan> Date: Mon, 17 Jun 2002 23:51:51 +0000 Subject: [PATCH] - Add more DLM threads - Fix unlink() of nonexistant file --- lustre/ldlm/ldlm_lockd.c | 20 ++++++++++++++++++++ lustre/mds/mds_reint.c | 6 +++--- lustre/tests/mcreate.c | 2 +- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index d5e2dfe7be..a149d3f941 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -388,6 +388,26 @@ static int ldlm_setup(struct obd_device *obddev, obd_count len, void *buf) CERROR("cannot start thread\n"); LBUG(); } + err = ptlrpc_start_thread(obddev, ldlm->ldlm_service, "lustre_dlm"); + if (err) { + CERROR("cannot start thread\n"); + LBUG(); + } + err = ptlrpc_start_thread(obddev, ldlm->ldlm_service, "lustre_dlm"); + if (err) { + CERROR("cannot start thread\n"); + LBUG(); + } + err = ptlrpc_start_thread(obddev, ldlm->ldlm_service, "lustre_dlm"); + if (err) { + CERROR("cannot start thread\n"); + LBUG(); + } + err = ptlrpc_start_thread(obddev, ldlm->ldlm_service, "lustre_dlm"); + if (err) { + CERROR("cannot start thread\n"); + LBUG(); + } MOD_INC_USE_COUNT; RETURN(0); diff --git a/lustre/mds/mds_reint.c b/lustre/mds/mds_reint.c index 666dacd920..3480ffb0c4 100644 --- a/lustre/mds/mds_reint.c +++ b/lustre/mds/mds_reint.c @@ -430,8 +430,7 @@ static int mds_reint_unlink(struct mds_update_record *rec, int offset, if (!inode) { CERROR("child doesn't exist (dir %ld, name %s\n", dir->i_ino, rec->ur_name); - LBUG(); - GOTO(out_unlink_dchild, rc = -ESTALE); + GOTO(out_unlink_dchild, rc = -ENOENT); } #if 0 /* in intent case the client doesn't have the inode */ @@ -485,7 +484,8 @@ static int mds_reint_unlink(struct mds_update_record *rec, int offset, EXIT; out_unlink_dchild: - res_id[0] = inode->i_ino; + if (!rc) + res_id[0] = inode->i_ino; l_dput(dchild); out_unlink_de: up(&dir->i_sem); diff --git a/lustre/tests/mcreate.c b/lustre/tests/mcreate.c index 0d8cd36252..bc18aa73ab 100644 --- a/lustre/tests/mcreate.c +++ b/lustre/tests/mcreate.c @@ -17,7 +17,7 @@ int main(int argc, char ** argv) rc = mknod(argv[1], S_IFREG| 0444, 0); if (rc) { - printf("error: %s\n", strerror(errno)); + printf("mknod(%s) error: %s\n", argv[1], strerror(errno)); } return rc; } -- GitLab