aboutsummaryrefslogtreecommitdiff
path: root/fs/exofs/ios.c
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2009-12-15 19:34:17 +0200
committerBoaz Harrosh <bharrosh@panasas.com>2010-02-28 03:35:25 -0800
commit34ce4e7c23e3da578e459b05c6fb17edecb19e6b (patch)
tree94713d94514b3d0e89dd05e727eaaae98369b28a /fs/exofs/ios.c
parentabe94c756c08d50566c09a65b9c7fe72f83071c5 (diff)
exofs: debug print even less
* Last debug trimming left in some stupid print, remove them. Fixup some other prints * Shift printing from inode.c to ios.c * Add couple of prints when memory allocation fails. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Diffstat (limited to 'fs/exofs/ios.c')
-rw-r--r--fs/exofs/ios.c38
1 files changed, 32 insertions, 6 deletions
diff --git a/fs/exofs/ios.c b/fs/exofs/ios.c
index 5bad01fa1f9..3cc0dd3f0eb 100644
--- a/fs/exofs/ios.c
+++ b/fs/exofs/ios.c
@@ -26,6 +26,9 @@
#include "exofs.h"
+#define EXOFS_DBGMSG2(M...) do {} while (0)
+/* #define EXOFS_DBGMSG2 EXOFS_DBGMSG */
+
void exofs_make_credential(u8 cred_a[OSD_CAP_LEN], const struct osd_obj_id *obj)
{
osd_sec_init_nosec_doall_caps(cred_a, obj, false, true);
@@ -73,6 +76,8 @@ int exofs_get_io_state(struct exofs_sb_info *sbi, struct exofs_io_state** pios)
*/
ios = kzalloc(exofs_io_state_size(sbi->s_numdevs), GFP_KERNEL);
if (unlikely(!ios)) {
+ EXOFS_DBGMSG("Faild kzalloc bytes=%d\n",
+ exofs_io_state_size(sbi->s_numdevs));
*pios = NULL;
return -ENOMEM;
}
@@ -276,6 +281,9 @@ int exofs_sbi_write(struct exofs_io_state *ios)
bio = bio_kmalloc(GFP_KERNEL,
ios->bio->bi_max_vecs);
if (unlikely(!bio)) {
+ EXOFS_DBGMSG(
+ "Faild to allocate BIO size=%u\n",
+ ios->bio->bi_max_vecs);
ret = -ENOMEM;
goto out;
}
@@ -290,14 +298,21 @@ int exofs_sbi_write(struct exofs_io_state *ios)
osd_req_write(or, &ios->obj, ios->offset, bio,
ios->length);
-/* EXOFS_DBGMSG("write sync=%d\n", sync);*/
+ EXOFS_DBGMSG("write(0x%llx) offset=0x%llx "
+ "length=0x%llx dev=%d\n",
+ _LLU(ios->obj.id), _LLU(ios->offset),
+ _LLU(ios->length), i);
} else if (ios->kern_buff) {
osd_req_write_kern(or, &ios->obj, ios->offset,
ios->kern_buff, ios->length);
-/* EXOFS_DBGMSG("write_kern sync=%d\n", sync);*/
+ EXOFS_DBGMSG2("write_kern(0x%llx) offset=0x%llx "
+ "length=0x%llx dev=%d\n",
+ _LLU(ios->obj.id), _LLU(ios->offset),
+ _LLU(ios->length), i);
} else {
osd_req_set_attributes(or, &ios->obj);
-/* EXOFS_DBGMSG("set_attributes sync=%d\n", sync);*/
+ EXOFS_DBGMSG2("obj(0x%llx) set_attributes=%d dev=%d\n",
+ _LLU(ios->obj.id), ios->out_attr_len, i);
}
if (ios->out_attr)
@@ -335,14 +350,25 @@ int exofs_sbi_read(struct exofs_io_state *ios)
if (ios->bio) {
osd_req_read(or, &ios->obj, ios->offset, ios->bio,
ios->length);
-/* EXOFS_DBGMSG("read sync=%d\n", sync);*/
+ EXOFS_DBGMSG("read(0x%llx) offset=0x%llx length=0x%llx"
+ " dev=%d\n", _LLU(ios->obj.id),
+ _LLU(ios->offset),
+ _LLU(ios->length),
+ first_dev);
} else if (ios->kern_buff) {
osd_req_read_kern(or, &ios->obj, ios->offset,
ios->kern_buff, ios->length);
-/* EXOFS_DBGMSG("read_kern sync=%d\n", sync);*/
+ EXOFS_DBGMSG2("read_kern(0x%llx) offset=0x%llx "
+ "length=0x%llx dev=%d\n",
+ _LLU(ios->obj.id),
+ _LLU(ios->offset),
+ _LLU(ios->length),
+ first_dev);
} else {
osd_req_get_attributes(or, &ios->obj);
-/* EXOFS_DBGMSG("get_attributes sync=%d\n", sync);*/
+ EXOFS_DBGMSG2("obj(0x%llx) get_attributes=%d dev=%d\n",
+ _LLU(ios->obj.id), ios->in_attr_len,
+ first_dev);
}
if (ios->out_attr)