Commit Graph

406 Commits

Author SHA1 Message Date
reinoud b660056cbc Replace the variable field data[0] to data[1] to avoid undefined behaviour. 2022-03-18 16:06:18 +00:00
reinoud 66e688eb66 For bug-compatibility with Windows, the last VAT sector must be a multiple of
16/32 from the start of the track.  To allow for scratches, write out at least
a 32 pieces.
2022-03-08 18:30:43 +00:00
reinoud 5ba19a4f03 On switching from writing to reading explicitly synchronize the caches. It
isn't strictly needed but some devices in the wild will otherwise bluntly
ignore all reading commands resulting in a kernel and device lockup.
2022-03-08 10:52:43 +00:00
andvar 7f4592413f fix various typos, mainly in comments. 2022-02-16 22:00:55 +00:00
reinoud d61d01e58f Translate 254/255 compID values used for deleted entries as per UDF spec. This
allows the printing of the names of deleted file entries.
2022-02-11 16:33:18 +00:00
andvar 183889cba7 fix various typos in comments, log messages and documentation.
mainly s/aparently/apparently/ and s/implmented/implemented/.
2022-02-06 20:20:18 +00:00
reinoud 3eb3a2d0ad Revere modification of initializer; it can lead to race conditions where two
allocation would pick the `empty' space causing a panic later on.
2022-02-03 09:46:26 +00:00
reinoud a23f7dc35e On freeing a virtual address in the VAT, use the correct value; this might
confuse other implementations who can reject the VAT on this.
2022-01-28 20:00:52 +00:00
andvar ee56ea231b fix various typos in comments. 2022-01-25 22:01:34 +00:00
andvar 34df0b3791 remove double "with" in comments and usage text. Also fix one typo. 2022-01-24 09:42:13 +00:00
msaitoh 331d881b7c s/adressing/addressing/ 2022-01-15 10:55:06 +00:00
msaitoh 777518dc50 s/implemenation/implementation/ in comment. 2022-01-01 08:34:34 +00:00
reinoud 4edad2cfab Fix typo: reader -> header 2021-12-16 22:24:10 +00:00
reinoud 333f39646c Fix serious issue with recordable media formatted with Win10. When closing it
after modification the VAT was written out corrupted making the disc
unreadable anymore on remount. Thanks for ig@ for spotting it in the wild!
2021-12-16 22:19:08 +00:00
reinoud 29d402ae1b Make sysctl udf.verbose dependent on UDF_DEBUG instead of DEBUG 2021-12-16 21:39:53 +00:00
reinoud e1403a7c21 While searching the VAT on recordable media, search the last sector too!
This fixes Win10 formatted discs from being mounted incorrectly.
2021-12-15 22:02:30 +00:00
msaitoh b707f36088 s/checkum/checksum/ in comment. 2021-12-05 04:32:36 +00:00
msaitoh ac1d1cd9ed s/alloction/allocation/ 2021-12-05 04:21:31 +00:00
thorpej 982ae832c3 Overhaul of the EVFILT_VNODE kevent(2) filter:
- Centralize vnode kevent handling in the VOP_*() wrappers, rather than
  forcing each individual file system to deal with it (except VOP_RENAME(),
  because VOP_RENAME() is a mess and we currently have 2 different ways
  of handling it; at least it's reasonably well-centralized in the "new"
  way).
- Add support for NOTE_OPEN, NOTE_CLOSE, NOTE_CLOSE_WRITE, and NOTE_READ,
  compatible with the same events in FreeBSD.
- Track which kevent notifications clients are interested in receiving
  to avoid doing work for events no one cares about (avoiding, e.g.
  taking locks and traversing the klist to send a NOTE_WRITE when
  someone is merely watching for a file to be deleted, for example).

In support of the above:

- Add support in vnode_if.sh for specifying PRE- and POST-op handlers,
  to be invoked before and after vop_pre() and vop_post(), respectively.
  Basic idea from FreeBSD, but implemented differently.
- Add support in vnode_if.sh for specifying CONTEXT fields in the
  vop_*_args structures.  These context fields are used to convey information
  between the file system VOP function and the VOP wrapper, but do not
  occupy an argument slot in the VOP_*() call itself.  These context fields
  are initialized and subsequently interpreted by PRE- and POST-op handlers.
- Version VOP_REMOVE(), uses the a context field for the file system to report
  back the resulting link count of the target vnode.  Return this in tmpfs,
  udf, nfs, chfs, ext2fs, lfs, and ufs.

NetBSD 9.99.92.
2021-10-20 03:08:16 +00:00
andvar b58602814f fix typos in word "successful". 2021-09-16 22:19:10 +00:00
andvar f9faf20aef fix typos in comments, mainly s/extention/extension/ and s/sufficent/sufficient/ 2021-09-03 21:54:58 +00:00
andvar 16e91b5f21 s/helt/held+s/eroneously/erroneously/+s/splitted/split/+s/recommented/recommended/ 2021-08-21 09:59:45 +00:00
andvar ca7653601e fix various typos in comments and log messages. 2021-08-20 20:25:26 +00:00
andvar 7991f5a7b8 Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.
2021-07-24 21:31:31 +00:00
dholland c6c16cd073 - Add a new vnode op: VOP_PARSEPATH.
- Move namei_getcomponent to genfs_vnops.c and call it genfs_parsepath.
 - Add a parsepath entry to every vnode ops table.

VOP_PARSEPATH takes a directory vnode to be searched and a complete
following path and chooses how much of that path to consume. To begin
with, all parsepath calls are genfs_parsepath, which locates the first
'/' as always.

Note that the call doesn't take the whole struct componentname, only
the string. The other bits of struct componentname should not be
needed and there's no reason to cause potential complications by
exposing them.
2021-06-29 22:34:05 +00:00
mrg 97b36aa771 more GCC 10 fixes.
mDNSResponder: another wrong return local address

dhcp: ignore a seemingly impossible stringop overflow

hpacel: avoid maybe uninitialised error that is wrong.

rsh: avoid impossible malloc(0)

udf: cast pointers through (uintptr_t) to fool invalid boundary checks
2021-04-13 06:25:48 +00:00
skrll 49de5dda47 Trailing whitespace 2021-01-11 22:02:28 +00:00
skrll 89d6c918de Fix spelling of preferred in comments. While here improve grammar in
one of the comments.
2021-01-11 22:01:14 +00:00
christos 79e3c74f8e Introduce genfs_pathconf() and use it for the default case in all filesystems. 2020-06-27 17:29:17 +00:00
christos 9aa2a9c323 Add ACL support for FFS. From FreeBSD. 2020-05-16 18:31:45 +00:00
ad f5ad84fdb3 PR kern/54759 (vm.ubc_direct deadlock when read()/write() into mapping of itself)
- Add new flag UBC_ISMAPPED which tells ubc_uiomove() the object is mmap()ed
  somewhere.  Use it to decide whether to do direct-mapped copy, rather than
  poking around directly in the vnode in ubc_uiomove(), which is ugly and
  doesn't work for tmpfs.  It would be nicer to contain all this in UVM but
  the filesystem provides the needed locking here (VV_MAPPED) and to
  reinvent that would suck more.

- Rename UBC_UNMAP_FLAG() to UBC_VNODE_FLAGS().  Pass in UBC_ISMAPPED where
  appropriate.
2020-04-23 21:47:07 +00:00
reinoud 0376c5faf1 Move comment related to the sysctl_createv() in SYSCTL_SETUP() from the old
place to the new place too.
2020-04-14 12:47:44 +00:00
reinoud b3745214b9 fix debug print flag 2020-04-14 11:45:42 +00:00
ad 23bf88000c Replace most uses of vp->v_usecount with a call to vrefcnt(vp), a function
that hides the details and does atomic_load_relaxed().  Signature matches
FreeBSD.
2020-04-13 19:23:17 +00:00
hannken aa1a83f41d udf_get_node(): fix typo and honor "lktype" argument. 2020-04-06 14:31:06 +00:00
pgoyette 9120d4511b Use the module subsystem's ability to process SYSCTL_SETUP() entries to
automate installation of sysctl nodes.

Note that there are still a number of device and pseudo-device modules
that create entries tied to individual device units, rather than to the
module itself.  These are not changed.
2020-03-16 21:20:09 +00:00
ad bf79731039 Tighten up the locking around vp->v_iflag a little more after the recent
split of vmobjlock & v_interlock.
2020-02-27 22:12:53 +00:00
ad d2a0ebb67a UVM locking changes, proposed on tech-kern:
- Change the lock on uvm_object, vm_amap and vm_anon to be a RW lock.
- Break v_interlock and vmobjlock apart.  v_interlock remains a mutex.
- Do partial PV list locking in the x86 pmap.  Others to follow later.
2020-02-23 15:46:38 +00:00
ad c2e9cb9413 VFS_VGET(), VFS_ROOT(), VFS_FHTOVP(): give them a "int lktype" argument, to
allow us to get shared locks (or no lock) on the returned vnode.  Matches
FreeBSD.
2020-01-17 20:08:06 +00:00
msaitoh a0403cde04 s/transfered/transferred/ 2019-12-27 09:41:48 +00:00
maya cede1cc99c Switch files copyright Reinoud Zandijk from BSD 4 clause to BSD 2 clause.
OK'd by reinoud in email (from 4 Feb 2019).
2019-10-16 21:52:22 +00:00
christos 0da0aa0234 Add newly created vnodes to the namei cache. The rest of the filesystems
already did that (or they don't support writing). Discussed in tech-kern.
2019-09-18 17:59:14 +00:00
msaitoh 9ba4df1502 Fix typo in comment (s/seperate/separate/). 2019-06-03 06:04:20 +00:00
hannken b689ec0f78 Add "void *extra" argument to vcache_new() so a file system may
pass more information about the file to create.

Welcome to 8.99.30
2019-01-01 10:06:54 +00:00
jdolecek bcc384fdef remove M_CANFAIL flag for malloc(9) - it was completely ignored, so had
actually no effect
2018-10-14 17:37:40 +00:00
reinoud 58853ff72b Fix length calculation 2018-08-09 20:30:26 +00:00
reinoud e44c6c6eea Sync with UDFclient 2018-08-09 13:49:30 +00:00
kamil 982dbcfaff Avoid undefined behavior in ecma167-udf.h
Define the UDF_EXT_* symbols as unsigned values.
This prevents undefined behavior of altering the signedness bit in a part
of them. Swap the remaining symbols to unsigned values to keep the
consistency.

Required by GCC when building with Undefined Behavior Sanitizer.
2018-07-25 19:56:56 +00:00
reinoud 5ed53e53ea Enhance logical volume integrity descriptor handling and provide
bug-compatibility for Linux mkudffs 1.3 images.
2018-07-25 11:09:22 +00:00
maya a50c06709e Remove duplicate ; 2018-06-06 01:49:07 +00:00