From 461fe80c5ca7b1abaa35d9ae52558be63c559c31 Mon Sep 17 00:00:00 2001 From: Dmitry Zuykov Date: Mon, 12 May 2025 12:46:45 +0300 Subject: [PATCH] wip, deleted code --- hbs2-storage-ncq/lib/HBS2/Storage/NCQ.hs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/hbs2-storage-ncq/lib/HBS2/Storage/NCQ.hs b/hbs2-storage-ncq/lib/HBS2/Storage/NCQ.hs index 1bf0a922..d57cb224 100644 --- a/hbs2-storage-ncq/lib/HBS2/Storage/NCQ.hs +++ b/hbs2-storage-ncq/lib/HBS2/Storage/NCQ.hs @@ -120,7 +120,6 @@ data NCQStorage = , ncqLastWritten :: TVar TimeSpec , ncqCurrentHandleW :: TVar Fd , ncqCurrentHandleR :: TVar Fd - , ncqDeletedW :: TVar Fd , ncqCurrentUsage :: TVar (IntMap Int) , ncqCurrentReadReq :: TVar (Seq (Fd, Word64, Word64, TMVar ByteString)) , ncqFlushNow :: TVar [TQueue ()] @@ -294,7 +293,6 @@ ncqStorageRun ncq@NCQStorage{..} = flip runContT pure do ContT $ bracket none $ const $ liftIO do -- writeJournal syncData readTVarIO ncqCurrentHandleW >>= closeFd - readTVarIO ncqDeletedW >>= closeFd debug "RUNNING STORAGE!" @@ -892,7 +890,6 @@ ncqStorageInit_ check path = do when hereCurrent $ liftIO do let ncqCurrentHandleW = undefined let ncqCurrentHandleR = undefined - let ncqDeletedW = undefined let ncq0 = NCQStorage{..} lastSz <- try @_ @IOException (BS.readFile currentSize) @@ -922,16 +919,12 @@ ncqStorageInit_ check path = do debug $ "currentFileName" <+> pretty (ncqGetCurrentName_ path ncqGen) - ncqDeletedW <- newTVarIO undefined let ncq = NCQStorage{..} touch (ncqGetRefsDataFileName ncq) touch (ncqGetDeletedFileName ncq) - liftIO (PosixBase.openFd (ncqGetDeletedFileName ncq) Posix.WriteOnly flags { append = True}) - >>= atomically . writeTVar ncqDeletedW - pure ncq