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
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
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
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
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
If a well-timed lookup occurs while a file is being created, after the
permanode is available, but before any attribute claims declaring file
content, the file will be assumed to be a directory.
Ideally, FUSE would only hold on to this mistake for about a minute, or
the duration of the attribute cache, but it's much longer in practice.
Even with cammount effectively disabling all caches and returning fresh
dirents with random inodes, FUSE seemingly never sent in another Lookup
request for the broken entry.
While I wouldn't consider this a fix for the condition at large, I do
believe being explicit about what's a file, symlink, or directory is the
correct thing to do.
See also: http://camlistore.org/issue/293
Change-Id: I64d4afc8dfdb87b9b121d161936dd613139f00e2
This is essentially two things:
1. Trivial changes to fs_test to make it not skip on Linux
2. Move much of the logic that was in *mutFile.Release into *mutFile.Flush
See http://sourceforge.net/apps/mediawiki/fuse/index.php?title=FUSE_tutorial
and the FUSE FAQ for an explanation of Flush vs. Release.
Change-Id: Id63312b3f8ebf12917338b836beb8a7a736d4fe6
read-only Opens need to also not set OpenDirectIO, else the property
is retained on all future operations on that handle.
Change-Id: I954e899bf2c74815813b25a1fa0dc6d42a4189c6
Apparently we need to update the node's size after a write on a filehandle.
Finder stats it (the node, not the handle) while writing and complains if it's
not the right size.
Change-Id: Ie3e98328a182a4bbb3230c5190e1d57d0d3fb075
Currently one a few stats are tracked, but more can be added easily now.
The only test using this is using it to verify that the read-only open optimization
is used.
Change-Id: I1e2fb8a0222ade82631670d7c51e684778d031ae