@@ -34,7 +34,7 @@ use crate::{
3434 fs:: { meta:: raw_outboard_size, TaskContext } ,
3535 util:: {
3636 read_checksummed_and_truncate, write_checksummed, FixedSize , MemOrFile ,
37- PartialMemStorage , SizeInfo , SparseMemFile , DD ,
37+ PartialMemStorage , DD ,
3838 } ,
3939 Hash , IROH_BLOCK_SIZE ,
4040 } ,
@@ -531,21 +531,11 @@ impl BaoFileHandle {
531531 if Arc :: strong_count ( & self . 0 ) > 1 {
532532 return false ;
533533 }
534- // there is the possibility that somebody else will increase the strong count
535- // here. there is nothing we can do about it, but they won't be able to
536- // access the internals of the handle because we have the lock.
537- //
538- // We poison the storage. A poisoned storage is considered dead and will
539- // have to be recreated, but only *after* we are done with persisting
540- // the bitfield.
541534 let BaoFileStorage :: Partial ( fs) = guard. take ( ) else {
542535 return false ;
543536 } ;
544537 let options = & self . options ;
545538 let path = options. path . bitfield_path ( & self . hash ) ;
546- if fs. bitfield . size == 8000000 {
547- println ! ( "PERSISTING THE TEST CASE FILE to {}" , path. display( ) ) ;
548- }
549539 trace ! (
550540 "writing bitfield for hash {} to {}" ,
551541 self . hash,
@@ -768,7 +758,7 @@ impl BaoFileHandle {
768758}
769759
770760impl PartialMemStorage {
771- /// Persist the batch to disk, creating a FileBatch .
761+ /// Persist the batch to disk.
772762 fn persist ( self , ctx : & TaskContext , hash : & Hash ) -> io:: Result < PartialFileStorage > {
773763 let options = & ctx. options . path ;
774764 ctx. protect . protect (
@@ -796,12 +786,6 @@ impl PartialMemStorage {
796786 bitfield : self . bitfield ,
797787 } )
798788 }
799-
800- /// Get the parts data, outboard and sizes
801- #[ allow( dead_code) ]
802- pub fn into_parts ( self ) -> ( SparseMemFile , SparseMemFile , SizeInfo ) {
803- ( self . data , self . outboard , self . size )
804- }
805789}
806790
807791pub struct BaoFileStorageSubscriber {
0 commit comments