qcow.c (75b7b25d44a64411ea0ae792d5ebad8ddf22527e) | qcow.c (79a558664840adf502fe94907b0a680836e3e98e) |
---|---|
1/* 2 * Block driver for the QCOW format 3 * 4 * Copyright (c) 2004-2006 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 1010 unchanged lines hidden (view full) --- 1019fail: 1020 g_free(backing_fmt); 1021 qobject_unref(qdict); 1022 bdrv_co_unref(bs); 1023 qapi_free_BlockdevCreateOptions(create_options); 1024 return ret; 1025} 1026 | 1/* 2 * Block driver for the QCOW format 3 * 4 * Copyright (c) 2004-2006 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 1010 unchanged lines hidden (view full) --- 1019fail: 1020 g_free(backing_fmt); 1021 qobject_unref(qdict); 1022 bdrv_co_unref(bs); 1023 qapi_free_BlockdevCreateOptions(create_options); 1024 return ret; 1025} 1026 |
1027static int qcow_make_empty(BlockDriverState *bs) | 1027static int GRAPH_RDLOCK qcow_make_empty(BlockDriverState *bs) |
1028{ 1029 BDRVQcowState *s = bs->opaque; 1030 uint32_t l1_length = s->l1_size * sizeof(uint64_t); 1031 int ret; 1032 1033 memset(s->l1_table, 0, l1_length); 1034 if (bdrv_pwrite_sync(bs->file, s->l1_table_offset, l1_length, s->l1_table, 1035 0) < 0) --- 180 unchanged lines hidden --- | 1028{ 1029 BDRVQcowState *s = bs->opaque; 1030 uint32_t l1_length = s->l1_size * sizeof(uint64_t); 1031 int ret; 1032 1033 memset(s->l1_table, 0, l1_length); 1034 if (bdrv_pwrite_sync(bs->file, s->l1_table_offset, l1_length, s->l1_table, 1035 0) < 0) --- 180 unchanged lines hidden --- |