mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
device: Add flag to indicate that a code path can support AIO
Until the whole source supports AIO, library code can check for AIO_SUPPORTED_CODE_PATH to determine whether or not it is OK to use AIO.
This commit is contained in:
parent
e869a52cc4
commit
7a9af3cd0e
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.178 -
|
Version 2.02.178 -
|
||||||
=====================================
|
=====================================
|
||||||
|
Add AIO_SUPPORTED_CODE_PATH to indicate whether AIO may be used.
|
||||||
Configure ensures /usr/bin dir is checked for dmpd tools.
|
Configure ensures /usr/bin dir is checked for dmpd tools.
|
||||||
Restore pvmove support for wide-clustered active volumes (2.02.177).
|
Restore pvmove support for wide-clustered active volumes (2.02.177).
|
||||||
Avoid non-exclusive activation of exclusive segment types.
|
Avoid non-exclusive activation of exclusive segment types.
|
||||||
|
2
lib/cache/lvmcache.c
vendored
2
lib/cache/lvmcache.c
vendored
@ -1156,7 +1156,7 @@ int lvmcache_label_scan(struct cmd_context *cmd)
|
|||||||
|
|
||||||
while ((dev = dev_iter_get(iter))) {
|
while ((dev = dev_iter_get(iter))) {
|
||||||
nr_labels_outstanding++;
|
nr_labels_outstanding++;
|
||||||
if (!label_read_callback(dev, UINT64_C(0), 0, _process_label_data, &nr_labels_outstanding))
|
if (!label_read_callback(dev, UINT64_C(0), AIO_SUPPORTED_CODE_PATH, _process_label_data, &nr_labels_outstanding))
|
||||||
nr_labels_outstanding--;
|
nr_labels_outstanding--;
|
||||||
dev_count++;
|
dev_count++;
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,11 @@
|
|||||||
#define DEV_ASSUMED_FOR_LV 0x00000200 /* Is device assumed for an LV */
|
#define DEV_ASSUMED_FOR_LV 0x00000200 /* Is device assumed for an LV */
|
||||||
#define DEV_NOT_O_NOATIME 0x00000400 /* Don't use O_NOATIME */
|
#define DEV_NOT_O_NOATIME 0x00000400 /* Don't use O_NOATIME */
|
||||||
|
|
||||||
|
/* ioflags */
|
||||||
|
#define AIO_SUPPORTED_CODE_PATH 0x00000001 /* Set if the code path supports AIO */
|
||||||
|
|
||||||
|
#define aio_supported_code_path(ioflags) (((ioflags) & AIO_SUPPORTED_CODE_PATH) ? 1 : 0)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Standard format for callback functions.
|
* Standard format for callback functions.
|
||||||
* When provided, callback functions are called exactly once.
|
* When provided, callback functions are called exactly once.
|
||||||
|
Loading…
Reference in New Issue
Block a user