diff options
author | SeongJae Park <sj38.park@gmail.com> | 2024-03-10 10:15:44 -0700 |
---|---|---|
committer | SeongJae Park <sj38.park@gmail.com> | 2024-03-10 10:15:44 -0700 |
commit | 91047ed8a7ec840473b3ffc44e49c1f6ea9740e0 (patch) | |
tree | 0f6f7887f778ce34ac3409ab0561faab36788005 | |
parent | 43f7ac14bc19677537ed7b80a8f1ac5535883603 (diff) | |
download | damo-91047ed8a7ec840473b3ffc44e49c1f6ea9740e0.tar.gz |
_damon_sysfs/infer_damon_version(): Restore original kdamonds before returning
Signed-off-by: SeongJae Park <sj38.park@gmail.com>
-rw-r--r-- | _damon_sysfs.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/_damon_sysfs.py b/_damon_sysfs.py index b6725eed..5e6757ec 100644 --- a/_damon_sysfs.py +++ b/_damon_sysfs.py @@ -734,24 +734,31 @@ def infer_damon_version(): if os.path.isfile(os.path.join(scheme_dir_of(0, 0, 0), 'quotas', 'effective_bytes')): + stage_kdamonds(orig_kdamonds) return '6.9' if os.path.isdir(os.path.join(scheme_dir_of(0, 0, 0), 'quotas', 'goals')): + stage_kdamonds(orig_kdamonds) return '6.8' if os.path.isfile(os.path.join(scheme_dir_of(0, 0, 0), 'apply_interval_us')): + stage_kdamonds(orig_kdamonds) return '6.7' if os.path.isfile(os.path.join(scheme_tried_regions_dir_of(0, 0, 0), 'total_bytes')): + stage_kdamonds(orig_kdamonds) return '6.6' if os.path.isdir(os.path.join(scheme_dir_of(0, 0, 0), 'filters')): + stage_kdamonds(orig_kdamonds) return '6.3' if os.path.isdir(scheme_tried_regions_dir_of(0, 0, 0)): + stage_kdamonds(orig_kdamonds) return '6.2' + stage_kdamonds(orig_kdamonds) return '<6.2' def update_supported_features(): |