Revert "scoutfs: add scoutfs_block_move"

We add _block_move for the radix allocator, but it no longer needs it.

This reverts commit 6bb0726689981eb9699296ae2cb4c8599add5b90.
This commit is contained in:
Zach Brown
2020-05-11 16:08:52 -07:00
committed by Zach Brown
parent 8fe683dab8
commit e5f5ee2679
3 changed files with 0 additions and 46 deletions

View File

@@ -812,44 +812,6 @@ void scoutfs_block_writer_forget(struct super_block *sb,
}
}
/*
* Change a cached block's location. We're careful to only change its
* position in the rbtree. If we find another block existing at the new
* location then we remove it from the cache and forget it if it was
* dirty.
*/
void scoutfs_block_move(struct super_block *sb,
struct scoutfs_block_writer *wri,
struct scoutfs_block *bl, u64 blkno)
{
DECLARE_BLOCK_INFO(sb, binf);
struct block_private *bp = BLOCK_PRIVATE(bl);
struct block_private *existing = NULL;
spin_lock(&binf->lock);
existing = walk_block_rbtree(&binf->root, blkno, NULL);
if (existing) {
/* only nesting of binf and wri locks */
if (test_bit(BLOCK_BIT_DIRTY, &bp->bits)) {
spin_lock(&wri->lock);
if (test_bit(BLOCK_BIT_DIRTY, &bp->bits))
block_forget(sb, wri, bp);
spin_unlock(&wri->lock);
}
block_remove(sb, existing);
}
rb_erase(&bp->node, &binf->root);
RB_CLEAR_NODE(&bp->node);
bp->bl.blkno = blkno;
walk_block_rbtree(&binf->root, blkno, bp);
TRACE_BLOCK(move, bp);
spin_unlock(&binf->lock);
}
/*
* The caller has ensured that no more dirtying will take place. This
* helps the caller avoid doing a bunch of work before calling into the

View File

@@ -45,9 +45,6 @@ void scoutfs_block_writer_forget_all(struct super_block *sb,
void scoutfs_block_writer_forget(struct super_block *sb,
struct scoutfs_block_writer *wri,
struct scoutfs_block *bl);
void scoutfs_block_move(struct super_block *sb,
struct scoutfs_block_writer *wri,
struct scoutfs_block *bl, u64 blkno);
bool scoutfs_block_writer_has_dirty(struct super_block *sb,
struct scoutfs_block_writer *wri);
u64 scoutfs_block_writer_dirty_bytes(struct super_block *sb,

View File

@@ -2205,11 +2205,6 @@ DEFINE_EVENT(scoutfs_block_class, scoutfs_block_invalidate,
int refcount, int io_count, unsigned long bits, u64 lru_moved),
TP_ARGS(sb, bp, blkno, refcount, io_count, bits, lru_moved)
);
DEFINE_EVENT(scoutfs_block_class, scoutfs_block_move,
TP_PROTO(struct super_block *sb, void *bp, u64 blkno,
int refcount, int io_count, unsigned long bits, u64 lru_moved),
TP_ARGS(sb, bp, blkno, refcount, io_count, bits, lru_moved)
);
DEFINE_EVENT(scoutfs_block_class, scoutfs_block_mark_dirty,
TP_PROTO(struct super_block *sb, void *bp, u64 blkno,
int refcount, int io_count, unsigned long bits, u64 lru_moved),