Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tahoe-great-black-swamp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
PrivateStorage
tahoe-great-black-swamp
Commits
098bd50c
Commit
098bd50c
authored
1 year ago
by
Jean-Paul Calderone
Browse files
Options
Downloads
Patches
Plain Diff
Remove some parameters unnecessary because of the relevant scopes
parent
d9b828e0
No related branches found
No related tags found
1 merge request
!40
Make the write enabler tests pass
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/TahoeLAFS/Storage/Backend/Filesystem.hs
+17
-21
17 additions, 21 deletions
src/TahoeLAFS/Storage/Backend/Filesystem.hs
with
17 additions
and
21 deletions
src/TahoeLAFS/Storage/Backend/Filesystem.hs
+
17
−
21
View file @
098bd50c
...
...
@@ -180,7 +180,7 @@ instance Backend FilesystemBackend where
(
ReadTestWriteVectors
testWritev
_readv
)
=
do
-- TODO implement readv and testv parts.
-- TODO implement secrets
mapM_
(
applyWriteVectors
root
storageIndex
)
$
toList
testWritev
mapM_
applyWriteVectors
$
toList
testWritev
return
ReadTestWriteResult
{
success
=
True
...
...
@@ -188,32 +188,28 @@ instance Backend FilesystemBackend where
}
where
applyWriteVectors
::
FilePath
->
StorageIndex
->
(
ShareNumber
,
TestWriteVectors
)
->
IO
()
applyWriteVectors
_root
_storageIndex
(
shareNumber'
,
testWriteVectors
)
=
mapM_
(
applyShareWrite
root
storageIndex
shareNumber'
)
(
write
testWriteVectors
)
applyWriteVectors
(
shareNumber'
,
testWriteVectors
)
=
mapM_
(
applyShareWrite
shareNumber'
)
(
write
testWriteVectors
)
applyShareWrite
::
FilePath
->
StorageIndex
->
ShareNumber
->
WriteVector
->
IO
()
applyShareWrite
_root
_storageIndex
shareNumber'
(
WriteVector
offset
shareData
)
=
let
sharePath
=
pathOfShare
root
storageIndex
shareNumber'
createParents
=
True
in
do
applyShareWrite
shareNumber'
(
WriteVector
offset
shareData
)
=
do
createDirectoryIfMissing
createParents
$
takeDirectory
sharePath
withBinaryFile
sharePath
ReadWriteMode
(
writeAtPosition
offset
shareData
)
where
sharePath
=
pathOfShare
root
storageIndex
shareNumber'
createParents
=
True
writeAtPosition
::
Offset
->
ShareData
->
Handle
->
IO
()
writeAtPosition
_
offset
shareData'
handle
=
do
writeAtPosition
offset
shareData'
handle
=
do
hSeek
handle
AbsoluteSeek
offset
hPut
handle
shareData'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment