[Port-solaris] OpenAFS cache manager cold vs warm shutdown

Mark Vitale mvitale@sinenomine.net
Thu, 3 Jul 2014 21:45:47 +0000


(cross-posted to openafs-devel and port-solaris)

The AFS Unix cache manager has two ways to shutdown:

- 'afsd -shutdown' requires that /afs already be umounted; it then sets afs=
_cold_shutdown=3D1 and calls afs_shutdown().

- 'umount /afs' also calls afs_shutdown() on most platforms.  Some of them =
set afs_cold_shutdown=3D1 first, while others do not.

If afs_shutdown() is called "warm" (afs_cold_shutdown=3D=3D0), the shutdown=
 logic skips the clearing and releasing of some resources.  I see no rhyme =
or reason to which resources AFS leaves unreleased.  Nor do I understand th=
e (possibly historical) reason for why there is a distinction between cold =
and warm shutdown.

For example, on Solaris, umount /afs currently performs a "warm" shutdown. =
 This makes it effectively impossible (catch-22) to perform a "cold" shutdo=
wn.

Then there is the question of when it is safe to rmmod/modunload the libafs=
 kernel module.  Does warm or cold shutdown affect the answer to this quest=
ion?

Can anyone shed some insight on this situation?

thanks,
--
Mark Vitale
mvitale@sinenomine.net=