Problem with mounting a device second time.

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Apr 19 11:59:28 UTC 2012


On 04/19/2012 01:09 PM, ali nasir wrote:
> Here is the output before the call to ioctl:
> ff:ffffffff P /dev/rda UC=4294967293 BB=0 BC=4000 BS=512 MBS=512
> 00000001:00000000 P /dev/nvda UC=4294967293 BB=0 BC=637 BS=512 MBS=512
> 00000004:00000000 P /dev/fdda UC=1 BB=0 BC=1504 BS=512 MBS=512
> 00000005:00000000 P /dev/sdc0 UC=2 BB=0 BC=3862528 BS=512 MBS=512
> 00000007:00000000 L /dev/sdc01 UC=2 BB=135 BC=3858489 BS=512 MBS=512
>
> Here is the output after the call to the ioctl.
> ffffffff:ffffffff P /dev/rda UC=4294967293 BB=0 BC=4000 BS=512 MBS=512
> 00000001:00000000 P /dev/nvda UC=4294967293 BB=0 BC=637 BS=512 MBS=512
> 00000004:00000000 P /dev/fdda UC=1 BB=0 BC=1504 BS=512 MBS=512
> 00000005:00000000 P /dev/sdc0 UC=2 BB=0 BC=3862528 BS=512 MBS=512
> 00000007:00000000 L /dev/sdc01 UC=3 BB=135 BC=3858489 BS=512 MBS=512
>
> The UC for /dev/sdc01 has increased by one. This only happens if i call the ioctl for the SYNCDEV. Any idea what could i be missing?

If you call the ioctl more than once, does it increase further?  The usage 
count increases with a rtems_disk_obtain() and decreases with a 
rtems_disk_release().  Thus someone holds a reference to the disk after the 
ioctl call.  You can set a break point to these two functions.

-- 
Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the users mailing list