X-Git-Url: https://pd.if.org/git/?p=nbds;a=blobdiff_plain;f=txn%2Ftxn.c;h=52758824e60dc3d9b7f2973364a12f81acccebf8;hp=1073f7b6a24e3ae25fe5f124e7b11496f19604a5;hb=7378edffa5751159d35eab31eceb76a1f16231d0;hpb=fa60fb1fb78136edc9e5863c0b86222f572963ef diff --git a/txn/txn.c b/txn/txn.c index 1073f7b..5275882 100644 --- a/txn/txn.c +++ b/txn/txn.c @@ -130,7 +130,7 @@ static update_rec_t *alloc_update_rec (void) { return u; } -txn_t *txn_begin (txn_access_e access, txn_isolation_e isolation, map_type_t map_type) { +txn_t *txn_begin (txn_access_e access, txn_isolation_e isolation, map_t *map) { txn_t *txn = (txn_t *)nbd_malloc(sizeof(txn_t)); memset(txn, 0, sizeof(txn_t)); txn->access = access; @@ -138,7 +138,7 @@ txn_t *txn_begin (txn_access_e access, txn_isolation_e isolation, map_type_t map txn->rv = version_; txn->wv = UNDETERMINED_VERSION; txn->state = TXN_RUNNING; - txn->map = map_alloc(map_type); + txn->map = map; if (isolation != TXN_READ_ONLY) { txn->writes = nbd_malloc(sizeof(*txn->writes) * INITIAL_WRITES_SIZE); txn->writes_size = INITIAL_WRITES_SIZE;