Permalink
Browse files

Update TODO/README, create dirs in cache on readdir so programs don't

think the whole directory structure got nuked if the source isn't there.
Opening files from cache with missing source still fails though
  • Loading branch information...
1 parent d305036 commit e8a14fedec81403f9feec4695a2683e1ead5bff0 @paulcbetts committed Apr 18, 2008
Showing with 28 additions and 10 deletions.
  1. +13 −2 README
  2. +8 −8 TODO
  3. +7 −0 src/vcachefs.c
View
@@ -32,7 +32,18 @@ Requires:
* A recent version of FUSE (API >= v27)
-To run (only does a simple mirror now, no caching)
------------------------------------------
+To run
+--------
./vcachefs /target/mount/point
+
+
+Known Issues
+--------------
+
+* Right now, the source/cache paths are hardcoded - obviously, this is pretty
+ useless, but you can at least hack it
+
+* vcachefs doesn't do very smart things wrt permissions in the cache folder -
+ we'll probably have to fix this in the future (but for music/video caching, it
+ doesn't matter much
View
@@ -1,19 +1,19 @@
Done:
* Hello world, build system
* Simple mirror (pass all through to target)
-
-Milestones to 1.0
- * Bookkeeping (grok settings, set up cache directory, etc)
* File-based cache
* Async worker thread saving off files
* Save off info in fd table
* Switching from net read to file read mid-file
+
+Dropped:
+ * Tag Block cache (media apps cache off this info anyways)
+
+
+Milestones to 1.0
+ * Bookkeeping (grok settings, set up cache directory, etc)
+ * File-based cache
* MRU algorithm when we get cache size pressure
- * Tag Block cache
- * Mechanism to persist info (bdb? sqlite?)
- * Determine optimal size and info to save
- * Async worker thread saving caches
- * Add support to read/open/etc
* Extra nonsense
* All the dumb stuff OS X needs like resource forks
View
@@ -468,6 +468,13 @@ static int vcachefs_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
return -errno;
}
+ /* mkdir -p the cache directory */
+ if(strcmp(path, "/") != 0) {
+ char* cache_path = g_build_filename(mount_obj->cache_path, &path[1], NULL);
+ g_mkdir_with_parents(cache_path, 5+7*8+7*8*8);
+ g_free(cache_path);
+ }
+
while((dentry = readdir(dir))) {
struct stat stbuf;
int stat_ret;

0 comments on commit e8a14fe

Please sign in to comment.