]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r260522, r260523, r261439, r261440, r261586, r264504, r264769, r265193,
authorloos <loos@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 16 May 2014 14:28:55 +0000 (14:28 +0000)
committerloos <loos@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 16 May 2014 14:28:55 +0000 (14:28 +0000)
commitf9d43c47e6746cf0746add650e33a6ff5d298c64
treeb14a08bae03e2fc4c713332584ca699f4e25b653
parent1def723b4e1de8f7f8326fb6340df0955d66d762
MFC r260522, r260523, r261439, r261440, r261586, r264504, r264769, r265193,
    r265194, r265197

r260522:
Add the manual page for geom_uncompress(4).

r260523:
Build the geom_uncompress(4) module by default.

Fix geom_uncompress(4) module loading.  Don't link zlib.c (which is a module
itself) directly.

r261439:
Remove some unnecessary code.  The offsets read from the first block are
overwritten a few lines bellow.

r261440:
Fix a logic error.  Because of this inflateReset() wasn't being called and
the output buffer wasn't being cleared between the inflate() calls,
producing zeroed output after the first inflate() call.

This fixes the read of mkuzip(8) images with geom_uncompress(4).

r261586:
Fix the build with DEBUG enabled.  Where possible, fix style(9) issues.

r264504:
Make sure not to do I/O for more than MAXPHYS bytes. Doing so can cause
problems in our providers, such as a KASSERT in md(4). We can initiate
I/O for more than MAXPHYS bytes if we've been given a BIO for MAXPHYS
bytes, the blocks from which we're reading couldn't be compressed and
we had compression in preceeding blocks resulting in misalignment of
the blocks we're trying to read relative to the sector. We're forced to
round up the I/O length to make it an multiple of the sector size.

When we detect the condition, we'll reduce the block count and perform
a "short" read. In g_uzip_done() we need to consider the original I/O
length and stop early if we're about to deflate a block that we didn't
read. By using bio_completed in the cloned BIO and not bio_length to
check for this, we automatically and gracefully handle short reads that
our providers may be doing on top of the short reads we may initiate
ourselves.

r264769:
Keep geom_uncompress(4) in line with geom_uzip(4), bring in the r264504 fix.

Make sure not to start I/O bigger than MAXPHYS bytes.

r265193:
Some style and whitespace fixes.  Reduce the difference between geom_uzip(4)
and geom_uncompress(4).  Now, they produce an almost clean diff(1) output.

Remove a duplicated variable from g_uncompress.c and an unnecessary header
from g_uzip.c.

r265194:
Actually the FEATURE() macro is defined on sys/sysctl.h.

r265197:
Fix a leak in g_uzip_taste().  After retrieve all the block offsets from
the uzip image, free the last data read.

git-svn-id: svn://svn.freebsd.org/base/stable/10@266220 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
share/man/man4/Makefile
share/man/man4/geom_uncompress.4 [new file with mode: 0644]
sys/geom/uncompress/g_uncompress.c
sys/geom/uzip/g_uzip.c
sys/modules/geom/Makefile
sys/modules/geom/geom_uncompress/Makefile