block.c (40840e419be31e6a32e6ea24511c74b389d5e0e4) | block.c (61b49e48b379db45f0ea91c93a61c873695549a9) |
---|---|
1/* 2 * QEMU System Emulator block driver 3 * 4 * Copyright (c) 2003 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 --- 1414 unchanged lines hidden (view full) --- 1423 } 1424 bs->backing = bdrv_attach_child(bs, backing_hd, "backing", &child_backing); 1425 bs->open_flags &= ~BDRV_O_NO_BACKING; 1426 pstrcpy(bs->backing_file, sizeof(bs->backing_file), backing_hd->filename); 1427 pstrcpy(bs->backing_format, sizeof(bs->backing_format), 1428 backing_hd->drv ? backing_hd->drv->format_name : ""); 1429 1430 bdrv_op_block_all(backing_hd, bs->backing_blocker); | 1/* 2 * QEMU System Emulator block driver 3 * 4 * Copyright (c) 2003 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 --- 1414 unchanged lines hidden (view full) --- 1423 } 1424 bs->backing = bdrv_attach_child(bs, backing_hd, "backing", &child_backing); 1425 bs->open_flags &= ~BDRV_O_NO_BACKING; 1426 pstrcpy(bs->backing_file, sizeof(bs->backing_file), backing_hd->filename); 1427 pstrcpy(bs->backing_format, sizeof(bs->backing_format), 1428 backing_hd->drv ? backing_hd->drv->format_name : ""); 1429 1430 bdrv_op_block_all(backing_hd, bs->backing_blocker); |
1431 /* Otherwise we won't be able to commit due to check in bdrv_commit */ | 1431 /* Otherwise we won't be able to commit or stream */ |
1432 bdrv_op_unblock(backing_hd, BLOCK_OP_TYPE_COMMIT_TARGET, 1433 bs->backing_blocker); | 1432 bdrv_op_unblock(backing_hd, BLOCK_OP_TYPE_COMMIT_TARGET, 1433 bs->backing_blocker); |
1434 bdrv_op_unblock(backing_hd, BLOCK_OP_TYPE_STREAM, 1435 bs->backing_blocker); |
|
1434 /* 1435 * We do backup in 3 ways: 1436 * 1. drive backup 1437 * The target bs is new opened, and the source is top BDS 1438 * 2. blockdev backup 1439 * Both the source and the target are top BDSes. 1440 * 3. internal backup(used for block replication) 1441 * Both the source and the target are backing file --- 2634 unchanged lines hidden --- | 1436 /* 1437 * We do backup in 3 ways: 1438 * 1. drive backup 1439 * The target bs is new opened, and the source is top BDS 1440 * 2. blockdev backup 1441 * Both the source and the target are top BDSes. 1442 * 3. internal backup(used for block replication) 1443 * Both the source and the target are backing file --- 2634 unchanged lines hidden --- |