It then might be a problem with "/dev/loop-control" device node. Which
dynamically find or allocate a free device, but also add and remove loop
devices from the running system.

# drivers/block/loop.c

   2090 static void loop_remove(struct loop_device *lo)
   2091 {
   2092         del_gendisk(lo->lo_disk);
   2093         blk_cleanup_queue(lo->lo_queue);
   2094         blk_mq_free_tag_set(&lo->tag_set);
   2095         put_disk(lo->lo_disk);
   2096         kfree(lo);
   2097 }


   2177         case LOOP_CTL_REMOVE:
   2178                 ret = loop_lookup(&lo, parm);
   2179                 if (ret < 0)
   2180                         break;
   2181                 if (lo->lo_state != Lo_unbound) {
   2182                         ret = -EBUSY;
   2183                         break;
   2184                 }
   2185                 if (atomic_read(&lo->lo_refcnt) > 0) {
   2186                         ret = -EBUSY;
   2187                         break;
   2188                 }
   2189                 lo->lo_disk->private_data = NULL;
   2190                 idr_remove(&loop_index_idr, lo->lo_number);
   2191                 loop_remove(lo);
   2192                 break;

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1856871

Title:
  i/o error if next unused loop device is queried

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1856871/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to