diff options
author | http://joeyh.name/ <http://joeyh.name/@web> | 2014-03-19 20:49:51 +0000 |
---|---|---|
committer | admin <admin@branchable.com> | 2014-03-19 20:49:51 +0000 |
commit | 5b9195df47e63b347f55183d7b634fd3e59bf380 (patch) | |
tree | 422bee8adc2c0c18974d1454b013db1e95f906d3 /doc/bugs/Disconcerting_warning_from_git-annex/comment_3_13999207f4ddac2f9c345415f25f7ada._comment | |
parent | 7d1d934317e9e3e7d38f8b50eeb350eca8df6597 (diff) |
Added a comment: moreinfo
Diffstat (limited to 'doc/bugs/Disconcerting_warning_from_git-annex/comment_3_13999207f4ddac2f9c345415f25f7ada._comment')
-rw-r--r-- | doc/bugs/Disconcerting_warning_from_git-annex/comment_3_13999207f4ddac2f9c345415f25f7ada._comment | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/bugs/Disconcerting_warning_from_git-annex/comment_3_13999207f4ddac2f9c345415f25f7ada._comment b/doc/bugs/Disconcerting_warning_from_git-annex/comment_3_13999207f4ddac2f9c345415f25f7ada._comment new file mode 100644 index 000000000..142e6ecd1 --- /dev/null +++ b/doc/bugs/Disconcerting_warning_from_git-annex/comment_3_13999207f4ddac2f9c345415f25f7ada._comment @@ -0,0 +1,28 @@ +[[!comment format=mdwn + username="http://joeyh.name/" + ip="209.250.56.102" + subject="moreinfo" + date="2014-03-19T20:49:47Z" + content=""" +What I don't understand about this is, how does `open` fail due to a file being locked? This is Linux, it doesn't have mandatory locking that I know of, and git-annex certianly doesn't use such a thing. + +I really need a way to reproduce this and/or a strace. As it is, I've never seen this reported by anyone else and don't understand the failure mode at all. + +The relevant part of the code seems to be here: + +[[!format haskell \"\"\" +setJournalFile :: JournalLocked -> FilePath -> String -> Annex () +setJournalFile _jl file content = do + tmp <- fromRepo gitAnnexTmpMiscDir + createAnnexDirectory =<< fromRepo gitAnnexJournalDir + createAnnexDirectory tmp + -- journal file is written atomically + jfile <- fromRepo $ journalFile file + let tmpfile = tmp </> takeFileName jfile + liftIO $ do + writeBinaryFile tmpfile content + moveFile tmpfile jfile +\"\"\"]] + +While there is some ctnl locking going on, it locks a special sentinal file, not the file it's writing to. +"""]] |