Commit Graph

258 Commits

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