Re: losetup -a blocks when loop is written to

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthias Schniedermeyer wrote:
> When i do a 'losetup -a' while a manually setup encrypted loop is 'zero'ed with
> dd if=/dev/zero of=/dev/loop<x> bs=4096 count=<y>
> It blocks, just before the written to loop would be printed, until dd is
> finished, which may take several hours.
> 
> As even after 'KILL'ing the process it stays in the process list, i assume
> that something on the kernel-site is blocking.

This appears to be lock contention issue. Direct block device access and
loop device ioctls that are used to query loop device status seem to both
want same exclusive lock. Direct block device writes seem to win lock
contention most of the time, or all of the time. Loop device ioctls
eventually gets the lock, but it may take some time.

-- 
Jari Ruusu  1024R/3A220F51 5B 4B F9 BB D3 3F 52 E9  DB 1D EB E3 24 0E A9 DD

-
Linux-crypto:  cryptography in and on the Linux system
Archive:       http://mail.nl.linux.org/linux-crypto/


[Index of Archives]     [Kernel]     [Linux Crypto]     [Gnu Crypto]     [Gnu Classpath]     [Netfilter]     [Bugtraq]
  Powered by Linux