All of lore.kernel.org
 help / color / mirror / Atom feed
* [QUESTION] lvmcache_label_scan: checksum error at offset xxx
@ 2021-06-09  9:32 Wu Guanghao
  2021-06-09 11:09 ` Zdenek Kabelac
  0 siblings, 1 reply; 7+ messages in thread
From: Wu Guanghao @ 2021-06-09  9:32 UTC (permalink / raw)
  To: lvm-devel

Hi,

lvcreate and lvremove execute lvmcache_label_scan() to read the metadata on the lvm device,
but no lock is added for protection. if other processes are currently executing vg_commit() to submit metadata,
then it will go wrong.


lvremove (process1)					
   |--> lvmcache_label_scan()(no lock protection)				
		|-> read metadata data
			 |
			 |
			 | 			
			 |--------->lvm device metadata  				


lvremove (process2)
  ...
  |--> lockd_vg(process_vg)
  |    (Lock the vg that needs to be processed)
  ...
  |--> vg_commit() 								
  	   |--> write metadata data
		     |-----------------> lvm device metadata
  ...
  |--> unlock_vg(process_vg)

Wu Guanghao



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-06-11 21:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09  9:32 [QUESTION] lvmcache_label_scan: checksum error at offset xxx Wu Guanghao
2021-06-09 11:09 ` Zdenek Kabelac
2021-06-10  9:19   ` Wu Guanghao
2021-06-10  9:53     ` Zdenek Kabelac
2021-06-10 18:44     ` David Teigland
2021-06-11  1:53       ` Wu Guanghao
2021-06-11 21:50         ` David Teigland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.