memory increase caused by mounting failure

Leng TouTou lengtt258 at gmail.com
Wed Sep 6 04:27:27 UTC 2023


Hi,
I used the following command to mount repeatedly about 10,000 times
  $ mount -t squashfs -o loop,thread=0 image /mnt/tmp
This command will not mount successfully, then I found that the memory used
by slab increased by about 10000k.

So is this normal? In the Busybox source code, I saw that when the mount
fails, del_loop uses LOOP_CLR_FD for cleanup.
Does LOOP_CLR_FD simply disconnect the loop device from the image, leaving
the loop device still available for reuse?
Or if I want to completely release a loop device and its occupied memory,
do I need to use LOOP_CTL_REMOVE?

Best regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20230906/327fcf1c/attachment-0001.html>


More information about the busybox mailing list