w      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'copy a BinArray onto another BinArray. 9 Requires that the target be the same size, or bigger. ?The addressing is done by Word32 blocks, not the byte address. ?The addressing is done by Word32 blocks, not the byte address.  ,Split the path into directory and file name  Examples: [Posix]  . splitFileName "/" == ("/", "") 5 splitFileName "/foo/bar.ext" == ("/foo", "bar.ext") 5 splitFileName "bar.ext" == (".", "bar.ext") / splitFileName "/foo/." == ("/foo", ".") 0 splitFileName "/foo/.." == ("/foo", "..") [Windows]  5 splitFileName "\\" == ("\\", "") < splitFileName "c:\\foo\\bar.ext" == ("c:\\foo", "bar.ext") < splitFileName "bar.ext" == (".", "bar.ext") 6 splitFileName "c:\\foo\\." == ("c:\\foo", ".") 7 splitFileName "c:\\foo\\.." == ("c:\\foo", "..") AThe first case in the above examples returns an empty file name. $ This is a special case because the "/" ("\\" on Windows)  path doesn'8t refer to an object (file or directory) which resides  within a directory. >Split the path into file name and extension. If the file doesn't have extension, ; the function will return empty string. The extension doesn't include a leading period.  Examples: * splitFileExt "foo.ext" == ("foo", "ext") ' splitFileExt "foo" == ("foo", "") ' splitFileExt "." == (".", "") ' splitFileExt ".." == ("..", "") 9Split the path into directory, file name and extension. A The function is an optimized version of the following equation: % splitFilePath path = (dir,name,ext)  where ) (dir,basename) = splitFileName path - (name,ext) = splitFileExt basename The  function is the opposite of . ? It joins directory and file names to form complete file path. The general rule is:  % dir `joinFileName` basename == path  where ) (dir,basename) = splitFileName path <There might be an exeptions to the rule but in any case the G reconstructed path will refer to the same object (file or directory). I An example exception is that on Windows some slashes might be converted  to backslashes. The  function is the opposite of . > It joins file name and extension to form complete file path. The general rule is: $ filename `joinFileExt` ext == path  where ( (filename,ext) = splitFileExt path Given a directory path "dir" and a file/directory path "rel",  returns a merged path "full" with the property that 2 (cd dir; do_something_with rel) is equivalent to " (do_something_with full). If the "rel" path is an absolute path $ then the returned path is equal to "rel" &Changes the extension of a file path. On Unix and Macintosh the  function is a synonym to . W The difference is important only on Windows. The rooted path must start from the root X directory but may not include the drive letter while the absolute path always includes * the drive letter and the full file path. Returns True if this path'#s meaning is independent of any OS  working directory, False if it isn't. $Gets this path and all its parents. 7 The function is useful in case if you want to create  some file but you aren' t sure whether all directories C in the path exists or if you want to search upward for some file. Some examples: [Posix]  $ pathParents "/" == ["/"] - pathParents "/dir1" == ["/", "/dir1"] ; pathParents "/dir1/dir2" == ["/", "/dir1", "/dir1/dir2"] , pathParents "dir1" == [".", "dir1"] 9 pathParents "dir1/dir2" == [".", "dir1", "dir1/dir2"] In the above examples "/" isn't included in the list  because you can't create root directory. [Windows]  * pathParents "c:" == ["c:."] + pathParents "c:\\" == ["c:\\"] 7 pathParents "c:\\dir1" == ["c:\\", "c:\\dir1"] I pathParents "c:\\dir1\\dir2" == ["c:\\", "c:\\dir1", "c:\\dir1\\dir2"] 3 pathParents "c:dir1" == ["c:.","c:dir1"] > pathParents "dir1\\dir2" == [".", "dir1", "dir1\\dir2"] BNote that if the file is relative then the the current directory (".")  will be explicitly listed. ?Given a list of file paths, returns the longest common parent. 3The function splits the given string to substrings  using the . 4The function concatenates the given paths to form a 2 single string where the paths are separated with . NChecks whether the character is a valid path separator for the host platform.  The valid character is a ) but since the Windows operating system  also accepts a backslash ("\") the function also checks for "/" on this platform. OProvides a platform-specific character used to separate directory levels in a D path string that reflects a hierarchical file system organization.  The separator is a slash ("/"*) on Unix and Macintosh, and a backslash ("\" ) on the  Windows operating system. GA platform-specific character used to separate search path strings in 2 environment variables. The separator is a colon (":") on Unix and Macintosh,  and a semicolon (";"#) on the Windows operating system. "Hugs, GHC (Uses existential types)alpha$Isaac Jones <isaac.jones@aetion.com>Either HUnit or QuickCheck AExtra constructor is required. Uses the existential constructor - feature so we can have heterogeneous lists. Beautify this test label. +Print out the test label before execution. CGiven a collection of tests, run them through either quickcheck or  HUnit, as appropriate. ARun this command, and assert it returns a successful error code.    portable experimentallibraries@haskell.orgThe type of FIFO queues. The empty queue. 'Add an element to the back of a queue. 3Attempt to extract the front element from a queue.  If the queue is empty,  , E otherwise the first element paired with the remainder of the queue. ,A queue with the same elements as the list. &The elements of a queue, front first.  reset the pointer make a handle dead&. uses to test reclaiming strategies. make a handle dead&. uses to test reclaiming strategies. >Move from one BinHandle to another, with size. Moves both of  their pointers. ?Just like copy bytes, but takes a function parameter to modify GHCalphaIsaac Jones <ijones@galois.com>AAlmost like fromIntegral, but checks the bounds to make sure its @ definitely safe. Uses assert, so without assertions, check won't  happen. !A bit less safe than fromIntegral'; just runtime checks actual  value you're trying to convert.    9Keeps track of freed inodes so we can reuse their space. !Add this inode to the free list. GHCalphaIsaac Jones <ijones@galois.com>nth block within a file 5Represents the number of the physical block on disk.  GHCalphaIsaac Jones <ijones@galois.com> 3  2  1  BLike fromJust, but spits out the given error on failure. This is ( for situations which should not happen  Get a block of memory that's the right size for a block.  NOTE: leak &      !"#$%         !"#$%GHCalphaIsaac Jones <ijones@galois.com> file or dir persistent references &Must be length 16 '>Copy the important bits of this inode, bit not all of them; , 8 leave the inode number alone, but copy everthing else. (Is this the rootDir inode? ).Create a new inode based on this inode number *5Increase the size of this inode, cannot decrease it! +-Get the block pointer from this inode array. &,'-./01()*2+34  &,'-./01()*2+34GHCalphaIsaac Jones <ijones@galois.com>5@todo: check to see if new epoch, optimize allocation by using a * window and passing in a hint of where it should go. Nothing  means that the disk is full. 6"smart constructor for TheBlockMap 7ACompute the list of locations in a tree with the given branching > factor. Counts up to totalLevels, zero indexed. That is, if I'm D looking for the 3rd element in a zero indexed binary tree with two  levels, it' ll be [1,1]. addrList 3 3 2 10 == [1,0,1] 8:How many buckets at this level for this branching factor? 9:;<5=6>?@ 9:;<:;<5=6>?@A(Maps from inode numbers to directories. BMaps strings to inode numbers C/Does this directory have the given file in it? D:Get the inode numbers from the contents of this directory EAAlso used for updating. If this directory is marked dirty, then & the cache will also be marked dirty. F?Does not complain if the item does not exist. Directory cache  stays clean. GHIAJKLBMNOPQRSCDTUVWEXFGHIAJKLJKLBMNOPQNOPQRSCDTUVWEXFGHCalphaIsaac Jones <ijones@galois.com>YBSmart constructor for a raw device. Opens this file as a device, C but does not initialize a filesystem on it or anything like that.  FIX: just for testing... Z!Closes the device, if necessary. [Y\]Z^_[Y\]Z^_GHCalphaIsaac Jones <ijones@galois.com> [Y\]Z^_.`abcdefghijklmnopqrstuvwxyz{|}~.`abccdeefghijkghijklmnopqrstuvwxyz{|}~ 0Maps the disk address to a cache of the blocks. 9If the cache grows beyond this size, we flush something. ?Should only be called on a read-only FSRoot. FIX: Verify that  there aren't any dirty blocks? Returns a new, empty cache CThis block MUST be in the cache. This function marks it as dirty. HThis block MUST be in the cache. This function unmarks the busy block. @Sync the BB cache. Fix; can we do this in one pass? Alters the 1 cache itself as a side-effect. Not the FSRoot. AAttempts to read from the cache; if it fails, will read from the ( raw device. Alters the cache, but that's a reference in the & fsroot, so happens as a side-effect. BAllocates a new block. Caller is responsible for this block from . now on; it is unlocked and not in the cache. 3Syncs this bufferblock to disk; marks it as clean.  GHCalphaIsaac Jones <ijones@galois.com>Behavior if it's already in the cache  if so, that's an error! throw assertion. if so, keep the cache version &if so, overwrite it. If not, add it. !&Optimal transfer block size in bytes. ""Total data blocks in file system. #Free blocks in file system. $)Free blocks available to non-superusers. %!Total file nodes in file system. & Free file nodes in file system. '2Maximum length of filenames. FUSE default is 255. The raw interface for reading & writing blocks. 0Maps the disk address to a cache of the blocks. A queue of free blocks. $Maps the inode number to the inode. 9Keeps track of freed inodes so we can reuse their space. (Maps from inode numbers to directories. mounted or unmounted? $Maps the inode number to the inode. !Type is a little funny because it's useful for a fold! >Not a new element, just update the old entry in the cache, so  doesn't increase number of inodes. ?Creates a new inode out of thin air and puts it into the inode  cache, and returns its number. +M !"#$%&'()*+,) !"#$%&' !"#$%&'(+*))*+,RFIX: Consider moving to just write monad. Is this ever legit to use for reading?  GHCalphaIsaac Jones <ijones@galois.com> 0AConvert this string into a file buffer. Starts at the beginning  of the buffer. 11Allocate a new buffer to fit this entire string. 2Extract sz5 characters from this buffer and interpret them as a ) string. Starts at beginning of buffer. 3FEvaluate this entire buffer as a string, starting from the beginning. @Internal helper function to grab the given number of chars from  this handle. 4>Allocate a new buffer of the given size and perform the given : function on that buffer. FIX: Free the buffer when done? 5AConvert this Halfs Buffer to a C Buffer, starting at the current  pointer. The buffer',s pointer will be returned to its location. 6AConvert this C buffer to a Halfs Buffer, starting at the current  pointer. The buffer',s pointer will be returned to its location. 7Move the buffer's pointer forward. 8)Seek forward or backward on this buffer. 9&Get the BinHandle out of this buffer. -./0123456789 -0123456789./ -./0123456789 <Read-write state D3Make this read-only monad into a read-write monad. =Returns the FSRoot since things like Inode cache may change. G!Unsafe because it uses readMVar. H FIX: Unsafe? IFIX: Delete this function; it'$s temporary during refactoring. It  violates safety requirements. J,unsafe since this allows a reader to write. T4Make this write-only monad into a read-write monad. [FIX: Delete this function; it'$s temporary during refactoring. It  violates safety requirements. ^=Unsafe since it uses readMVar. For get-only situations, for ) reading and not writing; no mvar block. _ FIX: This f7 should probably be in the FSRW monad, since that doesn't have state. `#Safe since writers can be readers. a#Safe since writers can be readers. 9:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc,<=>?:[TYXW`a]\^Zb_;IDEFGHJKLMNOQPRS@ACBcUV*:;<=>?=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc?Returns Nothing iff address is zero but inode number and block  number aren'6t zero. FIX: maybe also check for out of range block  number? ATraverses the tree of DiskAddresses implied by this block number D and inode. Gets the block at that disk address, and positions the B pointer in that block according to the last address in the tree, A then reads the disk address there. This function used only for  reading. AGet this inode from the inode cache. It SHOULD be in there, but , just to be safe, we will look on disk if it's not. Acalls to getBlockFromDevice or getPointerAt, depending on level. Mark this block dirty. Doesn'*t modify the fsroot (except the bbcache). CMight modify inode because it might grow it. Returns Alters inode > cache. FIX: maybe also check for out of range block number? This is for reading a block. ;Just like allocateBlock, but happens in the FSWrite monad. .Like getDiskAddrFun, but for writing. If the ; inode level is 1, then this will return the actual block.  Otherwise, it'6ll return an indirect block, from which you must read  or write the address you're interested in. ;Conditionally grows the inode. Ensures that the inode now B containes THIS BLOCK NUMBER, not this size (watch for off-by-one 2 errors). NOTE: Be sure to bump the size when you' re done! &Put a bunch of zeros into this block. *When debugging, pPut a bunch of 0xDEADBEEF's into this block; R uses just after allocating a block, so we know if we have an uninitalized value. ?Writes this disk address into the indirect block pointed to by  this list of addresses. Doesn't update the inode, because , ensureLevel should have already done that. AOptionally increase the level of this inode to include the given @ block number. This allocates new blocks, so is in the FSWrite B monad. We grab a new block (which is an indirect block of block  pointers), dump the inode'*s block pointers into it, then update the  inode'=s block pointers to be empty except for an entry pointing to / ths new block. Finally, we update the level. )Performs a VERY complex computation. Don't peak inside. @Reads a bunch of sequential bytes, presumably from the host OS. ?Writes a bunch of sequential bytes, presumably to the host OS. read from cache &gets all the inodes in a BufferBlock. 3Update this inode according to the given function. =In preparation for a read or a write, we might want to get a  binhandle that'2s positioned at the beginning of the given inode. B Reads from disk. May increase the size of the root inode if the E requested inode is outside its current range. The size of the root C inode is always along block boundries. FIX: Move to FSRead monad. %Like getInode, syncs a single inode. ?Gets an inode based on its inode number, performs some math to  figure out what block it'+s in and stuff. FIX: Make it read a whole ; block of inodes in one go and adds them to the cache (via  readInodeUpdateCache) $Possibly modifies the inode cache. Raw function for reading an . inode in. Uses rawDevice instead of fsroot. CReads all of the inodes from this binhandle, returns the new inode  and cache. CWe ignore the dirty bit here and write it to this handle no matter . what; the parent should check the dirty bit! @Reads the free block list from this handle. Size of the output  queue is = input size. 7Write the block map into the beginning of this buffer. MReads the block map from the beginning of this buffer. Fix: Clean or dirty! ?Traverses these non-zero pointers removing them from block map BGet all the blocks from this inode, including indirect blocks and  their children. @Free the given inode from this fsroot. free the block pointers, / remove from inode map. TODO: XX mvar to sync. ' =This is _not_ an opaque type. Anyone can change the mode of & elements, reguardless of whether they're in the FSRead or FSWrite C monads. The mode here is _not_ enforcing. Maybe eventually will  be opaque. FIX. A smart8 constructor for FileHandle. Does not truncate file in # write mode or anything like that. Another smart construcor. open for write. ?Opens the file in write mode and frees all blocks in the file.  Reuses the inode. )Close this handle. Does nothing for now. )Close this handle. Does nothing for now. <Must not touch the block map in fhRead, since it may not be  well-formed yet. ,Read a number of bytes from the given file. Bumps the filesize. BWrite a number of bytes from the given file. Be sure to bump the  file size. CCompute the start positions, lengths, and buffer offset for a read 8 call. This takes into account the size of the buffer. ,Builds a brand-new, almost-empty directory. CThis file will always be less than INInt, not INLong. FIX: Is this  true? If not, we'll have to read it in chunks. (Reads a directory from the given inode. *fetch the inode out of the root directory (FIX: are we actually freeing the inode? (Build a directory out of this FilePath.  >Higher level function for turning a path into an object. Uses D getInodeAtPath (mutually-recursive with getDirectoryAtPath) to get ? this inode, and build something out of it. WARNING: the inode > returned may be an invalid inode. Caller is responsible for  initializing it if it's possibly invalid.  &FIX: this is in the read monad, but it'll let you make a write B handle if you ask for one. The FileHandle type is not opaque so  that'-s OK! Should work for files or directories!  @Uses getDirectoryAtPath (mutually recursive) to traverse down a ? directory hierarchy to get the contents of the parent of this = filepath and fetch the inode from there. WARNING: the inode > returned may be an invalid inode. Caller is responsible for  initializing it if it's possibly invalid.  For assertion checking             GHCalphaIsaac Jones <ijones@galois.com>=writes it as a file, marks it as clean. block map file never ' shrinks. see notes in TheBlockMap.hs 4Inode map file is open truncate, it can be resized. 4Directories are open truncate, they can be resized. %Sync the entire inode cache! Woohoo! +Writes the FSRoot to cache, then to device <Writes the FSRoot to cache (sans free list), then to device GHCalphaIsaac Jones <ijones@galois.com>Reads it as a file.  Reads it as a file.   GHCalphaIsaac Jones <ijones@galois.com>'g@This seems to be the kind of Stat information needed by the TSE  front end. lBThe location of a device might be a path to the device on a Linux  filesystem. n(Move this filehandle to given position. o@Delete this file. Currently can be used to delete a directory, $ but that should probably be FIXED. p7Unlink this directory. Should only be called on empty  directories. Does not+ descent into sub-directories. Should fail A if given a file or if the directory is non-empty (but currently  doesn' t: FIX). q,Rename this file. Rename the file named as From to the file  named as To. Can throw an exception if From doesn' t exist. r<Create an empty directory at this path. Throws an error if ( something already exists at this path. sBLike Direcotry.addChild, but in the FSWrite monad, and syncs this  directory. !&Creates child inode based on the path t;Open the given file for writing. If a file exists at this * location, it gets overwritten. FIX: Test u?Open the given file for appending. If a file already exists at D this location, it gets opened for writing, and the file pointer is J pointing to the end. FIX: Test, what does it do if no such file exists. "Abstraction over t and u. v:Much like getDirectoryAtPath, builds a handle out of this / filepath. May throw IO Error! FIX: annotate w/ errors / thrown. FIX: throw errors for incorrect mode. x+Write from the given buffer into the file. y1Helpfer function for writing a string to a file. zClose a file that's open for writing. {3Get basic information about the file at this path. |.Get basic information about this file handle. })Does this filepath refer to a directory? ~'Open this file for reading. FIX: test. -Read from this file handle into this buffer. Close a filehandle that's open for reading. !Get the contents of a directory. Caller may want to filter out . and .. :Mount the given file system for writing and perform these 5 operations. FIX: Maybe add MVar () for blocking on. :Mount the given file system for reading and perform these  operations. GCreate a new file system and perform the given operations. Unmounting  is up to the caller. See  for parameter details. BCreates a new filesystem with a real-life root inode! Out of thin E air, create a buffer block for this device, 0, and write root inode  to our new cache. APeriodically sync the filesystem. Usually forked off in its own > thread. For READS: Flush caches on read-only filesystem (so  they':ll be re-populated). For WRITES: write out the filesystem ! data. FIX: remove readOnly; that's in the fsroot. FIX: add * exception handler (since it does a take) See  for most documentation. Basic low-level mount/ operation. Usually used via wrappers such as  and  . See also . BSyncs the device and closes its handle. You should stop using it - after that. Must represent an open device!  Just like  but in the : monad. ?Check the filesystem for errors. Exits with an error code and B message if any are found. Outputs lots of low-level data to the  terminal. See . #ALookup all the inodes, get their block pointers, and verify that C no two inodes have the same block pointer, in which case, crashes  with an error for now. $ Called by 1. Checks consistency of the blocks in the given B inode. Checks for inodes with invalid block numbers, two inodes  with the same block. %Updates this directory's entry in the cache 6for testing. Create some files in the given directory Y  !"#$%&'()*+,-:;<=>?FLXdefghijklmnopqrstuvwxyz{|}~Zopqrstuxyzv{|~nw,}XFL:;efdm -l<=>?gjhkki !"#$%&'(+*),deffgjhkkihijklmnopqrstuvwxyz{|}~&  !"#$%&'()*+,-../0123456789::;<==>?@ABCDEFGHIJKLMNOPQRSTUVWXYYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~           !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc[deffghijklmnopqrstuvwxyzz{{|}~vw      !"#$%&'()*+,-./0123456 halfs-0.2 Halfs.FSState Data.IntegralHalfs Halfs.Buffer FastMutIntBinArrayHalfs.CompatFilePathHalfs.TestFramework Halfs.FSRW Data.Queuebase Data.MaybeData.Array.SysArrayBinaryHalfs.TheInodeMapSystem.RawDevice.Base Halfs.Utils Halfs.InodeHalfs.TheBlockMapHalfs.DirectorySystem.RawDevice.FileSystem.RawDeviceHalfs.BufferBlockHalfs.BufferBlockCache Halfs.FSRootHalfs.BinaryMonad Halfs.Blocks Halfs.BasicIOHalfs.FileHandleHalfs.SyncStructuresHalfs.BuiltInFilesFSRWunsafeLiftIORWINLongINInt inIntToInt intToINLong inIntToINLong intToINInt fromIntegral'fromIntegral''FileMode AppendMode WriteModeReadMode InodeMetadatamagic1 num_bytesuidgidmode inode_numflags hard_links create_timelast_modified_timelevelInodemetaData blockPtrsFileSystemStats blockSize blockCount blocksFreeblocksAvailable fileCount filesFree maxNameLengthFSStatus FsReadWrite FsReadOnly FsUnmountedfsStatsBuffernewBuffbuffSize strToBuff strToNewBuff buffToStrSize buffToStr withBuffSize buffToCBuff cBuffToBuffplusBuffbuffSeek buffGetHandleFSWriteFSRead StateHandle stateFineMVarstateCoarseMVaralreadyExistsExdoesNotExistEx illegalOpExeofEx runFSRead runFSReadIOevalFSReadIOMV unsafeReadGetunsafeModifyFSReadunsafeLiftIOReadunsafeWriteToRead newReadRef readReadRef modifyReadRef writeReadRef takeMVarRW putMVarRW readMVarRW modifyMVarRW_modifyMVarRW_' runFSWrite forkWithMVar forkFSWrite runFSWriteIOevalFSWriteIOMV evalFSWriteIOputStrLnWriteReadunsafeLiftIOWriteunsafeLiftIOWriteWithRoot writeToBufferunsafeWriteGet modifyFSWrite readToWritereadToWriteContupdateInodeCacheWritedecLinksForInodeSizeTTimeTRdStatRdFilesize RdDirectorymodTimeDeviceLocation FileHandleseekunlinkrmdirrenamemkdir addChildWrite openWrite openAppendopenFileAtPathWriteopenFileAtPathReadwrite writeString closeWritestatfstat isDirectoryopenReadread closeReadgetDirectoryContentsgetDirectoryDetails withFSWrite withFSReadwithNewFSWritenewFSsyncPeriodicallyWrite mountFSMVmountFS unmountFSunmountWriteFSfsck fsckWrite unitTests makeFiles newFastMutIntreadFastMutIntwriteFastMutIntcopy readWord32 writeWord32getBinArrayRawBuffer newBinArray sizeBinArray zeroBinArray readWord8 writeWord8 splitFileName splitFileExt splitFilePath joinFileName joinFileExt joinPaths changeFileExt isRootedPathisAbsolutePath pathParents commonParentparseSearchPathsearchPathSeparator mkSearchPathisPathSeparator pathSeparator GHC.IOBaseFilePath UnitTestsQC prettyLabrunTest runAllTests assertCmd HUnit-1.2.0.3Test.HUnit.Text runTestTTTest.HUnit.Base~:~=? assertEqual assertBoolTestCaseTestList TestLabelTesttestfailureserrorstriedcasesCountsTest.HUnit.Lang AssertionQuickCheck-1.2.0.0Test.QuickCheck quickCheck==>TestablehunitToUnitTest qcToUnitTestlistsToUnitTests combineCountstestMainQueue emptyQueue addToQueuedeQueueNothing listToQueue queueToList queueLengthSysArray mkSysArrayptrFromSysArray sysArraySizesysArrayIsReadOnlypokeSysArrayElempeekSysArrayElemresetBininvalidateFixedBinMeminvalidateFixedSysMem copyBytescopyMapput_putget BinaryHandletellBinseekBinBinBinPtrFixedSysHandleFixedBinHandle BinHandle IOBinHandle openBinMem sizeBinMemopenFixedBinMemsizeFixedBinMemzeroFixedBinHandleopenFixedSysHandlesizeFixedSysMemzeroFixedSysHandle openBinIO TheInodeMap freeInode freeInodesimDirtyimMaxNum emptyInodeMap BlockNumber DiskAddressBufferBlockHandle bytesPerBlocklocationOfBlocknewBufferBlockHandlecheckBufferBlockHandleSizezeroBufferBlockHandleinvalidateBufferBlockHandleSymLinkDirFile fromJustErrgetMemoryBlockFileType INPointers myShowHex rootInodeNumblockMapInodeNuminodeMapInodeNumrootDirInodeNumfirstFreeInodeNumblockPointersPerInodeblockPointersPerIndirectBlockbytesPerBlockPointer bytesPerInodeinodesPerBlockrootInodeMagicNumotherInodeMagicNum inodePaddingmodeFilemodeDir modeSymLink mRemoveFilesecondToMicroSecondunimplementedM unimplementedmutateMapArray InodeBlockdupInodeisRootDirInodenewInode inodeBumpSize getPointerAtupdatePointersnewFSRootInodenewFSBlockMapInodenewFSInodeMapInodenewFSRootDirInodegoodInodeMagic inodeAddLinkrootInodeDiskAddrfirstFreeInodeDiskAddr allocateBlockaddrList numBuckets TheBlockMap freeBlocksbmDirty bmTotalSize freeBlock mkBlockMap findAddressDirectoryCache DirectoryMaphasChildgetChildrenInodeNumsaddDirectoryToCachermDirectoryFromCachegetDirectoryFromCachegetChildWithName removeChild dirCacheDirty _dirCache DirectorydirFile dirContentsdirDirty dirInodeNumaddChildgetChildrenNamesfilePathsNoDotsemptyDirectoryCachedirectoryCacheToListmarkDirectoryCacheClean makeRawDevicefinalizeDevice RawDevice newDeviceblocksInDevice devBufferReaddevBufferWritePartBufferBlock ReadBufferBufferBlockCursorAlloc BufferBlockbbDirtybbLockbbRecent bbRawDevice bbDiskAddr mkBufferBlocksetDirtygetDirtyincLockdecLock clearLockgetLock getDiskAddr setDiskAddr getRawDevice setRawDevice setRecent getRecentstartBufferBlockCursorbufferBlockCursorIntoPointerswriteToBufferBlockreadFromBufferBlockcopyFromBufferBlockcopyToBufferBlockcopyBufferBlockzeroBufferBlockdeadbeefBufferBlockdiskAddressListFromBufferBlock readBuffer doReadBufferputPartBufferBlockgetPartBufferBlock mkInodeBlockmkDiskAddressBlock bbDebugOn bbDebugOffbbDebugBufferBlockCachemaxBBCacheSize clearBBCache createCachemarkBlockDirty syncBBCachegetBlockFromCacheOrDevice'getBlockFromDevicesyncBB checkBBCachegetBlockFromCacheOrDevicegetNewBlockFromCacheOrDeviceInodeCacheAddStyleInodeCacheErrorInodeCacheKeepInodeCacheOverwritedevicebbCacheblockMap inodeCacheinodeMapdirectoryCachefsStatus InodeCacheaddToInodeCachefsRootUpdateInodeCache allocateInodeFSRootInodeNumgetFromInodeCacheemptyInodeCache fsRootInode fsRootBmInodefsRootRootDirInode fsRootImInodefsRootUpdateDirectoryCachefsRootRmFromDirectoryCachefsRootAllInodeNumsputRWgetMemoryBlockRW openBinMemRW resetBinRW seekBinRW tellBinRW sizeBinMemRWgetRW copyBytesRWputRW_getMany runFSReadIO' mtl-1.1.0.2Control.Monad.State.Lazy execStateT evalStateT runStateTStateTControl.Monad.Error.Class catchError throwError MonadErrorControl.Monad.State.Classmodify MonadStateControl.Monad.TransliftIOgetDiskAddrOfBlockReadgetDiskAddrFuninternalGetInodeFromCachegetDiskAddrOfBlockRawmarkBlockDirtyWritegetDiskAddrOfBlockWritegetBlockFromCacheOrDeviceWriteallocateBlockWritegetAndPositionBlockWriteensureCapacity zeroBlockwriteAddressAt ensureLevelnumBlocksForSizedevBufferReadHostdevBufferWriteHostreadPartOfBlock getInodesBinfsRootUpdateInodeunsafeMoveBinHandleForInodeNum syncInode getInodeReadreadInodeBootStrapreadInodeUpdateCachewriteInodeMapBininputFreeBlockListwriteBlockMapBinreadBlockMapBin freeInodeDataallBlocksInInode'fsRootFreeInodeputPointersBin getInodeWritebinSkipdevBufferWriteSafewritePartOfBlockwriteDirectoryBinreadDirectoryBinreadInodeMapBinallBlocksInInode fileHandle fileHandle' fhOpenWritefhOpenTruncate fhCloseRead fhCloseWritefhRead readBlockoneWrite writeBlock seekPositions newDirectoryreadFileFromInode readDirectory readRootDirgetDirectoryAtPathgetSomethingAtPathopenFileAtPathgetInodeAtPathjustSame fhInodeNum fhSeekPosfhModefhSizefhInodefhRewindfhSeekfhWriteallocateInodeWrite doesPathExistsyncBlockMapFilesyncInodeMapFilesyncDirectoryToFilesyncInodeCache syncFSRootshortSyncFSRootreadInodeMapFilereadBlockMapFile newChildInode openHelperbuildBlockToInodeMappingcheckInodeBlocksupdateDirectory