History log of /freebsd-current/sbin/hastd/hooks.c
Revision Date Author Comments
# 32e86a82 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sbin: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# b95a6ecf 09-Apr-2022 Gordon Bergling <gbe@FreeBSD.org>

hastd(8): Fix a typo in a source code comment

- s/proccesses/processes/

MFC after: 3 days


# 1de7b4b8 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.


# e33d251e 01-May-2016 Ed Schouten <ed@FreeBSD.org>

Remove useless calls to basename().

There are a couple of places in the source three where we call
basename() on constant strings. This is bad, because the prototype
standardized by POSIX allows the implementation to use its argument as a
storage buffer.

This change eliminates some of these unportable calls to basename() in
cases where it was only added for cosmetical reasons, namely to trim
argv[0]. There's nothing wrong with setting argv[0] to the full path.

Reviewed by: jilles
Differential Revision: https://reviews.freebsd.org/D6093


# 2b1b224d 10-Jan-2012 Pawel Jakub Dawidek <pjd@FreeBSD.org>

For functions that return -1 on failure check exactly for -1 and not for
any negative number.

MFC after: 3 days


# adf8002b 27-Sep-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Use PJDLOG_ASSERT() and PJDLOG_ABORT() everywhere instead of assert().

MFC after: 3 days


# 2b5ad0e0 21-Mar-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Increase debug level of "Checking hooks." message.

MFC after: 1 week


# 1884f6bb 21-Mar-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Log when we start hooks checking and when we execute a hook.

MFC after: 1 week


# 8a8763b7 21-Mar-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Use snprlcat() instead of two strlcat(3)s.

MFC after: 1 week


# ac7b0b09 12-Jan-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

execve(2), not fork(2) resets signal handler to the default value (if it isn't
ignored). Correct comment talking about that.

Pointed out by: kib
MFC after: 3 days


# bcaa0b67 12-Jan-2011 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Add a note that when custom signal handler is installed for a signal,
signal action is restored to default in child after fork(2).
In this case there is no need to do anything with dummy SIGCHLD handler,
because after fork(2) it will be automatically reverted to SIG_IGN.

Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com
MFC after: 3 days


# 6c71649c 20-Oct-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Use closefrom(2) instead of close(2) in a loop.

MFC after: 1 week


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# c0a124e6 16-Oct-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Clear signal mask before executing a hook.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>
MFC after: 3 days


# 5f24b330 04-Oct-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

hook_check() is now only used to report about long-running hooks, so the
argument is redundant, remove it.

MFC after: 3 days


# b71de2e0 26-Sep-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Plug memory leak on fork(2) failure.

Submitted by: Mikolaj Golub <to.my.trociny@gmail.com>
MFC after: 3 days


# 25ec2e3e 29-Aug-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

- Add hook_fini() which should be called after fork() from the main hastd
process, once it start to use hooks.
- Add hook_check_one() in case the caller expects different child processes
and once it can recognize it, it will pass pid and status to hook_check_one().

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com


# 1cdaf10c 27-Aug-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

- Run hooks in background - don't block waiting for them to finish.
- Keep all hooks we're running in a global list, so we can report when
they finish and also report when they are running for too long.

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com


# e64887c4 27-Aug-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

When logging to stdout/stderr don't close those descriptors after fork().

MFC after: 2 weeks
Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com


# 2b98f840 18-Apr-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

MFC r204076,r204077,r204083,r205279:

r204076:

Please welcome HAST - Highly Avalable Storage.

HAST allows to transparently store data on two physically separated machines
connected over the TCP/IP network. HAST works in Primary-Secondary
(Master-Backup, Master-Slave) configuration, which means that only one of the
cluster nodes can be active at any given time. Only Primary node is able to
handle I/O requests to HAST-managed devices. Currently HAST is limited to two
cluster nodes in total.

HAST operates on block level - it provides disk-like devices in /dev/hast/
directory for use by file systems and/or applications. Working on block level
makes it transparent for file systems and applications. There in no difference
between using HAST-provided device and raw disk, partition, etc. All of them
are just regular GEOM providers in FreeBSD.

For more information please consult hastd(8), hastctl(8) and hast.conf(5)
manual pages, as well as http://wiki.FreeBSD.org/HAST.

Sponsored by: FreeBSD Foundation
Sponsored by: OMCnet Internet Service GmbH
Sponsored by: TransIP BV

r204077:

Remove some lines left over by accident.

r204083:

Add missing KEYWORD line.

Pointed out by: dougb

r205279 sys:

Simplify loops.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# 32115b10 18-Feb-2010 Pawel Jakub Dawidek <pjd@FreeBSD.org>

Please welcome HAST - Highly Avalable Storage.

HAST allows to transparently store data on two physically separated machines
connected over the TCP/IP network. HAST works in Primary-Secondary
(Master-Backup, Master-Slave) configuration, which means that only one of the
cluster nodes can be active at any given time. Only Primary node is able to
handle I/O requests to HAST-managed devices. Currently HAST is limited to two
cluster nodes in total.

HAST operates on block level - it provides disk-like devices in /dev/hast/
directory for use by file systems and/or applications. Working on block level
makes it transparent for file systems and applications. There in no difference
between using HAST-provided device and raw disk, partition, etc. All of them
are just regular GEOM providers in FreeBSD.

For more information please consult hastd(8), hastctl(8) and hast.conf(5)
manual pages, as well as http://wiki.FreeBSD.org/HAST.

Sponsored by: FreeBSD Foundation
Sponsored by: OMCnet Internet Service GmbH
Sponsored by: TransIP BV