You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by mt...@apache.org on 2010/05/13 09:09:56 UTC

svn commit: r943821 [2/18] - in /trafficserver/traffic/trunk: example/add-header/ example/app-template/ example/append-transform/ example/basic-auth/ example/blacklist-0/ example/blacklist-1/ example/bnull-transform/ example/cache_scan/ example/file-1/...

Modified: trafficserver/traffic/trunk/example/response-header-1/response-header-1.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/response-header-1/response-header-1.c?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/response-header-1/response-header-1.c (original)
+++ trafficserver/traffic/trunk/example/response-header-1/response-header-1.c Thu May 13 07:09:39 2010
@@ -21,8 +21,8 @@
   limitations under the License.
  */
 
-/* 
- * response-header-1.c:  
+/*
+ * response-header-1.c:
  *		an example program which illustrates adding and manipulating
  *		an HTTP response MIME header:
  *
@@ -33,16 +33,16 @@
  *
  *	add read_resp_header hook
  *	get http response header
- *	if 200, then 
+ *	if 200, then
  *		add mime extension header with count of zero
  *		add mime extension header with date response was received
  *		add "Cache-Control: public" header
- *	else if 304, then 
+ *	else if 304, then
  *		retrieve cached header
  *		get old value of mime header count
  *		increment mime header count
  *		store mime header with new count
- *	
+ *
  *
  *
  */
@@ -99,8 +99,8 @@ modify_header(INKHttpTxn txnp, INKCont c
     new_field_loc = INKMimeHdrFieldCreate(resp_bufp, resp_loc);
     INKDebug("resphdr", "Created new resp field with loc %d", new_field_loc);
 
-    /* copy name/values created at init 
-     * ( "x-num-served-from-cache" ) : ( "0"  )  
+    /* copy name/values created at init
+     * ( "x-num-served-from-cache" ) : ( "0"  )
      */
     INKMimeHdrFieldCopy(resp_bufp, resp_loc, new_field_loc, hdr_bufp, hdr_loc, field_loc);
 
@@ -117,7 +117,7 @@ modify_header(INKHttpTxn txnp, INKCont c
     INKMimeHdrFieldValueInsert(resp_bufp, resp_loc, new_field_loc,
                                INK_HTTP_VALUE_PUBLIC, strlen(INK_HTTP_VALUE_PUBLIC), -1);
 
-    /* 
+    /*
      * mimehdr2_name  = INKstrdup( "x-date-200-recvd" ) : CurrentDateTime
      */
     new_field_loc = INKMimeHdrFieldCreate(resp_bufp, resp_loc);
@@ -172,14 +172,14 @@ modify_header(INKHttpTxn txnp, INKCont c
      * Since INKMimeHdrFieldValueGet returned with valid values
      * are we also guaranteed that INKMimeHdrFieldValueGetUint returns
      * valid values? There is no erro code for INKMimeHdrFieldValueGetUint
-     * and 0 is a valid value. 
+     * and 0 is a valid value.
      */
     /* Get the cached MIME value for this name in this HTTP header */
     /*
-       num_refreshes = 
-       INKMimeHdrFieldValueGetUint(cached_bufp, cached_loc, 
+       num_refreshes =
+       INKMimeHdrFieldValueGetUint(cached_bufp, cached_loc,
        cached_field_loc, 0);
-       INKDebug("resphdr", 
+       INKDebug("resphdr",
        "Cached header shows %d refreshes so far", num_refreshes );
 
        num_refreshes++ ;
@@ -189,11 +189,11 @@ modify_header(INKHttpTxn txnp, INKCont c
        * in resp_bufp, resp_loc
        *
        * Create a new MIME field/value. Cached value has been incremented.
-       * Insert new MIME field/value into the server response buffer, 
+       * Insert new MIME field/value into the server response buffer,
        * allow HTTP processing to continue. This will update
-       * (indirectly invalidates) the cached HTTP headers MIME field. 
+       * (indirectly invalidates) the cached HTTP headers MIME field.
        * It is apparently not necessary to update all of the MIME fields
-       * in the in-process response in order to have the cached response 
+       * in the in-process response in order to have the cached response
        * become invalid.
      */
     new_field_loc = INKMimeHdrFieldCreate(resp_bufp, resp_loc);
@@ -309,8 +309,8 @@ INKPluginInit(int argc, const char *argv
   mimehdr1_name = INKstrdup("x-num-served-from-cache");
   mimehdr1_value = INKstrdup("0");
 
-  /* Create name here and set DateTime value when o.s. 
-   * response 200 is recieved 
+  /* Create name here and set DateTime value when o.s.
+   * response 200 is recieved
    */
   mimehdr2_name = INKstrdup("x-date-200-recvd");
 
@@ -328,7 +328,7 @@ INKPluginInit(int argc, const char *argv
 
   /*
    *  The following code demonstrates how to extract the field_loc from the header.
-   *  In this plugin, the init buffer and thus field_loc never changes.  Code 
+   *  In this plugin, the init buffer and thus field_loc never changes.  Code
    *  similar to this may be used to extract header fields from any buffer.
    */
 

Modified: trafficserver/traffic/trunk/example/server-transform/server-transform.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/server-transform/server-transform.c?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/server-transform/server-transform.c (original)
+++ trafficserver/traffic/trunk/example/server-transform/server-transform.c Thu May 13 07:09:39 2010
@@ -21,13 +21,13 @@
   limitations under the License.
  */
 
-/* server-transform.c:  an example program that sends response content 
- *                      to a server to be transformed, and sends the 
- *                      transformed content to the client 
+/* server-transform.c:  an example program that sends response content
+ *                      to a server to be transformed, and sends the
+ *                      transformed content to the client
  *
  *
- *	Usage:	
- *	(NT): ServerTransform.dll 
+ *	Usage:
+ *	(NT): ServerTransform.dll
  *	(Solaris): server-transform.so
  *
  *
@@ -718,10 +718,10 @@ cache_response_ok(INKHttpTxn txnp)
 {
   /* Is the response we're reading from cache OK for
    * transformation. This is a good place to check the cached
-   * response to see if it is transformable. The default 
+   * response to see if it is transformable. The default
    * behavior is to cache transformed content; therefore
    * to avoid transforming twice we will not transform
-   * content served from the cache. 
+   * content served from the cache.
    */
   return 0;
 }
@@ -732,7 +732,7 @@ server_response_ok(INKHttpTxn txnp)
   /* Is the response the server sent OK for transformation. This is
    * a good place to check the server's response to see if it is
    * transformable. In this example, we will transform only "200 OK"
-   * responses.  
+   * responses.
    */
 
   INKMBuffer bufp;

Modified: trafficserver/traffic/trunk/example/session-1/session-1.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/session-1/session-1.c?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/session-1/session-1.c (original)
+++ trafficserver/traffic/trunk/example/session-1/session-1.c Thu May 13 07:09:39 2010
@@ -24,7 +24,7 @@
 /* session-1.c: a plugin that illustrates how to use
  *                session hooks
  *
- * 
+ *
  *  Usage: session-1.so
  *
  */

Modified: trafficserver/traffic/trunk/example/thread-1/thread-1.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/thread-1/thread-1.c?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/thread-1/thread-1.c (original)
+++ trafficserver/traffic/trunk/example/thread-1/thread-1.c Thu May 13 07:09:39 2010
@@ -21,12 +21,12 @@
   limitations under the License.
  */
 
-/* thread-1.c:  an example program that creates a thread 
- *                   
+/* thread-1.c:  an example program that creates a thread
  *
  *
- *	Usage:	
- *	(NT): Thread.dll 
+ *
+ *	Usage:
+ *	(NT): Thread.dll
  *	(Solaris): thread-1.so
  *
  *

Modified: trafficserver/traffic/trunk/example/thread-pool/psi.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/thread-pool/psi.c?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/thread-pool/psi.c (original)
+++ trafficserver/traffic/trunk/example/thread-pool/psi.c Thu May 13 07:09:39 2010
@@ -21,11 +21,11 @@
   limitations under the License.
  */
 
-/* 
- *                   
+/*
  *
  *
- *	Usage:	
+ *
+ *	Usage:
  * 	(NT): psi.dll
  *	(Solaris): psi.so
  *
@@ -39,7 +39,7 @@
  *  The plugin illustrates how to use a pool of threads in order to do blocking
  *  calls (here, some disk i/o) in a Traffic Server plugin.
  *
- *  
+ *
  *   Details:
  *
  *  Refer to README file.
@@ -138,7 +138,7 @@ static int trylock_handler(INKCont contp
   Allocate and initialize a ContData structure associated to a transaction
 
   Input:
-  Output:  
+  Output:
   Return Value:
     Pointer on a new allocated ContData structure
   -------------------------------------------------------------------------*/

Modified: trafficserver/traffic/trunk/example/thread-pool/test/SDKTest/psi_server.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/example/thread-pool/test/SDKTest/psi_server.c?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/example/thread-pool/test/SDKTest/psi_server.c (original)
+++ trafficserver/traffic/trunk/example/thread-pool/test/SDKTest/psi_server.c Thu May 13 07:09:39 2010
@@ -21,9 +21,9 @@
   limitations under the License.
  */
 
-/* SimSynthServerCache.c 
+/* SimSynthServerCache.c
+ *
  *
- * 
  * Description:
  *   Simulate server response that contains:
  *      - PSI header
@@ -31,7 +31,7 @@
  *
  *   Ratio for generating PSI response is specifid in config file.
  *
- * Added Options in Synth_server.config -    
+ * Added Options in Synth_server.config -
  *     psi_ratio : percentage of response with psi embedded we want to generate
  */
 
@@ -186,7 +186,7 @@ INKResponsePut(void **resp_id /* return 
 
     }
   }
-  /* return NULL as the resp_id to indicate 
+  /* return NULL as the resp_id to indicate
    * if it is the last INKResponsePut call */
   if (rid->bytes_not_sent <= 0 || rid->status_code != 200) {
     free(rid);

Modified: trafficserver/traffic/trunk/iocore/aio/AIO.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/aio/AIO.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/aio/AIO.cc (original)
+++ trafficserver/traffic/trunk/iocore/aio/AIO.cc Thu May 13 07:09:39 2010
@@ -67,7 +67,7 @@ aio_stats_cb(const char *name, RecDataT 
   // The RecGetGlobalXXX stat functions are cheaper than the
   // RecGetXXX functions. The Global ones are expensive
   // for increments and decrements. But for AIO stats we
-  // only do Sets and Gets, so they are cheaper in our case. 
+  // only do Sets and Gets, so they are cheaper in our case.
   RecGetGlobalRawStatSum(aio_rsb, id, &sum);
   RecGetGlobalRawStatCount(aio_rsb, id, &count);
 
@@ -193,13 +193,13 @@ struct AIOThreadInfo:public Continuation
 
 /* priority scheduling */
 /* Have 2 queues per file descriptor - A queue for http requests and another
-   for non-http (streaming) request. Each file descriptor has a lock 
-   and condition variable associated with it. A dedicated number of threads 
-   (THREADS_PER_DISK) wait on the condition variable associated with the 
-   file descriptor. The cache threads try to put the request in the 
-   appropriate queue. If they fail to acquire the lock, they put the 
-   request in the atomic list. Requests are served in the order of 
-   highest priority first. If both the queues are empty, the aio threads 
+   for non-http (streaming) request. Each file descriptor has a lock
+   and condition variable associated with it. A dedicated number of threads
+   (THREADS_PER_DISK) wait on the condition variable associated with the
+   file descriptor. The cache threads try to put the request in the
+   appropriate queue. If they fail to acquire the lock, they put the
+   request in the atomic list. Requests are served in the order of
+   highest priority first. If both the queues are empty, the aio threads
    check if there is any request on the other disks */
 
 
@@ -247,7 +247,7 @@ aio_insert(AIOCallback *op, AIO_Reqs *re
   num_requests++;
   req->queued++;
 #endif
-  if (op->aiocb.aio_reqprio == AIO_LOWEST_PRIORITY)     // http request 
+  if (op->aiocb.aio_reqprio == AIO_LOWEST_PRIORITY)     // http request
   {
     AIOCallback *cb = (AIOCallback *) req->http_aio_todo.tail;
     if (!cb)
@@ -320,9 +320,9 @@ aio_queue_req(AIOCallbackInternal *op)
         /* insert a new entry */
         req = aio_init_fildes(op->aiocb.aio_fildes);
       } else {
-        /* a new entry was inserted between the time we checked the 
-           aio_reqs and acquired the mutex. check the aio_reqs array to 
-           make sure the entry inserted does not correspond  to the current 
+        /* a new entry was inserted between the time we checked the
+           aio_reqs and acquired the mutex. check the aio_reqs array to
+           make sure the entry inserted does not correspond  to the current
            file descriptor */
         for (thread_ndx = 0; thread_ndx < num_filedes; thread_ndx++) {
           if (aio_reqs[thread_ndx]->filedes == op->aiocb.aio_fildes) {

Modified: trafficserver/traffic/trunk/iocore/aio/I_AIO.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/aio/I_AIO.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/aio/I_AIO.h (original)
+++ trafficserver/traffic/trunk/iocore/aio/I_AIO.h Thu May 13 07:09:39 2010
@@ -25,8 +25,8 @@
 
   Async Disk IO operations.
 
-  
-  
+
+
  ****************************************************************************/
 #if !defined (_I_AIO_h_)
 #define _I_AIO_h_

Modified: trafficserver/traffic/trunk/iocore/aio/NTAIO.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/aio/NTAIO.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/aio/NTAIO.cc (original)
+++ trafficserver/traffic/trunk/iocore/aio/NTAIO.cc Thu May 13 07:09:39 2010
@@ -25,7 +25,7 @@
 
   NTAIO.cc
 
-  
+
  ****************************************************************************/
 #if !defined (_WIN_9xMe)
 

Modified: trafficserver/traffic/trunk/iocore/aio/P_AIO.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/aio/P_AIO.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/aio/P_AIO.h (original)
+++ trafficserver/traffic/trunk/iocore/aio/P_AIO.h Thu May 13 07:09:39 2010
@@ -25,8 +25,8 @@
 
   Async Disk IO operations.
 
-  
-  
+
+
  ****************************************************************************/
 #ifndef _P_AIO_h_
 #define _P_AIO_h_

Modified: trafficserver/traffic/trunk/iocore/block-cache/BC_OpenSegment.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/block-cache/BC_OpenSegment.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/block-cache/BC_OpenSegment.cc (original)
+++ trafficserver/traffic/trunk/iocore/block-cache/BC_OpenSegment.cc Thu May 13 07:09:39 2010
@@ -69,7 +69,7 @@ private:
     Queue<BlockCacheSegmentVConnection> m_readers;   // who is reading
   /**
      who is writing.  XXX: This implicitly assumes only one writer.  I
-     think this assumption is reasonable. 
+     think this assumption is reasonable.
   */
   BlockCacheSegmentVConnection *m_writer;
 };

Modified: trafficserver/traffic/trunk/iocore/block-cache/I_BlockCacheSegmentVConnection.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/block-cache/I_BlockCacheSegmentVConnection.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/block-cache/I_BlockCacheSegmentVConnection.h (original)
+++ trafficserver/traffic/trunk/iocore/block-cache/I_BlockCacheSegmentVConnection.h Thu May 13 07:09:39 2010
@@ -39,12 +39,12 @@
     - pinning
     - extra metadata
     - how should partitioning be specified?
-  
+
   For testability, these can be created and activated without external
   structures, e.g. I_BlockCacheVConnection, BC_OpenDir,
   BC_OpenSegment.  If the external structures aren't supplied then
   default behavior is performed instead.
-  
+
  */
 
 class BlockCacheSegmentVConnection:public VConnection
@@ -68,7 +68,7 @@ public:
 
     @param seg BC_OpenSegment to associate with.
     @param type which type of access
-    
+
   */
 
   virtual void setBCOpenSegment(BC_OpenSegment * seg, AccessType type);
@@ -82,7 +82,7 @@ public:
     about pending do_io_writes?</i></b> Writes are not serviced until
     after the sync.  It only is valid to call this after a successful
     do_io_close().
-    
+
     @param c Caller
     @return Action* Canceling this cancels the callback, but sync
     will still occur.
@@ -142,7 +142,7 @@ public:
   and there is an active reader, then this call fails and the
   BlockCacheVConnection lives. Otherwise, it succeeds and
   BlockCacheVConnection is closed and data thrown away on disk.
-  
+
   This is similar to do_io_close with error (i.e. abort), but we don't
   allow VC to die if readers are still active.  So, caller should only
   call this if they are prepared to stay alive until the object is
@@ -174,7 +174,7 @@ private:
   This should really be in a separate header file.  The individual
   definitions will actually be spread across multiple files, not just
   the BlockCacheSegmentVConnection.cc file.
-  
+
   */
 struct BlockCacheSegmentVConnection_util
 {

Modified: trafficserver/traffic/trunk/iocore/block-cache/I_BlockCacheVConnection.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/block-cache/I_BlockCacheVConnection.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/block-cache/I_BlockCacheVConnection.h (original)
+++ trafficserver/traffic/trunk/iocore/block-cache/I_BlockCacheVConnection.h Thu May 13 07:09:39 2010
@@ -80,7 +80,7 @@ public:
       BlockCacheKey_util::new_from_segmentid).
     @param len how much data will be written (estimated).
     @return cancels the callback.
-  
+
   */
 
   Action *open_unabortable_write_segment(Continuation * c, BlockCacheKey * key, int len) = 0;
@@ -101,7 +101,7 @@ public:
     @param key of segment to write (this should been created with
       BlockCacheKey_util::new_from_segmentid).
     @return cancels the callback.
-  
+
   */
 
   Action *open_read_segment(Continuation * c, BlockCacheKey * key) = 0;

Modified: trafficserver/traffic/trunk/iocore/block-cache/P_AtomicDisk.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/block-cache/P_AtomicDisk.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/block-cache/P_AtomicDisk.h (original)
+++ trafficserver/traffic/trunk/iocore/block-cache/P_AtomicDisk.h Thu May 13 07:09:39 2010
@@ -35,7 +35,7 @@ class MIOBuffer;
 
  handle large writes to disk so that they appear to complete
  atomically, but use AIO to do it.
- 
+
  Like other processors, this doesn't have a lock or dedicated thread
  of its own.  It uses the caller's Continuation's lock and thread for
  activity.
@@ -52,7 +52,7 @@ public:
   void init();
   /**
      write IOBufferBlock chain to disk starting at offset.
-      
+
      data is written out with header and footer blocked into 512 byte
      regions.
      <pre>
@@ -86,7 +86,7 @@ public:
   Action *startRead(Continuation * c, int offset, char *buf);
   /**
      return how much data in disk region.  This region may or may not
-     actually be valid (i.e. completely written correctly) 
+     actually be valid (i.e. completely written correctly)
      @param descriptor
    */
   int length(void *descriptor);
@@ -95,10 +95,10 @@ public:
 
      successful if all data was written down,
      failure if any of header sequence #s mismatch.
-     
+
      Callback c when complete with success or failure.  Cancel Action
      to avoid callback.
-     
+
      @return Action* Cancellable
      @param c Continuation to be called back when complete.
      @param descriptor descriptor returned by startRead

Modified: trafficserver/traffic/trunk/iocore/block-cache/P_BC_OpenDir.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/block-cache/P_BC_OpenDir.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/block-cache/P_BC_OpenDir.h (original)
+++ trafficserver/traffic/trunk/iocore/block-cache/P_BC_OpenDir.h Thu May 13 07:09:39 2010
@@ -60,7 +60,7 @@ public:
 
     When considering each operation (AccessType), we have to consider
     the following situations:
-  
+
     <ul>
     <li> A. no BC_OpenSegment, no Dir entry exists.
     <li> B. no BC_OpenSegment, a Dir entry exists (because of hash
@@ -124,7 +124,7 @@ public:
     @param key desired BlockCacheKey of new or existing entry
     @param access_type mode of access to the data.
     @return BC_OpenSegment* newly created or existing BC_OpenSegment
-    
+
     */
   BC_OpenSegment *lookupOrCreateOpenSegment(BlockCacheKey * key, AccessType access_type);
 

Modified: trafficserver/traffic/trunk/iocore/block-cache/P_BC_OpenDirTable.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/block-cache/P_BC_OpenDirTable.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/block-cache/P_BC_OpenDirTable.h (original)
+++ trafficserver/traffic/trunk/iocore/block-cache/P_BC_OpenDirTable.h Thu May 13 07:09:39 2010
@@ -41,16 +41,16 @@ public:
   virtual ~ BC_OpenDirTable();
   /**
     Return BC_OpenDir entry for key.
-    
+
     if found in table, then return it.
 
     if found, but in process of being removed, or if not found in
     table, then create new BC_OpenDir for key, insert into table and
     return it.
-    
+
     @param key desired BlockCacheKey of new or existing entry
     @return newly created or existing BC_OpenDir
-    
+
     */
   BC_OpenDir *lookupOrCreateOpenDir(BlockCacheKey * key);
 private:

Modified: trafficserver/traffic/trunk/iocore/block-cache/P_BC_OpenSegment.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/block-cache/P_BC_OpenSegment.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/block-cache/P_BC_OpenSegment.h (original)
+++ trafficserver/traffic/trunk/iocore/block-cache/P_BC_OpenSegment.h Thu May 13 07:09:39 2010
@@ -120,32 +120,32 @@ public:
     @param c caller
     @return Action* Cancelling this cancels the callback, but doesn't
     cancel the remove.
-    
+
     */
   Action *remove(Continuation * c);
 
   /**
     Wait for directory log to write out.
-    
+
     @param c caller
     @return Action* Cancelling this cancels the callback, but doesn't
     cancel the syncing of directory and log to disk.
-    
+
     */
   Action *sync(Continuation * c);
 
   /**
    register BlockVConnection as writer
-   
-   @param vc 
+
+   @param vc
 
   */
   void registerWriter(BlockCacheSegmentVConnection * vc);
 
   /**
    register BlockVConnection as reader
-   
-   @param vc 
+
+   @param vc
 
   */
   void registerReader(BlockCacheSegmentVConnection * vc);

Modified: trafficserver/traffic/trunk/iocore/block-cache/P_BlockCacheDir.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/block-cache/P_BlockCacheDir.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/block-cache/P_BlockCacheDir.h (original)
+++ trafficserver/traffic/trunk/iocore/block-cache/P_BlockCacheDir.h Thu May 13 07:09:39 2010
@@ -27,9 +27,9 @@
 
 /**
   Single on disk Directory entry.
-  
-  possible sizes: 2^12 * size = 4kb, 8kb, ... 
-  
+
+  possible sizes: 2^12 * size = 4kb, 8kb, ...
+
 */
 struct BlockCacheDir
 {
@@ -110,13 +110,13 @@ struct Doc
   write, a portion of the directory is synced to disk.  The write
   occurs when the log fills up or when a timer expires.  The sizing of
   dir and log portions can be adjusted.
-  
+
   We will pack directories close together in memory and not keep more
   than a few KB of log in memory.  The syncing process requires doing
   two AIOs -- the header & log, the directories and the footer. With
   coordination among the other disk threads, this could be forced to
   be done without seeks.
-  
+
   Dir+Log area on disk:
   PartitionedDirLog0 PartitionedDirDir0 PartitionedDirLog1 PartitionedDirDir1 ...
 
@@ -246,7 +246,7 @@ public:
   /**
     Insert BlockCacheDir entry, suitably logging and updating in-core
     directory.
-    
+
     @param dirPart - which partition of partitioned directory to look at
     @param bucket - which entry in partitioned directory to look in
     @param key

Modified: trafficserver/traffic/trunk/iocore/block-cache/P_BlockCacheKey.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/block-cache/P_BlockCacheKey.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/block-cache/P_BlockCacheKey.h (original)
+++ trafficserver/traffic/trunk/iocore/block-cache/P_BlockCacheKey.h Thu May 13 07:09:39 2010
@@ -28,7 +28,7 @@
 class INK_MD5;
 /**
    This is intended to be used by cache internals only.  External
-   callers should use BlockCacheKey_util to create keys. 
+   callers should use BlockCacheKey_util to create keys.
 */
 
 class BlockCacheKey

Modified: trafficserver/traffic/trunk/iocore/block-cache/P_HotWrite.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/block-cache/P_HotWrite.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/block-cache/P_HotWrite.h (original)
+++ trafficserver/traffic/trunk/iocore/block-cache/P_HotWrite.h Thu May 13 07:09:39 2010
@@ -45,7 +45,7 @@
   @code
   HotWrite hw(new_ProxyMutex());
   @endcode
-   
+
   Example usage in edge connection (writer or reader):
 
   @code

Modified: trafficserver/traffic/trunk/iocore/block-cache/P_log.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/block-cache/P_log.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/block-cache/P_log.h (original)
+++ trafficserver/traffic/trunk/iocore/block-cache/P_log.h Thu May 13 07:09:39 2010
@@ -122,7 +122,7 @@ class Continuation;
 
    Currently, the documentation is exposed, but it is intended that
    <strong><em>only</em></strong> implementors of block cache make use
-   of these calls. 
+   of these calls.
 
  */
 

Modified: trafficserver/traffic/trunk/iocore/block-cache/alloc2.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/block-cache/alloc2.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/block-cache/alloc2.cc (original)
+++ trafficserver/traffic/trunk/iocore/block-cache/alloc2.cc Thu May 13 07:09:39 2010
@@ -50,7 +50,7 @@
  * non-pinned region.  Maybe this suggests partitioning pinned and
  * non-pinned documents into different regions.  For greater fraction
  * of pinned space, fragmentation increases faster.
- 
+
  * for both 5% pinned or 75% pinned, top level RLE map is on the order
  * of 4 entries, so probably not expensive to maintain.  */
 
@@ -788,7 +788,7 @@ extern void dumpAllocState();
 /**
  Allocate contiguous blocks.  Returns offset and actual length, up to
  length blocks.
- 
+
  @return none
  @param length requested length of contiguous region
  @param offset starting offset of region which has been allocated.

Modified: trafficserver/traffic/trunk/iocore/cache/Cache.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/Cache.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/Cache.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/Cache.cc Thu May 13 07:09:39 2010
@@ -117,7 +117,7 @@ struct PartInitInfo
     if ((part_h_f = (char *) valloc(4 * INK_BLOCK_SIZE)) != NULL)
       memset(part_h_f, 0, 4 * INK_BLOCK_SIZE);
   }
-  ~PartInitInfo() 
+  ~PartInitInfo()
   {
     for (int i = 0; i < 4; i++) {
       part_aio[i].action = NULL;
@@ -518,7 +518,7 @@ CacheProcessor::start_internal(int flags
           Warning("unable to truncate cache file '%s' to %d blocks", path, blocks);
           diskok = 0;
 #if defined(_WIN32)
-          /* We can do a specific check for FAT32 systems on NT, 
+          /* We can do a specific check for FAT32 systems on NT,
            * to print a specific warning */
           if ((((inku64) blocks) * STORE_BLOCK_SIZE) > (1 << 32)) {
             Warning("If you are using a FAT32 file system, please ensure that cachesize"
@@ -561,7 +561,7 @@ CacheProcessor::diskInitialized()
     }
 
     if (bad_disks != 0) {
-      // create a new array 
+      // create a new array
       CacheDisk **p_good_disks;
       if ((gndisks - bad_disks) > 0)
         p_good_disks = (CacheDisk **) xmalloc((gndisks - bad_disks) * sizeof(CacheDisk *));
@@ -583,13 +583,13 @@ CacheProcessor::diskInitialized()
       gndisks = gndisks - bad_disks;
     }
 
-    /* create the cachepart list only if num partitions are greater 
+    /* create the cachepart list only if num partitions are greater
        than 0. */
     if (config_partitions.num_partitions == 0) {
       res = cplist_reconfigure();
       /* if no partitions, default to just an http cache */
     } else {
-      // else 
+      // else
       /* create the cachepart list. */
       cplist_init();
       /* now change the cachepart list based on the config file */
@@ -717,7 +717,7 @@ CacheProcessor::cacheInitialized()
     if (gnpart) {
       for (i = 0; i < gnpart; i++) {
         switch (cache_config_ram_cache_algorithm) {
-          default: 
+          default:
           case RAM_CACHE_ALGORITHM_CLFUS:
             gpart[i]->ram_cache = new_RamCacheCLFUS();
             break;
@@ -735,7 +735,7 @@ CacheProcessor::cacheInitialized()
           Debug("cache_init", "CacheProcessor::cacheInitialized - ram_cache_bytes = %lld = %lldMb",
                 ram_cache_bytes, ram_cache_bytes / (1024 * 1024));
           /*
-             CACHE_PART_SUM_DYN_STAT(cache_ram_cache_bytes_total_stat, 
+             CACHE_PART_SUM_DYN_STAT(cache_ram_cache_bytes_total_stat,
              (ink64)part_dirlen(gpart[i]));
            */
           RecSetGlobalRawStatSum(part->cache_part->part_rsb,
@@ -994,10 +994,10 @@ Part::init(char *s, ink_off_t blocks, in
 #if !defined (_WIN32)
   raw_dir = (char *) valloc(part_dirlen(this));
 #else
-  /* the directory should be page aligned for raw disk transfers. 
+  /* the directory should be page aligned for raw disk transfers.
      WIN32 does not support valloc
-     or memalign, so we need to allocate extra space and then align the 
-     pointer ourselves. 
+     or memalign, so we need to allocate extra space and then align the
+     pointer ourselves.
      Don't need to keep track of the pointer to the original memory since
      we never free this */
   size_t alignment = getpagesize();
@@ -1097,37 +1097,37 @@ Part::handle_dir_read(int event, void *d
   return handle_recover_from_data(EVENT_IMMEDIATE, 0);
 }
 
-/* 
-   Philosophy:  The idea is to find the region of disk that could be 
+/*
+   Philosophy:  The idea is to find the region of disk that could be
    inconsistent and remove all directory entries pointing to that potentially
-   inconsistent region. 
-   Start from a consistent position (the write_pos of the last directory 
+   inconsistent region.
+   Start from a consistent position (the write_pos of the last directory
    synced to disk) and scan forward. Two invariants for docs that were
    written to the disk after the directory was synced:
- 
-   1. doc->magic == DOC_MAGIC 
 
-   The following two cases happen only when the previous generation 
-   documents are aligned with the current ones. 
+   1. doc->magic == DOC_MAGIC
+
+   The following two cases happen only when the previous generation
+   documents are aligned with the current ones.
 
    2. All the docs written to the disk
    after the directory was synced will have their sync_serial <=
-   header->sync_serial + 1,  because the write aggregation can take 
-   indeterminate amount of time to sync. The doc->sync_serial can be 
+   header->sync_serial + 1,  because the write aggregation can take
+   indeterminate amount of time to sync. The doc->sync_serial can be
    equal to header->sync_serial + 1, because we increment the sync_serial
    before we sync the directory to disk.
 
-   3. The doc->sync_serial will always increase. If doc->sync_serial 
+   3. The doc->sync_serial will always increase. If doc->sync_serial
    decreases, the document was written in the previous phase
-   
-   If either of these conditions fail and we are not too close to the end 
+
+   If either of these conditions fail and we are not too close to the end
    (see the next comment ) then we're done
 
    We actually start from header->last_write_pos instead of header->write_pos
    to make sure that we haven't wrapped around the whole disk without
    syncing the directory.  Since the sync serial is 60 seconds, it is
    entirely possible to write through the whole cache without
-   once syncing the directory. In this case, we need to clear the 
+   once syncing the directory. In this case, we need to clear the
    cache.The documents written right before we synced the
    directory to disk should have the write_serial <= header->sync_serial.
 
@@ -1225,28 +1225,28 @@ Part::handle_recover_from_data(int event
           if (doc->sync_serial > header->sync_serial)
             max_sync_serial = doc->sync_serial;
 
-          /* 
+          /*
              doc->magic == DOC_MAGIC, but doc->sync_serial != last_sync_serial
-             This might happen in the following situations 
-             1. We are starting off recovery. In this case the 
+             This might happen in the following situations
+             1. We are starting off recovery. In this case the
              last_sync_serial == header->sync_serial, but the doc->sync_serial
              can be anywhere in the range (0, header->sync_serial + 1]
              If this is the case, update last_sync_serial and continue;
 
-             2. A dir sync started between writing documents to the 
-             aggregation buffer and hence the doc->sync_serial went up. 
+             2. A dir sync started between writing documents to the
+             aggregation buffer and hence the doc->sync_serial went up.
              If the doc->sync_serial is greater than the last
-             sync serial and less than (header->sync_serial + 2) then 
+             sync serial and less than (header->sync_serial + 2) then
              continue;
 
              3. If the position we are recovering from is within AGG_SIZE
-             from the disk end, then we can't trust this document. The 
+             from the disk end, then we can't trust this document. The
              aggregation buffer might have been larger than the remaining space
-             at the end and we decided to wrap around instead of writing 
+             at the end and we decided to wrap around instead of writing
              anything at that point. In this case, wrap around and start
-             from the beginning. 
+             from the beginning.
 
-             If neither of these 3 cases happen, then we are indeed done. 
+             If neither of these 3 cases happen, then we are indeed done.
 
            */
 
@@ -1257,9 +1257,9 @@ Part::handle_recover_from_data(int event
             s += round_to_approx_size(doc->len);
             continue;
           }
-          // case 3 - we have already recoverd some data and  
+          // case 3 - we have already recoverd some data and
           // (doc->sync_serial < last_sync_serial) ||
-          // (doc->sync_serial > header->sync_serial + 1). 
+          // (doc->sync_serial > header->sync_serial + 1).
           // if we are too close to the end, wrap around
           else if (recover_pos - (e - s) > (skip + len) - AGG_SIZE) {
             recover_wrapped = 1;
@@ -1274,7 +1274,7 @@ Part::handle_recover_from_data(int event
         } else {
           // doc->magic != DOC_MAGIC
           // If we are in the danger zone - recover_pos is within AGG_SIZE
-          // from the end, then wrap around 
+          // from the end, then wrap around
           recover_pos -= e - s;
           if (recover_pos > (skip + len) - AGG_SIZE) {
             recover_wrapped = 1;
@@ -1293,10 +1293,10 @@ Part::handle_recover_from_data(int event
       s += round_to_approx_size(doc->len);
     }
 
-    /* if (s > e) then we gone through RECOVERY_SIZE; we need to 
+    /* if (s > e) then we gone through RECOVERY_SIZE; we need to
        read more data off disk and continue recovering */
     if (s >= e) {
-      /* In the last iteration, we increment s by doc->len...need to undo 
+      /* In the last iteration, we increment s by doc->len...need to undo
          that change */
       if (s > e)
         s -= round_to_approx_size(doc->len);
@@ -1510,7 +1510,7 @@ build_part_hash_table(CacheHostRecord *c
   num_parts -= bad_parts;
 
   if (!num_parts) {
-    // all the disks are corrupt, 
+    // all the disks are corrupt,
     if (cp->part_hash_table) {
       new_Freer(cp->part_hash_table, CACHE_MEM_FREE_TIMEOUT);
     }
@@ -1606,7 +1606,7 @@ AIO_Callback_handler::handle_disk_failur
         Warning(message);
         IOCORE_SignalManager(REC_SIGNAL_CACHE_ERROR, message);
         /* subtract the disk space that was being used from  the cache size stat */
-        // dir entries stat 
+        // dir entries stat
         int p;
         inku64 total_bytes_delete = 0;
         inku64 total_dir_delete = 0;
@@ -1834,7 +1834,7 @@ CacheVC::handleReadDone(int event, Event
       }
       bool http_copy_hdr = false;
 #ifdef HTTP_CACHE
-      http_copy_hdr = cache_config_ram_cache_compress && !f.doc_from_ram_cache && 
+      http_copy_hdr = cache_config_ram_cache_compress && !f.doc_from_ram_cache &&
         doc->ftype == CACHE_FRAG_TYPE_HTTP && doc->hlen;
       // If http doc we need to unmarshal the headers before putting in the ram cache
       // unless it could be compressed
@@ -1844,9 +1844,9 @@ CacheVC::handleReadDone(int event, Event
       // Put the request in the ram cache only if its a open_read or lookup
       if (vio.op == VIO::READ && okay) {
         bool cutoff_check;
-        // cutoff_check : 
+        // cutoff_check :
         // doc_len == 0 for the first fragment (it is set from the vector)
-        //                The decision on the first fragment is based on 
+        //                The decision on the first fragment is based on
         //                doc->total_len
         // After that, the decision is based of doc_len (doc_len != 0)
         // (cache_config_ram_cache_cutoff == 0) : no cutoffs
@@ -2059,8 +2059,8 @@ Lfree:
 }
 
 Action *
-Cache::remove(Continuation *cont, CacheKey *key, CacheFragType type, 
-              bool user_agents, bool link, 
+Cache::remove(Continuation *cont, CacheKey *key, CacheFragType type,
+              bool user_agents, bool link,
               char *hostname, int host_len)
 {
   NOWARN_UNUSED(user_agents);
@@ -2191,7 +2191,7 @@ cplist_update()
     }
 
     if (!config_part) {
-      // did not find a matching partition in the config file. 
+      // did not find a matching partition in the config file.
       //Delete hte partition from the cache part list
       int d_no;
       for (d_no = 0; d_no < gndisks; d_no++) {
@@ -2267,7 +2267,7 @@ cplist_reconfigure()
     /* change percentages in the config patitions to absolute value */
     ink64 tot_space_in_blks = 0;
     int blocks_per_part = PART_BLOCK_SIZE / STORE_BLOCK_SIZE;
-    /* sum up the total space available on all the disks. 
+    /* sum up the total space available on all the disks.
        round down the space to 128 megabytes */
     for (i = 0; i < gndisks; i++)
       tot_space_in_blks += (gdisks[i]->num_usable_blocks / blocks_per_part) * blocks_per_part;
@@ -2313,7 +2313,7 @@ cplist_reconfigure()
       size_in_blocks = ((ink_off_t) size * 1024 * 1024) / STORE_BLOCK_SIZE;
 
       if (!config_part->cachep) {
-        // we did not find a corresponding entry in cache part...creat one 
+        // we did not find a corresponding entry in cache part...creat one
 
         CachePart *new_cp = NEW(new CachePart());
         new_cp->disk_parts = (DiskPart **) xmalloc(gndisks * sizeof(DiskPart *));
@@ -2326,7 +2326,7 @@ cplist_reconfigure()
         gnpart += new_cp->num_parts;
         continue;
       }
-//    else 
+//    else
       CachePart *cp = config_part->cachep;
       ink_assert(cp->size <= size_in_blocks);
       if (cp->size == size_in_blocks) {
@@ -2373,8 +2373,8 @@ cplist_reconfigure()
         int largest_part = cp->disk_parts[sorted_part[gndisks - 1]]->size;
 
         /* allocate storage on new disk. Find the difference
-           between the biggest partition on any disk and 
-           the partition on this disk and try to make 
+           between the biggest partition on any disk and
+           the partition on this disk and try to make
            them equal */
         int size_diff = (cp->disk_parts[disk_no]) ? largest_part - cp->disk_parts[disk_no]->size : largest_part;
         size_diff = (size_diff < size_to_alloc) ? size_diff : size_to_alloc;
@@ -2490,7 +2490,7 @@ rebuild_host_table(Cache *cache)
   }
 }
 
-// if generic_host_rec.parts == NULL, what do we do??? 
+// if generic_host_rec.parts == NULL, what do we do???
 Part *
 Cache::key_to_part(CacheKey *key, char *hostname, int host_len)
 {
@@ -2650,13 +2650,13 @@ ink_cache_init(ModuleVersion v)
   IOCORE_ReadConfigString(cache_system_config_directory, "proxy.config.config_dir", PATH_NAME_MAX);
   Debug("cache_init", "proxy.config.config_dir = \"%s\"", cache_system_config_directory);
   if ((ierr = stat(cache_system_config_directory, &s)) < 0) {
-    ink_strncpy(cache_system_config_directory,system_config_directory,sizeof(cache_system_config_directory)); 
+    ink_strncpy(cache_system_config_directory,system_config_directory,sizeof(cache_system_config_directory));
     if ((ierr = stat(cache_system_config_directory, &s)) < 0) {
       // Try 'system_root_dir/etc/trafficserver' directory
-      snprintf(cache_system_config_directory, sizeof(cache_system_config_directory), 
+      snprintf(cache_system_config_directory, sizeof(cache_system_config_directory),
                "%s%s%s%s%s",system_root_dir, DIR_SEP,"etc",DIR_SEP,"trafficserver");
       if ((ierr = stat(cache_system_config_directory, &s)) < 0) {
-        fprintf(stderr,"unable to stat() config dir '%s': %d %d, %s\n", 
+        fprintf(stderr,"unable to stat() config dir '%s': %d %d, %s\n",
                 cache_system_config_directory, ierr, errno, strerror(errno));
         fprintf(stderr, "please set config path via 'proxy.config.config_dir' \n");
         _exit(1);

Modified: trafficserver/traffic/trunk/iocore/cache/CacheDir.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/CacheDir.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/CacheDir.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/CacheDir.cc Thu May 13 07:09:39 2010
@@ -58,9 +58,9 @@ OpenDir::OpenDir()
   SET_HANDLER(&OpenDir::signal_readers);
 }
 
-/* 
+/*
    If allow_if_writers is false, open_write fails if there are other writers.
-   max_writers sets the maximum number of concurrent writers that are 
+   max_writers sets the maximum number of concurrent writers that are
    allowed. Only The first writer can set the max_writers. It is ignored
    for later writers.
    Returns 1 on success and 0 on failure.
@@ -522,8 +522,8 @@ Lagain:
     do {
       if (dir_compare_tag(e, key)) {
         ink_debug_assert(dir_offset(e));
-        // Bug: 51680. Need to check collision before checking 
-        // dir_valid(). In case of a collision, if !dir_valid(), we 
+        // Bug: 51680. Need to check collision before checking
+        // dir_valid(). In case of a collision, if !dir_valid(), we
         // don't want to call dir_delete_entry.
         if (collision) {
           if (collision == e) {
@@ -802,7 +802,7 @@ dir_lookaside_cleanup(Part *d)
     while (b) {
       if (!dir_valid(d, &b->new_dir)) {
         EvacuationBlock *nb = b->link.next;
-        DDebug("dir_lookaside", "cleanup %X %X cleaned up", 
+        DDebug("dir_lookaside", "cleanup %X %X cleaned up",
               b->evac_frags.earliest_key.word(0), b->evac_frags.earliest_key.word(1));
         d->lookaside[i].remove(b);
         free_CacheVC(b->earliest_evacuator);
@@ -999,7 +999,7 @@ Lrestart:
     return EVENT_CONT;
   }
   if (event == AIO_EVENT_DONE) {
-    // AIO Thread 
+    // AIO Thread
     if (io.aio_result != (int) io.aiocb.aio_nbytes) {
       Warning("part write error during directory sync '%s'", gpart[part]->hash_id);
       event = EVENT_NONE;

Modified: trafficserver/traffic/trunk/iocore/cache/CacheDisk.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/CacheDisk.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/CacheDisk.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/CacheDisk.cc Thu May 13 07:09:39 2010
@@ -368,7 +368,7 @@ CacheDisk::update_header()
       }
     }
     if (j == n) {
-      // did not find a matching partition number. create a new 
+      // did not find a matching partition number. create a new
       // one
       disk_parts[j] = NEW(new DiskPart());
       disk_parts[j]->part_number = part_number;

Modified: trafficserver/traffic/trunk/iocore/cache/CacheHosting.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/CacheHosting.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/CacheHosting.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/CacheHosting.cc Thu May 13 07:09:39 2010
@@ -773,7 +773,7 @@ ConfigPartitions::BuildListFromString(ch
           state = INK_ERROR;
           break;
         }
-        tmp += 10;              //size of string partition including null 
+        tmp += 10;              //size of string partition including null
         partition_number = atoi(tmp);
 
         // XXX should this be < 0 instead of < 1
@@ -806,7 +806,7 @@ ConfigPartitions::BuildListFromString(ch
           state = INK_ERROR;
           break;
         }
-        tmp += 7;               //size of string scheme including null 
+        tmp += 7;               //size of string scheme including null
 
         if (!strcasecmp(tmp, "http")) {
           tmp += 4;
@@ -846,7 +846,7 @@ ConfigPartitions::BuildListFromString(ch
               break;
             }
           }
-          //ends here 
+          //ends here
           in_percent = 1;
           tmp++;
         } else
@@ -1084,7 +1084,7 @@ execute_and_verify(RegressionTest * t)
   if (cp_list_len != config_partitions.num_partitions)
     return REGRESSION_TEST_FAILED;
 
-  /* check that the partitions and sizes 
+  /* check that the partitions and sizes
      match the configuration */
   int matched = 0;
   ConfigPart *cp = config_partitions.cp_queue.head;

Modified: trafficserver/traffic/trunk/iocore/cache/CachePart.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/CachePart.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/CachePart.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/CachePart.cc Thu May 13 07:09:39 2010
@@ -361,8 +361,8 @@ CacheVC::scanOpenWrite(int event, Event 
       break;
     }
 
-    // the document was not modified 
-    // we are safe from now on as we hold the 
+    // the document was not modified
+    // we are safe from now on as we hold the
     // writer lock on the doc
     SET_HANDLER(&CacheVC::scanUpdateDone);
     ret = do_write_call();
@@ -382,7 +382,7 @@ CacheVC::scanUpdateDone(int event, Event
   // get partition lock
   CACHE_TRY_LOCK(lock, part->mutex, mutex->thread_holding);
   if (lock) {
-    // insert a directory entry for the previous fragment 
+    // insert a directory entry for the previous fragment
     dir_overwrite(&first_key, part, &dir, &od->first_dir, false);
     if (od->move_resident_alt) {
       dir_insert(&od->single_doc_key, part, &od->single_doc_dir);

Modified: trafficserver/traffic/trunk/iocore/cache/CacheRead.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/CacheRead.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/CacheRead.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/CacheRead.cc Thu May 13 07:09:39 2010
@@ -289,7 +289,7 @@ int
 CacheVC::openReadFromWriter(int event, Event * e)
 {
   if (!f.read_from_writer_called) {
-    // The assignment to last_collision as NULL was 
+    // The assignment to last_collision as NULL was
     // made conditional after INKqa08411
     last_collision = NULL;
     // Let's restart the clock from here - the first time this a reader
@@ -347,7 +347,7 @@ CacheVC::openReadFromWriter(int event, E
     SET_HANDLER(&CacheVC::openReadStartHead);
     return openReadStartHead(EVENT_IMMEDIATE, 0);
   }
-  // allow reading from unclosed writer for http requests only. 
+  // allow reading from unclosed writer for http requests only.
   ink_assert(frag_type == CACHE_FRAG_TYPE_HTTP || write_vc->closed);
   if (!write_vc->closed && !write_vc->fragment) {
     if (!cache_config_read_while_writer || frag_type != CACHE_FRAG_TYPE_HTTP)
@@ -392,9 +392,9 @@ CacheVC::openReadFromWriter(int event, E
       doc_len = alternate.object_size_get();
       if (write_vc->update_key == cod->single_doc_key &&
           (cod->move_resident_alt || write_vc->f.rewrite_resident_alt) && write_vc->first_buf._ptr()) {
-        // the resident alternate is being updated and its a 
+        // the resident alternate is being updated and its a
         // header only update. The first_buf of the writer has the
-        // document body. 
+        // document body.
         Doc *doc = (Doc *) write_vc->first_buf->data();
         writer_buf = new_IOBufferBlock(write_vc->first_buf, doc->data_len(), doc->prefix_len());
         MUTEX_RELEASE(writer_lock);
@@ -409,7 +409,7 @@ CacheVC::openReadFromWriter(int event, E
         CACHE_INCREMENT_DYN_STAT(cache_read_busy_success_stat);
         return callcont(CACHE_EVENT_OPEN_READ);
       }
-      // want to snarf the new headers from the writer 
+      // want to snarf the new headers from the writer
       // and then continue as if nothing happened
       last_collision = NULL;
       MUTEX_RELEASE(writer_lock);
@@ -476,7 +476,7 @@ CacheVC::openReadFromWriterMain(int even
     Warning("Document for %X truncated", earliest_key.word(0));
     return calluser(VC_EVENT_ERROR);
   }
-  /* its possible that the user did a do_io_close before 
+  /* its possible that the user did a do_io_close before
      openWriteWriteDone was called. */
   if (length > ((ink64)doc_len) - vio.ndone) {
     ink64 skip_bytes = length - (doc_len - vio.ndone);
@@ -487,7 +487,7 @@ CacheVC::openReadFromWriterMain(int even
     bytes = vio.ntodo();
   if (vio.ndone >= (ink64)doc_len) {
     ink_assert(bytes <= 0);
-    // reached the end of the document and the user still wants more 
+    // reached the end of the document and the user still wants more
     return calluser(VC_EVENT_EOS);
   }
   b = iobufferblock_clone(writer_buf, writer_offset, bytes);
@@ -573,13 +573,13 @@ CacheVC::openReadReadDone(int event, Eve
         last_collision = NULL;
         while (dir_probe(&earliest_key, part, &dir, &last_collision)) {
           if (dir_offset(&dir) == dir_offset(&earliest_dir)) {
-            DDebug("cache_read_agg", "%x: key: %X ReadRead complete: %d", 
+            DDebug("cache_read_agg", "%x: key: %X ReadRead complete: %d",
                   this, first_key.word(1), (int)vio.ndone);
             doc_len = vio.ndone;
             goto Ldone;
           }
         }
-        DDebug("cache_read_agg", "%x: key: %X ReadRead writer aborted: %d", 
+        DDebug("cache_read_agg", "%x: key: %X ReadRead writer aborted: %d",
               this, first_key.word(1), (int)vio.ndone);
         goto Lerror;
       }
@@ -658,20 +658,20 @@ CacheVC::openReadMain(int event, Event *
   else {
     if (calluser(VC_EVENT_READ_READY) == EVENT_DONE)
       return EVENT_DONE;
-    // we have to keep reading until we give the user all the 
-    // bytes it wanted or we hit the watermark. 
+    // we have to keep reading until we give the user all the
+    // bytes it wanted or we hit the watermark.
     if (vio.ntodo() > 0 && !vio.buffer.writer()->high_water())
       goto Lread;
     return EVENT_CONT;
   }
 Lread: {
     if ((inku32)vio.ndone >= doc_len)
-      // reached the end of the document and the user still wants more 
+      // reached the end of the document and the user still wants more
       return calluser(VC_EVENT_EOS);
     last_collision = 0;
     writer_lock_retry = 0;
     // if the state machine calls reenable on the callback from the cache,
-    // we set up a schedule_imm event. The openReadReadDone discards 
+    // we set up a schedule_imm event. The openReadReadDone discards
     // EVENT_IMMEDIATE events. So, we have to cancel that trigger and set
     // a new EVENT_INTERVAL event.
     cancel_trigger();
@@ -691,13 +691,13 @@ Lread: {
         last_collision = NULL;
         while (dir_probe(&earliest_key, part, &dir, &last_collision)) {
           if (dir_offset(&dir) == dir_offset(&earliest_dir)) {
-            DDebug("cache_read_agg", "%x: key: %X ReadMain complete: %d", 
+            DDebug("cache_read_agg", "%x: key: %X ReadMain complete: %d",
                   this, first_key.word(1), (int)vio.ndone);
             doc_len = vio.ndone;
             goto Leos;
           }
         }
-        DDebug("cache_read_agg", "%x: key: %X ReadMain writer aborted: %d", 
+        DDebug("cache_read_agg", "%x: key: %X ReadMain writer aborted: %d",
               this, first_key.word(1), (int)vio.ndone);
         goto Lerror;
       }
@@ -765,7 +765,7 @@ CacheVC::openReadStartEarliest(int event
       dir_delete(&key, part, &dir);
       // try going through the directory entries again
       // in case the dir entry we deleted doesnt correspond
-      // to the key we are looking for. This is possible 
+      // to the key we are looking for. This is possible
       // because of directory collisions
       last_collision = NULL;
       goto Lread;
@@ -786,16 +786,16 @@ CacheVC::openReadStartEarliest(int event
     }
 #endif
     goto Lsuccess;
-Lread: 
+Lread:
     if (dir_probe(&key, part, &earliest_dir, &last_collision) ||
-        dir_lookaside_probe(&key, part, &earliest_dir, NULL)) 
+        dir_lookaside_probe(&key, part, &earliest_dir, NULL))
     {
       dir = earliest_dir;
       if ((ret = do_read_call(&key)) == EVENT_RETURN)
         goto Lcallreturn;
       return ret;
     }
-    // read has detected that alternate does not exist in the cache. 
+    // read has detected that alternate does not exist in the cache.
     // rewrite the vector.
 #ifdef HTTP_CACHE
     if (!f.read_from_writer_called && frag_type == CACHE_FRAG_TYPE_HTTP) {
@@ -808,7 +808,7 @@ Lread: 
         // if the vector had one alternate, delete it's directory entry
         if (len != doc1->hlen || !write_vector->count()) {
           // sometimes the delete fails when there is a race and another read
-          // finds that the directory entry has been overwritten 
+          // finds that the directory entry has been overwritten
           // (cannot assert on the return value)
           dir_delete(&first_key, part, &first_dir);
         } else {
@@ -820,7 +820,7 @@ Lread: 
           key = first_key;
           // always use od->first_dir to overwrite a directory.
           // If an evacuation happens while a vector is being updated
-          // the evacuator changes the od->first_dir to the new directory 
+          // the evacuator changes the od->first_dir to the new directory
           // that it inserted
           od->first_dir = first_dir;
           od->writing_vec = 1;
@@ -967,7 +967,7 @@ CacheVC::openReadStartHead(int event, Ev
       dir_delete(&key, part, &dir);
       // try going through the directory entries again
       // in case the dir entry we deleted doesnt correspond
-      // to the key we are looking for. This is possible 
+      // to the key we are looking for. This is possible
       // because of directory collisions
       last_collision = NULL;
       goto Lread;

Modified: trafficserver/traffic/trunk/iocore/cache/CacheTest.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/CacheTest.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/CacheTest.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/CacheTest.cc Thu May 13 07:09:39 2010
@@ -114,7 +114,7 @@ int CacheTestSM::event_handler(int event
         goto Lclose_error_next;
       else
         return EVENT_DONE;
-   
+
     case CACHE_EVENT_OPEN_READ_FAILED:
       goto Lcancel_next;
 
@@ -145,7 +145,7 @@ int CacheTestSM::event_handler(int event
         goto Lclose_error_next;
       else
         return EVENT_DONE;
-      
+
     case CACHE_EVENT_OPEN_WRITE_FAILED:
       goto Lcancel_next;
 
@@ -186,7 +186,7 @@ int CacheTestSM::event_handler(int event
     case AIO_EVENT_DONE:
       goto Lnext;
 
-    default: 
+    default:
       ink_assert(!"case");
       break;
   }
@@ -241,7 +241,7 @@ void CacheTestSM::fill_buffer() {
   }
 }
 
-int CacheTestSM::check_buffer() { 
+int CacheTestSM::check_buffer() {
   ink64 avail = buffer_reader->read_avail();
   CacheKey k = key;
   k.b[1] += content_salt;
@@ -264,11 +264,11 @@ int CacheTestSM::check_buffer() { 
     pos += l;
     avail -= l;
   }
-  return 1; 
+  return 1;
 }
 
 int CacheTestSM::check_result(int event) {
-  return 
+  return
     initial_event == expect_initial_event &&
     event == expect_event;
 }
@@ -299,7 +299,7 @@ EXCLUSIVE_REGRESSION_TEST(cache)(Regress
   EThread *thread = this_ethread();
 
   CACHE_SM(t, write_test, { cacheProcessor.open_write(
-        this, &key, CACHE_FRAG_TYPE_NONE, 100, 
+        this, &key, CACHE_FRAG_TYPE_NONE, 100,
         CACHE_WRITE_OPT_SYNC); } );
   write_test.expect_initial_event = CACHE_EVENT_OPEN_WRITE;
   write_test.expect_event = VC_EVENT_WRITE_COMPLETE;
@@ -309,7 +309,7 @@ EXCLUSIVE_REGRESSION_TEST(cache)(Regress
   CACHE_SM(t, lookup_test, { cacheProcessor.lookup(this, &key); } );
   lookup_test.expect_event = CACHE_EVENT_LOOKUP;
   lookup_test.key = write_test.key;
-  
+
   CACHE_SM(t, read_test, { cacheProcessor.open_read(this, &key); } );
   read_test.expect_initial_event = CACHE_EVENT_OPEN_READ;
   read_test.expect_event = VC_EVENT_READ_COMPLETE;
@@ -327,13 +327,13 @@ EXCLUSIVE_REGRESSION_TEST(cache)(Regress
   CACHE_SM(t, read_fail_test, { cacheProcessor.open_read(this, &key); } );
   read_fail_test.expect_event = CACHE_EVENT_OPEN_READ_FAILED;
   read_fail_test.key = write_test.key;
-  
+
   CACHE_SM(t, remove_fail_test, { cacheProcessor.remove(this, &key); } );
   remove_fail_test.expect_event = CACHE_EVENT_REMOVE_FAILED;
   rand_CacheKey(&remove_fail_test.key, thread->mutex);
 
-  CACHE_SM(t, replace_write_test, { 
-      cacheProcessor.open_write(this, &key, CACHE_FRAG_TYPE_NONE, 100, 
+  CACHE_SM(t, replace_write_test, {
+      cacheProcessor.open_write(this, &key, CACHE_FRAG_TYPE_NONE, 100,
                                 CACHE_WRITE_OPT_SYNC);
     }
     int open_write_callout() {
@@ -350,7 +350,7 @@ EXCLUSIVE_REGRESSION_TEST(cache)(Regress
   CACHE_SM(t, replace_test, {
       cacheProcessor.open_write(this, &key, CACHE_FRAG_TYPE_NONE, 100,
                                 CACHE_WRITE_OPT_OVERWRITE_SYNC);
-    }   
+    }
     int open_write_callout() {
       CacheTestHeader *h = 0;
       int hlen = 0;
@@ -370,7 +370,7 @@ EXCLUSIVE_REGRESSION_TEST(cache)(Regress
   replace_test.content_salt = 1;
 
   CACHE_SM(t, replace_read_test, {
-      cacheProcessor.open_read(this, &key); 
+      cacheProcessor.open_read(this, &key);
     }
     int open_read_callout() {
       CacheTestHeader *h = 0;

Modified: trafficserver/traffic/trunk/iocore/cache/CacheWrite.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/CacheWrite.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/CacheWrite.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/CacheWrite.cc Thu May 13 07:09:39 2010
@@ -142,31 +142,31 @@ CacheVC::updateVector(int event, Event *
    - frag_type. Checked to see if a vector needs to be marshalled.
    - f.use_first_key. To decide if the vector should be marshalled and to set
      the doc->key to the appropriate key (first_key or earliest_key)
-   - f.evac_vector. If set, the writer is pushed in the beginning of the 
+   - f.evac_vector. If set, the writer is pushed in the beginning of the
      agg queue. And if !f.evac_vector && !f.update the alternate->object_size
      is set to vc->total_len
    - f.readers.  If set, assumes that this is an evacuation, so the write
      is not aborted even if part->agg_todo_size > agg_write_backlog
    - f.evacuator. If this is an evacuation.
    - f.rewrite_resident_alt. The resident alternate is rewritten.
-   - f.update. Used only if the write_vector needs to be written to disk. 
+   - f.update. Used only if the write_vector needs to be written to disk.
      Used to set the length of the alternate to total_len.
-   - write_vector. Used only if frag_type == CACHE_FRAG_TYPE_HTTP && 
+   - write_vector. Used only if frag_type == CACHE_FRAG_TYPE_HTTP &&
      (f.use_fist_key || f.evac_vector) is set. Write_vector is written to disk
    - alternate_index. Used only if write_vector needs to be written to disk.
-     Used to find out the VC's alternate in the write_vector and set its 
+     Used to find out the VC's alternate in the write_vector and set its
      length to tatal_len.
    - write_len. The number of bytes for this fragment.
-   - total_len. The total number of bytes for the document so far. 
+   - total_len. The total number of bytes for the document so far.
      Doc->total_len and alternate's total len is set to this value.
    - first_key. Doc's first_key is set to this value.
    - pin_in_cache. Doc's pinned value is set to this + ink_get_hrtime().
-   - earliest_key. If f.use_first_key, Doc's key is set to this value. 
+   - earliest_key. If f.use_first_key, Doc's key is set to this value.
    - key. If !f.use_first_key, Doc's key is set to this value.
    - blocks. Used only if write_len is set. Data to be written
    - offset. Used only if write_len is set. offset into the block to copy
      the data from.
-   - buf. Used only if f.evacuator is set. Should point to the old document. 
+   - buf. Used only if f.evacuator is set. Should point to the old document.
    The functions sets the length, offset, pinned, head and phase of vc->dir.
    */
 
@@ -195,7 +195,7 @@ CacheVC::handleWrite(int event, Event *e
   agg_len = round_to_approx_size(write_len + header_len + frag_len + sizeofDoc);
   part->agg_todo_size += agg_len;
   ink_assert(agg_len <= AGG_SIZE);
-  bool agg_error = 
+  bool agg_error =
     (agg_len > AGG_SIZE ||
      (!f.readers && (part->agg_todo_size > cache_config_agg_write_backlog + AGG_SIZE) && write_len));
 #ifdef CACHE_AGG_FAIL_RATE
@@ -307,8 +307,8 @@ Part::scan_for_pinned_documents()
 
 /* NOTE:: This state can be called by an AIO thread, so DON'T DON'T
    DON'T schedule any events on this thread using VC_SCHED_XXX or
-   mutex->thread_holding->schedule_xxx_local(). ALWAYS use 
-   eventProcessor.schedule_xxx(). 
+   mutex->thread_holding->schedule_xxx_local(). ALWAYS use
+   eventProcessor.schedule_xxx().
    */
 int
 Part::aggWriteDone(int event, Event *e)
@@ -329,7 +329,7 @@ Part::aggWriteDone(int event, Event *e)
     header->last_write_pos = header->write_pos;
     header->write_pos += io.aiocb.aio_nbytes;
     ink_assert(header->write_pos >= start);
-    DDebug("cache_agg", "Dir %s, Write: %llu, last Write: %llu\n", 
+    DDebug("cache_agg", "Dir %s, Write: %llu, last Write: %llu\n",
           hash_id, header->write_pos, header->last_write_pos);
     ink_assert(header->write_pos == header->agg_pos);
     if (header->write_pos + EVACUATION_SIZE > scan_pos)
@@ -340,9 +340,9 @@ Part::aggWriteDone(int event, Event *e)
     // delete all the directory entries that we inserted
     // for fragments is this aggregation buffer
     Debug("cache_disk_error", "Write error on disk %s\n \
-              write range : [%llu - %llu bytes]  [%llu - %llu blocks] \n", 
-          hash_id, io.aiocb.aio_offset, io.aiocb.aio_offset + io.aiocb.aio_nbytes, 
-          io.aiocb.aio_offset / INK_BLOCK_SIZE, 
+              write range : [%llu - %llu bytes]  [%llu - %llu blocks] \n",
+          hash_id, io.aiocb.aio_offset, io.aiocb.aio_offset + io.aiocb.aio_nbytes,
+          io.aiocb.aio_offset / INK_BLOCK_SIZE,
           (io.aiocb.aio_offset + io.aiocb.aio_nbytes) / INK_BLOCK_SIZE);
     Dir del_dir;
     dir_clear(&del_dir);
@@ -961,7 +961,7 @@ Part::agg_wrap()
 
 /* NOTE: This state can be called by an AIO thread, so DON'T DON'T
    DON'T schedule any events on this thread using VC_SCHED_XXX or
-   mutex->thread_holding->schedule_xxx_local(). ALWAYS use 
+   mutex->thread_holding->schedule_xxx_local(). ALWAYS use
    eventProcessor.schedule_xxx().
    Also, make sure that any functions called by this also use
    the eventProcessor to schedule events
@@ -983,10 +983,10 @@ Lagain:
   for (c = (CacheVC *) agg.head; c;) {
     int writelen = c->agg_len;
     ink_assert(writelen < AGG_SIZE);
-    if (agg_buf_pos + writelen > AGG_SIZE || 
+    if (agg_buf_pos + writelen > AGG_SIZE ||
         header->write_pos + agg_buf_pos + writelen > (skip + len))
       break;
-    DDebug("agg_read", "copying: %d, %llu, key: %d", 
+    DDebug("agg_read", "copying: %d, %llu, key: %d",
           agg_buf_pos, header->write_pos + agg_buf_pos, c->first_key.word(0));
     int wrotelen = agg_copy(agg_buffer + agg_buf_pos, c);
     ink_assert(writelen == wrotelen);
@@ -1301,7 +1301,7 @@ CacheVC::openWriteWriteDone(int event, E
       ink_assert(key == earliest_key);
       earliest_dir = dir;
     } else {
-      if (!frag) 
+      if (!frag)
         frag = &integral_frags[0];
       else {
         if (fragment-1 >= INTEGRAL_FRAGS && IS_POWER_2((inku32)(fragment-1))) {
@@ -1466,8 +1466,8 @@ CacheVC::openWriteStartDone(int event, E
     }
 
     /* INKqa07123.
-       A directory entry which is nolonger valid may have been overwritten. 
-       We need to start afresh from the beginning by setting last_collision 
+       A directory entry which is nolonger valid may have been overwritten.
+       We need to start afresh from the beginning by setting last_collision
        to NULL.
      */
     if (!dir_valid(part, &dir)) {
@@ -1615,7 +1615,7 @@ Cache::open_write(Continuation *cont, Ca
      would cause a problem if the key and the first_key collide. In case of
      a collision, old vector data could be served to HTTP. Need to avoid that.
      Also, when evacuating a fragment, we have to decide if its the first_key
-     or the earliest_key based on the dir_tag. 
+     or the earliest_key based on the dir_tag.
    */
   do {
     rand_CacheKey(&c->key, cont->mutex);
@@ -1679,7 +1679,7 @@ Cache::open_write(Continuation *cont, Ca
      would cause a problem if the key and the first_key collide. In case of
      a collision, old vector data could be served to HTTP. Need to avoid that.
      Also, when evacuating a fragment, we have to decide if its the first_key
-     or the earliest_key based on the dir_tag. 
+     or the earliest_key based on the dir_tag.
    */
   do {
     rand_CacheKey(&c->key, cont->mutex);
@@ -1694,8 +1694,8 @@ Cache::open_write(Continuation *cont, Ca
     /*
        Update has the following code paths :
        a) Update alternate header only :
-       In this case the vector has to be rewritten. The content 
-       length(update_len) and the key for the document are set in the 
+       In this case the vector has to be rewritten. The content
+       length(update_len) and the key for the document are set in the
        new_info in the set_http_info call.
        HTTP OPERATIONS
        open_write with info set
@@ -1703,9 +1703,9 @@ Cache::open_write(Continuation *cont, Ca
        (total_len == 0)
        close
        b) Update alternate and data
-       In this case both the vector and the data needs to be rewritten. 
-       This case is similar to the standard write of a document case except 
-       that the new_info is inserted into the vector at the alternate_index 
+       In this case both the vector and the data needs to be rewritten.
+       This case is similar to the standard write of a document case except
+       that the new_info is inserted into the vector at the alternate_index
        (overwriting the old alternate) rather than the end of the vector.
        HTTP OPERATIONS
        open_write with info set
@@ -1713,8 +1713,8 @@ Cache::open_write(Continuation *cont, Ca
        do_io_write =>  (total_len > 0)
        close
        c) Delete an alternate
-       The vector may need to be deleted (if there was only one alternate) or 
-       rewritten (if there were more than one alternate). The deletion of the 
+       The vector may need to be deleted (if there was only one alternate) or
+       rewritten (if there were more than one alternate). The deletion of the
        vector is done in openWriteRemoveVector.
        HTTP OPERATIONS
        open_write with info set
@@ -1734,7 +1734,7 @@ Cache::open_write(Continuation *cont, Ca
   {
     CACHE_TRY_LOCK(lock, c->part->mutex, cont->mutex->thread_holding);
     if (lock) {
-      if ((err = c->part->open_write(c, if_writers, 
+      if ((err = c->part->open_write(c, if_writers,
                                      cache_config_http_max_alts > 1 ? cache_config_http_max_alts : 0)) > 0)
         goto Lfailure;
       // If there are multiple writers, then this one cannot be an update.

Modified: trafficserver/traffic/trunk/iocore/cache/I_Cache.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/I_Cache.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/I_Cache.h (original)
+++ trafficserver/traffic/trunk/iocore/cache/I_Cache.h Thu May 13 07:09:39 2010
@@ -88,21 +88,21 @@ struct CacheProcessor:public Processor
   Action *open_read_buffer(Continuation *cont, MIOBuffer *buf, CacheKey *key,
                            CacheFragType frag_type = CACHE_FRAG_TYPE_NONE, char *hostname = 0, int host_len = 0);
 
-  inkcoreapi Action *open_write(Continuation *cont, 
-                                CacheKey *key, 
+  inkcoreapi Action *open_write(Continuation *cont,
+                                CacheKey *key,
                                 CacheFragType frag_type = CACHE_FRAG_TYPE_NONE,
                                 int expected_size = CACHE_EXPECTED_SIZE,
                                 int options = 0,
                                 time_t pin_in_cache = (time_t) 0,
                                 char *hostname = 0, int host_len = 0);
   Action *open_write_buffer(Continuation *cont, MIOBuffer *buf,
-                            CacheKey *key, 
-                            CacheFragType frag_type = CACHE_FRAG_TYPE_NONE, 
+                            CacheKey *key,
+                            CacheFragType frag_type = CACHE_FRAG_TYPE_NONE,
                             int options = 0,
                             time_t pin_in_cache = (time_t) 0,
                             char *hostname = 0, int host_len = 0);
   inkcoreapi Action *remove(Continuation *cont, CacheKey *key,
-                            CacheFragType frag_type = CACHE_FRAG_TYPE_NONE, 
+                            CacheFragType frag_type = CACHE_FRAG_TYPE_NONE,
                             bool rm_user_agents = true, bool rm_link = false,
                             char *hostname = 0, int host_len = 0);
   Action *scan(Continuation *cont, char *hostname = 0, int host_len = 0, int KB_per_second = SCAN_KB_PER_SECOND);

Modified: trafficserver/traffic/trunk/iocore/cache/I_Store.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/I_Store.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/I_Store.h (original)
+++ trafficserver/traffic/trunk/iocore/cache/I_Store.h Thu May 13 07:09:39 2010
@@ -25,7 +25,7 @@
 
   Store.h
 
-  
+
  ****************************************************************************/
 
 #ifndef _Store_h_

Modified: trafficserver/traffic/trunk/iocore/cache/NewCacheVC.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/NewCacheVC.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/NewCacheVC.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/NewCacheVC.cc Thu May 13 07:09:39 2010
@@ -449,7 +449,7 @@ NewCacheVC::completeCacheHttpInfo(const 
   // we should get the Httpinfo for the corresponding alternate
   CacheHTTPInfo *obj = _httpInfoVector.get(m_alt_index);
   if (obj != NULL) {
-    //marshaled httpinfo is not writable, 
+    //marshaled httpinfo is not writable,
     //need to deep copy since headers may be modified
     _readCacheHttpInfo.copy((HTTPInfo *) obj);
 
@@ -810,7 +810,7 @@ NewCacheVC::_writeHttpInfo()
   _state = NEW_CACHE_WRITE_HEADER;
 
   if (m_alt_index >= 0) {
-    //it's an update, remove the stale httpinfo 
+    //it's an update, remove the stale httpinfo
     _httpInfoVector.remove(m_alt_index, false);
   }
 
@@ -825,7 +825,7 @@ NewCacheVC::_writeHttpInfo()
 
     _httpInfoVector.insert(&_writeCacheHttpInfo);
 
-    _writeCacheHttpInfo.clear();        //prevent double destroy   
+    _writeCacheHttpInfo.clear();        //prevent double destroy
 
 
     // get the length of the marshaled vector and create a buffer for it

Modified: trafficserver/traffic/trunk/iocore/cache/NewCacheVC.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/NewCacheVC.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/NewCacheVC.h (original)
+++ trafficserver/traffic/trunk/iocore/cache/NewCacheVC.h Thu May 13 07:09:39 2010
@@ -112,12 +112,12 @@ public:
     ink_assert(!"implemented");
     return 0;
   }
-  int get_header(void **ptr, int *len) 
+  int get_header(void **ptr, int *len)
   {
     ink_assert(!"implemented");
     return -1;
   }
-  int set_header(void *ptr, int len) 
+  int set_header(void *ptr, int len)
   {
     ink_assert(!"implemented");
     return -1;

Modified: trafficserver/traffic/trunk/iocore/cache/P_CacheDir.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/P_CacheDir.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/P_CacheDir.h (original)
+++ trafficserver/traffic/trunk/iocore/cache/P_CacheDir.h Thu May 13 07:09:39 2010
@@ -190,19 +190,19 @@ struct FreeDir
 // To allow this, move the vector from the CacheVC to the OpenDirEntry.
 // Each CacheVC now maintains a pointer to this vector. Adding/Deleting
 // alternates from this vector is done under the Part::lock. The alternate
-// is deleted/inserted into the vector just before writing the vector disk 
-// (CacheVC::updateVector). 
+// is deleted/inserted into the vector just before writing the vector disk
+// (CacheVC::updateVector).
 LINK_FORWARD_DECLARATION(CacheVC, opendir_link); // forward declaration
 struct OpenDirEntry
 {
   DLL<CacheVC, Link_CacheVC_opendir_link> writers;       // list of all the current writers
   DLL<CacheVC, Link_CacheVC_opendir_link> readers;         // list of all the current readers - not used
-  CacheHTTPInfoVector vector;   // Vector for the http document. Each writer 
-                                // maintains a pointer to this vector and 
-                                // writes it down to disk. 
-  CacheKey single_doc_key;      // Key for the resident alternate. 
+  CacheHTTPInfoVector vector;   // Vector for the http document. Each writer
+                                // maintains a pointer to this vector and
+                                // writes it down to disk.
+  CacheKey single_doc_key;      // Key for the resident alternate.
   Dir single_doc_dir;           // Directory for the resident alternate
-  Dir first_dir;                // Dir for the vector. If empty, a new dir is 
+  Dir first_dir;                // Dir for the vector. If empty, a new dir is
                                 // inserted, otherwise this dir is overwritten
   inku16 num_writers;           // num of current writers
   inku16 max_writers;           // max number of simultaneous writers allowed

Modified: trafficserver/traffic/trunk/iocore/cache/P_CacheDisk.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/P_CacheDisk.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/P_CacheDisk.h (original)
+++ trafficserver/traffic/trunk/iocore/cache/P_CacheDisk.h Thu May 13 07:09:39 2010
@@ -67,7 +67,7 @@ struct DiskPartBlockQueue
 
 struct DiskPart
 {
-  int num_partblocks;           /* number of disk partition blocks in this discrete 
+  int num_partblocks;           /* number of disk partition blocks in this discrete
                                    partition */
   int part_number;              /* the partition number of this partition */
   ink_off_t size;               /* size in store blocks */

Modified: trafficserver/traffic/trunk/iocore/cache/P_CacheInternal.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/P_CacheInternal.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/P_CacheInternal.h (original)
+++ trafficserver/traffic/trunk/iocore/cache/P_CacheInternal.h Thu May 13 07:09:39 2010
@@ -247,17 +247,17 @@ struct CacheVC:CacheVConnection
     ink_assert(vio.op == VIO::READ);
     return !f.not_from_ram_cache;
   }
-  int get_header(void **ptr, int *len) 
+  int get_header(void **ptr, int *len)
   {
     if (first_buf.m_ptr) {
       Doc *doc = (Doc*)first_buf->data();
       *ptr = doc->hdr();
-      *len = doc->hlen;   
+      *len = doc->hlen;
       return 0;
     } else
       return -1;
   }
-  int set_header(void *ptr, int len) 
+  int set_header(void *ptr, int len)
   {
     header_to_write = ptr;
     header_to_write_len = len;
@@ -405,8 +405,8 @@ struct CacheVC:CacheVConnection
   // These variables are memset to 0 when the structure is freed.
   // The size of this region is size_to_init which is initialized
   // in the CacheVC constuctor. It assumes that vio is the start
-  // of this region. 
-  // NOTE: NOTE: NOTE: If vio is NOT the start, then CHANGE the 
+  // of this region.
+  // NOTE: NOTE: NOTE: If vio is NOT the start, then CHANGE the
   // size_to_init initialization
   VIO vio;
   EThread *initial_thread;  // initial thread open_XX was called on
@@ -447,7 +447,7 @@ struct CacheVC:CacheVConnection
   CacheVC *write_vc;
   char *hostname;
   int host_len;
-  int header_to_write_len;  
+  int header_to_write_len;
   void *header_to_write;
   short writer_lock_retry;
 
@@ -490,12 +490,12 @@ struct CacheVC:CacheVConnection
 #define POP_HANDLER do {                                          \
     handler = save_handler;                                       \
     ink_assert(handler != (ContinuationHandler)(&CacheVC::dead)); \
-  } while (0) 
+  } while (0)
 
 struct CacheRemoveCont:Continuation
 {
   int event_handler(int event, void *data);
-  
+
   CacheRemoveCont():Continuation(NULL) { }
 };
 
@@ -952,7 +952,7 @@ struct Cache
                                 CacheFragType frag_type, int options = 0,
                                 time_t pin_in_cache = (time_t) 0, char *hostname = 0, int host_len = 0);
   inkcoreapi Action *remove(Continuation *cont, CacheKey *key,
-                            CacheFragType type = CACHE_FRAG_TYPE_HTTP, 
+                            CacheFragType type = CACHE_FRAG_TYPE_HTTP,
                             bool user_agents = true, bool link = false,
                             char *hostname = 0, int host_len = 0);
   Action *scan(Continuation *cont, char *hostname = 0, int host_len = 0, int KB_per_second = 2500);
@@ -1133,8 +1133,8 @@ CacheProcessor::open_read_buffer(Continu
 
 
 TS_INLINE inkcoreapi Action *
-CacheProcessor::open_write(Continuation *cont, CacheKey *key, CacheFragType frag_type, 
-                           int expected_size, int options, time_t pin_in_cache, 
+CacheProcessor::open_write(Continuation *cont, CacheKey *key, CacheFragType frag_type,
+                           int expected_size, int options, time_t pin_in_cache,
                            char *hostname, int host_len)
 {
   (void) expected_size;
@@ -1152,9 +1152,9 @@ CacheProcessor::open_write(Continuation 
 }
 
 TS_INLINE Action *
-CacheProcessor::open_write_buffer(Continuation *cont, MIOBuffer *buf, CacheKey *key, 
-                                  CacheFragType frag_type, int options, time_t pin_in_cache, 
-                                  char *hostname, int host_len) 
+CacheProcessor::open_write_buffer(Continuation *cont, MIOBuffer *buf, CacheKey *key,
+                                  CacheFragType frag_type, int options, time_t pin_in_cache,
+                                  char *hostname, int host_len)
 {
   (void)cont;
   (void)buf;

Modified: trafficserver/traffic/trunk/iocore/cache/P_CachePart.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/P_CachePart.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/P_CachePart.h (original)
+++ trafficserver/traffic/trunk/iocore/cache/P_CachePart.h Thu May 13 07:09:39 2010
@@ -293,7 +293,7 @@ struct Frag {
   inku64 offset; // start offset of data stored in this fragment
 };
 
-// Note : hdr() needs to be 8 byte aligned. 
+// Note : hdr() needs to be 8 byte aligned.
 // If you change this, change sizeofDoc above
 struct Doc
 {
@@ -338,7 +338,7 @@ part_headerlen(Part *d) {
 TS_INLINE int
 part_dirlen(Part * d)
 {
-  return ROUND_TO_BLOCK(d->buckets * DIR_DEPTH * d->segments * SIZEOF_DIR) + 
+  return ROUND_TO_BLOCK(d->buckets * DIR_DEPTH * d->segments * SIZEOF_DIR) +
     part_headerlen(d) + ROUND_TO_BLOCK(sizeof(PartHeaderFooter));
 }
 TS_INLINE int
@@ -407,7 +407,7 @@ Doc::single_fragment()
   return (total_len && (data_len() == total_len));
 }
 TS_INLINE inku32
-Doc::nfrags() { 
+Doc::nfrags() {
   return flen / sizeof(Frag);
 }
 TS_INLINE Frag *

Modified: trafficserver/traffic/trunk/iocore/cache/P_CacheTest.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/P_CacheTest.h?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/P_CacheTest.h (original)
+++ trafficserver/traffic/trunk/iocore/cache/P_CacheTest.h Thu May 13 07:09:39 2010
@@ -58,7 +58,7 @@ struct CacheTestHost {
   double xprev_host_prob;
   double xnext_host_prob;
 
-  CacheTestHost():name(NULL), xlast_cachable_id(0), 
+  CacheTestHost():name(NULL), xlast_cachable_id(0),
                   xprev_host_prob(0), xnext_host_prob(0) {}
 };
 

Modified: trafficserver/traffic/trunk/iocore/cache/RamCacheCLFUS.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/RamCacheCLFUS.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/RamCacheCLFUS.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/RamCacheCLFUS.cc Thu May 13 07:09:39 2010
@@ -311,7 +311,7 @@ void RamCacheCLFUS::compress_entries(int
   while (compressed && target > ncompressed) {
     RamCacheCLFUSEntry *e = compressed;
     if (e->incompressible || e->compressed)
-      goto Lcontinue; 
+      goto Lcontinue;
     n++;
     if (do_at_most < n)
       break;
@@ -340,7 +340,7 @@ void RamCacheCLFUS::compress_entries(int
 #if HAVE_LIBZ
         case CACHE_COMPRESSION_LIBZ: {
           uLongf ll = l;
-          if ((Z_OK != compress((Bytef*)b, &ll, (Bytef*)e->data->data(), e->len))) 
+          if ((Z_OK != compress((Bytef*)b, &ll, (Bytef*)e->data->data(), e->len)))
             goto Lfailed;
           l = (int)ll;
           break;
@@ -349,7 +349,7 @@ void RamCacheCLFUS::compress_entries(int
 #ifdef HAVE_LZMA
         case CACHE_COMPRESSION_LIBLZMA: {
           size_t pos = 0, ll = l;
-          if (LZMA_OK != lzma_easy_buffer_encode(LZMA_PRESET_DEFAULT, LZMA_CHECK_NONE, NULL, 
+          if (LZMA_OK != lzma_easy_buffer_encode(LZMA_PRESET_DEFAULT, LZMA_CHECK_NONE, NULL,
                                                  (uint8_t*)e->data->data(), e->len, (uint8_t*)b, &pos, ll))
             goto Lfailed;
           l = (int)pos;
@@ -387,12 +387,12 @@ void RamCacheCLFUS::compress_entries(int
       check_accounting(this);
     }
     goto Lcontinue;
-  Lfailed:    
+  Lfailed:
     xfree(b);
     e->incompressible = 1;
   Lcontinue:;
-    DDebug("ram_cache", "compress %X %d %d %d %d %d %d", 
-           e->key.word(3), e->auxkey1, e->auxkey2, e->incompressible, e->compressed, 
+    DDebug("ram_cache", "compress %X %d %d %d %d %d %d",
+           e->key.word(3), e->auxkey1, e->auxkey2, e->incompressible, e->compressed,
            e->len, e->compressed_len);
     if (!e->lru_link.next)
       break;
@@ -403,11 +403,11 @@ void RamCacheCLFUS::compress_entries(int
 
 void RamCacheCLFUS::requeue_victims(RamCacheCLFUS *c, Que(RamCacheCLFUSEntry, lru_link) &victims) {
   RamCacheCLFUSEntry *victim = 0;
-  while ((victim = victims.dequeue())) { 
-    c->bytes += victim->size + ENTRY_OVERHEAD; 
+  while ((victim = victims.dequeue())) {
+    c->bytes += victim->size + ENTRY_OVERHEAD;
     CACHE_SUM_DYN_STAT_THREAD(cache_ram_cache_bytes_stat, victim->size);
     victim->hits = REQUEUE_HITS(victim->hits);
-    c->lru[0].enqueue(victim); 
+    c->lru[0].enqueue(victim);
   }
 }
 
@@ -497,7 +497,7 @@ int RamCacheCLFUS::put(INK_MD5 *key, IOB
       if (bytes + victim->size + size > max_bytes && CACHE_VALUE(victim) > CACHE_VALUE(e)) {
         requeue_victims(this, victims);
         lru[1].enqueue(e);
-        DDebug("ram_cache", "put %X %d %d size %d INC %d HISTORY", 
+        DDebug("ram_cache", "put %X %d %d size %d INC %d HISTORY",
                key->word(3), auxkey1, auxkey2, e->size, e->hits);
         return 0;
       }

Modified: trafficserver/traffic/trunk/iocore/cache/Store.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/iocore/cache/Store.cc?rev=943821&r1=943820&r2=943821&view=diff
==============================================================================
--- trafficserver/traffic/trunk/iocore/cache/Store.cc (original)
+++ trafficserver/traffic/trunk/iocore/cache/Store.cc Thu May 13 07:09:39 2010
@@ -75,7 +75,7 @@ const char *STORAGE_CONFIG_HEADER = "# 	
 #									\n\
 ";
 
-// Global 
+// Global
 Store theStore;