#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)
#include <linux/proc_fs.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
+#ifndef HAVE___D_REHASH
#define __d_rehash(dentry, lock) d_rehash_cond(dentry, lock)
#endif
#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)
{
#include <linux/lustre_version.h>
-#ifndef LUSTRE_KERNEL_VERSION
+#ifndef HAVE_VFS_INTENT_PATCHES
#define IT_OPEN (1 << 0)
#define IT_CREAT (1 << 1)
# include <linux/posix_acl_xattr.h>
# endif
# endif
-# ifndef LUSTRE_KERNEL_VERSION
+# ifndef HAVE_VFS_INTENT_PATCHES
# include <linux/lustre_intent.h>
# endif
#endif
#define LUSTRE_PATCHLESS_COMPAT_H
#include <linux/lustre_version.h>
-#ifndef LUSTRE_KERNEL_VERSION
#include <linux/fs.h>
#ifndef HAVE_TRUNCATE_COMPLETE_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)
{
}
#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
#define ATTR_RAW 0
#endif
-#endif /* LUSTRE_KERNEL_VERSION */
-
#endif
{
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);
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);
}
}
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);
}
while (!list_empty(&ns->ns_unused_list)) {
struct ldlm_pool *pl = &ns->ns_pool;
+ LASSERT(unused >= 0);
+
if (max && added >= max)
break;
/* 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);
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);
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;
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));
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.
*
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
RETURN (0);
}
-#ifdef LUSTRE_KERNEL_VERSION
+#ifdef DCACHE_LUSTRE_INVALID
if (!(dentry->d_flags & DCACHE_LUSTRE_INVALID)) {
#else
if (!d_unhashed(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))
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",
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
}
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
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);
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; */
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);
return;
}
-#ifdef LUSTRE_KERNEL_VERSION
+#ifdef HAVE_VFS_INTENT_PATCHES
static int ll_revalidate_nd(struct dentry *dentry, struct nameidata *nd)
{
int rc;
.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
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 */
};
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,
#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;
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
};
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)
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
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);
}
static struct dentry_operations ll_d_root_ops = {
-#ifdef LUSTRE_KERNEL_VERSION
+#ifdef DCACHE_LUSTRE_INVALID
.d_compare = ll_dcompare,
#endif
};
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);
}
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);
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);
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);
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)
{
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)
{
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);
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);
}
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,
};
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,
* along with Lustre; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
#ifndef AUTOCONF_INCLUDED
#include <linux/config.h>
#endif
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);
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);
}
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);
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;
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;
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,
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. <info@clusterfs.com>");
{
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;
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;
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,
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;
}
}
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);
}
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));
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");
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);
}
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;
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);
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);
}
}
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);
}
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);
}
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)
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);
}
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))
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);
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,
int err;
__u64 transno, prev_transno;
loff_t off;
- int log_pri = D_HA;
+ int log_pri = D_RPCTRACE;
ENTRY;
if (IS_ERR(handle)) {
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);
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);
*/
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);
}
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);
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) {
}
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);
}
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 ++;
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 */
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);
}
}
}
}
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);
}
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;
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 = 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,
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;
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;
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);
}
}
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);
}
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);
{
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);
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);
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;
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);
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;
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);
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);
}
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);
}
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);
}
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);
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);
!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);
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;
}
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);
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);
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 */
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)
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,
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);
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);
}
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);
* 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;
}
}
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;
/* 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,
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;
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);
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) {
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) {
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
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);
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));
{ 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" },
{ 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" },
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);
}
}
/* 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);
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;
}
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);
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;
}
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
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);
}
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);
}
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) {
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;
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);
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 ?
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);
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);
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);