Bug 14316 - get_free_loop needs waiting
Summary: get_free_loop needs waiting
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.33.x
Hardware: PC Linux
: P5 major
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-03 04:12 UTC by wjh
Modified: 2021-11-03 04:23 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wjh 2021-11-03 04:12:17 UTC
libbb/loop.c: set_loop

Sometimes loop device is not ready arter get_free_loop, 
raise "can't setup loop device: No such file or directory".


It will be ok if usleep before "goto open_lfd":

try = xasprintf(LOOP_FORMAT, i); 
for (lc=0; lc<100; lc++) {
  if (stat(try, &buf2)==0) break; 
  usleep(20);
}

goto open_lfd;
Comment 1 wjh 2021-11-03 04:23:16 UTC
Linux box 5.3.11-tinycore64 #1 SMP Wed Nov 20 08:16:37 CST 2019 x86_64 GNU/Linux