ftpfs: no caching by default, add -c flag to enable it (patch by mycroftiv)
This commit is contained in:
parent
df6a30f3c0
commit
b192800096
2 changed files with 13 additions and 8 deletions
|
@ -4,7 +4,7 @@ ftpfs \- file transfer protocol (FTP) file system
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B ftpfs
|
.B ftpfs
|
||||||
[
|
[
|
||||||
.B -/dqnt
|
.B -/dqntc
|
||||||
]
|
]
|
||||||
[
|
[
|
||||||
.B -m
|
.B -m
|
||||||
|
@ -90,6 +90,10 @@ To avoid seeing startup messages from the server use option
|
||||||
To see all messages from the server use option
|
To see all messages from the server use option
|
||||||
.BR -d .
|
.BR -d .
|
||||||
.PP
|
.PP
|
||||||
|
By default ftpfs only caches while a file operation is in progress. The
|
||||||
|
.BR -c
|
||||||
|
flag enables caching, increasing performance but allowing outdated file and directory data to persist.
|
||||||
|
.PP
|
||||||
Some systems will hangup an ftp connection that has no activity
|
Some systems will hangup an ftp connection that has no activity
|
||||||
for a given period. The
|
for a given period. The
|
||||||
.BR -K
|
.BR -K
|
||||||
|
@ -183,13 +187,8 @@ only one directory, usually
|
||||||
However, walking to any valid directory on that machine will succeed
|
However, walking to any valid directory on that machine will succeed
|
||||||
and cause that directory entry to appear under the mount point.
|
and cause that directory entry to appear under the mount point.
|
||||||
.PP
|
.PP
|
||||||
.I Ftpfs
|
If caching is active, remote
|
||||||
caches files and directories. A directory will fall from the cache
|
changes that have been cached will not be visible.
|
||||||
after 5 quiescent minutes or if the local user changes the
|
|
||||||
directory by writing or removing a file.
|
|
||||||
Otherwise, remote
|
|
||||||
changes to the directory that occur after the directory has
|
|
||||||
been cached might not be immediately visible.
|
|
||||||
Attempting to walk to
|
Attempting to walk to
|
||||||
.IB directory /.flush.ftpfs
|
.IB directory /.flush.ftpfs
|
||||||
will flush
|
will flush
|
||||||
|
|
|
@ -85,6 +85,7 @@ char *nouid = "?uid?";
|
||||||
|
|
||||||
char *nosuchfile = "file does not exist";
|
char *nosuchfile = "file does not exist";
|
||||||
char *keyspec = "";
|
char *keyspec = "";
|
||||||
|
int docache = 0;
|
||||||
|
|
||||||
void
|
void
|
||||||
usage(void)
|
usage(void)
|
||||||
|
@ -149,6 +150,9 @@ main(int argc, char *argv[])
|
||||||
case 'q':
|
case 'q':
|
||||||
quiet = 1;
|
quiet = 1;
|
||||||
break;
|
break;
|
||||||
|
case 'c':
|
||||||
|
docache = 1;
|
||||||
|
break;
|
||||||
} ARGEND
|
} ARGEND
|
||||||
if(argc != 1)
|
if(argc != 1)
|
||||||
usage();
|
usage();
|
||||||
|
@ -582,6 +586,8 @@ rclunk(Fid *f)
|
||||||
f->node->opens--;
|
f->node->opens--;
|
||||||
}
|
}
|
||||||
f->busy = 0;
|
f->busy = 0;
|
||||||
|
if(!docache && ISCACHED(f->node))
|
||||||
|
uncache(f->node);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue