Skip to content

Commit 6bcf750

Browse files
authored
Merge branch 'master' into patch-1
2 parents 67e5882 + 2e5e4bb commit 6bcf750

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ https://openzfs.github.io/openzfs-docs/Developer%20Resources/Buildbot%20Options.
2727
- [ ] New feature (non-breaking change which adds functionality)
2828
- [ ] Performance enhancement (non-breaking change which improves efficiency)
2929
- [ ] Code cleanup (non-breaking change which makes code smaller or more readable)
30+
- [ ] Quality assurance (non-breaking change which makes the code more robust against bugs)
3031
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
3132
- [ ] Library ABI change (libzfs, libzfs\_core, libnvpair, libuutil and libzfsbootenv)
3233
- [ ] Documentation (a change to man pages or other documentation)

cmd/arcstat.in

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -735,13 +735,14 @@ def calculate():
735735
v[group["percent"]] if v[group["percent"]] > 0 else 0
736736

737737
if l2exist:
738+
l2asize = cur["l2_asize"]
738739
v["l2hits"] = d["l2_hits"] / sint
739740
v["l2miss"] = d["l2_misses"] / sint
740741
v["l2read"] = v["l2hits"] + v["l2miss"]
741742
v["l2hit%"] = 100 * v["l2hits"] / v["l2read"] if v["l2read"] > 0 else 0
742743

743744
v["l2miss%"] = 100 - v["l2hit%"] if v["l2read"] > 0 else 0
744-
v["l2asize"] = cur["l2_asize"]
745+
v["l2asize"] = l2asize
745746
v["l2size"] = cur["l2_size"]
746747
v["l2bytes"] = d["l2_read_bytes"] / sint
747748
v["l2wbytes"] = d["l2_write_bytes"] / sint
@@ -751,11 +752,11 @@ def calculate():
751752
v["l2mru"] = cur["l2_mru_asize"]
752753
v["l2data"] = cur["l2_bufc_data_asize"]
753754
v["l2meta"] = cur["l2_bufc_metadata_asize"]
754-
v["l2pref%"] = 100 * v["l2pref"] / v["l2asize"]
755-
v["l2mfu%"] = 100 * v["l2mfu"] / v["l2asize"]
756-
v["l2mru%"] = 100 * v["l2mru"] / v["l2asize"]
757-
v["l2data%"] = 100 * v["l2data"] / v["l2asize"]
758-
v["l2meta%"] = 100 * v["l2meta"] / v["l2asize"]
755+
v["l2pref%"] = 100 * v["l2pref"] / l2asize if l2asize > 0 else 0
756+
v["l2mfu%"] = 100 * v["l2mfu"] / l2asize if l2asize > 0 else 0
757+
v["l2mru%"] = 100 * v["l2mru"] / l2asize if l2asize > 0 else 0
758+
v["l2data%"] = 100 * v["l2data"] / l2asize if l2asize > 0 else 0
759+
v["l2meta%"] = 100 * v["l2meta"] / l2asize if l2asize > 0 else 0
759760

760761
v["grow"] = 0 if cur["arc_no_grow"] else 1
761762
v["need"] = cur["arc_need_free"]

module/zfs/dmu_objset.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ dmu_objset_hold_flags(const char *name, boolean_t decrypt, const void *tag,
765765

766766
err = dmu_objset_from_ds(ds, osp);
767767
if (err != 0) {
768-
dsl_dataset_rele(ds, tag);
768+
dsl_dataset_rele_flags(ds, flags, tag);
769769
dsl_pool_rele(dp, tag);
770770
}
771771

0 commit comments

Comments
 (0)