Skip to contentSkip to conversation

block: Move away from anglo-centricity

PATCH In review Max Reitz 5 participants 5 messages Apr 1, 2016 – Apr 4, 2016 Block layer

lore
Share & tools
lore

Max Reitz

author
#0 lore raw

PATCH 1/1 block: Move away from anglo-centricity

In its organizational structure, the qemu project is rather
decentralized: Many different maintainers manage their own more or less secluded subsystems. However, regarding languages, it is still rather anglo-centric.

This issue has been brought up multiple times in regards to user-visible output such as error messages and has unfortunately generally been dismissed, except for some UIs.

Development always flows from the developer community to the user. Our developer community is just as diverse (or at least I hope it is) as our user base. Therefore, we should reflect this diversity in our development process in order for this diversity to reach our users as well, so they can benefit from it.

The human-targeted part of that development process are comments in the source code, obviously. Thus, in order to exhibit qemu's diversity, it makes sense for each subsystem's comments to be translated into the maintainer's native language.

Unfortunately, I do not speak Swabian.

However, as a submaintainer under Kevin, I think it will be fine to translate the comments into German, as that is supposedly a language we both share.

I'm certain that this will not hamper development itself by much. First of all, many other developers in the block area are able to speak
German: Markus Armbruster, Stefan Hajnoczi, Peter Lieven, Stefan Weil, just to name a few.

Second, good code is supposed to be self-explanatory, i.e. without reading the comments. While it should go without saying that the block layer's code quality is simply marvelous, we can now proof that it indeed is, by seeing whether people who cannot speak German can still understand the code.

(Although some of our code is rumored to be rather hard to understand
even with the comments. But those rumors are purely unfounded, I am sure.)

In the rather improbable event that someone is not able to understand the code without being able to read the comments, they will then need to learn German. So this is fine, too.

Third, this will surely attract a wave of German developers who were so far unable to participate in qemu's development because of the language barrier. In order to facilitate this process, the next step will be to use German commit messages for every commit in the block layer and to allow German variable names.

I am sure if all maintainers follow this process of translating their subsystem's comments, variable names and string contents into their native language, qemu will become a shining example of what we call „Kraut und Rüben“. And everyone knows how much the Krauts like Kraut.

---
 block.c                | 936 ++++++++++++++++++++++++++-----------------------
 block/blkdebug.c       |  44 +--
 block/linux-aio.c      |  51 +--
 block/qcow.c           | 122 +++----
 block/qcow2-cache.c    |  18 +-
 block/qcow2-cluster.c  | 566 ++++++++++++++++--------------
 block/qcow2-refcount.c | 642 +++++++++++++++++----------------
 block/qcow2-snapshot.c | 119 ++++---
 block/qcow2.c          | 536 +++++++++++++++-------------
 block/qcow2.h          | 127 +++----
 block/raw-aio.h        |   6 +-
 block/raw-posix.c      | 414 +++++++++++-----------
 block/raw-win32.c      |  45 +--
 block/raw_bsd.c        |  19 +-
 block/vpc.c            | 132 +++----
 block/win32-aio.c      |   4 +-
 blockdev-nbd.c         |   7 +-
 qemu-img.c             | 310 ++++++++--------
 qemu-io-cmds.c         |  80 +++--
 qemu-io.c              |  19 +-
 20 files changed, 2218 insertions(+), 1979 deletions(-)
block.c +493 -443
index d36eb75..61af50c 100644
@@ -54,7 +54,8 @@
 #include <windows.h>
 #endif
 
-#define NOT_DONE 0x7fffffff /* used while emulated sync operation in progress */
+#define NOT_DONE 0x7fffffff /* zeigt an, dass eine Synchronisationsoperation
+                               stattfindet */
 
 static QTAILQ_HEAD(, BlockDriverState) graph_bdrv_states =
     QTAILQ_HEAD_INITIALIZER(graph_bdrv_states);
@@ -70,7 +71,8 @@ static int bdrv_open_inherit(BlockDriverState **pbs, const char *filename,
                              BlockDriverState *parent,
                              const BdrvChildRole *child_role, Error **errp);
 
-/* If non-zero, use only whitelisted block drivers */
+/* Ist diese Variable nicht null, dann werden nur whitegelistete Blocktreiber
+ * verwendet */
 static int use_bdrv_whitelist;
 
 static void bdrv_close(BlockDriverState *bs);
@@ -98,7 +100,7 @@ int is_windows_drive(const char *filename)
 size_t bdrv_opt_mem_align(BlockDriverState *bs)
 {
     if (!bs || !bs->drv) {
-        /* page size or 4k (hdd sector size) should be on the safe side */
+        /* Seitengröße oder 4k (HDD-Sektorengröße) sollte genügen */
         return MAX(4096, getpagesize());
     }
 
@@ -108,14 +110,14 @@ size_t bdrv_opt_mem_align(BlockDriverState *bs)
 size_t bdrv_min_mem_align(BlockDriverState *bs)
 {
     if (!bs || !bs->drv) {
-        /* page size or 4k (hdd sector size) should be on the safe side */
+        /* Seitengröße oder 4k (HDD-Sektorengröße) sollte genügen */
         return MAX(4096, getpagesize());
     }
 
     return bs->bl.min_mem_alignment;
 }
 
-/* check if the path starts with "<protocol>:" */
+/* Überprüfe, ob der Pfad mit "<Protokoll>:" beginnt */
 int path_has_protocol(const char *path)
 {
     const char *p;
@@ -136,7 +138,7 @@ int path_has_protocol(const char *path)
 int path_is_absolute(const char *path)
 {
 #ifdef _WIN32
-    /* specific case for names like: "\\.\d:" */
+    /* Sonderfall für Namen wie: "\\.\d:" */
     if (is_windows_drive(path) || is_windows_drive_prefix(path)) {
         return 1;
     }
@@ -146,9 +148,9 @@ int path_is_absolute(const char *path)
 #endif
 }
 
-/* if filename is absolute, just copy it to dest. Otherwise, build a
-   path to it by considering it is relative to base_path. URL are
-   supported. */
+/* Ist der Dateiname absolut, kopiere ihn einfach nach dest. Ansonsten erstelle
+   einen Pfad zu ihm unter Berücksichtigung, dass er relativ zu base_path ist.
+   URLs werden unterstützt. */
 void path_combine(char *dest, int dest_size,
                   const char *base_path,
                   const char *filename)
@@ -271,7 +273,7 @@ static int bdrv_is_whitelisted(BlockDriver *drv, bool read_only)
     const char **p;
 
     if (!whitelist_rw[0] && !whitelist_ro[0]) {
-        return 1;               /* no whitelist, anything goes */
+        return 1;               /* keine Whitelist, alles geht */
     }
 
     for (p = whitelist_rw; *p; p++) {
@@ -338,7 +340,7 @@ int bdrv_create(BlockDriver *drv, const char* filename,
     }
 
     if (qemu_in_coroutine()) {
-        /* Fast-path if already in coroutine context */
+        /* Abkürzung, wenn wir bereits im Koroutinenkontext sind */
         bdrv_create_co_entry(&cco);
     } else {
         co = qemu_coroutine_create(bdrv_create_co_entry);
@@ -381,10 +383,10 @@ int bdrv_create_file(const char *filename, QemuOpts *opts, Error **errp)
 }
 
 /**
- * Try to get @bs's logical and physical block size.
- * On success, store them in @bsz struct and return 0.
- * On failure return -errno.
- * @bs must not be empty.
+ * Versuchen Sie, @ der bs logischen und physischen Blockgröße.
+ * Bei Erfolg speichern sie in @bsz struct und 0 zurück.
+ * Bei einem Fehler Rückkehr -errno.
+ * @bs darf nicht leer sein.
  */
 int bdrv_probe_blocksizes(BlockDriverState *bs, BlockSizes *bsz)
 {
@@ -398,10 +400,10 @@ int bdrv_probe_blocksizes(BlockDriverState *bs, BlockSizes *bsz)
 }
 
 /**
- * Try to get @bs's geometry (cyls, heads, sectors).
- * On success, store them in @geo struct and return 0.
- * On failure return -errno.
- * @bs must not be empty.
+ * Versuchen @ bs Geometrie zu erhalten (cyls, Köpfe, Sektoren).
+ * Bei Erfolg speichern sie in @geo struct und 0 zurück.
+ * Bei einem Fehler Rückkehr -errno.
+ * @bs darf nicht leer sein.
  */
 int bdrv_probe_geometry(BlockDriverState *bs, HDGeometry *geo)
 {
@@ -415,15 +417,15 @@ int bdrv_probe_geometry(BlockDriverState *bs, HDGeometry *geo)
 }
 
 /*
- * Create a uniquely-named empty temporary file.
- * Return 0 upon success, otherwise a negative errno value.
+ * Erstellen Sie eine eindeutig benannte leere temporäre Datei.
+ * Return 0 bei Erfolg, sonst einen negativen Wert errno.
  */
 int get_tmp_filename(char *filename, int size)
 {
 #ifdef _WIN32
     char temp_dir[MAX_PATH];
-    /* GetTempFileName requires that its output buffer (4th param)
-       have length MAX_PATH or greater.  */
+    /* GetTempFileName erfordert, dass seine Ausgangspuffer (4 param)
+       haben Länge MAX_PATH oder höher.  */
     assert(size >= MAX_PATH);
     return (GetTempPath(MAX_PATH, temp_dir)
             && GetTempFileName(temp_dir, "qem", 0, filename)
@@ -451,8 +453,8 @@ int get_tmp_filename(char *filename, int size)
 }
 
 /*
- * Detect host devices. By convention, /dev/cdrom[N] is always
- * recognized as a host CDROM.
+ * Detect-Host-Geräte. Nach Konvention / dev / cdrom [N] ist immer
+ * als Host-CD-ROM erkannt.
  */
 static BlockDriver *find_hdev_driver(const char *filename)
 {
@@ -481,14 +483,14 @@ BlockDriver *bdrv_find_protocol(const char *filename,
     int len;
     const char *p;
 
-    /* TODO Drivers without bdrv_file_open must be specified explicitly */
+    /* TODO Treiber ohne bdrv_file_open muss explizit angegeben werden */
 
     /*
-     * XXX(hch): we really should not let host device detection
-     * override an explicit protocol specification, but moving this
-     * later breaks access to device names with colons in them.
-     * Thanks to the brain-dead persistent naming schemes on udev-
-     * based Linux systems those actually are quite common.
+     * XXX (HCH): Wir sollten wirklich nicht Host-Geräteerkennung lassen
+     * eine explizite Protokollspezifikation außer Kraft setzen, sondern
+     * bewegte diese später bricht den Zugriff auf Gerätenamen mit
+     * Doppelpunkten in ihnen. Dank der hirntot persistent Namensgebung auf
+     * udev-basierte Linux-Systeme diese sind eigentlich recht häufig.
      */
     drv1 = find_hdev_driver(filename);
     if (drv1) {
@@ -518,18 +520,18 @@ BlockDriver *bdrv_find_protocol(const char *filename,
 }
 
 /*
- * Guess image format by probing its contents.
- * This is not a good idea when your image is raw (CVE-2008-2004), but
- * we do it anyway for backward compatibility.
+ * Ratet mal, Bildformat, das von seinem Inhalt Sondieren.
+ * Dies ist keine gute Idee, wenn Ihr Bild roh (CVE-2008-2004), aber
+ * wir tun es trotzdem für die Abwärtskompatibilität.
  *
- * @buf         contains the image's first @buf_size bytes.
- * @buf_size    is the buffer size in bytes (generally BLOCK_PROBE_BUF_SIZE,
- *              but can be smaller if the image file is smaller)
- * @filename    is its filename.
+ * @buf enthält die ersten @buf_size Bytes des Bildes.
+ * @buf_size ist die Puffergröße in Byte (in der Regel BLOCK_PROBE_BUF_SIZE,
+ *              kann aber kleiner sein, wenn die Bilddatei kleiner ist)
+ * @filename ist der Dateiname.
  *
- * For all block drivers, call the bdrv_probe() method to get its
- * probing score.
- * Return the first block driver with the highest probing score.
+ * Für alle Block Treiber, rufen Sie die bdrv_probe () -Methode seine erhalten
+ * Sondieren des Gastes.
+ * Bringen Sie den ersten Block Fahrer mit der höchsten Punktzahl Sondieren.
  */
 BlockDriver *bdrv_probe_all(const uint8_t *buf, int buf_size,
                             const char *filename)
@@ -557,7 +559,8 @@ static int find_image_format(BlockDriverState *bs, const char *filename,
     uint8_t buf[BLOCK_PROBE_BUF_SIZE];
     int ret = 0;
 
-    /* Return the raw BlockDriver * to scsi-generic devices or empty drives */
+    /* Bringen Sie den rohen BlockDriver * zu scsi-generic-Geräte oder
+     * Leerfahrten */
     if (bdrv_is_sg(bs) || !bdrv_is_inserted(bs) || bdrv_getlength(bs) == 0) {
         *pdrv = &bdrv_raw;
         return ret;
@@ -582,18 +585,19 @@ static int find_image_format(BlockDriverState *bs, const char *filename,
 }
 
 /**
- * Set the current 'total_sectors' value
- * Return 0 on success, -errno on error.
+ * Stellen Sie die aktuelle 'total_sectors' Wert
+ * Zurück 0 bei Erfolg, -errno auf Fehler.
  */
 static int refresh_total_sectors(BlockDriverState *bs, int64_t hint)
 {
     BlockDriver *drv = bs->drv;
 
-    /* Do not attempt drv->bdrv_getlength() on scsi-generic devices */
+    /* Versuchen Sie nicht, DRV-> bdrv_getlength () auf scsi-generic-Geräte */
     if (bdrv_is_sg(bs))
         return 0;
 
-    /* query actual device if possible, otherwise just trust the hint */
+    /* abfragen eigentliche Gerät, wenn möglich, sonst nur den Hinweis
+     * vertrauen */
     if (drv->bdrv_getlength) {
         int64_t length = drv->bdrv_getlength(bs);
         if (length < 0) {
@@ -607,8 +611,9 @@ static int refresh_total_sectors(BlockDriverState *bs, int64_t hint)
 }
 
 /**
- * Combines a QDict of new block driver @options with any missing options taken
- * from @old_options, so that leaving out an option defaults to its old value.
+ * Kombiniert einen QDict neuer Blocktreiber @options mit irgendwelchen
+ * fehlenden Optionen genommen von @old_options, so dass eine Option
+ * standardmäßig auf seinen alten Wert auslassen.
  */
 static void bdrv_join_options(BlockDriverState *bs, QDict *options,
                               QDict *old_options)
@@ -621,16 +626,16 @@ static void bdrv_join_options(BlockDriverState *bs, QDict *options,
 }
 
 /**
- * Set open flags for a given discard mode
+ * Stellen Sie offene Flags für einen bestimmten Löschmodus
  *
- * Return 0 on success, -1 if the discard mode was invalid.
+ * Zurück bei Erfolg 0, -1, wenn der Löschmodus ungültig war.
  */
 int bdrv_parse_discard_flags(const char *mode, int *flags)
 {
     *flags &= ~BDRV_O_UNMAP;
 
     if (!strcmp(mode, "off") || !strcmp(mode, "ignore")) {
-        /* do nothing */
+        /* nichts tun */
     } else if (!strcmp(mode, "on") || !strcmp(mode, "unmap")) {
         *flags |= BDRV_O_UNMAP;
     } else {
@@ -641,9 +646,9 @@ int bdrv_parse_discard_flags(const char *mode, int *flags)
 }
 
 /**
- * Set open flags for a given cache mode
+ * Stellen Sie offene Flags für einen bestimmten Cache-Modus
  *
- * Return 0 on success, -1 if the cache mode was invalid.
+ * Zurück bei Erfolg 0, -1, wenn der Cache-Modus ungültig war.
  */
 int bdrv_parse_cache_mode(const char *mode, int *flags, bool *writethrough)
 {
@@ -670,43 +675,45 @@ int bdrv_parse_cache_mode(const char *mode, int *flags, bool *writethrough)
 }
 
 /*
- * Returns the options and flags that a temporary snapshot should get, based on
- * the originally requested flags (the originally requested image will have
- * flags like a backing file)
+ * Gibt die Optionen und Flags, die eine temporäre Snapshot sollte, erhalten
+ * basierend auf die ursprünglich angeforderten Flags (die ursprünglich
+ * angeforderte Bild wird Flags wie eine Trägerdatei)
  */
 static void bdrv_temp_snapshot_options(int *child_flags, QDict *child_options,
                                        int parent_flags, QDict *parent_options)
 {
     *child_flags = (parent_flags & ~BDRV_O_SNAPSHOT) | BDRV_O_TEMPORARY;
 
-    /* For temporary files, unconditional cache=unsafe is fine */
+    /* Für temporäre Dateien, unbedingte cache = unsicher ist in Ordnung */
     qdict_set_default_str(child_options, BDRV_OPT_CACHE_DIRECT, "off");
     qdict_set_default_str(child_options, BDRV_OPT_CACHE_NO_FLUSH, "on");
 }
 
 /*
- * Returns the options and flags that bs->file should get if a protocol driver
- * is expected, based on the given options and flags for the parent BDS
+ * Gibt die Optionen und Flags, die BS-> Datei sollte, wenn ein Protokolltreiber
+ * erhalten erwartet wird, basierend auf den angegebenen Optionen und Flags für
+ * die übergeordnete BDS
  */
 static void bdrv_inherited_options(int *child_flags, QDict *child_options,
                                    int parent_flags, QDict *parent_options)
 {
     int flags = parent_flags;
 
-    /* Enable protocol handling, disable format probing for bs->file */
+    /* Aktivieren Protokollverarbeitung, deaktivieren Format Sondieren für
+     * BS-> Datei */
     flags |= BDRV_O_PROTOCOL;
 
-    /* If the cache mode isn't explicitly set, inherit direct and no-flush from
-     * the parent. */
+    /* Wenn der Cache-Modus nicht explizit festgelegt wird, erben direkt und
+     * nicht bündig ab das Elternteil. */
     qdict_copy_default(child_options, parent_options, BDRV_OPT_CACHE_DIRECT);
     qdict_copy_default(child_options, parent_options, BDRV_OPT_CACHE_NO_FLUSH);
 
-    /* Our block drivers take care to send flushes and respect unmap policy,
-     * so we can default to enable both on lower layers regardless of the
-     * corresponding parent options. */
+    /* Unsere Block Fahrer kümmern Wallungen zu senden und unmap Bedingungen
+     * beachten, so können wir sowohl auf der unteren Schichten, unabhängig
+     * von der zu ermöglichen Standard entsprechenden Eltern Optionen. */
     flags |= BDRV_O_UNMAP;
 
-    /* Clear flags that only apply to the top layer */
+    /* Klare Flags, die nur auf die oberste Ebene anwenden */
     flags &= ~(BDRV_O_SNAPSHOT | BDRV_O_NO_BACKING | BDRV_O_COPY_ON_READ |
                BDRV_O_NO_IO);
 
@@ -718,9 +725,9 @@ const BdrvChildRole child_file = {
 };
 
 /*
- * Returns the options and flags that bs->file should get if the use of formats
- * (and not only protocols) is permitted for it, based on the given options and
- * flags for the parent BDS
+ * Gibt die Optionen und Flags, die BS-> Datei sollte, wenn die Verwendung von
+ * Formaten (Und nicht nur Protokolle) für die es zulässig ist, basierend auf
+ * den gegebenen Möglichkeiten und Flags für die Mutter BDS
  */
 static void bdrv_inherited_fmt_options(int *child_flags, QDict *child_options,
                                        int parent_flags, QDict *parent_options)
@@ -736,23 +743,24 @@ const BdrvChildRole child_format = {
 };
 
 /*
- * Returns the options and flags that bs->backing should get, based on the
- * given options and flags for the parent BDS
+ * Gibt die Optionen und Flags, die BS-> Unterstützung erhalten sollen, auf der
+ * Grundlage der angegebenen Optionen und Flags für die Eltern BDS
  */
 static void bdrv_backing_options(int *child_flags, QDict *child_options,
                                  int parent_flags, QDict *parent_options)
 {
     int flags = parent_flags;
 
-    /* The cache mode is inherited unmodified for backing files; except WCE,
-     * which is only applied on the top level (BlockBackend) */
+    /* Der Cache-Modus wird nicht modifizierten geerbt Dateien für die
+     * Sicherung; außer WCE, die nur auf der obersten Ebene angewendet wird
+     * (BlockBackend) */
     qdict_copy_default(child_options, parent_options, BDRV_OPT_CACHE_DIRECT);
     qdict_copy_default(child_options, parent_options, BDRV_OPT_CACHE_NO_FLUSH);
 
-    /* backing files always opened read-only */
+    /* Sichern von Dateien geöffnet immer schreibgeschützt */
     flags &= ~(BDRV_O_RDWR | BDRV_O_COPY_ON_READ);
 
-    /* snapshot=on is handled on the top layer */
+    /* snapshot = on wird auf der oberen Schicht gehandhabt */
     flags &= ~(BDRV_O_SNAPSHOT | BDRV_O_TEMPORARY);
 
     *child_flags = flags;
@@ -767,13 +775,13 @@ static int bdrv_open_flags(BlockDriverState *bs, int flags)
     int open_flags = flags;
 
     /*
-     * Clear flags that are internal to the block layer before opening the
-     * image.
+     * Klare Flags, die vor dem Öffnen der am Block Layer intern sind
+     * Image.
      */
     open_flags &= ~(BDRV_O_SNAPSHOT | BDRV_O_NO_BACKING | BDRV_O_PROTOCOL);
 
     /*
-     * Snapshots should be writable.
+     * Snapshots sollte beschreibbar sein.
      */
     if (flags & BDRV_O_TEMPORARY) {
         open_flags |= BDRV_O_RDWR;
@@ -819,27 +827,28 @@ static void bdrv_assign_node_name(BlockDriverState *bs,
         node_name = gen_node_name = id_generate(ID_BLOCK);
     } else if (!id_wellformed(node_name)) {
         /*
-         * Check for empty string or invalid characters, but not if it is
-         * generated (generated names use characters not available to the user)
+         * Überprüfen Sie, ob leere Zeichenfolge oder ungültige Zeichen, aber
+         * nicht, wenn es erzeugt (generierten Namen Zeichen nicht für den
+         * Benutzer verfügbar verwenden)
          */
         error_setg(errp, "Invalid node name");
         return;
     }
 
-    /* takes care of avoiding namespaces collisions */
+    /* kümmert sich Namespace-Kollisionen zu vermeiden */
     if (blk_by_name(node_name)) {
         error_setg(errp, "node-name=%s is conflicting with a device id",
                    node_name);
         goto out;
     }
 
-    /* takes care of avoiding duplicates node names */
+    /* kümmert sich um Duplikate Knotennamen zu vermeiden */
     if (bdrv_find_node(node_name)) {
         error_setg(errp, "Duplicate node name");
         goto out;
     }
 
-    /* copy node name into the bs and insert it into the graph list */
+    /* Kopieren Knotennamen in die bs und in der Grafik Liste einfügen */
     pstrcpy(bs->node_name, sizeof(bs->node_name), node_name);
     QTAILQ_INSERT_TAIL(&graph_bdrv_states, bs, node_list);
 out:
@@ -870,14 +879,14 @@ static QemuOptsList bdrv_runtime_opts = {
             .type = QEMU_OPT_BOOL,
             .help = "Ignore flush requests",
         },
-        { /* end of list */ }
+        { /* Ende der Liste */ }
     },
 };
 
 /*
- * Common part for opening disk images and files
+ * Gemeinsame Teil für die Öffnung der Disk-Images und Dateien
  *
- * Removes all processed options from *options.
+ * Entfernt alle verarbeiteten Optionen * Optionen.
  */
 static int bdrv_open_common(BlockDriverState *bs, BdrvChild *file,
                             QDict *options, Error **errp)
@@ -943,7 +952,8 @@ static int bdrv_open_common(BlockDriverState *bs, BdrvChild *file,
         goto fail_opts;
     }
 
-    assert(bs->copy_on_read == 0); /* bdrv_new() and bdrv_close() make it so */
+    /* bdrv_new () und bdrv_close () machen es so */
+    assert(bs->copy_on_read == 0);
     if (bs->open_flags & BDRV_O_COPY_ON_READ) {
         if (!bs->read_only) {
             bdrv_enable_copy_on_read(bs);
@@ -964,10 +974,11 @@ static int bdrv_open_common(BlockDriverState *bs, BdrvChild *file,
     bs->drv = drv;
     bs->opaque = g_malloc0(drv->instance_size);
 
-    /* Apply cache mode options */
+    /* Anwenden Cache-Modus-Optionen */
     update_flags_from_options(&bs->open_flags, opts);
 
-    /* Open the image, either directly or using a protocol */
+    /* Öffnen Sie das Bild, entweder direkt oder unter Verwendung eines
+     * Protokolls */
     open_flags = bdrv_open_flags(bs, bs->open_flags);
     if (drv->bdrv_file_open) {
         assert(file == NULL);
@@ -1058,7 +1069,7 @@ static void parse_json_protocol(QDict *options, const char **pfilename,
     QDict *json_options;
     Error *local_err = NULL;
 
-    /* Parse json: pseudo-protocol */
+    /* Parse json: Pseudo-Protokoll */
     if (!*pfilename || !g_str_has_prefix(*pfilename, "json:")) {
         return;
     }
@@ -1069,18 +1080,18 @@ static void parse_json_protocol(QDict *options, const char **pfilename,
         return;
     }
 
-    /* Options given in the filename have lower priority than options
-     * specified directly */
+    /* Optionen im Dateinamen angegeben haben niedrigere Priorität als Optionen
+     * angegeben direkt */
     qdict_join(options, json_options, false);
     QDECREF(json_options);
     *pfilename = NULL;
 }
 
 /*
- * Fills in default options for opening images and converts the legacy
- * filename/flags pair to option QDict entries.
- * The BDRV_O_PROTOCOL flag in *flags will be set or cleared accordingly if a
- * block driver has been specified explicitly.
+ * Füllt in Standardoptionen für Bilder öffnen und wandelt das Vermächtnis
+ * Dateiname / pair Flags Option QDict Einträge.
+ * Die BDRV_O_PROTOCOL Flagge in *flags werden entsprechend gesetzt oder
+ * gelöscht werden, wenn ein Block-Treiber wurde explizit angegeben.
  */
 static int bdrv_fill_options(QDict **options, const char *filename,
                              int *flags, Error **errp)
@@ -1098,8 +1109,8 @@ static int bdrv_fill_options(QDict **options, const char *filename,
             error_setg(errp, "Unknown driver '%s'", drvname);
             return -ENOENT;
         }
-        /* If the user has explicitly specified the driver, this choice should
-         * override the BDRV_O_PROTOCOL flag */
+        /* Wenn der Benutzer explizit den Fahrer festgelegt hat, sollte diese
+         * Wahl überschreiben die BDRV_O_PROTOCOL Flagge */
         protocol = drv->bdrv_file_open;
     }
 
@@ -1109,10 +1120,10 @@ static int bdrv_fill_options(QDict **options, const char *filename,
         *flags &= ~BDRV_O_PROTOCOL;
     }
 
-    /* Translate cache options from flags into options */
+    /* Übersetzen Cache-Optionen von Flaggen in Optionen */
     update_options_from_flags(*options, *flags);
 
-    /* Fetch the file name from the options QDict if necessary */
+    /* Holt den Dateinamen aus den Optionen QDict ggf. */
     if (protocol && filename) {
         if (!qdict_haskey(*options, "filename")) {
             qdict_put(*options, "filename", qstring_from_str(filename));
@@ -1124,7 +1135,7 @@ static int bdrv_fill_options(QDict **options, const char *filename,
         }
     }
 
-    /* Find the right block driver */
+    /* Finden Sie den richtigen Blocktreiber */
     filename = qdict_get_try_str(*options, "filename");
 
     if (!drvname && protocol) {
@@ -1144,7 +1155,7 @@ static int bdrv_fill_options(QDict **options, const char *filename,
 
     assert(drv || !protocol);
 
-    /* Driver-specific filename parsing */
+    /* Treiber-spezifischen Dateinamen Parsing */
     if (drv && drv->bdrv_parse_filename && parse_filename) {
         drv->bdrv_parse_filename(filename, *options, &local_err);
         if (local_err) {
@@ -1220,8 +1231,8 @@ void bdrv_unref_child(BlockDriverState *parent, BdrvChild *child)
 }
 
 /*
- * Sets the backing file link of a BDS. A new reference is created; callers
- * which don't need their own reference any more must call bdrv_unref().
+ * Setzt die Trägerdatei Link eines BDS. Eine neue Referenz erstellt; Anrufer
+ * die ihre eigenen Referenz brauchen nicht mehr müssen nennen bdrv_unref ().
  */
 void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd)
 {
@@ -1252,7 +1263,8 @@ void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd)
             backing_hd->drv ? backing_hd->drv->format_name : "");
 
     bdrv_op_block_all(backing_hd, bs->backing_blocker);
-    /* Otherwise we won't be able to commit due to check in bdrv_commit */
+    /* Sonst werden wir nicht wegen der Lage sein, zu begehen, in bdrv_commit
+     * zu überprüfen */
     bdrv_op_unblock(backing_hd, BLOCK_OP_TYPE_COMMIT_TARGET,
                     bs->backing_blocker);
 out:
@@ -1260,14 +1272,14 @@ out:
 }
 
 /*
- * Opens the backing file for a BlockDriverState if not yet open
+ * Öffnet die Trägerdatei für eine BlockDriverState wenn noch nicht geöffnet
  *
- * bdref_key specifies the key for the image's BlockdevRef in the options QDict.
- * That QDict has to be flattened; therefore, if the BlockdevRef is a QDict
- * itself, all options starting with "${bdref_key}." are considered part of the
- * BlockdevRef.
+ * bdref_key gibt den Schlüssel für die BlockdevRef das Bild in den Optionen
+ * QDict. Das QDict hat abgeflacht zu werden; Wenn daher die BlockdevRef eine
+ * QDict selbst, beginnend alle Optionen mit "$ {bdref_key}." Teil des gelten
+ * als BlockdevRef.
  *
- * TODO Can this be unified with bdrv_open_image()?
+ * TODO Kann dies mit bdrv_open_image vereinigt werden ()?
  */
 int bdrv_open_backing_file(BlockDriverState *bs, QDict *parent_options,
                            const char *bdref_key, Error **errp)
@@ -1285,7 +1297,7 @@ int bdrv_open_backing_file(BlockDriverState *bs, QDict *parent_options,
         goto free_exit;
     }
 
-    /* NULL means an empty set of options */
+    /* NULL bedeutet eine leere Menge von Optionen */
     if (parent_options == NULL) {
         tmp_parent_options = qdict_new();
         parent_options = tmp_parent_options;
@@ -1336,8 +1348,8 @@ int bdrv_open_backing_file(BlockDriverState *bs, QDict *parent_options,
         goto free_exit;
     }
 
-    /* Hook up the backing file link; drop our reference, bs owns the
-     * backing_hd reference now */
+    /* Schließen Sie die Unterstützung Dateilink; Drop unsere Referenz, bs
+     * besitzt die backing_hd Referenz jetzt */
     bdrv_set_backing_hd(bs, backing_hd);
     bdrv_unref(backing_hd);
 
@@ -1350,18 +1362,19 @@ free_exit:
 }
 
 /*
- * Opens a disk image whose options are given as BlockdevRef in another block
- * device's options.
+ * Öffnet ein Disk-Image, dessen Optionen gegeben werden als BlockdevRef in
+ * einem anderen Block Geräteoptionen.
  *
- * If allow_none is true, no image will be opened if filename is false and no
- * BlockdevRef is given. NULL will be returned, but errp remains unset.
+ * Wenn ALLOW_NONE wahr ist, wird kein Bild geöffnet, wenn Dateiname falsch ist
+ * und keine BlockdevRef gegeben. NULL wird zurückgegeben, aber Errp bleibt
+ * ungesetzt.
  *
- * bdrev_key specifies the key for the image's BlockdevRef in the options QDict.
- * That QDict has to be flattened; therefore, if the BlockdevRef is a QDict
- * itself, all options starting with "${bdref_key}." are considered part of the
- * BlockdevRef.
+ * bdrev_key gibt den Schlüssel für die BlockdevRef das Bild in den Optionen
+ * QDict. Das QDict hat abgeflacht zu werden; Wenn daher die BlockdevRef eine
+ * QDict selbst, beginnend alle Optionen mit "$ {bdref_key}." Teil des gelten
+ * als BlockdevRef.
  *
- * The BlockdevRef will be removed from the options QDict.
+ * Die BlockdevRef werden aus der Optionen QDict entfernt werden.
  */
 BdrvChild *bdrv_open_child(const char *filename,
                            QDict *options, const char *bdref_key,
@@ -1409,7 +1422,8 @@ done:
 static int bdrv_append_temp_snapshot(BlockDriverState *bs, int flags,
                                      QDict *snapshot_options, Error **errp)
 {
-    /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */
+    /* TODO: zusätzliches Byte ist ein Hack MAX_PATH Raum auf Windows zu
+     * gewährleisten. */
     char *tmp_filename = g_malloc0(PATH_MAX + 1);
     int64_t total_size;
     QemuOpts *opts = NULL;
@@ -1417,10 +1431,10 @@ static int bdrv_append_temp_snapshot(BlockDriverState *bs, int flags,
     Error *local_err = NULL;
     int ret;
 
-    /* if snapshot, we create a temporary backing file and open it
-       instead of opening 'filename' directly */
+    /* wenn Snapshot erstellen wir eine temporäre Träger-Datei und öffnen Sie
+       sie anstelle der Öffnung "Dateiname" direkt */
 
-    /* Get the required size from the image */
+    /* Holen Sie die gewünschte Größe aus dem Bild */
     total_size = bdrv_getlength(bs);
     if (total_size < 0) {
         ret = total_size;
@@ -1428,7 +1442,7 @@ static int bdrv_append_temp_snapshot(BlockDriverState *bs, int flags,
         goto out;
     }
 
-    /* Create the temporary image */
+    /* Erstellen Sie das temporäre Bild */
     ret = get_tmp_filename(tmp_filename, PATH_MAX + 1);
     if (ret < 0) {
         error_setg_errno(errp, -ret, "Could not get temporary filename");
@@ -1446,7 +1460,7 @@ static int bdrv_append_temp_snapshot(BlockDriverState *bs, int flags,
         goto out;
     }
 
-    /* Prepare options QDict for the temporary file */
+    /* Bereiten Sie Optionen QDict für die temporäre Datei */
     qdict_put(snapshot_options, "file.driver",
               qstring_from_str("file"));
     qdict_put(snapshot_options, "file.filename",
@@ -1473,19 +1487,22 @@ out:
 }
 
 /*
- * Opens a disk image (raw, qcow2, vmdk, ...)
+ * Öffnet ein Disk-Image (roh, qcow2, vmdk, ...)
  *
- * options is a QDict of options to pass to the block drivers, or NULL for an
- * empty set of options. The reference to the QDict belongs to the block layer
- * after the call (even on failure), so if the caller intends to reuse the
- * dictionary, it needs to use QINCREF() before calling bdrv_open.
+ * Optionen ist ein QDict von Optionen an die Blocktreiber zu passieren, oder
+ * NULL für eine leere Menge von Optionen. Der Verweis auf die QDict gehört
+ * zur Blockschicht nach dem Aufruf (auch bei Ausfall), so dass, wenn der
+ * Anrufer die wiederzuverwenden beabsichtigt Wörterbuch, braucht es QINCREF()
+ * zu verwenden, bevor bdrv_open aufrufen.
  *
- * If *pbs is NULL, a new BDS will be created with a pointer to it stored there.
- * If it is not NULL, the referenced BDS will be reused.
+ * Wenn *pbs NULL ist, wird ein neuer BDS mit einem Zeiger auf sie dort
+ * gespeichert erstellt werden. Wenn es nicht NULL ist, wird die referenzierten
+ * BDS wiederverwendet werden.
  *
- * The reference parameter may be used to specify an existing block device which
- * should be opened. If specified, neither options nor a filename may be given,
- * nor can an existing BDS be reused (that is, *pbs has to be NULL).
+ * Der Referenzparameter verwendet werden kann, eine bestehende Blockgerät
+ * angeben, welche sollte geöffnet werden. Wenn angegeben, kann weder Optionen
+ * noch ein Dateiname angegeben werden, noch kann eine bestehende BDS wieder
+ * verwendet werden (das heißt, *pbs hat NULL sein).
  */
 static int bdrv_open_inherit(BlockDriverState **pbs, const char *filename,
                              const char *reference, QDict *options, int flags,
@@ -1537,12 +1554,12 @@ static int bdrv_open_inherit(BlockDriverState **pbs, const char *filename,
         bs = bdrv_new();
     }
 
-    /* NULL means an empty set of options */
+    /* NULL bedeutet eine leere Menge von Optionen */
     if (options == NULL) {
         options = qdict_new();
     }
 
-    /* json: syntax counts as explicit options, as if in the QDict */
+    /* json: Syntax gilt als explizite Optionen, als ob in der QDict */
     parse_json_protocol(options, &filename, &local_err);
     if (local_err) {
         ret = -EINVAL;
@@ -1566,7 +1583,7 @@ static int bdrv_open_inherit(BlockDriverState **pbs, const char *filename,
     bs->options = options;
     options = qdict_clone_shallow(options);
 
-    /* Find the right image format driver */
+    /* Finden Sie das richtige Bildformat-Treiber */
     drvname = qdict_get_try_str(options, "driver");
     if (drvname) {
         drv = bdrv_find_format(drvname);
@@ -1585,7 +1602,7 @@ static int bdrv_open_inherit(BlockDriverState **pbs, const char *filename,
         qdict_del(options, "backing");
     }
 
-    /* Open image file without format layer */
+    /* Bilddatei öffnen, ohne Format Schicht */
     if ((flags & BDRV_O_PROTOCOL) == 0) {
         if (flags & BDRV_O_RDWR) {
             flags |= BDRV_O_ALLOW_RDWR;
@@ -1607,7 +1624,7 @@ static int bdrv_open_inherit(BlockDriverState **pbs, const char *filename,
         }
     }
 
-    /* Image format probing */
+    /* Bildformat Sondierung */
     bs->probed = !drv;
     if (!drv && file) {
         ret = find_image_format(file->bs, filename, &drv, &local_err);
@@ -1615,15 +1632,16 @@ static int bdrv_open_inherit(BlockDriverState **pbs, const char *filename,
             goto fail;
         }
         /*
-         * This option update would logically belong in bdrv_fill_options(),
-         * but we first need to open bs->file for the probing to work, while
-         * opening bs->file already requires the (mostly) final set of options
-         * so that cache mode etc. can be inherited.
+         * Diese Option Update gehören würde logisch in bdrv_fill_options (),
+         * aber wir müssen zuerst öffnen BS-> Datei für die Arbeit Sondieren,
+         * während Öffnen BS-> erfordert Datei bereits die (meist) letzte Satz
+         * von Optionen so dass Cache-Modus usw. können vererbt werden.
          *
-         * Adding the driver later is somewhat ugly, but it's not an option
-         * that would ever be inherited, so it's correct. We just need to make
-         * sure to update both bs->options (which has the full effective
-         * options for bs) and options (which has file.* already removed).
+         * der Fahrer ist dann ein etwas hässlich, aber es ist keine Option
+         * dass immer vererbt werden würde, so ist es richtig. Wir müssen nur
+         * sicherstellen, Sie beide BS- zu aktualisieren> Optionen (was die
+         * vollständige effektive hat Optionen für bs) und Optionen (die Datei
+         * hat. * bereits entfernt).
          */
         qdict_put(bs->options, "driver", qstring_from_str(drv->format_name));
         qdict_put(options, "driver", qstring_from_str(drv->format_name));
@@ -1633,13 +1651,14 @@ static int bdrv_open_inherit(BlockDriverState **pbs, const char *filename,
         goto fail;
     }
 
-    /* BDRV_O_PROTOCOL must be set iff a protocol BDS is about to be created */
+    /* BDRV_O_PROTOCOL muss genau dann, wenn ein Protokoll festgelegt werden BDS
+     * ist etwa geschaffen werden */
     assert(!!(flags & BDRV_O_PROTOCOL) == !!drv->bdrv_file_open);
-    /* file must be NULL if a protocol BDS is about to be created
-     * (the inverse results in an error message from bdrv_open_common()) */
+    /* Datei muss NULL sein, wenn ein Protokoll BDS über erstellt werden soll,
+     * (Die inverse führt zu einer Fehlermeldung von bdrv_open_common ()) */
     assert(!(flags & BDRV_O_PROTOCOL) || !file);
 
-    /* Open the image */
+    /* Öffnen Sie das Bild */
     ret = bdrv_open_common(bs, file, options, &local_err);
     if (ret < 0) {
         goto fail;
@@ -1650,7 +1669,7 @@ static int bdrv_open_inherit(BlockDriverState **pbs, const char *filename,
         file = NULL;
     }
 
-    /* If there is a backing file, use it */
+    /* Wenn es eine Trägerdatei ist, verwenden Sie es */
     if ((flags & BDRV_O_NO_BACKING) == 0) {
         ret = bdrv_open_backing_file(bs, options, "backing", &local_err);
         if (ret < 0) {
@@ -1660,7 +1679,7 @@ static int bdrv_open_inherit(BlockDriverState **pbs, const char *filename,
 
     bdrv_refresh_filename(bs);
 
-    /* Check if any unknown options were used */
+    /* Überprüfen Sie, ob alle unbekannten Optionen verwendet wurden */
     if (options && (qdict_size(options) != 0)) {
         const QDictEntry *entry = qdict_first(options);
         if (flags & BDRV_O_PROTOCOL) {
@@ -1682,7 +1701,7 @@ static int bdrv_open_inherit(BlockDriverState **pbs, const char *filename,
         }
     } else if (!runstate_check(RUN_STATE_PRELAUNCH)
                && !runstate_check(RUN_STATE_INMIGRATE)
-               && !runstate_check(RUN_STATE_PAUSED)) { /* HACK */
+               && !runstate_check(RUN_STATE_PAUSED)) { /* HACKEN */
         error_setg(errp,
                    "Guest must be stopped for opening of encrypted image");
         ret = -EBUSY;
@@ -1692,8 +1711,8 @@ static int bdrv_open_inherit(BlockDriverState **pbs, const char *filename,
     QDECREF(options);
     *pbs = bs;
 
-    /* For snapshot=on, create a temporary qcow2 overlay. bs points to the
-     * temporary snapshot afterwards. */
+    /* Für Snapshot = on, eine temporäre qcow2 Overlay erstellen. bs Punkte
+     * auf die danach vorübergehende Snapshot. */
     if (snapshot_flags) {
         ret = bdrv_append_temp_snapshot(bs, snapshot_flags, snapshot_options,
                                         &local_err);
@@ -1715,9 +1734,10 @@ fail:
     QDECREF(options);
     bs->options = NULL;
     if (!*pbs) {
-        /* If *pbs is NULL, a new BDS has been created in this function and
-           needs to be freed now. Otherwise, it does not need to be closed,
-           since it has not really been opened yet. */
+        /* Wenn * pbs NULL ist, hat sich eine neue BDS in dieser Funktion
+           erstellt wurde und muss jetzt befreit werden. Andernfalls muss er
+           nicht geschlossen werden kann, da hat es noch nicht wirklich
+           geöffnet. */
         bdrv_unref(bs);
     }
     if (local_err) {
@@ -1726,7 +1746,7 @@ fail:
     return ret;
 
 close_and_fail:
-    /* See fail path, but now the BDS has to be always closed */
+    /* Siehe Pfad scheitern, aber jetzt hat der BDS immer geschlossen sein */
     if (*pbs) {
         bdrv_close(bs);
     } else {
@@ -1754,24 +1774,24 @@ typedef struct BlockReopenQueueEntry {
 } BlockReopenQueueEntry;
 
 /*
- * Adds a BlockDriverState to a simple queue for an atomic, transactional
- * reopen of multiple devices.
+ * Fügt eine BlockDriverState auf eine einfache Warteschlange für ein Atom,
+ * Transaktions- wieder öffnen mehrerer Geräte.
  *
- * bs_queue can either be an existing BlockReopenQueue that has had QSIMPLE_INIT
- * already performed, or alternatively may be NULL a new BlockReopenQueue will
- * be created and initialized. This newly created BlockReopenQueue should be
- * passed back in for subsequent calls that are intended to be of the same
- * atomic 'set'.
+ * bs_queue kann entweder eine bestehende BlockReopenQueue sein, die
+ * QSIMPLE_INIT hatte bereits durchgeführt, oder alternativ wird eine neue
+ * BlockReopenQueue NULL sein erzeugt und initialisiert werden. Diese neu
+ * geschaffene BlockReopenQueue sollte in für nachfolgende Anrufe
+ * zurückgeführt, die aus dem gleichen sein sollen Atom-Set '.
  *
- * bs is the BlockDriverState to add to the reopen queue.
+ * bs ist die BlockDriverState zur Wiedereröffnung Warteschlange hinzuzufügen.
  *
- * options contains the changed options for the associated bs
- * (the BlockReopenQueue takes ownership)
+ * Optionen enthält die geänderten Optionen für den zugehörigen bs
+ * (Die BlockReopenQueue nimmt den Besitz)
  *
- * flags contains the open flags for the associated bs
+ * Fahnen enthält die offenen Fahnen für den zugehörigen bs
  *
- * returns a pointer to bs_queue, which is either the newly allocated
- * bs_queue, or the existing bs_queue being used.
+ * Gibt einen Zeiger auf bs_queue, die entweder die neu zugewiesenen
+ * bs_queue oder der bestehende bs_queue verwendet wird.
  *
  */
 static BlockReopenQueue *bdrv_reopen_queue_child(BlockReopenQueue *bs_queue,
@@ -1798,52 +1818,53 @@ static BlockReopenQueue *bdrv_reopen_queue_child(BlockReopenQueue *bs_queue,
     }
 
     /*
-     * Precedence of options:
-     * 1. Explicitly passed in options (highest)
-     * 2. Set in flags (only for top level)
-     * 3. Retained from explicitly set options of bs
-     * 4. Inherited from parent node
-     * 5. Retained from effective options of bs
+     * Rangfolge der Optionen:
+     * 1. Explizit in den Optionen übergeben (höchste)
+     * 2. Stellen Sie in den Flaggen (nur für Top-Level)
+     * 3. von explizit Optionen von bs Rück
+     * 4. von übergeordneten Knoten geerbt
+     * 5. von effektiven Möglichkeiten der bs Rück
      */
 
     if (!parent_options) {
         /*
-         * Any setting represented by flags is always updated. If the
-         * corresponding QDict option is set, it takes precedence. Otherwise
-         * the flag is translated into a QDict option. The old setting of bs is
-         * not considered.
+         * Jede Einstellung, die durch Flags wird immer aktualisiert. wenn der
+         * entsprechende QDict Option gesetzt ist, es hat Vorrang. Andernfalls
+         * das Flag in eine QDict Option übersetzt. Die alte Einstellung von bs
+         * nicht bedacht.
          */
         update_options_from_flags(options, flags);
     }
 
-    /* Old explicitly set values (don't overwrite by inherited value) */
+    /* Alte explizit Werte (nicht überschreiben von geerbten Wert) */
     old_options = qdict_clone_shallow(bs->explicit_options);
     bdrv_join_options(bs, options, old_options);
     QDECREF(old_options);
 
     explicit_options = qdict_clone_shallow(options);
 
-    /* Inherit from parent node */
+    /* Vererben von Elternknoten */
     if (parent_options) {
         assert(!flags);
         role->inherit_options(&flags, options, parent_flags, parent_options);
     }
 
-    /* Old values are used for options that aren't set yet */
+    /* Alte Werte werden für Optionen eingesetzt, die noch nicht festgelegt */
     old_options = qdict_clone_shallow(bs->options);
     bdrv_join_options(bs, options, old_options);
     QDECREF(old_options);
 
-    /* bdrv_open() masks this flag out */
+    /* bdrv_open () Masken dieses Flag aus */
     flags &= ~BDRV_O_PROTOCOL;
 
     QLIST_FOREACH(child, &bs->children, next) {
         QDict *new_child_options;
         char *child_key_dot;
 
-        /* reopen can only change the options of block devices that were
-         * implicitly created and inherited options. For other (referenced)
-         * block devices, a syntax like "backing.foo" results in an error. */
+        /* wieder öffnen können nur die Optionen von Blockgeräte zu ändern,
+         * waren implizit Optionen erstellt und vererbt wird. Für andere
+         * (referenziert) Block-Geräte, eine Syntax wie "backing.foo" führt zu
+         * einem Fehler. */
         if (child->bs->inherits_from != bs) {
             continue;
         }
@@ -1876,18 +1897,18 @@ BlockReopenQueue *bdrv_reopen_queue(BlockReopenQueue *bs_queue,
 }
 
 /*
- * Reopen multiple BlockDriverStates atomically & transactionally.
+ * Öffnen Sie erneut mehrere BlockDriverStates atomar & transaktionell.
  *
- * The queue passed in (bs_queue) must have been built up previous
- * via bdrv_reopen_queue().
+ * Die Warteschlange in (bs_queue) übergeben müssen vorherigen gebaut wurden
+ * bis via bdrv_reopen_queue ().
  *
- * Reopens all BDS specified in the queue, with the appropriate
- * flags.  All devices are prepared for reopen, and failure of any
- * device will cause all device changes to be abandonded, and intermediate
- * data cleaned up.
+ * Öffnet wieder alle BDS in der Warteschlange angegeben, mit dem
+ * entsprechenden Fahnen. Alle Geräte sind für den wieder öffnen vorbereitet
+ * und Ausfall einer Gerät alle Geräteänderungen bewirken abandonded werden,
+ * und Zwischen Daten bereinigt.
  *
- * If all devices prepare successfully, then the changes are committed
- * to all devices.
+ * Wenn alle Geräte erfolgreich vorbereiten, dann sind die Änderungen
+ * festgeschrieben an alle Geräte.
  *
  */
 int bdrv_reopen_multiple(BlockReopenQueue *bs_queue, Error **errp)
@@ -1908,8 +1929,8 @@ int bdrv_reopen_multiple(BlockReopenQueue *bs_queue, Error **errp)
         bs_entry->prepared = true;
     }
 
-    /* If we reach this point, we have success and just need to apply the
-     * changes
+    /* Wenn wir diesen Punkt erreichen, haben wir Erfolg und müssen nur die
+     * anzuwenden Änderungen
      */
     QSIMPLEQ_FOREACH(bs_entry, bs_queue, entry) {
         bdrv_reopen_commit(&bs_entry->state);
@@ -1932,7 +1953,8 @@ cleanup:
 }
 
 
-/* Reopen a single BlockDriverState with the specified flags. */
+/* Öffnen Sie erneut eine einzige BlockDriverState mit den angegebenen Flags.
+ */
 int bdrv_reopen(BlockDriverState *bs, int bdrv_flags, Error **errp)
 {
     int ret = -1;
@@ -1948,20 +1970,21 @@ int bdrv_reopen(BlockDriverState *bs, int bdrv_flags, Error **errp)
 
 
 /*
- * Prepares a BlockDriverState for reopen. All changes are staged in the
- * 'opaque' field of the BDRVReopenState, which is used and allocated by
- * the block driver layer .bdrv_reopen_prepare()
+ * Bereitet ein BlockDriverState für wieder öffnen. Alle Änderungen werden in
+ * der Szene gesetzt "Opaque" Feld der BDRVReopenState, die verwendet wird, und
+ * zugeteilt durch die Blocktreiberschicht .bdrv_reopen_prepare ()
  *
- * bs is the BlockDriverState to reopen
- * flags are the new open flags
- * queue is the reopen queue
+ * bs ist die BlockDriverState wieder zu öffnen
+ * Flaggen sind die neuen offenen Fahnen
+ * Warteschlange ist die Warteschlange wieder öffnen
  *
- * Returns 0 on success, non-zero on error.  On error errp will be set
- * as well.
+ * Gibt 0 bei Erfolg, von Null auf Fehler. Bei einem Fehler Errp wird gesetzt
+ * auch.
  *
- * On failure, bdrv_reopen_abort() will be called to clean up any data.
- * It is the responsibility of the caller to then call the abort() or
- * commit() for any other BDS that have been left in a prepare() state
+ * Bei einem Fehler bdrv_reopen_abort () werden alle Daten zu bereinigen,
+ * aufgerufen werden. Es liegt in der Verantwortung des Anrufers, um dann den
+ * Abbruch () aufrufen oder commit () für alle anderen BDS, die in einem
+ * prepare () Zustand zurückgelassen wurden
  *
  */
 int bdrv_reopen_prepare(BDRVReopenState *reopen_state, BlockReopenQueue *queue,
@@ -1977,7 +2000,7 @@ int bdrv_reopen_prepare(BDRVReopenState *reopen_state, BlockReopenQueue *queue,
     assert(reopen_state->bs->drv != NULL);
     drv = reopen_state->bs->drv;
 
-    /* Process generic block layer options */
+    /* Prozess generische Block-Layer-Optionen */
     opts = qemu_opts_create(&bdrv_runtime_opts, NULL, 0, &error_abort);
     qemu_opts_absorb_qdict(opts, reopen_state->options, &local_err);
     if (local_err) {
@@ -1988,8 +2011,8 @@ int bdrv_reopen_prepare(BDRVReopenState *reopen_state, BlockReopenQueue *queue,
 
     update_flags_from_options(&reopen_state->flags, opts);
 
-    /* node-name and driver must be unchanged. Put them back into the QDict, so
-     * that they are checked at the end of this function. */
+    /* Knotenname und Fahrer muss nicht geändert. Setzen Sie sie wieder in die
+     * QDict, so dass sie am Ende dieser Funktion überprüft. */
     value = qemu_opt_get(opts, "node-name");
     if (value) {
         qdict_put(reopen_state->options, "node-name", qstring_from_str(value));
@@ -2000,8 +2023,8 @@ int bdrv_reopen_prepare(BDRVReopenState *reopen_state, BlockReopenQueue *queue,
         qdict_put(reopen_state->options, "driver", qstring_from_str(value));
     }
 
-    /* if we are to stay read-only, do not allow permission change
-     * to r/w */
+    /* wenn wir schreibgeschützt bleiben, erlauben keine Berechtigungsänderung
+     * zu r / w */
     if (!(reopen_state->bs->open_flags & BDRV_O_ALLOW_RDWR) &&
         reopen_state->flags & BDRV_O_RDWR) {
         error_setg(errp, "Node '%s' is read only",
@@ -2028,8 +2051,8 @@ int bdrv_reopen_prepare(BDRVReopenState *reopen_state, BlockReopenQueue *queue,
             goto error;
         }
     } else {
-        /* It is currently mandatory to have a bdrv_reopen_prepare()
-         * handler for each supported drv. */
+        /* Es ist derzeit zwingend eine bdrv_reopen_prepare zu haben ()
+         * Handler für jede unterstützte drv. */
         error_setg(errp, "Block format '%s' used by node '%s' "
                    "does not support reopening files", drv->format_name,
                    bdrv_get_device_or_node_name(reopen_state->bs));
@@ -2037,9 +2060,10 @@ int bdrv_reopen_prepare(BDRVReopenState *reopen_state, BlockReopenQueue *queue,
         goto error;
     }
 
-    /* Options that are not handled are only okay if they are unchanged
-     * compared to the old state. It is expected that some options are only
-     * used for the initial open, but not reopen (e.g. filename) */
+    /* Optionen, die nicht behandelt werden, sind nur in Ordnung, wenn sie
+     * unverändert sind im Vergleich zu den alten Zustand. Es wird erwartet,
+     * dass einige Optionen nur sind für die erste offen verwendet, aber wieder
+     * öffnen nicht (zum Beispiel Dateiname) */
     if (qdict_size(reopen_state->options)) {
         const QDictEntry *entry = qdict_first(reopen_state->options);
 
@@ -2065,9 +2089,9 @@ error:
 }
 
 /*
- * Takes the staged changes for the reopen from bdrv_reopen_prepare(), and
- * makes them final by swapping the staging BlockDriverState contents into
- * the active BlockDriverState contents.
+ * Entnimmt die inszenierten Änderungen für die Wiederaufnahme von
+ * bdrv_reopen_prepare () und sie endgültig macht, indem sie die Inszenierung
+ * BlockDriverState Inhalte tauschen in die aktiven BlockDriverState Inhalte.
  */
 void bdrv_reopen_commit(BDRVReopenState *reopen_state)
 {
@@ -2077,12 +2101,12 @@ void bdrv_reopen_commit(BDRVReopenState *reopen_state)
     drv = reopen_state->bs->drv;
     assert(drv != NULL);
 
-    /* If there are any driver level actions to take */
+    /* Wenn es irgendwelche Treiber-Ebene Maßnahmen zu ergreifen, */
     if (drv->bdrv_reopen_commit) {
         drv->bdrv_reopen_commit(reopen_state);
     }
 
-    /* set BDS specific flags now */
+    /* set BDS jetzt spezifische Flags */
     QDECREF(reopen_state->bs->explicit_options);
 
     reopen_state->bs->explicit_options   = reopen_state->explicit_options;
@@ -2093,8 +2117,8 @@ void bdrv_reopen_commit(BDRVReopenState *reopen_state)
 }
 
 /*
- * Abort the reopen, and delete and free the staged changes in
- * reopen_state
+ * Abbruch der erneut öffnen und löschen und kostenlos die inszenierten
+ * Änderungen in reopen_state
  */
 void bdrv_reopen_abort(BDRVReopenState *reopen_state)
 {
@@ -2118,14 +2142,15 @@ static void bdrv_close(BlockDriverState *bs)
 
     assert(!bs->job);
 
-    /* Disable I/O limits and drain all pending throttled requests */
+    /* Deaktivieren Sie E / A-Grenzen und Drain alle anstehenden gedrosselt
+     * Anfragen */
     if (bs->throttle_state) {
         bdrv_io_limits_disable(bs);
     }
 
-    bdrv_drained_begin(bs); /* complete I/O */
+    bdrv_drained_begin(bs); /* Ergänzen I / O */
     bdrv_flush(bs);
-    bdrv_drain(bs); /* in case flush left pending I/O */
+    bdrv_drain(bs); /* im Falle bündig links I anhängig / O */
 
     bdrv_release_named_dirty_bitmaps(bs);
     assert(QLIST_EMPTY(&bs->dirty_bitmaps));
@@ -2148,8 +2173,8 @@ static void bdrv_close(BlockDriverState *bs)
         }
 
         QLIST_FOREACH_SAFE(child, &bs->children, next, next) {
-            /* TODO Remove bdrv_unref() from drivers' close function and use
-             * bdrv_unref_child() here */
+            /* TODO entfernen bdrv_unref () von Fahrer Schließen-Funktion und
+             * Verwendung bdrv_unref_child () hier */
             if (child->bs->inherits_from == bs) {
                 child->bs->inherits_from = NULL;
             }
@@ -2185,14 +2210,14 @@ void bdrv_close_all(void)
     BlockDriverState *bs;
     AioContext *aio_context;
 
-    /* Drop references from requests still in flight, such as canceled block
-     * jobs whose AIO context has not been polled yet */
+    /* Drop-Referenzen von Anfragen noch im Flug, wie annulliert Block
+     * Jobs, deren AIO Zusammenhang wurde noch nicht abgefragt */
     bdrv_drain_all();
 
     blk_remove_all_bs();
     blockdev_close_all_bdrv_states();
 
-    /* Cancel all block jobs */
+    /* Brechen Sie alle Block Jobs */
     while (!QTAILQ_EMPTY(&all_bdrv_states)) {
         QTAILQ_FOREACH(bs, &all_bdrv_states, bs_list) {
             aio_context = bdrv_get_aio_context(bs);
@@ -2206,18 +2231,19 @@ void bdrv_close_all(void)
             aio_context_release(aio_context);
         }
 
-        /* All the remaining BlockDriverStates are referenced directly or
-         * indirectly from block jobs, so there needs to be at least one BDS
-         * directly used by a block job */
+        /* Alle übrigen BlockDriverStates referenziert direkt oder
+         * indirekt von Block Jobs, so muss mindestens ein BDS sein
+         * direkt durch einen Block Job verwendet */
         assert(bs);
     }
 }
 
-/* Fields that need to stay with the top-level BDS */
+/* Felder, die mit der Top-Level zu bleiben, müssen BDS */
 static void bdrv_move_feature_fields(BlockDriverState *bs_dest,
                                      BlockDriverState *bs_src)
 {
-    /* move some fields that need to stay attached to the device */
+    /* bewegen einige Felder, die mit dem Gerät zu bleiben angebracht brauchen
+     */
 }
 
 static void change_parent_backing_link(BlockDriverState *from,
@@ -2226,9 +2252,9 @@ static void change_parent_backing_link(BlockDriverState *from,
     BdrvChild *c, *next;
 
     if (from->blk) {
-        /* FIXME We bypass blk_set_bs(), so we need to make these updates
-         * manually. The root problem is not in this change function, but the
-         * existence of BlockDriverState.blk. */
+        /* FIXME umgehen Wir blk_set_bs (), so müssen wir diese Updates machen
+         * manuell. Das eigentliche Problem ist nicht in dieser
+         * Änderungsfunktion, aber die Existenz von BlockDriverState.blk. */
         to->blk = from->blk;
         from->blk = NULL;
     }
@@ -2261,20 +2287,20 @@ static void swap_feature_fields(BlockDriverState *bs_top,
 }
 
 /*
- * Add new bs contents at the top of an image chain while the chain is
- * live, while keeping required fields on the top layer.
+ * Neuen bs Inhalt an der Spitze einer Bildkette, während die Kette
+ * leben, während Pflichtfelder halten auf der obersten Ebene.
  *
- * This will modify the BlockDriverState fields, and swap contents
- * between bs_new and bs_top. Both bs_new and bs_top are modified.
+ * Dadurch werden die BlockDriverState Felder, und Swap-Inhalte ändern
+ * zwischen bs_new und bs_top. Sowohl bs_new und bs_top modifiziert.
  *
- * bs_new must not be attached to a BlockBackend.
+ * bs_new darf nicht zu einer BlockBackend befestigt werden.
  *
- * This function does not create any image files.
+ * Diese Funktion erzeugt keine Bilddateien.
  *
- * bdrv_append() takes ownership of a bs_new reference and unrefs it because
- * that's what the callers commonly need. bs_new will be referenced by the old
- * parents of bs_top after bdrv_append() returns. If the caller needs to keep a
- * reference of its own, it must call bdrv_ref().
+ * bdrv_append () übernimmt den Besitz eines bs_new Referenz- und unrefs es,
+ * weil das ist, was die Anrufer häufig benötigen. bs_new wird durch die alte
+ * referenziert werden Eltern von bs_top nach bdrv_append () zurückkehrt. Wenn
+ * muss der Anrufer ein zu halten Bezug der eigenen, muss sie rufen bdrv_ref ().
  */
 void bdrv_append(BlockDriverState *bs_new, BlockDriverState *bs_top)
 {
@@ -2284,14 +2310,14 @@ void bdrv_append(BlockDriverState *bs_new, BlockDriverState *bs_top)
     bdrv_ref(bs_top);
     change_parent_backing_link(bs_top, bs_new);
 
-    /* Some fields always stay on top of the backing file chain */
+    /* Einige Felder bleiben immer an der Spitze der Trägerdatei Kette */
     swap_feature_fields(bs_top, bs_new);
 
     bdrv_set_backing_hd(bs_new, bs_top);
     bdrv_unref(bs_top);
 
-    /* bs_new is now referenced by its new parents, we don't need the
-     * additional reference any more. */
+    /* bs_new wird nun von seinen neuen Eltern verwiesen, wir brauchen das nicht
+     * zusätzliche Referenz mehr. */
     bdrv_unref(bs_new);
 }
 
@@ -2303,20 +2329,23 @@ void bdrv_replace_in_backing_chain(BlockDriverState *old, BlockDriverState *new)
     bdrv_ref(old);
 
     if (old->blk) {
-        /* As long as these fields aren't in BlockBackend, but in the top-level
-         * BlockDriverState, it's not possible for a BDS to have two BBs.
+        /* Solange diese Felder nicht in BlockBackend sind, aber in der obersten
+         * Ebene BlockDriverState, ist es nicht möglich, dass ein BDS zwei BBs
+         * zu haben.
          *
-         * We really want to copy the fields from old to new, but we go for a
-         * swap instead so that pointers aren't duplicated and cause trouble.
-         * (Also, bdrv_swap() used to do the same.) */
+         * Wir wollen wirklich die Felder von alten auf neue zu kopieren, aber
+         * wir gehen für ein tauschen stattdessen so, dass Zeiger nicht
+         * dupliziert werden und Probleme verursachen.
+         * (Auch bdrv_swap () verwendet, um das gleiche zu tun.) */
         assert(!new->blk);
         swap_feature_fields(old, new);
     }
     change_parent_backing_link(old, new);
 
-    /* Change backing files if a previously independent node is added to the
-     * chain. For active commit, we replace top by its own (indirect) backing
-     * file and don't do anything here so we don't build a loop. */
+    /* Ändern Sie die Sicherung von Dateien, wenn ein zuvor unabhängiger
+     * Knoten auf die hinzugefügt wird Kette. Für aktive verpflichten,
+     * ersetzen wir oben durch seine eigene (indirekt) Unterstützung Datei und
+     * tun nichts hier, so dass wir eine Schleife nicht bauen. */
     if (new->backing == NULL && !bdrv_chain_contains(backing_bs(old), new)) {
         bdrv_set_backing_hd(new, backing_bs(old));
         bdrv_set_backing_hd(old, NULL);
@@ -2333,7 +2362,7 @@ static void bdrv_delete(BlockDriverState *bs)
 
     bdrv_close(bs);
 
-    /* remove from list, if necessary */
+    /* Von der Liste entfernen, falls erforderlich */
     if (bs->node_name[0] != '\0') {
         QTAILQ_REMOVE(&graph_bdrv_states, bs, node_list);
     }
@@ -2343,11 +2372,11 @@ static void bdrv_delete(BlockDriverState *bs)
 }
 
 /*
- * Run consistency checks on an image
+ * Führen Sie Konsistenzprüfungen auf ein Bild,
  *
- * Returns 0 if the check could be completed (it doesn't mean that the image is
- * free of errors) or -errno when an internal error occurred. The results of the
- * check are stored in res.
+ * Gibt 0 zurück, wenn die Prüfung abgeschlossen werden konnte (es bedeutet
+ * nicht, dass das Bild fehlerfrei) oder -errno, wenn ein interner Fehler
+ * aufgetreten ist. Die Ergebnisse der Prüfung werden in res gespeichert.
  */
 int bdrv_check(BlockDriverState *bs, BdrvCheckResult *res, BdrvCheckMode fix)
 {
@@ -2364,7 +2393,7 @@ int bdrv_check(BlockDriverState *bs, BdrvCheckResult *res, BdrvCheckMode fix)
 
 #define COMMIT_BUF_SECTORS 2048
 
-/* commit COW file into the raw image */
+/* KUH-Datei in das RAW-Bild begehen */
 int bdrv_commit(BlockDriverState *bs)
 {
     BlockDriver *drv = bs->drv;
@@ -2406,9 +2435,9 @@ int bdrv_commit(BlockDriverState *bs)
         goto ro_cleanup;
     }
 
-    /* If our top snapshot is larger than the backing file image,
-     * grow the backing file image if possible.  If not possible,
-     * we must return an error */
+    /* Wenn unsere Top-Snapshot ist größer als die Trägerdatei Bild,
+     * die Trägerdatei Bild, wenn möglich, zu wachsen. Falls dies nicht
+     * möglich, wir müssen einen Fehler zurück */
     if (length > backing_length) {
         ret = bdrv_truncate(bs->backing->bs, length);
         if (ret < 0) {
@@ -2418,8 +2447,9 @@ int bdrv_commit(BlockDriverState *bs)
 
     total_sectors = length >> BDRV_SECTOR_BITS;
 
-    /* qemu_try_blockalign() for bs will choose an alignment that works for
-     * bs->backing->bs as well, so no need to compare the alignment manually. */
+    /* qemu try_blockalign () für bs wird eine Ausrichtung wählen, die für
+     * Arbeiten BS-> Unterstützung-> bs als auch, so dass keine
+     * Notwendigkeit, die Ausrichtung manuell zu vergleichen. */
     buf = qemu_try_blockalign(bs, COMMIT_BUF_SECTORS * BDRV_SECTOR_SIZE);
     if (buf == NULL) {
         ret = -ENOMEM;
@@ -2453,8 +2483,8 @@ int bdrv_commit(BlockDriverState *bs)
     }
 
     /*
-     * Make sure all data we wrote to the backing device is actually
-     * stable on disk.
+     * Stellen Sie sicher, dass alle Daten, die wir an der Trägereinrichtung
+     * schrieb tatsächlich ist stabil auf dem Datenträger.
      */
     if (bs->backing) {
         bdrv_flush(bs->backing->bs);
@@ -2465,7 +2495,7 @@ ro_cleanup:
     qemu_vfree(buf);
 
     if (ro) {
-        /* ignoring error return here */
+        /* ignorieren Fehler Rückkehr hier */
         bdrv_reopen(bs->backing->bs, open_flags & ~BDRV_O_RDWR, NULL);
     }
 
@@ -2473,12 +2503,12 @@ ro_cleanup:
 }
 
 /*
- * Return values:
- * 0        - success
- * -EINVAL  - backing format specified, but no file
- * -ENOSPC  - can't update the backing file because no space is left in the
- *            image file header
- * -ENOTSUP - format driver doesn't support changing the backing file
+ * Rückgabewerte:
+ * 0 - Erfolg
+ * -EINVAL - Trägerformat angegeben, aber keine Datei
+ * -ENOSPC - Kann nicht die Unterstützung Datei aktualisiert werden, da kein
+ *           Platz mehr in der linken Seite Bild-Datei-Header
+ * -ENOTSUP - Format-Treiber unterstützt nicht die Unterstützung Datei ändern
  */
 int bdrv_change_backing_file(BlockDriverState *bs,
     const char *backing_file, const char *backing_fmt)
@@ -2486,7 +2516,7 @@ int bdrv_change_backing_file(BlockDriverState *bs,
     BlockDriver *drv = bs->drv;
     int ret;
 
-    /* Backing file format doesn't make sense without a backing file */
+    /* Dateiformat Sichern macht keinen Sinn, ohne Trägerdatei */
     if (backing_fmt && !backing_file) {
         return -EINVAL;
     }
@@ -2505,14 +2535,14 @@ int bdrv_change_backing_file(BlockDriverState *bs,
 }
 
 /*
- * Finds the image layer in the chain that has 'bs' as its backing file.
+ * Findet die Bildebene in der Kette, die 'bs' als Trägerdatei.
  *
- * active is the current topmost image.
+ * aktiv ist die aktuelle oberste Bild.
  *
- * Returns NULL if bs is not found in active's image chain,
- * or if active == bs.
+ * Gibt NULL zurück, wenn bs nicht im aktiven Image Kette gefunden,
+ * oder wenn aktiv == bs.
  *
- * Returns the bottommost base image if bs == NULL.
+ * Gibt die unterste Basis-Image, wenn bs == NULL.
  */
 BlockDriverState *bdrv_find_overlay(BlockDriverState *active,
                                     BlockDriverState *bs)
@@ -2524,39 +2554,39 @@ BlockDriverState *bdrv_find_overlay(BlockDriverState *active,
     return active;
 }
 
-/* Given a BDS, searches for the base layer. */
+/* Bei einer BDS, sucht für die Basisschicht. */
 BlockDriverState *bdrv_find_base(BlockDriverState *bs)
 {
     return bdrv_find_overlay(bs, NULL);
 }
 
 /*
- * Drops images above 'base' up to and including 'top', and sets the image
- * above 'top' to have base as its backing file.
+ * Drops Bilder oben "Basis" bis einschließlich "oben" und setzt das Bild
+ * oben "oben" Basis als Trägerdatei.
  *
- * Requires that the overlay to 'top' is opened r/w, so that the backing file
- * information in 'bs' can be properly updated.
+ * Erfordert, dass die Überlagerung "oben" r / w geöffnet wird, so dass die
+ * Trägerdatei Informationen in 'bs' können korrekt aktualisiert werden.
  *
- * E.g., this will convert the following chain:
- * bottom <- base <- intermediate <- top <- active
+ * Z. B. wird dies die folgende Kette umwandeln:
+ * unten <- base <- Zwischen <- nachp <- aktiv
  *
- * to
+ * nach
  *
- * bottom <- base <- active
+ * unten <- base <- aktiv
  *
- * It is allowed for bottom==base, in which case it converts:
+ * Es ist für den Boden == Basis erlaubt, wobei in diesem Fall wandelt:
  *
- * base <- intermediate <- top <- active
+ * Basis <- Zwischen <- top <- aktiv
  *
  * to
  *
- * base <- active
+ * Basis <- aktiv
  *
- * If backing_file_str is non-NULL, it will be used when modifying top's
- * overlay image metadata.
+ * Wenn backing_file_str nicht NULL ist, wird es verwendet werden, wenn oben
+ * die Modifizierung Overlay-Bild-Metadaten.
  *
- * Error conditions:
- *  if active == top, that is considered an error
+ * Fehlerbedingungen:
+ *  wenn aktiv == oben, ist, dass ein Fehler betrachtet
  *
  */
 int bdrv_drop_intermediate(BlockDriverState *active, BlockDriverState *top,
@@ -2572,23 +2602,25 @@ int bdrv_drop_intermediate(BlockDriverState *active, BlockDriverState *top,
     new_top_bs = bdrv_find_overlay(active, top);
 
     if (new_top_bs == NULL) {
-        /* we could not find the image above 'top', this is an error */
+        /* wir konnten nicht das Bild oben "oben" zu finden, das ist ein Fehler
+         */
         goto exit;
     }
 
-    /* special case of new_top_bs->backing->bs already pointing to base - nothing
-     * to do, no intermediate images */
+    /* Sonderfall new_top_bs-> Unterstützung-> bs bereits auf Basis zeigt -
+     * nichts keine Zwischenbilder zu tun, */
     if (backing_bs(new_top_bs) == base) {
         ret = 0;
         goto exit;
     }
 
-    /* Make sure that base is in the backing chain of top */
+    /* Stellen Sie sicher, dass Basis ist in der Trägerkette von oben */
     if (!bdrv_chain_contains(top, base)) {
         goto exit;
     }
 
-    /* success - we can delete the intermediate states, and link top->base */
+    /* Erfolg - können wir die Zwischenzustände und verknüpfen
+     * Oberseite-> Basis löschen */
     backing_file_str = backing_file_str ? backing_file_str : base->filename;
     ret = bdrv_change_backing_file(new_top_bs, backing_file_str,
                                    base->drv ? base->drv->format_name : "");
@@ -2603,7 +2635,7 @@ exit:
 }
 
 /**
- * Truncate file to 'offset' bytes (needed only for file protocols)
+ * Kürzt-Datei 'Offset' Bytes (nur erforderlich für Dateiprotokolle)
  */
 int bdrv_truncate(BlockDriverState *bs, int64_t offset)
 {
@@ -2628,8 +2660,9 @@ int bdrv_truncate(BlockDriverState *bs, int64_t offset)
 }
 
 /**
- * Length of a allocated file in bytes. Sparse files are counted by actual
- * allocated space. Return < 0 if error or unknown.
+ * Länge einer zugeordneten Datei in Bytes. Sparse-Dateien werden von
+ * tatsächlichen gezählt zugewiesenen Platz. Zurück <0, wenn Fehler oder
+ * unbekannt ist.
  */
 int64_t bdrv_get_allocated_file_size(BlockDriverState *bs)
 {
@@ -2647,7 +2680,7 @@ int64_t bdrv_get_allocated_file_size(BlockDriverState *bs)
 }
 
 /**
- * Return number of sectors on success, -errno on error.
+ * Zurück Anzahl der Sektoren auf Erfolg, -errno auf Fehler.
  */
 int64_t bdrv_nb_sectors(BlockDriverState *bs)
 {
@@ -2666,8 +2699,8 @@ int64_t bdrv_nb_sectors(BlockDriverState *bs)
 }
 
 /**
- * Return length in bytes on success, -errno on error.
- * The length is always a multiple of BDRV_SECTOR_SIZE.
+ * Zurück Länge in Bytes auf Erfolg, -errno auf Fehler.
+ * Die Länge ist immer ein Vielfaches von BDRV_SECTOR_SIZE.
  */
 int64_t bdrv_getlength(BlockDriverState *bs)
 {
@@ -2677,7 +2710,8 @@ int64_t bdrv_getlength(BlockDriverState *bs)
     return ret < 0 ? ret : ret * BDRV_SECTOR_SIZE;
 }
 
-/* return 0 as number of sectors if no device present or error */
+/* return 0 als Anzahl von Sektoren, falls kein Gerät vorhanden ist oder Fehler
+ */
 void bdrv_get_geometry(BlockDriverState *bs, uint64_t *nb_sectors_ptr)
 {
     int64_t nb_sectors = bdrv_nb_sectors(bs);
@@ -2734,7 +2768,7 @@ int bdrv_set_key(BlockDriverState *bs, const char *key)
     } else if (!bs->valid_key) {
         bs->valid_key = 1;
         if (bs->blk) {
-            /* call the change callback now, we skipped it on open */
+            /* rufen nun die Änderung Rückruf, wir ließen es auf offenen */
             blk_dev_change_media_cb(bs->blk, true);
         }
     }
@@ -2742,15 +2776,17 @@ int bdrv_set_key(BlockDriverState *bs, const char *key)
 }
 
 /*
- * Provide an encryption key for @bs.
- * If @key is non-null:
- *     If @bs is not encrypted, fail.
- *     Else if the key is invalid, fail.
- *     Else set @bs's key to @key, replacing the existing key, if any.
- * If @key is null:
- *     If @bs is encrypted and still lacks a key, fail.
- *     Else do nothing.
- * On failure, store an error object through @errp if non-null.
+ * Geben Sie einen Verschlüsselungsschlüssel für @bs.
+ * Wenn @key nicht null ist:
+ *     Wenn @bs nicht verschlüsselt ist, fehlschlagen.
+ *     Else, wenn der Schlüssel ungültig ist, fehlschlagen.
+ *     Else Set @ bs Schlüssel zum @key, den vorhandenen Schlüssel zu
+ *     ersetzen, falls vorhanden.
+ * Wenn @key ist null:
+ *     Wenn @bs verschlüsselt ist und es fehlt immer noch einen Schlüssel,
+ *     scheitern.
+ *     Else nichts zu tun.
+ * Bei einem Fehler speichern ein Fehlerobjekt durch @errp wenn nicht null ist.
  */
 void bdrv_add_key(BlockDriverState *bs, const char *key, Error **errp)
 {
@@ -2813,7 +2849,7 @@ void bdrv_iterate_format(void (*it)(void *opaque, const char *name),
     g_free(formats);
 }
 
-/* This function is to find a node in the bs graph */
+/* Diese Funktion ist ein Knoten in dem Graphen zu finden bs */
 BlockDriverState *bdrv_find_node(const char *node_name)
 {
     BlockDriverState *bs;
@@ -2828,7 +2864,8 @@ BlockDriverState *bdrv_find_node(const char *node_name)
     return NULL;
 }
 
-/* Put this QMP function here so it can access the static graph_bdrv_states. */
+/* Setzen Sie diese Funktion QMP hier so es die statischen graph_bdrv_states
+ * zugreifen können. */
 BlockDeviceInfoList *bdrv_named_nodes_list(Error **errp)
 {
     BlockDeviceInfoList *list, *entry;
@@ -2884,8 +2921,8 @@ BlockDriverState *bdrv_lookup_bs(const char *device,
     return NULL;
 }
 
-/* If 'base' is in the same chain as 'top', return true. Otherwise,
- * return false.  If either argument is NULL, return false. */
+/* Wenn "Basis" in der gleichen Kette wie "oben", return true. Andernfalls,
+ * return false. Wenn eines der Argumente NULL ist, return false. */
 bool bdrv_chain_contains(BlockDriverState *top, BlockDriverState *base)
 {
     while (top && top != base) {
@@ -2903,8 +2940,8 @@ BlockDriverState *bdrv_next_node(BlockDriverState *bs)
     return QTAILQ_NEXT(bs, node_list);
 }
 
-/* Iterates over all top-level BlockDriverStates, i.e. BDSs that are owned by
- * the monitor or attached to a BlockBackend */
+/* Iteriert über alle Top-Level-BlockDriverStates, das heißt BDSe, die von im
+ * Besitz der Monitor oder an einem BlockBackend */
 BlockDriverState *bdrv_next(BlockDriverState *bs)
 {
     if (!bs || bs->blk) {
@@ -2914,8 +2951,8 @@ BlockDriverState *bdrv_next(BlockDriverState *bs)
         }
     }
 
-    /* Ignore all BDSs that are attached to a BlockBackend here; they have been
-     * handled by the above block already */
+    /* Ignorieren Sie alle BDSe, die hier zu einem BlockBackend gebunden sind;
+     * Sie waren bereits durch den obigen Block behandelt */
     do {
         bs = bdrv_next_monitor_owned(bs);
     } while (bs && bs->blk);
@@ -2927,16 +2964,18 @@ const char *bdrv_get_node_name(const BlockDriverState *bs)
     return bs->node_name;
 }
 
-/* TODO check what callers really want: bs->node_name or blk_name() */
+/* TODO überprüfen, was Anrufer wirklich wollen: BS-> node_name oder
+ * blk_name () */
 const char *bdrv_get_device_name(const BlockDriverState *bs)
 {
     return bs->blk ? blk_name(bs->blk) : "";
 }
 
-/* This can be used to identify nodes that might not have a device
- * name associated. Since node and device names live in the same
- * namespace, the result is unambiguous. The exception is if both are
- * absent, then this returns an empty (non-null) string. */
+/* Dies kann verwendet werden, um Knoten zu identifizieren, die keine
+ * Vorrichtung haben könnte Namen zugeordnet ist. Da der Knoten und
+ * Gerätenamen leben in der gleichen Namensraum, das Ergebnis ist eindeutig.
+ * Die Ausnahme ist, wenn beide abwesend ist, gibt diese eine leere (nicht null)
+ * Zeichenfolge. */
 const char *bdrv_get_device_or_node_name(const BlockDriverState *bs)
 {
     return bs->blk ? blk_name(bs->blk) : bs->node_name;
@@ -2956,8 +2995,8 @@ int bdrv_has_zero_init(BlockDriverState *bs)
 {
     assert(bs->drv);
 
-    /* If BS is a copy on write image, it is initialized to
-       the contents of the base image, which may not be zeroes.  */
+    /* Wenn BS eine Kopie auf Schreib Bild ist, wird es initialisiert
+       der Inhalt des Basisbildes, die Nullen nicht sein kann.  */
     if (bs->backing) {
         return 0;
     }
@@ -2965,7 +3004,7 @@ int bdrv_has_zero_init(BlockDriverState *bs)
         return bs->drv->bdrv_has_zero_init(bs);
     }
 
-    /* safe default */
+    /* sichere Standard */
     return 0;
 }
 
@@ -3102,10 +3141,10 @@ int bdrv_is_snapshot(BlockDriverState *bs)
     return !!(bs->open_flags & BDRV_O_SNAPSHOT);
 }
 
-/* backing_file can either be relative, or absolute, or a protocol.  If it is
- * relative, it must be relative to the chain.  So, passing in bs->filename
- * from a BDS as backing_file should not be done, as that may be relative to
- * the CWD rather than the chain. */
+/* backing_file kann entweder relativ sein, oder absolut, oder ein Protokoll.
+ * Wenn es sich um relativ, muss es an der Kette relativ sein. Also, vorbei in
+ * BS-> Dateiname von einem BDS als backing_file nicht getan werden sollte, so
+ * dass relativ sein kann die CWD anstatt die Kette. */
 BlockDriverState *bdrv_find_backing_image(BlockDriverState *bs,
         const char *backing_file)
 {
@@ -3128,26 +3167,27 @@ BlockDriverState *bdrv_find_backing_image(BlockDriverState *bs,
 
     for (curr_bs = bs; curr_bs->backing; curr_bs = curr_bs->backing->bs) {
 
-        /* If either of the filename paths is actually a protocol, then
-         * compare unmodified paths; otherwise make paths relative */
+        /* Wenn eine der Dateipfade tatsächlich ein Protokoll, dann
+         * vergleichen unmodifizierten Pfade; sonst machen Pfade relativ */
         if (is_protocol || path_has_protocol(curr_bs->backing_file)) {
             if (strcmp(backing_file, curr_bs->backing_file) == 0) {
                 retval = curr_bs->backing->bs;
                 break;
             }
         } else {
-            /* If not an absolute filename path, make it relative to the current
-             * image's filename path */
+            /* Wenn kein absoluter Dateiname Pfad, machen es zum aktuellen
+             * relativen Bild des Dateipfad */
             path_combine(filename_tmp, PATH_MAX, curr_bs->filename,
                          backing_file);
 
-            /* We are going to compare absolute pathnames */
+            /* Wir werden absolute Pfadnamen zu vergleichen */
             if (!realpath(filename_tmp, filename_full)) {
                 continue;
             }
 
-            /* We need to make sure the backing filename we are comparing against
-             * is relative to the current image filename (or absolute) */
+            /* Wir müssen sicherstellen, dass die Unterstützung Dateinamen
+             * machen wir einen Vergleich gegen ist auf dem aktuellen
+             * Image-Dateinamen (oder absolute) relativ */
             path_combine(filename_tmp, PATH_MAX, curr_bs->filename,
                          curr_bs->backing_file);
 
@@ -3278,10 +3318,10 @@ int bdrv_inactivate_all(void)
 }
 
 /**************************************************************/
-/* removable device support */
+/* herausnehmbaren Geräteträger */
 
 /**
- * Return TRUE if the media is present
+ * TRUE zurück, wenn die Medien vorhanden ist,
  */
 bool bdrv_is_inserted(BlockDriverState *bs)
 {
@@ -3303,8 +3343,9 @@ bool bdrv_is_inserted(BlockDriverState *bs)
 }
 
 /**
- * Return whether the media changed since the last call to this
- * function, or -ENOTSUP if we don't know.  Most drivers don't know.
+ * Gibt zurück, ob die Medien seit dem letzten Aufruf dieser geändert
+ * Funktion oder -ENOTSUP, wenn wir nicht wissen. Die meisten Fahrer wissen
+ * es nicht.
  */
 int bdrv_media_changed(BlockDriverState *bs)
 {
@@ -3317,7 +3358,8 @@ int bdrv_media_changed(BlockDriverState *bs)
 }
 
 /**
- * If eject_flag is TRUE, eject the media. Otherwise, close the tray
+ * Wenn eject_flag TRUE ist, kann das Medium ausgeworfen. Andernfalls schließen
+ * Sie das Fach
  */
 void bdrv_eject(BlockDriverState *bs, bool eject_flag)
 {
@@ -3336,8 +3378,8 @@ void bdrv_eject(BlockDriverState *bs, bool eject_flag)
 }
 
 /**
- * Lock or unlock the media (if it is locked, the user won't be able
- * to eject it manually).
+ * Sperren oder Entsperren der Medien (wenn es gesperrt ist, wird der Benutzer
+ * nicht in der Lage auszuwerfen es manuell).
  */
 void bdrv_lock_medium(BlockDriverState *bs, bool locked)
 {
@@ -3350,15 +3392,15 @@ void bdrv_lock_medium(BlockDriverState *bs, bool locked)
     }
 }
 
-/* Get a reference to bs */
+/* Holen Sie sich ein Verweis auf bs */
 void bdrv_ref(BlockDriverState *bs)
 {
     bs->refcnt++;
 }
 
-/* Release a previously grabbed reference to bs.
- * If after releasing, reference count is zero, the BlockDriverState is
- * deleted. */
+/* Lassen Sie eine zuvor packte Bezug auf bs.
+ * Wenn nach dem Loslassen Referenzzählung gleich Null ist, ist die
+ * BlockDriverState gelöscht. */
 void bdrv_unref(BlockDriverState *bs)
 {
     if (!bs) {
@@ -3454,7 +3496,7 @@ void bdrv_img_create(const char *filename, const char *fmt,
     Error *local_err = NULL;
     int ret = 0;
 
-    /* Find driver and parse its options */
+    /* Finden Sie Treiber und analysieren seine Optionen */
     drv = bdrv_find_format(fmt);
     if (!drv) {
         error_setg(errp, "Unknown file format '%s'", fmt);
@@ -3481,11 +3523,11 @@ void bdrv_img_create(const char *filename, const char *fmt,
     create_opts = qemu_opts_append(create_opts, drv->create_opts);
     create_opts = qemu_opts_append(create_opts, proto_drv->create_opts);
 
-    /* Create parameter list with default values */
+    /* Erstellen Parameterliste mit Standardwerten */
     opts = qemu_opts_create(create_opts, NULL, 0, &error_abort);
     qemu_opt_set_number(opts, BLOCK_OPT_SIZE, img_size, &error_abort);
 
-    /* Parse -o options */
+    /* Parse -o */
     if (options) {
         qemu_opts_do_parse(opts, options, NULL, &local_err);
         if (local_err) {
@@ -3544,7 +3586,7 @@ void bdrv_img_create(const char *filename, const char *fmt,
                 goto out;
             }
 
-            /* backing files always opened read-only */
+            /* Sichern von Dateien geöffnet immer schreibgeschützt */
             back_flags = flags;
             back_flags &= ~(BDRV_O_RDWR | BDRV_O_SNAPSHOT | BDRV_O_NO_BACKING);
 
@@ -3587,9 +3629,10 @@ void bdrv_img_create(const char *filename, const char *fmt,
     ret = bdrv_create(drv, filename, opts, &local_err);
 
     if (ret == -EFBIG) {
-        /* This is generally a better message than whatever the driver would
-         * deliver (especially because of the cluster_size_hint), since that
-         * is most probably not much different from "image too large". */
+        /* Dies ist im Allgemeinen eine bessere Nachricht als das, was der
+         * Fahrer würde liefern (vor allem wegen der cluster_size_hint), da
+         * dies ist höchstwahrscheinlich von "Bild zu groß" nicht viel anders.
+         */
         const char *cluster_size_hint = "";
         if (qemu_opt_get_size(opts, BLOCK_OPT_CLUSTER_SIZE, 0)) {
             cluster_size_hint = " (try using a larger cluster size)";
@@ -3672,12 +3715,12 @@ void bdrv_attach_aio_context(BlockDriverState *bs,
 
 void bdrv_set_aio_context(BlockDriverState *bs, AioContext *new_context)
 {
-    bdrv_drain(bs); /* ensure there are no in-flight requests */
+    bdrv_drain(bs); /* sicherzustellen, dass keine in-flight-Anfragen sind */
 
     bdrv_detach_aio_context(bs);
 
-    /* This function executes in the old AioContext so acquire the new one in
-     * case it runs in a different thread.
+    /* Diese Funktion führt in der alten AioContext so die neue erwerben in
+     * Fall es läuft in einem anderen Thread.
      */
     aio_context_acquire(new_context);
     bdrv_attach_aio_context(bs, new_context);
@@ -3730,55 +3773,56 @@ int bdrv_amend_options(BlockDriverState *bs, QemuOpts *opts,
     return bs->drv->bdrv_amend_options(bs, opts, status_cb, cb_opaque);
 }
 
-/* This function will be called by the bdrv_recurse_is_first_non_filter method
- * of block filter and by bdrv_is_first_non_filter.
- * It is used to test if the given bs is the candidate or recurse more in the
- * node graph.
+/* Diese Funktion wird von der bdrv_recurse_is_first_non_filter Methode
+ * aufgerufen werden, von Blockfilter und durch bdrv_is_first_non_filter.
+ * Es wird verwendet, um zu testen, ob die gegebenen bs der Bewerber oder
+ * Rekursion mehr in der ist Knoten Graphen.
  */
 bool bdrv_recurse_is_first_non_filter(BlockDriverState *bs,
                                       BlockDriverState *candidate)
 {
-    /* return false if basic checks fails */
+    /* return false wenn grundlegende Überprüfungen fehlschlägt */
     if (!bs || !bs->drv) {
         return false;
     }
 
-    /* the code reached a non block filter driver -> check if the bs is
-     * the same as the candidate. It's the recursion termination condition.
+    /* der Code erreicht einen nicht-Block-Filtertreiber -> überprüfen, ob die
+     * bs der gleiche wie der Kandidat. Es ist die Rekursion Abbruchbedingung.
      */
     if (!bs->drv->is_filter) {
         return bs == candidate;
     }
-    /* Down this path the driver is a block filter driver */
+    /* Auf diesem Weg ist der Fahrer ein Blockfiltertreiber */
 
-    /* If the block filter recursion method is defined use it to recurse down
-     * the node graph.
+    /* Wenn der Blockfilter Rekursion Verfahren Gebrauch definiert ist es
+     * rekursiv der Knoten Graphen.
      */
     if (bs->drv->bdrv_recurse_is_first_non_filter) {
         return bs->drv->bdrv_recurse_is_first_non_filter(bs, candidate);
     }
 
-    /* the driver is a block filter but don't allow to recurse -> return false
-     */
+    /* der Fahrer ist ein Filterblock aber nicht zulassen recurse ->
+     * return false */
     return false;
 }
 
-/* This function checks if the candidate is the first non filter bs down it's
- * bs chain. Since we don't have pointers to parents it explore all bs chains
- * from the top. Some filters can choose not to pass down the recursion.
+/* Diese Funktion überprüft, ob der Kandidat die ersten nicht-Filter bs ist
+ * nach unten, es ist bs Kette. Da wir es alle bs Ketten erkunden keine Hinweise
+ * auf die Eltern von oben. Einige Filter können wählen, nicht die Rekursion
+ * zu überliefern.
  */
 bool bdrv_is_first_non_filter(BlockDriverState *candidate)
 {
     BlockDriverState *bs = NULL;
 
-    /* walk down the bs forest recursively */
+    /* Gehen Sie die bs Wald rekursiv */
     while ((bs = bdrv_next(bs)) != NULL) {
         bool perm;
 
-        /* try to recurse in this top level bs */
+        /* versuchen, in diesem Top-Level-bs recurse */
         perm = bdrv_recurse_is_first_non_filter(bs, candidate);
 
-        /* candidate is the first non filter */
+        /* Kandidat ist der erste nicht-Filter */
         if (perm) {
             return true;
         }
@@ -3806,10 +3850,10 @@ BlockDriverState *check_to_replace_node(BlockDriverState *parent_bs,
         goto out;
     }
 
-    /* We don't want arbitrary node of the BDS chain to be replaced only the top
-     * most non filter in order to prevent data corruption.
-     * Another benefit is that this tests exclude backing files which are
-     * blocked by the backing blockers.
+    /* Wir wollen nicht willkürlich Knoten der BDS-Kette nur die Spitze ersetzt
+     * werden die meisten nicht-Filter, um Datenkorruption zu verhindern.
+     * Ein weiterer Vorteil ist, dass diese Tests Backup-Dateien ausschließen,
+     * die sind durch die Unterstützung Blocker blockiert.
      */
     if (!bdrv_recurse_is_first_non_filter(parent_bs, to_replace_bs)) {
         error_setg(errp, "Only top most non filter can be replaced");
@@ -3833,7 +3877,7 @@ static bool append_open_options(QDict *d, BlockDriverState *bs)
     for (entry = qdict_first(bs->options); entry;
          entry = qdict_next(bs->options, entry))
     {
-        /* Exclude options for children */
+        /* Exclude-Optionen für Kinder */
         QLIST_FOREACH(child, &bs->children, next) {
             if (strstart(qdict_entry_key(entry), child->name, &p)
                 && (!*p || *p == '.'))
@@ -3845,7 +3889,7 @@ static bool append_open_options(QDict *d, BlockDriverState *bs)
             continue;
         }
 
-        /* And exclude all non-driver-specific options */
+        /* Und nicht enthalten alle nicht fahrerspezifische Optionen */
         for (desc = bdrv_runtime_opts.desc; desc->name; desc++) {
             if (!strcmp(qdict_entry_key(entry), desc->name)) {
                 break;
@@ -3863,17 +3907,19 @@ static bool append_open_options(QDict *d, BlockDriverState *bs)
     return found_any;
 }
 
-/* Updates the following BDS fields:
- *  - exact_filename: A filename which may be used for opening a block device
- *                    which (mostly) equals the given BDS (even without any
- *                    other options; so reading and writing must return the same
- *                    results, but caching etc. may be different)
- *  - full_open_options: Options which, when given when opening a block device
- *                       (without a filename), result in a BDS (mostly)
- *                       equalling the given one
- *  - filename: If exact_filename is set, it is copied here. Otherwise,
- *              full_open_options is converted to a JSON object, prefixed with
- *              "json:" (for use through the JSON pseudo protocol) and put here.
+/* Aktualisiert die folgenden BDS Felder:
+ *  - Exact_filename: Ein Dateiname, der zum Öffnen eines Blockgerät verwendet
+ *                    werden kann, die (meist) gleich der gegebenen BDS (auch
+ *                    ohne andere Optionen; so das Lesen und Schreiben müssen
+ *                    die gleiche Rückkehr Ergebnisse, aber Caching usw.
+ *                    können abweichen)
+ *  - Full_open_options: Optionen, die, wenn gegeben, wenn ein Blockgerät zu
+ *                       öffnen (Ohne Dateinamen), führen zu einer BDS
+ *                       (meistens) gleich der gegebenen
+ *  - Dateiname: Wenn exact_filename gesetzt ist, wird es hier kopiert.
+ *               Andernfalls, full_open_options ist mit einem JSON-Objekt
+ *               umgewandelt, mit dem Präfix "Json:" (zur Verwendung durch das
+ *               JSON Pseudo-Protokoll) und hier setzen.
  */
 void bdrv_refresh_filename(BlockDriverState *bs)
 {
@@ -3884,15 +3930,15 @@ void bdrv_refresh_filename(BlockDriverState *bs)
         return;
     }
 
-    /* This BDS's file name will most probably depend on its file's name, so
-     * refresh that first */
+    /* Dieser Dateiname des BDS wird höchstwahrscheinlich auf den Namen seiner
+     * Datei ab, so erfrischen, dass zuerst */
     if (bs->file) {
         bdrv_refresh_filename(bs->file->bs);
     }
 
     if (drv->bdrv_refresh_filename) {
-        /* Obsolete information is of no use here, so drop the old file name
-         * information before refreshing it */
+        /* Veraltete Informationen ist hier nichts, fallen so den alten
+         * Dateinamen Informationen, bevor es erfrischend */
         bs->exact_filename[0] = '\0';
         if (bs->full_open_options) {
             QDECREF(bs->full_open_options);
@@ -3904,7 +3950,8 @@ void bdrv_refresh_filename(BlockDriverState *bs)
         drv->bdrv_refresh_filename(bs, opts);
         QDECREF(opts);
     } else if (bs->file) {
-        /* Try to reconstruct valid information from the underlying file */
+        /* Versuchen Sie, gültige Informationen aus der zugrunde liegenden
+         * Datei rekonstruieren */
         bool has_open_options;
 
         bs->exact_filename[0] = '\0';
@@ -3916,16 +3963,18 @@ void bdrv_refresh_filename(BlockDriverState *bs)
         opts = qdict_new();
         has_open_options = append_open_options(opts, bs);
 
-        /* If no specific options have been given for this BDS, the filename of
-         * the underlying file should suffice for this one as well */
+        /* Wenn keine spezifischen Optionen wurden für diesen BDS, dem
+         * Dateinamen des angegebenen die zugrunde liegende Datei sollte auch
+         * für diese eine ausreichend */
         if (bs->file->bs->exact_filename[0] && !has_open_options) {
             strcpy(bs->exact_filename, bs->file->bs->exact_filename);
         }
-        /* Reconstructing the full options QDict is simple for most format block
-         * drivers, as long as the full options are known for the underlying
-         * file BDS. The full options QDict of that file BDS should somehow
-         * contain a representation of the filename, therefore the following
-         * suffices without querying the (exact_)filename of this BDS. */
+        /* die volle Optionen QDict Rekonstruieren ist einfach für die meisten
+         * Format-Block Fahrer, solange die vollen Möglichkeiten für die
+         * darunter liegende bekannt sind Datei BDS. Die voll Optionen QDict
+         * dieser BDS-Datei sollte irgendwie enthalten eine Darstellung der
+         * Dateiname, der daher die folgenden genügt, ohne die
+         * (exact_) Dateiname dieser BDS abfragen. */
         if (bs->file->bs->full_open_options) {
             qdict_put_obj(opts, "driver",
                           QOBJECT(qstring_from_str(drv->format_name)));
@@ -3938,12 +3987,12 @@ void bdrv_refresh_filename(BlockDriverState *bs)
             QDECREF(opts);
         }
     } else if (!bs->full_open_options && qdict_size(bs->options)) {
-        /* There is no underlying file BDS (at least referenced by BDS.file),
-         * so the full options QDict should be equal to the options given
-         * specifically for this block device when it was opened (plus the
-         * driver specification).
-         * Because those options don't change, there is no need to update
-         * full_open_options when it's already set. */
+        /* Es gibt keine zugrunde liegende Datei BDS (zumindest von BDS.file
+         * bezeichnet), so dass die volle Optionen QDict sollte gegeben zu den
+         * Optionen gleich speziell für diesen Block-Gerät, wenn es geöffnet
+         * wurde (plus Treiber-Spezifikation).
+         * Da diese Optionen nicht ändern, gibt es keine Notwendigkeit zu
+         * aktualisieren full_open_options, wenn es bereits gesetzt ist. */
 
         opts = qdict_new();
         append_open_options(opts, bs);
@@ -3951,12 +4000,13 @@ void bdrv_refresh_filename(BlockDriverState *bs)
                       QOBJECT(qstring_from_str(drv->format_name)));
 
         if (bs->exact_filename[0]) {
-            /* This may not work for all block protocol drivers (some may
-             * require this filename to be parsed), but we have to find some
-             * default solution here, so just include it. If some block driver
-             * does not support pure options without any filename at all or
-             * needs some special format of the options QDict, it needs to
-             * implement the driver-specific bdrv_refresh_filename() function.
+            /* Dies kann für alle Block Protokolltreiber nicht (einige können
+             * benötigen diese Dateinamen analysiert) werden, aber wir haben
+             * einige zu finden Standardlösung hier, so sind es eben. Wenn
+             * einige Blocktreiber unterstützt keine reine Optionen ohne
+             * Dateinamen überhaupt nicht oder braucht einige spezielle Format
+             * der Optionen QDict, muss es Umsetzung des treiberspezifische
+             * bdrv_refresh_filename () Funktion.
              */
             qdict_put_obj(opts, "filename",
                           QOBJECT(qstring_from_str(bs->exact_filename)));
block/blkdebug.c +23 -21

144 lines not on this page · raw message

block/linux-aio.c +27 -24

113 lines not on this page · raw message

block/qcow.c +62 -60

330 lines not on this page · raw message

block/qcow2-cache.c +10 -8
index 0fe8eda..937f458 100644
@@ -22,7 +22,7 @@
  * THE SOFTWARE.
  */
 
-/* Needed for CONFIG_MADVISE */
+/* Erforderlich für CONFIG_MADVISE */
 #include "qemu/osdep.h"
 
 #if defined(CONFIG_MADVISE) || defined(CONFIG_POSIX_MADVISE)
@@ -97,12 +97,13 @@ void qcow2_cache_clean_unused(BlockDriverState *bs, Qcow2Cache *c)
     while (i < c->size) {
         int to_clean = 0;
 
-        /* Skip the entries that we don't need to clean */
+        /* Überspringen Sie die Einträge, die wir nicht brauchen, zu reinigen
+         */
         while (i < c->size && !can_clean_entry(c, i)) {
             i++;
         }
 
-        /* And count how many we can clean in a row */
+        /* Und zählen, wie viele wir in einer Reihe reinigen */
         while (i < c->size && can_clean_entry(c, i)) {
             c->entries[i].offset = 0;
             c->entries[i].lru_counter = 0;
@@ -315,7 +316,7 @@ static int qcow2_cache_do_get(BlockDriverState *bs, Qcow2Cache *c,
     trace_qcow2_cache_get(qemu_coroutine_self(), c == s->l2_table_cache,
                           offset, read_from_disk);
 
-    /* Check if the table is already cached */
+    /* Überprüfen Sie, ob die Tabelle bereits zwischengespeichert wird */
     i = lookup_index = (offset / s->cluster_size * 4) % c->size;
     do {
         const Qcow2CachedTable *t = &c->entries[i];
@@ -332,12 +333,13 @@ static int qcow2_cache_do_get(BlockDriverState *bs, Qcow2Cache *c,
     } while (i != lookup_index);
 
     if (min_lru_index == -1) {
-        /* This can't happen in current synchronous code, but leave the check
-         * here as a reminder for whoever starts using AIO with the cache */
+        /* Dies kann nicht im laufenden Synchroncode passieren, aber lassen Sie
+         * das Kontroll hier als Erinnerung für jeden, beginnt AIO mit dem
+         * Cache-Verwendung */
         abort();
     }
 
-    /* Cache miss: write a table back and replace it */
+    /* Cache-Miss: Schreiben Sie eine Tabelle zurück und ersetzen Sie es */
     i = min_lru_index;
     trace_qcow2_cache_get_replace_entry(qemu_coroutine_self(),
                                         c == s->l2_table_cache, i);
@@ -365,7 +367,7 @@ static int qcow2_cache_do_get(BlockDriverState *bs, Qcow2Cache *c,
 
     c->entries[i].offset = offset;
 
-    /* And return the right table */
+    /* Und kehren die richtige Tabelle */
 found:
     c->entries[i].ref++;
     *table = qcow2_cache_get_table_addr(bs, c, i);
block/qcow2-cluster.c +301 -265

363 lines not on this page · raw message

block/qcow2-refcount.c +342 -300

642 lines not on this page · raw message

block/qcow2-snapshot.c +63 -56

119 lines not on this page · raw message

block/qcow2.c +283 -253

536 lines not on this page · raw message

block/qcow2.h +66 -61

127 lines not on this page · raw message

block/raw-aio.h +3 -3
index 811e375..77183b4 100644

Lines of this file are not shown. View the raw message.

block/raw-posix.c +217 -197

414 lines not on this page · raw message

block/raw-win32.c +23 -22

45 lines not on this page · raw message

block/raw_bsd.c +10 -9
index a6cc7e9..cd23531 100644

Lines of this file are not shown. View the raw message.

block/vpc.c +71 -61

132 lines not on this page · raw message

block/win32-aio.c +2 -2
index 2d509a9..7b31134 100644

Lines of this file are not shown. View the raw message.

blockdev-nbd.c +4 -3
index 12cae0e..fa13427 100644

Lines of this file are not shown. View the raw message.

qemu-img.c +165 -145

310 lines not on this page · raw message

qemu-io-cmds.c +43 -37

80 lines not on this page · raw message

qemu-io.c +10 -9
index 0a738f1..31aea32 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.7.4

Part of the diff is not shown here. View the raw message.

#1 lore raw
Quoted 1 line · Max Reitz

Du hast zu viel freie Zeit.

Paolo

ps: given the latest news about AI, I hope Google Translate is not insulting any family member of yours, or worse.

pps: the LibreOffice is looking for people translating comments from German to English (that's serious).

Acked-by on v1 1/1
#2 lore raw
In reply to Max Reitz
Quoted 20 lines · Max Reitz

In its organizational structure, the qemu project is rather
decentralized: Many different maintainers manage their own more or less secluded subsystems. However, regarding languages, it is still rather anglo-centric.

This issue has been brought up multiple times in regards to user-visible output such as error messages and has unfortunately generally been dismissed, except for some UIs.

Development always flows from the developer community to the user. Our developer community is just as diverse (or at least I hope it is) as our user base. Therefore, we should reflect this diversity in our development process in order for this diversity to reach our users as well, so they can benefit from it.

The human-targeted part of that development process are comments in the source code, obviously. Thus, in order to exhibit qemu's diversity, it makes sense for each subsystem's comments to be translated into the maintainer's native language.

Quoted 5 lines

Unfortunately, I do not speak Swabian.

However, as a submaintainer under Kevin, I think it will be fine to translate the comments into German, as that is supposedly a language we both share.

Quoted 5 lines

I'm certain that this will not hamper development itself by much. First of all, many other developers in the block area are able to speak
German: Markus Armbruster, Stefan Hajnoczi, Peter Lieven, Stefan Weil, just to name a few.

This also lines up well with lots of the s390 developers. We can then start to submit bug reports for I/O and dataplane issues in german as well. I am sure that Paolo will master German soon, after all he has a compiler background so he can handle new languages by just learning a new frontend.

Christian

Acked-by on v1 1/1
#3 lore raw
In reply to Max Reitz
Quoted 51 lines · Max Reitz

In its organizational structure, the qemu project is rather
decentralized: Many different maintainers manage their own more or less secluded subsystems. However, regarding languages, it is still rather anglo-centric.

This issue has been brought up multiple times in regards to user-visible output such as error messages and has unfortunately generally been dismissed, except for some UIs.

Development always flows from the developer community to the user. Our developer community is just as diverse (or at least I hope it is) as our user base. Therefore, we should reflect this diversity in our development process in order for this diversity to reach our users as well, so they can benefit from it.

The human-targeted part of that development process are comments in the source code, obviously. Thus, in order to exhibit qemu's diversity, it makes sense for each subsystem's comments to be translated into the maintainer's native language.

Unfortunately, I do not speak Swabian.

However, as a submaintainer under Kevin, I think it will be fine to translate the comments into German, as that is supposedly a language we both share.

I'm certain that this will not hamper development itself by much. First of all, many other developers in the block area are able to speak
German: Markus Armbruster, Stefan Hajnoczi, Peter Lieven, Stefan Weil, just to name a few.

Second, good code is supposed to be self-explanatory, i.e. without reading the comments. While it should go without saying that the block layer's code quality is simply marvelous, we can now proof that it indeed is, by seeing whether people who cannot speak German can still understand the code.

(Although some of our code is rumored to be rather hard to understand
even with the comments. But those rumors are purely unfounded, I am sure.)

In the rather improbable event that someone is not able to understand the code without being able to read the comments, they will then need to learn German. So this is fine, too.

Third, this will surely attract a wave of German developers who were so far unable to participate in qemu's development because of the language barrier. In order to facilitate this process, the next step will be to use German commit messages for every commit in the block layer and to allow German variable names.

Quoted 6 lines

I am sure if all maintainers follow this process of translating their subsystem's comments, variable names and string contents into their native language, qemu will become a shining example of what we call „Kraut und Rüben“. And everyone knows how much the Krauts like Kraut.

As a follow-up, please consider translating the legacy block devices so some right-minded developers will be able to understand what's going on inside of them, because I sure as hell don't.

TIA
--js

#4 lore raw
In reply to Max Reitz
Quoted 4 lines · Max Reitz

In its organizational structure, the qemu project is rather
decentralized: Many different maintainers manage their own more or less secluded subsystems. However, regarding languages, it is still rather anglo-centric.

Thanks for volunteering for the German translation position in QEMU's technical writing team!

Wilkommen (High German)!
Moin moin (Low German)!
Grüß Gott (Austrian)!
Grüezi mittenand (Swiss)!
Na Mann, du hast heut’ aba wieda ’ne Kodderschnauze (Berlin)!

Stefan