sahlberg/remote-cache.git
15 years agonew version 3.2
root [Fri, 20 Mar 2009 05:11:32 +0000 (16:11 +1100)]
new version 3.2

15 years agoremove more switching between user ids
root [Fri, 20 Mar 2009 05:08:07 +0000 (16:08 +1100)]
remove more switching between user ids

15 years agoremove more swhitches between root and the user.
root [Fri, 20 Mar 2009 03:39:25 +0000 (14:39 +1100)]
remove more swhitches between root and the user.
add subroutines to do common operations such as evaluating the permission
and creating the substring to point to the parent directory

15 years agodont switch to/from the real user inmkdir() evaluate the permission bits explicitel...
root [Fri, 20 Mar 2009 02:08:40 +0000 (13:08 +1100)]
dont switch to/from the real user inmkdir()   evaluate the permission bits explicitely in the code and do this as root instead

15 years agoremove all remaining talloc calls
root [Thu, 19 Mar 2009 05:28:43 +0000 (16:28 +1100)]
remove all remaining talloc calls

15 years agoremove the use of talloc from unlink_parent_dir_cache()
root [Thu, 19 Mar 2009 03:50:37 +0000 (14:50 +1100)]
remove the use of talloc from unlink_parent_dir_cache()

15 years agoremove the use of talloc from open_parent_cache_ro()
root [Thu, 19 Mar 2009 03:45:46 +0000 (14:45 +1100)]
remove the use of talloc from open_parent_cache_ro()

15 years agoremove the use of talloc from open_dir_cache_ro()
root [Thu, 19 Mar 2009 03:39:24 +0000 (14:39 +1100)]
remove the use of talloc from open_dir_cache_ro()

15 years agoremove the use of talloc from unlink_object()
root [Thu, 19 Mar 2009 03:32:45 +0000 (14:32 +1100)]
remove the use of talloc from unlink_object()

15 years agoupdate the description in the specfile to explain remote cache
root [Thu, 19 Mar 2009 03:23:58 +0000 (14:23 +1100)]
update the description in the specfile to explain remote cache

15 years agofix typo in the usage printout
Ronnie Sahlberg [Tue, 17 Mar 2009 03:35:06 +0000 (14:35 +1100)]
fix typo in the usage printout

15 years agonew version 3.1
Ronnie Sahlberg [Mon, 9 Mar 2009 22:08:17 +0000 (09:08 +1100)]
new version 3.1

15 years agoremove use of talloc in performance critical paths
Ronnie Sahlberg [Mon, 9 Mar 2009 22:06:55 +0000 (09:06 +1100)]
remove use of talloc in performance critical paths

15 years agoadd the generated manpage and html page for remote-cache so they are
Ronnie Sahlberg [Mon, 9 Mar 2009 03:00:35 +0000 (14:00 +1100)]
add the generated manpage and html page for remote-cache so they are
available also for those that dont want to build the documentation
themselves

15 years agonew version 3.0 2.5
root [Mon, 9 Mar 2009 02:38:27 +0000 (13:38 +1100)]
new version 3.0

15 years agomake sure we use null terminated path strings
root [Fri, 6 Mar 2009 03:44:44 +0000 (14:44 +1100)]
make sure we use null terminated path strings

15 years agomake sure we null terminate the string we return in _readlink()
root [Fri, 6 Mar 2009 03:19:21 +0000 (14:19 +1100)]
make sure we null terminate the string we return in _readlink()

15 years agoremove some DEBUG statements we no longer need.
root [Fri, 6 Mar 2009 01:58:36 +0000 (12:58 +1100)]
remove some DEBUG statements we no longer need.

15 years agosplit remote-cache into a two process model where we spawn a separate process that...
root [Fri, 6 Mar 2009 01:53:48 +0000 (12:53 +1100)]
split remote-cache into a two process model where we spawn a separate process that is dedicated to only manage migrations from the remote site onto the local cache.

Communications between the FUSE module and the migration daemon is through a tdb database holding the list of files to migrate and signals to tell the migration daemon : there is work to do now.

15 years agoanother file required by the events system
root [Thu, 5 Mar 2009 01:29:08 +0000 (12:29 +1100)]
another file required by the events system

15 years agoadd another file that the events system needs
root [Thu, 5 Mar 2009 01:23:06 +0000 (12:23 +1100)]
add another file that the events system needs

15 years agoadd a file for linked list macros that the event system depends on
root [Thu, 5 Mar 2009 01:09:15 +0000 (12:09 +1100)]
add a file for linked list macros that the event system depends on

15 years agoadd the event system from ctdb
root [Thu, 5 Mar 2009 00:58:46 +0000 (11:58 +1100)]
add the event system from ctdb

15 years agoadd gpl boilerplate to migrate.h
root [Thu, 5 Mar 2009 00:22:33 +0000 (11:22 +1100)]
add gpl boilerplate to migrate.h

remote-cache is read-write not rea-only any more

15 years agomake sure to check that fhs is no null before dereferencing it.
Ronnie Sahlberg [Fri, 27 Feb 2009 01:44:02 +0000 (12:44 +1100)]
make sure to check that fhs is no  null before dereferencing it.
it should never happen  but check nevertheless

15 years agoverion 2.9
Ronnie Sahlberg [Fri, 27 Feb 2009 01:09:25 +0000 (12:09 +1100)]
verion 2.9

15 years agouse an explicit chmod to make sure the bits are set correctly
Ronnie Sahlberg [Fri, 27 Feb 2009 01:07:34 +0000 (12:07 +1100)]
use an explicit chmod to make sure the bits are set correctly

15 years agouse file locking on the temporary cache file to prevent two immeidate
Ronnie Sahlberg [Fri, 27 Feb 2009 01:02:37 +0000 (12:02 +1100)]
use file locking on the temporary cache file to prevent two immeidate
migrations simultaneously for the same file

15 years agofix a broken debug statement
Ronnie Sahlberg [Fri, 27 Feb 2009 00:41:26 +0000 (11:41 +1100)]
fix a broken debug statement

15 years agosmall files smaller than 128k are migrated explicitely during first read
Ronnie Sahlberg [Fri, 27 Feb 2009 00:37:18 +0000 (11:37 +1100)]
small files smaller than 128k are migrated explicitely during first read
in the current thread since it this is cheap (cheaper than spawning a
child process and running rsync at least)

15 years agodont switch uid in _unlink()
Ronnie Sahlberg [Thu, 26 Feb 2009 00:50:30 +0000 (11:50 +1100)]
dont switch uid in _unlink()
instead check permissions explicitely and do the operation as root

15 years agodont switch userid to/from the real user and root in _create() since
Ronnie Sahlberg [Thu, 26 Feb 2009 00:44:58 +0000 (11:44 +1100)]
dont switch userid to/from the real user and root in _create() since
this is such an expensive operation.
Instead check the permission bits explicitely

15 years agodont flush the cached-file or the direcache after a write has completed.
Ronnie Sahlberg [Wed, 25 Feb 2009 03:30:55 +0000 (14:30 +1100)]
dont flush the cached-file or the direcache after a write has completed.
while a write does mean that any cached copy would be "stale" deleting
it at this stage is a very expensive operation.
It is much cheaper to leave the stale file in the cache and rely on next
read flushing it from the cache.

15 years agoDont switch uid/gid to the user issuing the operation, instead do it as
Ronnie Sahlberg [Wed, 25 Feb 2009 02:13:33 +0000 (13:13 +1100)]
Dont switch uid/gid to the user issuing the operation, instead do it as
root but check the mode bits explicitely.

the switch of uid/gid are surprisingly expensive

15 years agoAvoid switching to/from "real user"/root during _read()
Ronnie Sahlberg [Wed, 25 Feb 2009 00:53:27 +0000 (11:53 +1100)]
Avoid switching to/from "real user"/root during _read()
and instead evaluate the permissions explicitely before trying
open()/pread().

These switches were very expensive.

15 years agooptimize away some expensive lstat()
Ronnie Sahlberg [Mon, 23 Feb 2009 23:10:01 +0000 (10:10 +1100)]
optimize away some expensive lstat()

15 years agonew version
root [Fri, 6 Feb 2009 05:22:14 +0000 (16:22 +1100)]
new version

15 years agoadd a "big_writes" argument
root [Fri, 6 Feb 2009 05:19:56 +0000 (16:19 +1100)]
add a "big_writes" argument

15 years agomake it possible to tweak the max number of concurrent migrations
root [Thu, 5 Feb 2009 08:13:48 +0000 (19:13 +1100)]
make it possible to tweak the max number of concurrent migrations

15 years agosee if we can get a lock on the migration limiter file first becore we create and...
root [Thu, 5 Feb 2009 07:58:29 +0000 (18:58 +1100)]
see if we can get a lock on the migration limiter file first becore we create and lock the file in the local cache fs

15 years agoreduce the loglevel for an info message from ERR to INFO
root [Thu, 5 Feb 2009 07:11:06 +0000 (18:11 +1100)]
reduce the loglevel for an info message from ERR to INFO

15 years agoincrease the limit on number of concurrent migrations to 1000
root [Thu, 5 Feb 2009 07:03:46 +0000 (18:03 +1100)]
increase the limit on number of concurrent migrations to 1000

15 years agowhen trying to migrate a file, check and make sure we have created all parent directo...
root [Thu, 5 Feb 2009 07:01:50 +0000 (18:01 +1100)]
when trying to migrate a file, check and make sure we have created all parent directories, and create them if not

otherwise we will not be able to migrate and cache files when the parent directory has never been scanned (and thus created) by READDIR

15 years agobuild the docs
root [Mon, 19 Jan 2009 22:32:57 +0000 (09:32 +1100)]
build the docs

15 years agoremove big-writes doenst work with NFS anyway
root [Mon, 19 Jan 2009 22:28:00 +0000 (09:28 +1100)]
remove big-writes   doenst work with NFS anyway

15 years agoremove the lock operation
root [Mon, 19 Jan 2009 22:26:27 +0000 (09:26 +1100)]
remove the lock operation

15 years agoremove a debug statement
root [Tue, 16 Dec 2008 22:37:26 +0000 (09:37 +1100)]
remove a debug statement

15 years agoThe kernel nfs daemon can not handle filesystems offering DIRECT_IO
root [Tue, 16 Dec 2008 08:38:39 +0000 (19:38 +1100)]
The kernel nfs daemon can not handle filesystems offering DIRECT_IO
and thus by design will feed  a write i/o to the application data
in a singlehtreaded sequence of pages to the filesystem, one by one.
But hang on, it gets better,  these 4kb blobs from the idiocy of having
a demon in kernelspace has page alignment problems!
So each page is actually fed twice to the filesystem, once as 4kb-small-delta anf ythen as a second i/o of size small-delta.

Brilliant! Great work.
Thus any filesystem that uses DIRECT_IO for performance reasons will break, immediately.
Second when disabling DIRECT_IO the nice surprise comes that when a client performs 1 32kb write to kNFSd,   kNFSd and the rest of the kernel translates this to a singlethreaded sequence of 8 almost 4kb writes  and another 8 small writes  as far as the filesystem can see.

This is either a mechanism to prevent and punish out of tree filesystems or some other braindamage by the one deciding that a "hey lets put all userspace daemons inside the kernel because it is cool".

why implement a userspace service inside the kernel?   insanity.

15 years agodont build the docs by default
Ronnie Sahlberg [Tue, 16 Dec 2008 01:57:44 +0000 (12:57 +1100)]
dont build the docs by default

15 years agoadd an option to specify direct_io
Ronnie Sahlberg [Tue, 16 Dec 2008 01:57:03 +0000 (12:57 +1100)]
add an option to specify direct_io

15 years agoreactivate big writes
root [Tue, 16 Dec 2008 01:43:40 +0000 (12:43 +1100)]
reactivate big writes

15 years agofix bug when handling gids.
root [Thu, 11 Dec 2008 07:26:54 +0000 (18:26 +1100)]
fix bug when handling gids.

we have to look up all aux gids for a user every time and set them
since this must go in the oncrpc layer to the remote nfs server

create a memory tdb database to store the uid->gidlist mappings since
this operation might be quite expensive

15 years agonew version 2.5
root [Mon, 24 Nov 2008 23:00:32 +0000 (10:00 +1100)]
new version 2.5

15 years agoplug some memory leaks
root [Mon, 24 Nov 2008 22:53:17 +0000 (09:53 +1100)]
plug some memory leaks

15 years agonew version 2.4
root [Sun, 23 Nov 2008 03:15:53 +0000 (14:15 +1100)]
new version  2.4

15 years agorekmove debug code
root [Sun, 23 Nov 2008 03:14:04 +0000 (14:14 +1100)]
rekmove debug code

15 years agouse stat and check if the file exist before we try to delete it.
root [Sun, 23 Nov 2008 02:55:49 +0000 (13:55 +1100)]
use stat and check if the file exist before we try to delete it.

15 years agonew version 2.3
root [Sat, 15 Nov 2008 03:08:02 +0000 (14:08 +1100)]
new version 2.3

15 years agodont leak filedescriptors
root [Sat, 15 Nov 2008 03:06:29 +0000 (14:06 +1100)]
dont leak filedescriptors

15 years agonew version 2.2
root [Wed, 12 Nov 2008 07:57:14 +0000 (18:57 +1100)]
new version 2.2

15 years agoset the "big_write" option when starting fuse.
root [Wed, 12 Nov 2008 07:53:57 +0000 (18:53 +1100)]
set the "big_write" option when starting fuse.
This requires that remote cache is built with a fuse version later than 2.7.4
such as either the 2.8.0 prerelease or later or current cvs.

The resulting remote-cache application will however still be compatible
with a kernel module from an earlier version of fuse.

15 years agoupdate version
root [Tue, 11 Nov 2008 00:56:35 +0000 (11:56 +1100)]
update version

15 years agonew version 2.1.0
root [Tue, 11 Nov 2008 00:54:41 +0000 (11:54 +1100)]
new version 2.1.0

15 years agoupdates to read write support
root [Tue, 11 Nov 2008 00:53:08 +0000 (11:53 +1100)]
updates to read write support

15 years agoupdate the version insid ethe makerpms script
Ronnie Sahlberg [Wed, 23 Jul 2008 03:22:00 +0000 (13:22 +1000)]
update the version insid ethe makerpms script

15 years agoGNU_SOURCE may already be defined so define it inside an ifndef
Ronnie Sahlberg [Wed, 23 Jul 2008 03:18:18 +0000 (13:18 +1000)]
GNU_SOURCE may already be defined so define it inside an ifndef

15 years agoNew version 2.0.0
Ronnie Sahlberg [Wed, 23 Jul 2008 02:14:02 +0000 (12:14 +1000)]
New version 2.0.0
This adds read/write support

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
15 years agodocument --read-write
Ronnie Sahlberg [Wed, 23 Jul 2008 02:11:18 +0000 (12:11 +1000)]
document --read-write

15 years agoadd read/write functions for all commands we used to return EROFS
Ronnie Sahlberg [Tue, 22 Jul 2008 05:23:37 +0000 (15:23 +1000)]
add read/write functions for all commands we used to return EROFS
for unconditionally.

we can now write (slowly) on the cache site. These write operations
(WRITE, but also everything that modifies metadata like chmod, mkdir etc)
are passed over to the master site and the local cache is wiped.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
15 years agoinitial read/write support
Ronnie Sahlberg [Tue, 22 Jul 2008 03:50:54 +0000 (13:50 +1000)]
initial read/write support
update access to allow trying the W bit if we are in rw/ mode

15 years agoIf we detect a file no longer exists on the remote site during a GETATTR read-only read-only
Ronnie Sahlberg [Tue, 22 Jul 2008 03:42:51 +0000 (13:42 +1000)]
If we detect a file no longer exists on the remote site during a GETATTR
we also try to delete any local cached copy of it we may have

15 years agoAdd an option "--file-min-mtime-age". Files that have been modified more recently...
Ronnie Sahlberg [Tue, 22 Jul 2008 02:31:30 +0000 (12:31 +1000)]
Add an option "--file-min-mtime-age". Files that have been modified more recently than this will not be copied to the local cache.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
15 years agonew version
Ronnie Sahlberg [Tue, 1 Jul 2008 01:08:14 +0000 (11:08 +1000)]
new version

add --file-check-parent-mtime argument that will activate the
optimization in attribute caching that is possible for archive systems
(== files are never modified post creation)

15 years agoget rid of util.c
Ronnie Sahlberg [Tue, 1 Jul 2008 00:51:21 +0000 (10:51 +1000)]
get rid of util.c

15 years agowe dont need this file
Ronnie Sahlberg [Tue, 1 Jul 2008 00:49:49 +0000 (10:49 +1000)]
we dont need this file

15 years agowe dont need libevents
Ronnie Sahlberg [Tue, 1 Jul 2008 00:46:43 +0000 (10:46 +1000)]
we dont need libevents

15 years agowe dont need strlist
Ronnie Sahlberg [Tue, 1 Jul 2008 00:42:17 +0000 (10:42 +1000)]
we dont need strlist

15 years agowe dotn need idtree
Ronnie Sahlberg [Tue, 1 Jul 2008 00:40:03 +0000 (10:40 +1000)]
we dotn need idtree

15 years agoRevert "we dont need util_time"
Ronnie Sahlberg [Tue, 1 Jul 2008 00:38:44 +0000 (10:38 +1000)]
Revert "we dont need util_time"

This reverts commit 312e0a55fd7d978823ac1e599f63503ba62cc3d0.

15 years agoRevert "we dont need util_file"
Ronnie Sahlberg [Tue, 1 Jul 2008 00:38:33 +0000 (10:38 +1000)]
Revert "we dont need util_file"

This reverts commit 2004b4694622b6c570dcbddf2d73709bae24ba75.

15 years agowe dont need util_file
Ronnie Sahlberg [Tue, 1 Jul 2008 00:36:44 +0000 (10:36 +1000)]
we dont need util_file

15 years agowe dont need util_time
Ronnie Sahlberg [Tue, 1 Jul 2008 00:35:38 +0000 (10:35 +1000)]
we dont need util_time

15 years agowe dont need db_wrap
Ronnie Sahlberg [Tue, 1 Jul 2008 00:34:05 +0000 (10:34 +1000)]
we dont need db_wrap

15 years agoversion 1.0.9
Ronnie Sahlberg [Mon, 23 Jun 2008 23:20:56 +0000 (09:20 +1000)]
version 1.0.9

15 years agotell fuse to use the permissions from the fiulesystekm instead of some made up ones
Ronnie Sahlberg [Mon, 23 Jun 2008 23:19:54 +0000 (09:19 +1000)]
tell fuse to use the permissions from the fiulesystekm instead of some made up ones

15 years agodont include ctdb.h we dont need this file
Ronnie Sahlberg [Fri, 20 Jun 2008 07:21:37 +0000 (17:21 +1000)]
dont include ctdb.h  we dont need this file

15 years agoupdate access() root can always read and execute
Ronnie Sahlberg [Wed, 18 Jun 2008 22:07:04 +0000 (08:07 +1000)]
update access()  root can always read and execute

15 years agopass the use_ino option to fuse
Ronnie Sahlberg [Wed, 18 Jun 2008 04:01:17 +0000 (14:01 +1000)]
pass the use_ino option to fuse

15 years agoversion 1.0.8
Ronnie Sahlberg [Wed, 18 Jun 2008 03:36:07 +0000 (13:36 +1000)]
version 1.0.8

15 years agoemulate the access() call
Ronnie Sahlberg [Wed, 18 Jun 2008 03:31:04 +0000 (13:31 +1000)]
emulate the access() call

15 years agonew version 1.0.7
Ronnie Sahlberg [Wed, 18 Jun 2008 02:23:47 +0000 (12:23 +1000)]
new version 1.0.7

15 years agoreduce the debuglevel for some messages
Ronnie Sahlberg [Wed, 18 Jun 2008 02:22:41 +0000 (12:22 +1000)]
reduce the debuglevel for some messages

15 years agowe can also verify the local cache and purge files that have expired when we process...
Ronnie Sahlberg [Wed, 18 Jun 2008 02:18:33 +0000 (12:18 +1000)]
we can also verify the local cache and purge files that have expired when we process a GETATTR

15 years agoupdate GETATTR to know how to handle file_check_parent_mtime
Ronnie Sahlberg [Wed, 18 Jun 2008 02:05:13 +0000 (12:05 +1000)]
update GETATTR to know how to handle file_check_parent_mtime

15 years agoadd new parameter --file-check-parent-mtime
Ronnie Sahlberg [Wed, 18 Jun 2008 01:47:31 +0000 (11:47 +1000)]
add new parameter --file-check-parent-mtime

15 years agonew version 1.0.6
Ronnie Sahlberg [Tue, 17 Jun 2008 02:25:35 +0000 (12:25 +1000)]
new version 1.0.6

15 years agoset the extra groups to a list with one entry, the current group
Ronnie Sahlberg [Tue, 17 Jun 2008 02:23:48 +0000 (12:23 +1000)]
set the extra groups to a list with one entry, the current group

15 years agodrop the extra groups for the process when we switch to the real user
Ronnie Sahlberg [Tue, 17 Jun 2008 01:51:17 +0000 (11:51 +1000)]
drop the extra groups for the process when we switch to the real user

15 years ago new version 1.0.5
Ronnie Sahlberg [Mon, 16 Jun 2008 05:16:32 +0000 (15:16 +1000)]
 new version 1.0.5

15 years agowhen reading a directory from a remote site,
Ronnie Sahlberg [Mon, 16 Jun 2008 05:04:33 +0000 (15:04 +1000)]
when reading a directory from a remote site,
read it as root and build the local cache
then try again and switch to the real user uid to read from the cache