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

Thomas Bächler thomas at archlinux.org
Fri Aug 26 05:58:13 EDT 2011


Am 26.08.2011 11:43, schrieb Gerardo Exequiel Pozzi:
>> Hm, I did not see that, or misinterpreted it. Looks good, but ...
>>
>>> If you ask me how to do this is filesystem are built-in in kernel, I do
>>> not know.
>> Yes, it only works for modules. If we had refcounts for the block
>> devices themselves, that would be great.
> Yes look at /proc/devices for blocks devs then:
> /sys/module/sd_mod/refcnt
> /sys/module/loop/refcnt
> etc, etc...

Those are kernel modules, not block devices. Depending on kernel
configuration, they might be present or not.

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).

>> In our kernel, we do not have built-in file systems, but it is still not
>> a generic solution.
>>
> Looks like we are going beyond what we can see... This is more
> heuristic, if you have already unmounted all filesystem, is the task of
> the kernel to flush buffers for each block device, then (if apply) sync
> device cache and stop it!

Sure, that is the kernel's job. But it would also be the kernel's job to
tell userspace when it actually finished doing so.

> Anyway, so that everyone is happy and friendly, I will use non-lazy
> optionIts working fine.

In any case, the lazy umount looks useful for the general use case,
beyond archiso, if we can solve this.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.archlinux.org/pipermail/arch-releng/attachments/20110826/6ba4e2b2/attachment.asc>


More information about the arch-releng mailing list