r->ur_reclen = NTOH__u32(hdr->ur_reclen);
if (len < sizeof(*hdr) || len != r->ur_reclen) {
- printk(__FUNCTION__ ": invalid buffer length\n");
+ CERROR("invalid buffer length\n");
return -EFAULT;
}
r->ur_opcode = NTOH__u32(hdr->ur_opcode);
struct mds_rec_setattr *rec = (struct mds_rec_setattr *)buf;
if (len < sizeof(*rec)) {
- printk(__FUNCTION__ "invalid buffer length\n");
+ CERROR("invalid buffer length\n");
return -EFAULT;
}
char *ptr, *end;
if (len < sizeof(*rec)) {
- printk(__FUNCTION__ "invalid buffer length\n");
+ CERROR("invalid buffer length\n");
return -EFAULT;
}
char *ptr, *end;
if (len < sizeof(*rec)) {
- printk(__FUNCTION__ "invalid buffer length\n");
+ CERROR("invalid buffer length\n");
return -EFAULT;
}
ENTRY;
if (len < sizeof(*rec)) {
- printk(__FUNCTION__ "invalid buffer length\n");
+ CERROR("invalid buffer length\n");
return -EFAULT;
}
char *ptr, *end;
if (len < sizeof(*rec)) {
- printk(__FUNCTION__ "invalid buffer length\n");
+ CERROR("invalid buffer length\n");
return -EFAULT;
}
/* Too bad, we had an error */
Ebadsize:
- printk("ext2_check_page"
+ CERROR("ext2_check_page"
"size of directory #%lu is not a multiple of chunk size",
dir->i_ino
);
//Einumber:
// error = "inode out of bounds";
bad_entry:
- printk("ext2_check_page: bad entry in directory #%lu: %s - "
+ CERROR("ext2_check_page: bad entry in directory #%lu: %s - "
"offset=%lu, inode=%lu, rec_len=%d, name_len=%d",
dir->i_ino, error, (page->index<<PAGE_CACHE_SHIFT)+offs,
(unsigned long) le32_to_cpu(p->inode),
goto fail;
Eend:
p = (ext2_dirent *)(kaddr + offs);
- printk("ext2_check_page"
+ CERROR("ext2_check_page"
"entry in directory #%lu spans the page boundary"
"offset=%lu, inode=%lu",
dir->i_ino, (page->index<<PAGE_CACHE_SHIFT)+offs,
name_len = EXT2_DIR_REC_LEN(de->name_len);
rec_len = le16_to_cpu(de->rec_len);
if ( n==npages && rec_len == 0) {
- printk("Fatal dir behaviour\n");
+ CERROR("Fatal dir behaviour\n");
goto out_page;
}
if (!de->inode && rec_len >= reclen)
err = mdc_getattr(sbi->ll_peer_ptr, ino, type,
OBD_MD_FLNOTOBD|OBD_MD_FLBLOCKS, &rep, &hdr);
if ( err ) {
- printk(__FUNCTION__ ": obdo_fromid failed\n");
+ CERROR("obdo_fromid failed\n");
EXIT;
return ERR_PTR(-EACCES);
}
inode = iget4(dir->i_sb, rep->ino, NULL, rep);
if (IS_ERR(inode)) {
- printk(__FUNCTION__ ": new_inode -fatal: %ld\n",
- PTR_ERR(inode));
+ CERROR("new_inode -fatal: %ld\n", PTR_ERR(inode));
EXIT;
return ERR_PTR(-EIO);
}
if (!list_empty(&inode->i_dentry)) {
- printk("new_inode -fatal: aliases %d, ct %d lnk %d\n",
+ CERROR("new_inode -fatal: aliases %d, ct %d lnk %d\n",
rep->ino, atomic_read(&inode->i_count),
inode->i_nlink);
iput(inode);
struct ll_inode_info *oinfo = ll_i2info(inode);
struct obdo *oa = obdo_alloc();
if ( !oa ) {
- printk(__FUNCTION__ ": no memory to allocate obdo!\n");
+ CERROR("no memory to allocate obdo!\n");
return NULL;
}
oa->o_valid = valid;
SetPageUptodate(page);
set_page_clean(page);
} else {
- printk(__FUNCTION__ ": ll_brw failure %d\n", err);
+ CERROR("ll_brw failure %d\n", err);
}
EXIT;
return err;
/* do NOT truncate */
err = ll_inode_setattr(inode, &iattr, 0);
if (err) {
- printk(__FUNCTION__ ": failed - %d.\n", err);
+ CERROR("failed - %d.\n", err);
obdo_free(oa);
EXIT;
return -EIO;
oa = ll_oa_from_inode(inode, OBD_MD_FLNOTOBD);
if ( !oa ) {
- printk(__FUNCTION__ ": no memory to allocate obdo!\n");
+ CERROR("no memory to allocate obdo!\n");
return;
}
obdo_free(oa);
if (err) {
- printk(__FUNCTION__ ": obd_truncate fails (%d)\n", err);
+ CERROR("obd_truncate fails (%d)\n", err);
}
EXIT;
return;
value++;
OBD_ALLOC(retval, strlen(value) + 1);
if ( !retval ) {
- printk(KERN_ALERT __FUNCTION__ ": out of memory!\n");
+ CERROR("out of memory!\n");
return NULL;
}
memset(sbi, 0, sizeof(*sbi));
ll_options(data, &device, &version);
- printk(__FUNCTION__ "line %d\n", __LINE__);
+
if ( !device ) {
- printk(__FUNCTION__ ": no device\n");
+ CERROR("no device\n");
sb = NULL;
goto ERR;
}
devno = simple_strtoul(device, NULL, 0);
if ( devno >= MAX_OBD_DEVICES ) {
- printk(__FUNCTION__ ": device of %s too high\n", device);
+ CERROR("device of %s too high\n", device);
sb = NULL;
goto ERR;
}
sbi->ll_conn.oc_dev = &obd_dev[devno];
err = obd_connect(&sbi->ll_conn);
if ( err ) {
- printk(__FUNCTION__ "cannot connect to %s\n", device);
+ CERROR("cannot connect to %s\n", device);
sb = NULL;
goto ERR;
}
sb->s_blocksize_bits = (unsigned char)PAGE_SHIFT;
sb->s_magic = LL_SUPER_MAGIC;
sb->s_op = &ll_super_operations;
- printk(__FUNCTION__ "line %d\n", __LINE__);
/* make root inode */
err = mdc_getattr(sbi->ll_peer_ptr, sbi->ll_rootino, S_IFDIR,
OBD_MD_FLNOTOBD|OBD_MD_FLBLOCKS,
&rep, &hdr);
if (err) {
- printk(__FUNCTION__ ": mds_getattr failed for root %d\n", err);
+ CERROR("mds_getattr failed for root %d\n", err);
sb = NULL;
goto ERR;
}
if (root) {
sb->s_root = d_alloc_root(root);
} else {
- printk("lustre_light: bad iget4 for root\n");
+ CERROR("lustre_light: bad iget4 for root\n");
sb = NULL;
goto ERR;
}
struct obdo *oa;
oa = ll_oa_from_inode(inode, OBD_MD_FLNOTOBD);
if (!oa) {
- printk(__FUNCTION__ ": no memory\n");
+ CERROR("no memory\n");
}
err = obd_destroy(IID(inode), oa);
err = mdc_setattr(sbi->ll_peer_ptr, inode, attr, NULL, &hdr);
if ( err )
- printk(__FUNCTION__ ": ll_setattr fails (%d)\n", err);
+ CERROR("ll_setattr fails (%d)\n", err);
EXIT;
return err;
err = obd_statfs(ID(sb), &tmp);
if ( err ) {
- printk(__FUNCTION__ ": obd_statfs fails (%d)\n", err);
+ CERROR("obd_statfs fails (%d)\n", err);
return err;
}
memcpy(buf, &tmp, sizeof(*buf));
request = mds_prep_req(MDS_REINT, 0, NULL, sizeof(*rec), NULL);
if (!request) {
- printk("mdc request: cannot pack\n");
+ CERROR("mdc request: cannot pack\n");
return -ENOMEM;
}
sizeof(*rec) + size_round0(namelen) +
size_round0(tgtlen), NULL);
if (!request) {
- printk("mdc_create: cannot pack\n");
+ CERROR("mdc_create: cannot pack\n");
return -ENOMEM;
}
request = mds_prep_req(MDS_REINT, 0, NULL,
sizeof(*rec) + size_round0(namelen), NULL);
if (!request) {
- printk("mdc_unlink: cannot pack\n");
+ CERROR("mdc_unlink: cannot pack\n");
return -ENOMEM;
}
request = mds_prep_req(MDS_REINT, 0, NULL,
sizeof(*rec) + size_round0(namelen), NULL);
if (!request) {
- printk("mdc_link: cannot pack\n");
+ CERROR("mdc_link: cannot pack\n");
return -ENOMEM;
}
sizeof(*rec) + size_round0(oldlen)
+ size_round0(newlen), NULL);
if (!request) {
- printk("mdc_link: cannot pack\n");
+ CERROR("mdc_link: cannot pack\n");
return -ENOMEM;
}
OBD_ALLOC(request, sizeof(*request));
if (!request) {
- printk("mds_prep_req: request allocation out of memory\n");
+ CERROR("request allocation out of memory\n");
return NULL;
}
&request->rq_reqhdr, &(request->rq_req.mds),
&request->rq_reqlen, &request->rq_reqbuf);
if (rc) {
- printk("llight request: cannot pack request %d\n", rc);
+ CERROR("llight request: cannot pack request %d\n", rc);
return NULL;
}
- CDEBUG(0, "--> mds_prep_req: len %d, req %p, tgtlen %d\n",
+ CDEBUG(0, "--> len %d, req %p, tgtlen %d\n",
request->rq_reqlen, request->rq_req.mds,
request->rq_req.mds->tgtlen);
request->rq_reqhdr->opc = opcode;
rc = ptl_send_rpc(req, peer);
}
if (rc) {
- printk(__FUNCTION__ ": error %d, opcode %d\n", rc,
+ CERROR("error %d, opcode %d\n", rc,
req->rq_reqhdr->opc);
return -rc;
}
rc = mds_unpack_rep(req->rq_repbuf, req->rq_replen, &req->rq_rephdr,
&req->rq_rep.mds);
if (rc) {
- printk(__FUNCTION__ ": mds_unpack_rep failed: %d\n", rc);
+ CERROR("mds_unpack_rep failed: %d\n", rc);
return rc;
}
request = mds_prep_req(MDS_GETATTR, 0, NULL, 0, NULL);
if (!request) {
- printk("llight request: cannot pack\n");
+ CERROR("llight request: cannot pack\n");
return -ENOMEM;
}
rc = mds_queue_wait(request, peer);
if (rc) {
- printk("llight request: error in handling %d\n", rc);
+ CERROR("llight request: error in handling %d\n", rc);
goto out;
}
request = mds_prep_req(MDS_READPAGE, 0, NULL,
sizeof(struct niobuf), (char *)&niobuf);
if (!request) {
- printk("mdc request: cannot pack\n");
+ CERROR("mdc request: cannot pack\n");
return -ENOMEM;
}
rc = mds_queue_wait(request, peer);
if (rc) {
- printk("mdc request: error in handling %d\n", rc);
+ CERROR("mdc request: error in handling %d\n", rc);
goto out;
}
rc = mds_queue_wait(request, peer);
if (rc) {
- printk("mdc request: error in handling %d\n", rc);
+ CERROR("mdc request: error in handling %d\n", rc);
}
return rc;
switch (cmd) {
case IOC_REQUEST_GETATTR: {
struct ptlrep_hdr *hdr = NULL;
- printk("-- getting attr for ino 2\n");
+ CERROR("-- getting attr for ino 2\n");
err = mdc_getattr(peer_ptr, 2, S_IFDIR, ~0, NULL, &hdr);
if (hdr) {
/* FIXME: there must be a better way to get the size */
OBD_FREE(hdr, sizeof(struct ptlrep_hdr) +
sizeof(struct mds_rep));
}
- printk("-- done err %d\n", err);
+ CERROR("-- done err %d\n", err);
break;
}
err = -ENOMEM;
break;
}
- printk("-- readpage 0 for ino 2\n");
+ CERROR("-- readpage 0 for ino 2\n");
err = mdc_readpage(peer_ptr, 2, S_IFDIR, 0, buf, NULL, &hdr);
- printk("-- done err %d\n", err);
+ CERROR("-- done err %d\n", err);
if (!err) {
- printk("-- status: %d\n", hdr->status);
+ CERROR("-- status: %d\n", hdr->status);
err = hdr->status;
if (hdr)
OBD_FREE(hdr, sizeof(struct ptlrep_hdr) +
iattr.ia_valid = ATTR_MODE | ATTR_ATIME;
err = mdc_setattr(peer_ptr, &inode, &iattr, NULL, &hdr);
- printk("-- done err %d\n", err);
+ CERROR("-- done err %d\n", err);
if (!err) {
- printk("-- status: %d\n", hdr->status);
+ CERROR("-- status: %d\n", hdr->status);
err = hdr->status;
} else {
OBD_FREE(hdr, sizeof(struct ptlrep_hdr) +
"foofile", strlen("foofile"),
NULL, 0, 0100707, 47114711,
11, 47, 0, NULL, &hdr);
- printk("-- done err %d\n", err);
+ CERROR("-- done err %d\n", err);
if (!err) {
- printk("-- status: %d\n", hdr->status);
+ CERROR("-- status: %d\n", hdr->status);
err = hdr->status;
}
OBD_FREE(hdr, sizeof(struct ptlrep_hdr) +
|| (generation && inode->i_generation != generation)
) {
/* we didn't find the right inode.. */
- printk(__FUNCTION__
- "bad inode %lu, link: %d ct: %d or version %u/%u\n",
+ CERROR("bad inode %lu, link: %d ct: %d or version %u/%u\n",
inode->i_ino,
inode->i_nlink, atomic_read(&inode->i_count),
inode->i_generation,
&req->rq_replen, &req->rq_repbuf);
if (rc) {
EXIT;
- printk("mds: out of memory\n");
+ CERROR("mds: out of memory\n");
req->rq_status = -ENOMEM;
return 0;
}
&req->rq_replen, &req->rq_repbuf);
if (rc) {
EXIT;
- printk("mds: out of memory\n");
+ CERROR("mds: out of memory\n");
req->rq_status = -ENOMEM;
return 0;
}
rc = mds_update_unpack(buf, len, &rec);
if (rc) {
- printk(__FUNCTION__ ": invalid record\n");
+ CERROR("invalid record\n");
req->rq_status = -EINVAL;
return 0;
}
hdr = (struct ptlreq_hdr *)req->rq_reqbuf;
if (NTOH__u32(hdr->type) != MDS_TYPE_REQ) {
- printk("lustre_mds: wrong packet type sent %d\n",
+ CERROR("lustre_mds: wrong packet type sent %d\n",
NTOH__u32(hdr->type));
rc = -EINVAL;
goto out;
rc = mds_unpack_req(req->rq_reqbuf, req->rq_reqlen,
&req->rq_reqhdr, &req->rq_req.mds);
if (rc) {
- printk("lustre_mds: Invalid request\n");
+ CERROR("lustre_mds: Invalid request\n");
EXIT;
goto out;
}
out:
if (rc) {
- printk(__FUNCTION__ ": no header\n");
+ CERROR("no header\n");
return 0;
}
mds->mds_thread = NULL;
wake_up(&mds->mds_done_waitq);
- printk("lustre_mds: exiting\n");
+ CERROR("lustre_mds: exiting\n");
return 0;
}
}
if ( !list_empty(&obddev->obd_gen_clients) ) {
- printk(KERN_WARNING __FUNCTION__ ": still has clients!\n");
+ CERROR("still has clients!\n");
EXIT;
return -EBUSY;
}
dchild = lookup_one_len(rec->ur_name, de, rec->ur_namelen - 1);
rc = PTR_ERR(dchild);
if (IS_ERR(dchild)) {
- printk(__FUNCTION__ "child lookup error %d\n", rc);
+ CERROR("child lookup error %d\n", rc);
dput(de);
req->rq_rephdr->status = -ESTALE;
EXIT;
}
if (dchild->d_inode) {
- printk(__FUNCTION__ "child exists (dir %ld, name %s\n",
+ CERROR("child exists (dir %ld, name %s\n",
de->d_inode->i_ino, rec->ur_name);
dput(de);
req->rq_rephdr->status = -ESTALE;
dchild = lookup_one_len(rec->ur_name, de, rec->ur_namelen - 1);
rc = PTR_ERR(dchild);
if (IS_ERR(dchild)) {
- printk(__FUNCTION__ ": child lookup error %d\n", rc);
+ CERROR("child lookup error %d\n", rc);
dput(de);
req->rq_rephdr->status = -ESTALE;
EXIT;
}
if (!dchild->d_inode) {
- printk(__FUNCTION__ ": child doesn't exist (dir %ld, name %s\n",
+ CERROR("child doesn't exist (dir %ld, name %s\n",
de->d_inode->i_ino, rec->ur_name);
dput(de);
req->rq_rephdr->status = -ESTALE;
dchild = lookup_one_len(rec->ur_name, de_tgt_dir, rec->ur_namelen - 1);
if (IS_ERR(dchild)) {
- printk(__FUNCTION__ ": child lookup error %d\n", rc);
+ CERROR("child lookup error %d\n", rc);
req->rq_rephdr->status = -ESTALE;
goto out_link;
}
if (dchild->d_inode) {
- printk(__FUNCTION__ ": child exists (dir %ld, name %s\n",
+ CERROR("child exists (dir %ld, name %s\n",
de_tgt_dir->d_inode->i_ino, rec->ur_name);
EXIT;
goto out_link;
de_old = lookup_one_len(rec->ur_name, de_srcdir, rec->ur_namelen - 1);
if (IS_ERR(de_old)) {
- printk(__FUNCTION__ "child lookup error %d\n", rc);
+ CERROR("child lookup error %d\n", rc);
goto out_rename;
}
de_new = lookup_one_len(rec->ur_tgt, de_tgtdir, rec->ur_tgtlen - 1);
if (IS_ERR(de_new)) {
- printk(__FUNCTION__ "child lookup error %d\n", rc);
+ CERROR("child lookup error %d\n", rc);
goto out_rename;
}
int rc;
if (rec->ur_opcode < 0 || rec->ur_opcode > REINT_MAX) {
- printk(__FUNCTION__ "opcode %d not valid\n",
+ CERROR("opcode %d not valid\n",
rec->ur_opcode);
rc = req->rq_status = -EINVAL;
return rc;
&req->rq_replen, &req->rq_repbuf);
if (rc) {
EXIT;
- printk("mds: out of memory\n");
+ CERROR("mds: out of memory\n");
rc = req->rq_status = -ENOMEM;
return rc;
}
memset(buf, 0, sizeof(buf));
if (!obd && cmd != OBD_IOC_DEVICE && cmd != TCGETS) {
- printk("OBD ioctl: No device\n");
+ CERROR("OBD ioctl: No device\n");
return -EINVAL;
}
if (obd_ioctl_getdata(buf, buf + 800, (void *)arg)) {
- printk("OBD ioctl: data error\n");
+ CERROR("OBD ioctl: data error\n");
return -EINVAL;
}
data = (struct obd_ioctl_data *)buf;
CDEBUG(D_IOCTL, "\n");
if (data->ioc_dev >= MAX_OBD_DEVICES ||
data->ioc_dev < 0) {
- printk("OBD ioctl: DEVICE insufficient devices\n");
+ CERROR("OBD ioctl: DEVICE insufficient devices\n");
return -EINVAL;
}
CDEBUG(D_IOCTL, "device %d\n", data->ioc_dev);
ENTRY;
/* have we attached a type to this device */
if ( obd->obd_flags & OBD_ATTACHED ) {
- printk("OBD: Device %d already typed as %s.\n",
+ CERROR("OBD: Device %d already typed as %s.\n",
obd->obd_minor, MKSTR(obd->obd_type->typ_name));
return -EBUSY;
}
- printk("-----> attach %s %s\n", MKSTR(data->ioc_inlbuf1),
+ CDEBUG(D_IOCTL, "attach %s %s\n", MKSTR(data->ioc_inlbuf1),
MKSTR(data->ioc_inlbuf2));
/* find the type */
type = obd_nm_to_type(data->ioc_inlbuf1);
if ( !type ) {
- printk("OBD: unknown type dev %d\n", obd->obd_minor);
+ CERROR("OBD: unknown type dev %d\n", obd->obd_minor);
return -EINVAL;
}
} else {
obd->obd_flags |= OBD_ATTACHED;
type->typ_refcnt++;
- printk("OBD: dev %d attached type %s\n",
+ CDEBUG(D_IOCTL, "OBD: dev %d attached type %s\n",
obd->obd_minor, data->ioc_inlbuf1);
obd->obd_proc_entry =
proc_lustre_register_obd_device(obd);
case OBD_IOC_DETACH: {
ENTRY;
if (obd->obd_flags & OBD_SET_UP) {
- printk("OBD device %d still set up\n", obd->obd_minor);
+ CERROR("OBD device %d still set up\n", obd->obd_minor);
return -EBUSY;
}
if (! (obd->obd_flags & OBD_ATTACHED) ) {
- printk("OBD device %d not attached\n", obd->obd_minor);
+ CERROR("OBD device %d not attached\n", obd->obd_minor);
return -ENODEV;
}
if ( !list_empty(&obd->obd_gen_clients) ) {
- printk("OBD device %d has connected clients\n", obd->obd_minor);
+ CERROR("OBD device %d has connected clients\n",
+ obd->obd_minor);
return -EBUSY;
}
ENTRY;
/* have we attached a type to this device? */
if (!(obd->obd_flags & OBD_ATTACHED)) {
- printk("Device %d not attached\n", obd->obd_minor);
+ CERROR("Device %d not attached\n", obd->obd_minor);
return -ENODEV;
}
/* has this been done already? */
if ( obd->obd_flags & OBD_SET_UP ) {
- printk("Device %d already setup (type %s)\n",
+ CERROR("Device %d already setup (type %s)\n",
obd->obd_minor, obd->obd_type->typ_name);
return -EBUSY;
}
#endif
OBD_FREE(input.att_type, input.att_typelen + 1);
if ( !type ) {
- printk(__FUNCTION__ ": unknown obd type dev %d\n", dev);
+ CERROR("unknown obd type dev %d\n", dev);
EXIT;
return -EINVAL;
}
struct obd_type *type;
if (obd_init_magic != 0x11223344) {
- printk(__FUNCTION__ ": bad magic for type\n");
+ CERROR("bad magic for type\n");
EXIT;
return -EINVAL;
}
if ( !type ) {
MOD_DEC_USE_COUNT;
- printk(KERN_INFO __FUNCTION__ ": unknown obd type\n");
+ CERROR("unknown obd type\n");
EXIT;
return -EINVAL;
}
if ( type->typ_refcnt ) {
MOD_DEC_USE_COUNT;
- printk(KERN_ALERT __FUNCTION__ ":type %s has refcount "
- "(%d)\n", nm, type->typ_refcnt);
+ CERROR("type %s has refcount (%d)\n", nm, type->typ_refcnt);
EXIT;
return -EBUSY;
}
INIT_LIST_HEAD(&obd_types);
if ( (err = misc_register(&obd_psdev)) ) {
- printk(KERN_ERR __FUNCTION__ ": cannot register %d err %d\n",
- OBD_MINOR, err);
+ CERROR("cannot register %d err %d\n", OBD_MINOR, err);
return -EIO;
}
if (obdo_cachep != NULL) {
CDEBUG(D_CACHE, "destroying obdo_cache at %p\n", obdo_cachep);
if (kmem_cache_destroy(obdo_cachep))
- printk(KERN_WARNING __FUNCTION__
- ": unable to free cache\n");
+ CERROR("unable to free cache\n");
} else
- printk(KERN_INFO __FUNCTION__
- ": called with NULL cache pointer\n");
+ CERROR("called with NULL cache pointer\n");
obdo_cachep = NULL;
EXIT;
OBD_ALLOC(cli, sizeof(struct obd_client));
if ( !cli ) {
- printk(__FUNCTION__ ": no memory! (minor %d)\n",
- conn->oc_dev->obd_minor);
+ CERROR("no memory! (minor %d)\n", conn->oc_dev->obd_minor);
return -ENOMEM;
}
rc = OBP(ch_conn->oc_dev, disconnect)(ch_conn);
if ( rc != 0 ) {
- printk(KERN_WARNING __FUNCTION__
- ": disconnect failure %d\n",
+ CERROR("disconnect failure %d\n",
ch_conn->oc_dev->obd_minor);
}
}
&proc_root);
#endif
if (!child_dir_entry)
- printk ("lustre: failed to create /proc entry %s\n", dname);
+ CERROR("lustre: failed to create /proc entry %s\n", dname);
return child_dir_entry;
}
return rc;
if ( index < 0 || index > 1 ) {
- printk(KERN_WARNING __FUNCTION__ "Illegal index %d!\n", index);
+ CERROR("Illegal index %d!\n", index);
index = 0;
} else {
obd_table[OBD_VARS_SLOT].data = &vars[index];
rc = simple_mkdir(current->fs->pwd, "D", 0700);
file = filp_open("O", O_RDONLY, 0);
if (!file || IS_ERR(file)) {
- printk(__FUNCTION__ ": cannot open O\n");
+ CERROR("cannot open O\n");
goto out;
}
rc = simple_mkdir(file->f_dentry, "R", 0700); /* regular */
filter_id(rootid, FILTER_ROOTINO, S_IFDIR);
file = filp_open(rootid, O_RDWR | O_CREAT, 00755);
if (IS_ERR(file)) {
- printk("OBD filter: cannot make root directory");
+ CERROR("OBD filter: cannot make root directory");
goto out;
}
filp_close(file, 0);
file = filp_open("D/status", O_RDWR | O_CREAT, 0700);
if ( !file || IS_ERR(file) ) {
- printk("OBD filter: cannot open/create status file\n");
+ CERROR("OBD filter: cannot open/create status file\n");
goto out;
}
rc = file->f_op->write(file, (char *)&lastino,
sizeof(lastino), &off);
if (rc != sizeof(lastino)) {
- printk("OBD filter: error writing lastino\n");
+ CERROR("OBD filter: error writing lastino\n");
goto out;
}
} else {
rc = file->f_op->read(file, (char *)&lastino, sizeof(lastino),
&off);
if (rc != sizeof(lastino)) {
- printk("OBD filter: error reading lastino\n");
+ CERROR("OBD filter: error reading lastino\n");
goto out;
}
}
push_ctxt(&saved, &obddev->u.filter.fo_ctxt);
file = filp_open("D/status", O_RDWR | O_CREAT, 0700);
if ( !file || IS_ERR(file)) {
- printk("OBD filter: cannot create status file\n");
+ CERROR("OBD filter: cannot create status file\n");
goto out;
}
rc = file->f_op->write(file, (char *)&obddev->u.filter.fo_lastino,
sizeof(obddev->u.filter.fo_lastino), &off);
if (rc != sizeof(sizeof(obddev->u.filter.fo_lastino)) ) {
- printk("OBD filter: error writing lastino\n");
+ CERROR("OBD filter: error writing lastino\n");
}
rc = filp_close(file, NULL);
if (rc) {
- printk("OBD filter: cannot close status file\n");
+ CERROR("OBD filter: cannot close status file\n");
}
out:
pop_ctxt(&saved);
}
if ( !list_empty(&obddev->obd_gen_clients) ) {
- printk(KERN_WARNING __FUNCTION__ ": still has clients!\n");
+ CERROR("still has clients!\n");
EXIT;
return -EBUSY;
}
}
if ( ! (oa->o_mode & S_IFMT) ) {
- printk("OBD filter_obj_open, no type (%Ld), mode %o!\n",
+ CERROR("OBD filter_obj_open, no type (%Ld), mode %o!\n",
oa->o_id, oa->o_mode);
}
filter_id(id, oa->o_id, oa->o_mode);
file = filter_obj_open(obddev, oa);
if ( !file ) {
- printk("filter_inode_from_obdo failed\n");
+ CERROR("filter_inode_from_obdo failed\n");
return NULL;
}
oa->o_id = filter_next_id(conn->oc_dev);
if ( !(oa->o_mode && S_IFMT) ) {
- printk("filter obd: no type!\n");
+ CERROR("filter obd: no type!\n");
return -ENOENT;
}
file = filp_open(name, O_RDONLY | O_CREAT, mode);
pop_ctxt(&saved);
if (IS_ERR(file)) {
- printk("Error mknod obj %s, err %ld\n", name, PTR_ERR(file));
+ CERROR("Error mknod obj %s, err %ld\n", name, PTR_ERR(file));
return -ENOENT;
}
filp_close(file, 0);
/* Too bad, we had an error */
Ebadsize:
- printk("ext2_check_page"
+ CERROR("ext2_check_page"
"size of directory #%lu is not a multiple of chunk size",
dir->i_ino
);
//Einumber:
// error = "inode out of bounds";
bad_entry:
- printk("ext2_check_page" "bad entry in directory #%lu: %s - "
+ CERROR("ext2_check_page" "bad entry in directory #%lu: %s - "
"offset=%lu, inode=%lu, rec_len=%d, name_len=%d",
dir->i_ino, error, (page->index<<PAGE_CACHE_SHIFT)+offs,
(unsigned long) le32_to_cpu(p->inode),
goto fail;
Eend:
p = (ext2_dirent *)(kaddr + offs);
- printk("ext2_check_page"
+ CERROR("ext2_check_page"
"entry in directory #%lu spans the page boundary"
"offset=%lu, inode=%lu",
dir->i_ino, (page->index<<PAGE_CACHE_SHIFT)+offs,
name_len = EXT2_DIR_REC_LEN(de->name_len);
rec_len = le16_to_cpu(de->rec_len);
if ( n==npages && rec_len == 0) {
- printk("Fatal dir behaviour\n");
+ CERROR("Fatal dir behaviour\n");
goto out_page;
}
if (!de->inode && rec_len >= reclen)
oa = obdo_fromid(IID(dir), ino, type,
OBD_MD_FLNOTOBD | OBD_MD_FLBLOCKS);
if ( IS_ERR(oa) ) {
- printk(__FUNCTION__ ": obdo_fromid failed\n");
+ CERROR("obdo_fromid failed\n");
EXIT;
return ERR_PTR(-EACCES);
}
CDEBUG(D_INODE, "\n");
if ( err ) {
- printk("new_inode - fatal: err %d\n", err);
+ CERROR("new_inode - fatal: err %d\n", err);
obdo_free(oa);
EXIT;
return ERR_PTR(err);
CDEBUG(D_INODE, "\n");
if (!inode) {
- printk("new_inode -fatal: %ld\n", (long)oa->o_id);
+ CERROR("new_inode -fatal: %ld\n", (long)oa->o_id);
obd_destroy(IID(dir), oa);
obdo_free(oa);
EXIT;
obdo_free(oa);
if (!list_empty(&inode->i_dentry)) {
- printk("new_inode -fatal: aliases %ld, ct %d lnk %d\n",
+ CERROR("new_inode -fatal: aliases %ld, ct %d lnk %d\n",
(long)oa->o_id,
atomic_read(&inode->i_count),
inode->i_nlink);
int rc;
struct inode *inode = page->mapping->host;
ENTRY;
- printk("---> writepage called ino %ld!\n", inode->i_ino);
+ CERROR("---> writepage called ino %ld!\n", inode->i_ino);
BUG();
rc = obdfs_brw(OBD_BRW_WRITE, inode, page, 1);
if ( !rc ) {
CDEBUG(D_CACHE, "destroying obdfs_pgrqcache at %p, count %ld\n",
obdfs_pgrq_cachep, obdfs_cache_count);
if (kmem_cache_destroy(obdfs_pgrq_cachep))
- printk(KERN_INFO __FUNCTION__
- ": unable to free all of cache\n");
+ CERROR("unable to free all of cache\n");
obdfs_pgrq_cachep = NULL;
} else
- printk(KERN_INFO __FUNCTION__ ": called with NULL pointer\n");
+ CERROR("called with NULL pointer\n");
EXIT;
} /* obdfs_cleanup_wreqcache */
obd_down(&obdfs_i2sbi(inode)->osi_list_mutex);
list_add(&pgrq->rq_plist, obdfs_iplist(inode));
obdfs_cache_count++;
- //printk("-- count %d\n", obdfs_cache_count);
+ //CERROR("-- count %d\n", obdfs_cache_count);
/* If inode isn't already on superblock inodes list, add it.
*
void rebalance(void)
{
if (obdfs_cache_count > 60000) {
- printk("-- count %ld\n", obdfs_cache_count);
+ CERROR("-- count %ld\n", obdfs_cache_count);
//obdfs_flush_dirty_pages(~0UL);
- printk("-- count %ld\n", obdfs_cache_count);
+ CERROR("-- count %ld\n", obdfs_cache_count);
}
}
/* Yuck, no page */
if (! page) {
- printk(KERN_WARNING " grab_cache_page says no dice ...\n");
+ CERROR("grab_cache_page says no dice ...\n");
EXIT;
return NULL;
}
if (PageLocked(page))
obd_unlock_page(page);
} else {
- printk("file %s, line %d: expecting locked page\n",
- __FILE__, __LINE__);
+ CERROR("expecting locked page\n");
}
EXIT;
return page;
oa = obdo_alloc();
if ( !oa ) {
err = -ENOMEM;
- printk(__FUNCTION__ ": obdo_alloc failed!\n");
+ CERROR("obdo_alloc failed!\n");
} else {
oa->o_valid = OBD_MD_FLNOTOBD;
obdfs_from_inode(oa, inode);
}
if (err) {
- printk(__FUNCTION__ ": obd_truncate fails (%d)\n", err);
+ CERROR("obd_truncate fails (%d)\n", err);
EXIT;
return;
}
value++;
OBD_ALLOC(retval, strlen(value) + 1);
if ( !retval ) {
- printk(KERN_ALERT __FUNCTION__ ": out of memory!\n");
+ CERROR("out of memory!\n");
return NULL;
}
CDEBUG(D_INFO, "\n");
obdfs_options(data, &device, &version);
if ( !device ) {
- printk(__FUNCTION__ ": no device\n");
+ CERROR("no device\n");
EXIT;
goto ERR;
}
devno = simple_strtoul(device, NULL, 0);
CDEBUG(D_INFO, "\n");
if ( devno >= MAX_OBD_DEVICES ) {
- printk(__FUNCTION__ ": device of %s too high (%d)\n", device, devno);
+ CERROR("device of %s too high (%d)\n", device, devno);
EXIT;
goto ERR;
}
err = obd_connect(&sbi->osi_conn);
if ( err ) {
- printk("OBDFS: cannot connect to %s\n", device);
+ CERROR("OBDFS: cannot connect to %s\n", device);
EXIT;
goto ERR;
}
"blocksize", &scratch,
(void *)&blocksize);
if ( err ) {
- printk("getinfo call to drive failed (blocksize)\n");
+ CERROR("getinfo call to drive failed (blocksize)\n");
EXIT;
goto ERR;
}
"blocksize_bits", &scratch,
(void *)&blocksize_bits);
if ( err ) {
- printk("getinfo call to drive failed (blocksize_bits)\n");
+ CERROR("getinfo call to drive failed (blocksize_bits)\n");
EXIT;
goto ERR;
}
err = obd_get_info(&sbi->osi_conn, strlen("root_ino"),
"root_ino", &scratch, (void *)&root_ino);
if ( err ) {
- printk("getinfo call to drive failed (root_ino)\n");
+ CERROR("getinfo call to drive failed (root_ino)\n");
EXIT;
goto ERR;
}
CDEBUG(D_INFO, "\n");
sb->s_maxbytes = 1LL << 36;
- printk("Max bytes: %Lx\n", sb->s_maxbytes);
+ CERROR("Max bytes: %Lx\n", sb->s_maxbytes);
sb->s_blocksize = PAGE_SIZE;
sb->s_blocksize_bits = (unsigned char)PAGE_SHIFT;
sb->s_magic = OBDFS_SUPER_MAGIC;
OBD_MD_FLNOTOBD | OBD_MD_FLBLOCKS);
CDEBUG(D_INFO, "mode %o\n", oa->o_mode);
if ( IS_ERR(oa) ) {
- printk(__FUNCTION__ ": obdo_fromid failed\n");
+ CERROR("obdo_fromid failed\n");
iput(root);
EXIT;
goto ERR;
obdo_free(oa);
CDEBUG(D_INFO, "\n");
if (!root) {
- printk("OBDFS: bad iget4 for root\n");
+ CERROR("OBDFS: bad iget4 for root\n");
sb->s_dev = 0;
err = -ENOENT;
EXIT;
goto ERR;
}
- CDEBUG(D_INFO, "obdfs_read_super: sbdev %d, rootino: %ld, dev %s, "
+ CDEBUG(D_INFO, "sbdev %d, rootino: %ld, dev %s, "
"minor: %d, blocksize: %ld, blocksize bits %ld\n",
sb->s_dev, root->i_ino, device, MINOR(devno),
blocksize, blocksize_bits);
obd_disconnect(ID(sb));
list_del(&sbi->osi_list);
- printk(KERN_INFO "OBDFS: Bye bye.\n");
+ CERROR("OBDFS: Bye bye.\n");
MOD_DEC_USE_COUNT;
EXIT;
ENTRY;
oa = obdo_alloc();
if ( !oa ) {
- printk(__FUNCTION__ ": obdo_alloc failed\n");
+ CERROR("obdo_alloc failed\n");
EXIT;
return;
}
err = obd_setattr(IID(inode), oa);
if ( err )
- printk(__FUNCTION__ ": obd_setattr fails (%d)\n", err);
+ CERROR("obd_setattr fails (%d)\n", err);
EXIT;
obdo_free(oa);
ENTRY;
oa = obdo_alloc();
if ( !oa ) {
- printk(__FUNCTION__ ": obdo_alloc failed\n");
+ CERROR("obdo_alloc failed\n");
EXIT;
return;
}
obdfs_from_inode(oa, inode);
/* XXX how do we know that this inode is now clean? */
- printk("delete_inode ------> link %d\n", inode->i_nlink);
+ CERROR("delete_inode ------> link %d\n", inode->i_nlink);
ODEBUG(oa);
err = obd_destroy(IID(inode), oa);
obdo_free(oa);
clear_inode(inode);
if (err) {
- printk(__FUNCTION__ ": obd_destroy fails (%d)\n", err);
+ CERROR("obd_destroy fails (%d)\n", err);
EXIT;
return;
}
ENTRY;
oa = obdo_alloc();
if ( !oa ) {
- printk(__FUNCTION__ ": obdo_alloc failed\n");
+ CERROR("obdo_alloc failed\n");
return -ENOMEM;
}
err = obd_setattr(IID(inode), oa);
if ( err )
- printk(__FUNCTION__ ": obd_setattr fails (%d)\n", err);
+ CERROR("obd_setattr fails (%d)\n", err);
EXIT;
obdo_free(oa);
err = obd_statfs(ID(sb), &tmp);
if ( err ) {
- printk(__FUNCTION__ ": obd_statfs fails (%d)\n", err);
+ CERROR("obd_statfs fails (%d)\n", err);
return err;
}
memcpy(buf, &tmp, sizeof(*buf));
OBD_ALLOC(request, sizeof(*request));
if (!request) {
- printk("osc_prep_req: request allocation out of memory\n");
+ CERROR("request allocation out of memory\n");
return NULL;
}
&request->rq_reqhdr, &request->rq_req.ost,
&request->rq_reqlen, &request->rq_reqbuf);
if (rc) {
- printk("llight request: cannot pack request %d\n", rc);
+ CERROR("llight request: cannot pack request %d\n", rc);
return NULL;
}
request->rq_reqhdr->opc = opcode;
rc = ptl_send_rpc(req, peer);
}
if (rc) {
- printk(__FUNCTION__ ": error %d, opcode %d\n", rc,
- req->rq_reqhdr->opc);
+ CERROR("error %d, opcode %d\n", rc, req->rq_reqhdr->opc);
return -rc;
}
rc = ost_unpack_rep(req->rq_repbuf, req->rq_replen, &req->rq_rephdr,
&req->rq_rep.ost);
if (rc) {
- printk(__FUNCTION__ ": mds_unpack_rep failed: %d\n", rc);
+ CERROR("mds_unpack_rep failed: %d\n", rc);
return rc;
}
request = ost_prep_req(OST_CONNECT, 0, NULL, 0, NULL);
if (!request) {
- printk(__FUNCTION__ ": cannot pack req!\n");
+ CERROR("cannot pack req!\n");
return -ENOMEM;
}
request = ost_prep_req(OST_DISCONNECT, 0, NULL, 0, NULL);
if (!request) {
- printk(__FUNCTION__ ": cannot pack req!\n");
+ CERROR("cannot pack req!\n");
return -ENOMEM;
}
request = ost_prep_req(OST_GETATTR, 0, NULL, 0, NULL);
if (!request) {
- printk(__FUNCTION__ ": cannot pack req!\n");
+ CERROR("cannot pack req!\n");
return -ENOMEM;
}
request = ost_prep_req(OST_SETATTR, 0, NULL, 0, NULL);
if (!request) {
- printk(__FUNCTION__ ": cannot pack req!\n");
+ CERROR("cannot pack req!\n");
return -ENOMEM;
}
int rc;
if (!oa) {
- printk(__FUNCTION__ ": oa NULL\n");
+ CERROR("oa NULL\n");
}
request = ost_prep_req(OST_CREATE, 0, NULL, 0, NULL);
if (!request) {
- printk("osc_connect: cannot pack req!\n");
+ CERROR("cannot pack req!\n");
return -ENOMEM;
}
int rc;
if (!oa) {
- printk(__FUNCTION__ ": oa NULL\n");
+ CERROR("oa NULL\n");
}
request = ost_prep_req(OST_DESTROY, 0, NULL, 0, NULL);
if (!request) {
- printk("osc_connect: cannot pack req!\n");
+ CERROR("cannot pack req!\n");
return -ENOMEM;
}
/* This is a local connection */
osc->osc_tgt = &obd_dev[data->ioc_dev];
- printk("OSC: tgt %d ost at %p\n", data->ioc_dev,
+ CERROR("OSC: tgt %d ost at %p\n", data->ioc_dev,
&osc->osc_tgt->u.ost);
if ( ! (osc->osc_tgt->obd_flags & OBD_ATTACHED) ||
! (osc->osc_tgt->obd_flags & OBD_SET_UP) ){
- printk("device not attached or not set up (%d)\n",
+ CERROR("device not attached or not set up (%d)\n",
data->ioc_dev);
EXIT;
return -EINVAL;
/* XXX: this should become something like ioc_inlbuf1 */
err = kportal_uuid_to_peer("ost", &osc->osc_peer);
if (err != 0) {
- printk("Cannot find 'ost' peer.\n");
+ CERROR("Cannot find 'ost' peer.\n");
EXIT;
return -EINVAL;
}
request = ost_prep_req(OST_BRW, size1, NULL, size2, NULL);
if (!request) {
- printk("osc_connect: cannot pack req!\n");
+ CERROR("cannot pack req!\n");
return -ENOMEM;
}
#if 0
ptr2 = ost_rep_buf2(request->rq_rep.ost);
if (request->rq_rep.ost->buflen2 != n * sizeof(struct niobuf)) {
- printk(__FUNCTION__ ": buffer length wrong\n");
+ CERROR("buffer length wrong\n");
goto out;
}
rc = ost_pack_rep(NULL, 0, NULL, 0, &req->rq_rephdr, &req->rq_rep.ost,
&req->rq_replen, &req->rq_repbuf);
if (rc) {
- printk("ost_destroy: cannot pack reply\n");
+ CERROR("cannot pack reply\n");
return rc;
}
rc = ost_pack_rep(NULL, 0, NULL, 0, &req->rq_rephdr, &req->rq_rep.ost,
&req->rq_replen, &req->rq_repbuf);
if (rc) {
- printk("ost_getattr: cannot pack reply\n");
+ CERROR("cannot pack reply\n");
return rc;
}
req->rq_rep.ost->oa.o_id = req->rq_req.ost->oa.o_id;
rc = ost_pack_rep(NULL, 0, NULL, 0, &req->rq_rephdr, &req->rq_rep.ost,
&req->rq_replen, &req->rq_repbuf);
if (rc) {
- printk("ost_create: cannot pack reply\n");
+ CERROR("cannot pack reply\n");
return rc;
}
rc = ost_pack_rep(NULL, 0, NULL, 0, &req->rq_rephdr, &req->rq_rep.ost,
&req->rq_replen, &req->rq_repbuf);
if (rc) {
- printk("ost_setattr: cannot pack reply\n");
+ CERROR("cannot pack reply\n");
return rc;
}
rc = ost_pack_rep(NULL, 0, NULL, 0, &req->rq_rephdr, &req->rq_rep.ost,
&req->rq_replen, &req->rq_repbuf);
if (rc) {
- printk("ost_setattr: cannot pack reply\n");
+ CERROR("cannot pack reply\n");
return rc;
}
req->rq_rep.ost->result =ost->ost_tgt->obd_type->typ_ops->o_connect(&conn);
- CDEBUG(0, "ost_connect: rep buffer %p, id %d\n", req->rq_repbuf,
+ CDEBUG(0, "rep buffer %p, id %d\n", req->rq_repbuf,
conn.oc_id);
req->rq_rep.ost->connid = conn.oc_id;
EXIT;
rc = ost_pack_rep(NULL, 0, NULL, 0, &req->rq_rephdr, &req->rq_rep.ost,
&req->rq_replen, &req->rq_repbuf);
if (rc) {
- printk("ost_setattr: cannot pack reply\n");
+ CERROR("cannot pack reply\n");
return rc;
}
req->rq_rep.ost->result =ost->ost_tgt->obd_type->typ_ops->o_get_info
(&conn, req->rq_req.ost->buflen1, ptr, &vallen, &val);
- rc = ost_pack_rep(val, vallen, NULL, 0, &req->rq_rephdr, &req->rq_rep.ost,
- &req->rq_replen, &req->rq_repbuf);
+ rc = ost_pack_rep(val, vallen, NULL, 0, &req->rq_rephdr,
+ &req->rq_rep.ost, &req->rq_replen, &req->rq_repbuf);
if (rc) {
- printk("ost_setattr: cannot pack reply\n");
+ CERROR("cannot pack reply\n");
return rc;
}
&req->rq_rephdr, &req->rq_rep.ost,
&req->rq_replen, &req->rq_repbuf);
if (rc) {
- printk("ost_create: cannot pack reply\n");
+ CERROR("cannot pack reply\n");
return rc;
}
res = ost_rep_buf1(req->rq_rep.ost);
hdr = (struct ptlreq_hdr *)req->rq_reqbuf;
if (NTOH__u32(hdr->type) != OST_TYPE_REQ) {
- printk("lustre_ost: wrong packet type sent %d\n",
+ CERROR("lustre_ost: wrong packet type sent %d\n",
NTOH__u32(hdr->type));
rc = -EINVAL;
goto out;
rc = ost_unpack_req(req->rq_reqbuf, req->rq_reqlen,
&req->rq_reqhdr, &req->rq_req.ost);
if (rc) {
- printk("lustre_ost: Invalid request\n");
+ CERROR("lustre_ost: Invalid request\n");
EXIT;
goto out;
}
out:
req->rq_status = rc;
if (rc) {
- printk("ost: processing error %d\n", rc);
+ CERROR("ost: processing error %d\n", rc);
ost_error(obddev, req);
} else {
CDEBUG(D_INODE, "sending reply\n");
ost->ost_thread = NULL;
wake_up(&ost->ost_done_waitq);
- printk("lustre_ost: exiting\n");
+ CERROR("lustre_ost: exiting\n");
return 0;
}
ost->ost_tgt = tgt;
if ( ! (tgt->obd_flags & OBD_ATTACHED) ||
! (tgt->obd_flags & OBD_SET_UP) ){
- printk("device not attached or not set up (%d)\n",
+ CERROR("device not attached or not set up (%d)\n",
data->ioc_dev);
EXIT;
return -EINVAL;
ost->ost_conn.oc_dev = tgt;
err = tgt->obd_type->typ_ops->o_connect(&ost->ost_conn);
if (err) {
- printk("lustre ost: fail to connect to device %d\n",
+ CERROR("lustre ost: fail to connect to device %d\n",
data->ioc_dev);
return -EINVAL;
}
}
if ( !list_empty(&obddev->obd_gen_clients) ) {
- printk(KERN_WARNING __FUNCTION__ ": still has clients!\n");
+ CERROR("still has clients!\n");
EXIT;
return -EBUSY;
}
tgt = ost->ost_tgt;
err = tgt->obd_type->typ_ops->o_disconnect(&ost->ost_conn);
if (err) {
- printk("lustre ost: fail to disconnect device\n");
+ CERROR("lustre ost: fail to disconnect device\n");
return -EINVAL;
}
int rc;
if (ev->rlength != ev->mlength)
- printk("Warning: Possibly truncated rpc (%d/%d)\n",
+ CERROR("Warning: Possibly truncated rpc (%d/%d)\n",
ev->mlength, ev->rlength);
/* The ME is unlinked when there is less than 1024 bytes free
service->srv_ref_count[service->srv_md_active]++;
if (ev->offset >= (service->srv_buf_size - 1024)) {
- printk("Unlinking ME %d\n", service->srv_me_active);
+ CERROR("Unlinking ME %d\n", service->srv_me_active);
rc = PtlMEUnlink(service->srv_me_h[service->srv_me_active]);
service->srv_me_h[service->srv_me_active] = 0;
if (rc != PTL_OK) {
- printk("PtlMEUnlink failed: %d\n", rc);
+ CERROR("PtlMEUnlink failed: %d\n", rc);
return rc;
}
service->srv_ring_length);
if (service->srv_me_h[service->srv_me_active] == 0)
- printk("All %d ring ME's are unlinked!\n",
+ CERROR("All %d ring ME's are unlinked!\n",
service->srv_ring_length);
}
if (ev->type == PTL_EVENT_PUT) {
wake_up(service->srv_wait_queue);
} else {
- printk("Unexpected event type: %d\n", ev->type);
+ CERROR("Unexpected event type: %d\n", ev->type);
}
return 0;
} else if (ev->type == PTL_EVENT_ACK) {
wake_up_interruptible(&rpc->rq_wait_for_bulk);
} else {
- printk("Unexpected event type in " __FUNCTION__ "!\n");
+ CERROR("Unexpected event type!\n");
}
EXIT;
if (ev->type == PTL_EVENT_PUT) {
if (rpc->rq_bulkbuf != ev->mem_desc.start + ev->offset)
- printk(__FUNCTION__ ": bulkbuf != mem_desc -- why?\n");
+ CERROR("bulkbuf != mem_desc -- why?\n");
wake_up_interruptible(&rpc->rq_wait_for_bulk);
} else {
- printk("Unexpected event type in " __FUNCTION__ "!\n");
+ CERROR("Unexpected event type!\n");
}
EXIT;
rc = PtlMDBind(peer->peer_ni, request->rq_req_md, &md_h);
if (rc != 0) {
- printk(__FUNCTION__ ": PtlMDBind failed: %d\n", rc);
+ CERROR("PtlMDBind failed: %d\n", rc);
return rc;
}
request->rq_xid, 0, 0);
}
if (rc != PTL_OK) {
- printk(__FUNCTION__ ": PtlPut failed: %d\n", rc);
+ CERROR("PtlPut failed: %d\n", rc);
/* FIXME: tear down md */
}
ENTRY;
if (request->rq_replen == 0) {
- printk(__FUNCTION__ ": request->rq_replen is 0!\n");
+ CERROR("request->rq_replen is 0!\n");
EXIT;
return -EINVAL;
}
CDEBUG(D_INFO, "Removing MD at index %d, rc %d\n", index, rc);
if (rc)
- printk(__FUNCTION__
- ": PtlMDUnlink failed: index %d rc %d\n",
+ CERROR(": PtlMDUnlink failed: index %d rc %d\n",
index, rc);
/* Replace the unlinked ME and MD */
service->srv_ref_count[index] = 0;
if (rc != PTL_OK) {
- printk("PtlMEInsert failed: %d\n", rc);
+ CERROR("PtlMEInsert failed: %d\n", rc);
return rc;
}
CDEBUG(D_INFO, "Attach MD in ring, rc %d\n", rc);
if (rc != PTL_OK) {
/* cleanup */
- printk("PtlMDAttach failed: %d\n", rc);
+ CERROR("PtlMDAttach failed: %d\n", rc);
return rc;
}
rc = kportal_uuid_to_peer(uuid, &peer);
if (rc != 0) {
- printk("Invalid uuid \"%s\"\n", uuid);
+ CERROR("Invalid uuid \"%s\"\n", uuid);
return -EINVAL;
}
service, &(service->srv_eq_h));
if (rc != PTL_OK) {
- printk("PtlEQAlloc failed: %d\n", rc);
+ CERROR("PtlEQAlloc failed: %d\n", rc);
return rc;
}
&(service->srv_me_h[0]));
if (rc != PTL_OK) {
- printk("PtlMEAttach failed: %d\n", rc);
+ CERROR("PtlMEAttach failed: %d\n", rc);
return rc;
}
OBD_ALLOC(service->srv_buf[i], service->srv_buf_size);
if (service->srv_buf[i] == NULL) {
- printk(__FUNCTION__ ": no memory\n");
+ CERROR("no memory\n");
return -ENOMEM;
}
service->srv_me_tail = i;
if (rc != PTL_OK) {
- printk("PtlMEInsert failed: %d\n", rc);
+ CERROR("PtlMEInsert failed: %d\n", rc);
return rc;
}
}
if (rc != PTL_OK) {
/* cleanup */
- printk("PtlMDAttach failed: %d\n", rc);
+ CERROR("PtlMDAttach failed: %d\n", rc);
return rc;
}
}
for (i = 0; i < service->srv_ring_length; i++) {
rc = PtlMDUnlink(service->srv_md_h[i]);
if (rc)
- printk(__FUNCTION__ ": PtlMDUnlink failed: %d\n", rc);
+ CERROR("PtlMDUnlink failed: %d\n", rc);
rc = PtlMEUnlink(service->srv_me_h[i]);
if (rc)
- printk(__FUNCTION__ ": PtlMEUnlink failed: %d\n", rc);
+ CERROR("PtlMEUnlink failed: %d\n", rc);
OBD_FREE(service->srv_buf[i], service->srv_buf_size);
}
rc = PtlEQFree(service->srv_eq_h);
if (rc)
- printk(__FUNCTION__ ": PtlEQFree failed: %d\n", rc);
+ CERROR("PtlEQFree failed: %d\n", rc);
return 0;
}
nip = inter_module_get_request(LUSTRE_NAL "_ni", LUSTRE_NAL);
if (nip == NULL) {
- printk("get_ni failed: is the NAL module loaded?\n");
+ CERROR("get_ni failed: is the NAL module loaded?\n");
return -EIO;
}
ni = *nip;
rc = PtlEQAlloc(ni, 128, request_callback, NULL, &req_eq);
if (rc != PTL_OK)
- printk("PtlEQAlloc failed: %d\n", rc);
+ CERROR("PtlEQAlloc failed: %d\n", rc);
rc = PtlEQAlloc(ni, 128, bulk_source_callback, NULL, &bulk_source_eq);
if (rc != PTL_OK)
- printk("PtlEQAlloc failed: %d\n", rc);
+ CERROR("PtlEQAlloc failed: %d\n", rc);
rc = PtlEQAlloc(ni, 128, bulk_sink_callback, NULL, &bulk_sink_eq);
if (rc != PTL_OK)
- printk("PtlEQAlloc failed: %d\n", rc);
+ CERROR("PtlEQAlloc failed: %d\n", rc);
return rc;
}