All of lore.kernel.org
 help / color / mirror / Atom feed
* [Question] why not flush device cache at _vg_commit_raw
@ 2024-01-22 11:22 Su Yue
  2024-01-22 12:48 ` Zdenek Kabelac
  0 siblings, 1 reply; 14+ messages in thread
From: Su Yue @ 2024-01-22 11:22 UTC (permalink / raw)
  To: linux-lvm; +Cc: Heming Zhao, Anthony Iliopoulos, Lidong Zhong, martin.wilck

Hi lvm folks,
  Recently We received a report about the device cache issue after vgchange —deltag.
What confuses me is that lvm never calls fsync on block devices even at the end of commit phase.

IIRC, it’s common operations for userspace tools to call fsync/O_SYNC/O_DSYNC while writing 
critical data. Yes, lvm2 opens devices with O_DIRECT if they support , but O_DIRECT doesn't 
provide data was persistent to storage when write returns. The data can still be in the device cache,
If power failure happens in the timing, such critical metadata/data like vg metadata could be lost.

Is there any particular reason not to flush data cache at VG commit time? 

Thanks
—
Su

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

end of thread, other threads:[~2024-01-24 23:17 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-22 11:22 [Question] why not flush device cache at _vg_commit_raw Su Yue
2024-01-22 12:48 ` Zdenek Kabelac
2024-01-22 13:46   ` Anthony Iliopoulos
2024-01-22 14:52     ` Zdenek Kabelac
2024-01-22 15:26       ` Ilia Zykov
2024-01-23  1:54         ` Su Yue
2024-01-23  8:15         ` Martin Wilck
2024-01-22 16:01       ` Anthony Iliopoulos
2024-01-23 16:42       ` Demi Marie Obenour
2024-01-23 17:50         ` Zdenek Kabelac
2024-01-24 11:58           ` Anthony Iliopoulos
2024-01-24 12:35             ` Zdenek Kabelac
2024-01-24 13:13               ` Anthony Iliopoulos
2024-01-24 23:17                 ` Heming Zhao

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.