mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-14 04:00:31 +03:00
Disable Shutdown/Reboot
This support has been disable with HAVE_SHUTDOWN. We can support this at some point by adding the needed reboot notifiers.
This commit is contained in:
parent
cb28b3494e
commit
acb5376940
@ -66,7 +66,6 @@
|
|||||||
#include "zfs_comutil.h"
|
#include "zfs_comutil.h"
|
||||||
|
|
||||||
#ifdef HAVE_ZPL
|
#ifdef HAVE_ZPL
|
||||||
extern int sys_shutdown;
|
|
||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
int
|
int
|
||||||
@ -89,14 +88,19 @@ zfs_sync(vfs_t *vfsp, short flag, cred_t *cr)
|
|||||||
ZFS_ENTER(zfsvfs);
|
ZFS_ENTER(zfsvfs);
|
||||||
dp = dmu_objset_pool(zfsvfs->z_os);
|
dp = dmu_objset_pool(zfsvfs->z_os);
|
||||||
|
|
||||||
|
#ifdef HAVE_SHUTDOWN
|
||||||
/*
|
/*
|
||||||
* If the system is shutting down, then skip any
|
* If the system is shutting down, then skip any
|
||||||
* filesystems which may exist on a suspended pool.
|
* filesystems which may exist on a suspended pool.
|
||||||
|
*
|
||||||
|
* XXX: This can be implemented using the Linux reboot
|
||||||
|
* notifiers: {un}register_reboot_notifier().
|
||||||
*/
|
*/
|
||||||
if (sys_shutdown && spa_suspended(dp->dp_spa)) {
|
if (sys_shutdown && spa_suspended(dp->dp_spa)) {
|
||||||
ZFS_EXIT(zfsvfs);
|
ZFS_EXIT(zfsvfs);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
#endif /* HAVE_SHUTDOWN */
|
||||||
|
|
||||||
if (zfsvfs->z_log != NULL)
|
if (zfsvfs->z_log != NULL)
|
||||||
zil_commit(zfsvfs->z_log, 0);
|
zil_commit(zfsvfs->z_log, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user