From 710e1a34bada840db26198d8333d6477e536ef86 Mon Sep 17 00:00:00 2001 From: tappro Date: Tue, 23 Oct 2007 21:20:15 +0000 Subject: [PATCH] - lost #define changes from 1_6 b:13816 i:shadow,yury --- lustre/include/linux/lustre_compat25.h | 6 +----- lustre/include/linux/lustre_intent.h | 2 +- lustre/include/linux/lustre_mds.h | 2 +- lustre/include/linux/lustre_patchless_compat.h | 9 +++------ lustre/ldlm/ldlm_lib.c | 2 +- lustre/ldlm/ldlm_lockd.c | 4 ++-- lustre/ldlm/ldlm_request.c | 11 +++++++---- lustre/liblustre/tests/sanity.c | 4 ++-- lustre/llite/dcache.c | 25 ++++++++++++------------- lustre/llite/file.c | 4 ++-- lustre/llite/llite_internal.h | 10 ++++++---- lustre/llite/llite_lib.c | 11 ++++------- lustre/llite/lproc_llite.c | 14 +++++--------- lustre/llite/namei.c | 13 ++++++------- lustre/llite/rw.c | 8 ++++++-- lustre/llite/super25.c | 15 ++++++--------- lustre/llite/symlink.c | 6 +++--- lustre/lov/lov_request.c | 2 +- lustre/lvfs/upcall_cache.c | 2 +- lustre/mdc/mdc_locks.c | 2 -- lustre/mdc/mdc_request.c | 7 +++---- lustre/mds/handler.c | 4 ++-- lustre/mds/mds_join.c | 2 +- lustre/mds/mds_lov.c | 11 +++++++---- lustre/mds/mds_open.c | 4 ++-- lustre/mds/mds_reint.c | 4 ++-- lustre/mds/mds_unlink_open.c | 13 +++++-------- lustre/mdt/mdt_handler.c | 5 +++-- lustre/obdclass/genops.c | 9 +++++---- lustre/obdclass/llog.c | 6 +++--- lustre/obdclass/llog_cat.c | 8 ++++---- lustre/obdclass/llog_lvfs.c | 4 ++-- lustre/obdfilter/filter.c | 24 +++++++++++++----------- lustre/obdfilter/filter_io.c | 22 ++++------------------ lustre/obdfilter/filter_log.c | 8 ++++---- lustre/osc/osc_create.c | 25 +++++++++++-------------- lustre/osc/osc_internal.h | 11 +++++------ lustre/osc/osc_request.c | 13 +++++-------- lustre/ost/ost_handler.c | 4 ++-- lustre/ptlrpc/client.c | 20 ++++++++++---------- lustre/ptlrpc/events.c | 2 +- lustre/ptlrpc/import.c | 6 ++++-- lustre/ptlrpc/lproc_ptlrpc.c | 18 +++++++++--------- lustre/ptlrpc/pinger.c | 24 +++++++++++------------- lustre/ptlrpc/recov_thread.c | 8 ++++---- lustre/ptlrpc/service.c | 4 ++-- lustre/quota/quota_context.c | 4 ++-- lustre/quota/quota_interface.c | 4 ++-- lustre/quota/quota_master.c | 4 ++-- 49 files changed, 200 insertions(+), 230 deletions(-) diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h index d5b97fd..6a56a05 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h @@ -123,8 +123,6 @@ void groups_free(struct group_info *ginfo); #define gfp_t int #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) - #define lock_dentry(___dentry) spin_lock(&(___dentry)->d_lock) #define unlock_dentry(___dentry) spin_unlock(&(___dentry)->d_lock) @@ -203,7 +201,7 @@ static inline int cleanup_group_info(void) #include -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11) +#ifndef HAVE___D_REHASH #define __d_rehash(dentry, lock) d_rehash_cond(dentry, lock) #endif @@ -218,8 +216,6 @@ static inline int cleanup_group_info(void) #define CheckWriteback(page, cmd) \ (!(!PageWriteback(page) && cmd == OBD_BRW_WRITE)) -#endif - #ifdef HAVE_PAGE_LIST static inline int mapping_has_pages(struct address_space *mapping) { diff --git a/lustre/include/linux/lustre_intent.h b/lustre/include/linux/lustre_intent.h index 84629e1..67d81ed 100644 --- a/lustre/include/linux/lustre_intent.h +++ b/lustre/include/linux/lustre_intent.h @@ -3,7 +3,7 @@ #include -#ifndef LUSTRE_KERNEL_VERSION +#ifndef HAVE_VFS_INTENT_PATCHES #define IT_OPEN (1 << 0) #define IT_CREAT (1 << 1) diff --git a/lustre/include/linux/lustre_mds.h b/lustre/include/linux/lustre_mds.h index c418603..8e7c372 100644 --- a/lustre/include/linux/lustre_mds.h +++ b/lustre/include/linux/lustre_mds.h @@ -25,7 +25,7 @@ # include # endif # endif -# ifndef LUSTRE_KERNEL_VERSION +# ifndef HAVE_VFS_INTENT_PATCHES # include # endif #endif diff --git a/lustre/include/linux/lustre_patchless_compat.h b/lustre/include/linux/lustre_patchless_compat.h index 5de494e..b5ca466 100644 --- a/lustre/include/linux/lustre_patchless_compat.h +++ b/lustre/include/linux/lustre_patchless_compat.h @@ -24,7 +24,6 @@ #define LUSTRE_PATCHLESS_COMPAT_H #include -#ifndef LUSTRE_KERNEL_VERSION #include #ifndef HAVE_TRUNCATE_COMPLETE_PAGE @@ -79,8 +78,9 @@ truncate_complete_page(struct address_space *mapping, struct page *page) ll_remove_from_page_cache(page); page_cache_release(page); /* pagecache ref */ } -#endif +#endif /* HAVE_TRUNCATE_COMPLETE_PAGE */ +#if !defined(HAVE_D_REHASH_COND) && !defined(HAVE___D_REHASH) /* megahack */ static inline void d_rehash_cond(struct dentry * entry, int lock) { @@ -94,8 +94,7 @@ static inline void d_rehash_cond(struct dentry * entry, int lock) } #define __d_rehash(dentry, lock) d_rehash_cond(dentry, lock) - -#define LUSTRE_PATCHLESS +#endif /* !HAVE_D_REHASH_COND && !HAVE___D_REHASH*/ #ifndef ATTR_FROM_OPEN #define ATTR_FROM_OPEN 0 @@ -104,6 +103,4 @@ static inline void d_rehash_cond(struct dentry * entry, int lock) #define ATTR_RAW 0 #endif -#endif /* LUSTRE_KERNEL_VERSION */ - #endif diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 380c5f5..c15e088 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -550,7 +550,7 @@ void target_client_add_cb(struct obd_device *obd, __u64 transno, void *cb_data, { struct obd_export *exp = cb_data; - CDEBUG(D_HA, "%s: committing for initial connect of %s\n", + CDEBUG(D_RPCTRACE, "%s: committing for initial connect of %s\n", obd->obd_name, exp->exp_client_uuid.uuid); spin_lock(&exp->exp_lock); diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index 48a1c1d..df34b4e 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -850,8 +850,8 @@ int ldlm_handle_enqueue0(struct ldlm_namespace *ns, lock = find_existing_lock(req->rq_export, &dlm_req->lock_handle[0]); if (lock != NULL) { - DEBUG_REQ(D_HA, req, "found existing lock cookie "LPX64, - lock->l_handle.h_cookie); + DEBUG_REQ(D_DLMTRACE, req, "found existing lock cookie " + LPX64, lock->l_handle.h_cookie); GOTO(existing_lock, rc = 0); } } diff --git a/lustre/ldlm/ldlm_request.c b/lustre/ldlm/ldlm_request.c index b5ec3de..c40d2e8 100644 --- a/lustre/ldlm/ldlm_request.c +++ b/lustre/ldlm/ldlm_request.c @@ -889,8 +889,8 @@ int ldlm_cli_cancel_req(struct obd_export *exp, struct list_head *cancels, while (1) { imp = class_exp2cliimp(exp); if (imp == NULL || imp->imp_invalid) { - CDEBUG(D_HA, "skipping cancel on invalid import %p\n", - imp); + CDEBUG(D_DLMTRACE, + "skipping cancel on invalid import %p\n", imp); RETURN(count); } @@ -1054,6 +1054,8 @@ int ldlm_cancel_lru_local(struct ldlm_namespace *ns, struct list_head *cancels, while (!list_empty(&ns->ns_unused_list)) { struct ldlm_pool *pl = &ns->ns_pool; + LASSERT(unused >= 0); + if (max && added >= max) break; @@ -1248,7 +1250,7 @@ int ldlm_cancel_resource_local(struct ldlm_resource *res, /* See CBPENDING comment in ldlm_cancel_lru */ lock->l_flags |= LDLM_FL_CBPENDING | LDLM_FL_CANCELING | - lock_flags; + lock_flags; LASSERT(list_empty(&lock->l_bl_ast)); list_add(&lock->l_bl_ast, cancels); @@ -1320,7 +1322,8 @@ int ldlm_cli_cancel_list(struct list_head *cancels, int count, ldlm_cancel_pack(req, off, cancels, count); else res = ldlm_cli_cancel_req(lock->l_conn_export, - cancels, count, flags); + cancels, count, + flags); } else { res = ldlm_cli_cancel_req(lock->l_conn_export, cancels, 1, flags); diff --git a/lustre/liblustre/tests/sanity.c b/lustre/liblustre/tests/sanity.c index 6822189..0e7d5ea 100644 --- a/lustre/liblustre/tests/sanity.c +++ b/lustre/liblustre/tests/sanity.c @@ -1359,12 +1359,12 @@ int t56(char *name) rc = getdirentries(fd, (char *)&dir, nbytes, &basep); if (rc != -1) { - printf("Test failed: getdirentries returned %d\n", rc); + printf("Test failed: getdirentries returned %ld\n", rc); t_close(fd); return -1; } if (errno != EINVAL) { - printf("Test failed: getdirentries returned %d but errno is set" + printf("Test failed: getdirentries returned %ld but errno is set" " to %d (should be EINVAL)\n", rc, errno); t_close(fd); return -1; diff --git a/lustre/llite/dcache.c b/lustre/llite/dcache.c index 4e6c5a9..bca80bc 100644 --- a/lustre/llite/dcache.c +++ b/lustre/llite/dcache.c @@ -47,7 +47,7 @@ static void ll_release(struct dentry *de) EXIT; return; } -#ifndef LUSTRE_KERNEL_VERSION +#ifndef HAVE_VFS_INTENT_PATCHES if (lld->lld_it) { ll_intent_release(lld->lld_it); OBD_FREE(lld->lld_it, sizeof(*lld->lld_it)); @@ -60,7 +60,7 @@ static void ll_release(struct dentry *de) EXIT; } -#ifdef LUSTRE_KERNEL_VERSION +#ifdef DCACHE_LUSTRE_INVALID /* Compare if two dentries are the same. Don't match if the existing dentry * is marked DCACHE_LUSTRE_INVALID. Returns 1 if different, 0 if the same. * @@ -151,7 +151,7 @@ void ll_intent_release(struct lookup_intent *it) CDEBUG(D_INFO, "intent %p released\n", it); ll_intent_drop_lock(it); -#ifdef LUSTRE_KERNEL_VERSION +#ifdef HAVE_VFS_INTENT_PATCHES it->it_magic = 0; it->it_op_release = 0; #endif @@ -195,7 +195,7 @@ int ll_drop_dentry(struct dentry *dentry) RETURN (0); } -#ifdef LUSTRE_KERNEL_VERSION +#ifdef DCACHE_LUSTRE_INVALID if (!(dentry->d_flags & DCACHE_LUSTRE_INVALID)) { #else if (!d_unhashed(dentry)) { @@ -207,7 +207,7 @@ int ll_drop_dentry(struct dentry *dentry) /* actually we don't unhash the dentry, rather just * mark it inaccessible for to __d_lookup(). otherwise * sys_getcwd() could return -ENOENT -bzzz */ -#ifdef LUSTRE_KERNEL_VERSION +#ifdef DCACHE_LUSTRE_INVALID dentry->d_flags |= DCACHE_LUSTRE_INVALID; #endif if (!dentry->d_inode || !S_ISDIR(dentry->d_inode->i_mode)) @@ -314,7 +314,7 @@ void ll_lookup_finish_locks(struct lookup_intent *it, struct dentry *dentry) void ll_frob_intent(struct lookup_intent **itp, struct lookup_intent *deft) { struct lookup_intent *it = *itp; -#if defined(LUSTRE_KERNEL_VERSION) +#ifdef HAVE_VFS_INTENT_PATCHES if (it) { LASSERTF(it->it_magic == INTENT_MAGIC, "%p has bad intent magic: %x\n", @@ -325,7 +325,7 @@ void ll_frob_intent(struct lookup_intent **itp, struct lookup_intent *deft) if (!it || it->it_op == IT_GETXATTR) it = *itp = deft; -#ifdef LUSTRE_KERNEL_VERSION +#ifdef HAVE_VFS_INTENT_PATCHES it->it_op_release = ll_intent_release; #endif } @@ -353,7 +353,7 @@ int ll_revalidate_it(struct dentry *de, int lookup_flags, if (it && (it->it_op & IT_CREAT)) RETURN(0); -#ifdef LUSTRE_KERNEL_VERSION +#ifdef DCACHE_LUSTRE_INVALID if (de->d_flags & DCACHE_LUSTRE_INVALID) RETURN(0); #endif @@ -394,7 +394,6 @@ int ll_revalidate_it(struct dentry *de, int lookup_flags, if (IS_ERR(op_data)) RETURN(PTR_ERR(op_data)); - if ((it->it_op == IT_OPEN) && de->d_inode) { struct inode *inode = de->d_inode; struct ll_inode_info *lli = ll_i2info(inode); @@ -500,7 +499,7 @@ out: if (req != NULL && !it_disposition(it, DISP_ENQ_COMPLETE)) ptlrpc_req_finished(req); if (rc == 0) { -#ifdef LUSTRE_KERNEL_VERSION +#ifdef DCACHE_LUSTRE_INVALID ll_unhash_aliases(de->d_inode); /* done in ll_unhash_aliases() dentry->d_flags |= DCACHE_LUSTRE_INVALID; */ @@ -514,7 +513,7 @@ out: de->d_name.name, de, de->d_parent, de->d_inode, atomic_read(&de->d_count)); ll_lookup_finish_locks(it, de); -#ifdef LUSTRE_KERNEL_VERSION +#ifdef DCACHE_LUSTRE_INVALID lock_dentry(de); de->d_flags &= ~DCACHE_LUSTRE_INVALID; unlock_dentry(de); @@ -662,7 +661,7 @@ do_lookup: return; } -#ifdef LUSTRE_KERNEL_VERSION +#ifdef HAVE_VFS_INTENT_PATCHES static int ll_revalidate_nd(struct dentry *dentry, struct nameidata *nd) { int rc; @@ -750,7 +749,7 @@ struct dentry_operations ll_d_ops = { .d_revalidate = ll_revalidate_nd, .d_release = ll_release, .d_delete = ll_ddelete, -#ifdef LUSTRE_KERNEL_VERSION +#ifdef DCACHE_LUSTRE_INVALID .d_compare = ll_dcompare, #endif #if 0 diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 37675d2..05afdd0 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -471,7 +471,7 @@ int ll_file_open(struct inode *inode, struct file *file) if (inode->i_sb->s_root == file->f_dentry) RETURN(0); -#ifdef LUSTRE_KERNEL_VERSION +#ifdef HAVE_VFS_INTENT_PATCHES it = file->f_it; #else it = file->private_data; /* XXX: compat macro */ @@ -2861,7 +2861,7 @@ struct file_operations ll_file_operations_noflock = { }; struct inode_operations ll_file_inode_operations = { -#ifdef LUSTRE_KERNEL_VERSION +#ifdef HAVE_VFS_INTENT_PATCHES .setattr_raw = ll_setattr_raw, #endif .setattr = ll_setattr, diff --git a/lustre/llite/llite_internal.h b/lustre/llite/llite_internal.h index 27dc569..e0191ec 100644 --- a/lustre/llite/llite_internal.h +++ b/lustre/llite/llite_internal.h @@ -24,7 +24,7 @@ #define LL_IT2STR(it) ((it) ? ldlm_it2str((it)->it_op) : "0") #define LUSTRE_FPRIVATE(file) ((file)->private_data) -#ifdef LUSTRE_KERNEL_VERSION +#ifdef HAVE_VFS_INTENT_PATCHES static inline struct lookup_intent *ll_nd2it(struct nameidata *nd) { return &nd->intent; @@ -36,7 +36,7 @@ struct ll_dentry_data { int lld_mnt_count; struct obd_client_handle lld_cwd_och; struct obd_client_handle lld_mnt_och; -#ifndef LUSTRE_KERNEL_VERSION +#ifndef HAVE_VFS_INTENT_PATCHES struct lookup_intent *lld_it; #endif }; @@ -278,7 +278,9 @@ struct ll_sb_info { enum stats_track_type ll_stats_track_type; int ll_stats_track_id; int ll_rw_stats_on; - dev_t ll_sdev_orig; /* save s_dev before assign for clustred nfs*/ + + dev_t ll_sdev_orig; /* save s_dev before assign for + * clustred nfs */ }; #define LL_DEFAULT_MAX_RW_CHUNK (32 * 1024 * 1024) @@ -460,7 +462,7 @@ struct inode *ll_iget(struct super_block *sb, ino_t hash, struct dentry *ll_find_alias(struct inode *, struct dentry *); int ll_md_blocking_ast(struct ldlm_lock *, struct ldlm_lock_desc *, void *data, int flag); -#ifndef LUSTRE_KERNEL_VERSION +#ifndef HAVE_VFS_INTENT_PATCHES struct lookup_intent *ll_convert_intent(struct open_intent *oit, int lookup_flags); #endif diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 097cfa8..8817868 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -81,7 +81,7 @@ static struct ll_sb_info *ll_init_sbi(void) ll_generate_random_uuid(uuid); class_uuid_unparse(uuid, &sbi->ll_sb_uuid); - CDEBUG(D_HA, "generated uuid: %s\n", sbi->ll_sb_uuid.uuid); + CDEBUG(D_CONFIG, "generated uuid: %s\n", sbi->ll_sb_uuid.uuid); spin_lock(&ll_sb_lock); list_add_tail(&sbi->ll_list, &ll_super_blocks); @@ -122,7 +122,7 @@ void ll_free_sbi(struct super_block *sb) } static struct dentry_operations ll_d_root_ops = { -#ifdef LUSTRE_KERNEL_VERSION +#ifdef DCACHE_LUSTRE_INVALID .d_compare = ll_dcompare, #endif }; @@ -421,8 +421,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, ll_async_page_slab_size = size_round(sizeof(struct ll_async_page)) + err; ll_async_page_slab = cfs_mem_cache_create("ll_async_page", - ll_async_page_slab_size, - 0, 0); + ll_async_page_slab_size, + 0, 0); if (!ll_async_page_slab) GOTO(out_dt_fid, err = -ENOMEM); } @@ -1804,9 +1804,6 @@ int ll_iocontrol(struct inode *inode, struct file *file, body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(*body)); - - /*Now the ext3 will be packed directly back to client, - *no need convert here*/ flags = body->flags; ptlrpc_req_finished (req); diff --git a/lustre/llite/lproc_llite.c b/lustre/llite/lproc_llite.c index 03dd0ac..e172e78 100644 --- a/lustre/llite/lproc_llite.c +++ b/lustre/llite/lproc_llite.c @@ -629,15 +629,11 @@ int lprocfs_register_mountpoint(struct proc_dir_entry *parent, void *ptr = NULL; if (type & LPROCFS_TYPE_REGS) ptr = "regs"; - else { - if (type & LPROCFS_TYPE_BYTES) - ptr = "bytes"; - else { - if (type & LPROCFS_TYPE_PAGES) - ptr = "pages"; - } - } - lprocfs_counter_init(sbi->ll_stats, + else if (type & LPROCFS_TYPE_BYTES) + ptr = "bytes"; + else if (type & LPROCFS_TYPE_PAGES) + ptr = "pages"; + lprocfs_counter_init(sbi->ll_stats, llite_opcode_table[id].opcode, (type & LPROCFS_CNTR_AVGMINMAX), llite_opcode_table[id].opname, ptr); diff --git a/lustre/llite/namei.c b/lustre/llite/namei.c index 17864b0..c93bb34 100644 --- a/lustre/llite/namei.c +++ b/lustre/llite/namei.c @@ -323,7 +323,7 @@ struct dentry *ll_find_alias(struct inode *inode, struct dentry *de) dget_locked(dentry); lock_dentry(dentry); __d_drop(dentry); -#ifdef LUSTRE_KERNEL_VERSION +#ifdef DCACHE_LUSTRE_INVALID dentry->d_flags &= ~DCACHE_LUSTRE_INVALID; #endif unlock_dentry(dentry); @@ -497,7 +497,7 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry, return retval; } -#ifdef LUSTRE_KERNEL_VERSION +#ifdef HAVE_VFS_INTENT_PATCHES static struct dentry *ll_lookup_nd(struct inode *parent, struct dentry *dentry, struct nameidata *nd) { @@ -809,7 +809,7 @@ static int ll_mknod_generic(struct inode *dir, struct qstr *name, int mode, RETURN(err); } -#ifndef LUSTRE_KERNEL_VERSION +#ifndef HAVE_VFS_INTENT_PATCHES static int ll_create_nd(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd) { @@ -1064,7 +1064,6 @@ static int ll_unlink_generic(struct inode *dir, struct dentry *dparent, ll_get_child_fid(dir, name, &op_data->op_fid3); rc = md_unlink(ll_i2sbi(dir)->ll_md_exp, op_data, &request); ll_finish_md_op_data(op_data); - if (rc) GOTO(out, rc); @@ -1117,7 +1116,7 @@ static int ll_rename_generic(struct inode *src, struct dentry *src_dparent, RETURN(err); } -#ifdef LUSTRE_KERNEL_VERSION +#ifdef HAVE_VFS_INTENT_PATCHES static int ll_mknod_raw(struct nameidata *nd, int mode, dev_t rdev) { return ll_mknod_generic(nd->dentry->d_inode, &nd->last, mode,rdev,NULL); @@ -1194,7 +1193,7 @@ static int ll_rename(struct inode *old_dir, struct dentry *old_dentry, } struct inode_operations ll_dir_inode_operations = { -#ifdef LUSTRE_KERNEL_VERSION +#ifdef HAVE_VFS_INTENT_PATCHES .link_raw = ll_link_raw, .unlink_raw = ll_unlink_raw, .symlink_raw = ll_symlink_raw, @@ -1225,7 +1224,7 @@ struct inode_operations ll_dir_inode_operations = { }; struct inode_operations ll_special_inode_operations = { -#ifdef LUSTRE_KERNEL_VERSION +#ifdef HAVE_VFS_INTENT_PATCHES .setattr_raw = ll_setattr_raw, #endif .setattr = ll_setattr, diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index 718c922..a7973d1 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -20,7 +20,6 @@ * along with Lustre; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - #ifndef AUTOCONF_INCLUDED #include #endif @@ -1501,7 +1500,9 @@ int ll_readpage(struct file *filp, struct page *page) ras_update(ll_i2sbi(inode), inode, &fd->fd_ras, page->index, llap->llap_defer_uptodate); + if (llap->llap_defer_uptodate) { + /* This is the callpath if we got the page from a readahead */ llap->llap_ra_used = 1; rc = ll_readahead(&fd->fd_ras, exp, page->mapping, oig, fd->fd_flags); @@ -1517,7 +1518,8 @@ int ll_readpage(struct file *filp, struct page *page) if (likely((fd->fd_flags & LL_FILE_IGNORE_LOCK) == 0)) { rc = ll_page_matches(page, fd->fd_flags); if (rc < 0) { - LL_CDEBUG_PAGE(D_ERROR, page, "lock match failed: rc %d\n", rc); + LL_CDEBUG_PAGE(D_ERROR, page, + "lock match failed: rc %d\n", rc); GOTO(out, rc); } @@ -1534,6 +1536,8 @@ int ll_readpage(struct file *filp, struct page *page) GOTO(out, rc); LL_CDEBUG_PAGE(D_PAGE, page, "queued readpage\n"); + /* We have just requested the actual page we want, see if we can tack + * on some readahead to that page's RPC before it is sent. */ if (ll_i2sbi(inode)->ll_ra_info.ra_max_pages) ll_readahead(&fd->fd_ras, exp, page->mapping, oig, fd->fd_flags); diff --git a/lustre/llite/super25.c b/lustre/llite/super25.c index f526048..75b538c 100644 --- a/lustre/llite/super25.c +++ b/lustre/llite/super25.c @@ -60,8 +60,8 @@ static void ll_destroy_inode(struct inode *inode) int ll_init_inodecache(void) { ll_inode_cachep = cfs_mem_cache_create("lustre_inode_cache", - sizeof(struct ll_inode_info), - 0, SLAB_HWCACHE_ALIGN); + sizeof(struct ll_inode_info), + 0, SLAB_HWCACHE_ALIGN); if (ll_inode_cachep == NULL) return -ENOMEM; return 0; @@ -100,10 +100,9 @@ static int __init init_lustre_lite(void) rc = ll_init_inodecache(); if (rc) return -ENOMEM; - ll_file_data_slab = cfs_mem_cache_create("ll_file_data", - sizeof(struct ll_file_data), 0, - SLAB_HWCACHE_ALIGN); + sizeof(struct ll_file_data), 0, + SLAB_HWCACHE_ALIGN); if (ll_file_data_slab == NULL) { ll_destroy_inodecache(); return -ENOMEM; @@ -166,9 +165,8 @@ static int __init init_lustre_lite(void) static void __exit exit_lustre_lite(void) { -#ifdef HAVE_KMEM_CACHE_DESTROY_INT int rc; -#endif + del_timer(&ll_capa_timer); ll_capa_thread_stop(); LASSERTF(capa_count[CAPA_SITE_CLIENT] == 0, @@ -199,9 +197,8 @@ static void __exit exit_lustre_lite(void) LASSERTF(rc == 0, "couldn't destroy ll_async_page slab\n"); } - if (proc_lustre_fs_root) { + if (proc_lustre_fs_root) lprocfs_remove(&proc_lustre_fs_root); - } } MODULE_AUTHOR("Cluster File Systems, Inc. "); diff --git a/lustre/llite/symlink.c b/lustre/llite/symlink.c index eabffb6..b58a5d3 100644 --- a/lustre/llite/symlink.c +++ b/lustre/llite/symlink.c @@ -134,7 +134,7 @@ static LL_FOLLOW_LINK_RETURN_TYPE ll_follow_link(struct dentry *dentry, { struct inode *inode = dentry->d_inode; struct ll_inode_info *lli = ll_i2info(inode); -#ifdef LUSTRE_KERNEL_VERSION +#ifdef HAVE_VFS_INTENT_PATCHES struct lookup_intent *it = ll_nd2it(nd); #endif struct ptlrpc_request *request; @@ -142,7 +142,7 @@ static LL_FOLLOW_LINK_RETURN_TYPE ll_follow_link(struct dentry *dentry, char *symname; ENTRY; -#ifdef LUSTRE_KERNEL_VERSION +#ifdef HAVE_VFS_INTENT_PATCHES if (it != NULL) { int op = it->it_op; int mode = it->it_create_mode; @@ -201,7 +201,7 @@ static void ll_put_link(struct dentry *dentry, struct nameidata *nd, void *cooki struct inode_operations ll_fast_symlink_inode_operations = { .readlink = ll_readlink, .setattr = ll_setattr, -#ifdef LUSTRE_KERNEL_VERSION +#ifdef HAVE_VFS_INTENT_PATCHES .setattr_raw = ll_setattr_raw, #endif .follow_link = ll_follow_link, diff --git a/lustre/lov/lov_request.c b/lustre/lov/lov_request.c index b702f7f..290c057 100644 --- a/lustre/lov/lov_request.c +++ b/lustre/lov/lov_request.c @@ -510,7 +510,7 @@ int lov_prep_cancel_set(struct obd_export *exp, struct obd_info *oinfo, lov_lockhp = set->set_lockh->llh_handles + i; if (!lustre_handle_is_used(lov_lockhp)) { - CDEBUG(D_HA, "lov idx %d subobj "LPX64" no lock?\n", + CDEBUG(D_RPCTRACE,"lov idx %d subobj "LPX64" no lock\n", loi->loi_ost_idx, loi->loi_id); continue; } diff --git a/lustre/lvfs/upcall_cache.c b/lustre/lvfs/upcall_cache.c index eea4ae5..c6ede72 100644 --- a/lustre/lvfs/upcall_cache.c +++ b/lustre/lvfs/upcall_cache.c @@ -322,7 +322,7 @@ int upcall_cache_downcall(struct upcall_cache *cache, __u32 err, __u64 key, } if (!UC_CACHE_IS_ACQUIRING(entry)) { - CDEBUG(D_HA, "%s: found uptodate entry %p (key "LPU64")\n", + CDEBUG(D_RPCTRACE,"%s: found uptodate entry %p (key "LPU64")\n", cache->uc_name, entry, entry->ue_key); GOTO(out, rc = 0); } diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index 6c28587..b9ec6d1 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -443,8 +443,6 @@ int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo, lockreq->lock_flags |= LDLM_FL_INTENT_ONLY; } - /* This can go when we're sure that this can never happen */ - LASSERT(rc != -ENOENT); if (rc == ELDLM_LOCK_ABORTED) { einfo->ei_mode = 0; memset(lockh, 0, sizeof(*lockh)); diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index fe74d9b..3833e26 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -719,8 +719,7 @@ void mdc_commit_delayed(struct ptlrpc_request *req) list_del_init(&req->rq_mod_list); if (req->rq_sequence) { list_for_each_entry_safe(cur, tmp, &mod->mod_replay_list, - rq_mod_list) - { + rq_mod_list) { LASSERT(cur != LP_POISON); LASSERT(cur->rq_type != LI_POISON); DEBUG_REQ(D_HA, cur, "req balanced"); @@ -800,7 +799,7 @@ int mdc_set_open_replay_data(struct obd_export *exp, LBUG(); } - DEBUG_REQ(D_HA, open_req, "Set up open replay data"); + DEBUG_REQ(D_RPCTRACE, open_req, "Set up open replay data"); RETURN(0); } @@ -870,7 +869,7 @@ int mdc_close(struct obd_export *exp, struct md_op_data *op_data, mdc_put_rpc_lock(obd->u.cli.cl_close_lock, NULL); if (req->rq_repmsg == NULL) { - CDEBUG(D_HA, "request failed to send: %p, %d\n", req, + CDEBUG(D_RPCTRACE, "request failed to send: %p, %d\n", req, req->rq_status); if (rc == 0) rc = req->rq_status ? req->rq_status : -EIO; diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 1472f48..12e3b11 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -2289,7 +2289,7 @@ static void fixup_handle_for_resent_req(struct ptlrpc_request *req, int offset, if (lock->l_remote_handle.cookie == remote_hdl.cookie) { lockh->cookie = lock->l_handle.h_cookie; LDLM_DEBUG(lock, "restoring lock cookie"); - DEBUG_REQ(D_HA, req, "restoring lock cookie "LPX64, + DEBUG_REQ(D_DLMTRACE, req,"restoring lock cookie "LPX64, lockh->cookie); if (old_lock) *old_lock = LDLM_LOCK_GET(lock); @@ -2316,7 +2316,7 @@ static void fixup_handle_for_resent_req(struct ptlrpc_request *req, int offset, lustre_msg_clear_flags(req->rq_reqmsg, MSG_RESENT); - DEBUG_REQ(D_HA, req, "no existing lock with rhandle "LPX64, + DEBUG_REQ(D_DLMTRACE, req, "no existing lock with rhandle "LPX64, remote_hdl.cookie); } diff --git a/lustre/mds/mds_join.c b/lustre/mds/mds_join.c index ba069c6..0eae80f 100644 --- a/lustre/mds/mds_join.c +++ b/lustre/mds/mds_join.c @@ -233,7 +233,7 @@ static void mds_finish_join(struct mds_obd *mds, struct ptlrpc_request *req, } if (body->valid & OBD_MD_FLMODEASIZE) - CDEBUG(D_HA, "updating max_mdsize/max_cookiesize: %d/%d\n", + CDEBUG(D_INODE, "updating max_mdsize/max_cookiesize: %d/%d\n", mds->mds_max_mdsize, mds->mds_max_cookiesize); mds_pack_inode2fid(&body->fid1, inode); diff --git a/lustre/mds/mds_lov.c b/lustre/mds/mds_lov.c index 07a47a4..8206d12 100644 --- a/lustre/mds/mds_lov.c +++ b/lustre/mds/mds_lov.c @@ -617,7 +617,7 @@ int mds_iocontrol(unsigned int cmd, struct obd_export *exp, int len, } case OBD_IOC_SYNC: { - CDEBUG(D_HA, "syncing mds %s\n", obd->obd_name); + CDEBUG(D_INFO, "syncing mds %s\n", obd->obd_name); rc = fsfilt_sync(obd, obd->u.obt.obt_sb); RETURN(rc); } @@ -761,10 +761,13 @@ static int __mds_lov_synchronize(void *data) LASSERT(uuid); rc = mds_lov_update_mds(obd, watched, idx, uuid); - if (rc != 0) + if (rc != 0) { + CERROR("%s failed at update_mds: %d\n", obd_uuid2str(uuid), rc); GOTO(out, rc); + } mgi.group = FILTER_GROUP_MDS0 + mds->mds_id; mgi.uuid = uuid; + rc = obd_set_info_async(mds->mds_osc_exp, strlen(KEY_MDS_CONN), KEY_MDS_CONN, sizeof(mgi), &mgi, NULL); if (rc != 0) @@ -796,8 +799,8 @@ static int __mds_lov_synchronize(void *data) rc = mds_lov_clear_orphans(mds, uuid); if (rc != 0) { - CERROR("%s: failed at mds_lov_clear_orphans: %d\n", - obd->obd_name, rc); + CERROR("%s failed at mds_lov_clear_orphans: %d\n", + obd_uuid2str(uuid), rc); GOTO(out, rc); } diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c index 041fdc5..e21b1c5 100644 --- a/lustre/mds/mds_open.c +++ b/lustre/mds/mds_open.c @@ -1288,7 +1288,7 @@ int mds_mfd_close(struct ptlrpc_request *req, int offset,struct obd_device *obd, int stripe_count = 0; LASSERT(rc == 0); /* mds_put_write_access must have succeeded */ - CDEBUG(D_HA, "destroying orphan object %s\n", fidname); + CDEBUG(D_INODE, "destroying orphan object %s\n", fidname); if ((S_ISREG(inode->i_mode) && inode->i_nlink != 1) || (S_ISDIR(inode->i_mode) && inode->i_nlink != 2)) @@ -1452,7 +1452,7 @@ int mds_close(struct ptlrpc_request *req, int offset) MDS_CHECK_RESENT(req, mds_reconstruct_generic(req)); } - CDEBUG(D_HA, "close req->rep_len %d mdsize %d cookiesize %d\n", + CDEBUG(D_INODE, "close req->rep_len %d mdsize %d cookiesize %d\n", req->rq_replen, obd->u.mds.mds_max_mdsize, obd->u.mds.mds_max_cookiesize); mds_counter_incr(req->rq_export, LPROC_MDS_CLOSE); diff --git a/lustre/mds/mds_reint.c b/lustre/mds/mds_reint.c index c548061..e1956b6 100644 --- a/lustre/mds/mds_reint.c +++ b/lustre/mds/mds_reint.c @@ -71,7 +71,7 @@ static void mds_cancel_cookies_cb(struct obd_device *obd, __u64 transno, obd_transno_commit_cb(obd, transno, error); - CDEBUG(D_HA, "cancelling %d cookies\n", + CDEBUG(D_RPCTRACE, "cancelling %d cookies\n", (int)(mlcd->mlcd_cookielen / sizeof(*mlcd->mlcd_cookies))); rc = obd_unpackmd(obd->u.mds.mds_osc_exp, &lsm, mlcd->mlcd_lmm, @@ -111,7 +111,7 @@ int mds_finish_transno(struct mds_obd *mds, struct inode *inode, void *handle, int err; __u64 transno, prev_transno; loff_t off; - int log_pri = D_HA; + int log_pri = D_RPCTRACE; ENTRY; if (IS_ERR(handle)) { diff --git a/lustre/mds/mds_unlink_open.c b/lustre/mds/mds_unlink_open.c index 9694dfc..c9f155c 100644 --- a/lustre/mds/mds_unlink_open.c +++ b/lustre/mds/mds_unlink_open.c @@ -258,15 +258,12 @@ int mds_cleanup_pending(struct obd_device *obd) MDS_UP_READ_ORPHAN_SEM(child_inode); rc = mds_unlink_orphan(obd, dchild, child_inode, pending_dir); - if (rc == 0) { - item ++; - CDEBUG(D_HA, "%s: removed orphan %s\n", - obd->obd_name, d_name); - } else { - CDEBUG(D_INODE, "%s: removed orphan %s failed," - " rc = %d\n", obd->obd_name, d_name, rc); + CDEBUG(D_INODE, "%s: removed orphan %s: rc %d\n", + obd->obd_name, d_name, rc); + if (rc == 0) + item++; + else rc = 0; - } next: l_dput(dchild); UNLOCK_INODE_MUTEX(pending_dir); diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 6ea17ac..9168c10 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -2623,7 +2623,8 @@ static void mdt_intent_fixup_resent(struct mdt_thread_info *info, lh->mlh_reg_mode = lock->l_granted_mode; LDLM_DEBUG(lock, "restoring lock cookie"); - DEBUG_REQ(D_HA, req, "restoring lock cookie "LPX64, + DEBUG_REQ(D_DLMTRACE, req, + "restoring lock cookie "LPX64, lh->mlh_reg_lh.cookie); if (old_lock) *old_lock = LDLM_LOCK_GET(lock); @@ -2647,7 +2648,7 @@ static void mdt_intent_fixup_resent(struct mdt_thread_info *info, */ lustre_msg_clear_flags(req->rq_reqmsg, MSG_RESENT); - DEBUG_REQ(D_HA, req, "no existing lock with rhandle "LPX64, + DEBUG_REQ(D_DLMTRACE, req, "no existing lock with rhandle "LPX64, remote_hdl.cookie); } diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index fa57942..59f1c29 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -548,20 +548,21 @@ int obd_init_caches(void) LASSERT(obd_device_cachep == NULL); obd_device_cachep = cfs_mem_cache_create("ll_obd_dev_cache", - sizeof(struct obd_device), 0, 0); + sizeof(struct obd_device), + 0, 0); if (!obd_device_cachep) GOTO(out, -ENOMEM); LASSERT(obdo_cachep == NULL); obdo_cachep = cfs_mem_cache_create("ll_obdo_cache", sizeof(struct obdo), - 0, 0); + 0, 0); if (!obdo_cachep) GOTO(out, -ENOMEM); LASSERT(import_cachep == NULL); import_cachep = cfs_mem_cache_create("ll_import_cache", - sizeof(struct obd_import), - 0, 0); + sizeof(struct obd_import), + 0, 0); if (!import_cachep) GOTO(out, -ENOMEM); diff --git a/lustre/obdclass/llog.c b/lustre/obdclass/llog.c index b83a74c..cac2baa 100644 --- a/lustre/obdclass/llog.c +++ b/lustre/obdclass/llog.c @@ -85,7 +85,7 @@ int llog_cancel_rec(struct llog_handle *loghandle, int index) int rc = 0; ENTRY; - CDEBUG(D_HA, "canceling %d in log "LPX64"\n", + CDEBUG(D_RPCTRACE, "canceling %d in log "LPX64"\n", index, loghandle->lgh_id.lgl_oid); if (index == 0) { @@ -94,7 +94,7 @@ int llog_cancel_rec(struct llog_handle *loghandle, int index) } if (!ext2_clear_bit(index, llh->llh_bitmap)) { - CDEBUG(D_HA, "catalog index %u already clear?\n", index); + CDEBUG(D_RPCTRACE, "catalog index %u already clear?\n", index); RETURN(-EINVAL); } @@ -380,7 +380,7 @@ int llog_reverse_process(struct llog_handle *loghandle, llog_cb_t cb, rec = buf; idx = le32_to_cpu(rec->lrh_index); if (idx < index) - CDEBUG(D_HA, "index %u : idx %u\n", index, idx); + CDEBUG(D_RPCTRACE, "index %u : idx %u\n", index, idx); while (idx < index) { rec = ((void *)rec + le32_to_cpu(rec->lrh_len)); idx ++; diff --git a/lustre/obdclass/llog_cat.c b/lustre/obdclass/llog_cat.c index 5bd8d12..64de7e0 100644 --- a/lustre/obdclass/llog_cat.c +++ b/lustre/obdclass/llog_cat.c @@ -91,7 +91,7 @@ static struct llog_handle *llog_cat_new_log(struct llog_handle *cathandle) llh->llh_count++; llh->llh_tail.lrt_index = index; - CDEBUG(D_HA, "new recovery log "LPX64":%x for index %u of catalog " + CDEBUG(D_RPCTRACE,"new recovery log "LPX64":%x for index %u of catalog " LPX64"\n", loghandle->lgh_id.lgl_oid, loghandle->lgh_id.lgl_ogen, index, cathandle->lgh_id.lgl_oid); /* build the record for this log in the catalog */ @@ -325,8 +325,8 @@ int llog_cat_cancel_records(struct llog_handle *cathandle, int count, llog_cat_set_first_idx(cathandle, index); rc = llog_cancel_rec(cathandle, index); if (rc == 0) - CDEBUG(D_HA, "cancel plain log at index %u " - "of catalog "LPX64"\n", + CDEBUG(D_RPCTRACE,"cancel plain log at index %u" + " of catalog "LPX64"\n", index, cathandle->lgh_id.lgl_oid); } } @@ -486,7 +486,7 @@ int llog_cat_set_first_idx(struct llog_handle *cathandle, int index) } } out: - CDEBUG(D_HA, "set catlog "LPX64" first idx %u\n", + CDEBUG(D_RPCTRACE, "set catlog "LPX64" first idx %u\n", cathandle->lgh_id.lgl_oid, llh->llh_cat_idx); } diff --git a/lustre/obdclass/llog_lvfs.c b/lustre/obdclass/llog_lvfs.c index 6c46344..43e2848 100644 --- a/lustre/obdclass/llog_lvfs.c +++ b/lustre/obdclass/llog_lvfs.c @@ -344,7 +344,7 @@ static int llog_lvfs_write_rec(struct llog_handle *loghandle, if (rc) RETURN(rc); - CDEBUG(D_HA, "added record "LPX64": idx: %u, %u bytes\n", + CDEBUG(D_RPCTRACE, "added record "LPX64": idx: %u, %u bytes\n", loghandle->lgh_id.lgl_oid, index, rec->lrh_len); if (rc == 0 && reccookie) { reccookie->lgc_lgl = loghandle->lgh_id; @@ -480,7 +480,7 @@ static int llog_lvfs_prev_block(struct llog_handle *loghandle, if (len == 0 || len & (LLOG_CHUNK_SIZE - 1)) RETURN(-EINVAL); - CDEBUG(D_OTHER, "looking for log index %u n", prev_idx); + CDEBUG(D_OTHER, "looking for log index %u\n", prev_idx); cur_offset = LLOG_CHUNK_SIZE; llog_skip_over(&cur_offset, 0, prev_idx); diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 76ba29c..ea2bd49 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -3233,7 +3233,7 @@ static int filter_handle_precreate(struct obd_export *exp, struct obdo *oa, diff = 1; else diff = oa->o_id - filter_last_id(filter, group); - CDEBUG(D_HA, "filter_last_id() = "LPU64" -> diff = %d\n", + CDEBUG(D_RPCTRACE, "filter_last_id() = "LPU64" -> diff = %d\n", filter_last_id(filter, group), diff); LASSERTF(diff >= 0,"%s: "LPU64" - "LPU64" = %d\n",obd->obd_name, @@ -3354,8 +3354,8 @@ static int filter_precreate(struct obd_device *obd, struct obdo *oa, RETURN(-ENOMEM); rc = filter_statfs(obd, osfs, cfs_time_current_64() - HZ); if (rc == 0 && osfs->os_bavail < (osfs->os_blocks >> 10)) { - CDEBUG(D_HA,"%s: not enough space for create "LPU64"\n", - obd->obd_name, osfs->os_bavail << + CDEBUG(D_RPCTRACE,"%s: not enough space for create " + LPU64"\n", obd->obd_name, osfs->os_bavail << filter->fo_vfsmnt->mnt_sb->s_blocksize_bits); *num = 0; rc = -ENOSPC; @@ -3365,8 +3365,8 @@ static int filter_precreate(struct obd_device *obd, struct obdo *oa, RETURN(rc); } - CDEBUG(D_HA, "%s: precreating %d objects in group "LPU64" at "LPU64"\n", - obd->obd_name, *num, group, oa->o_id); + CDEBUG(D_RPCTRACE, "%s: precreating %d objects in group "LPU64 + " at "LPU64"\n", obd->obd_name, *num, group, oa->o_id); for (i = 0; i < *num && err == 0; i++) { int cleanup_phase = 0; @@ -3477,15 +3477,17 @@ set_last_id: if (rc) break; if (time_after(jiffies, enough_time)) { - CDEBUG(D_HA, "%s: precreate slow - want %d got %d \n", + CDEBUG(D_RPCTRACE, + "%s: precreate slow - want %d got %d \n", obd->obd_name, *num, i); break; } } *num = i; - CDEBUG(D_HA, "%s: created %d objects for group "LPU64": "LPU64"\n", - obd->obd_name, i, group, filter->fo_last_objids[group]); + CDEBUG(D_RPCTRACE, + "%s: created %d objects for group "LPU64": "LPU64" rc %d\n", + obd->obd_name, i, group, filter->fo_last_objids[group], rc); RETURN(rc); } @@ -3910,7 +3912,7 @@ int filter_iocontrol(unsigned int cmd, struct obd_export *exp, } case OBD_IOC_SYNC: { - CDEBUG(D_HA, "syncing ost %s\n", obd->obd_name); + CDEBUG(D_RPCTRACE, "syncing ost %s\n", obd->obd_name); rc = fsfilt_sync(obd, obd->u.obt.obt_sb); RETURN(rc); } @@ -4057,8 +4059,8 @@ static int __init obdfilter_init(void) return -ENOMEM; ll_fmd_cachep = cfs_mem_cache_create("ll_fmd_cache", - sizeof(struct filter_mod_data), - 0, 0); + sizeof(struct filter_mod_data), + 0, 0); if (!ll_fmd_cachep) GOTO(out, rc = -ENOMEM); diff --git a/lustre/obdfilter/filter_io.c b/lustre/obdfilter/filter_io.c index ad94fad..1437ba7 100644 --- a/lustre/obdfilter/filter_io.c +++ b/lustre/obdfilter/filter_io.c @@ -80,9 +80,6 @@ static void filter_grant_incoming(struct obd_export *exp, struct obdo *oa) { struct filter_export_data *fed; struct obd_device *obd = exp->exp_obd; - static unsigned long last_msg; - static int last_count; - int mask = D_CACHE; ENTRY; LASSERT_SPIN_LOCKED(&obd->obd_osfs_lock); @@ -96,20 +93,10 @@ static void filter_grant_incoming(struct obd_export *exp, struct obdo *oa) fed = &exp->exp_filter_data; - /* Don't print this to the console the first time it happens, since - * it can happen legitimately on occasion, but only rarely. */ - if (time_after(jiffies, last_msg + 60 * HZ)) { - last_count = 0; - last_msg = jiffies; - } - if ((last_count & (-last_count)) == last_count) - mask = D_HA /* until bug 3273 is fixed D_WARNING */; - last_count++; - /* Add some margin, since there is a small race if other RPCs arrive * out-or-order and have already consumed some grant. We want to * leave this here in case there is a large error in accounting. */ - CDEBUG(oa->o_grant > fed->fed_grant + FILTER_GRANT_CHUNK ? mask:D_CACHE, + CDEBUG(D_CACHE, "%s: cli %s/%p reports grant: "LPU64" dropped: %u, local: %lu\n", obd->obd_name, exp->exp_client_uuid.uuid, exp, oa->o_grant, oa->o_dropped, fed->fed_grant); @@ -124,7 +111,7 @@ static void filter_grant_incoming(struct obd_export *exp, struct obdo *oa) oa->o_dirty = fed->fed_grant + 4 * FILTER_GRANT_CHUNK; obd->u.filter.fo_tot_dirty += oa->o_dirty - fed->fed_dirty; if (fed->fed_grant < oa->o_dropped) { - CDEBUG(D_HA,"%s: cli %s/%p reports %u dropped > fedgrant %lu\n", + CDEBUG(D_CACHE,"%s: cli %s/%p reports %u dropped > grant %lu\n", obd->obd_name, exp->exp_client_uuid.uuid, exp, oa->o_dropped, fed->fed_grant); oa->o_dropped = 0; @@ -404,7 +391,7 @@ static int filter_grant_check(struct obd_export *exp, struct obdo *oa, struct filter_export_data *fed = &exp->exp_filter_data; int blocksize = exp->exp_obd->u.obt.obt_sb->s_blocksize; unsigned long used = 0, ungranted = 0, using; - int i, rc = -ENOSPC, obj, n = 0, mask = D_CACHE; + int i, rc = -ENOSPC, obj, n = 0; LASSERT_SPIN_LOCKED(&exp->exp_obd->obd_osfs_lock); @@ -428,7 +415,6 @@ static int filter_grant_check(struct obd_export *exp, struct obdo *oa, exp->exp_obd->obd_name, exp->exp_client_uuid.uuid, exp, used, bytes, fed->fed_grant, n); - mask = D_RPCTRACE; } else { used += bytes; rnb[n].flags |= OBD_BRW_GRANTED; @@ -472,7 +458,7 @@ static int filter_grant_check(struct obd_export *exp, struct obdo *oa, exp->exp_obd->u.filter.fo_tot_granted += ungranted; exp->exp_obd->u.filter.fo_tot_pending += used + ungranted; - CDEBUG(mask, + CDEBUG(D_CACHE, "%s: cli %s/%p used: %lu ungranted: %lu grant: %lu dirty: %lu\n", exp->exp_obd->obd_name, exp->exp_client_uuid.uuid, exp, used, ungranted, fed->fed_grant, fed->fed_dirty); diff --git a/lustre/obdfilter/filter_log.c b/lustre/obdfilter/filter_log.c index 63d7ad8..b5cd83e 100644 --- a/lustre/obdfilter/filter_log.c +++ b/lustre/obdfilter/filter_log.c @@ -155,13 +155,13 @@ static int filter_recov_log_unlink_cb(struct llog_ctxt *ctxt, rc = filter_destroy(exp, oa, NULL, NULL, NULL); OBDO_FREE(oa); if (rc == -ENOENT) { - CDEBUG(D_HA, "object already removed, send cookie\n"); + CDEBUG(D_RPCTRACE, "object already removed, send cookie\n"); llog_cancel(ctxt, NULL, 1, cookie, 0); RETURN(0); } if (rc == 0) - CDEBUG(D_HA, "object: "LPU64" in record is destroyed\n", oid); + CDEBUG(D_RPCTRACE, "object "LPU64" is destroyed\n", oid); RETURN(rc); } @@ -199,13 +199,13 @@ static int filter_recov_log_setattr_cb(struct llog_ctxt *ctxt, OBDO_FREE(oinfo.oi_oa); if (rc == -ENOENT) { - CDEBUG(D_HA, "object already removed, send cookie\n"); + CDEBUG(D_RPCTRACE, "object already removed, send cookie\n"); llog_cancel(ctxt, NULL, 1, cookie, 0); RETURN(0); } if (rc == 0) - CDEBUG(D_HA, "object: "LPU64" in record is chown/chgrp\n", oid); + CDEBUG(D_RPCTRACE, "object "LPU64" is chown/chgrp\n", oid); RETURN(rc); } diff --git a/lustre/osc/osc_create.c b/lustre/osc/osc_create.c index 6962150..a644f7c 100644 --- a/lustre/osc/osc_create.c +++ b/lustre/osc/osc_create.c @@ -157,7 +157,7 @@ static int oscc_internal_create(struct osc_creator *oscc) LASSERT(body->oa.o_gr > 0); body->oa.o_valid |= OBD_MD_FLID | OBD_MD_FLGROUP; spin_unlock(&oscc->oscc_lock); - CDEBUG(D_HA, "preallocating through id "LPU64" (last seen "LPU64")\n", + CDEBUG(D_RPCTRACE, "prealloc through id "LPU64" (last seen "LPU64")\n", body->oa.o_id, oscc->oscc_last_id); ptlrpc_req_set_repsize(request, 2, size); @@ -314,16 +314,13 @@ int osc_create(struct obd_export *exp, struct obdo *oa, } oscc->oscc_flags |= OSCC_FLAG_SYNC_IN_PROGRESS; spin_unlock(&oscc->oscc_lock); - CDEBUG(D_HA, "%s: oscc recovery started\n", - oscc->oscc_obd->obd_name); + CDEBUG(D_HA, "%s: oscc recovery started - delete to "LPU64"\n", + oscc->oscc_obd->obd_name, oscc->oscc_next_id - 1); /* delete from next_id on up */ oa->o_valid |= OBD_MD_FLID; oa->o_id = oscc->oscc_next_id - 1; - CDEBUG(D_HA, "%s: deleting to next_id: "LPU64"\n", - oscc->oscc_obd->obd_name, oa->o_id); - rc = osc_real_create(exp, oa, ea, NULL); spin_lock(&oscc->oscc_lock); @@ -360,8 +357,8 @@ int osc_create(struct obd_export *exp, struct obdo *oa, if (oscc_recovering(oscc)) { struct l_wait_info lwi; - CDEBUG(D_HA,"%p: oscc recovery in progress, waiting\n", - oscc); + CDEBUG(D_HA,"%s: oscc recovery in progress, waiting\n", + oscc->oscc_obd->obd_name); lwi = LWI_TIMEOUT(cfs_timeout_cap(cfs_time_seconds(obd_timeout/4)), NULL, NULL); @@ -369,12 +366,12 @@ int osc_create(struct obd_export *exp, struct obdo *oa, !oscc_recovering(oscc), &lwi); LASSERT(rc == 0 || rc == -ETIMEDOUT); if (rc == -ETIMEDOUT) { - CDEBUG(D_HA,"%p: timeout waiting on recovery\n", - oscc); + CDEBUG(D_HA,"%s: timeout waiting on recovery\n", + oscc->oscc_obd->obd_name); RETURN(rc); } - CDEBUG(D_HA, "%p: oscc recovery over, waking up\n", - oscc); + CDEBUG(D_HA, "%s: oscc recovery over, waking up\n", + oscc->oscc_obd->obd_name); } spin_lock(&oscc->oscc_lock); @@ -391,7 +388,7 @@ int osc_create(struct obd_export *exp, struct obdo *oa, oscc->oscc_next_id++; try_again = 0; - CDEBUG(D_HA, "%s: set oscc_next_id = "LPU64"\n", + CDEBUG(D_RPCTRACE, "%s: set oscc_next_id = "LPU64"\n", exp->exp_obd->obd_name, oscc->oscc_next_id); } else if (oscc->oscc_flags & OSCC_FLAG_NOSPC) { rc = -ENOSPC; @@ -405,7 +402,7 @@ int osc_create(struct obd_export *exp, struct obdo *oa, } if (rc == 0) - CDEBUG(D_HA, "%s: returning objid "LPU64"\n", + CDEBUG(D_INFO, "%s: returning objid "LPU64"\n", obd2cli_tgt(oscc->oscc_obd), lsm->lsm_object_id); else if (*ea == NULL) obd_free_memmd(exp, &lsm); diff --git a/lustre/osc/osc_internal.h b/lustre/osc/osc_internal.h index 72ce3ec..334afa8 100644 --- a/lustre/osc/osc_internal.h +++ b/lustre/osc/osc_internal.h @@ -68,11 +68,6 @@ int lproc_osc_attach_seqstat(struct obd_device *dev); static inline int lproc_osc_attach_seqstat(struct obd_device *dev) {return 0;} #endif -#ifndef min_t -#define min_t(type,x,y) \ - ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; }) -#endif - static inline int osc_recoverable_error(int rc) { return (rc == -EIO || rc == -EROFS || rc == -ENOMEM || rc == -EAGAIN); @@ -82,8 +77,12 @@ static inline int osc_recoverable_error(int rc) static inline int osc_should_resend(int resend, struct client_obd *cli) { return atomic_read(&cli->cl_resends) ? - atomic_read(&cli->cl_resends) > resend : 1; + atomic_read(&cli->cl_resends) > resend : 1; } +#ifndef min_t +#define min_t(type,x,y) \ + ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; }) +#endif #endif /* OSC_INTERNAL_H */ diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 4c8975c..ad5ec80 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -63,9 +63,6 @@ extern quota_interface_t osc_quota_interface; static void osc_release_ppga(struct brw_page **ppga, obd_count count); -/* by default 10s */ -atomic_t osc_resend_time; - /* Pack OSC object metadata for disk storage (LE byte order). */ static int osc_packmd(struct obd_export *exp, struct lov_mds_md **lmmp, struct lov_stripe_md *lsm) @@ -453,13 +450,12 @@ int osc_real_create(struct obd_export *exp, struct obdo *oa, CDEBUG(D_HA, "transno: "LPD64"\n", lustre_msg_get_transno(req->rq_repmsg)); - EXIT; out_req: ptlrpc_req_finished(req); out: if (rc && !*ea) obd_free_memmd(exp, &lsm); - return rc; + RETURN(rc); } static int osc_punch_interpret(struct ptlrpc_request *req, @@ -628,7 +624,8 @@ static int osc_destroy(struct obd_export *exp, struct obdo *oa, LDLM_FL_DISCARD_DATA); if (exp_connect_cancelset(exp) && count) { bufcount = 3; - size[REQ_REC_OFF + 1] = ldlm_request_bufsize(count,OST_DESTROY); + size[REQ_REC_OFF + 1] = ldlm_request_bufsize(count, + OST_DESTROY); } req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_OST_VERSION, OST_DESTROY, bufcount, size, NULL); @@ -3400,7 +3397,7 @@ static int osc_setinfo_mds_conn_interpret(struct ptlrpc_request *req, imp->imp_server_timeout = 1; imp->imp_pingable = 1; spin_unlock(&imp->imp_lock); - CDEBUG(D_HA, "pinging OST %s\n", obd2cli_tgt(imp->imp_obd)); + CDEBUG(D_RPCTRACE, "pinging OST %s\n", obd2cli_tgt(imp->imp_obd)); RETURN(rc); } @@ -3476,7 +3473,7 @@ static int osc_set_info_async(struct obd_export *exp, obd_count keylen, if (req == NULL) RETURN(-ENOMEM); - if (KEY_IS("mds_conn")) { + if (KEY_IS(KEY_MDS_CONN)) { struct osc_creator *oscc = &obd->u.cli.cl_oscc; oscc->oscc_oa.o_gr = (*(__u32 *)val); diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index ddbe389..0beb1ac 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -1062,7 +1062,7 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti) * grant info will be cleared for resent req, then fed_grant and * total_grant will not be modified in following preprw_write */ if (lustre_msg_get_flags(req->rq_reqmsg) & (MSG_RESENT | MSG_REPLAY)) { - DEBUG_REQ(D_CACHE, req, "clear resent/replay req grant info\n"); + DEBUG_REQ(D_CACHE, req, "clear resent/replay req grant info"); body->oa.o_valid &= ~OBD_MD_FLGRANT; } @@ -1339,7 +1339,7 @@ static int ost_handle_quotacheck(struct ptlrpc_request *req) } static int ost_llog_handle_connect(struct obd_export *exp, - struct ptlrpc_request *req) + struct ptlrpc_request *req) { struct llogd_conn_body *body; int rc; diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index cfa8e1f..d41c6c9 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -1228,7 +1228,7 @@ int ptlrpc_set_wait(struct ptlrpc_request_set *set) /* wait until all complete, interrupted, or an in-flight * req times out */ - CDEBUG(D_HA, "set %p going to sleep for %d seconds\n", + CDEBUG(D_RPCTRACE, "set %p going to sleep for %d seconds\n", set, timeout); lwi = LWI_TIMEOUT_INTR(cfs_time_seconds(timeout ? timeout : 1), ptlrpc_expired_set, @@ -1424,12 +1424,12 @@ void ptlrpc_free_committed(struct obd_import *imp) if (imp->imp_peer_committed_transno == imp->imp_last_transno_checked && imp->imp_generation == imp->imp_last_generation_checked) { - CDEBUG(D_HA, "%s: skip recheck for last_committed "LPU64"\n", + CDEBUG(D_RPCTRACE, "%s: skip recheck: last_committed "LPU64"\n", imp->imp_obd->obd_name, imp->imp_peer_committed_transno); return; } - - CDEBUG(D_HA, "%s: committing for last_committed "LPU64" gen %d\n", + + CDEBUG(D_RPCTRACE, "%s: committing for last_committed "LPU64" gen %d\n", imp->imp_obd->obd_name, imp->imp_peer_committed_transno, imp->imp_generation); imp->imp_last_transno_checked = imp->imp_peer_committed_transno; @@ -1443,22 +1443,22 @@ void ptlrpc_free_committed(struct obd_import *imp) last_req = req; if (req->rq_import_generation < imp->imp_generation) { - DEBUG_REQ(D_HA, req, "freeing request with old gen"); + DEBUG_REQ(D_RPCTRACE, req, "free request with old gen"); GOTO(free_req, 0); } if (req->rq_replay) { - DEBUG_REQ(D_HA, req, "keeping (FL_REPLAY)"); + DEBUG_REQ(D_RPCTRACE, req, "keeping (FL_REPLAY)"); continue; } /* not yet committed */ if (req->rq_transno > imp->imp_peer_committed_transno) { - DEBUG_REQ(D_HA, req, "stopping search"); + DEBUG_REQ(D_RPCTRACE, req, "stopping search"); break; } - DEBUG_REQ(D_HA, req, "committing (last_committed "LPU64")", + DEBUG_REQ(D_RPCTRACE, req, "commit (last_committed "LPU64")", imp->imp_peer_committed_transno); free_req: spin_lock(&req->rq_lock); @@ -1927,7 +1927,7 @@ void ptlrpc_abort_inflight(struct obd_import *imp) struct ptlrpc_request *req = list_entry(tmp, struct ptlrpc_request, rq_list); - DEBUG_REQ(D_HA, req, "inflight"); + DEBUG_REQ(D_RPCTRACE, req, "inflight"); spin_lock (&req->rq_lock); if (req->rq_import_generation < imp->imp_generation) { @@ -1941,7 +1941,7 @@ void ptlrpc_abort_inflight(struct obd_import *imp) struct ptlrpc_request *req = list_entry(tmp, struct ptlrpc_request, rq_list); - DEBUG_REQ(D_HA, req, "aborting waiting req"); + DEBUG_REQ(D_RPCTRACE, req, "aborting waiting req"); spin_lock (&req->rq_lock); if (req->rq_import_generation < imp->imp_generation) { diff --git a/lustre/ptlrpc/events.c b/lustre/ptlrpc/events.c index d2693fe..41352f1 100644 --- a/lustre/ptlrpc/events.c +++ b/lustre/ptlrpc/events.c @@ -224,7 +224,7 @@ void request_in_callback(lnet_event_t *ev) if (ev->unlinked) { service->srv_nrqbd_receiving--; - CDEBUG(D_RPCTRACE,"Buffer complete: %d buffers still posted\n", + CDEBUG(D_INFO, "Buffer complete: %d buffers still posted\n", service->srv_nrqbd_receiving); /* Normally, don't complain about 0 buffers posted; LNET won't diff --git a/lustre/ptlrpc/import.c b/lustre/ptlrpc/import.c index 3276811..35a8aa8 100644 --- a/lustre/ptlrpc/import.c +++ b/lustre/ptlrpc/import.c @@ -731,7 +731,8 @@ finish: GOTO(out, rc = -ENODEV); } exp->exp_connect_flags = ocd->ocd_connect_flags; - imp->imp_obd->obd_self_export->exp_connect_flags = ocd->ocd_connect_flags; + imp->imp_obd->obd_self_export->exp_connect_flags = + ocd->ocd_connect_flags; class_export_put(exp); obd_import_event(imp->imp_obd, imp, IMP_EVENT_OCD); @@ -773,7 +774,8 @@ finish: ocd->ocd_brw_size >> CFS_PAGE_SHIFT; } - imp->imp_obd->obd_namespace->ns_connect_flags = ocd->ocd_connect_flags; + imp->imp_obd->obd_namespace->ns_connect_flags = + ocd->ocd_connect_flags; LASSERT((cli->cl_max_pages_per_rpc <= PTLRPC_MAX_BRW_PAGES) && (cli->cl_max_pages_per_rpc > 0)); diff --git a/lustre/ptlrpc/lproc_ptlrpc.c b/lustre/ptlrpc/lproc_ptlrpc.c index 5bacccd..4b453b0 100644 --- a/lustre/ptlrpc/lproc_ptlrpc.c +++ b/lustre/ptlrpc/lproc_ptlrpc.c @@ -55,8 +55,8 @@ struct ll_rpc_opcode { { OST_OPEN, "ost_open" }, { OST_CLOSE, "ost_close" }, { OST_STATFS, "ost_statfs" }, - { 14, "ost_san_read" }, - { 15, "ost_san_write" }, + { 14, NULL }, /* formerly OST_SAN_READ */ + { 15, NULL }, /* formerly OST_SAN_WRITE */ { OST_SYNC, "ost_sync" }, { OST_SET_INFO, "ost_set_info" }, { OST_QUOTACHECK, "ost_quotacheck" }, @@ -96,15 +96,15 @@ struct ll_rpc_opcode { { OBD_PING, "obd_ping" }, { OBD_LOG_CANCEL, "llog_origin_handle_cancel" }, { OBD_QC_CALLBACK, "obd_qc_callback" }, - { LLOG_ORIGIN_HANDLE_CREATE, "llog_origin_handle_create" }, + { LLOG_ORIGIN_HANDLE_CREATE, "llog_origin_handle_create" }, { LLOG_ORIGIN_HANDLE_NEXT_BLOCK, "llog_origin_handle_next_block" }, - { LLOG_ORIGIN_HANDLE_READ_HEADER, "llog_origin_handle_read_header" }, - { LLOG_ORIGIN_HANDLE_WRITE_REC, "llog_origin_handle_write_rec" }, - { LLOG_ORIGIN_HANDLE_CLOSE, "llog_origin_handle_close" }, - { LLOG_ORIGIN_CONNECT, "llog_origin_connect" }, - { LLOG_CATINFO, "llog_catinfo" }, + { LLOG_ORIGIN_HANDLE_READ_HEADER,"llog_origin_handle_read_header" }, + { LLOG_ORIGIN_HANDLE_WRITE_REC, "llog_origin_handle_write_rec" }, + { LLOG_ORIGIN_HANDLE_CLOSE, "llog_origin_handle_close" }, + { LLOG_ORIGIN_CONNECT, "llog_origin_connect" }, + { LLOG_CATINFO, "llog_catinfo" }, { LLOG_ORIGIN_HANDLE_PREV_BLOCK, "llog_origin_handle_prev_block" }, - { LLOG_ORIGIN_HANDLE_DESTROY, "llog_origin_handle_destroy" }, + { LLOG_ORIGIN_HANDLE_DESTROY, "llog_origin_handle_destroy" }, { FLD_QUERY, "fld_query" }, { SEQ_QUERY, "seq_query" }, { SEC_CTX_INIT, "sec_ctx_init" }, diff --git a/lustre/ptlrpc/pinger.c b/lustre/ptlrpc/pinger.c index ba7aa39..4d5a9c9 100644 --- a/lustre/ptlrpc/pinger.c +++ b/lustre/ptlrpc/pinger.c @@ -595,8 +595,8 @@ static int pinger_check_rpcs(void *arg) req->rq_import_generation = generation; ptlrpc_set_add_req(set, req); } else { - CDEBUG(D_HA, "don't need to ping %s ("CFS_TIME_T" > " - CFS_TIME_T")\n", obd2cli_tgt(imp->imp_obd), + CDEBUG(D_INFO, "don't need to ping %s ("CFS_TIME_T + " > "CFS_TIME_T")\n", obd2cli_tgt(imp->imp_obd), imp->imp_next_ping, pd->pd_this_ping); } } @@ -605,13 +605,13 @@ static int pinger_check_rpcs(void *arg) /* Might be empty, that's OK. */ if (set->set_remaining == 0) - CDEBUG(D_HA, "nothing to ping\n"); + CDEBUG(D_RPCTRACE, "nothing to ping\n"); list_for_each(iter, &set->set_requests) { struct ptlrpc_request *req = list_entry(iter, struct ptlrpc_request, rq_set_chain); - DEBUG_REQ(D_HA, req, "pinging %s->%s", + DEBUG_REQ(D_RPCTRACE, req, "pinging %s->%s", req->rq_import->imp_obd->obd_uuid.uuid, obd2cli_tgt(req->rq_import->imp_obd)); (void)ptl_send_rpc(req, 0); @@ -621,10 +621,9 @@ do_check_set: rc = ptlrpc_check_set(set); /* not finished, and we are not expired, simply return */ - if (!rc && cfs_time_before(curtime, - cfs_time_add(pd->pd_this_ping, - cfs_time_seconds(PING_INTERVAL)))) { - CDEBUG(D_HA, "not finished, but also not expired\n"); + if (!rc && cfs_time_before(curtime, cfs_time_add(pd->pd_this_ping, + cfs_time_seconds(PING_INTERVAL)))) { + CDEBUG(D_RPCTRACE, "not finished, but also not expired\n"); pd->pd_recursion--; return 0; } @@ -647,7 +646,7 @@ do_check_set: continue; } - CDEBUG(D_HA, "pinger initiate expire_one_request\n"); + CDEBUG(D_RPCTRACE, "pinger initiate expire_one_request\n"); ptlrpc_expire_one_request(req); } mutex_up(&pinger_sem); @@ -660,7 +659,7 @@ out: cfs_time_seconds(PING_INTERVAL)); pd->pd_this_ping = 0; /* XXX for debug */ - CDEBUG(D_HA, "finished a round ping\n"); + CDEBUG(D_INFO, "finished a round ping\n"); pd->pd_recursion--; return 0; } @@ -743,9 +742,8 @@ void ptlrpc_pinger_wake_up() struct obd_import *imp; ENTRY; list_for_each_entry(imp, &pinger_imports, imp_pinger_chain) { - CDEBUG(D_HA, "Checking that we need to do anything about import" - " %s->%s\n", imp->imp_obd->obd_uuid.uuid, - obd2cli_tgt(imp->imp_obd)); + CDEBUG(D_RPCTRACE, "checking import %s->%s\n", + imp->imp_obd->obd_uuid.uuid, obd2cli_tgt(imp->imp_obd)); #ifdef ENABLE_LIBLUSTRE_RECOVERY if (imp->imp_state == LUSTRE_IMP_DISCON && !imp->imp_deactive) #else diff --git a/lustre/ptlrpc/recov_thread.c b/lustre/ptlrpc/recov_thread.c index 6fe00c8..d3b473d 100644 --- a/lustre/ptlrpc/recov_thread.c +++ b/lustre/ptlrpc/recov_thread.c @@ -153,7 +153,7 @@ int llog_obd_repl_cancel(struct llog_ctxt *ctxt, mutex_down(&ctxt->loc_sem); if (ctxt->loc_imp == NULL) { - CDEBUG(D_HA, "no import for ctxt %p\n", ctxt); + CDEBUG(D_RPCTRACE, "no import for ctxt %p\n", ctxt); GOTO(out, rc = 0); } @@ -184,7 +184,7 @@ int llog_obd_repl_cancel(struct llog_ctxt *ctxt, if ((llcd->llcd_size - llcd->llcd_cookiebytes) < sizeof(*cookies) || (flags & OBD_LLOG_FL_SENDNOW)) { - CDEBUG(D_HA, "send llcd %p:%p\n", llcd, llcd->llcd_ctxt); + CDEBUG(D_RPCTRACE, "send llcd %p:%p\n", llcd, llcd->llcd_ctxt); ctxt->loc_llcd = NULL; llcd_send(llcd); } @@ -200,7 +200,7 @@ int llog_obd_repl_sync(struct llog_ctxt *ctxt, struct obd_export *exp) ENTRY; if (exp && (ctxt->loc_imp == exp->exp_imp_reverse)) { - CDEBUG(D_HA, "reverse import disconnected, put llcd %p:%p\n", + CDEBUG(D_RPCTRACE,"reverse import disconnect, put llcd %p:%p\n", ctxt->loc_llcd, ctxt); mutex_down(&ctxt->loc_sem); if (ctxt->loc_llcd != NULL) { @@ -335,7 +335,7 @@ static int log_commit_thread(void *arg) list_del(&llcd->llcd_list); if (llcd->llcd_cookiebytes == 0) { - CDEBUG(D_HA, "put empty llcd %p:%p\n", + CDEBUG(D_RPCTRACE, "put empty llcd %p:%p\n", llcd, llcd->llcd_ctxt); llcd_put(llcd); continue; diff --git a/lustre/ptlrpc/service.c b/lustre/ptlrpc/service.c index 2f3b02f..04cd9f6 100644 --- a/lustre/ptlrpc/service.c +++ b/lustre/ptlrpc/service.c @@ -665,7 +665,7 @@ ptlrpc_server_handle_request(struct ptlrpc_service *svc, request->rq_export->exp_obd->obd_fail)) { /* Failing over, don't handle any more reqs, send error response instead. */ - CDEBUG(D_HA, "Dropping req %p for failed obd %s\n", + CDEBUG(D_RPCTRACE,"Dropping req %p for failed obd %s\n", request, request->rq_export->exp_obd->obd_name); request->rq_status = -ENODEV; ptlrpc_error(request); @@ -750,7 +750,7 @@ put_conn: request->rq_transno, request->rq_status, reply ? lustre_msg_get_status(request->rq_repmsg) : -999); else - CDEBUG(D_HA, "request "LPU64" opc %u from %s processed in " + CDEBUG(D_RPCTRACE,"request "LPU64" opc %u from %s processed in " "%ldus (%ldus total) trans "LPU64" rc %d/%d\n", request->rq_xid, request->rq_reqmsg ? diff --git a/lustre/quota/quota_context.c b/lustre/quota/quota_context.c index 9eb829b..c529bed 100644 --- a/lustre/quota/quota_context.c +++ b/lustre/quota/quota_context.c @@ -87,8 +87,8 @@ int qunit_cache_init(void) LASSERT(qunit_cachep == NULL); qunit_cachep = cfs_mem_cache_create("ll_qunit_cache", - sizeof(struct lustre_qunit), - 0, 0); + sizeof(struct lustre_qunit), + 0, 0); if (!qunit_cachep) RETURN(-ENOMEM); diff --git a/lustre/quota/quota_interface.c b/lustre/quota/quota_interface.c index 09a6b20cf..6d7849f 100644 --- a/lustre/quota/quota_interface.c +++ b/lustre/quota/quota_interface.c @@ -655,8 +655,8 @@ int osc_quota_init(void) LASSERT(qinfo_cachep == NULL); qinfo_cachep = cfs_mem_cache_create("osc_quota_info", - sizeof(struct osc_quota_info), - 0, 0); + sizeof(struct osc_quota_info), + 0, 0); if (!qinfo_cachep) RETURN(-ENOMEM); diff --git a/lustre/quota/quota_master.c b/lustre/quota/quota_master.c index f892107..f09b7c3 100644 --- a/lustre/quota/quota_master.c +++ b/lustre/quota/quota_master.c @@ -48,8 +48,8 @@ int lustre_dquot_init(void) LASSERT(lustre_dquot_cachep == NULL); lustre_dquot_cachep = cfs_mem_cache_create("lustre_dquot_cache", - sizeof(struct lustre_dquot), - 0, 0); + sizeof(struct lustre_dquot), + 0, 0); if (!lustre_dquot_cachep) return (-ENOMEM); -- 1.8.3.1