[LU-5750] lu_htable_order() overwrites module option lu_cache_nr Created: 16/Oct/14  Updated: 18/Oct/14

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Isaac Huang (Inactive) Assignee: Isaac Huang (Inactive)
Resolution: Unresolved Votes: 0
Labels: zfs

Severity: 3
Rank (Obsolete): 16146

 Description   

Module parameter lu_cache_nr is always overwritten by lu_htable_order(), so only the default can be used:

[isaac@oyster]% sudo modprobe obdclass lu_cache_nr=-1
[isaac@oyster]% cat /sys/module/obdclass/parameters/lu_cache_nr
-1
[isaac@oyster]% sudo mount -t lustre test/test /mnt/lustre
[isaac@oyster]% cat /sys/module/obdclass/parameters/lu_cache_nr
10240


 Comments   
Comment by Andreas Dilger [ 17/Oct/14 ]

Looks like this would be enough:

        if (strcmp(top->ld_type->ldt_name, LUSTRE_OSD_ZFS_NAME) == 0) {
                lu_cache_percent = 1;
                if (lu_cache_nr == LU_CACHE_NR_UNLIMITED)
                        lu_cache_nr = LU_CACHE_NR_ZFS_LIMIT;
                return LU_SITE_BITS_MIN;
        }
Comment by Isaac Huang (Inactive) [ 18/Oct/14 ]

It seemed that with the code above, if user sets lu_cache_nr=LU_CACHE_NR_UNLIMITED (e.g. to work around LU-5747), it'd still get overwritten as LU_CACHE_NR_ZFS_LIMIT.

Generated at Sat Feb 10 01:54:11 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.