Properly handle the cache locking when getting the segment size Currently there is no support for loading the same cache segment multiple times in the same process space.  Doing so will generate a segfault.  This most commonly occurs with symlinked files.  When doing actual I/O this aspect is handled in the lio_core_io.c routines by using a common file handle with individual file descriptors.  In other cases, for example lio_fsck, no I/O is performed, and one can get by with letting the common caching service be NULL. In order to accomodate lio_fsck to properly check the internal exnode segment size with that stored in the system.exnode.size attribute the ability to call segcache_size() was needed which uses the cache_*lock(s->c) routines but in this case s->c = NULL casuing a segfault.  A check of s->c was added to bypass the problem.
Properly handle the cache locking when getting the segment size
Currently there is no support for loading the same cache segment multiple times
in the same process space.  Doing so will generate a segfault.  This most commonly
occurs with symlinked files.  When doing actual I/O this aspect is handled in the lio_core_io.c
routines by using a common file handle with individual file descriptors.  In other cases, for
example lio_fsck, no I/O is performed, and one can get by with letting the common caching service be NULL.
In order to accomodate lio_fsck to properly check the internal exnode segment size with that stored in
the system.exnode.size attribute the ability to call segcache_size() was needed which uses the cache_*lock(s->c)
routines but in this case s->c = NULL casuing a segfault.  A check of s->c was added to bypass the problem.

PerilousApricot/lstore,PerilousApricot/lstore,tacketar/lstore,tacketar/lstore,accre/lstore,PerilousApricot/lstore,PerilousApricot/lstore,tacketar/lstore,accre/lstore,tacketar/lstore,accre/lstore,accre/lstore