]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
losetup: increase limit of setup attempts
authorKarel Zak <kzak@redhat.com>
Tue, 13 Oct 2020 10:55:44 +0000 (12:55 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 13 Oct 2020 10:55:44 +0000 (12:55 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/gpt.c
sys-utils/losetup.c

index 4b0e26389ae2b0b1bb74bbbb6c64445d5dff3979..7a71ab9da61f70a0f9b9337bcdf52e774ebe0e92 100644 (file)
@@ -1126,7 +1126,8 @@ static int gpt_check_lba_sanity(struct fdisk_context *cxt, struct gpt_header *he
 
        /* check if first and last usable LBAs with the disk's last LBA */
        if (fu > lastlba || lu > lastlba) {
-               DBG(GPT, ul_debug("error: header LBAs are after the disk's last LBA"));
+               DBG(GPT, ul_debug("error: header LBAs are after the disk's last LBA (%ju..%ju)",
+                                       (uintmax_t) fu, (uintmax_t) lu));
                goto done;
        }
 
index 51baf1440847a1d440776602d8553f9611cd9123..7246fd85bfd8273e82e576d09a203d968a861704 100644 (file)
@@ -573,7 +573,7 @@ static int create_loop(struct loopdev_cxt *lc,
                if (rc == 0)
                        break;                  /* success */
 
-               if (errno == EBUSY && !hasdev && ntries < 16) {
+               if (errno == EBUSY && !hasdev && ntries < 64) {
                        xusleep(200000);
                        ntries++;
                        continue;