Commit Graph

98 Commits

Author SHA1 Message Date
mrg c13e3a6693 use _KERNEL_OPT 2001-05-30 11:40:35 +00:00
jdolecek 44cdfc6a17 Change MALLOC()/FREE() to malloc()/free() for cases where the size
argument is a variable.
2001-05-15 22:38:40 +00:00
jdolecek 634da40a5a Don't apply #pragma pack(1) to struct ntfsmount. This fixes unaligned
crash on alpha. Problem noted and fix provided in kern/12726 by Dave Huang.
2001-05-15 22:17:05 +00:00
joda 35fd1893df set debug level via patchable variable, and fix some debug printf warnings 2001-03-29 10:51:16 +00:00
joda 46d4ad76ad mnt_stat is not a pointer 2001-03-29 10:47:44 +00:00
jdolecek bee3b51a6d Add the code to recode filenames to utf8 for NTFS. 2001-02-14 08:44:24 +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 6574283ff5 sort more by priority, sligh rewording 2001-02-12 21:50:02 +00:00
jdolecek 07259dae69 note MALLOC()/FREE() usage should be cleaned up 2001-02-12 21:25:30 +00:00
jdolecek f9fd3eae06 ntfs_ntlookupfile(): if the file is not found using normal scan, do full
scan of all directory entries; the mangled file name we return to
  userland on getdents(2) may end up being unsearchable otherwise

This change is useful even through we will soon change to encode the
NTFS file names to utf-8 - we want to support recoding of filenames to
national 8bit charsets eventually.

while here, remove some unnecessary casts, change NTFS_U28() macro so that
the mangled filename doesn't contain control characters and use malloc()/free()
instead MALLOC()/FREE() for rdbuf buffer
2001-02-12 19:17:05 +00:00
jdolecek 266e0c4853 ntfs_unmount(): make the first 'vflush failed' printf a debug message; this
happens fairly commonly if e.g. some files are still opened
	then the unmount is attempted
	* if the second vflush() (including system vnodes) fails, we should
	  probably panic, it's too serious; for now, just add a comment
2001-02-10 14:28:51 +00:00
jdolecek d9466585b7 make filesystem vnodeop, specop, fifoop and vnodeopv_* arrays const 2001-01-22 12:17:35 +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
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
simonb 02042ff82c Delete redundant decl of rootvp, it's in <sys/systm.h>.
Don't need <sys/conf.h>.
2000-03-30 02:47:18 +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
jdolecek 52b9123e1a note lacking sysinst support 2000-03-13 19:00:28 +00:00
jdolecek 49fb5cf837 one more - Windows 2000 NTFS support 2000-02-19 14:42:21 +00:00
jdolecek e20ce57cd6 Store also attribute identifier in the filehandle structure, so that
proper file attribute (a.k.a. "resource fork") is picked up when
the filehandle is mapped back to filesystem object.

This should make attributes working on NFS-exported NTFS filesystems
or other layered filesystems using filehandles.
2000-02-08 16:17:58 +00:00
fvdl 655a7bf795 Always unlock the "fnode", even if we're about to free it, to keep
lock counts consistent. DIAGNOSTIC checks will barf otherwise.

XXX ntfs_ntput should not free the node, the reclaim vop should do it
XXX why does the ntfs code do its own internal locking?
1999-12-20 22:11:57 +00:00
jdolecek f8e7ae2c5b remove some staff not needed anymore after SOFTDEP is merged;
also fixes bug introduced in previous commit - the check for VBAD device node
  added in rev 1.20 was accidentaly run AFTER v_specinfo was touched,
  making the check useless
1999-11-15 19:38:14 +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 96a3d5b1cd install only headers which are actually used when compiling userland 1999-11-01 20:40:48 +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 e0909d1564 adjust the Unicode support comment
NTFS ACL support would be nice, though it's real world usefullnes would
be probably very limited
1999-10-31 18:31:39 +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 9134b1791c partly backup previous: don't use LK_RETRY when calling ntfs_vgetex() 1999-10-25 21:17:21 +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
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
enami cbf7cef809 No need to clear SI_MOUNTEDON on mount failure. We make sure that it
is not set on start of mounting and never set unless success to mount.
1999-10-20 14:25:42 +00:00
jdolecek b30fcf9a56 lock the device vnode before calling VOP_CLOSE() only under NetBSD
some minor cleanup in ntfs_unmount()
1999-10-17 10:18:15 +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 9516650226 update debug printfs to use "ntfs_loadntnode" instead of "ntfs_loadnode"
make ntfs_ntref() real function and properly lock ip->i_interlock when
	updating ip->i_usecount
g/c ntfs_uustricmp()
make ntfs_uastr[i]cmp() static, rename arguments to be a bit more mnemonic
add couple of casts to NTFS_TOUPPER() and ntfs_uastr[i]cmp() - this
	corrects couple of cases when open()/stat() failed for
	files which apparently existed and even showed in ls output
ntfs_ntlookup(): initialize ip properly if ntnode is found in hash table,
	so that debug prints doesn't print garbage in that case
some whitespace policy
1999-10-10 14:48:37 +00:00
jdolecek 8f6f5c74df s/ntfs_loadnode/ntfs_loadntnode()/ 1999-10-10 14:20:33 +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 105c2e3075 ntfs_nt{get|put|rele}() really are necessary, since ntnode may be
shared by several fnodes when the file is simultaneonsly opened by
several callers and different "attributes" (a.k.a.  resource forks)
are requested. They have been converted to use lockmgr()-style locking.
1999-10-09 14:29:36 +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 3631d421fe make compilable with NTFS_DEBUG defined
Noted by Patrick Welche
1999-10-01 20:01:20 +00:00
jdolecek c8cbfeffb4 mention ntfs_nt{get|put|rele}() staff 1999-09-30 16:59:14 +00:00
jdolecek 3bc0f4abd1 convert ntfs_ntlookup() to use lockmgr()-style locking, instead of it's
home brewed variant
1999-09-30 16:56:40 +00:00
jdolecek 28d14a2c3b struct fnode cleanup:
* f_lock is only needed for FreeBSD (for their totally disgusting
	  and insane way of doing generic vnode locking)
	* g/c f_mp, it was write-only
	* some comments added
1999-09-29 15:58:28 +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 bb9c5c97e2 one less - there is not point in optimizing ntfs_ntvattrget(), as the right
entry is found in 3rd pass at maximum; the duplicated code has been put
into new function ntfs_findvattr()
1999-09-29 15:31:11 +00:00