[rhmessaging-commits] rhmessaging commits: r3080 - store/trunk/cpp/lib/jrnl.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu Jan 29 14:26:34 EST 2009


Author: kpvdr
Date: 2009-01-29 14:26:34 -0500 (Thu, 29 Jan 2009)
New Revision: 3080

Modified:
   store/trunk/cpp/lib/jrnl/rmgr.cpp
Log:
Possible fix for BZ480964 - "JERR_FCNTL_CMPLOFFSOVFL during flow-to-disk". Additional testing will be required to confirm the fix.

Modified: store/trunk/cpp/lib/jrnl/rmgr.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/rmgr.cpp	2009-01-29 16:29:19 UTC (rev 3079)
+++ store/trunk/cpp/lib/jrnl/rmgr.cpp	2009-01-29 19:26:34 UTC (rev 3080)
@@ -103,7 +103,7 @@
         {
             aio_cycle();   // check if rd AIOs returned; initiate new reads if possible
             return RHM_IORES_PAGE_AIOWAIT;
-        }        
+        }
         const iores res = skip(dtokp);
         if (res != RHM_IORES_SUCCESS)
         {
@@ -275,13 +275,16 @@
 
         if (pcbp) // Page reads have pcb
         {
-            // Increment the completed read offset
-            // NOTE: We cannot use _rrfc here, as it may have rotated since submitting count.
-            // Use stored pointer to fcntl in the pcb instead.
-            pcbp->_rdblks = aiocbp->u.c.nbytes / JRNL_DBLK_SIZE;
-            pcbp->_rfh->add_rd_cmpl_cnt_dblks(pcbp->_rdblks);
-            pcbp->_state = state;
-            pil[i] = pcbp->_index;
+            if (!pcbp->_rfh->rd_void()) // Detects if write reset of this fcntl obj has occurred.
+            {
+                // Increment the completed read offset
+                // NOTE: We cannot use _rrfc here, as it may have rotated since submitting count.
+                // Use stored pointer to fcntl in the pcb instead.
+                pcbp->_rdblks = aiocbp->u.c.nbytes / JRNL_DBLK_SIZE;
+                pcbp->_rfh->add_rd_cmpl_cnt_dblks(pcbp->_rdblks);
+                pcbp->_state = state;
+                pil[i] = pcbp->_index;
+            }
         }
         else // File header reads have no pcb
         {
@@ -318,7 +321,7 @@
         _rrfc.set_invalid();
 }
 
-#define MAX_AIO_SLEEPS 1000  // 10 sec 
+#define MAX_AIO_SLEEPS 1000  // 10 sec
 #define AIO_SLEEP_TIME 10000 // 10 ms
 void
 rmgr::init_validation()
@@ -356,7 +359,7 @@
         get_events();
 
     if (!_rrfc.is_valid())
-            return RHM_IORES_RCINVALID;
+        return RHM_IORES_RCINVALID;
 
     // block reads until outstanding file header read completes as fro is needed to read
     if (_fhdr_rd_outstanding)
@@ -583,7 +586,7 @@
         }
         if (_rrfc.is_void()) // Nothing to do; this file not yet written to
             break;
-        
+
         if (_rrfc.subm_offs() == 0)
         {
             _rrfc.add_subm_cnt_dblks(JRNL_SBLK_SIZE);




More information about the rhmessaging-commits mailing list