mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Relax error reporting in zpool import and zpool split
For zpool import and zpool split, zpool_enable_datasets is called to mount and share all datasets in a pool. If there is an error while mounting or sharing any dataset in the pool, the status of import or split is reported as failure. However, the changes do show up in zpool list. This commit updates the error reporting in zpool import and zpool split path. More descriptive messages are shown to user in case there is an error during mount or share. Errors in mount or share do not effect the overall status of zpool import and zpool split. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Umer Saleem <usaleem@ixsystems.com> Closes #15216
This commit is contained in:
@@ -1300,7 +1300,7 @@ zpool_enable_datasets(zpool_handle_t *zhp, const char *mntopts, int flags)
|
||||
zfs_foreach_mountpoint(zhp->zpool_hdl, cb.cb_handles, cb.cb_used,
|
||||
zfs_mount_one, &ms, B_TRUE);
|
||||
if (ms.ms_mntstatus != 0)
|
||||
ret = ms.ms_mntstatus;
|
||||
ret = EZFS_MOUNTFAILED;
|
||||
|
||||
/*
|
||||
* Share all filesystems that need to be shared. This needs to be
|
||||
@@ -1311,7 +1311,7 @@ zpool_enable_datasets(zpool_handle_t *zhp, const char *mntopts, int flags)
|
||||
zfs_foreach_mountpoint(zhp->zpool_hdl, cb.cb_handles, cb.cb_used,
|
||||
zfs_share_one, &ms, B_FALSE);
|
||||
if (ms.ms_mntstatus != 0)
|
||||
ret = ms.ms_mntstatus;
|
||||
ret = EZFS_SHAREFAILED;
|
||||
else
|
||||
zfs_commit_shares(NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user