[arch-releng] [DRAFT] [archiso] Add archiso_shutdown hook.

Gerardo Exequiel Pozzi vmlinuz386 at yahoo.com.ar
Fri Aug 26 20:26:42 EDT 2011


On 08/26/2011 08:00 PM, Thomas Bächler wrote:
> Am 26.08.2011 20:24, schrieb Gerardo Exequiel Pozzi:
>>> Those are kernel modules, not block devices. Depending on kernel
>>> configuration, they might be present or not.
>> Sure those are an abstraction of block devices that you have (real or
>> virtual).
>>> What I am looking for is a counter for the block device itself (LVM
>>> shows the "open count", I would hope that is not dm-specific).
>> Not per device, but for the whole abstraction:
>>
>> Again /sys/module/$blk/refcnt, but seems that needs an example to trust me:
> No, they are not. They are modules, random pieces of code that you can
> load and unload. They are not an abstraction of anything.
>
Maybe I am expressed bad,,, mmm how to say...

* sd_mod provides an abstraction layer of scsi block disk devices. If 
they are not abstraction, should not exists.
* Each instance of sd_mod is a block device.
* refcnt of blocks devices is per usage of these instances.

But you want to know the usage per block device.

Under deinitramfs stage we have.
* No user processes except the current script and init. (of course if no 
proccess stalled, anyway there is nothing to do with "D" process)
* Unmounting all things, deregister all dm-mapper devices, and detaching 
loop devs....
* There is no much things to do, just say to kernel "hey, start 
poweroff/reboot/halt sequence!")

And for "general scenario".... all things started are stopped before 
entering at this stage, also all real filesystem (except /). Deinitramfs 
stage is just for unmount /, There is nothing (mounts) underlying of / 
(of course there is rootfs, but do not care in this discussion).
In the particular case of archiso we have more things (mounted) below /, 
we have a dm-0 that is part of two loop devs, and these loops devs 
reside on a two level _mount_ for RO part and one level _mount_ for cow 
part RW.

Looks like this ends in nothing, or I do not understand where or how far 
you get. sorry.

-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1



More information about the arch-releng mailing list