Commit Graph

24 Commits

Author SHA1 Message Date
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