mirror of https://github.com/schoebel/mars
import mars-37.tgz
This commit is contained in:
parent
390262b6c1
commit
b121a44a1f
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue