getBlockDH :: (BlockHandle, Dev) -> IO DiskHandle
getBlockDH (h, Dev dev) = do
  f <- fopen (blBasePath ++ dev ++ "/stat")
  wf <- newIORef 0
  rf <- newIORef 0
  t <- newIORef 0
  return (DiskH (FSI h) [f] [wf] [rf] t)


-- | Get a disk handle from uuid. This special-cases btrfs.
getBlockDH :: (BlockHandle, Dev) -> IO DiskHandle
getBlockDH (h, Dev dev) = do
  f <- fopen (blBasePath ++ dev ++ "/stat")
  wf <- newIORef 0
  rf <- newIORef 0
  t <- newIORef 0
  return (DiskH (FSI h) [f] [wf] [rf] t)


-- | Get a disk handle from uuid. This special-cases btrfs.
getBlockDH (h, Dev dev) = do
  f <- fopen (blBasePath ++ dev ++ "/stat")
  wf <- newIORef 0
  rf <- newIORef 0
  t <- newIORef 0
  return (DiskH (FSI h) [f] [wf] [rf] t)


-- | Get a disk handle from uuid. This special-cases btrfs.