mm [Sat, 20 Aug 2011 07:43:10 +0000 (07:43 +0000)]
MFC r224814, r224855:
MFC r224814 [1]:
Fix race between dmu_objset_prefetch() invoked from
zfs_ioc_dataset_list_next() and dsl_dir_destroy_check() indirectly
invoked from dmu_recv_existing_end() via dsl_dataset_destroy() by not
prefetching temporary clones, as these count as always inconsistent.
In addition, do not prefetch hidden datasets at all as we are not
going to process these later.
Filed as Illumos Bug #1346
MFC r224855:
zfs_ioctl.c: improve code readability in zfs_ioc_dataset_list_next()
zvol.c: fix calling of dmu_objset_prefetch() in zvol_create_minors()
by passing full instead of relative dataset name and prefetching all
visible datasets to be processed later instead of just the pool name
mm [Thu, 18 Aug 2011 07:34:11 +0000 (07:34 +0000)]
MFC r224605:
Fix panic in zfs_read() if IO_SYNC flag supplied by checking for
zfsvfs->z_log before calling zil_commit(). [1]
Do not call zfs_read() from zfs_getextattr() with the IO_SYNC flag.
Submitted by: Alexander Zagrebin <alex@zagrebin.ru> [1]
Reviewed by: pjd
zack [Thu, 18 Aug 2011 00:05:09 +0000 (00:05 +0000)]
MFC r224637:
Fix an NFS server issue where it was not correctly setting the eof flag when a
READ had hit the end of the file. Also, clean up some cruft in the code.
rmacklem [Wed, 17 Aug 2011 20:55:56 +0000 (20:55 +0000)]
MFC: r224606
Fix a LOR in the NFS client which could cause a deadlock.
This was reported to the mailing list freebsd-net@freebsd.org
on July 21, 2011 under the subject "LOR with nfsclient sillyrename".
The LOR occurred when nfs_inactive() called vrele(sp->s_dvp)
while holding the vnode lock on the file in s_dvp. This patch
modifies the client so that it performs the vrele(sp->s_dvp)
as a separate task to avoid the LOR. This fix was discussed
with jhb@ and kib@, who both proposed variations of it.
rmacklem [Wed, 17 Aug 2011 20:43:59 +0000 (20:43 +0000)]
MFC: r224604
Fix a LOR in the NFS client which could cause a deadlock.
This was reported to the mailing list freebsd-net@freebsd.org
on July 21, 2011 under the subject "LOR with nfsclient sillyrename".
The LOR occurred when nfs_inactive() called vrele(sp->s_dvp)
while holding the vnode lock on the file in s_dvp. This patch
modifies the client so that it performs the vrele(sp->s_dvp)
as a separate task to avoid the LOR. This fix was discussed
with jhb@ and kib@, who both proposed variations of it.
jh [Wed, 17 Aug 2011 15:22:58 +0000 (15:22 +0000)]
MFC r218411:
- Use LINE_MAX from limits.h as the maximum line length instead of
BUFSIZ. Use LINE_MAX * 2 as the buffer size (BSIZE).
- Error out if we encounter a line longer than LINE_MAX. The previous
behavior was to silently split long lines and produce corrupted
output.
mav [Tue, 16 Aug 2011 10:52:29 +0000 (10:52 +0000)]
MFC r224728:
Do not block zero report ID. It is correct value for devices with single
ID. This fixes USB_SET_IMMED call (synchronous operation) of the uhid(4)
driver on devices with single report ID.
yongari [Mon, 15 Aug 2011 17:08:54 +0000 (17:08 +0000)]
MFC r224506:
Add new device id of D-Link DGE-530T Rev. C controller. DGE-503T
Rev A1 and B1 is supported by sk(4) but the DGE-530T Rev. C
controller is re-branded RealTek 8169 controller.
mav [Mon, 15 Aug 2011 14:19:26 +0000 (14:19 +0000)]
MFC r224511:
- Fix usbhidctl and usbhidaction to handle HID devices with multiple
report ids, such as multimedia keyboards.
- Add collection type and report id to the `usbhidctl -r` output. They
are important for proper device understanding and debugging.
- Fix usbhidaction tool to properly handle items having report_count
more then 1.
rmacklem [Sun, 14 Aug 2011 00:55:18 +0000 (00:55 +0000)]
MFC: r224554
Fix rename in the new NFS server so that it does not require a
recursive vnode lock on the directory for the case where the
new file name is in the same directory as the old one. The patch
handles this as a special case, recognized by the new directory
having the same file handle as the old one and just VREF()s the old
dir vnode for this case, instead of doing a second VFS_FHTOVP() to get it.
This is required so that the server will work for file systems like
msdosfs, that do not support recursive vnode locking.
This problem was discovered during recent testing by pho@
when exporting an msdosfs file system via the new NFS server.
rmacklem [Sun, 14 Aug 2011 00:32:43 +0000 (00:32 +0000)]
MFC: r224532
The new NFS client failed to vput() the new vnode if a setattr
failed after the file was created in nfs_create(). This would
probably only happen during a forced dismount. The old NFS client
does have a vput() for this case. Detected by pho during recent
testing, where an open syscall returned with a vnode still locked.
jilles [Sat, 13 Aug 2011 21:33:50 +0000 (21:33 +0000)]
MFC r222716: sh: Fix $? in heredocs on simple commands.
The patch is slightly different because redirected compound commands are
handled differently in stable/8 (no separate function, redirection errors
are fatal).
zack [Sat, 13 Aug 2011 17:29:37 +0000 (17:29 +0000)]
MFC r224079 and r224121:
r224121 was meant to revert r224079, except I accidentally checked in an
additional ACL patch in r224121. Committing both of these ends up with just the
ACL fix. Here is the real commit note for the ACL patch:
Running pynfs verify/nverify tests produces a panic in nfsrv_compareacl(). This
patch fixes the panic.
zack [Sat, 13 Aug 2011 17:21:50 +0000 (17:21 +0000)]
MFC r224086:
Add DEXITCODE plumbing to NFS.
Isilon has the concept of an in-memory exit-code ring that saves the last exit
code of a function and allows for stack tracing. This is very helpful when
debugging tough issues.
This patch is essentially a no-op for BSD at this point, until we upstream
the dexitcode logic itself. The patch adds DEXITCODE calls to every NFS
function that returns an errno error code. A number of code paths were also
reorganized to have single exit paths, to reduce code duplication.
zack [Sat, 13 Aug 2011 17:19:24 +0000 (17:19 +0000)]
MFC: r224083
Simple find/replace of VOP_ISLOCKED -> NFSVOPISLOCKED. This is done so that
NFSVOPISLOCKED can be modified later to add enhanced logging and assertions.
zack [Sat, 13 Aug 2011 17:08:57 +0000 (17:08 +0000)]
MFC: r224077
Small acl patch to return the aclerror that comes back from
nfsrv_dissectacl(). This fixes a problem where ATTRNOTSUPP was being
returned instead of BADOWNER.
marius [Sat, 13 Aug 2011 13:15:27 +0000 (13:15 +0000)]
MFC: r224762
Sync makefs(8) ISO 9660 support with NetBSD:
o cd9960 -> cd9660
o Move inclusion of sys/endian.h from cd9660_eltorito.c to cd9660.h
since actual user is not cd9660_eltorito.c but iso.h and
cd9660_eltorito.h.
Actually, include order/place of sys/endian.h doesn't matter on
netbsd since it is always included by sys/types.h but it's not
true on other system. This should fix cross build breakage on
freebsd introduced by rev. 1.16 of cd9660_eltorito.c.
Problem reported and fix suggested on twitter.
o Fix fd leaks in error cases. Found by cppcheck.
o RRIP RE length should be 4, not 0
o Apply fixes for PR bin/44114 (makefs(8) -t cd9660 -o rockridge creates
corrupted cd9660fs), iso9660_rrip.c part:
- cd9660_rrip_finalize_node() should check rr_real_parent in node->parent,
not in node itself in RRIP_PL case
- cd9660_rrip_initialize_node() should update only node passed as arg
so handle RRIP_PL in DOTDOT case
Fixes malformed dotdot entries in deep (more than 8 level) directories
moved into .rr_moved dir.
Should be pulled up to netbsd-5.
(no official ISO has such deep dirs, but cobalt restorecd is affected)
marius [Sat, 13 Aug 2011 12:47:09 +0000 (12:47 +0000)]
MFC: r224683, r224693
The tid member of struct pthread actually is long so read it as such.
Accessing it as an int causes failure on big-endian LP64, i.e. mips64be,
powerpc64 and sparc64.
marius [Sat, 13 Aug 2011 12:43:33 +0000 (12:43 +0000)]
MFC: r224682
- Merge from r147740:
When the last, possibly partially filled buffer is flushed, we didn't
reset fragsz to 0 and as such would stop reflecting reality.
- Use __FBSDID.
- Wrap a too long line.
marius [Sat, 13 Aug 2011 12:37:22 +0000 (12:37 +0000)]
MFC: r224494, r224761
- Send the RELSIM_ADJUST_OPENINGS in response to a MPI_EVENT_QUEUE_FULL using
the right SIM in case the HBA is RAID-capable but the target in question is
not a hot spare or member of a RAID volume.
- Report the loss and addition of SAS and SATA targets detected via PHY link
status changes and signalled by MPI_EVENT_SAS_DEVICE_STATUS_CHANGE to cam(4)
as lost devices and trigger rescans as appropriate. Without this it can take
quite some time until a lost device actually is no longer tried to be used,
if it ever stops. [1]
- Handle MPI_EVENT_IR2, MPI_EVENT_LOG_ENTRY_ADDED, MPI_EVENT_SAS_DISCOVERY
and MPI_EVENT_SAS_PHY_LINK_STATUS silently as these serve no additional
purpose beyond adding cryptic entries to logs.
- Add a warning for MPI_EVENT_SAS_DISCOVERY_ERROR events, which can help
identifying broken disks. [2]
Thanks to Hans-Joerg Sirtl for providing one of the HBAs these changes were
developed with and RIP to the mainboard that didn't survive testing them.
marius [Sat, 13 Aug 2011 12:33:06 +0000 (12:33 +0000)]
MFC: r224493
- Staticize functions as appropriate and comment out unused ones.
- Sprinkle some const where appropriate.
- Consistently use target_id_t for the target parameter of mpt_map_physdisk()
and mpt_is_raid_volume().
- Fix some whitespace bugs.
marius [Sat, 13 Aug 2011 12:28:58 +0000 (12:28 +0000)]
MFC: r223985
- For SAS but neither FC nor SPI controllers default to using MSI/MSI-X
(still allowing their use to be disabled via device hints though). This
matches what the corresponding Linux driver provided by LSI does. Tested
with SAS1064.
- There's no need to keep track of the RIDs used.
- Don't allocate MSI/MSI-X as RF_SHAREABLE.
- Remove a comment which no longer applies since r209599 (MFC'ed to stable/8
in r210376).
- Assign NULL rather than 0 to pointers.
mm [Wed, 10 Aug 2011 08:40:59 +0000 (08:40 +0000)]
MFC r224691, r224700 [1]:
MFC r224961:
Add compatibility for ISO images created with unfixed makefs that
violated ECMA-119 (ISO9660): allow reserved4 to be 0x20 in PVD.
This allows tar to read FreeBSD distribution ISO images created
with makefs prior to NetBSD bin/45217 bugfix (up to 9.0-BETA1).
In addition, merge following important bugfixes from
libarchive's release/2.8 branch:
Revision 2812:
Merge 2811 from trunk: Don't try to verify that compression-level=0
produces larger results than the default compression, since this isn't
true for all versions of liblzma.
Revision 2820:
Fix issue 119.
Change the file location check that a file location does not exceed
volume block. New one is that a file content does not exceed volume
block(end of an ISO image). It is better than previous check even
if the issue did not happen.
While reading an ISO image generated by an older version of mkisofs
utility, a file location indicates the end the ISO image if its file
size is zero and it is the last file of all files of the ISO image,
so it is possible that the location value is the same as the number
of the total block of the ISO image.
Revision 2958:
Followup on Issue 134:
1) Port test_open_failure to libarchive 2.8 branch to test
the problem reported in Issue 134.
This test also shows that archive_read_open() sometimes
fails to report open errors correctly.
2) Fix the bug in archive_read.c
3) Comment out the tests that close functions are invoked
promptly when open fails; that's fully fixed in libarchive 3.0,
but I don't think it's worth fixing here.
Revision 3484:
Use uintmax_t with %ju
Revision 3487:
Fix issue 163.
Correctly allocate enough memory for a input buffer saved.
Revision 3542:
Merge 2516, 2536 from trunk: Allow path table offset values of
0 and 18, which are used by some ISO writers.
MFC r224700 [1]:
Merge revision 3554 from libarchive's release/2.8 branch:
Partial merge of 2431 from trunk: Retry writes on EINTR.
This should fix the SIGINT handler in bsdtar.
Note: The rest of r2431 can't be merged, since it interacts
with a big write-side rearchitecture.
Fix NetBSD PR bin/45217:
makefs creates ISO9660 images that violate the ECMA-119 (ISO9660)
specification. This is caused by erroneously writing 32 bytes
with value 0x20 to the volume_set_id field and 128 bytes with value 0x20
to the the following 37-byte fields in the PVD:
copyright_file_id, abstract_file_id, bibliographic_file_id
This causes, among other unwanted results the reserved4 field to be
overwritten with the value 0x20. To comply with the specification,
this field muse be zero. As a result, all FreeBSD distribution
ISO images created with makefs have not been 100% valid ISO9660 files.
mav [Tue, 9 Aug 2011 07:35:56 +0000 (07:35 +0000)]
MFC r224603:
Do not force AHCI mode on NVIDIA MCP89 SATA controllers. Recent Apple
Mac with this chipset does not initialize AHCI mode unless it is started
from EFI loader. However, legacy ATA mode works.
emaste [Mon, 8 Aug 2011 13:56:27 +0000 (13:56 +0000)]
MFC r224047:
Remove note that claims pthread_set_name_np is for debugging only.
As Garrett points out,
It is no more a debugging interface than setproctitle(3), and has not
been since the name started getting stuffed into the kernel. This
statement may have made sense when the name was only visible in thread
state dumps and the debugger.
kib [Mon, 8 Aug 2011 08:22:15 +0000 (08:22 +0000)]
MFC r224581:
Fix the LK_NOSHARE lockmgr flag interaction with LK_UPGRADE and
LK_DOWNGRADE lock ops. Namely, the ops should be NOP since LK_NOSHARE
locks are always exclusive.
mav [Sun, 7 Aug 2011 17:30:03 +0000 (17:30 +0000)]
MFC r224497:
Add control for ATA disk read-ahead, alike to the previously added write
cache control. Some controller BIOS'es tend to disable read-ahead, that
dramatically reduces read performance. Previously ata(4) always enabled
read-ahead unconditionally.
mav [Sun, 7 Aug 2011 17:28:08 +0000 (17:28 +0000)]
MFC r224496:
In some cases failed SATA disks may report their presence, but don't
respond to any commands. I've found, that because of multiple command
retries, each of which cause 30s timeout, bus reset and another retry or
requeue for many commands, it may take ages to eventually drop the
failed device. The odd thing is that those retries continue even after
XPT considered device as dead and invalidated it.
This patch makes cam_periph_error() to block any command retries after
periph was marked as invalid. With that patch all activity completes in
1-2 minutes, just after several timeouts, required to consider device
death. This should make ZFS, gmirror, graid, etc. operation more robust.
mav [Sun, 7 Aug 2011 17:19:59 +0000 (17:19 +0000)]
MFC r224531:
Higher-priority initialization request can eat request scheduling done from
adaclose(). Add immediate_priority check into adaschedule() to restore it.
mav [Sun, 7 Aug 2011 17:18:22 +0000 (17:18 +0000)]
MFC r224498:
In some cases, at least on Marvell 88SE912x controllers, Current Command
Slot field of the PxCMD register may point to an empty command slot.
That breaks command timeout detection logic, making impossible to find
what command actually caused timeout, and leading to infinite wait.
Workaround that by checking whether pointed command slot is really used
and can timeout in its time. And if not, fallback to the dumb algorithm
used with FBS -- let all commands to time out and then fail all of them.
kib [Sat, 6 Aug 2011 11:33:17 +0000 (11:33 +0000)]
MFC r224522:
Fix a race in the device pager allocation. If another thread won and
allocated the device pager for the given handle, then the object
fictitious pages list and the object membership in the global object
list still need to be initialized. Otherwise, dev_pager_dealloc() will
traverse uninitialized pointers.
kib [Wed, 3 Aug 2011 14:29:20 +0000 (14:29 +0000)]
MFC r223988:
While fixing the looping of a thread while devfs vnode is reclaimed,
r179247 introduced a possibility of devfs_allocv() returning spurious
ENOENT. If the vnode is selected by vnlru daemon for reclamation, then
devfs_allocv() can get ENOENT from vget() due to devfs_close() dropping
vnode lock around the call to cdevsw d_close method.
Use LK_RETRY in the vget() call, and do some part of the devfs_reclaim()
work in devfs_allocv(), clearing vp->v_data and de->de_vnode. Retry the
allocation of the vnode, now with de->de_vnode == NULL.
The check vp->v_data == NULL at the start of devfs_close() cannot be
affected by the change, since vnode lock must be held while VI_DOOMED
is set, and only dropped after the check.
MFC r223753:
ARP code reuses mbuf from ARP request to make a reply, but it does not
reset rcvif to NULL. Since rcvif is not NULL, ipfw(4) supposes that ARP
replies were received on specified interface.
Reset rcvif to NULL for ARP replies to fix this issue.
uqs [Tue, 2 Aug 2011 09:06:04 +0000 (09:06 +0000)]
MFH r223715
- Fix typo in check_for_nested_with_variably_modified
- Implement -Wvariable-decl.
- Port -Wtrampolines support from gcc3.
(all three also via OpenBSD)
PR: gnu/127136, gnu/157019
Submitted by: Henning Petersen, Pedro Giffuni
MFC 224177:
ZFS tries to allocate blocks evenly across all devices. This means when
devices are imbalanced zfs will lots of CPU searching for space on devices
which tend to be pretty full. It should instead fail quickly on the full
devices and move onto devices which have more availability.
New loader tunable: vfs.zfs.mg_alloc_failures (min = 8)
MFC on usr.bin/bsdtar:
203569,203571,203586-203590,203593-203594,204329,205076,206463-206466,
206484-206485,206487,207786,207790-207791,208028,209152,210720,213469,
223541,223573,224153,224158
MFC 203569 (kientzle):
bsdtar doesn't actually know what compression is supported by libarchive
and it should not pretend that it does. It should just pass along the
user's request and handle an error if it's not supported.
MFC 203571 (kientzle):
Fill in some missing error handling, be a little more careful about
error reporting, prefer int64_t to off_t.
MFC 203586 (kientzle):
Trim out some unused configuration variables, remove
some unused headers, etc.
MFC 203587 (kientzle):
Minor code rework.
MFC 203588 (kientzle):
Restructure the logic that determines when we're crossing a mount
point. In particular, this carves out a place for detecting and
excluding synthetic or network filesystems.
MFC 203589 (kientzle):
Various portability workarounds for non-FreeBSD platforms.
MFC 203590 (kientzle):
Style & Portability: Use archive_entry methods to examine
file information, change some functions to static, remove
some unused headers.
MFC 203593 (kientzle):
Merge a bunch of refactoring from Joerg Sonnenberger to
isolate common code used by tar and cpio (and useful to other
libarchive clients). The functions here are prefixed with
"lafe" (libarchive front-end) to indicate their use.
MFC 205076 (uqs):
Fix several typos in macros or macro misusage.
Found by: make manlint
MFC 206463 (kientzle):
Correct the markup for the -s option,
document the iso9660:rockridge and mtree:indent options
MFC 206464 (kientzle):
Remove an unnecessary include and conditionalize some code.
MFC 206465 (kientzle):
Consistently specify O_BINARY when opening files.
MFC 206466 (kientzle):
Fix -X.
MFC 206484 (kientzle):
Diff reduction against bsdtar 2.8.3
MFC 206485 (kientzle):
Diff reduction against bsdtar 2.8.3
MFC 206487 (kientzle):
If a file is specifically both included and excluded, then:
* It is not extracted (because it is excluded)
* If it's not present in the archive, then an error is
reported (because the file was requested and not found)
* If it is present in the archive, no error is reported.
Previously, this would always report an error because the
exclusion prevented the entry from matching the inclusion.
Also, tar is now more reluctant to report unmatched inclusions.
Previously, "tar x file1 'file*'" against an archive that contained a
single entry "file1" would match file1 and then report an error for
the second pattern because it wasn't matched. It now considers both
inclusions to be matched and reports no error.
MFC 207786 (kientzle):
Various manpage updates, including many long-option synonyms that were previously
undocumented.
MFC 207790 (kientzle):
Config updates.
MFC 207791 (kientzle)
FreeBSD is now using bsdtar 2.8.3.
MFC 208028 (uqs):
mdoc: move remaining sections into consistent order
This pertains mostly to FILES, HISTORY, EXIT STATUS and AUTHORS sections.
Found by: mdocml lint run
MFC 209152 (kientzle):
If the compressed data is larger than the uncompressed,
report the compression ratio as 0% instead of displaying
nonsense triggered by numeric overflow. This is common
when dealing with uncompressed files when the I/O blocking
causes there to be small transient differences in the
accounting.
Thanks to: Boris Samorodov
MFC 210720 (joel):
Fix typos.
MFC 213469 (kientzle):
Recognize both ! and ^ as markers for negated character classes.
Submitted by: Mykola Dzham
MFC 223541 (kientzle):
If there is a read error reading Y/N confirmation from the keyboard,
exit immediately with an error.
If there is an error opening or reading a file to put into the archive,
set the return value for a deferred error exit.
MFC 223573 (kientzle):
The --newer-than test should descend into old
directories to look for new files.
MFC 224153 (mm):
Update bsdtar to 2.8.4
Use common code from lib/libarchive/libarchive_fe
MFC 224158 (mm):
Fix accidential commit part:
Include "bsdtar_platform.h" instead of "lafe_platform.h"
MFC on usr.bin/cpio:
203183,204329,207792,211054,211397,212263,224154-224155
MFC 203183 (kientzle):
Support -V option to print a dot for each file processed.
Also, change the existing -vi behavior to send the filenames to
stderr rather than stdout, as GNU cpio does.
MFC 211054 (kientzle):
Fix -R when used with -p. Previously, the
uname and gname weren't overwritten, so the
disk restore would use those to lookup the
original uid/gid again. Clearing the uname
and gname prevents this.
Reported by: swell.k
MFC 211397 (joel):
Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki while
translating these manual pages. Minor corrections by me.
MFC on lib/libarchive:
196961,200351,201077,201079-201097,201099-201112,201155-201157,
201159-201163,201165,201167-201171,201246-201250,201253,202868-202869,
202871-202873,203952,208027,208169,208184,208263,208291,210825,213573,
214822,214867,214905,216258,221472,224152
MFC 196961 (kientzle):
Update tests to match r195873, which corrected how hardlinked files
on iso9660 images were returned. While I'm poking around, update
some comments around this area to try to clarify what's going on and
what still remains to be improved.
MFC 200351 (kientzle):
Merge two cpio fixes from libarchive.googlecode.com:
1) Avoid an infinite loop in the header resync for certain malformed
archives.
2) Don't try to match hardlinks if the nlinks count is < 2. This
reduces the likelihood of a false hardlink match due to ino truncation.
MFC 201077 (kientzle):
Update format manpages for libarchive.
MFC 201079 (kientzle):
Update the hard-coded configuration for libarchive.
MFC 201080 (kientzle):
Remove some unused variables and dead assignments.
MFC 201081 (kientzle):
Remove a dead assignment.
MFC 201082 (kientzle):
Catch certain gzip failures at close time.
MFC 201083 (kientzle):
Compatibility fix for some older systems with non-POSIX getgrnam_r/getpwnam_r
and a minor style fix for the hash function.
MFC 201084 (kientzle):
Sync with googlecode some changes that have no impact on FreeBSD.
MFC 201085 (kientzle):
Compatibility: I found some more compilers that don't like 'inline' keyword.
Protection: Discourage people from using this header outside libarchive.
MFC 201086 (kientzle):
Discourage people from using this header outside of libarchive.
MFC 201087 (kientzle):
Enforce this as an internal-only header.
MFC 201088 (kientzle):
Allow more formats to be active at a time; discourage outside use.
MFC 201089 (kientzle):
Portability: terminate abnormally via abort() instead of segfault,
watch the return value from write(), and avoid signed arithmetic on
unsigned values.
MFC 201091 (kientzle):
Remove dead assignment.
MFC 201092 (kientzle):
Discourage outside use of this internal header.
MFC 201093 (kientzle):
Portability: Set the file descriptor to binary mode on Win32
MFC 201094 (kientzle):
Eliminate an unused assignment.
MFC 201095 (kientzle):
Remove an unused variable and an unnecessary increment.
MFC 201096 (kientzle):
Various portability fixes, plus:
* New "ino64" field.
* New UTF8 interfaces for hardlink/symlink updates
MFC 201097 (kientzle):
Portability fixes.
MFC 201099 (kientzle):
Use new ino64 interface.
MFC 201110 (kientzle):
Clarify an example so Linux folks won't keep getting confused by this
point.
MFC 201111 (kientzle):
Remove some dead assignments, fix some declarations.
MFC 201112 (kientzle):
Portability.
MFC 201155 (kientzle):
64-bit ino support and discourage bad use of this header.
MFC 201156 (kientzle):
Various style and portability fixes, including:
* Enforce option interface can only be used before the archive is opened
* Correctly handle large skips on platforms with 32-bit off_t
* Use int64_t instead of off_t
MFC 201157 (kientzle):
Catch decompression failures earlier. In particular, this gives
immediate feedback if we fail to fork an external decompression program.
MFC 201159 (kientzle):
Various fixes when creating objects on disk:
* Write xattrs last instead of first (required on platforms that use
system xattrs for security attributes)
* Better handling of chdir() failures
* Don't bother trying to shorten files via seek()/write()
* Fix build on systems that lack link()/symlink()/mknod()
* Prefer futimens()/utimensat() when they're present
MFC 201160 (kientzle):
Various style fixes to the 'newc' cpio writer:
* Warn about truncation of ino
* Use a macro to hide the somewhat obscure pad-to-multiple-of-4 calculation
* Eliminate some unused variables
MFC 201161 (kientzle):
Style fixes to tar reader:
For portability, prefer int64_t to off_t.
Improve numeric overflow handling when parsing.
Fix some variable types.
Eliminate some unused results.
MFC 201162 (kientzle):
Style and portability fixes for pax writer. Mostly very routine, except for:
* Use ino64 where appropriate
* Don't pass atime or nsec to ustar formatter
MFC 201163 (kientzle):
Be a little more skeptical of dev/ino matches when reading cpio files.
This eliminates some false-positives in the hardlink detection logic.
MFC 201165 (kientzle):
Minor style fixes plus a fix for an obscure crash on certain malformed
mtree files.
MFC 201167 (kientzle):
If we're linking against liblzma, allow the decompressor to use up to
1<<30 bytes of memory, which is required for some streams.
Also, try to make the taster more discriminating about raw lzma streams.
The detection here is still really weak, though; please use xz instead
of lzma.
MFC 201168 (kientzle):
Zip write support for libarchive.
The initial implementation was developed by Anselm Strauss as part of
Google Summer of Code 2008, then completed by Joerg Sonnenberger.
MFC 201170 (kientzle):
Essentially eliminate problems with false hardlinks in POSIX cpio
archives by generating synthetic ino values and mapping values
from disk into the new values.
MFC 201171 (kientzle):
Rationalize the support for cryptographic hashes.
MFC 201246 (kientzle):
Merge Michihiro NAKAJIMA's significant work on the ISO9660 reader
from googlecode:
* Support for zisofs compressed entries
* Support for relocated deep directories
* Direct calculation of link counts for accurate nlink values
even on images that lack Rockridge extensions
* Faster handling of the internal file lists.
* Better detection of ISO variants
MFC 201247 (kientzle):
A raft of test changes and improvements from the Googlecode repository.
In particular, this includes tests for the new features I've merged
over the last few days.
MFC 201248 (kientzle):
UU decoder. Now that libarchive can recursively taste input streams,
you can do things like this: tar xvf archive.tar.gz.uu
MFC 201249 (kientzle):
Libarchive in FreeBSD is now synced up with 2.7.901a from
libarchive.googlecode.com
MFC 201250 (kientzle):
Reserve constants for RPM unwrapper and XAR reader.
MFC 201253 (kientzle):
Remove some test files that are no longer used.
MFC 202868 (kientzle):
Fix a memory leak when a filter fails to initialize.
MFC 202869 (kientzle):
Initialize the allocated 'struct zip'.
MFC 202871 (kientzle):
If we can't stat a file, return the correct ARCHIVE_FAILED (this entry can't
be processed any further) and a suitable error string.
In particular, this improves the error-reporting when cpio -o is
given a nonexistent filename.
MFC 202872 (kientzle):
Use a simpler memory-management strategy for the file objects.
Instead of trying to reference-count them and free them as soon
as they are no longer needed, we now just keep them around and free
them all when we release the archive object. This fixes a number
of minor memory leaks, especially when reading damaged archives.
MFC 202873 (kientzle):
Don't try to hardlink block or character device nodes that come out
of cpio archives.
MFC 203952 (uqs):
Add missing newline in last line of file.
Uncovered via: fromcvs vs. svn
MFC 208027 (uqs):
mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the
bottom of the manpages and order them consistently.
GNU groff doesn't care about the ordering, and doesn't even mention
CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put
them.
Found by: mdocml lint run
MFC 208169 (kientzle):
Reorganize slightly in preparation for making lzma and bz2 support
conditional.
MFC 208184 (delphij):
Fix build.
MFC 208263 (kientzle):
Retry reads that fail with EINTR. This fixes a problem
with bsdtar failing on SIGINT.
MFC 213573 (uqs):
mdoc: drop redundant .Pp and .LP calls
They have no effect when coming in pairs, or before .Bl/.Bd
MFC 214822 (kientzle):
Clarify the naming: Methods that free an object should
be called "free". Retain the old "finish" names to preserve
source compatibility for now.
MFC 214867 (uqs):
Fix manpage markup.
MFC 214905 (kientzle):
If the Zip reader doesn't see a PK signature block
because there's inter-entry garbage, just scan forward
to find the next one. This allows us to handle a lot
of Zip archives that have been modified in-place.
Thanks to: Gleb Kurtsou for sending me a sample archive
MFC 216258 (kientzle):
Don't write data into an empty "file."
In particular, this check avoids a warning when
extracting directory entries from certain GNU tar
archives that store directory contents.
MFC 221472 (obrien):
libarchive is mixing libmd and libcrypto -- correct to use one or the other.
[mixing the two can be quite bad -- they define the same context structures,
but with differing structure members (and sizes)]
MFC 224152 (mm):
- Update libarchive to 2.8.4
- Add support for extracting xar and rpm archives
- Add libarchive_fe subdir (common code for tar and cpio)
MFC: r224117
The new NFSv4 client handled NFSERR_GRACE as a fatal error
for the remove and rename operations. Some NFSv4 servers will
report NFSERR_GRACE for these operations. This patch changes
the behaviour of the client so that it handles NFSERR_GRACE
like NFSERR_DELAY for non-state related operations like
remove and rename. It also exempts the delegreturn operation
from handling within newnfs_request() for NFSERR_DELAY/NFSERR_GRACE
so that it can handle NFSERR_GRACE in the same manner as before.
This problem was resolved thanks to discussion with bfields at fieldses.org.
The problem was identified at the recent NFSv4 ineroperability
bakeathon.
r224283:
Do not try to execute FLUSHCACHE on close and print extra messages for
invalidated (considered lost) ada device. Exactly same already done for
the da devices.
MFC r224250:
Fix `diskinfo -t` operation for disks smaller then 8GB or bigger then 2TB.
Tested to work with 1.44MB floppy, 4GB USB stick and 4TB disk array.
MFC r224270:
- Use mutex to serialize index/data register pair usage, when
accessing SATA registers. Unserialized access under heavy load caused
wrong speed reporting and potentially could cause device loss.
- To free memory and other resources (including above), allocated
during chipinit() method call on attach, add new chipdeinit() method,
called during driver detach.
Add a -l option to show file system's corresponding /dev/ufsid path.
This is useful for scripts that converts existing system's fstab to
use their /dev/ufsid devices.