Commit Graph

107 Commits

Author SHA1 Message Date
joda 210e7a63b4 fix pointer/structure mismatch in some dprintf's 2001-07-30 13:10:30 +00:00
jdolecek fc4f1858f0 update 2001-07-06 12:38:40 +00:00
jdolecek 142a3390df two more 2001-06-26 09:36:40 +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 42b64d9f91 ntfs_readntvattr_plain():
Previous revision mistakely removed fix for DIAGNOSTIC "getblk: block size
invariant failed" panic, incorporated in rev. 1.5. The problem there
has been that depending on 'off', the code did bread() of 512 and after that
1024 bytes for same 'blkno'. Fix this differently than in rev. 1.5 -
if 'off' would bump the read over to next device block, trim the read to
end on block boundary and read rest in next loop iteration. This seems
to fix the problem, and avoids the performance hit rev. 1.5 incurred.

Fix bug in code handling holes for reads via read(2) - a variable
was incremented instead of decremented.
2001-06-25 18:33:14 +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 a0e44b481b Fix locking disorder in ntfs_vgetex(), which resulted in deadlock
under heavy vnode usage - vget() must be called with unlocked ntnode!
Actually check the vget() return value and DTRT if it fails (i.e. when
the vnode has been recycled for other use).
2001-06-19 22:14:14 +00:00
jdolecek ec6b53c217 ntfs_{read|write}vattr_plain(): remove NetBSD-specific code which seems
to be not needed anymore with UBC. This might also solve problems
people seen as 'Argument list too long', like kern/10119
2001-06-19 22:10:11 +00:00
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