kowr / compcache

Automatically exported from code.google.com/p/compcache
0 stars 0 forks source link

--reset does not clear backing swap file name. #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. sudo ./load_modules.sh
2. sudo ./rzscontrol /dev/ramzswap0 --init -b /dev/sda5
3. sudo ./rzscontrol /dev/ramzswap0 --reset
4. sudo ./rzscontrol /dev/ramzswap0 --init
5. sudo ./rzscontrol /dev/ramzswap0 --stats

We then note that "rzscontrol --stats" reports that the backing swap device 
"/dev/sda5" is in use. I would expect that the device would not be in use 
as we have --reset the device and not specified the backing swap device on 
the next --init. If this is by design then at the very least, I would 
expect there to be a convenient and well documented way of telling 
compcache to stop using backing swap.

What version of the product are you using? On what operating system?

Compache 0.6 on Ubuntu 9.10 in a 32bit VM.

Please provide any additional information below.

As shown by the attached log, the following is not sufficient to prevent 
compcache from using backing swap.
sudo ./rzscontrol /dev/ramzswap0 --init -d 20000 -b ''

Original issue reported on code.google.com by gma...@gmail.com on 6 Nov 2009 at 6:08

Attachments:

GoogleCodeExporter commented 9 years ago
Nice catch. Actually, the backing swap file is indeed closed but the name 
string still 
contained the old value. Now we memset this string to 0 when device is reset.

Fixed in repository.

Thanks,
Nitin

Original comment by nitingupta910@gmail.com on 10 Nov 2009 at 4:12

GoogleCodeExporter commented 9 years ago

Original comment by nitingupta910@gmail.com on 10 Nov 2009 at 4:13