]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/block/rbd.c
rbd: allow null image name
[karo-tx-linux.git] / drivers / block / rbd.c
index 8d26c0f2be1491e2da0673fff7f9d2104bc5ab18..a8521338bf46b1b3ebc56bcc10ce374d57eafc15 100644 (file)
@@ -3067,6 +3067,14 @@ static int rbd_dev_image_id(struct rbd_device *rbd_dev)
        void *response;
        void *p;
 
+       /*
+        * When probing a parent image, the image id is already
+        * known (and the image name likely is not).  There's no
+        * need to fetch the image id again in this case.
+        */
+       if (rbd_dev->spec->image_id)
+               return 0;
+
        /*
         * First, see if the format 2 image id file exists, and if
         * so, get the image's persistent id from it.