1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-25 16:13:17 +00:00
freebsd/sys
Andriy Gapon 2c51c83bc8 l2arc: restore correct rounding up of asize of compressed data
This rounding up was lost in a mismerge of illumos code.
See r268075 MFV r267565.
After that commit zio_compress_data() no longer performs any compressed
size adjustment, so it needs to be done externally.  On FreeBSD we round
up the size using vdev_ashift rather than SPA_MINBLOCKSIZE so that 4KB
devices are properly supported.

Additionally, zero out the buffer tail only if compression succeeds.
The compression is considered successful if the size of compressed
data after rounding up to account for the vdev ashift is less than the
original data size.  It does not make sense to have the data compressed
if all the savings are lost to rounding up.
With the new zio_compress_data() it could have been possible that the
rounded compressed size would be greater than the original size and thus
we could zero beyond the allocated buffer if the zeroing code was kept
at the original place.

Discussed with:	delphij, gibbs
MFC after:	2 weeks
X-MFC with:	r274627
2014-11-17 14:45:42 +00:00
..
amd64 Enable the use of VM_PHYSSEG_SPARSE on amd64 and i386, making it the default 2014-11-15 23:40:44 +00:00
arm No functional changes. Remove a couple outdated or inane comments and 2014-11-16 21:39:56 +00:00
boot MFi386: r274398 2014-11-15 03:34:34 +00:00
bsm
cam Fix check for vendor-specific peripheral qualifier. 2014-11-13 18:15:05 +00:00
cddl l2arc: restore correct rounding up of asize of compressed data 2014-11-17 14:45:42 +00:00
compat Remove the no-at variants of the kern_xx() syscall helpers. E.g., we 2014-11-13 18:01:51 +00:00
conf Automate options INET/INET6 turning into MK_$opt_SUPPORT 2014-11-14 21:10:45 +00:00
contrib krping: In verbose mode print only first 128 bytes of krping data. 2014-10-27 22:41:55 +00:00
crypto Fix gcc build: preserve const qualifier when casting input values. 2014-11-11 13:37:28 +00:00
ddb ddb: ANSI-fy function declarations. 2014-10-12 18:01:52 +00:00
dev Fix r273112: do not turn DROP_EN by default. 2014-11-16 18:08:00 +00:00
fs ifdef ext2_print_inode which is not really used. 2014-11-12 16:23:56 +00:00
gdb Add support for gdb's memory searching capabilities to our in-kernel gdb 2014-09-05 16:40:47 +00:00
geom Add missing privilege check when setting the dump device. Before that change it 2014-11-11 04:48:09 +00:00
gnu reiserfs: Use signed i_nlink 2014-09-25 19:10:32 +00:00
i386 Enable the use of VM_PHYSSEG_SPARSE on amd64 and i386, making it the default 2014-11-15 23:40:44 +00:00
isa
kern prevent doing filter ops locking for staticly compiled filter ops... 2014-11-16 01:18:41 +00:00
kgssapi Avoid dynamic syscall overhead for statically compiled modules. 2014-10-26 19:42:44 +00:00
libkern Add a complete implementation of MurmurHash3. Tweak both implementations 2014-10-18 22:15:11 +00:00
mips Renove faith(4) and faithd(8) from base. It looks like industry 2014-11-09 21:33:01 +00:00
modules Automate options INET/INET6 turning into MK_$opt_SUPPORT 2014-11-14 21:10:45 +00:00
net Finish r274175: do control plane MTU tracking. 2014-11-17 01:05:29 +00:00
net80211 Fix multiple incorrect SYSCTL arguments in the kernel: 2014-10-21 07:31:21 +00:00
netgraph In preparation of merging projects/sendfile, transform bare access to 2014-11-12 09:57:15 +00:00
netinet Finish r274175: do control plane MTU tracking. 2014-11-17 01:05:29 +00:00
netinet6 Finish r274175: do control plane MTU tracking. 2014-11-17 01:05:29 +00:00
netipsec Count statistics for the specific address family. 2014-11-13 12:58:33 +00:00
netnatm
netpfil Finish r274315: remove union 'u' from struct pf_send_entry. 2014-11-09 17:01:54 +00:00
netsmb
nfs Avoid dynamic syscall overhead for statically compiled modules. 2014-10-26 19:42:44 +00:00
nfsclient Follow up to r225617. In order to maximize the re-usability of kernel code 2014-10-16 18:04:43 +00:00
nfsserver
nlm Avoid dynamic syscall overhead for statically compiled modules. 2014-10-26 19:42:44 +00:00
ofed In preparation of merging projects/sendfile, transform bare access to 2014-11-12 09:57:15 +00:00
opencrypto Fix build for kernels without COMPAT_FREEBSD32. 2014-09-22 17:32:27 +00:00
pc98 Renove faith(4) and faithd(8) from base. It looks like industry 2014-11-09 21:33:01 +00:00
powerpc Renove faith(4) and faithd(8) from base. It looks like industry 2014-11-09 21:33:01 +00:00
rpc In preparation of merging projects/sendfile, transform bare access to 2014-11-12 09:57:15 +00:00
security Replace dev_clone with cdevpriv(9) KPI in audit_pipe code. 2014-08-20 16:04:30 +00:00
sparc64 Renove faith(4) and faithd(8) from base. It looks like industry 2014-11-09 21:33:01 +00:00
sys prevent doing filter ops locking for staticly compiled filter ops... 2014-11-16 01:18:41 +00:00
teken
tools Allow the make_dtb script to work outside of a "make buildkernel" context 2014-08-30 22:39:15 +00:00
ufs When non-forced unmount or remount rw->ro is performed, writes on UFS 2014-11-02 13:14:55 +00:00
vm Enable the use of VM_PHYSSEG_SPARSE on amd64 and i386, making it the default 2014-11-15 23:40:44 +00:00
x86 MFamd64: Add support for extended FPU states on i386. This includes 2014-11-02 22:58:30 +00:00
xdr
xen xen: implement the privcmd user-space device 2014-10-22 17:07:20 +00:00
Makefile Remove "pci" from CSCOPEDIRS. 2014-09-23 06:32:19 +00:00