mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Try alternative syncs if BLKFLSBUF fails.
This commit is contained in:
parent
662b119be6
commit
fe451a01e8
@ -72,7 +72,13 @@ int dev_get_sectsize(struct device *dev, uint32_t *size)
|
||||
|
||||
static void _flush(int fd)
|
||||
{
|
||||
ioctl(fd, BLKFLSBUF, 0);
|
||||
if (ioctl(fd, BLKFLSBUF, 0) >= 0)
|
||||
return;
|
||||
|
||||
if (fsync(fd) >= 0)
|
||||
return;
|
||||
|
||||
sync();
|
||||
}
|
||||
|
||||
int dev_open(struct device *dev, int flags)
|
||||
|
Loading…
Reference in New Issue
Block a user