Commit Graph

237 Commits

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