Disable DIRECT_IO for LUKS header with unaligned keyslots.

Fixes issue#287.

Such a header is very rare, it is not worth to do more detection here.
This commit is contained in:
Milan Broz
2016-03-23 13:44:37 +01:00
parent 6894701392
commit d7a224e47a
3 changed files with 17 additions and 0 deletions

View File

@@ -530,3 +530,8 @@ size_t size_round_up(size_t size, unsigned int block)
size_t s = (size + (block - 1)) / block;
return s * block;
}
void device_disable_direct_io(struct device *device)
{
device->o_direct = 0;
}