DragonFlyBSD/src fb68763usr.sbin/makefs/hammer2 hammer2_xops.c hammer2_strategy.c

usr.sbin/makefs: Sync with sys/vfs/hammer2

Sync with following sys/vfs/hammer2 commits.

$ git log --pretty="%h %s" 55066b18244fe9350bb96f93d65807d82b5cd98b.. -- sys/vfs/hammer2/
4f646c6893 sys/vfs/hammer2: Use HAMMER2_LOOKUP_ALWAYS in xop_readdir
6d68a182a9 sys/vfs/hammer2: Add missing error handling in hammer2_remount()
34ad347f7f sys/vfs/hammer2: Fix "Properly set ronly flag for PFS"
9a5c949af7 sys/vfs/hammer2: Properly set ronly flag for PFS
0c9702fdbe sys/vfs/hammer2: Remove duplicate spmp->pfs_hmps[0] initialization
8860585752 sys/vfs/hammer2: Ignore unused return value from hammer2_xop_feed()
bd41e746e6 sys/vfs/hammer2: Add SEEK_HOLE / SEEK_DATA support
DeltaFile
+61-4usr.sbin/makefs/hammer2/hammer2_xops.c
+38-1usr.sbin/makefs/hammer2/hammer2_strategy.c
+14-2usr.sbin/makefs/hammer2/hammer2_vfsops.c
+11-0usr.sbin/makefs/hammer2/hammer2.h
+5-0usr.sbin/makefs/hammer2/hammer2_ioctl.c
+1-0usr.sbin/makefs/hammer2/hammer2_admin.c
+130-71 files not shown
+131-77 files

DragonFlyBSD/src 4f646c6sys/vfs/hammer2 hammer2_xops.c

sys/vfs/hammer2: Use HAMMER2_LOOKUP_ALWAYS in xop_readdir

hammer2_xop_readdir() should explicitly use HAMMER2_LOOKUP_ALWAYS
for chain lookup, as hammer2_vop_readdir() can access chain data
for (a long enough) dirent name. Note that chain data is loaded
with or without ALWAYS in this case.
DeltaFile
+9-3sys/vfs/hammer2/hammer2_xops.c
+9-31 files

DragonFlyBSD/src 6d68a18sys/vfs/hammer2 hammer2_vfsops.c

sys/vfs/hammer2: Add missing error handling in hammer2_remount()
DeltaFile
+4-1sys/vfs/hammer2/hammer2_vfsops.c
+4-11 files

DragonFlyBSD/src acc0986sys/dev/drm/include/linux completion.h

drm/linux - More closely match linux wait-for-completion

Linux wait-for-completion functions decrement `done` counter if a
completion did not signaled with complete_all. Do the same on DragonFly.

Proposed-By: dillon
DeltaFile
+2-0sys/dev/drm/include/linux/completion.h
+2-01 files

DragonFlyBSD/src 7097cb2sys/dev/drm/radeon radeon_i2c.c

drm/radeon - Fix panic when launching Xorg server on Radeon Xpress 1100/1150 GPU

I2C adapter lock_ops were not initialized on certain radeon hardware.
Add explicit call to i2c_add_adapter which initializes lock_ops.

Fixes #3374.

Reported-by: hjckr
DeltaFile
+4-0sys/dev/drm/radeon/radeon_i2c.c
+4-01 files

DragonFlyBSD/src 24ca31bsys/dev/drm/amd/include/asic_reg/nbio nbio_7_4_sh_mask.h nbio_7_4_offset.h, sys/dev/drm/amd/include/asic_reg/sdma0 sdma0_4_2_sh_mask.h

drm - Update to Linux 4.20.17

  core:
    * Implement basic DMA-BUF support
  amdgpu:
    * Add support for Picasso, Raven2, and Vega20
  i915:
    * Add support up to Ice Lake
    * Fix hardware acceleration
DeltaFile
+48,436-0sys/dev/drm/amd/include/asic_reg/nbio/nbio_7_4_sh_mask.h
+3,512-2,179sys/dev/drm/i915/i915_reg.h
+4,627-0sys/dev/drm/amd/include/asic_reg/nbio/nbio_7_4_offset.h
+3,608-0sys/dev/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
+2,265-1,339sys/dev/drm/i915/intel_display.c
+2,992-0sys/dev/drm/amd/include/asic_reg/sdma0/sdma0_4_2_sh_mask.h
+65,440-3,518719 files not shown
+146,886-43,366725 files

DragonFlyBSD/src 34ad347sys/vfs/hammer2 hammer2_vfsops.c

sys/vfs/hammer2: Fix "Properly set ronly flag for PFS"

hammer2_remount() is update once only for hmp->ronly,
so pmp->ronly needed to be updated first independently,
otherwise causes problems with mount update after boot.
DeltaFile
+8-1sys/vfs/hammer2/hammer2_vfsops.c
+8-11 files

DragonFlyBSD/src 9a5c949sys/vfs/hammer2 hammer2_vfsops.c

sys/vfs/hammer2: Properly set ronly flag for PFS

Redo reverted b18a59622759a0617ee06c73b282dfc317ae70bf.

Once ->ronly becomes 0, it never becomes non-zero again.
(Update to ro still works as MNT_RDONLY is set in sys_mount().)
DeltaFile
+3-0sys/vfs/hammer2/hammer2_vfsops.c
+3-01 files

DragonFlyBSD/src 0c9702fsys/vfs/hammer2 hammer2_vfsops.c

sys/vfs/hammer2: Remove duplicate spmp->pfs_hmps[0] initialization

It's already initialized in this function.
DeltaFile
+0-1sys/vfs/hammer2/hammer2_vfsops.c
+0-11 files

DragonFlyBSD/src 8860585sys/vfs/hammer2 hammer2_strategy.c hammer2_xops.c

sys/vfs/hammer2: Ignore unused return value from hammer2_xop_feed()

hammer2_xop_feed callers that never use the return value
(except for these two) simply ignore it.
DeltaFile
+1-1sys/vfs/hammer2/hammer2_strategy.c
+1-1sys/vfs/hammer2/hammer2_xops.c
+2-22 files

DragonFlyBSD/src bd41e74sys/kern vfs_vnops.c, sys/sys buf.h

sys/vfs/hammer2: Add SEEK_HOLE / SEEK_DATA support

Similar to ext2 and ufs using VOP_BMAP based vn_bmap_seekhole().

- Add xop_bmap which corresponds to .vop_bmap.
- Add BUF_CMD_SEEK to prevent xop_bmap from being used for other
 purposes e.g. cluster read / write. Note that vop_bmap_args::a_cmd
 is only used in here and HAMMER1 (supports BUF_CMD_READ only,
 and SEEK_XXX is unsupported).
DeltaFile
+51-0sys/vfs/hammer2/hammer2_xops.c
+37-0sys/vfs/hammer2/hammer2_strategy.c
+11-0sys/vfs/hammer2/hammer2.h
+6-0sys/vfs/hammer2/hammer2_ioctl.c
+2-1sys/sys/buf.h
+1-1sys/kern/vfs_vnops.c
+108-21 files not shown
+109-27 files

DragonFlyBSD/src f0dd2afsys/dev/misc/kbd atkbd.c

atkbd: Fix first keystroke force reset

Some i8042 falsely return KBD_ACK for ECHO command which cause the
keyboard echo test to fail.
Without passing echo test, the keyboard is considered as unconfigured.

Although this is incorrect behavior, we still consider it correct to
prevent the forced reset (a step to configure a keyboard) of the entire
keyboard when the first key interrupt is reached.

This should fix keyboard probing at least for Framework Laptop [1].

Taken-from: FreeBSD [2] (minus typos)

[1]: https://reviews.freebsd.org/D50498
[2]: https://github.com/freebsd/freebsd-src/commit/cba5d7ab32fd0b4e9c4312cc967baf137377f812
DeltaFile
+13-1sys/dev/misc/kbd/atkbd.c
+13-11 files

DragonFlyBSD/src 930ae25sys/dev/misc/atkbdc_layer atkbdc_isa.c

atkbd: print out message if AT keyboard controller not found

Taken-from: FreeBSD
DeltaFile
+2-0sys/dev/misc/atkbdc_layer/atkbdc_isa.c
+2-01 files

DragonFlyBSD/src e8a55a7sys/dev/misc/kbd atkbdc.c atkbdcreg.h

atkbd: remove unused code that measures inb() duration

We are not using the retry count as FreeBSD does.

Instead, we are using TOTALDELAY / CHECKTIMEOUT, which measures the
actual execution time after each loop iteration and breaks out of the
loop when the total time (70ms or 200ms in most cases) has expired.
DeltaFile
+0-25sys/dev/misc/kbd/atkbdc.c
+0-1sys/dev/misc/kbd/atkbdcreg.h
+0-262 files

DragonFlyBSD/src 91c130dsys/dev/misc/kbd atkbdc.c

atkbd: fix style

Use struct initializer syntax. No functional change.
DeltaFile
+5-5sys/dev/misc/kbd/atkbdc.c
+5-51 files

DragonFlyBSD/src b6ec1c5sys/dev/misc/psm psm.c

psm - disable PS2 multiplexing based on kbdc quirks

hw.psm.mux_disabled now defaults to -1, in which case the quirks are
taken into account.

Taken-from: FreeBSD
DeltaFile
+3-2sys/dev/misc/psm/psm.c
+3-21 files

DragonFlyBSD/src 457a604sys/dev/misc/kbd atkbdc.c

kbd - fix typos
DeltaFile
+2-2sys/dev/misc/kbd/atkbdc.c
+2-21 files

DragonFlyBSD/src 0c27d85sys/kern vfs_vnops.c, sys/sys vnode.h

sys/vfs/{ext2fs,ufs}: Add SEEK_HOLE / SEEK_DATA support

Add VOP_BMAP based generic function vn_bmap_seekhole()
for filesystems with .vop_bmap to support SEEK_HOLE / SEEK_DATA.

FreeBSD has optimized version of FIOSEEKDATA for ext2 and ufs,
but this commit only brings in generic version for both.

taken-from: FreeBSD
DeltaFile
+77-0sys/kern/vfs_vnops.c
+38-1sys/vfs/ufs/ufs_vnops.c
+15-0sys/vfs/ext2fs/ext2_vnops.c
+5-0sys/sys/vnode.h
+135-14 files

DragonFlyBSD/src 128dc99lib/libc/sys lseek.2 pathconf.2, sys/kern vfs_default.c vfs_vnops.c

sys/kern: Add SEEK_HOLE / SEEK_DATA support

No filesystem implements SEEK_HOLE / SEEK_DATA yet.

Filesystems with no .vop_ioctl implementation (e.g. ufs, ext2)
use vop_stdioctl() which simply returns EOF for SEEK_HOLE.
Others usually return EOPNOTSUPP, ENOTTY, etc, depending on what
they have for "default" in a switch case.

taken-from: FreeBSD
DeltaFile
+69-1lib/libc/sys/lseek.2
+37-1sys/kern/vfs_default.c
+19-0sys/kern/vfs_vnops.c
+12-0lib/libc/sys/pathconf.2
+3-0sys/sys/filio.h
+1-0sys/sys/vnode.h
+141-26 files

DragonFlyBSD/src 17078aclib/libefivar Makefile, sbin/gpt gpt.c

libefivar(3): Fix building

This reverts commit e6e12d327e486626dfee68e686362b79a31ea17f and partly
reverts commit 1de074ab63177fef2205996d85e45536042d8891.

TODO: figure out a better way to share code between libefivar(3) and gpt(8).
DeltaFile
+3-3lib/libefivar/Makefile
+2-0sbin/gpt/gpt.c
+5-32 files

DragonFlyBSD/src 0d52b42sbin/gpt gpt.8

gpt(8): Multiple minor improvements/tweaks/fixes to the man page
DeltaFile
+41-32sbin/gpt/gpt.8
+41-321 files

DragonFlyBSD/src 1de074alib/libefivar efivar-dp-xlate.c Makefile

libefivar(3): Fix build by using uuid_dec_le() from libc

It was using le_uuid_dec() from source of gpt(8).  As a result, this
library no longer depends on the 'gpt.c' file from gpt(8).

While there, fix a typo in comment (taken from FreeBSD).
DeltaFile
+4-3lib/libefivar/efivar-dp-xlate.c
+3-3lib/libefivar/Makefile
+7-62 files

DragonFlyBSD/src 2259d95sys/dev/disk/ccd ccd.c, sys/dev/disk/fd fd.c

kernel: Remove obsolete DSO_COMPATMBR from <sys/disk.h>

The last use of this flag was removed in commit
1c3c151b5fca37695bf972f959efb7dda16cfbe6, so this flag has become
effectively obsolete since then.  Now just remove it to reduce any
confusion.

ok by dillon.
DeltaFile
+29-36sys/dev/disk/ccd/ccd.c
+19-19sys/dev/disk/fd/fd.c
+11-19sys/dev/disk/vn/vn.c
+6-9sys/sys/disk.h
+2-1sys/sys/param.h
+67-845 files

DragonFlyBSD/src d69b4edsys/kern subr_diskmbr.c, sys/sys diskmbr.h

kernel: Clean up DOSPTYP_* defines in subr_diskmbr.c

* Move DOSPTYP_ONTRACK to <sys/diskmbr.h> where other DOSPTYP_* defines
  are located.
* Remove DOSPTYP_{EXTENDED,EXTENDEDX} and use DOSPTYP_{EXT,EXTLBA} from
  <sys/diskmbr.h> instead.
DeltaFile
+4-7sys/kern/subr_diskmbr.c
+1-0sys/sys/diskmbr.h
+5-72 files

DragonFlyBSD/src e6e12d3sbin/gpt gpt.c

gpt(8): Remove now obsolete "#ifndef _LIBEFIVAR"
DeltaFile
+0-2sbin/gpt/gpt.c
+0-21 files

DragonFlyBSD/src aac9c1fsbin/gpt show.c

gpt(8): Improve "show" command to print humanized size of partitions

Before:
Disk da0: 50.0GB (104857600 512-byte sectors)
      start       size  index  contents
          0          1      -  PMBR
          1          1      -  Pri GPT header
          2         32      -  Pri GPT table
         34       2014      -  Unused
       2048     262144      0  GPT part - EFI System
     264192  104591360      1  GPT part - DragonFly Label64
  104855552       2015      -  Unused
  104857567         32      -  Sec GPT table
  104857599          1      -  Sec GPT header

After:
Disk da0: 50.0GB (104857600 512-byte sectors)
      Start    Sectors    Size  Index  Contents
          0          1    512B      -  PMBR

    [8 lines not shown]
DeltaFile
+8-3sbin/gpt/show.c
+8-31 files

DragonFlyBSD/src fbe16f5sbin/gpt gpt.c migrate.c

gpt(8): Use uuid_{enc,dec}_le() from libc

See also uuid(3) man page.
DeltaFile
+1-33sbin/gpt/gpt.c
+7-7sbin/gpt/migrate.c
+2-2sbin/gpt/create.c
+2-2sbin/gpt/add.c
+2-2sbin/gpt/boot.c
+2-2sbin/gpt/show.c
+16-483 files not shown
+18-529 files

DragonFlyBSD/src 6452090sbin/gpt gpt.c gpt.8

gpt(8): Refactor parse_uuid() and support more GPT type aliases

Refactor parse_uuid() to parse GPT type aliases by using an array.
Meanwhile, extend it to support more GPT type aliases, which are defined
in <sys/gpt.h> as well as "/etc/defaults/uuids".
DeltaFile
+53-58sbin/gpt/gpt.c
+80-17sbin/gpt/gpt.8
+133-752 files

DragonFlyBSD/src 4b2df40sys/sys gpt.h

<sys/gpt.h>: Small tweaks

* Reorder the DragonFly entries.
* Move the GPT_ENT_TYPE_PREP_BOOT out of the FreeBSD group; it's used by
  the boot partition on some PowerPC systems.
* Remove obsolete description on Linux reusing the
  GPT_ENT_TYPE_MS_BASIC_DATA entry.
DeltaFile
+13-17sys/sys/gpt.h
+13-171 files

DragonFlyBSD/src c7b4313lib/libc/uuid uuid.3

uuid(3): Improve the description for uuid_to_string()

Document that uuid_to_string() will allocate a buffer to hold the
converted string and free(3) should be called to release the memory.

Several more minor tweaks.

Derived from FreeBSD.
DeltaFile
+16-7lib/libc/uuid/uuid.3
+16-71 files