Skip to content
Snippets Groups Projects
Select Git revision
  • v1.1-rc0
  • master default
  • sp/trace-zero-ranges
  • stable-2.5
  • stable-2.4
  • stable-2.3
  • stable-2.2
  • stable-2.1
  • stable-2.0
  • stable-1.7
  • stable-1.6
  • stable-1.5
  • stable-1.4
  • stable-1.3
  • stable-1.2
  • stable-1.1
  • stable-1.0
  • stable-0.15
  • stable-0.14
  • stable-0.13
  • stable-0.12
  • v2.7.0-rc1
  • v2.7.0-rc0
  • v2.6.0
  • v2.5.1.1
  • v2.6.0-rc5
  • v2.6.0-rc4
  • v2.6.0-rc3
  • v2.6.0-rc2
  • v2.6.0-rc1
  • v2.6.0-rc0
  • v2.5.1
  • v2.5.0
  • v2.5.0-rc4
  • v2.5.0-rc3
  • v2.5.0-rc2
  • v2.5.0-rc1
  • v2.5.0-rc0
  • v2.4.1
  • v2.4.0.1
  • v2.3.1
41 results

block_int.h

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    block_int.h 15.60 KiB
    /*
     * QEMU System Emulator block driver
     *
     * Copyright (c) 2003 Fabrice Bellard
     *
     * Permission is hereby granted, free of charge, to any person obtaining a copy
     * of this software and associated documentation files (the "Software"), to deal
     * in the Software without restriction, including without limitation the rights
     * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
     * copies of the Software, and to permit persons to whom the Software is
     * furnished to do so, subject to the following conditions:
     *
     * The above copyright notice and this permission notice shall be included in
     * all copies or substantial portions of the Software.
     *
     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
     * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
     * THE SOFTWARE.
     */
    #ifndef BLOCK_INT_H
    #define BLOCK_INT_H
    
    #include "block.h"
    #include "qemu-option.h"
    #include "qemu-queue.h"
    #include "qemu-coroutine.h"
    #include "qemu-timer.h"
    #include "qapi-types.h"
    
    #define BLOCK_FLAG_ENCRYPT	1
    #define BLOCK_FLAG_COMPAT6	4
    
    #define BLOCK_IO_LIMIT_READ     0
    #define BLOCK_IO_LIMIT_WRITE    1
    #define BLOCK_IO_LIMIT_TOTAL    2
    
    #define BLOCK_IO_SLICE_TIME     100000000
    #define NANOSECONDS_PER_SECOND  1000000000.0
    
    #define BLOCK_OPT_SIZE          "size"
    #define BLOCK_OPT_ENCRYPT       "encryption"
    #define BLOCK_OPT_COMPAT6       "compat6"
    #define BLOCK_OPT_BACKING_FILE  "backing_file"
    #define BLOCK_OPT_BACKING_FMT   "backing_fmt"
    #define BLOCK_OPT_CLUSTER_SIZE  "cluster_size"
    #define BLOCK_OPT_TABLE_SIZE    "table_size"
    #define BLOCK_OPT_PREALLOC      "preallocation"
    #define BLOCK_OPT_SUBFMT        "subformat"
    #define BLOCK_OPT_COMPAT_LEVEL  "compat"
    
    typedef struct BdrvTrackedRequest BdrvTrackedRequest;
    
    typedef struct BlockIOLimit {
        int64_t bps[3];
        int64_t iops[3];
    } BlockIOLimit;
    
    typedef struct BlockIOBaseValue {
        uint64_t bytes[2];
        uint64_t ios[2];
    } BlockIOBaseValue;
    
    typedef struct BlockJob BlockJob;
    
    /**
     * BlockJobType: