maya
be48413a3c
Be explicit about how we're placing part of the on-disk name into
...
the extension, so it doesn't appear like we are overrunning an array.
Appeases coverity, NFC.
ok riastradh
2017-01-14 17:17:53 +00:00
hannken
70ec436e39
Move vnode members "v_freelisthd" and "v_freelist" from "struct vnode"
...
to "struct vnode_impl" and rename to "vi_lrulisthd" and "vi_lrulist".
No functional change intended.
Welcome to 7.99.48
2016-12-14 15:48:54 +00:00
hannken
7139aab724
Remove now obsolete operation vcache_remove().
...
Welcome to 7.99.36
2016-08-20 12:37:06 +00:00
nonaka
eafa673da3
Fix false positives when comparing long file names that have the
...
same first 13 (or some multiple thereof) characters.
2016-06-30 09:34:01 +00:00
mlelstv
09123a68b9
fix DEBUG build
2016-05-07 16:43:02 +00:00
mlelstv
e01ac00248
Validate FAT entries to avoid some panics caused by a corrupted FAT.
...
Also print FAT write errors when mount is synchronous (-o sync). This
reveals problems caused by a write protected disklabel on sector 1.
2016-05-03 18:17:28 +00:00
mlelstv
200cdc61ea
Use KASSERT for conditions that cannot be met with current parameters.
2016-03-06 07:33:25 +00:00
joerg
9cb0d31c43
Toolify.
2016-02-06 14:11:58 +00:00
mlelstv
bbd8666d0f
Split case folding table into separate source file and add full
...
copyright and permission notice from http://www.unicode.org/copyright.html
2016-02-06 10:40:58 +00:00
christos
ae157f388e
- split a long line.
...
- remove extra test.
- move d_namlen setting to msdosfs_vnops.c to avoid the ifdef.
2016-02-01 16:53:23 +00:00
martin
456f8519f7
Avoid unsigned/signed comparision warning to fix the build.
2016-02-01 10:37:57 +00:00
christos
76530fdb8e
We can't depend on dp->d_namlen existing for the parts that are used in
...
makefs(8).
2016-02-01 02:59:33 +00:00
mlelstv
223c7df5b3
Add support to msdosfs and makefs to generate correct Unicode (UCS-2) directory
...
entries from UTF8 encoded file names.
2016-01-30 09:59:27 +00:00
dholland
398f572480
Apparently a recent round of vandalism by the C++ standards committee
...
includes disallowing the standard and historic type name "unsigned". Add
a gratuitous "int" to recent changes.
C++ is really a blight on the world.
2016-01-23 01:26:14 +00:00
dholland
25ebd28338
u_int{8,16,32}_t -> uint{8,16,32}_t, also u_int -> unsigned and
...
u_char -> unsigned char.
2016-01-22 22:53:36 +00:00
dholland
cbeb02479d
u_int8_t -> uint8_t
2016-01-22 22:48:18 +00:00
riastradh
a26f29c67f
Fix remaining read(fd, NULL, 1) cases.
2015-04-04 12:34:44 +00:00
maxv
6e39240181
Remove the 'cred' argument from bread(). Remove a now unused var in
...
ffs_snapshot.c. Update the man page accordingly.
ok hannken@
2015-03-28 19:24:04 +00:00
christos
135c211dee
catch up with DPRINTF change
2015-01-23 03:33:58 +00:00
christos
2d35608046
add some more paranoid checks about secsize and struct use.
2015-01-23 02:39:48 +00:00
snj
f0a7346d21
src is too big these days to tolerate superfluous apostrophes. It's
...
"its", people!
2014-10-18 08:33:23 +00:00
uebayasi
fe9a32c84e
Define filesystem attributes with vfs dependency.
2014-10-11 06:42:18 +00:00
martin
3c93e210ff
Make msdosfs time conversion use the y/m/d/h/m/s conversion functions
...
from clock_subr.c and compile that into the userland (and tools)
makefs as well.
2014-09-01 09:09:47 +00:00
dholland
05d075b3ae
Add VOP_FALLOCATE and VOP_FDISCARD to every vnode ops table I can
...
find.
The filesystem ones all call genfs_eopnotsupp - right now I am only
implementing the plumbing and we can implement fallocate and/or
fdiscard for files later.
The device ones call spec_fallocate (which is also genfs_eopnotsupp)
and spec_fdiscard, which dispatches to the device-level op.
The fifo ones all call vn_fifo_bypass, which also ends up being
EOPNOTSUPP.
2014-07-25 08:20:51 +00:00
maxv
549e231932
Make DPRINTF more understandable, and replace my previous #ifdef DIAGNOSTIC...
2014-07-18 17:24:34 +00:00
maxv
8ee3c88d2b
Limit the minimum size of a disk sector to 512 bytes, to prevent memory
...
overflow on extremely low secsize. This normally conforms to the old standard
(for which there doesn't seem to be a clear spec). Since 2011, IDEMA's Advanced
Format standardizes it to 4k, so this change won't cause any trouble on
new devices.
Put the printf under DIAGNOSTIC temporarily to see if someone complains.
after a quick discussion on tech-kern
2014-07-16 20:09:00 +00:00
christos
c0371c86f3
Correct the bread size of struct fsinfo from Gerald Lee at DELL dot com
2014-07-15 11:43:54 +00:00
maxv
56ce0b03bc
Minor changes:
...
- malloc()+memset() -> malloc(|M_ZERO)
- rename 'vers' to 'FSVers'
- declare 'ExtFlags' instead of calling getushort() two times
2014-07-09 09:00:18 +00:00
maxv
8fce630b04
Remove ROOTNAME (unused).
2014-07-09 08:43:54 +00:00
maxv
1273c3cb8c
- Perform sanity checks not just for GEMDOSFS, but for all FAT devices. This
...
also fixes a division-by-zero bug that could crash the system.
- Define GEMDOSFS_BSIZE instead of a hard-coded 512 value, and remove 'bsize'.
- Rename 'tmp' to 'BlkPerSec'.
From me, FreeBSD, OpenBSD and the FAT specification.
ok christos@
2014-07-08 19:34:47 +00:00
hannken
798256c9ef
Change msdosfs from hashlist to vcache:
...
- Use (dir_cluster, dir_offset, dir_generation) as key, where
dir_generation is non-zero and unique for unlinked but open nodes.
- Change deget() to return a vnode as it is unsafe to return a
referenced but unlocked denode.
2014-07-08 09:21:52 +00:00
hannken
de57916f59
msdosfs_reclaim(): add missing fstrans and protect change
...
of v_data with v_interlock as msdosfs_sync() now needs it.
2014-05-30 08:42:35 +00:00
christos
02cb0c6eaf
Introduce a selector function to the vfs vnode iterator so that we don't
...
need to vget() vnodes that we are not interested at, and optimize locking
a bit. Iterator changes reviewed by Hannken (thanks), the rest of the bugs
are mine.
2014-05-24 16:34:03 +00:00
maxv
23f76b6d00
An (un)privileged user can easily make the kernel dereference a NULL
...
pointer.
The kernel allows 'data' to be NULL; it's the fs's responsibility to
ensure that it isn't NULL (if the fs actually needs data).
ok christos@
2014-04-16 18:55:17 +00:00
hannken
6d285189fb
Change all vfsops to use C99 designated initializers.
...
No functional changes intended.
2014-03-23 15:21:15 +00:00
hannken
b1e067f299
Change msdosfs_sync() to use vfs_vnode_iterator.
2014-03-17 09:35:59 +00:00
pooka
4f6fb3bf35
Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
...
the sysctl link sets are processed, and remove redundancy.
Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.
2014-02-25 18:30:08 +00:00
hannken
97834f7ba0
Change vnode operation lookup to return the resulting vnode *vpp unlocked.
...
Change cache_lookup() to return an unlocked vnode.
Discussed on tech-kern@
Welcome to 6.99.31
2014-02-07 15:29:20 +00:00
hannken
04c776e5c8
Change vnode operations create, mknod, mkdir and symlink to return
...
the resulting vnode *vpp unlocked.
Discussed on tech-kern@
Welcome to 6.99.30
2014-01-23 10:13:55 +00:00
hannken
1139274440
Change vnode operations create, mknod, mkdir and symlink to keep the
...
directory node dvp locked on return.
Discussed on tech-kern@
Welcome to 6.99.29
2014-01-17 10:55:01 +00:00
mlelstv
266e035aaa
don't treat adjacent members as a larger array
...
Coverity CID 977367
2013-12-24 16:51:24 +00:00
christos
0b725b63c7
change the mountlist CIRCLEQ into a TAILQ
2013-11-23 13:35:36 +00:00
hannken
690094cb2d
Stop using v_mount of an unreferenced vnode -- save the mount while
...
the vnode has a reference.
2013-11-02 10:30:18 +00:00
christos
de0d394bfe
provide a function to access the name and extension as a single array as
...
opposed depend on array index overflow.
2013-10-20 00:01:55 +00:00
hannken
3881f4f3f9
Replace macro v_specmountpoint with two functions spec_node_getmountedfs()
...
and spec_node_setmountedfs() to manage the file system mounted on a device.
Assert the device is a block device.
Welcome to 6.99.24
Discussed on tech-kern@ some time ago.
Reviewed by: David Holland <dholland@netbsd.org>
2013-09-30 18:57:59 +00:00
jakllsch
e7f2d5bd6f
Don't attempt to mount file system with clusters larger than MAXBSIZE.
2013-04-15 14:10:59 +00:00
plunky
5ec364d4d9
C99 section 6.7.2.3 (Tags) Note 3 states that:
...
A type specifier of the form
enum identifier
without an enumerator list shall only appear after the type it
specifies is complete.
which means that we cannot pass an "enum vtype" argument to
kauth_access_action() without fully specifying the type first.
Unfortunately there is a complicated include file loop which
makes that difficult, so convert this minimal function into a
macro (and capitalize it).
(ok elad@)
2013-03-18 19:35:35 +00:00
christos
db2e654869
A little more debugging.
2013-01-28 00:17:18 +00:00
christos
50df1c7d20
don't need sys/mount.h in userland.
2013-01-27 22:04:19 +00:00
christos
3c0f9bd4e8
tidy up debugging printfs; no functional change.
2013-01-27 20:15:58 +00:00