Re: Disk Cache Patch
Steve Dobbelstein <[email protected]> Fri, 22 Jun 2007 18:15:06 -0500
| Newsgroups | gmane.linux.evms.devel |
|---|---|
| Message-ID | <OFC1F14933.45290DDA-ON05257302.007F7D06-05257302.007FB680@us.ibm.com> |
"Changju Gao" <[email protected]> wrote on 06/12/2007 12:57:54 PM: > Here is how the same address is used. > > In LD_discover(), a local variable "working_disk" is used > (repeatedly) to create new > objects from a list of devices. > > Then, get_geometry() is called, which in turn calls > get_partition_table_geometry(), > which calls LD_read(), which calls read_from_cache(). If no hit in > read_from_cache(), > write_to_cache() will be called (afer a successful write). > > So the cache entries are identified by the address of > "working_disk", which is the same > in consecutive calls inside LD_discover(). > > > According to the log file, here is the when entries are created: > > grep -n "Create a new cache entry for disk " evms-engine.2.log | head -3 > > 10216:Jun 05 16:30:42 lab104 _8_ LocalDskMgr: write_to_cache: Create > a new cache entry for disk cciss!c0d0, sector 0, count 1. > 14314:Jun 05 16:30:42 lab104 _8_ LocalDskMgr: write_to_cache: Create > a new cache entry for disk cciss/c0d0, sector 0, count 2. > 14378:Jun 05 16:30:42 lab104 _8_ LocalDskMgr: write_to_cache: Create > a new cache entry for disk cciss/c0d1, sector 0, count 2. > > When entries are hit: > > grep -n "read_from_cache: Read from cache." evms-engine.2.log | head -3 > > 10371:Jun 05 16:30:42 lab104 _8_ LocalDskMgr: read_from_cache: Read > from cache. disk cciss!c0d1, sector 0, count 1. > 10529:Jun 05 16:30:42 lab104 _8_ LocalDskMgr: read_from_cache: Read > from cache. disk cciss!c0d2, sector 0, count 1. > 10691:Jun 05 16:30:42 lab104 _8_ LocalDskMgr: read_from_cache: Read > from cache. disk cciss!c0d3, sector 0, count 1. > > > Even though the addresses are not printed in the log, you can > clearly see we hit > disk "cciss!c0d1" in the cache at line 10371. Disk "cciss!c0d1" was never put > in the cache. Even disk "cciss/c0d1" was put in AFTER the bogus hit. > > > Hope this clear things up. > > > Best regards, > > > - Changju Thanks for the explanation. And thanks again for the patch. I finally got around to checking the fix into CVS and posting the patch on the EVMS home page: http://evms.sourceforge.net/patches/2.5.5 /engine/disk_cache.patch Steve D. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Evms-devel mailing list [email protected] To subscribe/unsubscribe, please visit: https://lists.sourceforge.net/lists/listinfo/evms-devel