Author: igalic
Date: Thu Sep 8 13:08:42 2011
New Revision: 1166670
URL: http://svn.apache.org/viewvc?rev=1166670&view=rev
Log:
Improve the error message for the cache.db setting in storage.config:
When set to a directory with no direct I/O we warn about that, rather
than printing strerror's "Invalid Argument"
Modified:
trafficserver/traffic/trunk/iocore/cache/Cache.cc
Modified: trafficserver/traffic/trunk/iocore/cache/Cache.cc
URL:
http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/Cache.cc?rev=1166670&r1=1166669&r2=1166670&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/Cache.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/Cache.cc Thu Sep 8 13:08:42 2011
@@ -584,8 +584,12 @@ CacheProcessor::start_internal(int flags
gdisks[gndisks]->open(path, blocks, skip, sector_size, fd, clear);
gndisks++;
}
- } else
- Warning("cache unable to open '%s': %s", path, strerror(errno));
+ } else {
+ if (errno == EINVAL)
+ Warning("cache unable to open '%s': It must be placed on a file system
that supports direct I/O.", path);
+ else
+ Warning("cache unable to open '%s': %s", path, strerror(errno));
+ }
}
if (gndisks == 0) {