Mercurial > nomad
changeset 789:7966b4a0bcbc
objstore/posix: transaction ops stubs
They current don't do anything, but they allow execution to proceed.
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Tue, 31 Mar 2020 14:51:36 -0400 |
parents | 1eef9314f649 |
children | 441c40d27f2a |
files | src/objstore/posix/posix.h src/objstore/posix/txnlog.c src/objstore/posix/vol.c |
diffstat | 3 files changed, 46 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/objstore/posix/posix.h Tue Mar 31 11:05:51 2020 -0400 +++ b/src/objstore/posix/posix.h Tue Mar 31 14:51:36 2020 -0400 @@ -172,6 +172,12 @@ extern int txnlog_create(int rootfd); extern void txnlog_destroy(int rootfd); +extern int posix_txn_begin(struct txn *txn); +extern int posix_txn_log_entry(struct txn *txn, struct txn_entry *entry); +extern int posix_txn_commit(struct txn *txn); +extern int posix_txn_complete(struct txn *txn); +extern void posix_txn_abort(struct txn *txn); + extern int walk_object_versions(struct posix_obj *pobj, int fd, int (*fxn)(struct posix_obj *, void *, struct dirent *),
--- a/src/objstore/posix/txnlog.c Tue Mar 31 11:05:51 2020 -0400 +++ b/src/objstore/posix/txnlog.c Tue Mar 31 14:51:36 2020 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 Josef 'Jeff' Sipek <jeffpc@josefsipek.net> + * Copyright (c) 2018-2020 Josef 'Jeff' Sipek <jeffpc@josefsipek.net> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -51,3 +51,36 @@ { xunlinkat(rootfd, POSIX_TXN_FNAME, 0); } + +/* + * clone ops + */ + +int posix_txn_begin(struct txn *txn) +{ + FIXME("begin - not yet implemented"); + return 0; +} + +int posix_txn_log_entry(struct txn *txn, struct txn_entry *entry) +{ + FIXME("log_entry - not yet implemented"); + return 0; +} + +int posix_txn_commit(struct txn *txn) +{ + FIXME("commit - not yet implemented"); + return 0; +} + +int posix_txn_complete(struct txn *txn) +{ + FIXME("complete - not yet implemented"); + return 0; +} + +void posix_txn_abort(struct txn *txn) +{ + panic("abort - not yet implemented"); +}
--- a/src/objstore/posix/vol.c Tue Mar 31 11:05:51 2020 -0400 +++ b/src/objstore/posix/vol.c Tue Mar 31 14:51:36 2020 -0400 @@ -112,4 +112,10 @@ .initobj = posix_initobj, .allocoid = posix_allocoid, .createobj = posix_createobj, + + .txn_begin = posix_txn_begin, + .txn_log_entry = posix_txn_log_entry, + .txn_commit = posix_txn_commit, + .txn_complete = posix_txn_complete, + .txn_abort = posix_txn_abort, };