block.c (317fc44ef2bfa87e96adecf035ed136ed9d78c8f) block.c (5669b44de5b3b607a3a4749e0c8c5ddfd723e76b)
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

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

788 flags |= BDRV_O_CACHE_WB | BDRV_O_UNMAP;
789
790 /* The backing file of a temporary snapshot is read-only */
791 if (flags & BDRV_O_SNAPSHOT) {
792 flags &= ~BDRV_O_RDWR;
793 }
794
795 /* Clear flags that only apply to the top layer */
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

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

788 flags |= BDRV_O_CACHE_WB | BDRV_O_UNMAP;
789
790 /* The backing file of a temporary snapshot is read-only */
791 if (flags & BDRV_O_SNAPSHOT) {
792 flags &= ~BDRV_O_RDWR;
793 }
794
795 /* Clear flags that only apply to the top layer */
796 flags &= ~(BDRV_O_SNAPSHOT | BDRV_O_NO_BACKING);
796 flags &= ~(BDRV_O_SNAPSHOT | BDRV_O_NO_BACKING | BDRV_O_COPY_ON_READ);
797
798 return flags;
799}
800
801/*
802 * Returns the flags that bs->backing_hd should get, based on the given flags
803 * for the parent BDS
804 */

--- 4776 unchanged lines hidden ---
797
798 return flags;
799}
800
801/*
802 * Returns the flags that bs->backing_hd should get, based on the given flags
803 * for the parent BDS
804 */

--- 4776 unchanged lines hidden ---