Lines Matching refs:backing_hd
610 bs->backing_hd = bdrv_new(""); in bdrv_open()
620 ret = bdrv_open(bs->backing_hd, backing_filename, back_flags, back_drv); in bdrv_open()
626 bs->backing_hd->keep_read_only = !(flags & BDRV_O_RDWR); in bdrv_open()
629 bs->backing_hd->keep_read_only = bs->keep_read_only; in bdrv_open()
655 if (bs->backing_hd) { in bdrv_close()
656 bdrv_delete(bs->backing_hd); in bdrv_close()
657 bs->backing_hd = NULL; in bdrv_close()
760 if (!bs->backing_hd) { in bdrv_commit()
764 if (bs->backing_hd->keep_read_only) { in bdrv_commit()
768 ro = bs->backing_hd->read_only; in bdrv_commit()
769 strncpy(filename, bs->backing_hd->filename, sizeof(filename)); in bdrv_commit()
770 open_flags = bs->backing_hd->open_flags; in bdrv_commit()
774 bdrv_delete(bs->backing_hd); in bdrv_commit()
775 bs->backing_hd = NULL; in bdrv_commit()
789 bs->backing_hd = bs_ro; in bdrv_commit()
792 bs->backing_hd = bs_rw; in bdrv_commit()
806 if (bdrv_write(bs->backing_hd, sector, buf, n) != 0) { in bdrv_commit()
822 if (bs->backing_hd) in bdrv_commit()
823 bdrv_flush(bs->backing_hd); in bdrv_commit()
830 bdrv_delete(bs->backing_hd); in bdrv_commit()
831 bs->backing_hd = NULL; in bdrv_commit()
840 bs->backing_hd = bs_ro; in bdrv_commit()
841 bs->backing_hd->keep_read_only = 0; in bdrv_commit()
1361 if (bs->backing_hd && bs->backing_hd->encrypted) in bdrv_is_encrypted()
1368 BlockDriverState *backing_hd = bs->backing_hd; in bdrv_key_required() local
1370 if (backing_hd && backing_hd->encrypted && !backing_hd->valid_key) in bdrv_key_required()
1378 if (bs->backing_hd && bs->backing_hd->encrypted) { in bdrv_set_key()
1379 ret = bdrv_set_key(bs->backing_hd, key); in bdrv_set_key()
1710 if (bs->backing_hd && bs->backing_hd->encrypted) in bdrv_get_encrypted_filename()