• Tejun Heo's avatar
    bdi: Add bdi->id · 34f8fe50
    Tejun Heo authored
    There currently is no way to universally identify and lookup a bdi
    without holding a reference and pointer to it.  This patch adds an
    non-recycling bdi->id and implements bdi_get_by_id() which looks up
    bdis by their ids.  This will be used by memcg foreign inode flushing.
    
    I left bdi_list alone for simplicity and because while rb_tree does
    support rcu assignment it doesn't seem to guarantee lossless walk when
    walk is racing aginst tree rebalance operations.
    Reviewed-by: default avatarJan Kara <jack@suse.cz>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    34f8fe50
backing-dev.c 28 KB