@@ -135,12 +135,6 @@
#define RAW_LOCK_SHARED_BASE 200
typedef struct BDRVRawState {
- int fd;
- bool use_lock;
- int type;
- int open_flags;
- size_t buf_align;
-
/* The current permissions. */
uint64_t perm;
uint64_t shared_perm;
@@ -151,29 +145,34 @@ typedef struct BDRVRawState {
uint64_t locked_shared_perm;
uint64_t aio_max_batch;
+ struct {
+ uint64_t discard_nb_ok;
+ uint64_t discard_nb_failed;
+ uint64_t discard_bytes_ok;
+ } stats;
+ PRManager *pr_mgr;
+ BDRVReopenState *reopen_state;
+
+ size_t buf_align;
+ int fd;
+ int type;
+ int open_flags;
int perm_change_fd;
int perm_change_flags;
- BDRVReopenState *reopen_state;
+ int page_cache_inconsistent; /* errno from fdatasync failure */
+ bool use_lock;
+ bool has_fallocate;
+ bool needs_alignment;
+ bool force_alignment;
+ bool drop_cache;
+ bool check_cache_dropped;
bool has_discard:1;
bool has_write_zeroes:1;
bool use_linux_aio:1;
bool has_laio_fdsync:1;
bool use_linux_io_uring:1;
- int page_cache_inconsistent; /* errno from fdatasync failure */
- bool has_fallocate;
- bool needs_alignment;
- bool force_alignment;
- bool drop_cache;
- bool check_cache_dropped;
- struct {
- uint64_t discard_nb_ok;
- uint64_t discard_nb_failed;
- uint64_t discard_bytes_ok;
- } stats;
-
- PRManager *pr_mgr;
} BDRVRawState;
typedef struct BDRVRawReopenState {