Commit Graph

186 Commits

Author SHA1 Message Date
jrf 5f626331c1 caddr_t -> void * and removal of some more casts. 2004-05-12 02:07:37 +00:00
jrf e3a43961ff Remove caddr_t inlines. Approved by christos@NetBSD.org. 2004-05-04 13:26:58 +00:00
jrf fc97fd571a First pass for some caddr_t removal and changes to get rid of it where we
no longer use and/or need it

	- removed casts from unionfs, deadfs and fdesc
	  (there are more to hunt down still)
	- changed vfs_quotactl args argumet from caddr_t to void *
	- changed vfs_quotactl structures/callers to reflect the api change

Compiled fine and ran for about a day. Approved/reviewed by
christos@netbsd.org and gimpy@netbsd.org.
2004-04-27 17:37:30 +00:00
jdolecek d1e0d393ca initialize gmtoff in mount structure if mount version is < 3 2004-04-27 17:25:50 +00:00
christos 9ec61a4e56 fix compile error (thanks Juan RP) 2004-04-26 20:38:22 +00:00
christos c30382f197 fix fragment size. 2004-04-26 17:08:45 +00:00
christos 85a8e7acfa fill namemax 2004-04-26 17:08:34 +00:00
simonb b5d0e6bf06 Initialise (most) pools from a link set instead of explicit calls
to pool_init.  Untouched pools are ones that either in arch-specific
code, or aren't initialiased during initial system startup.

 Convert struct session, ucred and lockf to pools.
2004-04-25 16:42:40 +00:00
christos 6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +00:00
jdolecek 9705c5db44 properly version the msdosfs mount structure after addition
of gmt time offset support (Hi Itojun!); adresses most important
part of PR kern/25226 by Todd Whitesel
2004-04-19 07:53:58 +00:00
atatat 284a91c3ab Manually attach malloc types when being built as an lkm. 2004-03-27 04:43:43 +00:00
atatat 19af35fd0d Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
2004-03-24 15:34:46 +00:00
jdolecek 2c39ad3ea5 remove apparently meaningless part of one debug printf insmbfs_lookup() 2004-03-22 16:40:48 +00:00
jdolecek d8d0d9d81f g/c redundant debug printf 2004-03-22 16:39:30 +00:00
jdolecek e36d8bbf0f in smbfs_smb_lookup(), check the returned (found) file name matches
exactly the filename we wanted to lookup, so that file names differing
in case are refused right away

resolves the chdir part of PR kern/22835 by Rob Quinn (cd succeeded when
it was supposed to fail)
2004-03-21 16:04:07 +00:00
jdolecek 93afaf4fc0 use SMBVDEBUG() instead of #ifdef SMB_VNODE_DEBUG 2004-03-21 13:43:46 +00:00
jdolecek 76763df930 no need of #ifdef SMB_VNODE_DEBUG around SMBVDEBUG() 2004-03-21 13:43:09 +00:00
jdolecek 8c5dfdc365 Allow the [, ], and = characters in non-8.3 filenames since they
are allowed by Windows (ref: MS KB article 120138).

Change follows FreeBSD rev. 1.40
2004-03-21 10:24:01 +00:00
jdolecek 64022a06e1 Add missing permission checks to the smbfs VOP_SETATTR vnode op for the
case where the caller requests to change access or modification times.
Change obtained from FreeBSD rev. 1.30
2004-03-20 21:03:42 +00:00
jdolecek bfa09b45ff ditch busted access check in smbfs_access(), and use vaccess() instead;
also normalize function contents to resemble other filesystems,
and add a SMBVDEBUG() to ease eventual future debugging

partially based on FreeBSD rev. 1.29

fixes PR kern/23373 by Piotr Stolc
2004-03-20 20:26:28 +00:00
jdolecek f3503f30a7 escape the backslash in badchars so that smbfs_pathcheck() correctly
rejects pathnames with backslashes in them (and to avoid a syntax error)

change from FreeBSD
2004-03-20 19:48:30 +00:00
jdolecek edb0fb0a4c pullup FreeBSD change rev. 1.44 - restore closing of SMB find handle
in smbfs_close(); it's necessary to overcome limitation of the current
directory lookup code

this fixes problem where ls wouldn't show newly created files, such as:
> touch a b c
> ls
>

problem and fix pointed out by YAMAMOTO Takashi
2004-03-20 18:41:02 +00:00
jdolecek 1c8e4dd167 add comment to smbfs_remove() regarding the limitation to only remove
unreferenced files
2004-02-29 12:19:15 +00:00
jdolecek b4b58e65b1 print info about active vnodes in reclaim/inactive if prtactive is set 2004-02-29 12:17:39 +00:00
jdolecek 1a3236aefa close the SMB handle when vnode is inactivated, rather than on file close,
so that mmap()ped regions remain accessible even when the file descriptor
is closed
g/c smbnode's n_opencount, and have single NOPEN flag instead

fixes PR kern/24516 by Lloyd Parkes

change obtained from FreeBSD, with only minor adjustments
2004-02-29 11:47:08 +00:00
jdolecek 4ba68533b9 use global prtactive setting instead of ntfs-specific variable;
this also changes default, to not print the active vnodes
2004-02-29 11:08:55 +00:00
jdolecek 8af8547957 smbfs_rename(): #ifdef notyet some code related to disabled smbfs_smb_move(),
and also fix a return in the code section - we need to do vnode cleanup
before returning error
2004-02-28 09:19:53 +00:00
jdolecek 0a48f48a91 smbfs_rename(): only touch attribute cache properties if the operation
is carried out; particularily, don't touch it if the rename files
due to EXDEV - the 'from' or 'to' vnode may not be on smbfs filesystem
at all in that case
this is the final fix for PR kern/24455 by Milos Urbanek
2004-02-28 09:04:00 +00:00
wiz e4612a6a03 achieved, not acheived. From Peter Postma. 2004-02-24 15:23:16 +00:00
wiz dc4cc98b15 becuase -> because. From Peter Postma. 2004-02-24 15:05:53 +00:00
jdolecek 756045a44e fix PNBUF_PUT() calls:
* it should not be called for rmdir or remove vop
* for create and mkdir, it should only be called on error, or when
  SAVESTART flag is not set

fixes PR kern/24455 by Milos Urbanek
2004-02-22 11:14:08 +00:00
jdolecek 209952cca8 make VOP_UPDATE() trivially succeed (without doing anything), instead
of returning error

this makes it possible to mount other filesystems on directory on NTFS
filesystem
2004-02-22 10:26:14 +00:00
jdolecek ff7bf7ee82 use 64bit local variable for free space computation 2004-02-22 08:18:11 +00:00
hannken d6170777cf Fix xxx_strategy() to use the vnode arg instead of bp->b_vp. 2004-01-26 10:39:29 +00:00
hannken 3db4e2acd8 Make VOP_STRATEGY(bp) a real VOP as discussed on tech-kern.
VOP_STRATEGY(bp) is replaced by one of two new functions:

- VOP_STRATEGY(vp, bp)  Call the strategy routine of vp for bp.
- DEV_STRATEGY(bp)      Call the d_strategy routine of bp->b_dev for bp.

DEV_STRATEGY(bp) is used only for block-to-block device situations.
2004-01-25 18:06:48 +00:00
bjh21 a42f9e3038 Include <sys/sysctl.h> for sysctl stuff.
Also, create the vfs.filecore subtree, rather than vfs.union.
2003-12-05 00:51:08 +00:00
atatat 13f8d2ce5f Dynamic sysctl.
Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al.  Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded.  Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment.  I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.
2003-12-04 19:38:21 +00:00
christos 6dc8df292b KASSERT was not the right thing here. Instead only set the type if f_type
has been inititialized. Reported by pooka
2003-11-11 00:44:16 +00:00
simonb b6abb6ab1d Remove some assigned-to but otherwise unused variables. 2003-10-30 01:58:17 +00:00
christos 79b169b7aa Fix typo. 2003-10-25 19:10:34 +00:00
christos bbda852cff FIx uninitialized variable warnings 2003-10-25 18:33:37 +00:00
christos 2017bf9a94 Fix uninitialized variable warning 2003-10-25 18:31:59 +00:00
christos d4ca1c7d1e fix uninitialized variable 2003-10-25 08:39:05 +00:00
briggs 33a79483d0 Fix a panic that occurred when trying to traverse a corrupt msdosfs
filesystem.  With this particular corruption, the code in pcbmap()
would compute an offset into an array that was way out of bounds,
so check the bounds before trying to access and return an error if
the offset would be out of bounds.
2003-10-22 03:51:12 +00:00
hannken a3a898ff0f Add the gating of system calls that cause modifications to the underlying
file system.
The function vfs_write_suspend stops all new write operations to a file
system, allows any file system modifying system calls already in progress
to complete, then sync's the file system to disk and returns. The
function vfs_write_resume allows the suspended write operations to
complete.

From FreeBSD with slight modifications.

Approved by: Frank van der Linden <fvdl@netbsd.org>
2003-10-15 11:28:59 +00:00
dbj fe7c786886 add mnt_iflag field to struct mount for internal flags
mv MNT_GONE, MNT_UNMOUNT and MNT_WANTRDWR to this field
additonally add mnt_writeopcountupper and mnt_writeopcountlower fields
in preparation for pending write suspension support work
bump kernel version to 1.6ZD
2003-10-14 14:02:56 +00:00
lukem 2d6acee111 add bpbReserved fields 2003-10-08 04:11:43 +00:00
jdolecek 87f9bd7267 change accidentaly left debug printf to dprintf() 2003-10-06 16:47:10 +00:00
lukem 1ab040b9ee Consistently use "bsBPB" as the struct member for the BIOS parameter block. 2003-10-06 02:21:47 +00:00
yamt 589e82f2ba terminate snprintb 'new' format strings correctly.
(fixes overrun in mount_*)
2003-10-03 16:34:31 +00:00