From 8f5d77cc434697d0292d85f6cde32095def12b5e Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 23 Jun 2004 06:45:30 +0000 Subject: [PATCH] - forgotten bits of cross-node mkdir() with requested stripes - additional CERROR's --- lustre/lvfs/fsfilt_ext3.c | 7 ++++++- lustre/mds/handler.c | 4 ++++ lustre/mds/mds_lmv.c | 17 ++++++++++++++--- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/lustre/lvfs/fsfilt_ext3.c b/lustre/lvfs/fsfilt_ext3.c index 1c44847..35ab5ef 100644 --- a/lustre/lvfs/fsfilt_ext3.c +++ b/lustre/lvfs/fsfilt_ext3.c @@ -1096,8 +1096,13 @@ static int fsfilt_ext3_add_dir_entry(struct obd_device *obd, struct dentry *dentry; int err; dentry = ll_lookup_one_len(name, parent, namelen); - if (IS_ERR(dentry)) + if (IS_ERR(dentry)) { + CERROR("can't lookup %*s in %lu/%lu: %d\n", dentry->d_name.len, + dentry->d_name.name, dentry->d_inode->i_ino, + (unsigned long) dentry->d_inode->i_generation, + (int) PTR_ERR(dentry)); RETURN(PTR_ERR(dentry)); + } if (dentry->d_inode != NULL) { CERROR("dentry %*s(0x%p) found\n", dentry->d_name.len, dentry->d_name.name, dentry); diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 8574592..44edcf9 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -250,6 +250,8 @@ struct dentry *mds_fid2locked_dentry(struct obd_device *obd, struct ll_fid *fid, de->d_inode->i_ino, de->d_inode->i_generation, res_id.name[2]); } +#else +#warning "No PDIROPS support in the kernel" #endif rc = ldlm_cli_enqueue(NULL, NULL, obd->obd_namespace, res_id, LDLM_IBITS, &policy, lock_mode, &flags, @@ -1448,6 +1450,8 @@ repeat: rc = fsfilt_set_md(obd, new->d_inode, handle, mea, mealen); up(&new->d_inode->i_sem); OBD_FREE(mea, mealen); + } else if (rc == 0 && body->oa.o_easize) { + mds_try_to_split_dir(obd, new, NULL, body->oa.o_easize); } cleanup: diff --git a/lustre/mds/mds_lmv.c b/lustre/mds/mds_lmv.c index b29da76..e5dc28f 100644 --- a/lustre/mds/mds_lmv.c +++ b/lustre/mds/mds_lmv.c @@ -674,9 +674,8 @@ int mds_preprw(int cmd, struct obd_export *exp, struct obdo *oa, fid.generation = obj->ioo_gr; dentry = mds_fid2dentry(mds, &fid, NULL); if (IS_ERR(dentry)) { - CERROR("can't get dentry for %lu/%lu: %d\n", - (unsigned long) fid.id, - (unsigned long) fid.generation, (int) PTR_ERR(dentry)); + CERROR("can't get dentry for "LPU64"/%u: %d\n", + fid.id, fid.generation, (int) PTR_ERR(dentry)); GOTO(cleanup, rc = (int) PTR_ERR(dentry)); } @@ -753,6 +752,18 @@ int mds_commitrw(int cmd, struct obd_export *exp, struct obdo *oa, err = fsfilt_add_dir_entry(obd, res->dentry, de->name, de->namelen, de->ino, de->generation, de->mds); + if (err) { + CERROR("can't add dir entry %*s->%u/%u/%u" + " to %lu/%u: %d\n", + de->namelen, de->name, + de->mds, (unsigned) de->ino, + (unsigned) de->generation, + res->dentry->d_inode->i_ino, + res->dentry->d_inode->i_generation, + err); + rc = err; + break; + } LASSERT(err == 0); de = (struct dir_entry *) ((char *) de + DIR_REC_LEN(de->namelen)); -- 1.8.3.1