From b121a44a1f327d2dcac93384571124aec5e8a5e7 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Fri, 13 Aug 2010 11:28:58 +0100 Subject: [PATCH] import mars-37.tgz --- mars_buf.c | 2 +- mars_device_sio.c | 4 ++-- mars_trans_logger.c | 1 + mars_usebuf.c | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/mars_buf.c b/mars_buf.c index cf569827..2152fbc3 100644 --- a/mars_buf.c +++ b/mars_buf.c @@ -685,7 +685,7 @@ static int _buf_make_bios(struct buf_brick *brick, struct buf_head *bf, void *st atomic_inc(&bf->bf_bio_count); MARS_DBG("starting buf IO mref=%p bio=%p bf=%p bf_count=%d bf_bio_count=%d\n", mref, mref->orig_bio, bf, atomic_read(&bf->bf_count), atomic_read(&bf->bf_bio_count)); -#if 1 +#if 0 GENERIC_INPUT_CALL(input, mars_ref_io, mref, rw); #else // fake IO for testing diff --git a/mars_device_sio.c b/mars_device_sio.c index d5c802ea..c5eaf8eb 100644 --- a/mars_device_sio.c +++ b/mars_device_sio.c @@ -37,12 +37,12 @@ static int transfer_none(int cmd, MARS_ERR("transfer NULL: %p %p\n", raw_buf, loop_buf); return -EFAULT; } - +#if 1 if (cmd == READ) memcpy(loop_buf, raw_buf, size); else memcpy(raw_buf, loop_buf, size); - +#endif kunmap_atomic(raw_buf, KM_USER0); kunmap_atomic(loop_buf, KM_USER1); cond_resched(); diff --git a/mars_trans_logger.c b/mars_trans_logger.c index 9d601b66..31c5af3e 100644 --- a/mars_trans_logger.c +++ b/mars_trans_logger.c @@ -423,6 +423,7 @@ static void trans_logger_ref_put(struct trans_logger_output *output, struct mars if (!atomic_dec_and_test(&mref->ref_count)) return; + kfree(mref_a->orig_data); trans_logger_free_mars_ref(mref); return; } diff --git a/mars_usebuf.c b/mars_usebuf.c index 4b1f4605..211680ff 100644 --- a/mars_usebuf.c +++ b/mars_usebuf.c @@ -28,13 +28,13 @@ static void _usebuf_copy(struct usebuf_mars_ref_aspect *mref_a, int rw) void *bio_base = kmap_atomic(mref_a->bvec->bv_page, KM_USER0); void *bio_data = bio_base + mref_a->bvec_offset; int len = mref_a->bvec_len; - +#if 1 if (rw == READ) { memcpy(bio_data, ref_data, len); } else { memcpy(ref_data, bio_data, len); } - +#endif kunmap_atomic(bio_base, KM_USER0); }