getBtrfsDH :: (BtrfsHandle, [Dev]) -> IO DiskHandle
getBtrfsDH (h, devs) = do
  -- Open the stat file for each physical device
  fs <- mapM (\(Dev dev) -> fopen (blBasePath ++ dev ++ "/stat")) devs
  -- this gets the right number of IORefs without number hacking
  wfs <- mapM (\_ -> newIORef 0) devs
  rfs <- mapM (\_ -> newIORef 0) devs
  t <- newIORef 0
  return (DiskH (FSI h) fs wfs rfs t)
getBtrfsDH :: (BtrfsHandle, [Dev]) -> IO DiskHandle
getBtrfsDH (h, devs) = do
  -- Open the stat file for each physical device
  fs <- mapM (\(Dev dev) -> fopen (blBasePath ++ dev ++ "/stat")) devs
  -- this gets the right number of IORefs without number hacking
  wfs <- mapM (\_ -> newIORef 0) devs
  rfs <- mapM (\_ -> newIORef 0) devs
  t <- newIORef 0
  return (DiskH (FSI h) fs wfs rfs t)
getBtrfsDH (h, devs) = do
  -- Open the stat file for each physical device
  fs <- mapM (\(Dev dev) -> fopen (blBasePath ++ dev ++ "/stat")) devs
  -- this gets the right number of IORefs without number hacking
  wfs <- mapM (\_ -> newIORef 0) devs
  rfs <- mapM (\_ -> newIORef 0) devs
  t <- newIORef 0
  return (DiskH (FSI h) fs wfs rfs t)