Commit Graph

40 Commits

Author SHA1 Message Date
chs
0d70d731c2 use the new compatibility routines to allow mmap() to work
(in the same non-coherent fashion that it worked pre-UBC)
until someone has time to do it the right way.
2001-12-18 07:51:16 +00:00
chs
5a690c92a1 add a VOP_PUTPAGES method for all the filesystems that don't have pages,
just unlock the interlock.
2001-12-06 04:27:40 +00:00
lukem
2565646230 don't need <sys/types.h> when including <sys/param.h> 2001-11-15 09:47:59 +00:00
lukem
cd13721ca0 add RCSIDs 2001-11-10 13:22:20 +00:00
joda
210e7a63b4 fix pointer/structure mismatch in some dprintf's 2001-07-30 13:10:30 +00:00
jdolecek
a91872d1cf ntfs_readdir(): use NTFS_ROOTINO instead of ip->i_number for '..' entry
XXX it's not correct either way
2001-06-26 09:36:06 +00:00
jdolecek
61c37aef21 Allocate the struct dirent in ntfs_readdir() via MALLOC(), rather than
on stack.
2001-06-26 09:24:36 +00:00
jdolecek
15ed017345 Fix problem introduced in rev. 1.32 - dirent d_namlen should NOT count
the final null byte.
This makes programs using fts(3) (like find(1)/du(1)) print correct
name again. Problem reported by Luke Mewburn in private e-mail, thanks.
2001-06-20 09:14:59 +00:00
jdolecek
f251889358 Add per-mount filename conversion and compare hooks, which can be used
to recode Unicode names to other representation, like encoding form
or national character/code sets. This replaces the ugly NTFS_U28() hack.
Use these hooks to encode the filenames to UTF-8.
2001-02-13 19:53:52 +00:00
jdolecek
d9466585b7 make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const 2001-01-22 12:17:35 +00:00
fvdl
db4108490a Adapt for VOP_FSYNC parameter change. 2000-09-19 22:01:59 +00:00
thorpej
b94e29816f MALLOC()/FREE() are not to be used for variable sized allocations. 2000-08-03 03:39:52 +00:00
simonb
560ce4e272 Don't need to include <uvm/uvm_extern.h> in NetBSD case anymore. 2000-07-30 09:29:28 +00:00
mrg
8890e2439a <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-28 03:32:55 +00:00
mrg
2f159a1bac remove/move more mach vm header files:
<vm/pglist.h> -> <uvm/uvm_pglist.h>
	<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
	<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
	<vm/vm_object.h> -> nothing
	<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
2000-06-26 14:20:25 +00:00
mrg
c543a66253 remove some redundant <vm/vm_xxx.h> includes 2000-06-25 13:26:19 +00:00
augustss
169ac5b3c1 Remove register declarations. 2000-03-30 12:41:09 +00:00
jdolecek
94b1798c8c struct ntnode: g/c i_uid, i_gid, i_mode - use directly appropriate
ntnode->ntmp->ntm_* values
ntfs_inactivate(): as NTFS doesn't support any filesystem changes,
	it's not needed to check whether the file handle is stale;
	the check was bogus anyway - besides the value of vp->v_usecount
	was checked with unlocked vnode, the vnode was unnecessarily
	_always_ recycled when the filesystem containing it has been
	mounted with mask (-i parameter to mount_ntfs(1))
	not specified or 0 -- unbelievable, but true
ntfs_reclaim(): don't call VOP_UNLOCK() even on FreeBSD - it's not
	done for any other their filesystem, so it should not be done even
	for NTFS
ntfs_access(): remove the commented-out check for immutable flag, it doesn't
	make sense for NTFS
other miscelaneous cosmetic cleanups
1999-10-31 19:45:26 +00:00
jdolecek
45ddf3387a *sigh* - don't try to be more clever than other filesystems and
don't use LK_RETRY in ntfs_lookup() when re-locking the directory
vnode
1999-10-27 20:56:41 +00:00
jdolecek
5ab36cc0e0 ntfs_lookup(): use cnp->cn_proc as the third parameter to VN_LOCK(), so that
the code will DTRT on FreeBSD
1999-10-25 21:18:37 +00:00
jdolecek
2e860c12d3 pass the lock flags in the NetBSD version of VN_LOCK(), VGET(),
VOP__UNLOCK() macros, g/c VOP__LOCK()
add some comments
use LK_RETRY flag as appropriate
g/c the FreeBSD vnode_pager_uncache() staff, as was done in FreeBSD tree a while
	ago (actually, when they merged the first round of NetBSD patches)
use VN_LOCK() & VOP__UNLOCK() consistently throughout the code instead
	of vn_lock() and VOP_UNLOCK()
minor whitespace changes
1999-10-25 19:08:26 +00:00
jdolecek
af47d3d9a9 ntfs_lookup()
* print just the relevant part of cnp->cn_nameptr in debug printf
	* if ntfs_ntlookupfile() returned with error, print the returned
	  error if debugging
1999-10-10 14:19:54 +00:00
jdolecek
cfb7bf7fca * convert ntfs_nt{get|put|rele}() to lockmgr()-style locking and
guard the setting and checking of i_usecount by simplelock; as
  situation where there would be several users of same ntnode is
  extremery rare, it's not worth the efford to change the code to
  hold the (exclusive) lock only when it's needed

* in struct fnode, g/c f_dev & f_type (former is already in ntnode,
  latter is in parent vnode), move f_devvp from struct fnode into
  struct ntnode (no reason this should be copied in each fnode)
1999-10-09 14:27:42 +00:00
jdolecek
66f0e7b121 move definition of ntfs_fget() and ntfs_frele() to ntfs_subr.h and g/c
now obsolete ntfs_extern.h
1999-09-29 15:36:07 +00:00
jdolecek
5fc5120c8e drop support for pre-104050000 NetBSD 1999-09-22 14:39:53 +00:00
jdolecek
1c3be48c62 add pathconf(2) support 1999-09-09 18:10:23 +00:00
jdolecek
b177baf591 make separate NetBSD version of the ntfs_vnodeop_entries[] array
and reformat it as it's usual in other fs's, use genfs
routines appropriately and use genfs's fsync() instead noop
ntfs_fsync()
1999-09-09 17:59:25 +00:00
jdolecek
1de19dc293 ntfs_lookup(): fix nasty interaction of the code with recent cache_lookup()
changes: cache_lookup() now returns -1 if not successful; for
	the '.' case, 'error' haven't been cleared to 0,
	so that ntfs_lookup() itself returned -1 , resulting to
	nasty "leaf should be empty" panic early after
1999-09-09 16:29:46 +00:00
jdolecek
7dfaa17700 Adapt to cache_lookup() changes.
Tested by: jdolecek
Rewieved by: wrstuden
1999-09-05 14:26:32 +00:00
jdolecek
6f7dc58140 ntfs_read(), ntfs_write(): pass the uio struct to appropriate read/write
routines - avoids potential DoS attack and closes an easy way to force
	the kernel to panic
	* for read(), DTRT WRT offset bigger than file size
ntfs_strategy(): adapt to ntfs_readattr() change
ntfs_readdir(): use ntfs_u28() to translate the file name characters
	to 8bit encoding, avoid excessive intendation, reformat the
	debug messages slightly
1999-09-05 11:09:03 +00:00
jdolecek
aface6ce9f guard PDIRUNLOCK usage with ifdef __NetBSD__ where appripriate 1999-08-16 15:52:05 +00:00
jdolecek
387c0ba4b3 fix a warning 1999-08-04 18:39:08 +00:00
jdolecek
2092677df5 ntfs_lookup():
* return EROFS for volume mounted RO when the nameiop is DELETE or RENAME
	(the same way ufs_lookup() does)
* add explicit call to cache_lookup() on NetBSD (handled by generic VFS
	layer in FreeBSD)
* avoid using strncmp() when checking whether the name is . or ..
* fix locking of parent directory for ISDOTDOT case
* call cache_enter() always (even for . and ..)
* vnodeops array: add entry for vop_fcntl_desc, remove unnecessary casts

Reviewed by: wrstuden
Tested by: jdolecek
1999-08-04 18:17:00 +00:00
jdolecek
6ec5efc535 ntfs_strategy(): make compilable with NTFS_DEBUG 1999-07-28 20:36:46 +00:00
augustss
43dd17675c Make it compile with -current. I hope I got it right. 1999-07-26 23:26:14 +00:00
jdolecek
89c23c0bb0 ntfs_getattr(): do not use dev2udev() on NetBSD
ntfs_readdir(): remove some junk accidentaly left in when merging the changes
1999-07-26 14:40:34 +00:00
jdolecek
afae7d7f3b resolve conflicts 1999-07-26 14:02:30 +00:00
wrstuden
379a26972f Modify file systems to deal with struct lock in struct vnode. All leaf
fs's other than nfs use genfs_lock() for locking.

Modify lookup routines to set PDIRUNLOCK when they unlock the parrent.
1999-07-08 01:05:58 +00:00
christos
d9a25d1815 Fix compilation problems. 1999-05-06 15:43:17 +00:00
christos
b45af1f072 Import yesterday's NTFS FreeBSD source 1999-05-06 15:36:39 +00:00