From caee572ff94822ca2ed354fcb79ca04ed9adf388 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 5 Aug 2024 12:44:59 -0700 Subject: Perhaps fixed a Myriad race condition. If so, this will fix the issue where streams randomly truncate when accessed by multiple threads. --- src/unstable/myriadfs.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/unstable/myriadfs.cpp') diff --git a/src/unstable/myriadfs.cpp b/src/unstable/myriadfs.cpp index b24997a..991c21d 100644 --- a/src/unstable/myriadfs.cpp +++ b/src/unstable/myriadfs.cpp @@ -476,7 +476,7 @@ Bu::MyriadFs::Dir Bu::MyriadFs::readDir( int32_t iNode ) Bu::MyriadStream is = mStore.openStream( 2 ); Dir lDir; - sio << "Reading dir " << iNode << ", " << iNumChildren << " entries:" << sio.nl; + // sio << "Reading dir " << iNode << ", " << iNumChildren << " entries:" << sio.nl; for( int32_t j = 0; j < iNumChildren; j++ ) { int32_t iChildNode = 0; @@ -485,7 +485,6 @@ Bu::MyriadFs::Dir Bu::MyriadFs::readDir( int32_t iNode ) throw Bu::MyriadFsException( "Failed to read iChildNode from directory."); } - Bu::println(" - iNode = %1").arg( iChildNode ); Stat s; stat( iChildNode, s, is ); uint8_t uLen; @@ -494,14 +493,12 @@ Bu::MyriadFs::Dir Bu::MyriadFs::readDir( int32_t iNode ) throw Bu::MyriadFsException( "Failed to read uLen from directory."); } - Bu::println(" - Name bytes = %1").arg( uLen ); s.sName.setSize( uLen ); if( ms.read( s.sName.getStr(), uLen ) < uLen ) { throw Bu::MyriadFsException( "Failed to read sName from directory."); } - Bu::println(" - Name = \"%1\"").arg( s.sName ); lDir.append( s ); // sio << " " << s.sName << sio.nl; @@ -519,8 +516,6 @@ Bu::MyriadStream Bu::MyriadFs::openByInode( int32_t iNode ) case typeDir: case typeSymLink: case typeRegFile: - Bu::println("Opening stream by iNode=%1, myriad stream=%2") - .arg( iNode ).arg( rs.uStreamIndex ); return mStore.openStream( rs.uStreamIndex ); default: -- cgit v1.2.3