You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kp...@apache.org on 2013/11/14 21:39:34 UTC

svn commit: r1542066 [1/3] - in /qpid/trunk/qpid/cpp/src/qpid: legacystore/ linearstore/ linearstore/jrnl/ linearstore/jrnl/utils/

Author: kpvdr
Date: Thu Nov 14 20:39:32 2013
New Revision: 1542066

URL: http://svn.apache.org/r1542066
Log:
QPID-4984: Fix for recovery ambiguity issue, other code tidy-ups

Modified:
    qpid/trunk/qpid/cpp/src/qpid/legacystore/MessageStoreImpl.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/BindingDbt.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/BufferValue.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/Cursor.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/DataTokenImpl.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/ISSUES
    qpid/trunk/qpid/cpp/src/qpid/linearstore/IdDbt.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/IdSequence.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/JournalImpl.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/JournalImpl.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/JournalLogImpl.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/JournalLogImpl.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/PreparedTransaction.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/StoreException.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/TxnCtxt.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/TxnCtxt.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/AtomicCounter.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolManager.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolManager.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolPartition.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolPartition.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolTypes.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/JournalFile.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/JournalFile.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/JournalLog.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/JournalLog.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/LinearFileController.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/LinearFileController.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/RecoveryManager.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/RecoveryManager.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/aio.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/aio_callback.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/cvar.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/data_tok.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/data_tok.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/deq_rec.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/deq_rec.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/enq_map.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/enq_map.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/enq_rec.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/enq_rec.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/enums.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/jcfg.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/jcntl.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/jcntl.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/jdir.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/jdir.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/jerrno.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/jerrno.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/jexception.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/jexception.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/jrec.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/jrec.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/pmgr.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/pmgr.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/slock.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/smutex.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/time_ns.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/time_ns.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/txn_map.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/txn_map.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/txn_rec.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/txn_rec.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/utils/deq_hdr.c
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/utils/deq_hdr.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/utils/enq_hdr.c
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/utils/enq_hdr.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/utils/file_hdr.c
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/utils/file_hdr.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/utils/rec_hdr.c
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/utils/rec_hdr.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/utils/rec_tail.c
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/utils/rec_tail.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/utils/txn_hdr.c
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/utils/txn_hdr.h
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/wmgr.cpp
    qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/wmgr.h

Modified: qpid/trunk/qpid/cpp/src/qpid/legacystore/MessageStoreImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/legacystore/MessageStoreImpl.cpp?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/legacystore/MessageStoreImpl.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/legacystore/MessageStoreImpl.cpp Thu Nov 14 20:39:32 2013
@@ -115,7 +115,7 @@ u_int32_t MessageStoreImpl::chkJrnlWrPag
         // For zero value, use default
         p = JRNL_WMGR_DEF_PAGE_SIZE * JRNL_DBLK_SIZE * JRNL_SBLK_SIZE / 1024;
         QPID_LOG(warning, "parameter " << paramName << " (" << param << ") must be a power of 2 between 1 and 128; changing this parameter to default value (" << p << ")");
-    } else if ( p > 128 || p & (p-1) ) {
+    } else if ( p > 128 || (p & (p-1)) ) {
         // For any positive value that is not a power of 2, use closest value
         if      (p <   6)   p =   4;
         else if (p <  12)   p =   8;

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/BindingDbt.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/BindingDbt.h?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/BindingDbt.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/BindingDbt.h Thu Nov 14 20:39:32 2013
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef QPID_LEGACYSTORE_BINDINGDBT_H
-#define QPID_LEGACYSTORE_BINDINGDBT_H
+#ifndef QPID_LINEARSTORE_BINDINGDBT_H
+#define QPID_LINEARSTORE_BINDINGDBT_H
 
 #include "db-inc.h"
 #include "qpid/broker/PersistableExchange.h"
@@ -53,4 +53,4 @@ public:
 
 }}
 
-#endif // ifndef QPID_LEGACYSTORE_BINDINGDBT_H
+#endif // ifndef QPID_LINEARSTORE_BINDINGDBT_H

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/BufferValue.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/BufferValue.h?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/BufferValue.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/BufferValue.h Thu Nov 14 20:39:32 2013
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef QPID_LEGACYSTORE_BUFFERVALUE_H
-#define QPID_LEGACYSTORE_BUFFERVALUE_H
+#ifndef QPID_LINEARSTORE_BUFFERVALUE_H
+#define QPID_LINEARSTORE_BUFFERVALUE_H
 
 #include "db-inc.h"
 #include "qpid/broker/Persistable.h"
@@ -43,4 +43,4 @@ public:
 
 }}
 
-#endif // ifndef QPID_LEGACYSTORE_BUFFERVALUE_H
+#endif // ifndef QPID_LINEARSTORE_BUFFERVALUE_H

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/Cursor.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/Cursor.h?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/Cursor.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/Cursor.h Thu Nov 14 20:39:32 2013
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef QPID_LEGACYSTORE_CURSOR_H
-#define QPID_LEGACYSTORE_CURSOR_H
+#ifndef QPID_LINEARSTORE_CURSOR_H
+#define QPID_LINEARSTORE_CURSOR_H
 
 #include <boost/shared_ptr.hpp>
 #include "db-inc.h"
@@ -47,4 +47,4 @@ public:
 
 }}
 
-#endif // ifndef QPID_LEGACYSTORE_CURSOR_H
+#endif // ifndef QPID_LINEARSTORE_CURSOR_H

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/DataTokenImpl.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/DataTokenImpl.h?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/DataTokenImpl.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/DataTokenImpl.h Thu Nov 14 20:39:32 2013
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef QPID_LEGACYSTORE_DATATOKENIMPL_H
-#define QPID_LEGACYSTORE_DATATOKENIMPL_H
+#ifndef QPID_LINEARSTORE_DATATOKENIMPL_H
+#define QPID_LINEARSTORE_DATATOKENIMPL_H
 
 #include "qpid/linearstore/jrnl/data_tok.h"
 #include "qpid/broker/PersistableMessage.h"
@@ -29,7 +29,7 @@
 namespace qpid{
 namespace linearstore{
 
-class DataTokenImpl : public qpid::qls_jrnl::data_tok, public qpid::RefCounted
+class DataTokenImpl : public qpid::linearstore::journal::data_tok, public qpid::RefCounted
 {
   private:
     boost::intrusive_ptr<qpid::broker::PersistableMessage> sourceMsg;
@@ -44,4 +44,4 @@ class DataTokenImpl : public qpid::qls_j
 } // namespace msgstore
 } // namespace mrg
 
-#endif // ifndef QPID_LEGACYSTORE_DATATOKENIMPL_H
+#endif // ifndef QPID_LINEARSTORE_DATATOKENIMPL_H

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/ISSUES
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/ISSUES?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/ISSUES (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/ISSUES Thu Nov 14 20:39:32 2013
@@ -3,8 +3,8 @@ LinearStore issues:
 Store:
 ------
 
-1. Overwrite identity: When recovering a previously used file, if the write boundary coincides with old record start,
-   no way of discriminating old from new at boundary (used to use OWI).
+1. (SOLVED) Overwrite identity: When recovering a previously used file, if the write boundary coincides with old record
+   start, no way of discriminating old from new at boundary (used to use OWI).
 
 2. Recycling files while in use not working, however, files are recovered to EFP during recovery. Must solve #1 first.
 
@@ -12,6 +12,9 @@ Store:
 
 4. Rework qpid management parameters and controls.
 
+5. Consistent logging: rework logging to provide uniform and consistent logging from store (both logging level and
+   places where logging occurs).
+
 Tests
 -----
 

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/IdDbt.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/IdDbt.h?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/IdDbt.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/IdDbt.h Thu Nov 14 20:39:32 2013
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef QPID_LEGACYSTORE_IDDBT_H
-#define QPID_LEGACYSTORE_IDDBT_H
+#ifndef QPID_LINEARSTORE_IDDBT_H
+#define QPID_LINEARSTORE_IDDBT_H
 
 #include "db-inc.h"
 
@@ -39,4 +39,4 @@ public:
 
 }}
 
-#endif // ifndef QPID_LEGACYSTORE_IDDBT_H
+#endif // ifndef QPID_LINEARSTORE_IDDBT_H

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/IdSequence.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/IdSequence.h?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/IdSequence.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/IdSequence.h Thu Nov 14 20:39:32 2013
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef QPID_LEGACYSTORE_IDSEQUENCE_H
-#define QPID_LEGACYSTORE_IDSEQUENCE_H
+#ifndef QPID_LINEARSTORE_IDSEQUENCE_H
+#define QPID_LINEARSTORE_IDSEQUENCE_H
 
 #include "qpid/framing/amqp_types.h"
 #include "qpid/sys/Mutex.h"
@@ -40,4 +40,4 @@ public:
 
 }}
 
-#endif // ifndef QPID_LEGACYSTORE_IDSEQUENCE_H
+#endif // ifndef QPID_LINEARSTORE_IDSEQUENCE_H

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/JournalImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/JournalImpl.cpp?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/JournalImpl.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/JournalImpl.cpp Thu Nov 14 20:39:32 2013
@@ -36,7 +36,7 @@
 #include "qmf/org/apache/qpid/linearstore/EventFull.h"
 #include "qmf/org/apache/qpid/linearstore/EventRecovered.h"
 
-using namespace qpid::qls_jrnl;
+using namespace qpid::linearstore::journal;
 using namespace qpid::linearstore;
 using qpid::management::ManagementAgent;
 namespace _qmf = qmf::org::apache::qpid::linearstore;
@@ -128,10 +128,10 @@ JournalImpl::initManagement(qpid::manage
 
 
 void
-JournalImpl::initialize(qpid::qls_jrnl::EmptyFilePool* efpp_,
+JournalImpl::initialize(qpid::linearstore::journal::EmptyFilePool* efpp_,
                         const uint16_t wcache_num_pages,
                         const uint32_t wcache_pgsize_sblks,
-                        qpid::qls_jrnl::aio_callback* const cbp)
+                        qpid::linearstore::journal::aio_callback* const cbp)
 {
 //    efpp->createJournal(_jdir);
 //    QLS_LOG2(notice, _jid, "Initialized");
@@ -167,10 +167,10 @@ JournalImpl::recover(/*const uint16_t nu
                      const bool auto_expand,
                      const uint16_t ae_max_jfiles,
                      const uint32_t jfsize_sblks,*/
-                     boost::shared_ptr<qpid::qls_jrnl::EmptyFilePoolManager> efpm,
+                     boost::shared_ptr<qpid::linearstore::journal::EmptyFilePoolManager> efpm,
                      const uint16_t wcache_num_pages,
                      const uint32_t wcache_pgsize_sblks,
-                     qpid::qls_jrnl::aio_callback* const cbp,
+                     qpid::linearstore::journal::aio_callback* const cbp,
                      boost::ptr_list<PreparedTransaction>* prep_tx_list_ptr,
                      uint64_t& highest_rid,
                      uint64_t queue_id)
@@ -463,12 +463,12 @@ JournalImpl::handleIoResult(const iores 
     writeActivityFlag = true;
     switch (r)
     {
-        case qpid::qls_jrnl::RHM_IORES_SUCCESS:
+        case qpid::linearstore::journal::RHM_IORES_SUCCESS:
             return;
         default:
             {
                 std::ostringstream oss;
-                oss << "Unexpected I/O response (" << qpid::qls_jrnl::iores_str(r) << ").";
+                oss << "Unexpected I/O response (" << qpid::linearstore::journal::iores_str(r) << ").";
                 QLS_LOG2(error, _jid, oss.str());
                 THROW_STORE_FULL_EXCEPTION(oss.str());
             }

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/JournalImpl.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/JournalImpl.h?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/JournalImpl.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/JournalImpl.h Thu Nov 14 20:39:32 2013
@@ -41,14 +41,14 @@ namespace qpid{
 namespace sys {
 class Timer;
 }
-namespace qls_jrnl {
-class EmptyFilePool;
-}
 
 namespace linearstore{
 
 class JournalImpl;
 class JournalLogImpl;
+namespace journal {
+    class EmptyFilePool;
+}
 
 class InactivityFireEvent : public qpid::sys::TimerTask
 {
@@ -74,7 +74,7 @@ class GetEventsFireEvent : public qpid::
     inline void cancel() { qpid::sys::Mutex::ScopedLock sl(_gefe_lock); _parent = 0; }
 };
 
-class JournalImpl : public qpid::broker::ExternalQueueStore, public qpid::qls_jrnl::jcntl, public qpid::qls_jrnl::aio_callback
+class JournalImpl : public qpid::broker::ExternalQueueStore, public qpid::linearstore::journal::jcntl, public qpid::linearstore::journal::aio_callback
 {
   public:
     typedef boost::function<void (JournalImpl&)> DeleteCallback;
@@ -110,26 +110,26 @@ class JournalImpl : public qpid::broker:
 
     void initManagement(qpid::management::ManagementAgent* agent);
 
-    void initialize(qpid::qls_jrnl::EmptyFilePool* efp,
+    void initialize(qpid::linearstore::journal::EmptyFilePool* efp,
                     const uint16_t wcache_num_pages,
                     const uint32_t wcache_pgsize_sblks,
-                    qpid::qls_jrnl::aio_callback* const cbp);
+                    qpid::linearstore::journal::aio_callback* const cbp);
 
-    inline void initialize(qpid::qls_jrnl::EmptyFilePool* efpp,
+    inline void initialize(qpid::linearstore::journal::EmptyFilePool* efpp,
                            const uint16_t wcache_num_pages,
                            const uint32_t wcache_pgsize_sblks) {
         initialize(efpp, wcache_num_pages, wcache_pgsize_sblks, this);
     }
 
-    void recover(boost::shared_ptr<qpid::qls_jrnl::EmptyFilePoolManager> efpm,
+    void recover(boost::shared_ptr<qpid::linearstore::journal::EmptyFilePoolManager> efpm,
                  const uint16_t wcache_num_pages,
                  const uint32_t wcache_pgsize_sblks,
-                 qpid::qls_jrnl::aio_callback* const cbp,
+                 qpid::linearstore::journal::aio_callback* const cbp,
                  boost::ptr_list<PreparedTransaction>* prep_tx_list_ptr,
                  uint64_t& highest_rid,
                  uint64_t queue_id);
 
-    inline void recover(boost::shared_ptr<qpid::qls_jrnl::EmptyFilePoolManager> efpm,
+    inline void recover(boost::shared_ptr<qpid::linearstore::journal::EmptyFilePoolManager> efpm,
                         const uint16_t wcache_num_pages,
                         const uint32_t wcache_pgsize_sblks,
                         boost::ptr_list<PreparedTransaction>* prep_tx_list_ptr,
@@ -142,38 +142,38 @@ class JournalImpl : public qpid::broker:
 
     // Overrides for write inactivity timer
     void enqueue_data_record(const void* const data_buff, const size_t tot_data_len,
-                             const size_t this_data_len, qpid::qls_jrnl::data_tok* dtokp,
+                             const size_t this_data_len, qpid::linearstore::journal::data_tok* dtokp,
                              const bool transient = false);
 
-    void enqueue_extern_data_record(const size_t tot_data_len, qpid::qls_jrnl::data_tok* dtokp,
+    void enqueue_extern_data_record(const size_t tot_data_len, qpid::linearstore::journal::data_tok* dtokp,
                                     const bool transient = false);
 
     void enqueue_txn_data_record(const void* const data_buff, const size_t tot_data_len,
-                                 const size_t this_data_len, qpid::qls_jrnl::data_tok* dtokp, const std::string& xid,
+                                 const size_t this_data_len, qpid::linearstore::journal::data_tok* dtokp, const std::string& xid,
                                  const bool transient = false);
 
-    void enqueue_extern_txn_data_record(const size_t tot_data_len, qpid::qls_jrnl::data_tok* dtokp,
+    void enqueue_extern_txn_data_record(const size_t tot_data_len, qpid::linearstore::journal::data_tok* dtokp,
                                         const std::string& xid, const bool transient = false);
 
-    void dequeue_data_record(qpid::qls_jrnl::data_tok* const dtokp, const bool txn_coml_commit = false);
+    void dequeue_data_record(qpid::linearstore::journal::data_tok* const dtokp, const bool txn_coml_commit = false);
 
-    void dequeue_txn_data_record(qpid::qls_jrnl::data_tok* const dtokp, const std::string& xid, const bool txn_coml_commit = false);
+    void dequeue_txn_data_record(qpid::linearstore::journal::data_tok* const dtokp, const std::string& xid, const bool txn_coml_commit = false);
 
-    void txn_abort(qpid::qls_jrnl::data_tok* const dtokp, const std::string& xid);
+    void txn_abort(qpid::linearstore::journal::data_tok* const dtokp, const std::string& xid);
 
-    void txn_commit(qpid::qls_jrnl::data_tok* const dtokp, const std::string& xid);
+    void txn_commit(qpid::linearstore::journal::data_tok* const dtokp, const std::string& xid);
 
     void stop(bool block_till_aio_cmpl = false);
 
     // Overrides for get_events timer
-    qpid::qls_jrnl::iores flush(const bool block_till_aio_cmpl = false);
+    qpid::linearstore::journal::iores flush(const bool block_till_aio_cmpl = false);
 
     // TimerTask callback
     void getEventsFire();
     void flushFire();
 
     // AIO callbacks
-    virtual void wr_aio_cb(std::vector<qpid::qls_jrnl::data_tok*>& dtokl);
+    virtual void wr_aio_cb(std::vector<qpid::linearstore::journal::data_tok*>& dtokl);
     virtual void rd_aio_cb(std::vector<uint16_t>& pil);
 
     qpid::management::ManagementObject::shared_ptr GetManagementObject (void) const
@@ -194,7 +194,7 @@ class JournalImpl : public qpid::broker:
         timer.add(getEventsFireEventsPtr);
         getEventsTimerSetFlag = true;
     }
-    void handleIoResult(const qpid::qls_jrnl::iores r);
+    void handleIoResult(const qpid::linearstore::journal::iores r);
 
     // Management instrumentation callbacks overridden from jcntl
     inline void instr_incr_outstanding_aio_cnt() {
@@ -222,9 +222,9 @@ class TplJournalImpl : public JournalImp
     virtual ~TplJournalImpl() {}
 
     // Special version of read_data_record that ignores transactions - needed when reading the TPL
-    inline qpid::qls_jrnl::iores read_data_record(void** const datapp, std::size_t& dsize,
+    inline qpid::linearstore::journal::iores read_data_record(void** const datapp, std::size_t& dsize,
                                                 void** const xidpp, std::size_t& xidsize, bool& transient, bool& external,
-                                                qpid::qls_jrnl::data_tok* const dtokp) {
+                                                qpid::linearstore::journal::data_tok* const dtokp) {
         return JournalImpl::read_data_record(datapp, dsize, xidpp, xidsize, transient, external, dtokp, true);
     }
 }; // class TplJournalImpl

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/JournalLogImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/JournalLogImpl.cpp?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/JournalLogImpl.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/JournalLogImpl.cpp Thu Nov 14 20:39:32 2013
@@ -24,11 +24,11 @@
 namespace qpid {
 namespace linearstore {
 
-JournalLogImpl::JournalLogImpl(const qpid::qls_jrnl::JournalLog::log_level_t logLevelThreshold) : qpid::qls_jrnl::JournalLog(logLevelThreshold) {}
+JournalLogImpl::JournalLogImpl(const qpid::linearstore::journal::JournalLog::log_level_t logLevelThreshold) : qpid::linearstore::journal::JournalLog(logLevelThreshold) {}
 JournalLogImpl::~JournalLogImpl() {}
 
 void
-JournalLogImpl::log(const qpid::qls_jrnl::JournalLog::log_level_t level,
+JournalLogImpl::log(const qpid::linearstore::journal::JournalLog::log_level_t level,
                     const std::string& log_stmt) const {
     switch (level) {
       case LOG_CRITICAL: QPID_LOG(critical, "Linear Store: " << log_stmt); break;
@@ -42,7 +42,7 @@ JournalLogImpl::log(const qpid::qls_jrnl
 }
 
 void
-JournalLogImpl::log(const qpid::qls_jrnl::JournalLog::log_level_t level,
+JournalLogImpl::log(const qpid::linearstore::journal::JournalLog::log_level_t level,
                     const std::string& jid,
                     const std::string& log_stmt) const {
     switch (level) {

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/JournalLogImpl.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/JournalLogImpl.h?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/JournalLogImpl.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/JournalLogImpl.h Thu Nov 14 20:39:32 2013
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef QPID_LEGACYSTORE_LOG_H
-#define QPID_LEGACYSTORE_LOG_H
+#ifndef QPID_LINEARSTORE_LOG_H
+#define QPID_LINEARSTORE_LOG_H
 
 #include "qpid/linearstore/jrnl/JournalLog.h"
 #include "qpid/log/Statement.h"
@@ -31,18 +31,18 @@
 namespace qpid {
 namespace linearstore {
 
-class JournalLogImpl : public qpid::qls_jrnl::JournalLog
+class JournalLogImpl : public qpid::linearstore::journal::JournalLog
 {
 public:
-    JournalLogImpl(const qpid::qls_jrnl::JournalLog::log_level_t logLevelThreshold);
+    JournalLogImpl(const qpid::linearstore::journal::JournalLog::log_level_t logLevelThreshold);
     virtual ~JournalLogImpl();
-    virtual void log(const qpid::qls_jrnl::JournalLog::log_level_t logLevel,
+    virtual void log(const qpid::linearstore::journal::JournalLog::log_level_t logLevel,
                      const std::string& logStatement) const;
-    virtual void log(const qpid::qls_jrnl::JournalLog::log_level_t logLevel,
+    virtual void log(const qpid::linearstore::journal::JournalLog::log_level_t logLevel,
                      const std::string& journalId,
                      const std::string& logStatement) const;
 };
 
 }} // namespace qpid::linearstore
 
-#endif // QPID_LEGACYSTORE_LOG_H
+#endif // QPID_LINEARSTORE_LOG_H

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.cpp?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.cpp Thu Nov 14 20:39:32 2013
@@ -72,7 +72,7 @@ MessageStoreImpl::MessageStoreImpl(qpid:
                                    isInit(false),
                                    envPath(envpath_),
                                    broker(broker_),
-                                   jrnlLog(qpid::qls_jrnl::JournalLog::LOG_NOTICE),
+                                   jrnlLog(qpid::linearstore::journal::JournalLog::LOG_NOTICE),
                                    mgmtObject(),
                                    agent(0)
 {}
@@ -119,13 +119,13 @@ uint16_t MessageStoreImpl::getJrnlWrNumP
     }
 }
 
-qpid::qls_jrnl::efpPartitionNumber_t MessageStoreImpl::chkEfpPartition(const qpid::qls_jrnl::efpPartitionNumber_t partition_,
+qpid::linearstore::journal::efpPartitionNumber_t MessageStoreImpl::chkEfpPartition(const qpid::linearstore::journal::efpPartitionNumber_t partition_,
                                                                        const std::string& /*paramName_*/) {
     // TODO: check against list of existing partitions, throw if not found
     return partition_;
 }
 
-qpid::qls_jrnl::efpDataSize_kib_t MessageStoreImpl::chkEfpFileSizeKiB(const qpid::qls_jrnl::efpDataSize_kib_t efpFileSizeKib_,
+qpid::linearstore::journal::efpDataSize_kib_t MessageStoreImpl::chkEfpFileSizeKiB(const qpid::linearstore::journal::efpDataSize_kib_t efpFileSizeKib_,
                                                                      const std::string& paramName_) {
     uint8_t rem =  efpFileSizeKib_ % uint64_t(QLS_SBLK_SIZE_KIB);
     if (rem != 0) {
@@ -171,8 +171,8 @@ bool MessageStoreImpl::init(const qpid::
 {
     // Extract and check options
     const StoreOptions* opts = static_cast<const StoreOptions*>(options_);
-    qpid::qls_jrnl::efpPartitionNumber_t efpPartition = chkEfpPartition(opts->efpPartition, "efp-partition");
-    qpid::qls_jrnl::efpDataSize_kib_t efpFilePoolSize_kib = chkEfpFileSizeKiB(opts->efpFileSizeKib, "efp-file-size");
+    qpid::linearstore::journal::efpPartitionNumber_t efpPartition = chkEfpPartition(opts->efpPartition, "efp-partition");
+    qpid::linearstore::journal::efpDataSize_kib_t efpFilePoolSize_kib = chkEfpFileSizeKiB(opts->efpFileSizeKib, "efp-file-size");
     uint32_t jrnlWrCachePageSizeKib = chkJrnlWrPageCacheSize(opts->wCachePageSizeKib, "wcache-page-size");
     uint32_t tplJrnlWrCachePageSizeKib = chkJrnlWrPageCacheSize(opts->tplWCachePageSizeKib, "tpl-wcache-page-size");
 
@@ -182,8 +182,8 @@ bool MessageStoreImpl::init(const qpid::
 
 // These params, taken from options, are assumed to be correct and verified
 bool MessageStoreImpl::init(const std::string& storeDir_,
-                           qpid::qls_jrnl::efpPartitionNumber_t efpPartition_,
-                           qpid::qls_jrnl::efpDataSize_kib_t efpFileSize_kib_,
+                           qpid::linearstore::journal::efpPartitionNumber_t efpPartition_,
+                           qpid::linearstore::journal::efpDataSize_kib_t efpFileSize_kib_,
                            const bool truncateFlag_,
                            uint32_t wCachePageSizeKib_,
                            uint32_t tplWCachePageSizeKib_)
@@ -230,7 +230,7 @@ void MessageStoreImpl::init()
         }
 
         try {
-            qpid::qls_jrnl::jdir::create_dir(getBdbBaseDir());
+            qpid::linearstore::journal::jdir::create_dir(getBdbBaseDir());
 
             dbenv.reset(new DbEnv(0));
             dbenv->set_errpfx("linearstore");
@@ -282,7 +282,7 @@ void MessageStoreImpl::init()
                 THROW_STORE_EXCEPTION_2("BDB exception occurred while initializing store", e);
         } catch (const StoreException&) {
             throw;
-        } catch (const qpid::qls_jrnl::jexception& e) {
+        } catch (const qpid::linearstore::journal::jexception& e) {
             QLS_LOG(error, "Journal Exception occurred while initializing store: " << e);
             THROW_STORE_EXCEPTION_2("Journal Exception occurred while initializing store", e.what());
         } catch (...) {
@@ -291,7 +291,7 @@ void MessageStoreImpl::init()
         }
     } while (!isInit);
 
-    efpMgr.reset(new qpid::qls_jrnl::EmptyFilePoolManager(getStoreTopLevelDir(),
+    efpMgr.reset(new qpid::linearstore::journal::EmptyFilePoolManager(getStoreTopLevelDir(),
                                                           defaultEfpPartitionNumber,
                                                           defaultEfpFileSize_kib,
                                                           jrnlLog));
@@ -337,9 +337,9 @@ void MessageStoreImpl::truncateInit()
 
     // TODO: Linearstore: harvest all discareded journal files into the empy file pool(s).
 
-    qpid::qls_jrnl::jdir::delete_dir(getBdbBaseDir());
-    qpid::qls_jrnl::jdir::delete_dir(getJrnlBaseDir());
-    qpid::qls_jrnl::jdir::delete_dir(getTplBaseDir());
+    qpid::linearstore::journal::jdir::delete_dir(getBdbBaseDir());
+    qpid::linearstore::journal::jdir::delete_dir(getJrnlBaseDir());
+    qpid::linearstore::journal::jdir::delete_dir(getTplBaseDir());
     QLS_LOG(notice, "Store directory " << getStoreTopLevelDir() << " was truncated.");
     init();
 }
@@ -349,7 +349,7 @@ void MessageStoreImpl::chkTplStoreInit()
     // Prevent multiple threads from late-initializing the TPL
     qpid::sys::Mutex::ScopedLock sl(tplInitLock);
     if (!tplStorePtr->is_ready()) {
-        qpid::qls_jrnl::jdir::create_dir(getTplBaseDir());
+        qpid::linearstore::journal::jdir::create_dir(getTplBaseDir());
         tplStorePtr->initialize(/*tplNumJrnlFiles, false, 0, tplJrnlFsizeSblks,*/ getEmptyFilePool(defaultEfpPartitionNumber, defaultEfpFileSize_kib), tplWCacheNumPages, tplWCachePgSizeSblks);
         if (mgmtObject.get() != 0) mgmtObject->set_tplIsInitialized(true);
     }
@@ -379,7 +379,7 @@ MessageStoreImpl::~MessageStoreImpl()
         closeDbs();
     } catch (const DbException& e) {
         QLS_LOG(error, "Error closing BDB databases: " <<  e.what());
-    } catch (const qpid::qls_jrnl::jexception& e) {
+    } catch (const qpid::linearstore::journal::jexception& e) {
         QLS_LOG(error, "Error: " << e.what());
     } catch (const std::exception& e) {
         QLS_LOG(error, "Error: " << e.what());
@@ -420,7 +420,7 @@ void MessageStoreImpl::create(qpid::brok
     queue_.setExternalQueueStore(dynamic_cast<qpid::broker::ExternalQueueStore*>(jQueue));
     try {
         jQueue->initialize(getEmptyFilePool(args_), wCacheNumPages, wCachePgSizeSblks);
-    } catch (const qpid::qls_jrnl::jexception& e) {
+    } catch (const qpid::linearstore::journal::jexception& e) {
         THROW_STORE_EXCEPTION(std::string("Queue ") + queue_.getName() + ": create() failed: " + e.what());
     }
     try {
@@ -432,28 +432,28 @@ void MessageStoreImpl::create(qpid::brok
     }
 }
 
-qpid::qls_jrnl::EmptyFilePool*
-MessageStoreImpl::getEmptyFilePool(const qpid::qls_jrnl::efpPartitionNumber_t efpPartitionNumber_,
-                                   const qpid::qls_jrnl::efpDataSize_kib_t efpFileSizeKib_) {
-    qpid::qls_jrnl::EmptyFilePool* efpp = efpMgr->getEmptyFilePool(efpPartitionNumber_, efpFileSizeKib_);
+qpid::linearstore::journal::EmptyFilePool*
+MessageStoreImpl::getEmptyFilePool(const qpid::linearstore::journal::efpPartitionNumber_t efpPartitionNumber_,
+                                   const qpid::linearstore::journal::efpDataSize_kib_t efpFileSizeKib_) {
+    qpid::linearstore::journal::EmptyFilePool* efpp = efpMgr->getEmptyFilePool(efpPartitionNumber_, efpFileSizeKib_);
     if (efpp == 0) {
         std::ostringstream oss;
         oss << "Partition=" << efpPartitionNumber_ << "; EfpFileSize=" << efpFileSizeKib_ << " KiB";
-        throw qpid::qls_jrnl::jexception(qpid::qls_jrnl::jerrno::JERR_EFP_NOEFP, oss.str(), "MessageStoreImpl", "getEmptyFilePool");
+        throw qpid::linearstore::journal::jexception(qpid::linearstore::journal::jerrno::JERR_EFP_NOEFP, oss.str(), "MessageStoreImpl", "getEmptyFilePool");
     }
     return efpp;
 }
 
-qpid::qls_jrnl::EmptyFilePool*
+qpid::linearstore::journal::EmptyFilePool*
 MessageStoreImpl::getEmptyFilePool(const qpid::framing::FieldTable& args_) {
     qpid::framing::FieldTable::ValuePtr value;
-    qpid::qls_jrnl::efpPartitionNumber_t localEfpPartition = defaultEfpPartitionNumber;
+    qpid::linearstore::journal::efpPartitionNumber_t localEfpPartition = defaultEfpPartitionNumber;
     value = args_.get("qpid.efp_partition");
     if (value.get() != 0 && !value->empty() && value->convertsTo<int>()) {
         localEfpPartition = chkEfpPartition((uint32_t)value->get<int>(), "qpid.efp_partition");
     }
 
-    qpid::qls_jrnl::efpDataSize_kib_t localEfpFileSizeKib = defaultEfpFileSize_kib;
+    qpid::linearstore::journal::efpDataSize_kib_t localEfpFileSizeKib = defaultEfpFileSize_kib;
     value = args_.get("qpid.efp_file_size");
     if (value.get() != 0 && !value->empty() && value->convertsTo<int>()) {
         localEfpFileSizeKib = chkEfpFileSizeKiB((uint32_t)value->get<int>(),"qpid.efp_file_size" );
@@ -694,7 +694,6 @@ void MessageStoreImpl::recoverQueues(Txn
                                      txn_list& prepared,
                                      message_index& messages)
 {
-    QLS_LOG(info,   "*** MessageStoreImpl::recoverQueues()");
     Cursor queues;
     queues.open(queueDb, txn.get());
 
@@ -731,7 +730,7 @@ void MessageStoreImpl::recoverQueues(Txn
             long rcnt = 0L;     // recovered msg count
             long idcnt = 0L;    // in-doubt msg count
             uint64_t thisHighestRid = 0ULL;
-            jQueue->recover(boost::dynamic_pointer_cast<qpid::qls_jrnl::EmptyFilePoolManager>(efpMgr), wCacheNumPages, wCachePgSizeSblks, &prepared, thisHighestRid, key.id);
+            jQueue->recover(boost::dynamic_pointer_cast<qpid::linearstore::journal::EmptyFilePoolManager>(efpMgr), wCacheNumPages, wCachePgSizeSblks, &prepared, thisHighestRid, key.id);
 
             // Check for changes to queue store settings qpid.file_count and qpid.file_size resulting
             // from recovery of a store that has had its size changed externally by the resize utility.
@@ -757,7 +756,7 @@ void MessageStoreImpl::recoverQueues(Txn
             recoverMessages(txn, registry, queue, prepared, messages, rcnt, idcnt);
             QLS_LOG(info, "Recovered queue \"" << queueName << "\": " << rcnt << " messages recovered; " << idcnt << " messages in-doubt.");
             jQueue->recover_complete(); // start journal.
-        } catch (const qpid::qls_jrnl::jexception& e) {
+        } catch (const qpid::linearstore::journal::jexception& e) {
             THROW_STORE_EXCEPTION(std::string("Queue ") + queueName + ": recoverQueues() failed: " + e.what());
         }
         //read all messages: done on a per queue basis if using Journal
@@ -869,7 +868,6 @@ void MessageStoreImpl::recoverMessages(T
                                        long& rcnt,
                                        long& idcnt)
 {
-    QLS_LOG(info,   "*** MessageStoreImpl::recoverMessages() queue=\"" << queue->getName() << "\"");
     size_t preambleLength = sizeof(uint32_t)/*header size*/;
 
     JournalImpl* jc = static_cast<JournalImpl*>(queue->getExternalQueueStore());
@@ -894,11 +892,11 @@ void MessageStoreImpl::recoverMessages(T
     try {
         unsigned aio_sleep_cnt = 0;
         while (read) {
-            qpid::qls_jrnl::iores res = jc->read_data_record(&dbuff, dbuffSize, &xidbuff, xidbuffSize, transientFlag, externalFlag, &dtok);
+            qpid::linearstore::journal::iores res = jc->read_data_record(&dbuff, dbuffSize, &xidbuff, xidbuffSize, transientFlag, externalFlag, &dtok);
 
             switch (res)
             {
-              case qpid::qls_jrnl::RHM_IORES_SUCCESS: {
+              case qpid::linearstore::journal::RHM_IORES_SUCCESS: {
                 msg_count++;
                 qpid::broker::RecoverableMessage::shared_ptr msg;
                 char* data = (char*)dbuff;
@@ -948,11 +946,11 @@ void MessageStoreImpl::recoverMessages(T
                             }
                         } else {
                             // Enqueue and/or dequeue tx
-                            qpid::qls_jrnl::txn_map& tmap = jc->get_txn_map();
-                            qpid::qls_jrnl::txn_data_list txnList = tmap.get_tdata_list(xid); // txnList will be empty if xid not found
+                            qpid::linearstore::journal::txn_map& tmap = jc->get_txn_map();
+                            qpid::linearstore::journal::txn_data_list txnList = tmap.get_tdata_list(xid); // txnList will be empty if xid not found
                             bool enq = false;
                             bool deq = false;
-                            for (qpid::qls_jrnl::tdl_itr j = txnList.begin(); j<txnList.end(); j++) {
+                            for (qpid::linearstore::journal::tdl_itr j = txnList.begin(); j<txnList.end(); j++) {
                                 if (j->enq_flag_ && j->rid_ == rid) enq = true;
                                 else if (!j->enq_flag_ && j->drid_ == rid) deq = true;
                             }
@@ -977,21 +975,21 @@ void MessageStoreImpl::recoverMessages(T
                 aio_sleep_cnt = 0;
                 break;
               }
-              case qpid::qls_jrnl::RHM_IORES_PAGE_AIOWAIT:
+              case qpid::linearstore::journal::RHM_IORES_PAGE_AIOWAIT:
                 if (++aio_sleep_cnt > MAX_AIO_SLEEPS)
                     THROW_STORE_EXCEPTION("Timeout waiting for AIO in MessageStoreImpl::recoverMessages()");
                 ::usleep(AIO_SLEEP_TIME_US);
                 break;
-              case qpid::qls_jrnl::RHM_IORES_EMPTY:
+              case qpid::linearstore::journal::RHM_IORES_EMPTY:
                 read = false;
                 break; // done with all messages. (add call in jrnl to test that _emap is empty.)
               default:
                 std::ostringstream oss;
-                oss << "recoverMessages(): Queue: " << queue->getName() << ": Unexpected return from journal read: " << qpid::qls_jrnl::iores_str(res);
+                oss << "recoverMessages(): Queue: " << queue->getName() << ": Unexpected return from journal read: " << qpid::linearstore::journal::iores_str(res);
                 THROW_STORE_EXCEPTION(oss.str());
             } // switch
         } // while
-    } catch (const qpid::qls_jrnl::jexception& e) {
+    } catch (const qpid::linearstore::journal::jexception& e) {
         THROW_STORE_EXCEPTION(std::string("Queue ") + queue->getName() + ": recoverMessages() failed: " + e.what());
     }
 }
@@ -1000,7 +998,7 @@ qpid::broker::RecoverableMessage::shared
                                                                                 uint64_t /*messageId*/,
                                                                                 unsigned& /*headerSize*/)
 {
-    throw qpid::qls_jrnl::jexception(qpid::qls_jrnl::jerrno::JERR__NOTIMPL, "MessageStoreImpl", "getExternMessage");
+    throw qpid::linearstore::journal::jexception(qpid::linearstore::journal::jerrno::JERR__NOTIMPL, "MessageStoreImpl", "getExternMessage");
 }
 
 int MessageStoreImpl::enqueueMessage(TxnCtxt& txn_,
@@ -1036,9 +1034,8 @@ int MessageStoreImpl::enqueueMessage(Txn
 
 void MessageStoreImpl::readTplStore()
 {
-    QLS_LOG(info,   "*** MessageStoreImpl::readTplStore()");
     tplRecoverMap.clear();
-    qpid::qls_jrnl::txn_map& tmap = tplStorePtr->get_txn_map();
+    qpid::linearstore::journal::txn_map& tmap = tplStorePtr->get_txn_map();
     DataTokenImpl dtok;
     void* dbuff = NULL; size_t dbuffSize = 0;
     void* xidbuff = NULL; size_t xidbuffSize = 0;
@@ -1050,9 +1047,9 @@ void MessageStoreImpl::readTplStore()
         while (!done) {
             dtok.reset();
             dtok.set_wstate(DataTokenImpl::ENQ);
-            qpid::qls_jrnl::iores res = tplStorePtr->read_data_record(&dbuff, dbuffSize, &xidbuff, xidbuffSize, transientFlag, externalFlag, &dtok);
+            qpid::linearstore::journal::iores res = tplStorePtr->read_data_record(&dbuff, dbuffSize, &xidbuff, xidbuffSize, transientFlag, externalFlag, &dtok);
             switch (res) {
-              case qpid::qls_jrnl::RHM_IORES_SUCCESS: {
+              case qpid::linearstore::journal::RHM_IORES_SUCCESS: {
                 // Every TPL record contains both data and an XID
                 assert(dbuffSize>0);
                 assert(xidbuffSize>0);
@@ -1060,7 +1057,7 @@ void MessageStoreImpl::readTplStore()
                 bool is2PC = *(static_cast<char*>(dbuff)) != 0;
 
                 // Check transaction details; add to recover map
-                qpid::qls_jrnl::txn_data_list txnList = tmap.get_tdata_list(xid); //  txnList will be empty if xid not found
+                qpid::linearstore::journal::txn_data_list txnList = tmap.get_tdata_list(xid); //  txnList will be empty if xid not found
                 if (!txnList.empty()) { // xid found in tmap
                     unsigned enqCnt = 0;
                     unsigned deqCnt = 0;
@@ -1070,7 +1067,7 @@ void MessageStoreImpl::readTplStore()
                     // Note: will apply to both 1PC and 2PC transactions.
                     bool commitFlag = true;
 
-                    for (qpid::qls_jrnl::tdl_itr j = txnList.begin(); j<txnList.end(); j++) {
+                    for (qpid::linearstore::journal::tdl_itr j = txnList.begin(); j<txnList.end(); j++) {
                         if (j->enq_flag_) {
                             rid = j->rid_;
                             enqCnt++;
@@ -1088,31 +1085,30 @@ void MessageStoreImpl::readTplStore()
                 aio_sleep_cnt = 0;
                 break;
                 }
-              case qpid::qls_jrnl::RHM_IORES_PAGE_AIOWAIT:
+              case qpid::linearstore::journal::RHM_IORES_PAGE_AIOWAIT:
                 if (++aio_sleep_cnt > MAX_AIO_SLEEPS)
                     THROW_STORE_EXCEPTION("Timeout waiting for AIO in MessageStoreImpl::recoverTplStore()");
                 ::usleep(AIO_SLEEP_TIME_US);
                 break;
-              case qpid::qls_jrnl::RHM_IORES_EMPTY:
+              case qpid::linearstore::journal::RHM_IORES_EMPTY:
                 done = true;
                 break; // done with all messages. (add call in jrnl to test that _emap is empty.)
               default:
                 std::ostringstream oss;
-                oss << "readTplStore(): Unexpected result from journal read: " << qpid::qls_jrnl::iores_str(res);
+                oss << "readTplStore(): Unexpected result from journal read: " << qpid::linearstore::journal::iores_str(res);
                 THROW_STORE_EXCEPTION(oss.str());
             } // switch
         }
-    } catch (const qpid::qls_jrnl::jexception& e) {
+    } catch (const qpid::linearstore::journal::jexception& e) {
         THROW_STORE_EXCEPTION(std::string("TPL recoverTplStore() failed: ") + e.what());
     }
 }
 
 void MessageStoreImpl::recoverTplStore()
 {
-    QLS_LOG(info,   "*** MessageStoreImpl::recoverTplStore()");
-    if (qpid::qls_jrnl::jdir::exists(tplStorePtr->jrnl_dir())) {
+    if (qpid::linearstore::journal::jdir::exists(tplStorePtr->jrnl_dir())) {
         uint64_t thisHighestRid = 0ULL;
-        tplStorePtr->recover(boost::dynamic_pointer_cast<qpid::qls_jrnl::EmptyFilePoolManager>(efpMgr), tplWCacheNumPages, tplWCachePgSizeSblks, 0, thisHighestRid, 0);
+        tplStorePtr->recover(boost::dynamic_pointer_cast<qpid::linearstore::journal::EmptyFilePoolManager>(efpMgr), tplWCacheNumPages, tplWCachePgSizeSblks, 0, thisHighestRid, 0);
         if (highestRid == 0ULL)
             highestRid = thisHighestRid;
         else if (thisHighestRid - highestRid  < 0x8000000000000000ULL) // RFC 1982 comparison for unsigned 64-bit
@@ -1127,7 +1123,6 @@ void MessageStoreImpl::recoverTplStore()
 
 void MessageStoreImpl::recoverLockedMappings(txn_list& txns)
 {
-    QLS_LOG(info,   "*** MessageStoreImpl::recoverLockedMappings()");
     if (!tplStorePtr->is_ready())
         recoverTplStore();
 
@@ -1143,7 +1138,6 @@ void MessageStoreImpl::recoverLockedMapp
 
 void MessageStoreImpl::collectPreparedXids(std::set<std::string>& xids)
 {
-    QLS_LOG(info,   "*** MessageStoreImpl::collectPreparedXids()");
     if (tplStorePtr->is_ready()) {
         readTplStore();
     } else {
@@ -1158,18 +1152,18 @@ void MessageStoreImpl::collectPreparedXi
 
 void MessageStoreImpl::stage(const boost::intrusive_ptr<qpid::broker::PersistableMessage>& /*msg*/)
 {
-    throw qpid::qls_jrnl::jexception(qpid::qls_jrnl::jerrno::JERR__NOTIMPL, "MessageStoreImpl", "stage");
+    throw qpid::linearstore::journal::jexception(qpid::linearstore::journal::jerrno::JERR__NOTIMPL, "MessageStoreImpl", "stage");
 }
 
 void MessageStoreImpl::destroy(qpid::broker::PersistableMessage& /*msg*/)
 {
-    throw qpid::qls_jrnl::jexception(qpid::qls_jrnl::jerrno::JERR__NOTIMPL, "MessageStoreImpl", "destroy");
+    throw qpid::linearstore::journal::jexception(qpid::linearstore::journal::jerrno::JERR__NOTIMPL, "MessageStoreImpl", "destroy");
 }
 
 void MessageStoreImpl::appendContent(const boost::intrusive_ptr<const qpid::broker::PersistableMessage>& /*msg*/,
                                      const std::string& /*data*/)
 {
-    throw qpid::qls_jrnl::jexception(qpid::qls_jrnl::jerrno::JERR__NOTIMPL, "MessageStoreImpl", "appendContent");
+    throw qpid::linearstore::journal::jexception(qpid::linearstore::journal::jerrno::JERR__NOTIMPL, "MessageStoreImpl", "appendContent");
 }
 
 void MessageStoreImpl::loadContent(const qpid::broker::PersistableQueue& /*queue*/,
@@ -1178,7 +1172,7 @@ void MessageStoreImpl::loadContent(const
                                    uint64_t /*offset*/,
                                    uint32_t /*length*/)
 {
-    throw qpid::qls_jrnl::jexception(qpid::qls_jrnl::jerrno::JERR__NOTIMPL, "MessageStoreImpl", "loadContent");
+    throw qpid::linearstore::journal::jexception(qpid::linearstore::journal::jerrno::JERR__NOTIMPL, "MessageStoreImpl", "loadContent");
 }
 
 void MessageStoreImpl::flush(const qpid::broker::PersistableQueue& queue_)
@@ -1193,7 +1187,7 @@ void MessageStoreImpl::flush(const qpid:
             // TODO: check if this result should be used...
             /*mrg::journal::iores res =*/ jc->flush();
         }
-    } catch (const qpid::qls_jrnl::jexception& e) {
+    } catch (const qpid::linearstore::journal::jexception& e) {
         THROW_STORE_EXCEPTION(std::string("Queue ") + qn + ": flush() failed: " + e.what() );
     }
 }
@@ -1268,7 +1262,7 @@ void MessageStoreImpl::store(const qpid:
         } else {
             THROW_STORE_EXCEPTION(std::string("MessageStoreImpl::store() failed: queue NULL."));
        }
-    } catch (const qpid::qls_jrnl::jexception& e) {
+    } catch (const qpid::linearstore::journal::jexception& e) {
         THROW_STORE_EXCEPTION(std::string("Queue ") + queue_->getName() + ": MessageStoreImpl::store() failed: " +
                               e.what());
     }
@@ -1328,7 +1322,7 @@ void MessageStoreImpl::async_dequeue(qpi
         } else {
             jc->dequeue_txn_data_record(ddtokp.get(), tid);
         }
-    } catch (const qpid::qls_jrnl::jexception& e) {
+    } catch (const qpid::linearstore::journal::jexception& e) {
         ddtokp->release();
         THROW_STORE_EXCEPTION(std::string("Queue ") + queue_.getName() + ": async_dequeue() failed: " + e.what());
     }

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.h?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/MessageStoreImpl.h Thu Nov 14 20:39:32 2013
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef QPID_LEGACYSTORE_MESSAGESTOREIMPL_H
-#define QPID_LEGACYSTORE_MESSAGESTOREIMPL_H
+#ifndef QPID_LINEARSTORE_MESSAGESTOREIMPL_H
+#define QPID_LINEARSTORE_MESSAGESTOREIMPL_H
 
 #include <iomanip>
 #include <string>
@@ -133,8 +133,8 @@ class MessageStoreImpl : public qpid::br
     IdSequence generalIdSequence;
     IdSequence messageIdSequence;
     std::string storeDir;
-    qpid::qls_jrnl::efpPartitionNumber_t defaultEfpPartitionNumber;
-    qpid::qls_jrnl::efpDataSize_kib_t defaultEfpFileSize_kib;
+    qpid::linearstore::journal::efpPartitionNumber_t defaultEfpPartitionNumber;
+    qpid::linearstore::journal::efpDataSize_kib_t defaultEfpFileSize_kib;
     bool      truncateFlag;
     uint32_t wCachePgSizeSblks;
     uint16_t wCacheNumPages;
@@ -145,7 +145,7 @@ class MessageStoreImpl : public qpid::br
     const char* envPath;
     qpid::broker::Broker* broker;
     JournalLogImpl jrnlLog;
-    boost::shared_ptr<qpid::qls_jrnl::EmptyFilePoolManager> efpMgr;
+    boost::shared_ptr<qpid::linearstore::journal::EmptyFilePoolManager> efpMgr;
 
     qmf::org::apache::qpid::linearstore::Store::shared_ptr mgmtObject;
     qpid::management::ManagementAgent* agent;
@@ -156,9 +156,9 @@ class MessageStoreImpl : public qpid::br
                                            const std::string& paramName/*,
                                            const uint16_t jrnlFsizePgs*/);
     static uint16_t getJrnlWrNumPages(const uint32_t wrPageSizeKiB);
-    static qpid::qls_jrnl::efpPartitionNumber_t chkEfpPartition(const qpid::qls_jrnl::efpPartitionNumber_t partition,
+    static qpid::linearstore::journal::efpPartitionNumber_t chkEfpPartition(const qpid::linearstore::journal::efpPartitionNumber_t partition,
                                                                 const std::string& paramName);
-    static qpid::qls_jrnl::efpDataSize_kib_t chkEfpFileSizeKiB(const qpid::qls_jrnl::efpDataSize_kib_t efpFileSizeKiB,
+    static qpid::linearstore::journal::efpDataSize_kib_t chkEfpFileSizeKiB(const qpid::linearstore::journal::efpDataSize_kib_t efpFileSizeKiB,
                                                               const std::string& paramName);
 
     void init();
@@ -233,8 +233,8 @@ class MessageStoreImpl : public qpid::br
     // journal functions
     void createJrnlQueue(const qpid::broker::PersistableQueue& queue);
     std::string getJrnlDir(const std::string& queueName);
-    qpid::qls_jrnl::EmptyFilePool* getEmptyFilePool(const qpid::qls_jrnl::efpPartitionNumber_t p, const qpid::qls_jrnl::efpDataSize_kib_t s);
-    qpid::qls_jrnl::EmptyFilePool* getEmptyFilePool(const qpid::framing::FieldTable& args);
+    qpid::linearstore::journal::EmptyFilePool* getEmptyFilePool(const qpid::linearstore::journal::efpPartitionNumber_t p, const qpid::linearstore::journal::efpDataSize_kib_t s);
+    qpid::linearstore::journal::EmptyFilePool* getEmptyFilePool(const qpid::framing::FieldTable& args);
     std::string getStoreTopLevelDir();
     std::string getJrnlBaseDir();
     std::string getBdbBaseDir();
@@ -268,8 +268,8 @@ class MessageStoreImpl : public qpid::br
     bool init(const qpid::Options* options);
 
     bool init(const std::string& dir,
-              qpid::qls_jrnl::efpPartitionNumber_t efpPartition = defEfpPartition,
-              qpid::qls_jrnl::efpDataSize_kib_t efpFileSizeKib = defEfpFileSizeKib,
+              qpid::linearstore::journal::efpPartitionNumber_t efpPartition = defEfpPartition,
+              qpid::linearstore::journal::efpDataSize_kib_t efpFileSizeKib = defEfpFileSizeKib,
               const bool truncateFlag = false,
               uint32_t wCachePageSize = defWCachePageSizeKib,
               uint32_t tplWCachePageSize = defTplWCachePageSizeKib);
@@ -365,4 +365,4 @@ class MessageStoreImpl : public qpid::br
 } // namespace msgstore
 } // namespace mrg
 
-#endif // ifndef QPID_LEGACYSTORE_MESSAGESTOREIMPL_H
+#endif // ifndef QPID_LINEARSTORE_MESSAGESTOREIMPL_H

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/PreparedTransaction.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/PreparedTransaction.h?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/PreparedTransaction.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/PreparedTransaction.h Thu Nov 14 20:39:32 2013
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef QPID_LEGACYSTORE_PREPAREDTRANSACTION_H
-#define QPID_LEGACYSTORE_PREPAREDTRANSACTION_H
+#ifndef QPID_LINEARSTORE_PREPAREDTRANSACTION_H
+#define QPID_LINEARSTORE_PREPAREDTRANSACTION_H
 
 #include <list>
 #include <map>
@@ -72,4 +72,4 @@ struct PreparedTransaction
 
 }}
 
-#endif // ifndef QPID_LEGACYSTORE_PREPAREDTRANSACTION_H
+#endif // ifndef QPID_LINEARSTORE_PREPAREDTRANSACTION_H

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/StoreException.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/StoreException.h?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/StoreException.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/StoreException.h Thu Nov 14 20:39:32 2013
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef QPID_LEGACYSTORE_STOREEXCEPTION_H
-#define QPID_LEGACYSTORE_STOREEXCEPTION_H
+#ifndef QPID_LINEARSTORE_STOREEXCEPTION_H
+#define QPID_LINEARSTORE_STOREEXCEPTION_H
 
 #include "qpid/linearstore/IdDbt.h"
 #include <boost/format.hpp>
@@ -53,4 +53,4 @@ public:
 
 }}
 
-#endif // ifndef QPID_LEGACYSTORE_STOREEXCEPTION_H
+#endif // ifndef QPID_LINEARSTORE_STOREEXCEPTION_H

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/TxnCtxt.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/TxnCtxt.cpp?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/TxnCtxt.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/TxnCtxt.cpp Thu Nov 14 20:39:32 2013
@@ -52,7 +52,7 @@ void TxnCtxt::commitTxn(JournalImpl* jc,
             } else {
                 jc->txn_abort(dtokp.get(), getXid());
             }
-        } catch (const qpid::qls_jrnl::jexception& e) {
+        } catch (const qpid::linearstore::journal::jexception& e) {
             THROW_STORE_EXCEPTION(std::string("Error commit") + e.what());
         }
     }
@@ -104,10 +104,10 @@ void TxnCtxt::sync() {
             if (preparedXidStorePtr)
                 jrnl_flush(preparedXidStorePtr);
             for (ipqItr i = impactedQueues.begin(); i != impactedQueues.end(); i++)
-                jrnl_sync(static_cast<JournalImpl*>(*i), &qpid::qls_jrnl::jcntl::_aio_cmpl_timeout);
+                jrnl_sync(static_cast<JournalImpl*>(*i), &qpid::linearstore::journal::jcntl::_aio_cmpl_timeout);
             if (preparedXidStorePtr)
-                jrnl_sync(preparedXidStorePtr, &qpid::qls_jrnl::jcntl::_aio_cmpl_timeout);
-        } catch (const qpid::qls_jrnl::jexception& e) {
+                jrnl_sync(preparedXidStorePtr, &qpid::linearstore::journal::jcntl::_aio_cmpl_timeout);
+        } catch (const qpid::linearstore::journal::jexception& e) {
             THROW_STORE_EXCEPTION(std::string("Error during txn sync: ") + e.what());
         }
     }
@@ -122,7 +122,7 @@ void TxnCtxt::jrnl_sync(JournalImpl* jc,
     if (!jc || jc->is_txn_synced(getXid()))
         return;
     while (jc->get_wr_aio_evt_rem()) {
-        if (jc->get_wr_events(timeout) == qpid::qls_jrnl::jerrno::AIO_TIMEOUT && timeout)
+        if (jc->get_wr_events(timeout) == qpid::linearstore::journal::jerrno::AIO_TIMEOUT && timeout)
             THROW_STORE_EXCEPTION(std::string("Error: timeout waiting for TxnCtxt::jrnl_sync()"));
     }
 }

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/TxnCtxt.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/TxnCtxt.h?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/TxnCtxt.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/TxnCtxt.h Thu Nov 14 20:39:32 2013
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef QPID_LEGACYSTORE_TXNCTXT_H
-#define QPID_LEGACYSTORE_TXNCTXT_H
+#ifndef QPID_LINEARSTORE_TXNCTXT_H
+#define QPID_LINEARSTORE_TXNCTXT_H
 
 #include "db-inc.h"
 #include <memory>
@@ -112,6 +112,6 @@ class TPCTxnCtxt : public TxnCtxt, publi
 
 }}
 
-#endif // ifndef QPID_LEGACYSTORE_TXNCTXT_H
+#endif // ifndef QPID_LINEARSTORE_TXNCTXT_H
 
 

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/AtomicCounter.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/AtomicCounter.h?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/AtomicCounter.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/AtomicCounter.h Thu Nov 14 20:39:32 2013
@@ -19,14 +19,15 @@
  *
  */
 
-#ifndef QPID_LINEARSTORE_ATOMICCOUNTER_H_
-#define QPID_LINEARSTORE_ATOMICCOUNTER_H_
+#ifndef QPID_LINEARSTORE_JOURNAL_ATOMICCOUNTER_H_
+#define QPID_LINEARSTORE_JOURNAL_ATOMICCOUNTER_H_
 
 #include "qpid/linearstore/jrnl/slock.h"
 #include <string>
 
 namespace qpid {
-namespace qls_jrnl {
+namespace linearstore {
+namespace journal {
 
 template <class T>
 class AtomicCounter
@@ -127,6 +128,6 @@ public:
     }
 };
 
-}} // namespace qpid::qls_jrnl
+}}} // namespace qpid::qls_jrnl
 
-#endif // QPID_LINEARSTORE_ATOMICCOUNTER_H_
+#endif // QPID_LINEARSTORE_JOURNAL_ATOMICCOUNTER_H_

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.cpp?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.cpp Thu Nov 14 20:39:32 2013
@@ -38,7 +38,8 @@
 //#include <iostream> // DEBUG
 
 namespace qpid {
-namespace qls_jrnl {
+namespace linearstore {
+namespace journal {
 
 EmptyFilePool::EmptyFilePool(const std::string& efpDirectory,
                              const EmptyFilePoolPartition* partitionPtr,
@@ -338,4 +339,4 @@ int EmptyFilePool::moveEmptyFile(const s
     return 0;
 }
 
-}} // namespace qpid::qls_jrnl
+}}}

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.h?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePool.h Thu Nov 14 20:39:32 2013
@@ -19,15 +19,14 @@
  *
  */
 
-#ifndef QPID_QLS_JRNL_EMPTYFILEPOOL_H_
-#define QPID_QLS_JRNL_EMPTYFILEPOOL_H_
+#ifndef QPID_LINEARSTORE_JOURNAL_EMPTYFILEPOOL_H_
+#define QPID_LINEARSTORE_JOURNAL_EMPTYFILEPOOL_H_
 
 namespace qpid {
-namespace qls_jrnl {
-
+namespace linearstore {
+namespace journal {
     class EmptyFilePool;
-
-}} // namespace qpid::qls_jrnl
+}}}
 
 #include <deque>
 #include "qpid/linearstore/jrnl/EmptyFilePoolTypes.h"
@@ -35,7 +34,8 @@ namespace qls_jrnl {
 #include <string>
 
 namespace qpid {
-namespace qls_jrnl {
+namespace linearstore {
+namespace journal {
 class EmptyFilePoolPartition;
 class jdir;
 class JournalFile;
@@ -92,6 +92,6 @@ protected:
                              const std::string& toFqPath);
 };
 
-}} // namespace qpid::qls_jrnl
+}}}
 
-#endif /* QPID_QLS_JRNL_EMPTYFILEPOOL_H_ */
+#endif /* QPID_LINEARSTORE_JOURNAL_EMPTYFILEPOOL_H_ */

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolManager.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolManager.cpp?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolManager.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolManager.cpp Thu Nov 14 20:39:32 2013
@@ -31,7 +31,8 @@
 //#include <iostream> // DEBUG
 
 namespace qpid {
-namespace qls_jrnl {
+namespace linearstore {
+namespace journal {
 
 EmptyFilePoolManager::EmptyFilePoolManager(const std::string& qlsStorePath,
                                            const efpPartitionNumber_t defaultPartitionNumber,
@@ -92,8 +93,8 @@ void EmptyFilePoolManager::findEfpPartit
     }
 
     journalLogRef_.log(JournalLog::LOG_NOTICE, "EFP Manager initialization complete");
-    std::vector<qpid::qls_jrnl::EmptyFilePoolPartition*> partitionList;
-    std::vector<qpid::qls_jrnl::EmptyFilePool*> filePoolList;
+    std::vector<qpid::linearstore::journal::EmptyFilePoolPartition*> partitionList;
+    std::vector<qpid::linearstore::journal::EmptyFilePool*> filePoolList;
     getEfpPartitions(partitionList);
     if (partitionList.size() == 0) {
         journalLogRef_.log(JournalLog::LOG_WARN, "NO EFP PARTITIONS FOUND! No queue creation is possible.");
@@ -101,14 +102,14 @@ void EmptyFilePoolManager::findEfpPartit
         std::stringstream oss;
         oss << "> EFP Partitions found: " << partitionList.size();
         journalLogRef_.log(JournalLog::LOG_INFO, oss.str());
-        for (std::vector<qpid::qls_jrnl::EmptyFilePoolPartition*>::const_iterator i=partitionList.begin(); i!= partitionList.end(); ++i) {
+        for (std::vector<qpid::linearstore::journal::EmptyFilePoolPartition*>::const_iterator i=partitionList.begin(); i!= partitionList.end(); ++i) {
             filePoolList.clear();
             (*i)->getEmptyFilePools(filePoolList);
             std::stringstream oss;
             oss << "  * Partition " << (*i)->getPartitionNumber() << " containing " << filePoolList.size()
                 << " pool" << (filePoolList.size()>1 ? "s" : "") << " at \'" << (*i)->getPartitionDirectory() << "\'";
             journalLogRef_.log(JournalLog::LOG_INFO, oss.str());
-            for (std::vector<qpid::qls_jrnl::EmptyFilePool*>::const_iterator j=filePoolList.begin(); j!=filePoolList.end(); ++j) {
+            for (std::vector<qpid::linearstore::journal::EmptyFilePool*>::const_iterator j=filePoolList.begin(); j!=filePoolList.end(); ++j) {
                 std::ostringstream oss;
                 oss << "    - EFP \'" << (*j)->dataSize_kib() << "k\' containing " << (*j)->numEmptyFiles() <<
                               " files of size " << (*j)->dataSize_kib() << " KiB totaling " << (*j)->cumFileSize_kib() << " KiB";
@@ -208,4 +209,4 @@ uint16_t EmptyFilePoolManager::getNumEfp
     return partitionMap_.size();
 }
 
-}} // namespace qpid::qls_jrnl
+}}}

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolManager.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolManager.h?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolManager.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolManager.h Thu Nov 14 20:39:32 2013
@@ -27,7 +27,8 @@
 #include "qpid/linearstore/jrnl/smutex.h"
 
 namespace qpid {
-namespace qls_jrnl {
+namespace linearstore {
+namespace journal {
 
 class EmptyFilePoolManager
 {
@@ -66,6 +67,6 @@ public:
     uint16_t getNumEfpPartitions() const;
 };
 
-}} // namespace qpid::qls_jrnl
+}}}
 
 #endif /* QPID_QLS_JRNL_EMPTYFILEPOOLMANAGER_H_ */

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolPartition.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolPartition.cpp?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolPartition.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolPartition.cpp Thu Nov 14 20:39:32 2013
@@ -31,7 +31,8 @@
 //#include <iostream> // DEBUG
 
 namespace qpid {
-namespace qls_jrnl {
+namespace linearstore {
+namespace journal {
 
 // static
 const std::string EmptyFilePoolPartition::s_efpTopLevelDir_("efp"); // Sets the top-level efp dir within a partition
@@ -151,4 +152,4 @@ void EmptyFilePoolPartition::validatePar
     // TODO: other validity checks here
 }
 
-}} // namespace qpid::qls_jrnl
+}}}

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolPartition.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolPartition.h?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolPartition.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolPartition.h Thu Nov 14 20:39:32 2013
@@ -19,15 +19,14 @@
  *
  */
 
-#ifndef QPID_QLS_JRNL_EMPTYFILEPOOLPARTITION_H_
-#define QPID_QLS_JRNL_EMPTYFILEPOOLPARTITION_H_
+#ifndef QPID_LINEARSTORE_JOURNAL_EMPTYFILEPOOLPARTITION_H_
+#define QPID_LINEARSTORE_JOURNAL_EMPTYFILEPOOLPARTITION_H_
 
 namespace qpid {
-namespace qls_jrnl {
-
+namespace linearstore {
+namespace journal {
     class EmptyFilePoolPartition;
-
-}} // namespace qpid::qls_jrnl
+}}}
 
 #include "qpid/linearstore/jrnl/EmptyFilePool.h"
 #include "qpid/linearstore/jrnl/EmptyFilePoolTypes.h"
@@ -37,7 +36,8 @@ namespace qls_jrnl {
 #include <vector>
 
 namespace qpid {
-namespace qls_jrnl {
+namespace linearstore {
+namespace journal {
 class JournalLog;
 
 class EmptyFilePoolPartition
@@ -75,6 +75,6 @@ protected:
     void validatePartitionDir();
 };
 
-}} // namespace qpid::qls_jrnl
+}}}
 
-#endif /* QPID_QLS_JRNL_EMPTYFILEPOOLPARTITION_H_ */
+#endif /* QPID_LINEARSTORE_JOURNAL_EMPTYFILEPOOLPARTITION_H_ */

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolTypes.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolTypes.h?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolTypes.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/EmptyFilePoolTypes.h Thu Nov 14 20:39:32 2013
@@ -19,15 +19,16 @@
  *
  */
 
-#ifndef QPID_QLS_JRNL_EMPTYFILEPOOLTYPES_H_
-#define QPID_QLS_JRNL_EMPTYFILEPOOLTYPES_H_
+#ifndef QPID_LINEARSTORE_JOURNAL_EMPTYFILEPOOLTYPES_H_
+#define QPID_LINEARSTORE_JOURNAL_EMPTYFILEPOOLTYPES_H_
 
 #include <iostream>
 #include <stdint.h>
 #include <utility> // std::pair
 
 namespace qpid {
-namespace qls_jrnl {
+namespace linearstore {
+namespace journal {
 
 typedef uint64_t efpDataSize_kib_t;     ///< Size of data part of file (excluding file header) in kib
 typedef uint64_t efpFileSize_kib_t;     ///< Size of file (header + data) in kib
@@ -41,9 +42,10 @@ typedef struct efpIdentity_t {
     efpDataSize_kib_t ds_;
     efpIdentity_t() : pn_(0), ds_(0) {}
     efpIdentity_t(efpPartitionNumber_t pn, efpDataSize_kib_t ds) : pn_(pn), ds_(ds) {}
+    efpIdentity_t(const efpIdentity_t& ei) : pn_(ei.pn_), ds_(ei.ds_) {}
     friend std::ostream& operator<<(std::ostream& os, efpIdentity_t& id) { os << "[" << id.pn_ << "," << id.ds_ << "]"; return os; }
 } efpIdentity_t;
 
-}} // namespace qpid::qls_jrnl
+}}}
 
-#endif /* QPID_QLS_JRNL_EMPTYFILEPOOLTYPES_H_ */
+#endif /* QPID_LINEARSTORE_JOURNAL_EMPTYFILEPOOLTYPES_H_ */

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/JournalFile.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/JournalFile.cpp?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/JournalFile.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/JournalFile.cpp Thu Nov 14 20:39:32 2013
@@ -31,18 +31,23 @@
 //#include <iostream> // DEBUG
 
 namespace qpid {
-namespace qls_jrnl {
+namespace linearstore {
+namespace journal {
 
 JournalFile::JournalFile(const std::string& fqFileName,
-                         const ::file_hdr_t& fileHeader) :
+                         const efpIdentity_t& efpIdentity,
+                         const uint64_t fileSeqNum) :
+            efpIdentity_(efpIdentity),
             fqFileName_(fqFileName),
-            fileSeqNum_(fileHeader._file_number),
+            fileSeqNum_(fileSeqNum),
+            serial_(getRandom64()),
+            firstRecordOffset_(0ULL),
             fileHandle_(-1),
             fileCloseFlag_(false),
             fileHeaderBasePtr_ (0),
             fileHeaderPtr_(0),
             aioControlBlockPtr_(0),
-            fileSize_dblks_(((fileHeader._data_size_kib * 1024) + (QLS_JRNL_FHDR_RES_SIZE_SBLKS * QLS_SBLK_SIZE_BYTES)) / QLS_DBLK_SIZE_BYTES),
+            fileSize_dblks_(((efpIdentity.ds_ * 1024) + (QLS_JRNL_FHDR_RES_SIZE_SBLKS * QLS_SBLK_SIZE_BYTES)) / QLS_DBLK_SIZE_BYTES),
             enqueuedRecordCount_("JournalFile::enqueuedRecordCount", 0),
             submittedDblkCount_("JournalFile::submittedDblkCount", 0),
             completedDblkCount_("JournalFile::completedDblkCount", 0),
@@ -50,16 +55,18 @@ JournalFile::JournalFile(const std::stri
 {}
 
 JournalFile::JournalFile(const std::string& fqFileName,
-                         const uint64_t fileSeqNum,
-                         const efpDataSize_kib_t efpDataSize_kib) :
+                         const ::file_hdr_t& fileHeader) :
+            efpIdentity_(fileHeader._efp_partition, fileHeader._data_size_kib),
             fqFileName_(fqFileName),
-            fileSeqNum_(fileSeqNum),
+            fileSeqNum_(fileHeader._file_number),
+            serial_(fileHeader._rhdr._serial),
+            firstRecordOffset_(fileHeader._fro),
             fileHandle_(-1),
             fileCloseFlag_(false),
             fileHeaderBasePtr_ (0),
             fileHeaderPtr_(0),
             aioControlBlockPtr_(0),
-            fileSize_dblks_(((efpDataSize_kib * 1024) + (QLS_JRNL_FHDR_RES_SIZE_SBLKS * QLS_SBLK_SIZE_BYTES)) / QLS_DBLK_SIZE_BYTES),
+            fileSize_dblks_(((fileHeader._data_size_kib * 1024) + (QLS_JRNL_FHDR_RES_SIZE_SBLKS * QLS_SBLK_SIZE_BYTES)) / QLS_DBLK_SIZE_BYTES),
             enqueuedRecordCount_("JournalFile::enqueuedRecordCount", 0),
             submittedDblkCount_("JournalFile::submittedDblkCount", 0),
             completedDblkCount_("JournalFile::completedDblkCount", 0),
@@ -108,6 +115,10 @@ uint64_t JournalFile::getFileSeqNum() co
     return fileSeqNum_;
 }
 
+uint64_t JournalFile::getSerial() const {
+    return serial_;
+}
+
 int JournalFile::open() {
     fileHandle_ = ::open(fqFileName_.c_str(), O_WRONLY | O_DIRECT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); // 0644 -rw-r--r--
     if (fileHandle_ < 0) {
@@ -141,10 +152,12 @@ void JournalFile::asyncFileHeaderWrite(i
                                        const uint64_t recordId,
                                        const uint64_t firstRecordOffset,
                                        const std::string queueName) {
+    firstRecordOffset_ = firstRecordOffset;
     ::file_hdr_create(fileHeaderPtr_, QLS_FILE_MAGIC, QLS_JRNL_VERSION, QLS_JRNL_FHDR_RES_SIZE_SBLKS, efpPartitionNumber, efpDataSize_kib);
     ::file_hdr_init(fileHeaderBasePtr_,
                     QLS_JRNL_FHDR_RES_SIZE_SBLKS * QLS_SBLK_SIZE_KIB * 1024,
                     userFlags,
+                    serial_,
                     recordId,
                     firstRecordOffset,
                     fileSeqNum_,
@@ -208,6 +221,18 @@ uint16_t JournalFile::decrOutstandingAio
     return r;
 }
 
+efpIdentity_t JournalFile::getEfpIdentity() const {
+    return efpIdentity_;
+}
+
+uint64_t JournalFile::getFirstRecordOffset() const {
+    return firstRecordOffset_;
+}
+
+void JournalFile::setFirstRecordOffset(const uint64_t firstRecordOffset) {
+    firstRecordOffset_ = firstRecordOffset;
+}
+
 // --- Status helper functions ---
 
 bool JournalFile::isEmpty() const {
@@ -253,6 +278,22 @@ const std::string JournalFile::getFileNa
     return fqFileName_.substr(fqFileName_.rfind('/')+1);
 }
 
+//static
+uint64_t JournalFile::getRandom64() {
+    int randomData = ::open("/dev/random", O_RDONLY);
+    if (randomData < 0) {
+        throw jexception(); // TODO: Complete exception details
+    }
+    uint64_t randomNumber;
+    ::size_t size = sizeof(randomNumber);
+    ::ssize_t result = ::read(randomData, (char*)&randomNumber, size);
+    if (result < 0 || result != ssize_t(size)) {
+        throw jexception(); // TODO: Complete exception details
+    }
+    ::close(randomData);
+    return randomNumber;
+}
+
 bool JournalFile::isOpen() const {
     return fileHandle_ >= 0;
 }
@@ -298,4 +339,4 @@ bool JournalFile::isFullAndComplete() co
 }
 
 
-}} // namespace qpid::qls_jrnl
+}}}

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/JournalFile.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/JournalFile.h?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/JournalFile.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/JournalFile.h Thu Nov 14 20:39:32 2013
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef QPID_LINEARSTORE_JOURNALFILE_H_
-#define QPID_LINEARSTORE_JOURNALFILE_H_
+#ifndef QPID_LINEARSTORE_JOURNAL_JOURNALFILE_H_
+#define QPID_LINEARSTORE_JOURNAL_JOURNALFILE_H_
 
 #include "qpid/linearstore/jrnl/aio.h"
 #include "qpid/linearstore/jrnl/AtomicCounter.h"
@@ -31,13 +31,17 @@
 class file_hdr_t;
 
 namespace qpid {
-namespace qls_jrnl {
+namespace linearstore {
+namespace journal {
 
 class JournalFile
 {
 protected:
+    const efpIdentity_t efpIdentity_;
     const std::string fqFileName_;
     const uint64_t fileSeqNum_;
+    const uint64_t serial_;
+    uint64_t firstRecordOffset_;
     int fileHandle_;
     bool fileCloseFlag_;
     void* fileHeaderBasePtr_;
@@ -51,11 +55,13 @@ protected:
     AtomicCounter<uint16_t> outstandingAioOpsCount_;    ///< Outstanding AIO operations on this file
 
 public:
+    // Constructor for creating new file with known fileSeqNum and random serial
     JournalFile(const std::string& fqFileName,
-                const ::file_hdr_t& fileHeader);
+                const efpIdentity_t& efpIdentity,
+                const uint64_t fileSeqNum);
+    // Constructor for recovery in which fileSeqNum and serial are recovered from fileHeader param
     JournalFile(const std::string& fqFileName,
-                const uint64_t fileSeqNum,
-                const efpDataSize_kib_t efpDataSize_kib);
+                const ::file_hdr_t& fileHeader);
     virtual ~JournalFile();
 
     void initialize(const uint32_t completedDblkCount);
@@ -63,6 +69,7 @@ public:
 
     const std::string getFqFileName() const;
     uint64_t getFileSeqNum() const;
+    uint64_t getSerial() const;
 
     int open();
     void close();
@@ -87,6 +94,10 @@ public:
     uint16_t getOutstandingAioOperationCount() const;
     uint16_t decrOutstandingAioOperationCount();
 
+    efpIdentity_t getEfpIdentity() const;
+    uint64_t getFirstRecordOffset() const;
+    void setFirstRecordOffset(const uint64_t firstRecordOffset);
+
     // Status helper functions
     bool isEmpty() const;                      ///< True if no writes of any kind have occurred
     bool isNoEnqueuedRecordsRemaining() const; ///< True when all enqueued records (or parts) have been dequeued
@@ -97,6 +108,7 @@ public:
 protected:
     const std::string getDirectory() const;
     const std::string getFileName() const;
+    static uint64_t getRandom64();
     bool isOpen() const;
 
     uint32_t getSubmittedDblkCount() const;
@@ -114,6 +126,6 @@ protected:
     bool isFullAndComplete() const;            ///< True if all submitted dblks have returned from AIO
 };
 
-}} // namespace qpid::qls_jrnl
+}}}
 
-#endif // QPID_LINEARSTORE_JOURNALFILE_H_
+#endif // QPID_LINEARSTORE_JOURNAL_JOURNALFILE_H_

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/JournalLog.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/JournalLog.cpp?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/JournalLog.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/JournalLog.cpp Thu Nov 14 20:39:32 2013
@@ -23,7 +23,8 @@
 #include <iostream>
 
 namespace qpid {
-namespace qls_jrnl {
+namespace linearstore {
+namespace journal {
 
 JournalLog::JournalLog(log_level_t logLevelThreshold) : logLevelThreshold_(logLevelThreshold) {}
 
@@ -58,4 +59,4 @@ const char* JournalLog::log_level_str(lo
     return "<log level unknown>";
 }
 
-}} // namespace qpid::qls_jrnl
+}}}

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/JournalLog.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/JournalLog.h?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/JournalLog.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/JournalLog.h Thu Nov 14 20:39:32 2013
@@ -19,13 +19,14 @@
  *
  */
 
-#ifndef QPID_LINEARSTORE_JOURNALLOG_H_
-#define QPID_LINEARSTORE_JOURNALLOG_H_
+#ifndef QPID_LINEARSTORE_JOURNAL_JOURNALLOG_H_
+#define QPID_LINEARSTORE_JOURNAL_JOURNALLOG_H_
 
 #include <string>
 
 namespace qpid {
-namespace qls_jrnl {
+namespace linearstore {
+namespace journal {
 
 class JournalLog
 {
@@ -54,6 +55,6 @@ public:
     static const char* log_level_str(const log_level_t logLevel);
 };
 
-}} // namespace qpid::qls_jrnl
+}}}
 
-#endif // QPID_LINEARSTORE_JOURNALLOG_H_
+#endif // QPID_LINEARSTORE_JOURNAL_JOURNALLOG_H_

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/LinearFileController.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/LinearFileController.cpp?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/LinearFileController.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/LinearFileController.cpp Thu Nov 14 20:39:32 2013
@@ -32,7 +32,8 @@
 //#include <iostream> // DEBUG
 
 namespace qpid {
-namespace qls_jrnl {
+namespace linearstore {
+namespace journal {
 
 LinearFileController::LinearFileController(jcntl& jcntlRef) :
             jcntlRef_(jcntlRef),
@@ -90,7 +91,7 @@ void LinearFileController::pullEmptyFile
         currentJournalFilePtr_->close();
     std::string ef = emptyFilePoolPtr_->takeEmptyFile(journalDirectory_); // Moves file from EFP only, returns new file name
 //std::cout << "*** LinearFileController::pullEmptyFileFromEfp() qn=" << jcntlRef.id() << " ef=" << ef << std::endl; // DEBUG
-    addJournalFile(ef, getNextFileSeqNum(), emptyFilePoolPtr_->dataSize_kib(), 0);
+    addJournalFile(ef, emptyFilePoolPtr_->getIdentity(), getNextFileSeqNum(), 0);
 }
 
 void LinearFileController::purgeEmptyFilesToEfp() {
@@ -149,6 +150,11 @@ uint64_t LinearFileController::getCurren
     return currentJournalFilePtr_->getFileSeqNum();
 }
 
+uint64_t LinearFileController::getCurrentSerial() const {
+    assertCurrentJournalFileValid("getCurrentSerial");
+    return currentJournalFilePtr_->getSerial();
+}
+
 bool LinearFileController::isEmpty() const {
     assertCurrentJournalFileValid("isEmpty");
     return currentJournalFilePtr_->isEmpty();
@@ -173,10 +179,10 @@ const std::string LinearFileController::
 // --- protected functions ---
 
 void LinearFileController::addJournalFile(const std::string& fileName,
+                                          const efpIdentity_t& efpIdentity,
                                           const uint64_t fileNumber,
-                                          const uint32_t fileSize_kib,
                                           const uint32_t completedDblkCount) {
-    JournalFile* jfp = new JournalFile(fileName, fileNumber, fileSize_kib);
+    JournalFile* jfp = new JournalFile(fileName, efpIdentity, fileNumber);
     addJournalFile(jfp, completedDblkCount);
 }
 
@@ -219,4 +225,4 @@ void LinearFileController::purgeEmptyFil
     }
 }
 
-}} // namespace qpid::qls_jrnl
+}}}

Modified: qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/LinearFileController.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/LinearFileController.h?rev=1542066&r1=1542065&r2=1542066&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/LinearFileController.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/linearstore/jrnl/LinearFileController.h Thu Nov 14 20:39:32 2013
@@ -19,8 +19,8 @@
  *
  */
 
-#ifndef QPID_LINEARSTORE_LINEARFILECONTROLLER_H_
-#define QPID_LINEARSTORE_LINEARFILECONTROLLER_H_
+#ifndef QPID_LINEARSTORE_JOURNAL_LINEARFILECONTROLLER_H_
+#define QPID_LINEARSTORE_JOURNAL_LINEARFILECONTROLLER_H_
 
 #include <deque>
 #include "qpid/linearstore/jrnl/AtomicCounter.h"
@@ -31,7 +31,8 @@ typedef struct io_context* io_context_t;
 typedef struct iocb aio_cb;
 
 namespace qpid {
-namespace qls_jrnl {
+namespace linearstore {
+namespace journal {
 
 class EmptyFilePool;
 class jcntl;
@@ -90,6 +91,7 @@ public:
                         uint32_t dataSize_dblks);
 
     uint64_t getCurrentFileSeqNum() const;
+    uint64_t getCurrentSerial() const;
     bool isEmpty() const;
 
     // Debug aid
@@ -97,8 +99,8 @@ public:
 
 protected:
     void addJournalFile(const std::string& fileName,
+                        const efpIdentity_t& efpIdentity,
                         const uint64_t fileNumber,
-                        const uint32_t fileSize_kib,
                         const uint32_t completedDblkCount);
     void assertCurrentJournalFileValid(const char* const functionName) const;
     bool checkCurrentJournalFileValid() const;
@@ -110,6 +112,6 @@ protected:
 typedef void (LinearFileController::*lfcAddJournalFileFn)(JournalFile* journalFilePtr,
                                                           const uint32_t completedDblkCount);
 
-}} // namespace qpid::qls_jrnl
+}}}
 
-#endif // QPID_LINEARSTORE_LINEARFILECONTROLLER_H_
+#endif // QPID_LINEARSTORE_JOURNAL_LINEARFILECONTROLLER_H_



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org