mirror of https://github.com/schoebel/mars
import mars-74.tgz
This commit is contained in:
parent
00291330f5
commit
09fcbebc4e
7
Kconfig
7
Kconfig
|
@ -7,6 +7,13 @@ config MARS
|
|||
---help---
|
||||
Experimental storage System.
|
||||
|
||||
config MARS_HUNG
|
||||
tristate "hangup on kernel stacktrace (only for debugging)"
|
||||
depends on MARS
|
||||
default n
|
||||
---help---
|
||||
Experimental storage System.
|
||||
|
||||
config MARS_DUMMY
|
||||
tristate "MARS dummy brick"
|
||||
depends on MARS
|
||||
|
|
14
brick.c
14
brick.c
|
@ -516,20 +516,22 @@ void free_generic(struct generic_object *object)
|
|||
}
|
||||
object_layout = object->object_layout;
|
||||
if (likely(object_layout)) {
|
||||
unsigned long flags;
|
||||
|
||||
generic_destruct(object);
|
||||
|
||||
#ifdef USE_FREELIST
|
||||
memset(object, 0, object_layout->object_size);
|
||||
atomic_inc(&object_layout->free_count);
|
||||
|
||||
traced_lock(&object_layout->free_lock, flags);
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
*(struct generic_object**)object = object_layout->free_list;
|
||||
object_layout->free_list = object;
|
||||
traced_lock(&object_layout->free_lock, flags);
|
||||
|
||||
traced_unlock(&object_layout->free_lock, flags);
|
||||
*(struct generic_object**)object = object_layout->free_list;
|
||||
object_layout->free_list = object;
|
||||
|
||||
traced_unlock(&object_layout->free_lock, flags);
|
||||
}
|
||||
return;
|
||||
#endif
|
||||
atomic_dec(&object_layout->alloc_count);
|
||||
|
|
4
brick.h
4
brick.h
|
@ -666,13 +666,13 @@ extern void set_lamport(struct timespec *old);
|
|||
} \
|
||||
atomic_inc(¤t->lock_count); \
|
||||
(void)flags; \
|
||||
read_lock(spinlock); \
|
||||
write_lock(spinlock); \
|
||||
} while (0)
|
||||
|
||||
# define traced_writeunlock(spinlock,flags) \
|
||||
do { \
|
||||
/*spin_unlock_irqrestore(spinlock,flags);*/ \
|
||||
read_unlock(spinlock); \
|
||||
write_unlock(spinlock); \
|
||||
atomic_dec(¤t->lock_count); \
|
||||
} while (0)
|
||||
|
||||
|
|
|
@ -75,7 +75,6 @@ static void _if_endio(struct generic_callback *cb)
|
|||
error = 0;
|
||||
bio->bi_size = 0;
|
||||
}
|
||||
bio->bi_check3++;
|
||||
bio_endio(bio, error);
|
||||
bio_put(bio);
|
||||
}
|
||||
|
@ -149,9 +148,6 @@ static int if_make_request(struct request_queue *q, struct bio *bio)
|
|||
* Will be released after bio_endio().
|
||||
*/
|
||||
atomic_inc(&bio->bi_cnt);
|
||||
bio->bi_check = false;
|
||||
bio->bi_check2 = 0;
|
||||
bio->bi_check3 = 0;
|
||||
|
||||
/* FIXME: THIS IS PROVISIONARY (use event instead)
|
||||
*/
|
||||
|
@ -289,7 +285,6 @@ err:
|
|||
if (assigned) {
|
||||
//...
|
||||
} else {
|
||||
bio->bi_check3++;
|
||||
bio_endio(bio, error);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#include "mars_trans_logger.h"
|
||||
|
||||
#if 0
|
||||
#if 1
|
||||
#define inline __attribute__((__noinline__))
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue