Sascha Wildner [Wed, 11 Mar 2015 22:15:22 +0000 (23:15 +0100)]
kernel/acpi: Avoid double semicolons.
Sascha Wildner [Wed, 11 Mar 2015 22:15:08 +0000 (23:15 +0100)]
kernel/acpi: Use semicolons in macro invocations.
Sascha Wildner [Wed, 11 Mar 2015 20:47:27 +0000 (21:47 +0100)]
kernel: Use BSD types, not System V types (ulong -> u_long).
Sascha Wildner [Wed, 11 Mar 2015 20:09:12 +0000 (21:09 +0100)]
lvm2: More cleanup (include <unistd.h>, use default CSTD, WARNS = 1).
<unistd.h> is required for some prototypes (getpid(), unlink(), ...).
WARNS?=2 requires some more work.
Sascha Wildner [Wed, 11 Mar 2015 19:35:25 +0000 (20:35 +0100)]
Remove more lvm2 related _XOPEN_SOURCE definitions.
Sascha Wildner [Wed, 11 Mar 2015 17:40:01 +0000 (18:40 +0100)]
<sys/fcntl.h>: Fix comment that I forgot to change.
Sascha Wildner [Wed, 11 Mar 2015 17:16:28 +0000 (18:16 +0100)]
<sys/fcntl.h>: Clean up usage of _POSIX_SOURCE.
Use the normal __BSD_VISIBLE macro instead.
While here, also add some more specific visibility for AT_* and O_NOFOLLOW.
Sascha Wildner [Wed, 11 Mar 2015 17:15:42 +0000 (18:15 +0100)]
<sys/fcntl.h>: Whitespace cleanup. No functional change.
Sascha Wildner [Wed, 11 Mar 2015 17:14:26 +0000 (18:14 +0100)]
lvm2: Stop requiring _XOPEN_SOURCE=700 and use our default environment.
The 'stack' macro conflict was solved by renaming the struct lwp_params
members. That define is really a stupid thing to do. :(
Sascha Wildner [Wed, 11 Mar 2015 17:10:55 +0000 (18:10 +0100)]
<sys/unistd.h>: Rename struct lwp_params member names.
This is mainly to better "protect" them against 3rd party software doing
silly things like lvm2 which has a "#define stack ..." that conflicted
with the struct's 'stack' member, for example. It's a lame reason to
rename the struct members, but, given that it is a public struct, it's
a good thing to do so generally.
Also, because it is a public structure, bump __DragonFly_version so it
can be dealt with in code. I didn't find any usage of our lwp_* code
in dports but it might be used in someone's own code still.
Matthew Dillon [Wed, 11 Mar 2015 06:10:24 +0000 (23:10 -0700)]
gpt - Bump size of the boot partition from 768MB to 1GB
* Bump the default size of the boot partition to 1GB.
Sascha Wildner [Tue, 10 Mar 2015 21:31:02 +0000 (22:31 +0100)]
kernel/acpi: Reduce code duplication with ACPICA.
Use the types which the ACPICA framework provides whereever possible in
our acpi_fadt and acpi_madt code. Since we do not use any actual ACPICA
functions here, this is no problem even for code which (so far) runs
before ACPICA is initialized.
Discussed-with-and-approved-by: sephe
Sascha Wildner [Tue, 10 Mar 2015 21:32:36 +0000 (22:32 +0100)]
make upgrade: Remove more installer stuff if WANT_INSTALLER isn't set.
John Marino [Tue, 10 Mar 2015 14:08:52 +0000 (15:08 +0100)]
make upgrade: Clear out installer files conditionally
Installing DragonFly from an image installer will end up coping the
installer itself to /usr/sbin. This is just cpdup doing what it's told.
The other way these installers could get there is if it's intentionally
built using the WANT_INSTALLER knob. So remove these files if the
WANT_INSTALLER variable is not defined.
suggested-by: swildner
Tomohiro Kusumi [Tue, 10 Mar 2015 11:36:18 +0000 (20:36 +0900)]
sbin/hammer: Remove unnecessary workarond after
f0b930f3
- Revert one of the workarounds made in commit
2f8c6a59 since it's
no longer necessary after commit
f0b930f3 fixed it in filesystem.
- The other workaround in commit
2f8c6a59 (suppress 'd') is
still there as it has nothing to do with mirror_tid fix in
f0b930f3.
Tomohiro Kusumi [Tue, 10 Mar 2015 11:09:36 +0000 (20:09 +0900)]
sys/vfs/hammer: Properly set mirror_tid on root node split
- Set elms[0].internal.mirror_tid of the new root node
after root split.
- Without this commit elms[0].internal.mirror_tid of the new root
node is 0 which is not appropriate given that its children have
non-zero mirror_tid.
- Submit #2801
- Following hammer show results shows difference.
/* the root node right after root split without this commit */
NODE
8000000020801000 cnt=02 p=
0000000000000000 type=I depth=0 mirror
00000001000087a0 fill=z8:65=1% {
G------ ELM 0 L lo=
00000000 obj=
8000000000000000 rt=00 key=
8000000000000000 ot=00
d tids
0000000000000001:
0000000000000001 suboff=
8000000020800000 mirror
0000000000000000
G------ ELM 1 L lo=
00000001 obj=
0000000080000209 rt=01 key=
0000000000000000 ot=00
tids
0000000100008420:
0000000000000000 suboff=
8000000020802000 mirror
00000001000087a0
G------ RBN 2 ? lo=
ffffffff obj=
7fffffffffffffff rt=ffff key=
7fffffffffffffff ot=00
tids
ffffffffffffffff:
0000000000000000 suboff=
0000000000000000 mirror
0000000000000000
}
BM NODE
8000000020800000 cnt=32 p=
8000000020801000 type=L depth=1 mirror
00000001000087a0 fill=z8:65=1%
...
/* the root node right after root split with this commit */
NODE
8000000020801000 cnt=02 p=
0000000000000000 type=I depth=0 mirror
00000001000087a0 fill=z8:65=1% {
G------ ELM 0 L lo=
00000000 obj=
8000000000000000 rt=00 key=
8000000000000000 ot=00
d tids
0000000000000001:
0000000000000001 suboff=
8000000020800000 mirror
00000001000087a0
G------ ELM 1 L lo=
00000001 obj=
0000000080000209 rt=01 key=
0000000000000000 ot=00
tids
0000000100008420:
0000000000000000 suboff=
8000000020802000 mirror
00000001000087a0
G------ RBN 2 ? lo=
ffffffff obj=
7fffffffffffffff rt=ffff key=
7fffffffffffffff ot=00
tids
ffffffffffffffff:
0000000000000000 suboff=
0000000000000000 mirror
0000000000000000
}
NODE
8000000020800000 cnt=32 p=
8000000020801000 type=L depth=1 mirror
00000001000087a0 fill=z8:65=1% {
...
John Marino [Tue, 10 Mar 2015 11:06:09 +0000 (12:06 +0100)]
Remove contrib/sendmail-8.14
The deletion of these source files should complete the removal of
Sendmail from base.
John Marino [Tue, 10 Mar 2015 10:46:07 +0000 (11:46 +0100)]
sendmail transition: Do not pre-generate sendmail.cf
Originally a starter sendmail.cf file was created using the .mc template
files and the m4 files installed from contrib/sendmail-8.14 directory.
This starter sendmail.cf was installed with "make distribution". The
template files were only changed with "make upgrade" (not sure why but
maybe people tried editing them directly) and the Makefile was only
installed once.
This commit accomplishes these things:
* No sendmail.cf or submit.cf file is created. This was the last
user of contrib/sendmail-8.14
* etc/sendmail was altered to just install files
* the README file the was recently placed in libexec/dma was relocated
to etc/sendmail and updated
* the /etc/mail/Makefile is now updated with installworld
* the dragonfl*.mc templates are now updated with installworld
The suggested method to creating /etc/mail/sendmail.cf and
/etc/mail/submit.cf now on a new system is:
1. cd /etc/mail
2. type "make cf"
3. <optional> edit new <hostname>.mc and <hostname>.submit.mc files
4. <optional> type "make cf" again
5. type "make install"
John Marino [Tue, 10 Mar 2015 09:56:40 +0000 (10:56 +0100)]
More sendmail transition work
Several changes were made, including
* set default SENDMAIL_CF_DIR to standard dports location
* add SENDMAIL_CF_DIR to defaults/make.conf
* remove SENDMAIL_CF completely (it wasn't even documented)
* Update dragonfly.mc templates
* Move SENDMAIL_PERMS definition to defaults/make.conf
* change SENDMAIL and MAKEMAP definitions to point to dports locations
* Tweak make.conf.5 man page accordingly
* and other tweaks ...
John Marino [Tue, 10 Mar 2015 08:20:33 +0000 (09:20 +0100)]
make.conf(5): Remove SENDMAIL_SET_USER_ID functionality
This sendmail option has been deprecated and off by default since version
8.12. It is also not supported by dports Sendmail, probably due to its
security risks. It makes no sense anymore, so remove it separately ahead
of additional anticipated base Sendmail changes.
John Marino [Mon, 9 Mar 2015 23:53:02 +0000 (00:53 +0100)]
Remove NO_SENDMAIL and all it masks, except one
The next step in the removal of Sendmail is to remove all the components
that NO_SENDMAIL masked, and then remove the internal NO_SENDMAIL knob
itself.
There is one component that got unmasked though: the etc/sendmail
dragonfl*.mc files. I think we may need to keep building these, and
they require contrib/sendmail-8.14 source files. I'll figure out what
needs to have to remove the contrib directory later.
Matthew Dillon [Tue, 10 Mar 2015 00:09:20 +0000 (17:09 -0700)]
dmsg - Formalize most of the debugging output, cleanup, fix uninit bug
* Macroize and formalize most of the debugging output.
* Add LNK_PING support.
* Fix a bug in kdmsg_iocom_uninit(). The RX thread can stall reading
from the pipe and never wakeup to see the KILLRX flag if no traffic
comes in.
To deal with this kdmsg_iocom_uninit() sends a LNK_PING over the link,
then gives the threads 10 seconds to shutdown nicely. If they do not
the pipe descriptor is not-so-nicely shutdown().
Matthew Dillon [Mon, 9 Mar 2015 22:54:11 +0000 (15:54 -0700)]
hammer - Fix a vsetisdirty() race
* Fix a vsetisdirty() race which can result in a panic by holding a lock
around the operation.
Reported-by: tuxillo
John Marino [Mon, 9 Mar 2015 22:47:37 +0000 (23:47 +0100)]
Give better "Quick" fix for passing Sendmail upgrade check
The original Quick instructions required the administrator to come
back and install the DMA mailer.conf (3 steps). Let's reduce this
to 2 steps which doesn't require a post-upgrade step
John Marino [Mon, 9 Mar 2015 06:33:45 +0000 (07:33 +0100)]
mail(1): call sendmail, not send-mail
There is no actual executable or link to executable named "send-mail".
Somehow the request must be processed by the mailwrapper because tuxillo
reports mail(1) will not function without an entry in mailer.conf.
Rather than fix all the sample mailer.conf files, the installed one, and
the MTA switch instructions, just make mail(1) spawn "sendmail" instead.
This works because send-mail is always an alias for sendmail in
/etc/mail/mailer.conf
Matthew Dillon [Mon, 9 Mar 2015 07:36:18 +0000 (00:36 -0700)]
xdisk - Fix improper EIO
* Fix an issue when xa_strategy() is called when no spans are valid,
but before open_tag could be terminated. This improperly caused the
BIO to fail.
If the BIO is not flagged to allow failures, place the BIO on sc->bioq
when this situation occurs instead of causing it to fail. The BIO will
be requeued when a new span becomes valid.
* With this change a hammer2 mount on a xdisk appears to survive multiple
communications failures without error (i.e. killing the hammer2 service
demon either box, then restarting it).
* Fix a locking panic.
Matthew Dillon [Mon, 9 Mar 2015 04:01:27 +0000 (21:01 -0700)]
xdisk - Reprobe when new SPAN state is available
* Reprobe the disks when new SPAN state is available, in case probes from
prior span states failed (since their I/Os are allowed to fail).
* Add more debugging for now.
Matthew Dillon [Mon, 9 Mar 2015 03:49:31 +0000 (20:49 -0700)]
dmsg - Stabilization work
* Refactor the circuit failure handling code. When a connection is lost
circuits running through that connection and all sub-circuits/states
(recursively) are aborted. This will propagate through the graph and
there are plenty of edge cases where a failure may be propagating in
one direction and a request in the other direction.
The library is responsible for providing missing transaction closures
when circuits and states fail.
* Add code to handle circuit failure races against newly created messages.
The STATE_DYING flag is now inherited by the newly created message from
its parent.
* The state structure on receive is now updated before the callback is
made so it can be atomic with the lock, instead of after.
* Lots of debugging added and some cleanup.
Sascha Wildner [Mon, 9 Mar 2015 02:06:04 +0000 (03:06 +0100)]
kernel: Remove (unhooked) acx(4), bwi(4), iwl(4) and rtw(4).
The first three were written by sephe and rtw(4) was ported from NetBSD
by him. They were all never ported to the newer wlan(4) upgrades we got,
starting with Rui Paulo's back in 2010.
Approved-by: sephe
Antonio Huete Jimenez [Mon, 9 Mar 2015 01:31:31 +0000 (02:31 +0100)]
mailer.conf - Add missing send-mail for dma.
- This allows mail(1) program to send mails again.
John Marino [Sun, 8 Mar 2015 20:09:38 +0000 (21:09 +0100)]
Fix modes and ownership of /etc/mail reinstallable files
The new sample files and old README were being installed with the
wrong permissions and the wrong group ownership. Reset that back
to 644 and standard perms.
John Marino [Sun, 8 Mar 2015 17:44:52 +0000 (18:44 +0100)]
Change /etc/mail/README to update with each make upgrade
Change /etc/mail/README from installing once with make distribution to
also installing the latest version with make upgrade.
John Marino [Sun, 8 Mar 2015 16:25:24 +0000 (17:25 +0100)]
update /etc/mail/README
At this time, it seems README still has some use, so I'll update it a
bit to reflect the port locations of sendmail.
However, this file only installs once ever, so I'll need to convert it
to reinstall which each installworld target to really make it useful.
John Marino [Sun, 8 Mar 2015 16:15:41 +0000 (17:15 +0100)]
Remove /etc/mail/helpfile
This is now installed via dports at:
/usr/local/share/sendmail/helpfile
John Marino [Sun, 8 Mar 2015 14:56:21 +0000 (15:56 +0100)]
installworld: Fix auto-backup of world
The automatic backup of world binaries has been failing for months.
I finally got around to looking at this -- the tar program couldn't be
found, so we have to use the full path (/usr/bin/tar).
John Marino [Sun, 8 Mar 2015 15:30:06 +0000 (16:30 +0100)]
Makefile_upgrade.inc: Remove /usr/share/libg++
This directory was removed from mtree earlier today.
John Marino [Sun, 8 Mar 2015 13:39:12 +0000 (14:39 +0100)]
Fix lack of buildworld and quickworld messages
The "world" target has a nice start/stop message. However, if somebody
chooses to use "make buildworld" followed by "make installworld" rather
than "make world", they get no messages at all. I think this has been an
ongoing oversight.
This commit improves the "world" target messages (e.g. all targets are
ELF so don't need to specify that, and pre/post-world targets are shown.)
More importantly it adds start/complete messages to buildworld, and start
message to installworld. The installworld already had a complete message,
but this was redone to match the format of the other ones.
Similar messages were added to quickworld and realquickworld targets too.
John Marino [Sun, 8 Mar 2015 08:19:57 +0000 (09:19 +0100)]
gcc50: Update to 08 Mar 2015 snapshot (SVN 221261)
John Marino [Sun, 8 Mar 2015 14:08:42 +0000 (15:08 +0100)]
Merge branch 'vendor/GCC50'
John Marino [Sun, 8 Mar 2015 08:16:16 +0000 (09:16 +0100)]
Update gcc-50 to SVN version 221261
Last Changed Date: 2015-03-08 01:16:18 +0100 (Sun, 08 Mar 2015)
François Tigeot [Sun, 8 Mar 2015 09:03:37 +0000 (10:03 +0100)]
drm/i915: Replace kmem_alloc_nofault() by kmap()
As seen on pre-3.7 Linuxes.
François Tigeot [Sun, 8 Mar 2015 08:35:53 +0000 (09:35 +0100)]
drm_gem.c: Start using some drm_mm functions
François Tigeot [Sun, 8 Mar 2015 08:10:05 +0000 (09:10 +0100)]
drm: Reduce diffs with Linux 3.11 in drm_gem.c
* Restore Intel's copyright
* Reorder function definitions
* don't use idr_remove_all()
* No functional changes
John Marino [Sun, 8 Mar 2015 07:04:31 +0000 (08:04 +0100)]
Add entry about Sendmail removal in UPDATING from 4.0
John Marino [Sun, 8 Mar 2015 06:54:44 +0000 (07:54 +0100)]
Remove three empty directories from BSD.usr.dist
Two of these directories are removed by "make upgrade" (sendmail). The
third (libg++) seems that it's just been overlooked forever. It was
probably used for gcc prior to version 4.1. In any case, it's not used
now.
François Tigeot [Sun, 8 Mar 2015 07:23:22 +0000 (08:23 +0100)]
drm: Add asm/barrier.h
François Tigeot [Sun, 8 Mar 2015 07:21:36 +0000 (08:21 +0100)]
drm: Add barrier()
John Marino [Sat, 7 Mar 2015 23:45:13 +0000 (00:45 +0100)]
Effectively remove sendmail from base
The NO_SENDMAIL build knob has been hardwired in sys.mk, so it is not
possible for it to be unset by /etc/make.conf. This effectively prevents
sendmail from building.
A new check was added to "make upgrade" target to make sure the current
/etc/mail/mailer.conf is not configured to use the base sendmail as the
MTA. If it fails the check, the upgrade will fail before it starts.
Directions are given hot to fix the problem in the error message. A
successful check results in the sendmail-related binaries getting removed
from the system.
Finally, NO_SENDMAIL has been removed from the default make.conf and it's
man page.
The actual sendmail makefiles and source remain for now. Once it is
confirmed that transition is working and dma is functioning well as a
replacement, sendmail and the NO_SENDMAIL conditions will be removed
permanently, along with modifying the mtree files.
Approved-by: dillon
Tomohiro Kusumi [Sat, 7 Mar 2015 22:46:49 +0000 (07:46 +0900)]
sys/vfs/hammer: Fix and add comments on btree
- hunk1-2: These two seem to be old ones. At this point *node is
a pointer to cursor->node->ondisk which is not invalid or stale.
- hunk3: This isn't necessary since now this function just returns
EINVAL if the cursor's node is internal. It didn't have this check
when this comment was written.
- hunk4: It's hammer_btree_lookup() that could return ENOSPC when
no space is available, but not this function. Moving this comment
to the previous paragraph makes better sense.
- hunk5: Leaf nodes have no idea of boundaries to start with so
replace it with the comment being used in hammer_btree_delete()
which also deals with bcopy() of elements.
- hunk6: Fix a typo.
- hunk7: Refer to a leaf node's count in addition to internal node.
John Marino [Sat, 7 Mar 2015 19:37:38 +0000 (20:37 +0100)]
/etc/mail: Install 4 sample mailer.conf files
These files have been recently referenced in the DragonFly handbook.
They are here to allow quick reconfiguration of the Mail Transfer Agent.
For example, if Postfix from DPorts is desired, all one needs to do is
copy /etc/mail/mailer.conf.postfix to /etc/mail/mailer.conf and reboot
(assuming postfix configuration files are already in place).
This provides default MTA configurations for dma (base), postfix,
sendmail, and and opensmtpd.
John Marino [Sat, 7 Mar 2015 19:34:27 +0000 (20:34 +0100)]
periodic.conf(5): Adjust for dma as MTA in default conf
The DragonFly Mail Agent can't support daily_clean_hoststat and
daily_submit_queuerun, so disable these periodic scripts by default.
John Marino [Sat, 7 Mar 2015 19:08:26 +0000 (20:08 +0100)]
Switch default MTA from sendmail to dma
The mailwrapper controls which Mail Transfer Agent is used. The
mailer.conf defines the behavior of the mailwrapper. This commit will
have no effect on existing installations, but for the first installation
a new mailer.conf will be installed during the "distribution" target.
This means all new images have the DragonFly Mail Agent acting as base
MTA rather than Sendmail for the first time in the project's history.
While here, set the default path in the mail wrapper to dma as well,
although this isn't used unless the mailer.conf is incomplete.
John Marino [Sat, 7 Mar 2015 18:53:38 +0000 (19:53 +0100)]
make.conf(5): Remove NO_MAILWRAPPER build option
I doubt DragonFly mail system would even function properly if somebody
actually set NO_MAILWRAPPER in make.conf. In preparation for the removal
of sendmail from base, removing the mailwrapper is not feasible. This
wrapper is needed to support replacing the base MTA with one from ports.
There must have been a need for NO_MAILWRAPPER in the past, but I can't
see any purpose it could serve now.
Tomohiro Kusumi [Sat, 7 Mar 2015 09:02:54 +0000 (18:02 +0900)]
sys/vfs/hammer: Fix hammer_debug_btree print format
- hunk1 - Print current thread variable address like
hammer_btree_iterate() does.
- hunk2,3 - Add 'R' since hammer_btree_iterate() and
hammer_btree_iterate_reverse() had the exact same format.
- hunk4 - Minor cleanup to align with other btree debug prints.
- hunk5 - Need another space to align with other btree debug prints.
Tomohiro Kusumi [Sat, 7 Mar 2015 08:52:30 +0000 (17:52 +0900)]
sys/vfs/hammer: Fix hammer_debug_btree print format
- Use the same format as ones from btree_search() (add "key=")
for better readability.
Sascha Wildner [Sat, 7 Mar 2015 01:03:05 +0000 (02:03 +0100)]
kernel/vfs: Move prtactive variable to vfs_subr.c
It is not UFS specific.
Tomohiro Kusumi [Thu, 5 Mar 2015 19:42:08 +0000 (04:42 +0900)]
sbin/hammer: Print '>' or '<' if the element is a copy of root_btree_(beg|end)
- Make hammer show command print '>' or '<' if the element is a copy
of hmp->root_btree_beg or hmp->root_btree_end. These two elements
don't need 'd' so print it in place of 'd'.
- Makes it easier to find (grep) these two.
Tomohiro Kusumi [Thu, 5 Mar 2015 19:23:32 +0000 (04:23 +0900)]
sbin/hammer: Fix workaround made in
2f8c6a59
- 'elm->internal.mirror_tid == 0' was not necessary.
It failed to detect some cases that it was going to workaround.
Sascha Wildner [Thu, 5 Mar 2015 17:54:02 +0000 (18:54 +0100)]
rwho(1): Let the width of the username column depend on the file format.
We're parsing files generated by rwhod(8) here, not utmp(5) files.
This is FreeBSD's r200997.
Tomohiro Kusumi [Wed, 4 Mar 2015 19:10:33 +0000 (04:10 +0900)]
sys/vfs/hammer: Fix and add comments on btree boundaries
- Some comments on btree left/right boundaries are not up-to-date
with the code or seem to need another line to make things clear.
Sascha Wildner [Wed, 4 Mar 2015 09:08:00 +0000 (10:08 +0100)]
nrelease: Revert a small part of
255a0279ad1443d3bf326878835b3ea5721b2f33
This was causing git to be no longer installed.
Reported-by: Vitaly Shevtsov <loki.vt@gmail.com>
Sascha Wildner [Tue, 3 Mar 2015 20:38:04 +0000 (21:38 +0100)]
installer: Remove some more initrd creation code.
After my revert, this original mkinitrd code (for encrypted setup
originally) came back. Since we can now rely on the ISO having an
initrd to be installed already, we can remove this too.
Sascha Wildner [Tue, 3 Mar 2015 20:19:09 +0000 (21:19 +0100)]
nrelease: Solve the initial initrd creation better.
Hard links in cd9660, while not taking up more space in the ISO or on
the CD, all have distinct inode numbers, which causes them to be treated
like individual files when copying them somewhere. This caused the initrd
to overflow when we built it from the installer after booting from the
ISO.
This commit puts initrd creation into the nrelease process instead, making
use of mkinitrd(8)'s -c option which allows us to override the contents
directory to the ${ISOROOT}'s /usr/share/initrd.
Reported-by: opvalues
Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/2798>
Sascha Wildner [Tue, 3 Mar 2015 20:11:39 +0000 (21:11 +0100)]
mkinitrd(8): Add a -c option to override the contents directory.
Sascha Wildner [Tue, 3 Mar 2015 18:15:20 +0000 (19:15 +0100)]
Revert "installer: Create an initial initrd unconditionally."
This reverts commit
0c69777ed12f9dff4a80f46f9ef730837791cf33.
Due to shortcomings of the CD9660 filesystems, hardlinks end up
having different inode numbers on it, which leads to them being
treated like separate files when copying etc.
As a result, the initrd put together by mkinitrd from a CD9660
would end up being around 230MB large where it actually has to
be below 15MB.
We will solve this in nrelease instead, putting together the
initrd from the building machine.
Sascha Wildner [Tue, 3 Mar 2015 17:28:56 +0000 (18:28 +0100)]
nrelease: Remove an unneeded comma.
Matthew Dillon [Tue, 3 Mar 2015 06:32:12 +0000 (22:32 -0800)]
hammer2 - Fix a few assertion panics and other bugs
* hammer2_io_getblk() was referencing a dio potentially after disposing
of it.
* Remove the DIO_GOOD patch I previously committed, replacing it with
a different (better) fix for the DIO_GOOD/DIO_INPROG race.
The new fix is to run the iocb chains on IO completion before marking
any of the iocbs done, using a simple depth-first recursion. INPROG
is cleared on the last iocb chain so all IOCB_DONE's occur after it
has been cleared.
* iocb->flags must be modified with atomic ops now.
Matthew Dillon [Tue, 3 Mar 2015 06:21:23 +0000 (22:21 -0800)]
dmsg - Stabilization work
* Add a refs field to dmsg_state and kdmsg_state for retention and
disposal.
* Separate out the tracking of state->subq and the state RB trees.
* Greatly simplify the iocom shutdown code and functions related
to handling communications failures. When iterating states for
shutdown, which requires simulating a received failure message,
we can now simply iterate via state->subq.
* Greatly simplify how the simulated failures are generated and
handled (See dmsg_msg_simulate_failure()). This is probably the
most complex part of the library.
* Fix a memory leak in kern_dmsg.c.
* Replace xdisk's per-softc token with a lockmgr lock. Atomicy
has to be guaranteed across blocking conditions in certain cases
and it was easier to simply use a lock for everything.
Cleanup the locking.
* Ripout the shutdown check in the I/O path, which can deadlock
the disk management threads. This will need to be revisited
as it means that /dev/xa* and /dev/serno* devices remain in
/dev after a link failure even when there are no opens on the
device.
* Add the B_FAILONDIS flag to struct buf. This flag allows the disk
probe code to tell xdisk that it is ok for the I/O to fail, allowing
xdisk to discard I/Os that would otherwise block or deadlock the
disk probe code when the related network connection is lost.
Matthew Dillon [Tue, 3 Mar 2015 02:43:32 +0000 (18:43 -0800)]
dmesg - Fix <> console parsing for first line
* If the first string in the buffer is a console string, the normal dmesg
was not filtering it out due to the initial state of (newl).
Matthew Dillon [Tue, 3 Mar 2015 02:40:21 +0000 (18:40 -0800)]
kernel - Refactor the kernel message buffer code (2)
* Fix an edge case, the sysctl was not working properly when the msgbuf
was completely empty. Generate a single newline output.
* Also if dmesg gets a msgbuf size of 0, allocate at least 1 byte to
avoid a malloc failure.
Matthew Dillon [Tue, 3 Mar 2015 01:55:51 +0000 (17:55 -0800)]
kernel - Refactor the kernel message buffer code
* Add a separate tracking index for /dev/klog (syslog) so it does not eat
the base index for the in-memory buffer.
* Change the way the FIFO indexes work. The indexes are no longer stored
as modulo size values. Instead they are simply adjusted without a modulo,
making calculations easier.
* When the FIFO is full we now add around ~1KB of slop to reduce instances
where SMP collisions implode the buffer. This also required adjusting
the kern.msgbuf sysctl to avoid dumping the 'slop' area (it used to just
dump the entire buffer).
* Adjust dmesg to operate more consistently, and to modulo the indices when
making calculations.
* The dmesg -a option now dumps the <num> prefix for syslog / console output
messages. Before it tried to strip them out, which created problems in
distinguishing kprintf()d output from syslog output.
* Adjust the console tty support thread (which copies the dmesg buffer to the
console) as well as /dev/klog to use the new index methodology.
* It is now possible for the indexes to wrap the buffer multiple times
(between e.g. bufl and bufx), and it obviously makes no sense to try to
dump the overwritten data over and over again, so if indexes get totally
out of whack we reset bufr and bufl as needed to the size of the buffer.
Sepherosa Ziehau [Mon, 2 Mar 2015 14:36:36 +0000 (22:36 +0800)]
ifnet: Make rest of ifnet accessing MPSAFE
Sepherosa Ziehau [Mon, 2 Mar 2015 13:43:17 +0000 (21:43 +0800)]
acpi/pstate: Ignore inconsistent PSS table
Some BIOSes create different PSS tables; just trust the one from the
BSP and move on.
Tested-by: Markus Pfeiffer
Tomohiro Kusumi [Mon, 2 Mar 2015 16:32:05 +0000 (01:32 +0900)]
sbin/hammer: Don't show irrelevant "BM" and "d" after root split
- Make hammer show command suppress irrelevant outputs
"BM NODE ..." and "d tids ..." after splitting the root node.
- When splitting the root node HAMMER uses a copy of predefined special
node element that has static member values (regardless of other nodes
within the btree). After the split, this predefined special element
will be elms[0] of the (new)root node that has a pointer to the old
root node as its current child.
- However this elms[0] always has 0 for internal.mirror_tid and 1 for
base.delete_tid (till it's updated) which results hammer show command
showing unnecessary "BM" and "d". This commit suppress "BM" that
doesn't actually indicate invalid mirror tid, and suppress "d" that
doesn't indicate actual delete as following diff of two results shows.
22c22
< d tids
0000000000000001:
0000000000000001 suboff=
8000000020800000 mirror
0000000000000000
---
> tids
0000000000000001:
0000000000000001 suboff=
8000000020800000 mirror
0000000000000000
46c46
< BM NODE
8000000020800000 cnt=43 p=
8000000020801000 type=L depth=1 mirror
0000000100098160 fill=z8:65=1% {
---
> NODE
8000000020800000 cnt=43 p=
8000000020801000 type=L depth=1 mirror
0000000100098160 fill=z8:65=1% {
Antonio Huete Jimenez [Mon, 2 Mar 2015 16:03:31 +0000 (17:03 +0100)]
sbin/hammer - Change verbose level for showing data records.
- Also fix missing braces.
Suggested-by: tkusumi
Antonio Huete Jimenez [Mon, 2 Mar 2015 15:46:30 +0000 (16:46 +0100)]
sbin/hammer - Hex data dump for misc & data records
- Under request of very verbose output, provide an hex
dump for data, db and ext records.
- This is very useful for debugging.
Antonio Huete Jimenez [Mon, 2 Mar 2015 14:52:57 +0000 (15:52 +0100)]
sbin/hammer - Properly indent config text on 'show' output
John Marino [Mon, 2 Mar 2015 13:45:55 +0000 (14:45 +0100)]
dma(8): install default conf files with installworld
Previously dma configure files were only installed with the
"make distribution" command. Additionally, the user was expected to
modify them as opposed to copies of them. This is probably why there
were part of distribution, in order to avoid overwriting the dma.conf
and auth.conf.
The negative side to this approach is that updated *.conf sample files
would never be installed. Since the dma.conf is actually completely
commented out, and since it doesn't fail in the absence of dma.conf,
these files aren't actually needed.
This commit installs /etc/dma/dma.conf.sample and /etc/dma/auth.conf.sample
files during installworld instead. Future updates to the *.conf.sample
files will overwrite them, but obviously /etc/dma/*.conf will not be
touched. Some of the sendfile conf files are provided as .sample, so the
concept is not new for DragonFly.
John Marino [Mon, 2 Mar 2015 12:50:47 +0000 (13:50 +0100)]
dma(8): remove unused virtusetable
This was intended to be template file for the VIRTUAL option in dma,
but it appears this option was never implemented, nor was this file
ever installed. Remove it.
John Marino [Mon, 2 Mar 2015 10:44:02 +0000 (11:44 +0100)]
dma(8): Sync with upstream (22 SEP 2014)
There is only one substantial change: improving mail input format error
message. The remain changes are email address, copyright years, etc.
While here, document which files have local modifications by adding a
README.DRAGONFLY file
Sepherosa Ziehau [Wed, 18 Feb 2015 13:01:15 +0000 (21:01 +0800)]
ifnet: Make blocking operation in if_addrheads iteration MPSAFE
Two methods are used:
- Dispatch blocking operation in if_addrheads iteration to netisr0
to run for functions which do not copy data into user space.
- Use ifaddr marker to make sure that the ifaddr list is not broken
if the ifaddr list is changed during the blocking operation. And
reference the ifaddr being used so it will not be destroyed during
the blocking operation.
Matthew Dillon [Mon, 2 Mar 2015 01:01:22 +0000 (17:01 -0800)]
dmesg - Add -n dumpnr option
* Add the -n option to specify a kernel core dump number, similar to
how kgdb works, as a convenience so you don't have to write out the
long -M and -N options.
Matthew Dillon [Sun, 1 Mar 2015 19:46:12 +0000 (11:46 -0800)]
hammer2 - Fix DIO_INPROG race.
* It is possible when a chained DIO_INPROG is present for the DIO to become
GOOD and for the dio->refs ref to be release, but not yet have finished
its INPROG processing due to the chaining.
In this situation, a temporary user of the DIO will get/put it and hit
an important sanity assertion in putblk.
* Fix by disallowing the DIO_GOOD shortcut in hammer2_io_getblk() if the
DIO is still DIO_INPROG.
Matthew Dillon [Sun, 1 Mar 2015 19:44:35 +0000 (11:44 -0800)]
xdisk - Flesh out support
* Add libdevstat support so 'xa' devices can report meaningful
data in systat -vm.
* Add sysctls to track active requests.
Matthew Dillon [Sun, 1 Mar 2015 19:41:41 +0000 (11:41 -0800)]
kernel - work on dmsg disk exports
* Refactor and clean up the kdmsg thread cleanup code.
* Add a workaround for a possible tx/rx race which can occur due to the
transmit side not retiring the kdmsg until after writing it. This can
potentially block and allow a received response to be processed before the
related transmitted kdmsg is cleaned up.
* Add sysctls to track operations in progress.
* Code documentation.
Matthew Dillon [Sun, 1 Mar 2015 19:40:13 +0000 (11:40 -0800)]
libdevstat - add "xa"
* Add a match line for "xa" (xdisk) devices.
Matthew Dillon [Sun, 1 Mar 2015 19:37:53 +0000 (11:37 -0800)]
libdmsg - Fix incomplete write bug
* Fix a bug where a partial non-blocking write of encrypted data does not
properly set the WREQ flag if the related dmsg has been disposed of.
This could cause random stalls of the link.
* Fix an errno-handling bug.
* Cleanup and debugging.
François Tigeot [Sun, 1 Mar 2015 17:36:41 +0000 (18:36 +0100)]
Revert "drm/i915: Sync i915_gem_pwrite_ioctl() with Linux 3.11"
This reverts commit
005b6ef6b6adc0554079d13443c56f48766e8afc.
It breaks Ironlake.
John Marino [Sun, 1 Mar 2015 15:14:24 +0000 (16:14 +0100)]
libedit: Add bapt patches to improve unicode
On Jan 9, bapt synced FreeBSD-current with the latest libedit from NetBSD.
After that, he added local patches to fix line reading in a unicode
environment. Specifically it allowed sh(1) to work in UTF-8 environment.
I appreciate that bapt took the time to identify those patches for the
benefit of DragonFly. Thanks!
Sascha Wildner [Sun, 1 Mar 2015 11:37:15 +0000 (12:37 +0100)]
kernel/radeon: Remove an unused GPLv2 only file.
Its contents are not used by our current radeon code (the functions
end up being defined as empty inlines in radeon_drv.c) and seems to
be the only file in Linux' radeon driver that is not MIT licensed.
So remove it.
In-discussion-with: ftigeot
François Tigeot [Sun, 1 Mar 2015 10:46:09 +0000 (11:46 +0100)]
drm/i915: Sync i915_gem_pwrite_ioctl() with Linux 3.11
François Tigeot [Sun, 1 Mar 2015 10:19:57 +0000 (11:19 +0100)]
drm/i915: i915_gem_pager_fault() is i915_gem_fault()
François Tigeot [Sun, 1 Mar 2015 10:13:52 +0000 (11:13 +0100)]
drm: Implement linux/io-mapping.h
Tomohiro Kusumi [Sat, 28 Feb 2015 20:06:01 +0000 (05:06 +0900)]
sbin/hammer: Don't show FLAG_BADMIRRORTID for root node in certain corner case situation
- Make hammer show command stop showwing an error flag regarding
mirror tid that isn't actually an error.
- newfs_hammer initializes the root node's mirror_tid with 0 along
with its first two elements, but this mirror_tid is not updated
till the third element is allocated (by creating a file, etc).
Following result shows this situation.
- In this situation the root node's node->mirror_tid (==0) being
smaller than elm->base.create_tid or elm->base.delete_tid is not
an error. This only happens on the root node because all the other
nodes get updated when they split from existing ones.
NODE
8000000020800000 cnt=02 p=
0000000000000000 type=L depth=0 mirror
0000000000000000 fill=z8:65=1% {
B-----M ELM 0 R lo=
00000001 obj=
0000000000000001 rt=01 key=
0000000000000000 ot=01
tids
0000000100000001:
0000000000000000
<snip>
B-----M ELM 1 R lo=
00000002 obj=
0000000000000001 rt=15 key=
0000000000000000 ot=00
tids
0000000100000001:
0000000000000000
<snip>
}
Tomohiro Kusumi [Fri, 27 Feb 2015 11:45:22 +0000 (20:45 +0900)]
sbin/hammer: Rename static function print_elm_flags() to get_elm_flags()
- print_elm_flags() doesn't print anything.
Sascha Wildner [Sat, 28 Feb 2015 20:31:02 +0000 (21:31 +0100)]
kernel: Mark sigexit() and cpu_halt() as not returning.
Sascha Wildner [Sat, 28 Feb 2015 19:59:36 +0000 (20:59 +0100)]
kernel/netinet6: Remove some bogus checks for KERNEL (use just _KERNEL).
Sascha Wildner [Sat, 28 Feb 2015 19:55:30 +0000 (20:55 +0100)]
kernel/scsi: Fix sense information printing in bootverbose.
François Tigeot [Sat, 28 Feb 2015 10:48:43 +0000 (11:48 +0100)]
drm/i915: Sync i915_gem.c with Linux 3.11
* Make the GEM code more similar to Linux
* Replace i915_gem_shmem_pread() by the OpenBSD implementation
(i915_gem.c revision 1.85)
* The rest of the changed code is based on Linux 3.11
Matthew Dillon [Sat, 28 Feb 2015 18:06:14 +0000 (10:06 -0800)]
hammer2 - Add extra debugging
* Enable DMsgDebugOpt if -d is specified twice.