Commit Graph

381 Commits

Author SHA1 Message Date
jmmv 2ddaf8b92b Nodes cannot use the '0' identifier or they will be skipped by readdir.
E.g., the root node's '.' and '..' directory entries did not appear in
a directory list, because the root node always holds the first id.
2005-09-13 21:30:52 +00:00
jmmv 5f4b660e4e Adapt recent changes to the style of the rest of the file. 2005-09-13 20:02:05 +00:00
yamt 647aa77538 - don't waste/leak kva.
- implement getpages/putpages.  support mmap.
- eliminate meaningless memcpy.
- ubcify.
2005-09-13 14:29:18 +00:00
yamt a7ca1cc6ef tmpfs_read: return EISDIR rather than EINVAL for non-VREG files.
XXX should we follow nfs, which uses EPERM?
2005-09-13 14:27:29 +00:00
yamt 1873c5428a tmpfs_link: always free pnbuf. 2005-09-13 12:11:27 +00:00
yamt db9ffe1576 - don't keep a reference to a variable on stack.
- remove a meaningless assumption about the order of structure members.
2005-09-12 19:56:58 +00:00
yamt ffb84f0f1b fix lock/unlock mismatch. XXX this is not a real fix. 2005-09-12 19:55:22 +00:00
christos b9c29c4def convert to use it nanotime, but don't call it unless it is necessary. 2005-09-12 16:55:01 +00:00
christos 54705baa2e wrong variable name. 2005-09-12 16:54:35 +00:00
christos c7d2653a66 use nanotime(). 2005-09-12 16:44:29 +00:00
christos 370f05b81d don't play with ctime directly anymore. 2005-09-12 16:43:38 +00:00
christos 1114655b16 Fix the CHANGE part too. 2005-09-12 16:42:09 +00:00
christos ce573378a6 propagate itime changes from the other filesystems. 2005-09-12 16:37:13 +00:00
christos a12024da06 Use nanotime() to update the time fields in filesystems. Convert the code
from macros to real functions. Original patch and review from chuq.
Note: ext2fs only keeps seconds in the on-disk inode, and msdosfs does not
have enough precision for all fields, so this is not very useful for those
two.
2005-09-12 16:24:41 +00:00
jmmv 7164c6807f Remove tmpfs from here, as it doesn't have a Makefile (dunno if it is
needed, yet).  Pointed out by FUKAUMI Naoki in private mail.
2005-09-12 09:11:20 +00:00
jmmv 8e0a777ab1 wiz@ remembers that the preferred way to spell file-system in NetBSD is
file system.
2005-09-10 22:28:57 +00:00
jmmv ec93365612 Initial addition of tmpfs, an efficient memory file-system. This project
was developed as part of Google's Summer of Code 2005 program.  This
change adds the kernel code, the mount_tmpfs utility, a regression test
suite and does all other related changes to integrate these.

The file-system is still *experimental*.  Therefore, it is disabled by
default in all kernels.  However, as typically done, a commented-out
entry is added in them to ease its setup.

Note that I haven't commited the required mountd(8) changes to be able
to export tmpfs file-systems because NFS support is still very unstable
and because, before enabling it, I'd like to do some other changes.

OK'ed by my project mentor, William Studenmund (wrstuden@).
2005-09-10 19:20:48 +00:00
christos 7b1ec62c27 Make fileno calculations use ino_t variables. 2005-09-10 18:35:56 +00:00
christos a4b3d5864b PR/23773: Tero Kivinen: Cannot mount msdos filesystems if filesystem size >
128GB
PR/31287: Fabien Devaux: msdosfs now can mount >128MB filesystems
2005-09-10 17:33:45 +00:00
xtraeme 85d3711504 Remove an extra ')' 2005-08-30 19:15:11 +00:00
xtraeme 37ed0ed9df Remove __P() 2005-08-30 19:11:43 +00:00
xtraeme 08fcacf4ed Remove __P() 2005-08-30 19:01:29 +00:00
xtraeme 85be4ce6e8 Remove __P() 2005-08-30 18:47:19 +00:00
xtraeme 47216f8470 Remove __P() 2005-08-29 23:57:35 +00:00
xtraeme 529eaccb6b The maximum file size on MS-DOS filesystems is 4 GB - 1 byte, so
don't bother trying to write files bigger than this.  Just return
EFBIG to caller, rather than panic()ing later.

From OpenBSD.

This closes my PR kern/30864: "panic when copying files of >4GB on msdosfs"
2005-08-29 23:22:05 +00:00
nakayama d8c6d7b24e statvfs(2) returns bogus result from union mounted file systems with
`-r' option, since it uses uninitialized buffer in the case of no
lower-layer file system.

So, add M_ZERO to malloc(9) flags to initialize the buffer.
2005-08-24 15:21:28 +00:00
christos 5e6a1c8476 fileid is now a quad. 2005-08-19 12:24:54 +00:00
christos 2ebf2b2fc3 namlen is u_int16_t now. 2005-08-19 04:47:55 +00:00
christos b02ca699ef Add an _ to DIRENT_SIZE 2005-08-19 04:45:47 +00:00
christos 103542d3d7 fix a printf arg. 2005-08-19 04:15:02 +00:00
christos 758a209d23 64 bit inode changes. 2005-08-19 02:03:49 +00:00
jmmv db4c002235 Fix comment regarding sbp->f_favail (which was a duplicate due to a pasto). 2005-08-05 13:24:18 +00:00
jmmv e062fbf94f Let this build when MSDOSFS_DEBUG is defined (v_id disappeared a long time
ago but it was still used here).
2005-08-05 11:00:31 +00:00
christos aa112c89a9 PR/30823: Dave Huang: Panic reading files larger than 4GB on NTFS 2005-07-25 00:48:22 +00:00
yamt b7bfe82866 update file timestamps for nfsd loaned-read and mmap.
PR/25279.  discussed on tech-kern@.
2005-07-23 12:18:41 +00:00
yamt 44d128fa8e - constify genfs_ops.
- use member designators.
2005-06-28 09:30:37 +00:00
thorpej e871a0392f Remove the last references to M_NAMEI; everything should be using PNBUF_*()
now (for a long time now).  Remove M_NAMEI, and bump the kernel version to
3.99.7 to reflect its removal.
2005-06-23 17:00:30 +00:00
junyoung 6a5baa993c ANSIfy and de-__P. 2005-06-22 17:34:30 +00:00
atatat df13e3579e Change the rest of the sysctl subsystem to use const consistently.
The __UNCONST macro is now used only where necessary and the RW macros
are gone.  Most of the changes here are consumers of the
sysctl_createv(9) interface that now takes a pair of const pointers
which used not to be.
2005-06-20 02:49:18 +00:00
christos a29d4b2515 - rename variables to avoid shadowing.
- add a few const.
2005-05-29 21:00:29 +00:00
christos 44e14add76 Don't print 0x in front of %p. From FreeBSD/OpenBSD 2005-05-22 15:29:33 +00:00
christos 362a4a0bd5 Yes, it was a cool trick >20 years ago to use "0123456789abcdef"[a] to
implement, xtoa(), but I think defining the samestring 50 times is a bit
too much. Defined HEXDIGITS and hexdigits in subr_prf.c and use it...
2005-05-17 04:14:57 +00:00
christos cd80d2a69d Remove compat code that hard-codes default group and mode for pty creation.
Hi Matt!
2005-05-11 17:38:54 +00:00
thorpej e633e8b61b - Define a VFS_ATTACH() macro that places a reference to a vfsops structure
into the "vfsops" link set.
- Use VFS_ATTACH() where vfsops are declared for individual file systems.
- In vfsinit(), traverse the "vfsops" link set, rather than vfs_list_initial[].
2005-03-29 02:41:05 +00:00
perry 477853c351 nuke trailing whitespace 2005-02-26 22:58:54 +00:00
jdolecek 28302c221e use MIN()/MAX() rather than min()/max(), to avoid possible truncation
of 64bit values to 'int'
2005-02-13 11:57:47 +00:00
jdolecek 877dee10ba read always single cluster of data, to avoid confusing the buffer
cache; this appears to fix the random file content corruption which
happens when more than one cluster is read at the same time, i.e. for
files > 3*cluster_size

Fixes PR kern/23835

change obtained from FreeBSD ntfs_subr.c rev. 1.31
2005-02-13 11:55:40 +00:00
chs 8975a0856f adjust the UBC mapping code to support non-vnode uvm_objects.
this means we can no longer look at the vnode size to determine how many
pages to request in a fault, which is good since for NFS the size can change
out from under us on the server anyway.  there's also a new flag UBC_UNMAP
for ubc_release(), so that the file system code can make the decision about
whether to cache mappings for files being used as executables.
2005-01-09 16:42:43 +00:00
mycroft e72fc6717e Whoops -- move the location of the VOP_OPEN()/VOP_CLOSE(), et al, from
foo_mountfs() to foo_mount(), to match the new mountroot API.
Also, for ext2fs and lfs, copy some restructuring from ffs to allow changing
file system parameters without specifying the device name.
(ntfs could use some more work.)
2005-01-09 09:27:17 +00:00
mycroft 0461b30ac3 Rework the mountroot interface so that vfs_mountroot() opens the root device
and just passes it on to the file system functions.  This avoids opening and
closing the device several times.

Mentioned on tech-kern some time ago, IIRC.  I've been running this for a
long time.
2005-01-09 03:11:48 +00:00
christos 603eb38ad9 make this compile again; hi potr 2005-01-02 21:15:48 +00:00
thorpej 1c95472d01 Add the system call and VFS infrastructure for file system extended
attributes.

From FreeBSD.
2005-01-02 16:08:28 +00:00
jdolecek 477f876cd6 size_t police
pointed out by Jesse Off on source-changes@
2004-12-28 01:12:26 +00:00
jdolecek 52c7db3883 change wget_utf8() to not require NUL-terminated string as input,
and adjust callers appropriately. cn_nameptr isn't NUL-terminated
for non-leaf components, so it's incorrect to assume it is always
NUL-terminated.

This fixes previous utf8-ization changes to not panic for cases
like 'echo */*/*.ps' in case the intermediate path components
are not in cache (yet).
2004-12-27 18:47:16 +00:00
jdolecek 2ce9f4516f change wget_utf8() to not require NUL-terminated string as input (added
'size' parameter), and adjust callers appropriately
2004-12-27 18:14:36 +00:00
christos 7c9f4b5736 I don't think that the vgone() in vop_inactive is needed; in fact it might
be the source of my deadlocks.
2004-12-18 05:26:41 +00:00
atatat c64e485f42 Reorder ptyfs pseudo inode numbers so that 0 and 1 are unused, 2 is
the root of the file system, and slaves and masters alternate starting
at 3.  This means the inode numbers won't be really large until you
really allocate a really lot of ptys.
2004-12-16 05:30:18 +00:00
martin 5b98d0afc6 Declare functions with the proper type they return. While there, replace
some strange type names with their C99 equivalent.
This avoids sign extension of 32bit fields (like the file size) on 64bit
archs.
Based on a patch supplied by Olaf 'Rhialto' Seibert in PR kern/28471;
should fix that PR.
2004-11-30 21:36:28 +00:00
atatat f9bdf3cd08 Remove the digits() function and simply set va_bytes and va_size to
zero in ptyfs_getattr().  There's no reason to make them something
else and no other devices (except for disk devices) report anything
other than zero here, so why should we be different?
2004-11-29 13:55:59 +00:00
christos 051b79b0c3 Add pty group and mode settings. 2004-11-25 05:15:10 +00:00
atatat e7eaf9a12d Properly set va_fsid so that st_dev ends up correct. 2004-11-25 03:46:50 +00:00
jdolecek 3b4a395d32 when Joliet extension is in use, encode the Joliet Unicode file names
into UTF-8, rather than filtering them to ISO-8859-1 subset

provide vfs.cd9660.utf8_joliet sysctl to switch to the former
iso-8859-1-only handling, default is to UTF-8 encode
2004-11-21 21:49:08 +00:00
jdolecek a38a5c8c2b switch to use new utf8 routines in <fs/unicode.h> 2004-11-21 16:29:57 +00:00
jdolecek 5467830039 routines to encode/decode Unicode in UTF-8; based on ntfs/ntfs_conv.c,
but modified to be slightly more forgiving for invalid sequencies, and
to gracefully handle end of string in middle of decoded sequence
2004-11-21 16:28:40 +00:00
jdolecek b267d4ace5 whitespace cleanup 2004-11-20 19:56:44 +00:00
atatat 6c33fa80f0 Don't call ptyfs_time() with stack garbage. It makes the times look
funny.  I was getting stuff somewhere around 1939, but that's where my
kernel is.
2004-11-19 04:42:45 +00:00
jdolecek b1dec5cb21 fix comment (s,basesrc,src,) 2004-11-15 17:18:12 +00:00
jdolecek 9d12d591c6 update #include path to fs/ptyfs/ 2004-11-11 19:19:59 +00:00
jdolecek 156a03ce12 move ptyfs off sys/miscfs/ptyfs/ to sys/fs/ptyfs/ 2004-11-11 18:56:25 +00:00
peter 76767beb4a Use DENYNONE to give unixy semantics of permitting everything not forbidden
by permissions.  Ie denial is up to server with clients/openers needing to use
advisory locks for further control.  From FreeBSD.

Fixes file access problem when the file is already open on the server.
Problem reported by George Abdelmalik <gabdelmalik at avdat dot com dot au>

Reviewed by jdolecek.
2004-10-27 19:17:13 +00:00
skrll f7155e40f6 There's no need to pass a proc value when using UIO_SYSSPACE with
vn_rdwr(9) and uiomove(9).

OK'd by Jason Thorpe
2004-09-17 14:11:20 +00:00
jdolecek 80a2cb5245 rename 'sp' variable to 'ap' in adosfs_pathconf(), so that it matches other
filesystems and avoid silly pastos
2004-09-14 16:59:40 +00:00
skrll d8390279f9 Fix typos/pastos. 2004-09-14 10:58:45 +00:00
jdolecek caffd8ef28 set mp->mnt_stat.f_namemax on filesystem mount for use by statvfs, and use
the value for also pathconf(_PC_NAME_MAX) to keep the two in sync
2004-09-13 19:25:48 +00:00
mycroft 45a21b76f0 Fixing age old cruft:
* Rather than using mnt_maxsymlinklen to indicate that a file systems returns
  d_type fields(!), add a new internal flag, IMNT_DTYPE.

Add 3 new elements to ufsmount:
* um_maxsymlinklen, replaces mnt_maxsymlinklen (which never should have existed
  in the first place).
* um_dirblksiz, which tracks the current directory block size, eliminating the
  FS-specific checks littered throughout the code.  This may be used later to
  make the block size variable.
* um_maxfilesize, which is the maximum file size, possibly adjusted lower due
  to implementation issues.

Sync some bug fixes from FFS into ext2fs, particularly:
* ffs_lookup.c 1.21, 1.28, 1.33, 1.48
* ffs_inode.c 1.43, 1.44, 1.45, 1.66, 1.67
* ffs_vnops.c 1.84, 1.85, 1.86

Clean up some crappy pointer frobnication.
2004-08-15 07:19:54 +00:00
pk a7c40722d8 Call inittodr() from main(). Let file system code set the recorded `last
update' time (if any) through the new function setrootfstime().
2004-07-05 07:28:45 +00:00
hannken f59f039ea5 Keep a pointer to the leaf mount. Needed for write gating where a
file system gets suspended and has layered mounts above it.

Welcome to 2.0G

Reviewed by: Bill Studenmund <wrstuden@netbsd.org>
2004-07-01 10:03:29 +00:00
christos aa30b4a3db cleanup casts in get/set u short/long so that we don't have const castaways. 2004-06-30 03:43:14 +00:00
jdolecek 2c83b7a91b set gmtoff in the structure returned by MNT_GETARGS call 2004-06-27 06:55:12 +00:00
drochner aeb9634dc0 fix some questionable pointer arithmetics; gcc-3.4.x
didn't like it
2004-06-24 16:52:03 +00:00
dillo 730a37a686 Use unsigned long for file size and location; avoids sign extension
for files >2GB.  Okayed by Martin Husemann.
2004-06-20 20:44:06 +00:00
jdolecek aaba5c2cd4 unify the statvfs-reporting related code to single smbfs_smb_statvfs routine
for easier maintenance; the decision to use either
SMB_TRANS2_QUERY_FS_INFORMATION or SMB_COM_QUERY_INFORMATION_DISK
is done inside it, the code for populating struct statvfs with values
is shared
2004-06-05 07:36:25 +00:00
jdolecek 88edd838ec set 'frag' size to the same value as the file system block size, so
that userland would pick up correct size of unit (it uses lower of
these values as the size of one 'block' for f_blocks et.al.)
fixes PR bin/25319 by Juan RP
2004-06-05 06:28:11 +00:00
wrstuden a39afd9fea Revert last two changes. Since union vnode private data do not follow
layerfs guidelines, whenever layerfs_snapshot() does something, it
won't be correct for unionfs.
2004-05-31 02:04:35 +00:00
yamt 305b098f04 use vn_lock instead of raw VOP_LOCK. 2004-05-30 20:46:25 +00:00
tron 2295bcf960 Include "miscfs/genfs/layer_extern.h" to get prototype for
layerfs_snapshot().
2004-05-30 09:48:37 +00:00
wrstuden fc8849c40a unionfs can use layerfs_snapshot() too. 2004-05-29 23:49:31 +00:00
hannken 8c21bc6224 Add ffs internal snapshots. Written by Marshall Kirk McKusick for FreeBSD.
- Not enabled by default. Needs kernel option FFS_SNAPSHOT.
- Change parameters of ffs_blkfree.
- Let the copy-on-write functions return an error so spec_strategy
    may fail if the copy-on-write fails.
- Change genfs_*lock*() to use vp->v_vnlock instead of &vp->v_lock.
- Add flag B_METAONLY to VOP_BALLOC to return indirect block buffer.
- Add a function ffs_checkfreefile needed for snapshot creation.
- Add special handling of snapshot files:
    Snapshots may not be opened for writing and the attributes are read-only.
    Use the mtime as the time this snapshot was taken.
    Deny mtime updates for snapshot files.
- Add function transferlockers to transfer any waiting processes from
  one lock to another.
- Add vfsop VFS_SNAPSHOT to take a snapshot and make it accessible through
  a vnode.
- Add snapshot support to ls, fsck_ffs and dump.

Welcome to 2.0F.

Approved by: Jason R. Thorpe <thorpej@netbsd.org>
2004-05-25 14:54:55 +00:00
atatat 53c625655c Sysctl descriptions under vfs subtree 2004-05-25 04:44:43 +00:00
christos e944b1cdd8 Can't do the trick with using sbp as temporary storage; allocate memory
instead.
2004-05-24 03:09:48 +00:00
jdolecek 58218d4f0f add comments for values returned from the SMB request info used for statvfs 2004-05-23 11:18:28 +00:00
christos 223d219efc declare the correct variable; thanks Juan RP. 2004-05-22 22:13:50 +00:00
christos 880fcd4a6e simplify stats taking and avoid the extra copy on the stack. 2004-05-22 20:42:08 +00:00
atatat 10a7ba9ef6 Tweak sysctl setup functions (the macros, actually) for use in lkms,
and tweak lkminit_*.c (where applicable) to call them, and to call
sysctl_teardown() when being unloaded.

This consists of (1) making setup functions not be static when being
compiled as lkms (change to sys/sysctl.h), (2) making prototypes
visible for the various setup functions in header files (changes to
various header files), and (3) making simple "load" and "unload"
functions in the actual lkminit stuff.

linux_sysctl.c also needs its root exposed (ie, made not static) for
this (when built as an lkm).
2004-05-20 06:34:24 +00:00
atatat 1d3a6a329e Explicitly call pool_init() (and pool_destroy()) when being built as
an _LKM.

This adds pools to the list of things that lkms must do manually
because they're set up with link sets.  Not that there's anything
wrong with link sets, but that we need to try harder to remember that
lkms are second class citizens.  Of a sort.
2004-05-20 05:39:34 +00:00
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
itojun ce112dfc4f add -t option for gmt time offset (normally MS-DOS filesystem has timestamp
in localtime, not GMT).  PR kern/22717
2003-09-07 22:09:11 +00:00
jdolecek 4b005d1443 sprinkle __attribute__((__packed__)) to structures representing on-disk data
this hopefully fixes problem with reading filecore FS under i386, reported
on current-users@ (thread 'acorn32 disk on i386')
2003-09-06 13:56:42 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
jdolecek 28d75bbaf3 remove all traces of non-working quota support
add quota support to TODO - makes sense only once writing support
would be implemented, and only once NTFS would support notion of file 'owner'

adresses kern/21967 by Martin Husemann
2003-08-02 12:11:56 +00:00
jdolecek 62e0ed44c8 Allow separate masks for files and directories. Useful e.g. to turn
the execute bit off for files, but keep search permission for directories.
Change contributed in PR kern/21538 by Pavel Arnost, based on some FreeBSD
patches.
Further manpage changes, and backward-compatibility adjustments done by me.

Also fixes PR kern/16778 by Johan Danielsson, and PR kern/3400 by Rick Byers
2003-08-02 11:41:19 +00:00