Skip to content

Commit

Permalink
Merge branch 'master' into Resolved
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Innes <andrew.c12@gmail.com>
  • Loading branch information
andrewc12 authored Jul 5, 2023
2 parents fe8822b + ca960ce commit 4512e79
Show file tree
Hide file tree
Showing 301 changed files with 13,622 additions and 8,020 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/scripts/setup-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function mod_install() {
fi

echo "::group::Install and load modules"
# delete kernel-shipped zfs modules, be sure about correct modules
# don't use kernel-shipped zfs modules
sudo sed -i.bak 's/updates/extra updates/' /etc/depmod.d/ubuntu.conf
sudo apt-get install --fix-missing ./*.deb

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/zfs-linux-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ jobs:
path: |
/var/tmp/zloop/*/
!/var/tmp/zloop/*/vdev/
retention-days: 14
if-no-files-found: ignore
- uses: actions/upload-artifact@v3
if: failure()
with:
name: Zpool-files-${{ inputs.os }}
path: |
/var/tmp/zloop/*/vdev/
retention-days: 14
if-no-files-found: ignore

sanity:
Expand Down
29 changes: 11 additions & 18 deletions .github/workflows/zfs-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,12 @@ jobs:
- name: Build modules
run: .github/workflows/scripts/setup-dependencies.sh build
- name: Prepare modules upload
run: tar czf modules-${{ matrix.os }}.tgz *.deb .github scripts/zfs-tests-color.sh tests/test-runner tests/ImageOS.txt
run: tar czf modules-${{ matrix.os }}.tgz *.deb .github tests/test-runner tests/ImageOS.txt
- uses: actions/upload-artifact@v3
with:
name: modules-${{ matrix.os }}
path: modules-${{ matrix.os }}.tgz
- name: Prepare scripts upload
run: tar czf scripts.tgz .github tests/test-runner
- uses: actions/upload-artifact@v3
with:
name: scripts
path: scripts.tgz
retention-days: 14

testings:
name: Testing
Expand All @@ -52,20 +47,18 @@ jobs:
- uses: actions/download-artifact@v3
- name: Generating summary
run: |
tar xzf scripts/scripts.tgz .github tests
tar xzf modules-22.04/modules-22.04.tgz .github tests
.github/workflows/scripts/generate-summary.sh
# up to 4 steps, each can have 1 MiB output (for debugging log files)
- run: .github/workflows/scripts/generate-summary.sh 1
- run: .github/workflows/scripts/generate-summary.sh 2
- run: .github/workflows/scripts/generate-summary.sh 3
- run: .github/workflows/scripts/generate-summary.sh 4
- name: Summary for errors #1
run: .github/workflows/scripts/generate-summary.sh 1
- name: Summary for errors #2
run: .github/workflows/scripts/generate-summary.sh 2
- name: Summary for errors #3
run: .github/workflows/scripts/generate-summary.sh 3
- name: Summary for errors #4
run: .github/workflows/scripts/generate-summary.sh 4
- uses: actions/upload-artifact@v3
with:
name: Summary Files
path: Summary/
- uses: geekyeggo/delete-artifact@v2
with:
name: modules-20.04
- uses: geekyeggo/delete-artifact@v2
with:
name: modules-22.04
4 changes: 2 additions & 2 deletions META
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Meta: 1
Name: zfs
Branch: 1.0
Version: 2.1.99
Version: 2.2.99
Release: 1
Release-Tags: relext
License: CDDL
Author: OpenZFS
Linux-Maximum: 6.1
Linux-Maximum: 6.3
Linux-Minimum: 3.10
64 changes: 11 additions & 53 deletions cmd/arc_summary
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ SECTION_HELP = 'print info from one section ('+' '.join(SECTIONS)+')'
SECTION_PATHS = {'arc': 'arcstats',
'dmu': 'dmu_tx',
'l2arc': 'arcstats', # L2ARC stuff lives in arcstats
'vdev': 'vdev_cache_stats',
'zfetch': 'zfetchstats',
'zil': 'zil'}

Expand All @@ -90,8 +89,6 @@ if sys.platform.startswith('freebsd'):
# Requires py36-sysctl on FreeBSD
import sysctl

VDEV_CACHE_SIZE = 'vdev.cache_size'

def is_value(ctl):
return ctl.type != sysctl.CTLTYPE_NODE

Expand Down Expand Up @@ -135,8 +132,6 @@ elif sys.platform.startswith('linux'):
SPL_PATH = '/sys/module/spl/parameters'
TUNABLES_PATH = '/sys/module/zfs/parameters'

VDEV_CACHE_SIZE = 'zfs_vdev_cache_size'

def load_kstats(section):
path = os.path.join(KSTAT_PATH, section)
with open(path) as f:
Expand Down Expand Up @@ -842,7 +837,8 @@ def section_l2arc(kstats_dict):
('Free on write:', 'l2_free_on_write'),
('R/W clashes:', 'l2_rw_clash'),
('Bad checksums:', 'l2_cksum_bad'),
('I/O errors:', 'l2_io_error'))
('Read errors:', 'l2_io_error'),
('Write errors:', 'l2_writes_error'))

for title, value in l2_todo:
prt_i1(title, f_hits(arc_stats[value]))
Expand Down Expand Up @@ -878,28 +874,20 @@ def section_l2arc(kstats_dict):
prt_i2('Miss ratio:',
f_perc(arc_stats['l2_misses'], l2_access_total),
f_hits(arc_stats['l2_misses']))
prt_i1('Feeds:', f_hits(arc_stats['l2_feeds']))

print()
print('L2ARC writes:')

if arc_stats['l2_writes_done'] != arc_stats['l2_writes_sent']:
prt_i2('Writes sent:', 'FAULTED', f_hits(arc_stats['l2_writes_sent']))
prt_i2('Done ratio:',
f_perc(arc_stats['l2_writes_done'],
arc_stats['l2_writes_sent']),
f_hits(arc_stats['l2_writes_done']))
prt_i2('Error ratio:',
f_perc(arc_stats['l2_writes_error'],
arc_stats['l2_writes_sent']),
f_hits(arc_stats['l2_writes_error']))
else:
prt_i2('Writes sent:', '100 %', f_hits(arc_stats['l2_writes_sent']))
print('L2ARC I/O:')
prt_i2('Reads:',
f_bytes(arc_stats['l2_read_bytes']),
f_hits(arc_stats['l2_hits']))
prt_i2('Writes:',
f_bytes(arc_stats['l2_write_bytes']),
f_hits(arc_stats['l2_writes_sent']))

print()
print('L2ARC evicts:')
prt_i1('Lock retries:', f_hits(arc_stats['l2_evict_lock_retry']))
prt_i1('Upon reading:', f_hits(arc_stats['l2_evict_reading']))
prt_i1('L1 cached:', f_hits(arc_stats['l2_evict_l1cached']))
prt_i1('While reading:', f_hits(arc_stats['l2_evict_reading']))
print()


Expand Down Expand Up @@ -959,35 +947,6 @@ def section_tunables(*_):
print()


def section_vdev(kstats_dict):
"""Collect information on VDEV caches"""

# Currently [Nov 2017] the VDEV cache is disabled, because it is actually
# harmful. When this is the case, we just skip the whole entry. See
# https://github.com/openzfs/zfs/blob/master/module/zfs/vdev_cache.c
# for details
tunables = get_vdev_params()

if tunables[VDEV_CACHE_SIZE] == '0':
print('VDEV cache disabled, skipping section\n')
return

vdev_stats = isolate_section('vdev_cache_stats', kstats_dict)

vdev_cache_total = int(vdev_stats['hits']) +\
int(vdev_stats['misses']) +\
int(vdev_stats['delegations'])

prt_1('VDEV cache summary:', f_hits(vdev_cache_total))
prt_i2('Hit ratio:', f_perc(vdev_stats['hits'], vdev_cache_total),
f_hits(vdev_stats['hits']))
prt_i2('Miss ratio:', f_perc(vdev_stats['misses'], vdev_cache_total),
f_hits(vdev_stats['misses']))
prt_i2('Delegations:', f_perc(vdev_stats['delegations'], vdev_cache_total),
f_hits(vdev_stats['delegations']))
print()


def section_zil(kstats_dict):
"""Collect information on the ZFS Intent Log. Some of the information
taken from https://github.com/openzfs/zfs/blob/master/include/sys/zil.h
Expand Down Expand Up @@ -1015,7 +974,6 @@ section_calls = {'arc': section_arc,
'l2arc': section_l2arc,
'spl': section_spl,
'tunables': section_tunables,
'vdev': section_vdev,
'zil': section_zil}


Expand Down
Loading

0 comments on commit 4512e79

Please sign in to comment.