Skip to content

Commit 88356f6

Browse files
committed
little refactoring
Signed-off-by: Viktor Kramarenko <[email protected]>
1 parent 2af3028 commit 88356f6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

images/agent/src/pkg/cache/cache.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,10 @@ func (c *Cache) PrintTheCache(log logger.Logger) {
172172
log.Cache(c.vgsErrs.String())
173173
log.Cache("[VGs ENDS]")
174174
log.Cache("[LVs BEGIN]")
175-
c.m.RLock()
176-
for _, lv := range c.lvs {
177-
log.Cache(fmt.Sprintf(" Data Name: %s, VG name: %s, size: %s, tags: %s, attr: %s, pool: %s", lv.Data.LVName, lv.Data.VGName, lv.Data.LVSize.String(), lv.Data.LvTags, lv.Data.LVAttr, lv.Data.PoolName))
175+
lvs, _ := c.GetLVs()
176+
for _, lv := range lvs {
177+
log.Cache(fmt.Sprintf(" Data Name: %s, VG name: %s, size: %s, tags: %s, attr: %s, pool: %s", lv.LVName, lv.VGName, lv.LVSize.String(), lv.LvTags, lv.LVAttr, lv.PoolName))
178178
}
179-
c.m.RUnlock()
180179
log.Cache("[ERRS]")
181180
log.Cache(c.lvsErrs.String())
182181
log.Cache("[LVs ENDS]")

0 commit comments

Comments
 (0)