mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-01-14 17:22:05 +03:00
Linux: zfs_sync: remove explicit suspend check
Since zil_commit_flags(NOW) will always return error if the pool is suspended, there's no need for a separate suspend check here. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes #17398
This commit is contained in:
parent
ef4058fcdc
commit
90a1e13df2
@ -279,16 +279,11 @@ zfs_sync(struct super_block *sb, int wait, cred_t *cr)
|
||||
return (err);
|
||||
|
||||
/*
|
||||
* If the pool is suspended, just return an error. This is to help
|
||||
* with shutting down with pools suspended, as we don't want to block
|
||||
* in that case.
|
||||
* Sync any pending writes, but do not block if the pool is suspended.
|
||||
* This is to help with shutting down with pools suspended, as we don't
|
||||
* want to block in that case.
|
||||
*/
|
||||
if (spa_suspended(zfsvfs->z_os->os_spa)) {
|
||||
zfs_exit(zfsvfs, FTAG);
|
||||
return (SET_ERROR(EIO));
|
||||
}
|
||||
|
||||
err = zil_commit(zfsvfs->z_log, 0);
|
||||
err = zil_commit_flags(zfsvfs->z_log, 0, ZIL_COMMIT_NOW);
|
||||
zfs_exit(zfsvfs, FTAG);
|
||||
|
||||
return (err);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user