Displaying 1 50 of 36,490 commits (0.011s)

DragonFlyBSD — sbin/newfs_hammer newfs_hammer.c

sbin/newfs_hammer: Set HAMMER_OBJTYPE_DIRECTORY for ondisk PFS#0 data

Ondisk PFS data is a record part of the root ip (inode) when
a new PFS is created via ioctl, so it's normal for ondisk PFS
data to have HAMMER_OBJTYPE_DIRECTORY for obj_type. It's
rather insane that PFS#0 (the only PFS created without ioctl)
has 0 (HAMMER_OBJTYPE_UNKNOWN) for obj_type while the root ip
(not PFS root but HAMMER root) is apparently a directory.

Although PFS#0 and the rest of the PFS are a bit different,
PFS ioctls treat all the ondisk PFS data in the same fashion.
Having consistent obj_type value for the same data type is
considered better than not having.

This change does affect 1 byte of ondisk PFS#0 data initially
created by newfs_hammer, but doesn't break compatibility.
Also see hammer_mkroot_pseudofs().
Delta File
+3 -1 sbin/newfs_hammer/newfs_hammer.c
+3 -1 1 file

DragonFlyBSD — share/man/man4 mxge.4 snd_hda.4, usr.sbin/powerd powerd.8

Correct some spelling mistakes/typos in manual pages.

DragonFlyBSD — sys/dev/acpica acpi_resource.c

acpi: Save I/O ports for I/O ports range, as long as its reasonable.

Reported-by: karu.pruun <karu.pruun gmail com>
Delta File
+13 -3 sys/dev/acpica/acpi_resource.c
+13 -3 1 file

DragonFlyBSD — sbin/hammer ondisk.c misc.c

sbin/hammer: Sync dce7ae2c format with zone statistics

Add "zone #" and change "next_tid" to "vol0_next_tid".
Delta File
+12 -11 sbin/hammer/ondisk.c
+5 -4 sbin/hammer/misc.c
+17 -15 2 files

DragonFlyBSD — lib/libhammer snapshot.c

lib/libhammer: Fix segmentation fault by null dereference

If libhammer cares about mountpoints of hammer and null,
it needs to care about the case where pfs0 happens to be NULL.
This occurs when a PFS(>#0) is null mounted on the mountpoint of PFS#0.

This commit avoids segmentation fault, but that doesn't mean the
result is correct. It's basically that this library doesn't fully
consider the complexity of ondisk PFS data within HAMMER's B-Tree.
Delta File
+3 -0 lib/libhammer/snapshot.c
+3 -0 1 file

DragonFlyBSD — bin/chio chio.1, bin/dd dd.1

Add/fix some HISTORY sections in bin/ manual pages.

Submitted-by:   Sevan Janiyan
Dragonfly-bugs: 2937-2945
Delta File
+20 -1 bin/expr/expr.1
+9 -1 bin/chio/chio.1
+6 -1 bin/echo/echo.1
+6 -1 bin/test/test.1
+6 -1 bin/dd/dd.1
+6 -1 bin/pwd/pwd.1
+12 -5 3 files not shown
+65 -11 9 files

DragonFlyBSD — sbin/hammer cmd_info.c

sbin/hammer: Don't print mountpoint of PFS

/sbin/hammer should not care if PFS are null mounted or where PFS are
mounted. It has nothing to do with the filesystem itself. PFS is just
a pointer to jump into a subset of HAMMER's B-Tree (clustered by
localization parameter). Just because DragonFly's installer used to
use PFS (not anymore) and null mount by default doesn't mean /sbin
/hammer needs to provide null mount info.

If someone does mount PFS to somewhere and want to know where PFS are
mounted, one needs to just type mount. In fact this is much better
than getting mountpoints info via hammer info command because mount(8)
doesn't use hammer's ioctl which may cause B-Tree lookup, but instead
retrieves mountpoints directly from vfs.

Also note that printing such info gives users wrong assumption that
PFS in HAMMER is something equivalent of ZFS (created out of storage
zpool) which is not true. As mentioned above, PFS is just a pointer to
a subset of a single HAMMER filesystem. These are not independent fs.

Also note that hammer info still has bugs due to bugs from libhammer
and its attached ioctl as mentioned in e0f42079, including things under
investigation now. Whatever it is, hammer info needs to be rewritten
(as a different command like hammer fsinfo) in short and straight
forward code like other commands, without unnecessary abstraction.

    [3 lines not shown]
Delta File
+2 -9 sbin/hammer/cmd_info.c
+2 -9 1 file

DragonFlyBSD — crypto/openssh pathnames.h, secure Makefile.ssh.common

Allow make.conf to override ssh's xauth location.

This allows dports to install xauth based on the make.conf definition,
and was the original reason this functionality was added in eb12d1cc.
Note that this is a slightly different implementation than eb12d1cc.
This centralizes the definition instead of scattering it across multiple
Makefiles. Also, since we're doing this via a Makefile, revert the
change to vendor code in e00185f1.

Requested-by: swildner, marino

DragonFlyBSD — sbin/hammer misc.c

sbin/hammer: Make sizetostr() print B if <1KB
Delta File
+1 -1 sbin/hammer/misc.c
+1 -1 1 file

DragonFlyBSD — sbin/hammer ondisk.c cmd_blockmap.c

sbin/hammer: Add print_blockmap() for common blockmap output format

This is for hammer blockmap,checkmap,show,show-undo commands.
These hammer commands print blockmap information prior to checking
whatever filesystem structure they're looking for, with slightly
different format but essentially the same thing.

print_blockmap() defines a common format so that these commands
can print blockmap information in the same format. print_blockmap()
is based on hammer blockmap command's output format since it has
the best readable format.

DragonFlyBSD — usr.bin/gencat gencat.c Makefile, usr.bin/uudecode Makefile uudecode.c

buildworld - bootstrap compatibility compiling older DragonFly's

* Fix buildworld issue bootstrapping gencat/uudecode utilities which does not
  expect newer header files (POSIX getline general visibility from <stdio.h>).

Could be MFC'd to DragonFly 4.6 branch for easier switching <-> master.

DragonFlyBSD — usr.bin/gencat gencat.c Makefile, usr.bin/uudecode Makefile uudecode.c

buildworld - bootstrap compatibility compiling older DragonFly's

* Fix buildworld issue bootstrapping gencat/uudecode utilities which does not
  expect newer header files (POSIX getline general visibility from <stdio.h>).

Could be MFC'd to DragonFly 4.6 branch for easier switching <-> master.

DragonFlyBSD — sbin/hammer ondisk.c hammer_util.h

sbin/hammer: Make get_buffer() static

This is always called via other get functions (but not directly)
from various hammer commands.

DragonFlyBSD — sbin/hammer cmd_blockmap.c cmd_show.c

sbin/hammer: Remove unused AssertOnFailure

After the previous commit, AssertOnFailure is no longer needed
as a global variable. It can be removed or replaced with DebugOpt
which is what AssertOnFailure was based on in some commands.

DragonFlyBSD — sbin/hammer ondisk.c blockmap.c

sbin/hammer: Remove AssertOnFailure assertion in blockmap lookup

This isn't necessary as blockmap_lookup() callers are going to
check returned offset and/or *errorp value. Callers don't want
blockmap_lookup() to kill the process instantly via errx()
especially when the callers are diagnostic commands like hammer
show or blockmap or checkmap.

This is also the only place where AssertOnFailure needs to be
a global variable. Once this gets removed, other ones can be
removed or changed to local variables.
Delta File
+4 -4 sbin/hammer/ondisk.c
+0 -5 sbin/hammer/blockmap.c
+4 -9 2 files

DragonFlyBSD — sbin/hammer cmd_pfs.c

sbin/hammer: Drop bug fix by 750beaef after 9376f71b

Since ondisk PFS data is no longer degraded or updated,
a bug fix made by 750beaef in 2015 can be removed.
Delta File
+0 -18 sbin/hammer/cmd_pfs.c
+0 -18 1 file

DragonFlyBSD — lib/libexecinfo backtrace.c

lib/libexecinfo: Fix sysctl wrong argument order.

Not fatal, procfs fallback should still work (provided /proc is mounted).
Thus fix and prefer using the KERN_PROC_PATHNAME variant.
Delta File
+2 -2 lib/libexecinfo/backtrace.c
+2 -2 1 file

DragonFlyBSD — usr.bin/sed main.c

sed(1): Fix issue with basename()/dirname() invoke.

Use copies when calling these POSIX functions.

Taken-from: FreeBSD r303047
Delta File
+8 -2 usr.bin/sed/main.c
+8 -2 1 file

DragonFlyBSD — sys/vfs/hammer hammer_disk.h

sys/vfs/hammer: Add comments on filesystem capacity
Delta File
+6 -1 sys/vfs/hammer/hammer_disk.h
+6 -1 1 file

DragonFlyBSD — sys/vfs/hammer hammer_disk.h

sys/vfs/hammer: Integrate ondisk uint32 reserveds into []

Reserved field id's aren't in order from 00 to 11, so keeping them
with id's isn't that important, but rather confusing.

Also remove obsolete comment from ddfdf542 in 2008.
The idea of "birth time" was never explained in neither source nor
commit messages.
Delta File
+2 -8 sys/vfs/hammer/hammer_disk.h
+2 -8 1 file

DragonFlyBSD — include readpassphrase.h, lib/libc/gen readpassphrase.c readpassphrase.3

libc/readpassphrase: Sync with OpenBSD

Mainly for better terminal and signal handling.
Also include few fixes done by FreeBSD.

Taken-from: FreeBSD

DragonFlyBSD — lib/libc/gen arc4random.c

Sync arc4random() with OpenBSD a bit.

Simplify calculation of "2**32 % upper_bound".
While there, perform some stylistic changes.

Taken-from: OpenBSD
Delta File
+16 -32 lib/libc/gen/arc4random.c
+16 -32 1 file

DragonFlyBSD — sys/vfs/msdosfs msdosfs_vnops.c

kernel/msdosfs: Add pathconf(3) support for FILESIZEBITS.
Delta File
+3 -0 sys/vfs/msdosfs/msdosfs_vnops.c
+3 -0 1 file

DragonFlyBSD — sys/vfs/msdosfs msdosfs_vnops.c

kernel/msdosfs: Sort pathconf cases in msdosfs_pathconf().

While here, break a long line.
Delta File
+8 -7 sys/vfs/msdosfs/msdosfs_vnops.c
+8 -7 1 file

DragonFlyBSD — sys/kern vfs_default.c

kernel/vfs: Sort pathconf cases in the default pathconf.
Delta File
+11 -11 sys/kern/vfs_default.c
+11 -11 1 file

DragonFlyBSD — sys/vfs/hammer hammer_ioctl.h

sys/vfs/hammer: Remove unused HAMMER_IOC_PFS_XXX macros

These were added in 5fa5c92f in 2008, but never used.
Delta File
+0 -8 sys/vfs/hammer/hammer_ioctl.h
+0 -8 1 file

DragonFlyBSD — sbin/hammer cmd_pfs.c

sbin/hammer: Don't ioctl(SET_PFS) before attempt to destroy PFS

This is part 1/2 of what's mentioned in below post.
Two ondisk PFS data (deleted PFS followed by undeleted PFS data) will
still appear with this commit, like what's mentioned in below post.
(This comes from HAMMER's flushing mechanism, so it's basically a bad
idea to try to fix it unless it's possible without touching core part
of HAMMER's flusher code, provided that this extra ondisk PFS data
does nothing bad. This may be fixed in the future as part 2/2 patch.)

http://lists.dragonflybsd.org/pipermail/users/2016-August/313004.html

This part 1/2 patch alone is still effective even without part 2/2.

If the PFS is successfully destroyed, the ondisk PFS data written by
ioctl(HAMMERIOC_SET_PSEUDOFS) prior to destroying (which is the code
removed by this commit) gets shadowed by the one with deleted flag,
so no one is to (or no one needs to) access that.

If failed to destroy the PFS, the original ondisk PFS data is restored
using a copy of the original data, so ioctl(HAMMERIOC_SET_PSEUDOFS)
prior to destroying is still unnecessary. Also see 750beaef.
Restoring part by 750beaef could be removed too since the PFS is not
downgraded or updated anymore.
Delta File
+1 -16 sbin/hammer/cmd_pfs.c
+1 -16 1 file

DragonFlyBSD — sbin/hammer cmd_show.c cmd_blockmap.c

sbin/hammer: Remove if(QuietOpt) conditionals in hammer show/checkmap

mostly since it doesn't make much difference anyway.

The only QuietOpt conditional left is for print_record(elm) in
print_btree_elm() which makes amount of output text quite diffrent.
Delta File
+36 -46 sbin/hammer/cmd_show.c
+7 -9 sbin/hammer/cmd_blockmap.c
+43 -55 2 files

DragonFlyBSD — sbin/hammer cmd_show.c

sbin/hammer: Add inode size check to hammer show

Do the same sanity check as what hammer_crc_set|test_leaf()
do in kernel space.
Delta File
+5 -6 sbin/hammer/cmd_show.c
+5 -6 1 file

DragonFlyBSD — sbin/hammer cmd_show.c

sbin/hammer: Minor hammer show cleanups
Delta File
+5 -6 sbin/hammer/cmd_show.c
+5 -6 1 file

DragonFlyBSD — sys/vfs/hammer hammer_object.c hammer_btree.c

sys/vfs/hammer: Fix wrong comment and unnecessary argument

B-Tree code isn't aware of PFS (or other HAMMER record types built
on top of B-Tree) by design. In fact pfsm argument is unused and
no longer necessary after sometime in 2008.

DragonFlyBSD — sbin/hammer hammer.c cmd_remote.c

sbin/hammer: Fix memory leak

strsep moves * by taking **, so the caller need to keep a pointer to strdup'd address.
Delta File
+7 -6 sbin/hammer/hammer.c
+3 -3 sbin/hammer/cmd_remote.c
+10 -9 2 files

DragonFlyBSD — sbin/hammer ondisk.c

sbin/hammer: Refactoring
Delta File
+4 -7 sbin/hammer/ondisk.c
+4 -7 1 file

DragonFlyBSD — sbin/newfs_hammer newfs_hammer.c newfs_hammer.8

sbin/newfs_hammer: Add -h option

DragonFlyBSD — sbin/newfs_hammer newfs_hammer.c

sbin/newfs_hammer: Add exit_code arg to usage()
Delta File
+6 -6 sbin/newfs_hammer/newfs_hammer.c
+6 -6 1 file

DragonFlyBSD — sbin/hammer ondisk.c hammer.h

sbin/hammer: Cleanups

DragonFlyBSD — share/misc pci_vendors

Update the pciconf(8) database.

July 31, 2016 snapshot from http://pciids.sourceforge.net/
Delta File
+31 -7 share/misc/pci_vendors
+31 -7 1 file

DragonFlyBSD — sbin/hammer cache.c hammer.c, sbin/newfs_hammer newfs_hammer.c newfs_hammer.8

sbin/newfs_hammer: Add -C option from hammer(8)

Just to support the same options given that these are both based
on the same volume/buffer structure.

DragonFlyBSD — sys/vfs/hammer hammer_pfs.c

sys/vfs/hammer: Drop redundant error initialization

error is always 0 when it hits here.
(It would have already returned non-zero error otherwise)
Delta File
+1 -2 sys/vfs/hammer/hammer_pfs.c
+1 -2 1 file

DragonFlyBSD — crypto/openssh servconf.c

Unbreak build.

Somehow I forgot to include version.h in the servconf.c change that
appended our DragonFly-specific VersionAddendum to sshd.
Delta File
+1 -0 crypto/openssh/servconf.c
+1 -0 1 file

DragonFlyBSD — crypto/openssh pathnames.h ssh_config.5, secure/usr.bin/ssh Makefile

Patch ssh vendor code for xauth's default location.

This puts the change in one obvious place instead of scattering it
around different Makefiles and makes documention correct.

DragonFlyBSD — crypto/openssh sshd_config sshd_config.5

sshd(8): Disable tunneled cleartext passwords.

This was previously our default that got wiped away when I removed our
local changes to OpenSSH. It's unlikely that anyone running master saw
any change to their sshd behavior, because they likely had the
PasswordAuthentication line uncommented in their configuration file.

DragonFlyBSD — sys/sys errno.h

<sys/errno.h>: Use __BSD_VISIBLE instead of !_POSIX_SOURCE.

_POSIX_SOURCE is no longer set since it was superseded by
_POSIX_C_SOURCE. In other words, #ifndef _POSIX_SOURCE is
always true, unless IEEE Std 1003.1-1988 is explicitly
requested.

While here, clean up the visibility of all errno defines.
Those not mentioned in any standard are __BSD_VISIBLE now.
We can further restrict the standard ones at some later
point.
Delta File
+18 -14 sys/sys/errno.h
+18 -14 1 file

DragonFlyBSD — sys/sys errno.h

<sys/errno.h>: Adjust whitespace (no functional change).
Delta File
+1 -1 sys/sys/errno.h
+1 -1 1 file

DragonFlyBSD — lib/libhammer info.c, sys/vfs/hammer hammer_pfs.c hammer_ioctl.c

sys/vfs/hammer: Rename HAMMERIOC_PFS_ITERATE to HAMMERIOC_SCAN_PSEUDOFS

The name of this ioctl is misleading.
It has nothing to do with iteration, as all it does is a single lookup.
This ioctl is just a variant of the existing HAMMER_IOC_GET_PSEUDOFS
as mentioned in the previous commit.

This commit breaks userspace, and requires buildworld, though it
only affects libhammer and hammer info command. See the previous
commit for justification of doing this.

DragonFlyBSD — lib/libhammer info.c, sys/vfs/hammer hammer_pfs.c hammer_ioctl.h

sys/vfs/hammer: Change/Fix ioctl API for HAMMERIOC_PFS_ITERATE

Rewrite hammer_ioc_iterate_pseudofs() as a proper hammer ioctl.
This commit requires buildworld, but it only affects libhammer and
hammer info command.

This ioctl has had lots of design issues as mentioned in 898f9540
and d8c56f70 in 2015. This ioctl is also just a variant of the
existing HAMMER_IOC_GET_PSEUDOFS which originally existed before
HAMMERIOC_PFS_ITERATE was added.

(It can't be replaced with HAMMER_IOC_GET_PSEUDOFS at the moment,
because of the difference in handling ondisk PFS data with deleted
flag set, but it should be replaced or removed in the future.
This interface is too tightly coupled with libhammer that no one
else really needs this, and there is a way to do the same thing
without using this ioctl. There is also a possible bug that comes
from the way this ioctl and libhammer is assuming about PFS data
with deleted flag set)

This commit breaks userspace that's been directly using this ioctl,
but I doubt anyone has done except for libhammer, as the existence
of such an ioctl has never been mentioned in DragonFly manpages or
other documents. Also note that this ioctl was added for libhammer,
so no one else is likely to really care about it.

DragonFlyBSD — sbin/hammer cmd_snapshot.c

sbin/hammer: Cleanups
Delta File
+0 -3 sbin/hammer/cmd_snapshot.c
+0 -3 1 file

DragonFlyBSD — sbin/hammer hammer.h cmd_cleanup.c

sbin/hammer: Don't include libhammer.h unconditionally

Though /sbin/hammer links to libhammer, only two commands use it.

Move SNAPSHOTS_BASE from cmd_cleanup.c to hammer.h.
This macro is defined in both sbin/hammer and libhammer.
It apparently doesn't need to ask an external library for snapshot location.

 # grep libhammer sbin/hammer sbin/newfs_hammer -rIl
 sbin/hammer/cmd_info.c
 sbin/hammer/cmd_snapshot.c
 sbin/hammer/hammer.h

DragonFlyBSD — sbin/hammer cmd_stats.c

sbin/hammer: Rewrite hammer bstats/iostats

- Detach from libhammer.
- Add sysctls that were missing in libhammer.
- It's simply better and clearer without an external library wrappers
  for hammer command itself to just read hammer sysctls.
Delta File
+124 -47 sbin/hammer/cmd_stats.c
+124 -47 1 file

DragonFlyBSD — sbin/hammer hammer_util.h hammer.h

sbin/hammer: Cleanup sbin/hammer/hammer_util.h

Move externs for global variables from hammer_util.h to hammer.h.
These are either only accessible via /sbin/hammer getopt options,
or only locally used by /sbin/hammer commands.