History log of /src/sys/ufs/lfs/ulfs_vnops.c |
Revision | | Date | Author | Comments |
1.56 |
| 27-Mar-2022 |
christos | add a kauth vnode check for creating links
|
1.55 |
| 20-Oct-2021 |
thorpej | 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.
|
1.54 |
| 05-Sep-2020 |
riastradh | Round of uvm.h cleanup.
The poorly named uvm.h is generally supposed to be for uvm-internal users only.
- Narrow it to files that actually need it -- mostly files that need to query whether curlwp is the pagedaemon, which should maybe be exposed by an external header.
- Use uvm_extern.h where feasible and uvm_*.h for things not exposed by it. We should split up uvm_extern.h but this will serve for now to reduce the uvm.h dependencies.
- Use uvm_stat.h and #ifdef UVMHIST uvm.h for files that use UVMHIST(ubchist), since ubchist is declared in uvm.h but the reference evaporates if UVMHIST is not defined, so we reduce header file dependencies.
- Make uvm_device.h and uvm_swap.h independently includable while here.
ok chs@
|
1.53 |
| 16-May-2020 |
christos | Add ACL support for FFS. From FreeBSD.
|
1.52 |
| 28-Oct-2017 |
pgoyette | Update the kernhist(9) kernel history code to address issues identified in PR kern/52639, as well as some general cleaning-up...
(As proposed on tech-kern@ with additional changes and enhancements.)
Details of changes:
* All history arguments are now stored as uintmax_t values[1], both in the kernel and in the structures used for exporting the history data to userland via sysctl(9). This avoids problems on some architectures where passing a 64-bit (or larger) value to printf(3) can cause it to process the value as multiple arguments. (This can be particularly problematic when printf()'s format string is not a literal, since in that case the compiler cannot know how large each argument should be.)
* Update the data structures used for exporting kernel history data to include a version number as well as the length of history arguments.
* All [2] existing users of kernhist(9) have had their format strings updated. Each format specifier now includes an explicit length modifier 'j' to refer to numeric values of the size of uintmax_t.
* All [2] existing users of kernhist(9) have had their format strings updated to replace uses of "%p" with "%#jx", and the pointer arguments are now cast to (uintptr_t) before being subsequently cast to (uintmax_t). This is needed to avoid compiler warnings about casting "pointer to integer of a different size."
* All [2] existing users of kernhist(9) have had instances of "%s" or "%c" format strings replaced with numeric formats; several instances of mis-match between format string and argument list have been fixed.
* vmstat(1) has been modified to handle the new size of arguments in the history data as exported by sysctl(9).
* vmstat(1) now provides a warning message if the history requested with the -u option does not exist (previously, this condition was silently ignored, with only a single blank line being printed).
* vmstat(1) now checks the version and argument length included in the data exported via sysctl(9) and exits if they do not match the values with which vmstat was built.
* The kernhist(9) man-page has been updated to note the additional requirements imposed on the format strings, along with several other minor changes and enhancements.
[1] It would have been possible to use an explicit length (for example, uint64_t) for the history arguments. But that would require another "rototill" of all the users in the future when we add support for an architecture that supports a larger size. Also, the printf(3) format specifiers for explicitly-sized values, such as "%"PRIu64, are much more verbose (and less aesthetically appealing, IMHO) than simply using "%ju".
[2] I've tried very hard to find "all [the] existing users of kernhist(9)" but it is possible that I've missed some of them. I would be glad to update any stragglers that anyone identifies.
|
1.51 |
| 07-Aug-2017 |
dholland | Tidy up ufs_readdir. First step only; there's plenty more that could be done to improve this code.
|
1.50 |
| 04-Aug-2017 |
maya | fix buffer overflow/KASSERT when cookies are supplied lfs no longer uses the ffs-style struct direct, use the correct minimum size
from dholland XXX more wrong
|
1.49 |
| 10-Jun-2017 |
maya | Rename i_flag to i_state.
The similarity to i_flags has previously caused errors.
|
1.48 |
| 26-Apr-2017 |
riastradh | branches: 1.48.4; Change VOP_REMOVE and VOP_RMDIR to preserve lock/ref on dvp.
No change to vp -- the plan is to replace the node by the componentname in the vop parameters, and let all directory vops do lookups internally.
Proposed on tech-kern with no objections: https://mail-index.netbsd.org/tech-kern/2017/04/17/msg021825.html
|
1.47 |
| 11-Apr-2017 |
riastradh | Sprinkle lock ownership assertions.
|
1.46 |
| 30-Mar-2017 |
hannken | Remove now redundant calls to fstrans_start()/fstrans_done().
Add fstrans_start()/fstrans_done() to lfs_putpages().
|
1.45 |
| 13-Mar-2017 |
riastradh | #if DIAGNOSTIC panic ---> KASSERT
Replace some #if DEBUG by this too. DEBUG is only for expensive assertions; these are not.
|
1.44 |
| 20-Jun-2016 |
dholland | branches: 1.44.2; 1.44.4; One more batch of already-synced ufs changes:
ufs_extern.h 1.79 is equivalent to ulfs_extern.h 1.14 ufsmount.h 1.43 is (roughly) equivalent to lfs_extern.h 1.102 ufs_inode.c 1.94 does not apply to lfs ufs_inode.c 1.95 does not apply to lfs either ufs_readwrite.c 1.108 is equivalent to ulfs_readwrite.c 1.8 ufs_readwrite.c 1.109 is equivalent to ulfs_readwrite.c 1.9 ufs_readwrite.c 1.110 is equivalent to ulfs_readwrite.c 1.10 ufs_readwrite.c 1.111 does not apply to lfs ufs_readwrite.c 1.112 is equivalent to ulfs_readwrite.c 1.11 ufs_readwrite.c 1.113 is equivalent to ulfs_readwrite.c 1.13 ufs_readwrite.c 1.114 is equivalent to ulfs_readwrite.c 1.14 ufs_readwrite.c 1.115 is equivalent to ulfs_readwrite.c 1.15 ufs_readwrite.c 1.116-1.118 does not apply to lfs ufs_readwrite.c 1.119-1.120 are equivalent to ulfs_readwrite.c 1.16 ufs_rename.c 1.12 is equivalent to lfs_rename.c 1.8 ufs_vnops.c 1.226 is equivalent to ulfs_vnops.c 1.22 and lfs_vnops.c 1.270 ufs_vnops.c 1.227 is equivalent to ulfs_vnops.c 1.23 ufs_vnops.c 1.228-1.229 are equivalent to ulfs_vnops.c 1.24 ufs_vnops.c 1.230 is equivalent to ulfs_vnops.c 1.25 and lfs_vnops.c 1.271 ufs_vnops.c 1.231 originated in lfs ufs_vnops.c 1.232 does not apply to lfs
|
1.43 |
| 20-Jun-2016 |
dholland | With the previous we seem to have the changes from -r1.225 of ufs_vnops.c. (as that was stuff from moving ffs to the new vcache and lfs has also been moved, this is not surprising)
|
1.42 |
| 20-Jun-2016 |
dholland | Merge (effectively) -r1.78 of ufs_extern.h: shift ulfs_makeinode to lfs_vnops.c and make it file-static there, as that's the only place it's used.
|
1.41 |
| 20-Jun-2016 |
dholland | Note more already-merged versions:
inode.h 1.68 is subsumed by ulfs_inode.h 1.19 inode.h 1.69-1.72 do not apply to lfs ufs_extern.h 1.74 was covered when lfs was moved to the new vnode cache ufs_extern.h 1.75 is equivalent to ulfs_extern.h 1.13 ufs_extern.h 1.76-1.77 do not apply to lfs ufsmount.h 1.42 does not apply to lfs ufs_inode.c 1.90 is subsumed by ulfs_inode.c 1.10 ufs_inode.c 1.91-1.92 do not apply to lfs ufs_lookup.c 1.130 is subsumed by ulfs_lookup.c 1.24 ufs_lookup.c 1.131 is equivalent to ulfs_lookup.c 1.20 ufs_lookup.c 1.132 is equivalent to ulfs_lookup.c 1.21 ufs_lookup.c 1.133 is equivalent to ulfs_lookup.c 1.22 ufs_lookup.c 1.134 is equivalent to ulfs_lookup.c 1.23 ufs_lookup.c 1.135 is equivalent to ulfs_lookup.c 1.25 ufs_quota2.c 1.38 is equivalent to ulfs_quota2.c 1.17 ufs_quota2.c 1.39 is equivalent to ulfs_quota2.c 1.16 ufs_quota2.c 1.40 is equivalent to ulfs_quota2.c 1.18 ufs_vfsops.c 1.53 is subsumed by lfs_vfsops.c 1.324 ufs_vfsops.c 1.54 is subsumed by lfs_vfsops.c 1.324 ufs_vnops.c 1.223-1.224 do not apply to lfs
|
1.40 |
| 20-Jun-2016 |
dholland | More already-merged or equivalent changes:
ufs_dirhash.c 1.36 corresponds to ulfs_dirhash.c 1.8 ufs_extattr.c 1.43 corresponds to ulfs_extattr.c 1.7 ufs_lookup.c 1.126 does not apply to lfs ufs_lookup.c 1.127 we already have ufs_lookup.c 1.128 does not apply to lfs ufs_lookup.c 1.129 corresponds to ulfs_lookup.c 1.19 ufs_quota1.c 1.19 corresponds to ulfs_quota1.c 1.7 ufs_quota1.c 1.20 corresponds to ulfs_quota1.c 1.8 ufs_quota2.c 1.36 we have equivalent changes for ufs_rename.c 1.9 corresponds to lfs_rename.c 1.5 ufs_rename.c 1.10 corresponds to lfs_rename.c 1.6 ufs_vnops.c 1.219 corresponds to lfs_vnops.c 1.260 and ulfs_vnops.c 1.19 ufs_vnops.c 1.220 corresponds to lfs_vnops.c 1.261 and ulfs_vnops.c 1.20 ufs_vnops.c 1.221 was superseded by later changes ufs_vnops.c 1.222 got fixed independently in lfs
|
1.39 |
| 19-Jun-2016 |
dholland | we already have ufs_lookup.c 1.125 and ufs_vnops.c 1.218.
|
1.38 |
| 19-Jun-2016 |
dholland | note that we're synced with ufs_vnops.c -r1.217 and ufsmount.h -r1.41 (those changes removed lfs hooks from ufs so shouldn't be merged across)
|
1.37 |
| 19-Jun-2016 |
dholland | Merge -r1.216 of ufs_vnops.c: comments about maxsymlinklen handling
|
1.36 |
| 19-Jun-2016 |
dholland | Merge -r1.215 of ufs_vnops.c: the speed limit is 80 (-r1.214 was ffs-only)
|
1.35 |
| 14-Nov-2015 |
pgoyette | Remove historic references to wapbl.
|
1.34 |
| 21-Sep-2015 |
dholland | Add 64-bit directory entry structures, and adjust accessors accordingly.
The LFS64 directory entry has a 64-bit inode number. This is stored as two 32-bit values to avoid inducing 64-bit alignment requirements.
The exposed type for manipulating directory entries is now LFS_DIRHEADER, following the same convention as e.g. IFILE and SEGUSE. (But with LFS_ on it, because.)
|
1.33 |
| 21-Sep-2015 |
dholland | Oops; LFS_DIRECTSIZ() is going to need the fs as an argument.
Also, it turns out that dirhash needs a compile-time-constant version of LFS_DIRECTSIZ(LFS_MAXNAMLEN+1), independent of 64-vs-32, so create LFS_MAXDIRENTRYSIZE for this. Sigh.
|
1.32 |
| 15-Sep-2015 |
dholland | Pass around struct lfs_dirheader instead of struct lfs_direct.
|
1.31 |
| 15-Sep-2015 |
dholland | Add an accessor function for directory names.
|
1.30 |
| 15-Sep-2015 |
dholland | Kill off ulfs_makedirentry; just pass the data to ulfs_direnter instead. For now, move one copy of the code that allocates and fills in a temporary struct lfs_direct to the top of ulfs_direnter; but it should go away shortly.
|
1.29 |
| 15-Sep-2015 |
dholland | Add and use accessor functions for more of the directory entry fields.
|
1.28 |
| 01-Sep-2015 |
dholland | Add new accessors for the d_type and d_namlen fields of struct lfs_direct. Napalm the old byteswap access logic for these.
|
1.27 |
| 01-Sep-2015 |
dholland | Use the lfs dinode accessors in place of the ufs-derived ones. (Mostly.)
The ufs-derived ones are fake structure member macros, which are gross and not very safe. Also, it seems that a lot of places in the lfs code were using the ffsv1 branch of them unconditionally, and this way it's guaranteed all those places have been updated.
Found while doing this: for non-devices, have getattr produce NODEV in the rdev field instead of leaking the address of the first direct block.
|
1.26 |
| 31-May-2015 |
hannken | Change lfs from hash table to vcache.
- Change lfs_valloc() to return an inode number and version instead of a vnode and move lfs_ialloc() and lfs_vcreate() to new lfs_init_vnode().
- Add lfs_valloc_fixed() to allocate a known inode, used by kernel roll forward.
- Remove lfs_*ref(), these functions cannot coexist with vcache and their commented behaviour is far away from their implementation.
- Add the cleaner lwp and blockinfo to struct ulfsmount so lfs_loadvnode() may use hints from the cleaner.
- Remove vnode locks from ulfs_lookup() like we did with ufs_lookup().
|
1.25 |
| 20-Apr-2015 |
riastradh | Make VOP_LINK return directory still locked and referenced.
Ride 7.99.10 bump.
|
1.24 |
| 20-Apr-2015 |
riastradh | Fix more dvp->v_mount after vput(dvp).
|
1.23 |
| 27-Mar-2015 |
riastradh | Tighten some kasserts in ufs_bufio code paths.
|
1.22 |
| 27-Mar-2015 |
riastradh | Disentangle buffer-cached I/O from page-cached I/O in UFS.
Page-cached I/O is used for regular files, and is initiated by VFS users such as userland and NFS.
Buffer-cached I/O is used for directories and symlinks, and is issued only internally by UFS.
New UFS routine ufs_bufio replaces vn_rdwr for internal use. ufs_bufio is implemented by new UFS operations uo_bufrd/uo_bufwr, which sit in ufs_readwrite.c alongside the VOP_READ/VOP_WRITE implementations.
I preserved the code as much as possible and will leave further simplification for future commits. I kept the ulfs_readwrite.c copypasta close to ufs_readwrite.c in case we ever want to merge them back; likewise ext2fs_readwrite.c.
No externally visible semantic change. All atf fs tests still pass.
|
1.21 |
| 17-May-2014 |
dholland | branches: 1.21.2; 1.21.6; Move the ulfs-level (copy of ufs) vnops for symlink, create, and mkdir into lfs_vnops.c preparatory to folding them into the lfs entry points.
(lfs_vnops.c now has four licenses. sigh.)
|
1.20 |
| 23-Jan-2014 |
hannken | branches: 1.20.2; Change vnode operations create, mknod, mkdir and symlink to return the resulting vnode *vpp unlocked.
Discussed on tech-kern@
Welcome to 6.99.30
|
1.19 |
| 17-Jan-2014 |
hannken | 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
|
1.18 |
| 28-Jul-2013 |
dholland | Migrate the miscellaneous ulfs-level info from struct ulfsmount to struct lfs.
Put them inside #ifdef _KERNEL there. They are not the only such members, gross as that is. Unfortunately, moving struct lfs to lfs_kernel.h does not work.
|
1.17 |
| 28-Jul-2013 |
dholland | Remove the now-pointless ulfs ops macros.
|
1.16 |
| 28-Jul-2013 |
dholland | Remove ulfsspec_close and ulfsfifo_close as they're not used.
|
1.15 |
| 21-Jul-2013 |
dholland | Merge logic from ulfs_close(), ulfs_getattr(), and ulfs_strategy() into the preexisting lfs_*() versions of these functions, and delete the unused ulfs copies.
|
1.14 |
| 20-Jul-2013 |
dholland | Remove ulfs_mknod, which is not used.
|
1.13 |
| 08-Jun-2013 |
dholland | branches: 1.13.2; 1.13.4; 1.13.6; ulfs_dir.h has been emptied; remove it.
|
1.12 |
| 08-Jun-2013 |
dholland | There is no WAPBL in LFS.
|
1.11 |
| 08-Jun-2013 |
dholland | mp->mnt_wapbl and mp->mnt_wapbl_replay are always NULL in here.
|
1.10 |
| 08-Jun-2013 |
dholland | Merge -r1.213 of ufs_vnops.c:
Committed By: kardel Date: Sat Jun 8 05:47:02 UTC 2013
fix clearing of system-flags (schg, sappnd). clearing system flags is possible again at securelevel < 1. reviewed by christos@
|
1.9 |
| 08-Jun-2013 |
dholland | DIRBLKSIZ -> LFS_DIRBLKSIZ DIRECTSIZ -> LFS_DIRECTSIZ DIRSIZ -> LFS_DIRSIZ OLDDIRFMT -> LFS_OLDDIRFMT NEWDIRFMT -> LFS_NEWDIRFMT IFTODT -> LFS_IFTODT DTTOIF -> LFS_DTTOIF
|
1.8 |
| 08-Jun-2013 |
dholland | struct direct -> struct lfs_direct struct dirtemplate -> struct lfs_dirtemplate struct odirtemplate -> struct lfs_odirtemplate DT_* -> LFS_DT_*
|
1.7 |
| 08-Jun-2013 |
dholland | Stick LFS_ in front of IFMT, IFIFO, IFREG, etc. so as not to conflict with the UFS copies of these symbols. (Which themselves ought to have UFS_ stuck on.)
|
1.6 |
| 06-Jun-2013 |
dholland | Remove stray references to ext2fs, chfs, ffs, and mfs.
|
1.5 |
| 06-Jun-2013 |
dholland | Add lfs_ or ulfs_ in front of extern symbols lacking them, mostly quota-related (and particularly quota2-related) stuff.
|
1.4 |
| 06-Jun-2013 |
dholland | Split lfs from ufs step 4:
Massedit all ufs symbols to be "ulfs" instead, to make sure there are no conflicts with ufs. Confirmed with grep.
(This required changing a few comments that maybe should have been left alone to say "ulfs", but we'll survive that.)
|
1.3 |
| 06-Jun-2013 |
dholland | Split lfs from ufs step 3: rearrange config stuff. Add new options: LFS_EI LFS_DIRHASH LFS_EXTATTR LFS_EXTATTR_AUTOSTART LFS_QUOTA LFS_QUOTA2
and update code referring to the corresponding FFS and UFS config symbols to use the LFS versions. Disable the one extant reference to APPLE_UFS in the ulfs files. Use opt_lfs.h only, not opt_ffs.h.
|
1.2 |
| 06-Jun-2013 |
dholland | Split lfs from ufs, part 2:
Change all <ufs/ufs/foo.h> includes to <ufs/lfs/ulfs_foo.h>.
|
1.1 |
| 06-Jun-2013 |
dholland | Split lfs from ufs, part 1: cut and paste 15000 lines of ufs as "ulfs".
These are verbatim copies except that I've preserved the ufs rcsids for reference. Also, ufs/quota.h -> ulfs_quotacommon.h ufs/ufs_quota.h -> ulfs_quota.h
Splitting lfs from ufs was ok'd by core some years ago. This is not from my original tree, which became unmergeable after the several sets of quota changes; I've done the work over again over the last couple days.
|
1.13.6.1 |
| 23-Jul-2013 |
riastradh | sync with HEAD
|
1.13.4.2 |
| 18-May-2014 |
rmind | sync with head
|
1.13.4.1 |
| 28-Aug-2013 |
rmind | sync with head
|
1.13.2.4 |
| 03-Dec-2017 |
jdolecek | update from HEAD
|
1.13.2.3 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.13.2.2 |
| 23-Jun-2013 |
tls | resync from head
|
1.13.2.1 |
| 08-Jun-2013 |
tls | file ulfs_vnops.c was added on branch tls-maxphys on 2013-06-23 06:18:39 +0000
|
1.20.2.1 |
| 10-Aug-2014 |
tls | Rebase.
|
1.21.6.6 |
| 28-Aug-2017 |
skrll | Sync with HEAD
|
1.21.6.5 |
| 09-Jul-2016 |
skrll | Sync with HEAD
|
1.21.6.4 |
| 27-Dec-2015 |
skrll | Sync with HEAD (as of 26th Dec)
|
1.21.6.3 |
| 22-Sep-2015 |
skrll | Sync with HEAD
|
1.21.6.2 |
| 06-Jun-2015 |
skrll | Sync with HEAD
|
1.21.6.1 |
| 06-Apr-2015 |
skrll | Sync with HEAD
|
1.21.2.2 |
| 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.21.2.1 |
| 17-May-2014 |
yamt | file ulfs_vnops.c was added on branch yamt-pagecache on 2014-05-22 11:41:19 +0000
|
1.44.4.1 |
| 21-Apr-2017 |
bouyer | Sync with HEAD
|
1.44.2.2 |
| 26-Apr-2017 |
pgoyette | Sync with HEAD
|
1.44.2.1 |
| 20-Mar-2017 |
pgoyette | Sync with HEAD
|
1.48.4.2 |
| 02-Nov-2017 |
snj | Pull up following revision(s) (requested by pgoyette in ticket #335): share/man/man9/kernhist.9: 1.5-1.8 sys/arch/acorn26/acorn26/pmap.c: 1.39 sys/arch/arm/arm32/fault.c: 1.105 via patch sys/arch/arm/arm32/pmap.c: 1.350, 1.359 sys/arch/arm/broadcom/bcm2835_bsc.c: 1.7 sys/arch/arm/omap/if_cpsw.c: 1.20 sys/arch/arm/omap/tiotg.c: 1.7 sys/arch/evbarm/conf/RPI2_INSTALL: 1.3 sys/dev/ic/sl811hs.c: 1.98 sys/dev/usb/ehci.c: 1.256 sys/dev/usb/if_axe.c: 1.83 sys/dev/usb/motg.c: 1.18 sys/dev/usb/ohci.c: 1.274 sys/dev/usb/ucom.c: 1.119 sys/dev/usb/uhci.c: 1.277 sys/dev/usb/uhub.c: 1.137 sys/dev/usb/umass.c: 1.160-1.162 sys/dev/usb/umass_quirks.c: 1.100 sys/dev/usb/umass_scsipi.c: 1.55 sys/dev/usb/usb.c: 1.168 sys/dev/usb/usb_mem.c: 1.70 sys/dev/usb/usb_subr.c: 1.221 sys/dev/usb/usbdi.c: 1.175 sys/dev/usb/usbdi_util.c: 1.67-1.70 sys/dev/usb/usbroothub.c: 1.3 sys/dev/usb/xhci.c: 1.75 sys/external/bsd/drm2/dist/drm/i915/i915_gem.c: 1.34 sys/kern/kern_history.c: 1.15 sys/kern/kern_xxx.c: 1.74 sys/kern/vfs_bio.c: 1.275-1.276 sys/miscfs/genfs/genfs_io.c: 1.71 sys/sys/kernhist.h: 1.21 sys/ufs/ffs/ffs_balloc.c: 1.63 sys/ufs/lfs/lfs_vfsops.c: 1.361 sys/ufs/lfs/ulfs_inode.c: 1.21 sys/ufs/lfs/ulfs_vnops.c: 1.52 sys/ufs/ufs/ufs_inode.c: 1.102 sys/ufs/ufs/ufs_vnops.c: 1.239 sys/uvm/pmap/pmap.c: 1.37-1.39 sys/uvm/pmap/pmap_tlb.c: 1.22 sys/uvm/uvm_amap.c: 1.108 sys/uvm/uvm_anon.c: 1.64 sys/uvm/uvm_aobj.c: 1.126 sys/uvm/uvm_bio.c: 1.91 sys/uvm/uvm_device.c: 1.66 sys/uvm/uvm_fault.c: 1.201 sys/uvm/uvm_km.c: 1.144 sys/uvm/uvm_loan.c: 1.85 sys/uvm/uvm_map.c: 1.353 sys/uvm/uvm_page.c: 1.194 sys/uvm/uvm_pager.c: 1.111 sys/uvm/uvm_pdaemon.c: 1.109 sys/uvm/uvm_swap.c: 1.175 sys/uvm/uvm_vnode.c: 1.103 usr.bin/vmstat/vmstat.c: 1.219 Reorder to test for null before null deref in debug code -- Reorder to test for null before null deref in debug code -- KNF -- No need for '\n' in UVMHIST_LOG -- normalise a BIOHIST log message -- Update the kernhist(9) kernel history code to address issues identified in PR kern/52639, as well as some general cleaning-up... (As proposed on tech-kern@ with additional changes and enhancements.) Details of changes: * All history arguments are now stored as uintmax_t values[1], both in the kernel and in the structures used for exporting the history data to userland via sysctl(9). This avoids problems on some architectures where passing a 64-bit (or larger) value to printf(3) can cause it to process the value as multiple arguments. (This can be particularly problematic when printf()'s format string is not a literal, since in that case the compiler cannot know how large each argument should be.) * Update the data structures used for exporting kernel history data to include a version number as well as the length of history arguments. * All [2] existing users of kernhist(9) have had their format strings updated. Each format specifier now includes an explicit length modifier 'j' to refer to numeric values of the size of uintmax_t. * All [2] existing users of kernhist(9) have had their format strings updated to replace uses of "%p" with "%#jx", and the pointer arguments are now cast to (uintptr_t) before being subsequently cast to (uintmax_t). This is needed to avoid compiler warnings about casting "pointer to integer of a different size." * All [2] existing users of kernhist(9) have had instances of "%s" or "%c" format strings replaced with numeric formats; several instances of mis-match between format string and argument list have been fixed. * vmstat(1) has been modified to handle the new size of arguments in the history data as exported by sysctl(9). * vmstat(1) now provides a warning message if the history requested with the -u option does not exist (previously, this condition was silently ignored, with only a single blank line being printed). * vmstat(1) now checks the version and argument length included in the data exported via sysctl(9) and exits if they do not match the values with which vmstat was built. * The kernhist(9) man-page has been updated to note the additional requirements imposed on the format strings, along with several other minor changes and enhancements. [1] It would have been possible to use an explicit length (for example, uint64_t) for the history arguments. But that would require another "rototill" of all the users in the future when we add support for an architecture that supports a larger size. Also, the printf(3) format specifiers for explicitly-sized values, such as "%"PRIu64, are much more verbose (and less aesthetically appealing, IMHO) than simply using "%ju". [2] I've tried very hard to find "all [the] existing users of kernhist(9)" but it is possible that I've missed some of them. I would be glad to update any stragglers that anyone identifies. -- For some reason this single kernel seems to have outgrown its declared size as a result of the kernhist(9) changes. Bump the size. XXX The amount of increase may be excessive - anyone with more detailed XXX knowledge please feel free to further adjust the value appropriately. -- Misssed one cast of pointer --> uintptr_t in previous kernhist(9) commit -- And yet another one. :( -- Use correct mark-up for NetBSD version. -- More improvements in grammar and readability. -- Remove a stray '"' (obvious typo) and add a couple of casts that are probably needed. -- And replace an instance of "%p" conversion with "%#jx" -- Whitespace fix. Give Bl tag table a width. Fix Xr.
|
1.48.4.1 |
| 30-Oct-2017 |
snj | Pull up following revision(s) (requested by maya in ticket #330): sbin/fsck_lfs/inode.c: 1.69 sbin/fsck_lfs/lfs.c: 1.73 sbin/fsck_lfs/pass6.c: 1.50 sbin/fsck_lfs/segwrite.c: 1.46 sys/ufs/lfs/lfs.h: 1.202-1.203 sys/ufs/lfs/lfs_accessors.h: 1.48 sys/ufs/lfs/lfs_alloc.c: 1.136-1.137 sys/ufs/lfs/lfs_balloc.c: 1.94 sys/ufs/lfs/lfs_bio.c: 1.141 sys/ufs/lfs/lfs_extern.h: 1.113 sys/ufs/lfs/lfs_inode.c: 1.156-1.157 sys/ufs/lfs/lfs_inode.h: 1.20, 1.21, 1.23 sys/ufs/lfs/lfs_itimes.c: 1.20 sys/ufs/lfs/lfs_pages.c: 1.13-1.15 sys/ufs/lfs/lfs_rename.c: 1.22 sys/ufs/lfs/lfs_segment.c: 1.270-1.275 sys/ufs/lfs/lfs_subr.c: 1.94-1.97 sys/ufs/lfs/lfs_syscalls.c: 1.175 sys/ufs/lfs/lfs_vfsops.c: 1.360 sys/ufs/lfs/lfs_vnops.c: 1.316-1.321 sys/ufs/lfs/ulfs_inode.c: 1.20 sys/ufs/lfs/ulfs_inode.h: 1.24 sys/ufs/lfs/ulfs_lookup.c: 1.41 sys/ufs/lfs/ulfs_quota2.c: 1.31 sys/ufs/lfs/ulfs_readwrite.c: 1.24 sys/ufs/lfs/ulfs_vnops.c: 1.49-1.50 Update inode member i_flag --> i_state to keep up with kernel changes Move definition of IN_ALLMOD near the flag it's a mask for. Now we can see that it doesn't match all the flags, but changing that will require more careful thought. Correct confusion between i_flag and i_flags These will have to be renamed. Spotted by Riastradh, thanks! Add an XXX about the missing flags so it's not buried in a commit message. now the XXX count for LFS is 260 Rename i_flag to i_state. The similarity to i_flags has previously caused errors. Use continue to denote the no-op loop to match netbsd style newline for extra clarity. It isn't safe to drain dirops with seglock held, it'll deadlock if there are any dirops. drain before grabbing seglock. lfs_dirops == 0 is always true (as we already drained dirops), so omit that part of the comparison. Fixes a lot of LFS deadlocks. PR kern/52301 Many thanks to dholland for help analyzing coredumps Ifdef out KDASSERT which fires on my machine. Deduplicate sanity check that seglock is held on segunlock Revert r1.272 fix to PR kern/52301, the performance hit is making things unusable. change lfs_nextsegsleep and lfs_allclean_wakeup to use condvar XXX had to use lfs_lock in lfs_segwait, removed kernel_lock, is this appropriate? fix buffer overflow/KASSERT when cookies are supplied lfs no longer uses the ffs-style struct direct, use the correct minimum size from dholland XXX more wrong Consistently use {,UN}MARK_VNODE macros rather than function calls. Not much point doing anything after a panic call Ask some question about the code in a XXX comment XXX question our double-flushing of dirops Fix typo in comment
|