]> 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>
Fri, 13 Nov 2020 11:20:31 +0000 (12:20 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/gpt.c
sys-utils/losetup.c

index 563c77073b87c2eb0187f14f58aba60e9e6cad5d..b8bdf6c2fb162950030b54d5d33c56a859bc38a1 100644 (file)
@@ -1113,7 +1113,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 d326660dac85fc7f727137581a8e31d41d9e5919..7aadc9f570ffbb8382c816f36261874ad9febcf9 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;