• Joe Thornber's avatar
    dm bufio: add LRU abstraction · be845bab
    Joe Thornber authored
    A CLOCK algorithm is used in this LRU abstraction.  This avoids
    relinking list nodes, which would require a write lock protecting it.
    
    None of the LRU methods are threadsafe; locking must be done at a
    higher level.
    
    Code that uses this new LRU will be introduced in the next 2 commits.
    
    As such, this commit will cause "defined but not used" compiler warnings
    that will be resolved by the next 2 commits.
    Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
    Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
    be845bab
dm-bufio.c 55.4 KB