I had intended for this to be a small change.
I was going to just add context.Context to the BlobReceiver interface,
but then I saw blob.Fetcher could also use one, so I decided to do two
in one CL.
And then it got a bit infectious and ended up touching everything.
I ended up doing SubFetch in the process by necessity.
At a certain point I finally started using context.TODO() in a few
spots, but not too many. But removing context.TODO() will come in the
future. There are more blob storage interfaces lacking context, too,
like RemoveBlobs.
Updates #733
Change-Id: Idf273180b3f8e397ac5929c6d7f520ccc5cdce08
Remove the blob.SHA{1,224}From{Bytes,String} constructors too. No
longer used. This adds blob.RefFromBytes which was missing. We had
blob.RefFromString. Now everything uses blob.RefFrom* instead of
specifying a hash function.
Some tests set a flag to force use of SHA-1 because there was too much
golden data to update. We can remove those one-by-one over time as we
fix up tests.
Updates #537
Change-Id: Ibe6428089a6221594c2b751f53f98b03b5a28dc2
Part of the project renaming, issue #981.
After this, users will need to mv their $GOPATH/src/camlistore.org to
$GOPATH/src/perkeep.org. Sorry.
This doesn't yet rename the tools like camlistored, camput, camget,
camtool, etc.
Also, this only moves the lru package to internal. More will move to
internal later.
Also, this doesn't yet remove the "/pkg/" directory. That'll likely
happen later.
This updates some docs, but not all.
devcam test now passes again, even with Go 1.10 (which requires vet
checks are clean too). So a bunch of vet tests are fixed in this CL
too, and a bunch of other broken tests are now fixed (introduced from
the past week of merging the CL backlog).
Change-Id: If580db1691b5b99f8ed6195070789b1f44877dd4
A file is shown as folder and inside you can see all its versions (named according
to the date). Basically is like `at` but the path (not the date) goes first.
So if you go to:
$ ls <mountpoint>/versions/my_folder
dr-x------ 1 grecco 32000 0 Mar 13 01:39 my_file
and then:
$ ls <mountpoint>/versions/my_folder/my_file
-r-------- 1 grecco 32000 2 Mar 13 01:39 2014-03-12T14:53:34.471588505Z
-r-------- 1 grecco 32000 2 Mar 13 01:39 2014-03-12T14:53:36.6569929Z
-r-------- 1 grecco 32000 2 Mar 13 01:39 2014-03-12T14:53:38.842875168Z
-r-------- 1 grecco 32000 25 Mar 13 01:39 2014-03-12T21:16:09.905612807Z
These files are standard files which can be opened to see the file content as a
specific point of time.
Change-Id: I38a4d7bf35ba32407036535e629039e23dc32735
To rev 169ea6cabe2a4888dba958edaecc9e9751adc711
Also get rid of pkg/readerutil now that it's all moved to
go4.org/readerutil
go4.org/readerutil/singlereader not vendored in as we don't actually use
it.
Fixes#678
Change-Id: I46f14acde1d3023e94c8e99e8267ce951f1bbb61
Also adds more reliable check for "mounted broken" dirs on linux (that
require a fusermount -u). They were seen as not mounted (actually not
existing), because the check relied on df, which on them would just
return the "transport endpoint is not connected" error.
Fixes#826
Change-Id: I440d10a7b42c217ee85ea7a1726e581bc74e6f4a
The original change, as indicated by the accompanying comment, was to avoid returning ENOSYS,
which causes the OSX kernel to disable that call volume-wide.
bazil.org/fuse returns ENOTSUP for each unimplemented call, so this isn't needed anymore.
37bfa8be92/fs/serve.go (L1112)
This patch changes the default return values as follows:
Getxattr: ErrNoXattr → ENOTSUP
Listxattr: nil → ENOTSUP
Setxattr: EPERM → ENOTSUP
Removexattr: EPERM → ENOTSUP
Change-Id: I6adb744f76385d36eadd531a9f1dd1670b46f452
The describe requests were launching a storm of RLocks which weren't
safe in the presence of goroutines trying to acquire write locks.
Instead, make the corpus locking the responsibility of the caller and
add Lock/Unlock/RLock/RUnlock methods to the index and move locking up
a level.
This also adds a fair bit of context.Context plumbing which was used
in earlier debugging.
Fixescamlistore/camlistore#709
Change-Id: I8d7254d1e1da541f8c080d62f5408aac807fd3b1
move to vendor
fix (lots) of breakages due to API changes
bazil.org/fuse: 37bfa8be929171feec943f3496bc4befdeaf10db
Change-Id: Ic92faf7585371027f3c521f7a24ae56d70d18547
The import path was added to the go file that included the package
documentation if one existed. Otherwise, I used what seemed to be the
primary file for the package.
Fixes#689
Change-Id: If51be0e86529fd6f179e80af6781e639f8550fd2
Most of it replaced with vendor/go4.org/types and
vendor/go4.org/readerutil
u32 went where needed in pkg/blobserver/*
invertedBool went in pkg/types/serverconfig
atomics64 went in pkg/fs
Change-Id: I230426cda35be4b45ed67e869f14e6fdae89be22
They were internal packages (under pkg), which we are now moving to
go4.org, so we in turn need to vendor them in now.
Change-Id: I92224f731404d0bd4ca1c57492bed37cb3367ed4
bazil.org/fuse switched from having OpenDirectIO on to having it
off by default. This has the side effect of allowing OS X's kernel
to cache the filesystem's files in its UBC, giving us incorrect
stats from cammount's .camli_fs_stats directory. This change sets
it explicitly to get the correct behaviour again.
Updates #556
Change-Id: Ic6400a550e4874086cf5fb725d423fcfde47fd61
When setting an xattr bazil.org/fuse gives us a byte slice with the
attribute value to set, but it then reuses its backing array and
we end up with garbage values in our xattr maps. This CL makes a
copy of the slice before it stores it.
Bonus edit: fix a debug message typo in muDir.Remove.
Fixes#556
Change-Id: I820d8cde3065f2949ff4c506ede705194a458afb
Unmounting a FUSE volume on Darwin fails if diskutil is not on one's
path. This is not the default on MacOS. Make the path absolute so that
FUSE volumes unmount successfully.
Change-Id: I255be19b5b12e3ebecffc6d29dc77b6504c27f1c
Replace "executeBit" with "n.attr.Mode & 0100" in "0400 & executeBit".
The result is "0400 & n.attr.Mode & 0100" which is always 0. So
"n.attr.Mode" is always 0 after the assignment. The last two "&" should be
"|" in the assignment.
Change-Id: Iaeff864f330b9db07b8a3124b5c28ba1a3469e69
StreamingFetcher is now just Fetcher, and its FetchStreaming is now
just Fetch.
SeekFetcher is gone. Blobs are max 16 MB anyway, so we can slurp to
memory when needed. The main thing that cared about SeekFetcher
was the GET handler, ServeBlobref, because http.ServeContent needed
one for range requests. That's rewritten in an earlier commit, using
the FakeSeeker from another earlier commit.
Lot of code got simpler as a result.
Change-Id: Ib819413e48a8f9b8d97f596d0fbf771dab211f11
import bazil.org/fuse at f6649cd46fb76b1e04ba9eeffb773cb189278d31
remove code.google.com/p/rsc/fuse.
Huge thanks to Tommi Virtanen for the fuse support.
Change-Id: I44b95ac1ea344648593c7376f83ca675a56077b3
The request is unnecessary, and the server doesn't appreciate it.
fix http://camlistore.org/issue/335
Change-Id: Ie37f1d187883dbc86a365f536a12c6b9916bc8d9
This provides a considerably improved experience for from a single FUSE
client, but not for free.
New dirents introduced outside of FUSE will be visible on the normal
refresh interval.
Removals outside of FUSE are tricky because it's not possible to tell
the difference between a file that was locally created and hasn't made
it into the index yet from a file that was deleted remotely.
Specific dirents that change permanodes outside of FUSE are replaced.
Dirents that change properties outside of FUSE without changing
permanodes (e.g. content, etc...) are never picked up.
Change-Id: I7cc8eaea5951644809053fc97c28455e96508bd4
Fixes: http://calistore.org/issue/328
On at least OS X, the stat(2) call will use an existing node without
issuing Lookup. This introduces a filesystem inconsistency where a
delete removes an entry for further requests, but FUSE's cached access
of the node is still used for at least stat.
There's a call to Access directly against the node as retrieved from a
prior Lookup. By invalidating the nodes when they're deleted and
verifying this at Access time, we keep things more consistent.
This isn't exactly camlistore.org/issue/324 as described, but it was
causing one of the tests to fail on OS X
Change-Id: Ib90a1de79d6d3960f96bac5b4fb448c952c4ba66
If we ever return a particular value for a root, we should continue to
return the same value to provide a consistent view.
camlistore.org/issue/324
Change-Id: I7cfad02ad742b0e70e333f70779d64ba163d68a6
This includes read-write support for extended attributes for mutable
files, and enough support on all other filesystem paths to prevent OS X
from falling back to AppleDouble files.
Change-Id: I2b275591f3bc69c25e1e9c8d59a7fa4cf0bb97ff