Skip to content

[illumos-utils][zfs] Only set properties if they change#10666

Open
smklein wants to merge 3 commits into
mainfrom
zfs-setprop
Open

[illumos-utils][zfs] Only set properties if they change#10666
smklein wants to merge 3 commits into
mainfrom
zfs-setprop

Conversation

@smklein

@smklein smklein commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

ZFS, in certain circumstances, can allow write traffic to the filesystem permitting used > quota.

When this happens, a call to zfs set quota, with any value over used, will fail - even if the zfs set call is
merely trying to set the quota to the existing value.

To mitigate, this PR modifies our mechanism for setting ZFS properties: we supply existing properties, and only
try to zfs set values which have actually changed.

Fixes #10662

smklein added 2 commits June 23, 2026 15:40
…e as none

Addresses two issues in the skip-if-unchanged property reconciliation:

- set_values_if_changed previously fell back to setting all properties
  (including quota) when it could not read the current ones. That
  reintroduced the failure mode this change set out to fix (re-applying a
  quota when used has crept past it). A read failure or a dataset missing
  from the results now propagates instead.

- render_size now renders a zero quota/reservation as "none", matching how
  ZFS persists and reports it, so a desired zero converges against the
  persisted value instead of being re-set on every reconcile.
@smklein smklein requested a review from jgallagher June 24, 2026 00:59
@smklein smklein marked this pull request as ready for review June 24, 2026 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ZFS allows USED >= QUOTA, which breaks how we mount our datasets

2 participants