Commit Graph

218 Commits

Author SHA1 Message Date
chs
3a5e4f901b in *_sync(), don't skip vnodes which have (potentially dirty) pages. 2000-12-10 19:36:31 +00:00
fvdl
ff72f95eaa Initialize 'frcn' to 0 in extendfile to be safe. 2000-12-04 11:54:39 +00:00
chs
aeda8d3b77 Initial integration of the Unified Buffer Cache project. 2000-11-27 08:39:39 +00:00
ad
642267bcc7 Update for hashinit() change. 2000-11-08 14:28:12 +00:00
fvdl
db4108490a Adapt for VOP_FSYNC parameter change. 2000-09-19 22:01:59 +00:00
jdolecek
bd462d0988 fix one of debug printfs to print dosfilename correctly, and include
a newline
2000-08-11 19:41:58 +00:00
jdolecek
898d0d5e1c simplify 2000-08-06 20:11:31 +00:00
thorpej
7cc27a88c0 Convert namei pathname buffer allocation to use the pool allocator. 2000-08-03 20:41:05 +00:00
thorpej
a07f6460c8 MALLOC()/FREE() are not to be used for variable sized allocations. 2000-08-03 00:54:23 +00:00
jdolecek
057458abac msdosfs_getattr(): do not report archived files (those with ATTR_ARCHIVE unset)
as having flag SF_ARCHIVED on; this is wrong for directories, which don't
have any mode flags on msdosfs, so it's always treated as archived,
which leads to problems described in pr #8439. The semantics of the
archive flag differs between Unix and msdos/windoze, so it's better
to not set the flag at all even for regular files, to avoid surprises.

This fixes bin/8439 by Thomas Klausner.
2000-07-30 20:16:48 +00:00
jdolecek
ee0bf49189 msdosfs_setattr(): silently ignore uid/gid changes, instead
of returning EINVAL
This fixes bin/9990 by Thomas Klausner.
2000-07-25 22:15:00 +00:00
jdolecek
61253f1dc8 msdosfs_rename(): fix too many vrele()'s of fdvp in some error cases;
bug and fix found on OpenBSD, though the fix is implemented very
differently here - we avoid changing correct code and only touch
what needs touching

This solves kern/10312 by Martin J. Laubach.
2000-07-25 20:56:10 +00:00
jdolecek
b0fb24279c change the lf_advlock() arguments from
int     lf_advlock __P((struct lockf **,
           off_t, caddr_t, int, struct flock *, int));
to

int     lf_advlock __P((struct vop_advlock_args *, struct lockf **, off_t));

This matches common usage and is also compatible with similar change
in FreeBSD (though they use u_quad_t as last arg).
2000-07-22 15:26:11 +00:00
mrg
bcc4078e32 remove include of <vm/vm.h> 2000-06-28 02:49:15 +00:00
mycroft
4656dfd24f Add a new function to remove extra buffers when truncating a file. This is
more generic than the vinvalbuf(V_SAVEMETA) case, avoiding synchronous
operations when truncating to a non-zero length.
2000-05-28 04:13:56 +00:00
perseant
f0728fdce1 Change the sementics of the last parameter from a boolean ("waitfor") to
a set of flags ("flags").  Two flags are defined, UPDATE_WAIT and
UPDATE_DIROP.

Under the old semantics, VOP_UPDATE would block if waitfor were set,
under the assumption that directory operations should be done
synchronously.  At least LFS and FFS+softdep do not make this
assumption; FFS+softdep got around the problem by enclosing all relevant
calls to VOP_UPDATE in a "if(!DOINGSOFTDEP(vp))", while LFS simply
ignored waitfor, one of the reasons why NFS-serving an LFS filesystem
did not work properly.

Under the new semantics, the UPDATE_DIROP flag is a hint to the
fs-specific update routine that the call comes from a dirop routine, and
should be wait for, or not, accordingly.

Closes PR#8996.
2000-05-13 23:43:06 +00:00
cgd
db4b935691 passs FAT block mask as argument to MSDOSFSEOF(), so that fat.h is
more useful.
2000-05-13 06:04:41 +00:00
jdolecek
40d9f8a709 msdosfs_read(): avoid integer overflow for files > 2GB, when
difference between current read position and file size
	is bigger than 2GB

This fixes problem first noted in FreeBSD PR#15639 and sent
by Martin J. Laubach in kern/9046, though the implementation
differs a bit.
2000-04-22 22:45:37 +00:00
jdolecek
2deec9c018 add a comment regarding FATMIRROR bit usage and restructure the code
slighly to make the check more explicit
2000-04-03 18:12:12 +00:00
augustss
f0f9fcbe61 Remove register declarations. 2000-03-30 12:23:20 +00:00
simonb
f09bb94537 Delete redunctant decls of msdosfs_{mount,start,unmount,root,quotactl,
statfs,sync,fhtovp,checkexp,vptofh}() - they're local to msdosfs_vfsops.c.

XXX: These should be static in msdosfs_vfsops.c - another day...
2000-03-30 02:29:46 +00:00
simonb
f80823211a Delete redundant decl of rootvp - it's in <sys/systm.h>. 2000-03-30 02:27:35 +00:00
jdolecek
07fd899a7f Add new CLUST_END and use it as parameter to pcbmap() when searching
for end cluster, instead of explicitly passing 0xffff. This fixes potential
problem for FAT32, where cluster number may be legally bigger than 0xffff.

Also change clusteralloc() so that fillwith is not explicitly passed by caller
anymore (there is no need to use anything other than CLUST_EOFE).

Reviewed by: Wolfgang Solfrank
2000-03-27 17:40:26 +00:00
jdolecek
b68ecd89bc one more 2000-03-27 10:15:13 +00:00
jdolecek
6b551ba751 one less - async mode support implemented 2000-03-27 09:45:38 +00:00
jdolecek
1d246008e0 Support async option by using delayed writes for metadata when mounted
with async. This increases the speed of my extract-archive test by about
20% on floppy, 10% on ZIP. "You've got the rope."
2000-03-27 09:44:45 +00:00
jdolecek
725f8327fd remove some debugging cruft accidentally left in 2000-03-24 14:37:46 +00:00
jdolecek
82d947ce4d createde(): if an error occurs, make sure to mark all modified directory
slots as deleted - otherwise we would leave bogus slots in
2000-03-22 14:56:56 +00:00
jdolecek
1892cb67c4 cosmetic changes - prettify debug printf's, reformat comments to fit 80 columns,
label:; --> label:
msdosfs_lookup(): in notfound case, update slot* only when it's needed
2000-03-22 14:49:32 +00:00
jdolecek
e2698cd72a Fix definition of MSDOSFSEOF(), which got broken in rev. 1.13.
It's shape is a bit different now than it was in rev 1.12, but is functionally
equivalent. Also add a comment explaining it's sense.

This fixes breakage reported after LP64 fixes in kern/8037, and
also kern/9116 and kern/9206.

Rewieved by: Wolfgang Solfrank, Chris G. Demetriou
2000-03-22 14:33:25 +00:00
jdolecek
2bbd0a8511 one more 2000-03-20 07:30:14 +00:00
jdolecek
8b4b779fa9 couple of remarks of issues I discovered when debugging some MSDOSFS problem 2000-03-19 10:37:04 +00:00
jdolecek
89015c4648 Add new VFS op routine - vfs_done and call it on filesystem detach
in vfs_detach(). vfs_done may free global filesystem's resources,
typically those allocated in respective filesystem's init function.
Needed so those filesystems which went in via LKM have a chance to
clean after themselves before unloading. This fixes random panics
when LKM for filesystem using pools was loaded and unloaded several
times.

For each leaf filesystem, add appropriate vfs_done routine.
2000-03-16 18:08:17 +00:00
soren
95054da1a1 Fix doubled 'the's in comments. 2000-03-13 23:52:25 +00:00
jdolecek
d28bd11715 unix2dostime(), dos2unixtime(): use value of rtc_offset to shift the time value
accordingly

Patch sent by Naoki FUKAUMI in kern/9497.
2000-02-28 10:43:08 +00:00
sommerfeld
3081e1deb7 Fix bogon discovered with LOCKDEBUG:
In msdosfs_hashget, final simple_lock() should have been simple_unlock().
2000-02-26 17:25:17 +00:00
jdolecek
88a4a819b8 When renaming a file, make sure apporpriate vnode cache entry is
purged if a file system entry is removed. Fixes part of kern/8037.

Reviewed by: Wolfgang Solfrank
Tested by: jdolecek
2000-02-01 21:33:57 +00:00
jdolecek
c4d3702f61 msdosfs_lookup(): reformat some debug printf slighly to make them more readable 2000-02-01 13:59:34 +00:00
jdolecek
d69188d4e8 msdosfs_inactive(): correct debug printf to only claim MNT_RDONLY is set
if it's so
2000-02-01 13:55:23 +00:00
jdolecek
0e45514ac9 make compilable with MSDOSFS_DEBUG (adapt to usecount & writecount size change) 2000-02-01 10:33:18 +00:00
fvdl
0b1963121a Add Kirk McKusick's soft updates code to the trunk. Not enabled by
default, as the copyright on the main file (ffs_softdep.c) is such
that is has been put into gnusrc. options SOFTDEP will pull this
in. This code also contains the trickle syncer.

Bump version number to 1.4O
1999-11-15 18:49:07 +00:00
jdolecek
f759642ae2 Fix a problem in previous: we can't blindly assume that we have
wincnt entries available at the offset the file has been found. If the dos
directory entry is not preceded by appropriate number of long name
entries (happens e.g. when the filesystem is corrupted, or when
the filename complies to DOS rules and doesn't use any long name entry),
we would overwrite random directory entries.

There are still some problems, the whole thing has to be revisited and solved
right.
1999-11-05 21:33:21 +00:00
jdolecek
ead528ba12 msdosfs_lookup(): initialize denode's de_fndcnt properly even for
"found" case. This information is important for msdosfs_rename(),
when the target filename is "long" and the file exists -
it gets unlinked and the entries are re-used, but if de_fndcnt was
left zero, createde() thinks there are no entries to store the
long filename of moved file and long filename is "lost".

Fixes PR #5468 by Dave Huang <khym@bga.com>.

Tested by: jdolecek
Reviewed by: Wolfgang Solfrank
1999-11-05 16:49:15 +00:00
jdolecek
fe54414362 msdosfs_readdir(): set iovec offset correctly so that some long filename
entries won't be ignored when contents of the directory don't
fit in user buffer all at once.

Fixes kern/4492 by Rick Byers <rickb@iaw.on.ca>.
1999-11-04 23:08:57 +00:00
enami
fee96e1746 Check if the type of device node isn't VBAD before touching v_specinfo. If
the device vnode is revoked, the field is NULL and touching it causes null
pointer derefercence.
1999-10-20 14:32:09 +00:00
wrstuden
e682a080e9 In spec_close(), if we're not doing a non-blocking close and VXLOCK is
not set, unlock the vnode before calling the device's close routine and
relock it after it returns. tty close routines will sleep waiting for
buffers to drain, which won't happen often times as the other side needs
to grab the vnode lock first.

Make all unmount routines lock the device vnode before calling VOP_CLOSE().
1999-10-16 23:53:26 +00:00
jdolecek
7dfaa17700 Adapt to cache_lookup() changes.
Tested by: jdolecek
Rewieved by: wrstuden
1999-09-05 14:26:32 +00:00
itohy
5de5ad21a2 Revoke revoke(2) bug. 1999-08-19 03:42:23 +00:00
jdolecek
6d72115a23 msdosfs_access(): initialize mode to ap->a_mode instead of 0. Fixes PR 7619.
The bug has been accidentaly introduced in revision 1.56.
msdosfs_setattr(): do ROFS checks as appropriate; while here optimize
	to only call deupdat() if there actually has been any change

Tested by: jdolecek
Rewieved by: wrstuden
1999-08-16 07:43:12 +00:00
wrstuden
169a5eda2d Pull in changes which parallel rev 1.22 -> 1.25 of ufs_lookup(). 1999-08-04 18:40:47 +00:00