On Feb 21, 2012, at 12:13 PM, Drew Fisher wrote: > I missed something Jesse said ... > > On 2/20/12 6:04 PM, Jesse Butler wrote: >> usr/src/lib/install_target/libdiskmgt/cfunc.py >> >> line 37 >> This could be dumb, but... I'm not seeing a dm_cache_update() in libdiskmgt? > > > dm_cache_update() is sort of in libdiskmgt right now. Currently, it's in > $SRC/lib/libdiskmgt/common/cache.c as cache_update() but in the mapfile-vers > file, it's not explicitly set as global. CR 7025431 was filed by the iSCSI > initiator team to get libdiskmgt to listen to sysevents for refreshing the > cache. The problem here is that cache refresh timer was lowered from 60 > seconds (!) to 5 seconds but there is nothing in the new code which I can > poll() for completion of the cache update. Since we have nothing to poll(), > I asked the RE to include cache_update in the mapfile-vers file so ctypes can > use it. He agreed and, to try to stay consistent with the existing naming > scheme, he renamed it to dm_cache_update(). Calling it from our code lets us > block for exactly as long as we need while we wait for the cache to update. > > -Drew >
Right, I worked most of this out and explained my POV in my subsequent comments. I see here that you're indicating libdiskmgt *will* refresh its cache on its own, which is good for half the problem. But, consumers need a flag to poll on which tells them if the cache is valid or not. I understand you may not be able to drive that work, so I'm not going to say that this shouldn't be integrated. But, telling a library to update its private cache because you can't determine if it's syncing or not is definitely not the best way to do this. /jb _______________________________________________ caiman-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

