[users at i-scream] ZFS Cache on Solaris 10 and 11

Jens Rehsack rehsack at googlemail.com
Thu Sep 12 13:25:28 BST 2013


Am 12.09.2013 um 11:36 schrieb Guillermo Adrián Molina <guillermoadrianmolina at hotmail.com>:

> Hi, I want to contribute with this to solve the cache=0 issue in solaris 10 and 11
> Cheers

Well, we need to figure out how this can be extended to UFS and HSFS etc., too.
But it's a nice start.

Can you either attach a unified diff (avoids copy/paste whitespace errors) or better,
a "git format-patch" output or do a pull request on GitHub?

> in: src/libstatgrab/memory_stats.c
> 
> 84a85
>> # else
> 209,228d209
> <       if( (kc = kstat_open()) == NULL ) {
> <               RETURN_WITH_SET_ERROR("mem", SG_ERROR_KSTAT_OPEN, NULL);
> <       }
> < 
> <       if((ksp=kstat_lookup(kc, "zfs", 0, "arcstats")) == NULL) {
> <               RETURN_WITH_SET_ERROR("mem", SG_ERROR_KSTAT_LOOKUP, "zfs,0,arcstats");
> <       }
> < 
> <       if (kstat_read(kc, ksp, 0) == -1) {
> <               RETURN_WITH_SET_ERROR("mem", SG_ERROR_KSTAT_READ, NULL);
> <       }
> < 
> <       if((kn=kstat_data_lookup(ksp, "size")) == NULL) {
> <               RETURN_WITH_SET_ERROR("mem", SG_ERROR_KSTAT_DATA_LOOKUP, "size");
> <       }
> < 
> <       mem_stats_buf->cache = ((unsigned long long)kn->value.ui64);
> <       kstat_close(kc);
> < 
> <       mem_stats_buf->free += mem_stats_buf->cache;
> 229a211
>>      mem_stats_buf->cache = 0;


Cheers
-- 
Jens Rehsack
pkgsrc, Perl5
sno at NetBSD.org



Jens Rehsack
rehsack at gmail.com






More information about the users mailing list