Support device/file images if O_DIRECT cannot be used (1.5.1).

On some filesystems (like tmpfs) O_DIRECT cannot be used.
So just try to open device without O_DIRECT in the second try.
This commit is contained in:
Milan Broz
2012-12-29 15:29:43 +01:00
parent 0451e1c23a
commit 6190ad928d
6 changed files with 43 additions and 23 deletions

View File

@@ -78,6 +78,7 @@ void device_topology_alignment(struct device *device,
int device_block_size(struct device *device);
int device_read_ahead(struct device *device, uint32_t *read_ahead);
int device_size(struct device *device, uint64_t *size);
int device_open(struct device *device, int flags);
enum devcheck { DEV_OK = 0, DEV_EXCL = 1, DEV_SHARED = 2 };
int device_block_adjust(struct crypt_device *cd,