Commit Graph

1052 Commits

Author SHA1 Message Date
reinoud b33f7bb0ef Retire IN_CALLBACK_ULK flagging since its not used anymore and the old
assertions on it would trigger without cause.
2009-05-20 15:30:26 +00:00
reinoud 2d212d801f Descriptor version is 16 bit and not 8 so use udf_rw16() to access them.
UniqueID was written in the logical volume integrity without byteswapping for
bigendian machines.
2009-05-20 13:25:50 +00:00
reinoud 2b1b74bba4 Account for the logical blocks recorded by the extent in the right endian! 2009-05-19 16:24:05 +00:00
reinoud e186770777 On creation of a new node, don't forget to set the length of the allocated
space in the right endian!
2009-05-19 16:06:56 +00:00
reinoud c3511553ae Forgot to use the udf_rw16() on the descriptor crc lengths of FID's!
Also fix a few dubiously formatted checks.
2009-05-19 15:08:42 +00:00
reinoud fbd470bae3 A descriptor's CRC lenth is 16 bit so use udf_rw16() on tag.desc_crc_len. 2009-05-19 15:07:20 +00:00
reinoud c469916e3d ANSI-fy. No idea why they weren't so in the first place. 2009-05-18 21:09:54 +00:00
reinoud 937ed04261 Fix *serious* bug in bswapping definitions for big endian machines. 2009-05-18 20:52:24 +00:00
reinoud 7b913c191b Make ecma167 header file compilable by pcc 2009-05-18 20:51:03 +00:00
pooka c94cfd7632 add some todo-items, based on a file which was lingering in my
local tree for apparently almost two years now
2009-05-18 15:47:28 +00:00
elad 863a01b5c1 Extract the open-coded authorization logic for chtimes() from various
file-systems and put it in a single function, genfs_can_chtimes().

This also makes UDF follow the same policy as all other file-systems.

Mailing list reference:

	http://mail-index.netbsd.org/tech-kern/2009/04/27/msg004951.html
2009-05-07 19:30:29 +00:00
elad 69db27dc69 Replace open-coded vaccess() in ntfs_access() with a call to vaccess().
Similarly to msdosfs, always add the exec bit to keep the current
behavior.

Mailing list reference:

    http://mail-index.netbsd.org/tech-kern/2009/04/21/msg004881.html
2009-04-29 22:33:33 +00:00
pooka 986e36ad6d replace outdated comment. no functional change 2009-04-29 11:01:50 +00:00
uch c519d37fde added error check. 2009-04-26 12:41:59 +00:00
elad f9642d24c5 Wrap some long lines in a comment, pointed out by ad@ - thanks!
While here, wrap two more long lines.
2009-04-25 21:26:20 +00:00
elad 54bf8cc67a Add genfs_can_mount() and use it to prevent some more code duplication of
the security checks when mounting a device (VOP_ACCESS() + kauth(9) call)).

Proposed with no objections on tech-kern@:

	http://mail-index.netbsd.org/tech-kern/2009/04/20/msg004859.html

The vnode is always expected to be locked, so no locking is done outside
the file-system code.
2009-04-25 18:53:44 +00:00
elad 9670d2e41d Add genfs_can_mount() and use it to prevent some more code duplication of
the security checks when mounting a device (VOP_ACCESS() + kauth(9) call)).

Proposed with no objections on tech-kern@:

	http://mail-index.netbsd.org/tech-kern/2009/04/20/msg004859.html

The vnode is always expected to be locked, so no locking is done outside
the file-system code.
2009-04-25 18:53:43 +00:00
elad f68b0219b0 Per discussion on tech-kern@:
- Replace use of label/goto with returns

  - Rename, change prototype of, and move functions from vfs_subr.c to
    genfs_vnops.c
2009-04-22 22:57:08 +00:00
reinoud 91d6e78060 Fix endian related bug when using discs with a meta-data partition on
big-endian machines.
2009-04-21 16:19:00 +00:00
elad b0745a039e Pass VREAD instead of FREAD to VOP_ACCESS().
Okay christos@.
2009-04-20 21:29:01 +00:00
elad 386808d4a0 Refactor some duplicated file-system code.
Proposed and received no objections on tech-kern@:

	http://mail-index.netbsd.org/tech-kern/2009/04/18/msg004843.html
2009-04-20 18:06:26 +00:00
tsutsui d779b85d3e Remove extra whitespace added by a stupid tool.
XXX: more in src/sys/arch
2009-04-18 14:58:02 +00:00
yamt c495a11d21 plug some pnbuf leaks. 2009-04-15 11:41:25 +00:00
markd 270aadb75a For chown make auth checks consistent with UFS. Fixes PR kern/40933. 2009-04-11 11:59:04 +00:00
perry e4c34b0c5f SAVENAME was not set for rename and delete as required
Patch from christos, fixes pr 41183
2009-04-11 00:21:57 +00:00
yamt 63d0089e0e - tmpfs_dir_lookup: simplify.
- add some assertions.
2009-04-10 03:40:05 +00:00
pooka 6d35065877 * create only one vnode per inode
* add locking
2009-04-09 09:56:30 +00:00
pooka 42ca2fba4f VOP_CLOSE in error branches 2009-04-09 07:55:55 +00:00
pooka f505490c8d Invariants should be tested for with KASSERT instead of semi-pretending
that them not holding is an acceptable error condition.
2009-04-05 15:10:41 +00:00
ad 4c75d20cd4 Turn up the volume on the warning message a bit and note that unionfs can
corrupt the underlying file system. This is an old problem but is now
much easier to trigger because VFS has gone fully multithreaded.
2009-04-04 10:32:49 +00:00
pooka bb78ae5d1b Fix yet another recent crashy bug in tmpfs rename: since the source
dirent is no longer cached in lookup and we do the lookup ourselves
in rename, we are most definitely not allowed to assert that it
matches the source vnode passed as an argument.  In case the source
node does not exist or has been replaced, punt with ENOENT.

Also, nuke some misleading prehistoric comments which haven't been
valid in over a year.

Fixes PR kern/41128 by Nicolas Joly
2009-04-03 14:47:40 +00:00
pooka 696e7eae87 fix botch in previous 2009-03-27 06:35:10 +00:00
pooka f75bcfdea3 pretend to do some sort of cleanup in error branches 2009-03-26 20:05:07 +00:00
reinoud b9f5db933c Fix possible overshoot when allocating from a space bitmap when ffs(3) returns
a too big offset for the bitmap.
2009-03-25 20:04:52 +00:00
haad 3914ae191c Destroy mutexes used to guard hash table during vfs_detach. Fixes LOCKDEBUG
panic when ptyfs module is unloaded.
2009-03-24 22:05:24 +00:00
christos 9114dc885f Fix old userland compat. 2009-03-21 01:11:53 +00:00
reinoud a3665ba58f Fix panic due to memory leak on symlink creation. A test copy with 3000+
symlinks could get the machine down.
2009-03-20 23:06:52 +00:00
pooka 5ac2257698 Release dvp in mknod error branch.
Nicolas Joly, PR kern/41006
2009-03-19 13:47:32 +00:00
cegger e2cb85904d bcopy -> memcpy 2009-03-18 17:06:41 +00:00
cegger c363a9cb62 bzero -> memset 2009-03-18 16:00:08 +00:00
cegger 35fb64746b bcmp -> memcmp 2009-03-18 15:14:29 +00:00
cegger df7f595ecd Ansify function definitions w/o arguments. Generated with sed. 2009-03-18 10:22:21 +00:00
cegger 164477c65a ansify function definitions 2009-03-15 22:16:09 +00:00
cegger b8817e4aed ansify function definitions 2009-03-15 17:14:40 +00:00
christos 3cb697e64a Add a chroot flag, so that ptyfs can be mounted in a chrooted environment.
XXX: This is a hack, in reality we should allow multiple ptyfs mounts.
2009-03-15 16:43:55 +00:00
dsl 82357f6d42 ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
2009-03-14 21:04:01 +00:00
dsl 454af1c0e8 Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
dsl 02cdf4d2c8 Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
2009-03-14 14:45:51 +00:00
yamt b9a7e1db53 udf_write_filebuf: remove an write-only variable 2009-02-22 15:26:51 +00:00
reinoud 193ccd2d90 Improve write throttling by doing it on page-size basis. The `standard'
solution would cut up files unnessisary during allocation. It also made
assumptions about ucb wich were propably right but still.
2009-02-11 13:08:08 +00:00