From 03fb8dc70d73c8a40ec45db314745b3c5976d174 Mon Sep 17 00:00:00 2001 From: adilger Date: Fri, 22 Apr 2005 17:46:54 +0000 Subject: [PATCH] Branch: b1_4 Quiet noisy llog/filter_setattr messages caused by quota llog replay. --- lustre/obdclass/llog.c | 2 +- lustre/obdclass/llog_lvfs.c | 3 ++- lustre/obdclass/obd_config.c | 2 +- lustre/obdfilter/filter.c | 31 +++++++++++++------------------ 4 files changed, 17 insertions(+), 21 deletions(-) diff --git a/lustre/obdclass/llog.c b/lustre/obdclass/llog.c index f39d614..09a295b 100644 --- a/lustre/obdclass/llog.c +++ b/lustre/obdclass/llog.c @@ -93,7 +93,7 @@ int llog_cancel_rec(struct llog_handle *loghandle, int index) } if (!ext2_clear_bit(index, llh->llh_bitmap)) { - CERROR("catalog index %u already clear?\n", index); + CDEBUG(D_HA, "catalog index %u already clear?\n", index); RETURN(-EINVAL); } diff --git a/lustre/obdclass/llog_lvfs.c b/lustre/obdclass/llog_lvfs.c index 6c45e8d..6e82aaa 100644 --- a/lustre/obdclass/llog_lvfs.c +++ b/lustre/obdclass/llog_lvfs.c @@ -390,7 +390,8 @@ static int llog_lvfs_next_block(struct llog_handle *loghandle, int *cur_idx, } rec = buf; - tail = (struct llog_rec_tail *)((char *)buf + rc - sizeof(struct llog_rec_tail)); + tail = (struct llog_rec_tail *)((char *)buf + rc - + sizeof(struct llog_rec_tail)); if (LLOG_REC_HDR_NEEDS_SWABBING(rec)) { lustre_swab_llog_rec(rec, tail); diff --git a/lustre/obdclass/obd_config.c b/lustre/obdclass/obd_config.c index 060e675..bc07593 100644 --- a/lustre/obdclass/obd_config.c +++ b/lustre/obdclass/obd_config.c @@ -567,7 +567,7 @@ int class_process_config(struct lustre_cfg *lcfg) case LCFG_SET_TIMEOUT: { CDEBUG(D_IOCTL, "changing lustre timeout from %d to %d\n", obd_timeout, lcfg->lcfg_num); - obd_timeout = lcfg->lcfg_num; + obd_timeout = max(lcfg->lcfg_num, 1U); GOTO(out, err = 0); } case LCFG_SET_UPCALL: { diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 4785a27..7dc3d8f 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -1396,7 +1396,7 @@ static int filter_cleanup(struct obd_device *obd) filter_post(obd); shrink_dcache_parent(filter->fo_sb->s_root); - + DQUOT_OFF(filter->fo_sb); if (atomic_read(&filter->fo_vfsmnt->mnt_count) > 1) @@ -1468,6 +1468,7 @@ static int filter_connect(struct lustre_handle *conn, struct obd_device *obd, fed->fed_fcd = fcd; rc = filter_client_add(obd, filter, fed, -1); + GOTO(cleanup, rc); cleanup: if (rc) { @@ -1479,7 +1480,7 @@ cleanup: } else { class_export_put(exp); } - + RETURN(rc); } @@ -1658,7 +1659,7 @@ struct dentry *__filter_oa2dentry(struct obd_device *obd, RETURN(dchild); } - if (dchild->d_inode == NULL) { + if (dchild->d_inode == NULL && strcmp(what, "filter_setattr")) { CERROR("%s: %s on non-existent object: "LPU64"\n", obd->obd_name, what, oa->o_id); f_dput(dchild); @@ -1747,24 +1748,18 @@ static int filter_setattr(struct obd_export *exp, struct obdo *oa, if (IS_ERR(handle)) GOTO(out_unlock, rc = PTR_ERR(handle)); - /* XXX this could be a rwsem instead, if filter_preprw played along */ - if (iattr.ia_valid & ATTR_ATTR_FLAG) + if (iattr.ia_valid & ATTR_ATTR_FLAG) { rc = fsfilt_iocontrol(exp->exp_obd, dentry->d_inode, NULL, EXT3_IOC_SETFLAGS, (long)&iattr.ia_attr_flags); - else { + } else { rc = fsfilt_setattr(exp->exp_obd, dentry, handle, &iattr, 1); - /* set cancel cookie callback function */ - if (fcc != NULL) { - if (oti != NULL) - fsfilt_add_journal_cb(obd, 0, oti->oti_handle, - filter_cancel_cookies_cb, - fcc); - else - fsfilt_add_journal_cb(obd, 0, handle, - filter_cancel_cookies_cb, - fcc); - } + if (fcc != NULL) + /* set cancel cookie callback function */ + fsfilt_add_journal_cb(obd, 0, oti ? + handle : oti->oti_handle, + filter_cancel_cookies_cb, + fcc); } rc = filter_finish_transno(exp, oti, rc); @@ -2501,7 +2496,7 @@ int filter_iocontrol(unsigned int cmd, struct obd_export *exp, struct super_block *sb = obd->u.filter.fo_sb; struct inode *inode = sb->s_root->d_inode; BDEVNAME_DECLARE_STORAGE(tmp); - CERROR("setting device %s read-only\n", + CERROR("*** setting device %s read-only ***\n", ll_bdevname(sb, tmp)); handle = fsfilt_start(obd, inode, FSFILT_OP_MKNOD, NULL); -- 1.8.3.1