Matthew Dillon [Tue, 28 Feb 2012 05:22:53 +0000]
hammer2 - more indirect block work, add advlock
* Fix several bugs in the indirect block code. Directories and files should
both now be able to expand properly. Except for an excessive dirty buffer
buildup (see 'bawrite' below), we can now create regular files linearly
and create sub-directory trees. e.g. cpdup is starting to show results.
* Fix an issue with readdir related to how ranged searches work (results
can be returned in any order within the range). Do a direct lookup of
the key before resorting to a range. Until we sort the keys this is not
going to work correctly in the face of concurrent deletions.
* Try conditionalizing bawrite() vs bdwrite() in the flush code, but there
are still major issues when NFS is used to back a VN device for testing
which can deadlock the system.
* Remove or conditionalize a bunch of debugging kprintfs.
Matthew Dillon [Mon, 27 Feb 2012 23:31:37 +0000]
hammer2 - More indirect block work & test script work
* Correct strategy read and bmap offset calculations to allow for arbitrary
differences between logical and physical block sizes. This fixes data
read-back issues past the first 16K of data.
* Correct a panic related to the use of an unlocked chain in the lookup
code when indirect blocks have to be recursed through.
* Add vop_getpages/vop_putpages -> stdgetpages/stdputpages.
* Minor reordering for correctness.
* Adjust test scripts to be a bit smarter, adjust debugging kprintf()s
Matthew Dillon [Mon, 27 Feb 2012 23:31:14 +0000]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2
Alex Hornung [Mon, 27 Feb 2012 21:56:41 +0000]
vn - use DSO_RAWPSIZE flag
* Use the DSO_RAWPSIZE flag so that the disk subsystem uses vn's own
psize when the top level fails.
* This allows the use of vn disks as swap.
Reported-by: Antonio Huete (tuxillo@)
Alex Hornung [Mon, 27 Feb 2012 21:54:09 +0000]
disk - add flag to use underlying psize
* If the top (disk subsystem) psize fails, try again with the
underlying raw device psize if the DSO_RAWPSIZE flag is set for the
disk.
* This allows for disk devices and slices without a proper disklabel to
return a correct psize, which in turn allows the device to be used
for swap.
* Previously that behaviour was integrated with the DSO_DEVICEMAPPER
flag.
Matthew Dillon [Mon, 27 Feb 2012 21:56:04 +0000]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2
Sascha Wildner [Mon, 27 Feb 2012 19:52:26 +0000]
uguru(4): Fix a panic when detaching (e.g., on kldunload).
Reported-by: Max Herrgard <herrgard@gmail.com>
Matthew Dillon [Mon, 27 Feb 2012 19:29:49 +0000]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2
Alex Hornung [Mon, 27 Feb 2012 16:47:56 +0000]
vnconfig - use correct device if using autoclone
* if autoclone device (/dev/vn) is used in vnconfig, the wrong device
is later passed to, e.g., swapon().
* Fix it by changing the device name the rest of vnconfig
operates on to the actual device name as per fdevname.
Reported-by: tuxillo
Alex Hornung [Mon, 27 Feb 2012 12:53:38 +0000]
subr_disk - clear out old labels
* Whenever a label is blown out and we reprobe, make sure we also clean
the in-memory disklabel inside the diskslice - otherwise dscheck()
will think that there's still an old disklabel around.
* This fixes changing the disklabel from disklabel64 to disklabel32 and
vice versa without rebooting.
Dragonfly-bug: http://bugs.dragonflybsd.org/issue1667
Reported-by: Thomas Nikolajsen
Alex Hornung [Mon, 27 Feb 2012 12:52:08 +0000]
disklabel - add new freedisklabel op
* The freedisklabel op is simply used to free the disklabel stored in a
disklabel_t (in a diskslice).
* It deallocates the memory and sets the pointer to NULL.
Sascha Wildner [Sun, 26 Feb 2012 16:49:48 +0000]
kernel: Regenerate pcidevs.h and pcidevs_data.h.
Sascha Wildner [Sun, 26 Feb 2012 16:49:12 +0000]
kernel/pcidevs: Shrink it down to what we actually need from it.
Sascha Wildner [Sun, 26 Feb 2012 15:14:08 +0000]
kernel: Move a de(4) specific header file where it belongs.
Sepherosa Ziehau [Sun, 26 Feb 2012 14:02:27 +0000]
netif: Use ether_ioctl() to handle SIOCSIFADDR
DragonFly's SIOCSIFADDR handling in ether_ioctl() already has unnecessary
if_init avoidance processing; no need to reinvent the wheel
Sepherosa Ziehau [Sun, 26 Feb 2012 13:53:53 +0000]
e1000: Remove em specific files, which are not and will not be used
Sascha Wildner [Sun, 26 Feb 2012 13:39:01 +0000]
kernel/pci: Fix indent.
Sascha Wildner [Sun, 26 Feb 2012 13:27:45 +0000]
kernel/pci: Fix the securelevel check in pci_open() for write access.
While here, clean up some unused code and definitions.
Sascha Wildner [Sat, 25 Feb 2012 23:11:51 +0000]
dm_target_crypt.4: Remove trailing whitespace.
Alex Hornung [Sat, 25 Feb 2012 19:27:41 +0000]
puffs - fix possible null pointer dereference
Found-by: clang static analyzer
Sascha Wildner [Sat, 25 Feb 2012 19:08:02 +0000]
puffs: Install some headers and remove now unnecessary -I's in Makefiles.
Sascha Wildner [Sat, 25 Feb 2012 14:14:46 +0000]
kernel/i386: Remove the empty CPU_HAS_FXSR kernel option.
Sepherosa Ziehau [Sat, 25 Feb 2012 12:31:26 +0000]
vlan: Add comment about how MPSAFE works out for vlan
Sepherosa Ziehau [Sat, 25 Feb 2012 11:08:33 +0000]
vlan: Fix the incorrect logic
It should speak that parent interface is gone or parent interface
was changed.
Alex Hornung [Sat, 25 Feb 2012 08:48:58 +0000]
rdrand.4 - add warning about being untested
Alex Hornung [Sat, 25 Feb 2012 08:32:59 +0000]
rdrand.4 - add man page
Alex Hornung [Sat, 25 Feb 2012 08:23:43 +0000]
LINT{,64} - add rdrand
Alex Hornung [Sat, 25 Feb 2012 08:21:48 +0000]
rdrand - An RNG driver for the RdRand insn
* The driver is as of yet untested as the hardware is not yet
available!
John Marino [Fri, 24 Feb 2012 17:50:25 +0000]
build: Add WORLD_LDVER (similar to WORLD_CCVER)
This enables building world and kernel with the gold linker, and the
result is finally fully bootable and functional.
John Marino [Fri, 24 Feb 2012 17:43:56 +0000]
objformat: Recognize LDVER instead of LINKERVER
An informal discussion on IRC revealed that the environment variable
LDVER is preferred over LINKERVER to select the gold linker.
John Marino [Fri, 24 Feb 2012 23:38:03 +0000]
boot2: Add linker scripts for gold v2.22
The precursors for boot2 and boot2_64 also require linker scripts
when built with gold. The boot2 program was tested using disklabel
for both linkers after introducing the attached linker script.
John Marino [Fri, 24 Feb 2012 17:33:50 +0000]
loader: Add linker scripts for gold v2.22
The program header handling defaults for the gold linker that comes with
binutils 2.22 changed from the 2.21 version. As a result, DragonFly's
loader broke when linked with gold, rendering it unbootable.
The solution is to provide dedicated linker scripts for btx, btxldr, and
the loader itself. These scripts specify how to handle the program
headers. In these cases, we don't want to embed the headers in the first
LOAD segment which is what gold was doing, so the PDHRS section of the
scripts prevents that from happening.
The gnu ld-built loader still builds just fine with these linker scripts.
John Marino [Fri, 24 Feb 2012 17:23:39 +0000]
loader: use _end symbol instead of end
A long time ago, the "_end" symbol replaced the "end" symbol. The "end"
symbol was never present on the x86_64 DragonFly platform, but it was
erroneously carried inside the i386 libc for a few years (removed with
commit
8f73bea34efe21334e560a312017af168f3d1991).
The main.c file of the loader has been carrying the old version of the
symbol, but this was masked with the standard linker script which defined
"end: as an alias of "_end" and put both symbols in the binary.
This is the only instance of "end" found in the DragonFly code base, and
now it is gone.
Alex Hornung [Fri, 24 Feb 2012 12:24:56 +0000]
identcpu - add bits about RdRand (RDRND)
Venkatesh Srinivas [Fri, 24 Feb 2012 22:30:57 +0000]
hammer2 -- Fix failure to release buffer in hammer2 mount path error route.
Venkatesh Srinivas [Fri, 24 Feb 2012 22:11:56 +0000]
hammer2 -- Check root blockset CRC during mount attempts.
Alex Hornung [Fri, 24 Feb 2012 21:13:19 +0000]
kthread_create - fix varargs bug
* varargs in _kthread_create were handed the formatter but not the
va_list, leading to all sorts of unexpected behaviour.
* Set up the va_list in the callers of _kthread_create and pass it in
when calling.
Points-finger-at: tuxillo
Reported-by: Markus Pfeiffer, Sascha Wildner, Myself
Alex Hornung [Fri, 24 Feb 2012 20:37:42 +0000]
crypttab.5 - Mention loading dm_target_crypt
Dragonfly-bug: http://bugs.dragonflybsd.org/issue2281
Alex Hornung [Fri, 24 Feb 2012 20:37:15 +0000]
dm - Add manpages for target crypt and striped
Alex Hornung [Fri, 24 Feb 2012 19:49:10 +0000]
agp - fix potential panic
* Fix a potential panic when close() is called on an agp device that
hasn't been opened.
* Check whether it's open (and has been busied) before trying to unbusy
it.
Reported-by: Pierre Abbat
DragonFly-bug: http://bugs.dragonflybsd.org/issue2310
Alex Hornung [Fri, 24 Feb 2012 18:42:31 +0000]
psshfs - implement hard links
* implement hard links using the OpenSSH SFTP extension for it, since
OpenSSH doesn't understand FXP_LINK as per sftp version 6.
Venkatesh Srinivas [Fri, 24 Feb 2012 18:22:37 +0000]
libc -- stdlib: Implement aligned_alloc from C11.
Venkatesh Srinivas [Fri, 24 Feb 2012 18:07:07 +0000]
libc -- stdlib: Implement quick_exit and at_quick_exit from C11.
Alex Hornung [Fri, 24 Feb 2012 16:09:21 +0000]
puffs - check whether the FS has the given op
* Previously calls to some of the vnops that are unimplemented in the
actual puffs filesystem were succeeding.
* We now check whether the op exists before trying to pass it to
the userland FS. If it doesn't exist, fail (or return ok if no real
action needs to be taken).
Alex Hornung [Fri, 24 Feb 2012 14:57:08 +0000]
puffs - fix panic on hardlink
* puffs was trying to lock the vp in nlink again, but kern_link does
that already via vget.
Reported-by: Sascha Wildner (swildner@)
Antonio Huete Jimenez [Fri, 24 Feb 2012 10:01:30 +0000]
kern - Do not expose _kthread_create()
Pointed-out-by: aggelos
John Marino [Thu, 23 Feb 2012 18:03:04 +0000]
kern build: Tweak ldscripts for gold linker
The gold linker v2.21 was able to link a working kernel although its
modules were unloadable. The gold linker v2.22 could build loadable
modules, but the kernel wouldn't boot! It's not clear why the modules
started to work -- my guess is that the ancient ldscripts used during
the 2.21 trial were the culprit.
The gold linker changed its ELF program header handling defaults for
version 2.22, and this resulted in an extra LOAD segment reserved only
for the program headers. The DragonFly loader wasn't expecting that
and instantly rebooted when trying to load a gold kernel.
The solution was to add a PHDRS section to the ldscripts to specify
exactly the section to segment mapping, and prevent gold from putting
the elf headers in their own load segment. Now gold matches gnu ld
linker in having only two LOAD segments, text and data.
As a curiousity, gold sets the LOAD segment alignment value at 0x1000
for both i386 and x86_64, where gnu ld sets the segment alignment at
0x1000 for i386 and 0x200000 for x86_64. This seems to have no impact
on the loading of the kernel.
John Marino [Thu, 23 Feb 2012 21:59:45 +0000]
loaded: Remove obsolete -elf cflags
The gnu ld ignores -elf, but gold linker interprets this flag as
entry=lf. It's a dinosaur from the FreeBSD aout days.
Sascha Wildner [Thu, 23 Feb 2012 18:23:40 +0000]
LINT: Add CPU_HAS_SSE2.
Matthew Dillon [Thu, 23 Feb 2012 17:04:38 +0000]
build - Add git gc --aggressive to src and pkgsrc git repo creation
* Issue a git gc --aggressive after pulling the git repo for src
and/or pkgsrc. This will garbage collect and recompress the
repo, significantly reducing the disk space required.
* Primarily intended to reduce the size of the usb and dvd gui nrelease
images.
* The gc pass takes a few minutes to run but seems worth it.
Matthew Dillon [Thu, 23 Feb 2012 16:59:32 +0000]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2
Sascha Wildner [Wed, 22 Feb 2012 09:35:03 +0000]
Remove the KTR_MSGPORT kernel option which was never used.
Antonio Huete Jimenez [Tue, 21 Feb 2012 19:19:34 +0000]
kern - Merge two functions to avoid duplicated code.
- Merged kthread_create() and kthread_create_cpu() into
_kthread_create() thus avoiding some duplicated code.
- Set TDF_VERBOSE on threads only under bootverbose.
Sascha Wildner [Tue, 21 Feb 2012 16:00:32 +0000]
Makefile.inc1: Remove a no longer used variable.
Sascha Wildner [Mon, 20 Feb 2012 18:29:44 +0000]
Remove the old <sys/ata.h> header and make it a link of <sys/nata.h>.
Samuel J. Greear [Mon, 20 Feb 2012 17:34:19 +0000]
chkey, chpass, enigma, lock, newgrp, pw - Handle NULL return from crypt(3)
Sascha Wildner [Mon, 20 Feb 2012 13:31:04 +0000]
Fix some typos.
Sascha Wildner [Mon, 20 Feb 2012 11:58:50 +0000]
dsched(4): Some miscellaneous cleanup.
* Rename the bfq manpage to dsched_bfq(4), so that we don't run into
name conflicts in the future. If someone wrote a manpage for
dsched_as, it would have resulted in an as(4) manpage.
* Add options DSCHED_AS and DSCHED_BFQ to LINT*.
* Also, remove an unneeded check in dsched_as.
John Marino [Sun, 19 Feb 2012 16:24:56 +0000]
kern build: Update ldscripts
All for ldscripts (includes two virtual kernel scripts) have been
synchronized with binutils 2.22. The previous sync was with FreeBSD
which is still using binutils 2.17.50.
A notable update is the usage of "-z max-page-size". This is required
because the gold linker has a standard maximum page size of 0x1000 bytes
compared to 0x200000 bytes for the gnu ld linker. It's an option to
change the default, but the gold default of 4KB has advantages. Or in
other words, using a default maximum page size of 2MB has impacts to
library size and available memory that can be avoided.
Another thing to note is the vkernel64 has now been changed to load at
0x200000 like it's pc64 counterpart.
John Marino [Sun, 19 Feb 2012 15:26:19 +0000]
x86_64 getmemsize: Recover 0x100000 bytes
When binutils 2.20 was brought in, the x86_64 kernel built with it loaded
at 0x200000 instead of 0x100000 as it was previously. The getmemsize()
function was never updated with the new address so the physical memory
between 0x100000 and 0x200000 has been lost since then.
The hardcoded value has been updated. In the future, it may be a good
idea to replace with a variable as FreeBSD has done.
Thomas Nikolajsen [Sat, 18 Feb 2012 10:42:01 +0000]
Merge remote-tracking branch 'crater/master'
Thomas Nikolajsen [Sat, 18 Feb 2012 10:37:22 +0000]
tmpfs.5: Add note that DragonFly NFS client needs to disable ReaddirPlus
François Tigeot [Sat, 18 Feb 2012 09:36:06 +0000]
VFS accounting: optimize vop_write() performance
* Avoid a mount list scan if accounting is globally disabled
Francois Tigeot [Fri, 17 Feb 2012 22:58:58 +0000]
VFS accounting: check if nullfs mp* really exist
* Nullfs are a clever hack, they forget their mp after mount and let the
non-nullfs underlying mount point do all the work
* Nevertheless, we need to get the real struct mount associated to a mount
point to count the space used by PFSes. We cache it in the vnode.
* But since the vnode we use really belongs to the lowest underlying
mount point, the upper-level mp may already have been freed.
* We need to first check if it still valid; a new function,
mountlist_exists() now exists for that purpose.
* Should fix issue #2266
John Marino [Sat, 18 Feb 2012 07:47:35 +0000]
rtld: add carriage return to die()
Add missing EOL character to the die() message. This was lost when rtld_fdputstr() was
brought into rtld.
origin:
FreeBSD PR bin/165075
FreeBSD SVN 231582 (13 Feb 2012)
Matthew Dillon [Sat, 18 Feb 2012 02:36:24 +0000]
hammer2 - Add indirect block creation
* hammer2_chain_create_indirect() is now called by hammer2_chain_create()
when the current parent is full and an indirect block is needed to
open up new slots.
This function scans the key/keybits for all the entries in the parent and
calculates the key/keybits representing the range, inclusive of the
key/keybits we were trying to insert when we ran out of room.
The range is then bisected and the low or high side is selected for
indirect block replacement. The indirect block is created and the low
or high side elements are moved into the indirect block. The function
then returns and hammer2_chain_create() retries.
* Implement the HAMMER2_CHAIN_MOVED flag. This flag is set in a chain
element that has been moved into an indirect block, allowing flushes
to detect the condition and update the element in the indirect block
during the flush operation.
We also subtley use NOLOCK in a few places since there is no need to
actually load the contents of the entries being moved.
* Correct issues related to iterating through indirect blocks that came
up in testing.
* Tested with mkdir > 8 entries.
Matthew Dillon [Sat, 18 Feb 2012 02:35:01 +0000]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2
Sascha Wildner [Fri, 17 Feb 2012 22:05:03 +0000]
hier.7: Add back a .Bl that was removed with the binutils 2.20 removal.
Sascha Wildner [Fri, 17 Feb 2012 11:22:26 +0000]
kernel/pf: In the ioctl code, make sure NPFLOG is actually defined.
The inclusion of if_pflog.h was conditionalized on NPFLOG but it is
if_pflog.h itself that actually defines NPFLOG (because it includes
use_pflog.h).
So if_pflog.h was never included and some initialization code in
the ioctls for adding and changing rules was not executed.
Matthew Dillon [Fri, 17 Feb 2012 06:22:37 +0000]
hammer2 - core file read and write paths
* Get the core file create, read, and write paths working and tested for
up to 8 blocks (we still don't have indirect blocks yet).
* Add a flags field to the hammer2_chain_lookup() and hammer2_chain_next()
to retrieve the element with a ref but without a lock, avoiding any I/O
(used to obtain the physical block address in the strategy_read code).
* Fix bugs in previously untested code paths related to reading and writing.
Fixed a double allocation, improper handling of a degenerate case when
creating a new record, missing b[q]relse()'s or bdwrite()'s, etc.
* Fix a ripout in the hammer2_chain_flush()'s SPLAY_FOREACH() loop that
led to a crash.
* Add hammer2_vop_close()
* Add hammer2_vop_ncreate()
Matthew Dillon [Fri, 17 Feb 2012 06:21:35 +0000]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2
Sascha Wildner [Thu, 16 Feb 2012 22:56:53 +0000]
kernel: Remove unused attributes from stuff that is, in fact, used.
Sascha Wildner [Thu, 16 Feb 2012 21:30:49 +0000]
puc(4): Enable it for x86_64, too.
I have no idea if it works, but it is not in our GENERIC kernels so it
looks safe to just lurk for someone adding it to their config and
reporting breakage.
Sascha Wildner [Thu, 16 Feb 2012 21:28:44 +0000]
puc.4: Fix path.
Sascha Wildner [Thu, 16 Feb 2012 19:53:33 +0000]
kernel/i386: Remove a no longer needed include, too.
Sascha Wildner [Thu, 16 Feb 2012 19:51:28 +0000]
kernel: Remove the unused is_physical_memory() function.
It used to be used in dumping functions of raid and disk drivers but
updates and alexh's dumping upgrades (
b24cd69c3515fbc52) removed all
usage more than two years ago.
Venkatesh Srinivas [Thu, 16 Feb 2012 16:11:58 +0000]
Merge branch 'master' into hammer2
Venkatesh Srinivas [Thu, 16 Feb 2012 15:53:22 +0000]
kernel: mfs -- Fix unmount panic for MFS filesystems.
mfs_start() is active for the life of an MFS mount, handling copyin/out
requests. It is directed to exit when an MFS filesystem is unmounted.
The VFS accounting code and VFS MPLOCK code assumed that the mountpoint
structure was stable on return of mfs_start, which was not the case.
To work around that, don't call acinit if the vfs_start vfsop returns
EMOUNTEXIT, a kernel-specific pseudo-errno. Also allow marking vfs_start
MPSAFE and mark mfs vfs_start MPSAFE, to avoid accessing a per-mount
token field. A future commit will rework MFS's locking so that critical
sections are not used to protect the MFS bioq.
This is a hack for MFS; future work should either rework the filesystem
or replace it outright with tmpfs.
Closes: Bug 2276
Venkatesh Srinivas [Thu, 16 Feb 2012 15:53:22 +0000]
kernel: mfs -- Fix unmount panic for MFS filesystems.
mfs_start() is active for the life of an MFS mount, handling copyin/out
requests. It is directed to exit when an MFS filesystem is unmounted.
The VFS accounting code and VFS MPLOCK code assumed that the mountpoint
structure was stable on return of mfs_start, which was not the case.
To work around that, don't call acinit if the vfs_start vfsop returns
EMOUNTEXIT, a kernel-specific pseudo-errno. Also allow marking vfs_start
MPSAFE and mark mfs vfs_start MPSAFE, to avoid accessing a per-mount
token field. A future commit will rework MFS's locking so that critical
sections are not used to protect the MFS bioq.
This is a hack for MFS; future work should either rework the filesystem
or replace it outright with tmpfs.
Closes: Bug 2276
Sascha Wildner [Thu, 16 Feb 2012 14:48:27 +0000]
isp(4): Fix wrong sizeof().
Sascha Wildner [Thu, 16 Feb 2012 10:48:59 +0000]
proplib manpages: Add missing .Nd
Sascha Wildner [Thu, 16 Feb 2012 10:00:54 +0000]
objformat.1: Fix date.
Sascha Wildner [Thu, 16 Feb 2012 09:35:04 +0000]
kernel: Include <sys/ioccom.h> where ioctls are defined (part 2).
Some cases that I previously missed.
Sascha Wildner [Thu, 16 Feb 2012 09:08:57 +0000]
kernel: Include <sys/ioccom.h> where ioctls are defined.
Not where they are used.
See http://bugs.dragonflybsd.org/issues/1334
Sascha Wildner [Thu, 16 Feb 2012 07:54:23 +0000]
kernel: Remove opt_bus.h references where they are not needed.
It only defines BUS_DEBUG (if set) and BUS_DEBUG is only used in
subr_bus.c, so it doesn't need to be included anywhere else.
Thomas Nikolajsen [Thu, 16 Feb 2012 06:35:29 +0000]
Merge remote-tracking branch 'crater/master'
Thomas Nikolajsen [Thu, 16 Feb 2012 06:25:06 +0000]
Revert "libstand.3: remove .Xo/.Xc"
.Xo/.Xc support has been added to mandoc(1).
This reverts commit
7ad109144437549598e004ac327522a3106f57f9.
Sascha Wildner [Thu, 16 Feb 2012 05:12:49 +0000]
mfiutil(8): Fix typo.
Sascha Wildner [Tue, 14 Feb 2012 22:18:33 +0000]
kernel/pci: Implement the PCIOCATTACHED ioctl.
This fixes pciconf -a
Taken-from: FreeBSD
Sascha Wildner [Tue, 14 Feb 2012 23:35:56 +0000]
LINT/LINT64: Remove obsolete comment.
Matthew Dillon [Tue, 14 Feb 2012 08:11:59 +0000]
hammer2 - clean-up the chain code, first cut at the read/write/strategy code
* Do a major cleanup of the hammer2_chain handling code.
We no longer kmalloc() a local copy when a chain element is modified.
Instead we differentiate elements whos data is embedded (volume header,
inodes) vs elements whos data is mapped to a buffer cache buffer (indirect
blocks and data).
Elements with embedded data simply leave the data pointer pointing at the
embedded data as before.
Elements without embedded data instantiate the newly allocated
copy-on-write buffer cache buffer and bcopy() the data from the old
buffer to the new buffer, replacing chain->bp and the chain->data pointer.
The new bp is dirtied.
The modified data no longer needs to be retained when the chain elmeent
is released, we bdwrite() the bp and thus can reinstantiate the modified
data at any time in the future. This also allows the system to flush
the modified data out.
* Implement hammer2_vop_read(), hammer2_vop_write(), and
hammer2_vop_strategy().
Currently untested (files cannot be created yet), but fairly
straight-forward. Definitely also not optimized yet.
Matthew Dillon [Tue, 14 Feb 2012 05:22:01 +0000]
hammer2 - correct saveoff in hammer2_vop_readdir()
* When terminating a search early read the next entry and set save_off
to that, instead of setting it to the last returned entry's key + 1.
This ensures an exact match when the search resume. This could create
problems in the future but for now its a quick way to track the
directory scan due to the fully-associative nature of the on-media
blockref arrays.
(In the future we may have to sort the fully associative array on-media
to really solve the issue).
* This corrects repeated entries in 'ls' output.
Matthew Dillon [Tue, 14 Feb 2012 05:11:51 +0000]
Merge branches 'hammer2' and 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly into hammer2
Sascha Wildner [Mon, 13 Feb 2012 22:54:06 +0000]
Remove an obsolete header file specific to labpc(4) (which was removed).
Sascha Wildner [Mon, 13 Feb 2012 21:37:59 +0000]
world: Add missing DPADDs in some Makefiles.
Sascha Wildner [Mon, 13 Feb 2012 14:09:01 +0000]
Fix some typos.
Matthew Dillon [Mon, 13 Feb 2012 08:52:21 +0000]
hammer2 - Initial media flush implementation
* Implement hammer2_chain_flush(), hammer2_vfs_sync(), and hammer2_vop_fsync().
The flush code currently handles inodes but not data.
* hammer2_chain_flush() recursively flushes a chain structure, handing the
parent the updated blockref. When flushing downward pending chain elements
will allocate new blocks for copy-on-write.
* Survives mount/mkdir/umount/mount
NOTES: fsync currently stops at the inode and does not currently flush
through to the volume root. We need to implement a short-cut for
fsync using currently reserved volume header fields to avoid having
to flush out the entire chain.
We haven't implemented data blocks yet.
Matthew Dillon [Mon, 13 Feb 2012 03:22:10 +0000]
hammer2 - initial mkdir skeleton
* Code up VOP_NMKDIR() to test the chain creation code and VOP_READDIR.
* Code up VOP_NLOOKUPDOTDOT.
* Adjust newfs_hammer2 to set alloc_tid to 16, so we can reserve some
inode numbers for the super-root and root.
* Add another field to the media inode_data for inode allocation within
a PFS.
Note: These are mostly skeletons. We don't flush modified chain elements
back to the disk yet and the chain create path can't create indirect
blocks yet.
Matthew Dillon [Mon, 13 Feb 2012 01:38:24 +0000]
hammer2 - flesh out getattr
* Load vap field from the inode media structure, setup remaining fields.
ls -la /mnt can display '.' and '..' now.
* Pull in some helper procedures from HAMMER1 to help out.
Matthew Dillon [Mon, 13 Feb 2012 00:50:01 +0000]
hammer2 - Adjust chain lookup/iteration API, add readdir
* Adjust the chain lookup/iteration API to take a key range key_beg to key_end
(inclusive), instead of a key/mask pair.
* Add and initialize a parent inode pointer in hammer2_inode{}.
* Adjust the directory key hash to always OR with 0x8000U in order to
guarantee that some low valued codes remain unused so we can use them
for pseudo directory cookies (for '.' and '..').
newfs2_hammer is required on the test volume with this change.
* Implement hammer2_vop_readdir().