dev: removed internal spinlock from bcache
bcaches must now have an explicit external lock to protect them from concurrent access (i.e. a lock belonging to their parent block device)
This commit is contained in:
@@ -15,7 +15,6 @@ struct bcache {
|
||||
unsigned int b_sector_size;
|
||||
unsigned int b_sectors_per_page;
|
||||
struct btree b_pagetree;
|
||||
spin_lock_t b_lock;
|
||||
};
|
||||
|
||||
struct bcache_sector {
|
||||
@@ -31,15 +30,6 @@ extern void bcache_destroy(struct bcache *cache);
|
||||
extern kern_status_t bcache_init(struct bcache *cache, unsigned int block_size);
|
||||
extern void bcache_deinit(struct bcache *cache);
|
||||
|
||||
static inline void bcache_lock(struct bcache *cache)
|
||||
{
|
||||
spin_lock(&cache->b_lock);
|
||||
}
|
||||
static inline void bcache_unlock(struct bcache *cache)
|
||||
{
|
||||
spin_unlock(&cache->b_lock);
|
||||
}
|
||||
|
||||
extern kern_status_t bcache_get(struct bcache *cache, sectors_t at, bool create, struct bcache_sector *out);
|
||||
extern void bcache_mark_present(struct bcache_sector *sect);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user