iscsi.c (58e2e17dba49b43f4ac9de19468aeae1c787dcc2) iscsi.c (2b148f392b2bfeba76d3e6d9607c3bd072350e8c)
1/*
2 * QEMU Block driver for iSCSI images
3 *
4 * Copyright (c) 2010-2011 Ronnie Sahlberg <ronniesahlberg@gmail.com>
5 * Copyright (c) 2012-2017 Peter Lieven <pl@kamp.de>
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal

--- 2163 unchanged lines hidden (view full) ---

2172static int iscsi_get_info(BlockDriverState *bs, BlockDriverInfo *bdi)
2173{
2174 IscsiLun *iscsilun = bs->opaque;
2175 bdi->unallocated_blocks_are_zero = iscsilun->lbprz;
2176 bdi->cluster_size = iscsilun->cluster_size;
2177 return 0;
2178}
2179
1/*
2 * QEMU Block driver for iSCSI images
3 *
4 * Copyright (c) 2010-2011 Ronnie Sahlberg <ronniesahlberg@gmail.com>
5 * Copyright (c) 2012-2017 Peter Lieven <pl@kamp.de>
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal

--- 2163 unchanged lines hidden (view full) ---

2172static int iscsi_get_info(BlockDriverState *bs, BlockDriverInfo *bdi)
2173{
2174 IscsiLun *iscsilun = bs->opaque;
2175 bdi->unallocated_blocks_are_zero = iscsilun->lbprz;
2176 bdi->cluster_size = iscsilun->cluster_size;
2177 return 0;
2178}
2179
2180static void iscsi_invalidate_cache(BlockDriverState *bs,
2181 Error **errp)
2180static void coroutine_fn iscsi_co_invalidate_cache(BlockDriverState *bs,
2181 Error **errp)
2182{
2183 IscsiLun *iscsilun = bs->opaque;
2184 iscsi_allocmap_invalidate(iscsilun);
2185}
2186
2187static QemuOptsList iscsi_create_opts = {
2188 .name = "iscsi-create-opts",
2189 .head = QTAILQ_HEAD_INITIALIZER(iscsi_create_opts.head),

--- 14 unchanged lines hidden (view full) ---

2204 .instance_size = sizeof(IscsiLun),
2205 .bdrv_parse_filename = iscsi_parse_filename,
2206 .bdrv_file_open = iscsi_open,
2207 .bdrv_close = iscsi_close,
2208 .bdrv_co_create_opts = iscsi_co_create_opts,
2209 .create_opts = &iscsi_create_opts,
2210 .bdrv_reopen_prepare = iscsi_reopen_prepare,
2211 .bdrv_reopen_commit = iscsi_reopen_commit,
2182{
2183 IscsiLun *iscsilun = bs->opaque;
2184 iscsi_allocmap_invalidate(iscsilun);
2185}
2186
2187static QemuOptsList iscsi_create_opts = {
2188 .name = "iscsi-create-opts",
2189 .head = QTAILQ_HEAD_INITIALIZER(iscsi_create_opts.head),

--- 14 unchanged lines hidden (view full) ---

2204 .instance_size = sizeof(IscsiLun),
2205 .bdrv_parse_filename = iscsi_parse_filename,
2206 .bdrv_file_open = iscsi_open,
2207 .bdrv_close = iscsi_close,
2208 .bdrv_co_create_opts = iscsi_co_create_opts,
2209 .create_opts = &iscsi_create_opts,
2210 .bdrv_reopen_prepare = iscsi_reopen_prepare,
2211 .bdrv_reopen_commit = iscsi_reopen_commit,
2212 .bdrv_invalidate_cache = iscsi_invalidate_cache,
2212 .bdrv_co_invalidate_cache = iscsi_co_invalidate_cache,
2213
2214 .bdrv_getlength = iscsi_getlength,
2215 .bdrv_get_info = iscsi_get_info,
2216 .bdrv_truncate = iscsi_truncate,
2217 .bdrv_refresh_limits = iscsi_refresh_limits,
2218
2219 .bdrv_co_block_status = iscsi_co_block_status,
2220 .bdrv_co_pdiscard = iscsi_co_pdiscard,

--- 58 unchanged lines hidden ---
2213
2214 .bdrv_getlength = iscsi_getlength,
2215 .bdrv_get_info = iscsi_get_info,
2216 .bdrv_truncate = iscsi_truncate,
2217 .bdrv_refresh_limits = iscsi_refresh_limits,
2218
2219 .bdrv_co_block_status = iscsi_co_block_status,
2220 .bdrv_co_pdiscard = iscsi_co_pdiscard,

--- 58 unchanged lines hidden ---