scoutfs: convert fs callers to forest

Convert fs callers to work with the btree forest calls instead of the
lsm item cache calls.  This is mostly a mechanical syntax conversion.
The inode dirtying path does now update the item rather than simply
dirtying it.

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2020-01-17 11:21:36 -08:00
committed by Zach Brown
parent 858dad1d51
commit 48448d3926
6 changed files with 68 additions and 71 deletions
+5 -5
View File
@@ -32,7 +32,7 @@
#include "trans.h"
#include "counters.h"
#include "scoutfs_trace.h"
#include "item.h"
#include "forest.h"
#include "ioctl.h"
#include "client.h"
#include "lock.h"
@@ -218,19 +218,19 @@ static int data_extent_io(struct super_block *sb, int op,
expected = val.iov_len;
if (op == SEI_NEXT)
ret = scoutfs_item_next(sb, &key, &last, &val, lock);
ret = scoutfs_forest_next(sb, &key, &last, &val, lock);
else
ret = scoutfs_item_prev(sb, &key, &first, &val, lock);
ret = scoutfs_forest_prev(sb, &key, &first, &val, lock);
if (ret >= 0 && ret != expected)
ret = -EIO;
if (ret == expected)
ret = init_extent_from_item(ext, &key, &fex);
} else if (op == SEI_INSERT) {
ret = scoutfs_item_create(sb, &key, &val, lock);
ret = scoutfs_forest_create(sb, &key, &val, lock);
} else if (op == SEI_DELETE) {
ret = scoutfs_item_delete(sb, &key, lock);
ret = scoutfs_forest_delete(sb, &key, lock);
} else {
ret = WARN_ON_ONCE(-EINVAL);