<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libefi, branch zfs-0.7.0-rc2</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=zfs-0.7.0-rc2</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=zfs-0.7.0-rc2'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2016-07-27T20:31:22Z</updated>
<entry>
<title>Fixes for issues found with cppcheck tool</title>
<updated>2016-07-27T20:31:22Z</updated>
<author>
<name>Gvozden Neskovic</name>
<email>neskovic@gmail.com</email>
</author>
<published>2016-07-19T16:24:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a64f903b06e9135c07f20bc6f8196e2879d2cf57'/>
<id>urn:sha1:a64f903b06e9135c07f20bc6f8196e2879d2cf57</id>
<content type='text'>
The patch fixes small number of errors/false positives reported by `cppcheck`,
static analysis tool for C/C++.

cppcheck 1.72

$ cppcheck . --force --quiet
[cmd/zfs/zfs_main.c:4444]: (error) Possible null pointer dereference: who_perm
[cmd/zfs/zfs_main.c:4445]: (error) Possible null pointer dereference: who_perm
[cmd/zfs/zfs_main.c:4446]: (error) Possible null pointer dereference: who_perm
[cmd/zpool/zpool_iter.c:317]: (error) Uninitialized variable: nvroot
[cmd/zpool/zpool_vdev.c:1526]: (error) Memory leak: child
[lib/libefi/rdwr_efi.c:1118]: (error) Memory leak: efi_label
[lib/libuutil/uu_misc.c:207]: (error) va_list 'args' was opened but not closed by va_end().
[lib/libzfs/libzfs_import.c:1554]: (error) Dangerous usage of 'diskname' (strncpy doesn't always null-terminate it).
[lib/libzfs/libzfs_sendrecv.c:3279]: (error) Dereferencing 'cp' after it is deallocated / released
[tests/zfs-tests/cmd/file_write/file_write.c:154]: (error) Possible null pointer dereference: operation
[tests/zfs-tests/cmd/randfree_file/randfree_file.c:90]: (error) Memory leak: buf
[cmd/zinject/zinject.c:1068]: (error) Uninitialized variable: dataset
[module/icp/io/sha2_mod.c:698]: (error) Uninitialized variable: blocks_per_int64

Signed-off-by: Gvozden Neskovic &lt;neskovic@gmail.com&gt;
Signed-off-by: Chunwei Chen &lt;david.chen@osnexus.com&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #1392
</content>
</entry>
<entry>
<title>Add isa_defs for MIPS</title>
<updated>2016-05-31T16:05:40Z</updated>
<author>
<name>YunQiang Su</name>
<email>syq@debian.org</email>
</author>
<published>2016-05-28T12:33:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2493dca54e18b24bcd8b7ff5432f4dc51dddc472'/>
<id>urn:sha1:2493dca54e18b24bcd8b7ff5432f4dc51dddc472</id>
<content type='text'>
GCC for MIPS only defines _LP64 when 64bit,
while no _ILP32 defined when 32bit.

Signed-off-by: YunQiang Su &lt;syq@debian.org&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #4712
</content>
</entry>
<entry>
<title>Disable efi_debug in --enable-debug builds</title>
<updated>2016-04-25T18:13:26Z</updated>
<author>
<name>Brian Behlendorf</name>
<email>behlendorf1@llnl.gov</email>
</author>
<published>2016-04-20T18:39:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b8faf0cba87f90126e591d354945c79e7e7e3c6e'/>
<id>urn:sha1:b8faf0cba87f90126e591d354945c79e7e7e3c6e</id>
<content type='text'>
Disable the additional EFI debugging in all builds.  Some users
run debug builds in production and the extra log messages can
cause confusion.  Beyond that the log messages are rarely useful.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Signed-off-by: Tony Hutter &lt;hutter2@llnl.gov&gt;
Closes #4523
</content>
</entry>
<entry>
<title>Cleanup linking</title>
<updated>2016-03-18T20:31:11Z</updated>
<author>
<name>Richard Yao</name>
<email>ryao@gentoo.org</email>
</author>
<published>2016-03-15T17:28:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e853ba351935135487621f79211e87d5f2e39205'/>
<id>urn:sha1:e853ba351935135487621f79211e87d5f2e39205</id>
<content type='text'>
I noticed during code review of zfsonlinux/zfs#4385 that the author of a
commit had peppered the various Makefile.am files with `$(TIRPC_LIBS)`
when putting it into `lib/libspl/Makefile.am` should have sufficed. Upon
further examination, it seems that he had copied what we do with
`$(ZLIB)`. We also have a bit of that with `-ldl` too.  Unfortunately,
what we do is wrong, so lets fix it to set a good example for future
contributors.

In addition, we have multiple `-lz` and `-luuid` passed to the compiler
because each `AC_CHECK_LIB` adds it to `$LIBS`. That is somewhat
annoying to see, so we switch to `AC_SEARCH_LIBS` to avoid it.  This is
consistent with the recommendation to use `AC_SEARCH_LIBS` over
`AC_CHECK_LIB` by autotools upstream:

https://www.gnu.org/software/autoconf/manual/autoconf-2.66/html_node/Libraries.html

In an ideal world, this would translate into improvements in ELF's
`DT_NEEDED` entries, but that is not the case because of a couple of
bugs in libtool.

The first bug causes libtool to overlink by using static link
dependencies for dynamic linking:

https://wiki.mageia.org/en/Overlinking_issues_in_packaging#libtool_issues

The workaround for this should be to pass `-Wl,--as-needed` in
`LDFLAGS`. That leads us to the second bug, where libtool passes
`LDFLAGS` after the libraries are specified and `ld` will only honor
`--as-needed` on libraries specified before it:

https://sigquit.wordpress.com/2011/02/16/why-asneeded-doesnt-work-as-expected-for-your-libraries-on-your-autotools-project/

There are a few possible workarounds for the second bug. One is to
either patch the compiler spec file to specify `-Wl,--as-needed` or pass
`-Wl,--as-needed` via `CC` like `CC='gcc -Wl,--as-needed'` so that it is
specified early. Another is to patch ltmain.sh like Gentoo does:

https://gitweb.gentoo.org/repo/gentoo.git/tree/eclass/ELT-patches/as-needed

Without one of those workarounds, this cleanup provides no benefit in
terms of `DT_NEEDED` entry generation. It should still be an improvement
because it nicely simplifies the code while encouraging good habits when
patching autotools scripts.

Signed-off-by: Richard Yao &lt;ryao@gentoo.org&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #4426
</content>
</entry>
<entry>
<title>Add support for s390[x].</title>
<updated>2016-03-17T16:58:01Z</updated>
<author>
<name>Dimitri John Ledkov</name>
<email>xnox@ubuntu.com</email>
</author>
<published>2016-03-16T21:53:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a1bc34c0a7929130577e4c9dd418845674dd35c3'/>
<id>urn:sha1:a1bc34c0a7929130577e4c9dd418845674dd35c3</id>
<content type='text'>
Signed-off-by: Dimitri John Ledkov &lt;xnox@ubuntu.com&gt;
Signed-off-by: Richard Yao &lt;ryao@gentoo.org&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #4425
</content>
</entry>
<entry>
<title>Fix cstyle issue from 7a02327</title>
<updated>2015-12-04T22:37:41Z</updated>
<author>
<name>ilovezfs</name>
<email>ilovezfs@icloud.com</email>
</author>
<published>2015-12-03T10:40:27Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=25df831b8140883ac2759552d857149eadfd81f8'/>
<id>urn:sha1:25df831b8140883ac2759552d857149eadfd81f8</id>
<content type='text'>
Continuations should be indented four spaces.

Signed-off-by: ilovezfs &lt;ilovezfs@icloud.com&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #4062
</content>
</entry>
<entry>
<title>Ext4's typical GPT partition type not recognized</title>
<updated>2015-12-04T17:27:00Z</updated>
<author>
<name>ilovezfs</name>
<email>ilovezfs@icloud.com</email>
</author>
<published>2015-11-22T12:06:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=917b8c5cec074869a0bf4e9956b7d24f14221d84'/>
<id>urn:sha1:917b8c5cec074869a0bf4e9956b7d24f14221d84</id>
<content type='text'>
Adding additional entries to the efi conversion array will help prevent
the overwriting of the GPTs of disks with in-use file systems in more
cases. Most notably, this adds partition type 8300 "Linux filesystem"
(0FC63DAF-8483-4772-8E79-3D69D8477DE4), which is often used for ext4 and
btrfs, among others.

This commit itself does nothing to address the underlying problematic
behavior that check_slice() isn't called on partitions of an
unrecognized type, even when they contain a currently mounted file
system.

The additional entries were derived from these two resources:
https://en.wikipedia.org/wiki/GUID_Partition_Table
http://sourceforge.net/p/gptfdisk/code/ci/master/tree/parttypes.cc

Signed-off-by: ilovezfs &lt;ilovezfs@icloud.com&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Issue #4016
</content>
</entry>
<entry>
<title>Illumos 934 - FreeBSD's GPT not recognized</title>
<updated>2015-12-04T17:19:40Z</updated>
<author>
<name>Yuri Pankov</name>
<email>yuri.pankov@nexenta.com</email>
</author>
<published>2012-02-23T03:11:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fc80384923dde365ad40c6b6f5a7daa3e556b1e5'/>
<id>urn:sha1:fc80384923dde365ad40c6b6f5a7daa3e556b1e5</id>
<content type='text'>
Reviewed by: Alexander Eremin &lt;alexander.r.eremin@gmail.com&gt;
Reviewed by: Garrett D'Amore &lt;garrett@damore.org&gt;
Reviewed by: Andrew Stormont &lt;Andrew.Stormont@nexenta.com&gt;
Reviewed by: Richard Elling &lt;richard.elling@richardelling.com&gt;
Approved by: Gordon Ross &lt;gwr@nexenta.com&gt;

References:
  https://www.illumos.org/issues/934
  https://github.com/illumos/illumos-gate/commit/e21ea67

Ported-by: ilovezfs &lt;ilovezfs@icloud.com&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Issue #4016
</content>
</entry>
<entry>
<title>Fix zvol detection</title>
<updated>2015-08-19T20:32:57Z</updated>
<author>
<name>Richard Yao</name>
<email>richard.yao@clusterhq.com</email>
</author>
<published>2015-07-14T18:28:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9f5ba90f9fb0aa39de35afaf6e9f385c4ddd8865'/>
<id>urn:sha1:9f5ba90f9fb0aa39de35afaf6e9f385c4ddd8865</id>
<content type='text'>
The zpool create subcomand should not return an error on debug builds of
the userland tools when given zvols.

Signed-off-by: Richard Yao &lt;ryao@gentoo.org&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #3595
</content>
</entry>
<entry>
<title>Support parallel build trees (VPATH builds)</title>
<updated>2015-07-17T20:42:51Z</updated>
<author>
<name>Turbo Fredriksson</name>
<email>turbo@bayour.com</email>
</author>
<published>2014-06-09T21:55:31Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=47a4a6fd5fa1f1f60bcf6af19e453ecf0292f7d1'/>
<id>urn:sha1:47a4a6fd5fa1f1f60bcf6af19e453ecf0292f7d1</id>
<content type='text'>
Build products from an out of tree build should be written
relative to the build directory.  Sources should be referred
to by their locations in the source directory.

This is accomplished by adding the 'src' and 'obj' variables
for the module Makefile.am, using relative paths to reference
source files, and by setting VPATH when source files are not
co-located with the Makefile.  This enables the following:

  $ mkdir build
  $ cd build
  $ ../configure \
    --with-spl=$HOME/src/git/spl/ \
    --with-spl-obj=$HOME/src/git/spl/build
  $ make -s

This change also has the advantage of resolving the following
warning which is generated by modern versions of automake.

  Makefile.am:00: warning: source file 'xxx' is in a subdirectory,
  Makefile.am:00: but option 'subdir-objects' is disabled

Signed-off-by: Turbo Fredriksson &lt;turbo@bayour.com&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #1082
</content>
</entry>
</feed>
