mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
Since there is a group of commands that need to access 'lv_list' while still need to search for LV by its name, make the whole struct lv_list a member of logical_volume structure. This makes it easy to return also 'lv_list' this list this LV within VG. Also the patch should not use more memory, since we were allocating lv_list for each LV anyway when linkin LV to VG. Since find_lv_by_name() is now using radix_tree(), use the same 'search for /' in LV in name for both find_lv() & find_lv_in_vg(). TODO: Possibly refactor code and use only dm_list instead of lv_list and dereference LV with container_of() (thus saving pointer within struct logical_volume) - but we use 'lv_list' currently in many places...