<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/cmd, branch zfs-0.6.3</title>
<subtitle>FreeBSD source tree</subtitle>
<id>http://cgit.freebsd.org/src/atom?h=zfs-0.6.3</id>
<link rel='self' href='http://cgit.freebsd.org/src/atom?h=zfs-0.6.3'/>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<updated>2014-06-06T19:30:35Z</updated>
<entry>
<title>Only automatically mount a clone when 'canmount == on'.</title>
<updated>2014-06-06T19:30:35Z</updated>
<author>
<name>Turbo Fredriksson</name>
<email>turbo@bayour.com</email>
</author>
<published>2014-06-06T14:59:11Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=480f62655d2a4c8fa9e3cf12f1245b455edac349'/>
<id>urn:sha1:480f62655d2a4c8fa9e3cf12f1245b455edac349</id>
<content type='text'>
According to the man page, "When the noauto option is set, a dataset
can only be mounted and unmounted explicitly. The dataset is not
mounted automatically when the dataset is created or imported ...."

When cloning a dataset the canmount property was not being honored.
This patch adds the required check to achieve the behavior described
in the man page.

Signed-off-by: Turbo Fredriksson &lt;turbo@bayour.com&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #2241
</content>
</entry>
<entry>
<title>Remove superfluous statement</title>
<updated>2014-05-31T00:02:37Z</updated>
<author>
<name>Richard Yao</name>
<email>ryao@gentoo.org</email>
</author>
<published>2014-04-23T04:04:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2024041b6c5134a925a33c10eff24a47ecb541a6'/>
<id>urn:sha1:2024041b6c5134a925a33c10eff24a47ecb541a6</id>
<content type='text'>
Clang's static analyzer reported that the value assigned to pcksum is
never used. That is because we initialize both zc and pcksum to {{ 0 }}
and then do `pcksum = zc;`. That is fairly pointless. However, it has
the effect of generating a false positive in Clang's static analyzer.
Since noise from false positives can obscure real issues, we fix it
anyway.

Signed-off-by: Richard Yao &lt;ryao@gentoo.org&gt;
Signed-off-by: Ned Bass &lt;bass6@llnl.gov&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Issue #2330
</content>
</entry>
<entry>
<title>Added INTEL SSD 530 Series</title>
<updated>2014-05-19T23:57:14Z</updated>
<author>
<name>John Albietz</name>
<email>inthecloud247@gmail.com</email>
</author>
<published>2014-03-11T23:39:35Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5f3c101b8ff05a5af9e83a5e86b5019bd6b02a3c'/>
<id>urn:sha1:5f3c101b8ff05a5af9e83a5e86b5019bd6b02a3c</id>
<content type='text'>
INTEL SSD 530 Series... SSDSC2BW24

Signed-off-by: John Albietz &lt;inthecloud247@gmail.com&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #2184
</content>
</entry>
<entry>
<title>Handle ZPOOL_STATUS_HOSTID_MISMATCH in zpool status</title>
<updated>2014-05-19T17:16:29Z</updated>
<author>
<name>Richard Yao</name>
<email>ryao@gentoo.org</email>
</author>
<published>2014-05-17T13:35:10Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1cbae971c5ef215d1036b65511a839879e446c4c'/>
<id>urn:sha1:1cbae971c5ef215d1036b65511a839879e446c4c</id>
<content type='text'>
Verbatim imports can cause hostid mismatches, but things otherwise work. `zpool
status` does not handle this and will fail when assertions are enabled:

```
zpool: ../../cmd/zpool/zpool_main.c:4418: status_callback: Assertion `reason == ZPOOL_STATUS_OK' failed.

Program received signal SIGABRT, Aborted.
```

Lets instead add a case to display an informative message such as this:

```
  pool: rpool
 state: ONLINE
status: Mismatch between pool hostid and system hostid on imported pool.
        This pool was previously imported into a system with a different hostid,
        and then was verbatim imported into this system.
action: Export this pool on all systems on which it is imported.
        Then import it to correct the mismatch.
   see: http://zfsonlinux.org/msg/ZFS-8000-EY
  scan: scrub repaired 0 in 0h8m with 0 errors on Thu Apr 17 19:43:57 2014
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          sda       ONLINE       0     0     0

errors: No known data errors
```

Signed-off-by: Richard Yao &lt;ryao@gentoo.org&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #2342
</content>
</entry>
<entry>
<title>Check the dataset type more rigorously when fetching properties.</title>
<updated>2014-05-06T17:41:46Z</updated>
<author>
<name>Tim Chase</name>
<email>tim@chase2k.com</email>
</author>
<published>2014-04-21T18:22:08Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=962d52421236fc9cd61d59b4f18cff3276077da9'/>
<id>urn:sha1:962d52421236fc9cd61d59b4f18cff3276077da9</id>
<content type='text'>
When fetching property values of snapshots, a check against the head
dataset type must be performed.  Previously, this additional check was
performed only when fetching "version", "normalize", "utf8only" or "case".

This caused the ZPL properties "acltype", "exec", "devices", "nbmand",
"setuid" and "xattr" to be erroneously displayed with meaningless values
for snapshots of volumes.  It also did not allow for the display of
"volsize" of a snapshot of a volume.

This patch adds the headcheck flag paramater to zfs_prop_valid_for_type()
and zprop_valid_for_type() to indicate the check is being done
against a head dataset's type in order that properties valid only for
snapshots are handled correctly.  This allows the the head check in
get_numeric_property() to be performed when fetching a property for
a snapshot.

Signed-off-by: Tim Chase &lt;tim@chase2k.com&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #2265
</content>
</entry>
<entry>
<title>ztest: Switch to LWP rwlock interface</title>
<updated>2014-05-01T22:53:58Z</updated>
<author>
<name>Richard Yao</name>
<email>ryao@gentoo.org</email>
</author>
<published>2014-04-30T16:51:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7809eb8b65bec8e8ea09b2ea645d320e0b3a1710'/>
<id>urn:sha1:7809eb8b65bec8e8ea09b2ea645d320e0b3a1710</id>
<content type='text'>
ztest is intended to subject the ZFS code in userland to stress that it
should be able to withstand. Any failures that occur when running it are
failures that likely would occur inside the kernel. However, being in
userland, it is much easier to debug them. In practice, this prevents
a large number of problems from reaching production code.

A design decision was made by the original authors of ztest to make a
distinction between userland locking primitives and kernel locking
primitives. The ztest code itself calls userland locking primitives
while the kernel code being run in userland will call emulated kernel
locking primitives that wrap the userland locking primitives.

When ztest was first ported to Linux, a decision was made to use the
emulated kernel interfaces everywhere. In effect, the userland
rw_rdlock()/rw_wrlock() became the kernel rw_enter() and and the userland
rw_unlock() became the kernel rw_exit(). This caused a regression
because of an assertion in rw_enter() to catch recursive locking. That
is permitted in userland, but not in the kernel. Consequently, the ztest
code itself does recursive read locking. The use of the emulated kernel
interfaces consequently caused the following failure:

ztest: ../../lib/libzpool/kernel.c:384: Assertion `rwlp-&gt;rw_owner !=
zk_thread_current() (0x1c87150 != 0x1c87150)' failed.

That occurs because ztest_dmu_objset_create_destroy() will take a read
lock and call ztest_dmu_object_alloc_free(). That will call ztest_io(),
which will take a readlock only when asked to do ZTEST_IO_REWRITE. This
triggered the assertion.

The pthreads rwlock interface was based on the LWP rwlock interface
implemented in Illumos libc. Luckily enough, the subset used by ztest is
almost identical, so we can solve this problem by switching to the LWP
thread rwlock interface in ztest. This eliminates a point of divergence
with Illumos and should make code sharing slightly easier.

Signed-off-by: Richard Yao &lt;ryao@gentoo.org&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #1970
</content>
</entry>
<entry>
<title>Fix libblkid ZFS detection when making new pools</title>
<updated>2014-05-01T20:26:33Z</updated>
<author>
<name>Richard Yao</name>
<email>ryao@gentoo.org</email>
</author>
<published>2014-04-28T23:27:58Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c6e924fea8fd2abc1359ad08e51bf326cbeb3ed4'/>
<id>urn:sha1:c6e924fea8fd2abc1359ad08e51bf326cbeb3ed4</id>
<content type='text'>
zfsonlinux/zfs@1db7b9be75a225cedb3b7a60028ca5695e5b8346 should have
fixed this, but this particular string was overlooked.

Signed-off-by: Richard Yao &lt;ryao@gentoo.org&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #2288
</content>
</entry>
<entry>
<title>Replace zed_file_create_dirs() with mkdirp()</title>
<updated>2014-04-09T20:32:54Z</updated>
<author>
<name>Chris Dunlap</name>
<email>cdunlap@llnl.gov</email>
</author>
<published>2014-04-08T22:31:36Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6ac770b1961b9468daf0c69eae6515c608535789'/>
<id>urn:sha1:6ac770b1961b9468daf0c69eae6515c608535789</id>
<content type='text'>
When processing directory components starting from the root dir,
zed_file_create_dirs() contained a bug in checking the return value of
mkdir().  A typo was made, and the test for (mkdir_errno != EEXIST) was
erroneously written as (mkdir_errno == EEXIST).  If some of the leading
directory components already existed, this bug would cause the routine
to exit before creating the remaining directory components.

Instead of fixing the above mkdir_errno test, this commit replaces
zed_file_create_dirs() with mkdirp().  This cleanup was already
planned, and zed_file_create_dirs() only existed because I didn't
realize mkdirp() was already in tree at the time.

Signed-off-by: Chris Dunlap &lt;cdunlap@llnl.gov&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #2248
</content>
</entry>
<entry>
<title>Fix for re-reading /etc/mtab.</title>
<updated>2014-04-04T16:46:20Z</updated>
<author>
<name>John M. Layman</name>
<email>jml@frijid.net</email>
</author>
<published>2014-03-26T17:17:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=cbca6076b33e3d1af330e0e1f00cbf1baaf26d82'/>
<id>urn:sha1:cbca6076b33e3d1af330e0e1f00cbf1baaf26d82</id>
<content type='text'>
This is a continuation of fb5c53ea65b75c67c23f90ebbbb1134a5bb6c140:

    When /etc/mtab is updated on Linux it's done atomically with
    rename(2).  A new mtab is written, the existing mtab is unlinked,
    and the new mtab is renamed to /etc/mtab.  This means that we
    must close the old file and open the new file to get the updated
    contents.  Using rewind(3) will just move the file pointer back
    to the start of the file, freopen(3) will close and open the file.

In this commit, a few more rewind(3) calls were replaced with freopen(3)
to allow updated mtab entries to be picked up immediately.

Signed-off-by: John M. Layman &lt;jml@frijid.net&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #2215
Issue #1611
</content>
</entry>
<entry>
<title>Replace check for _POSIX_MEMLOCK w/ HAVE_MLOCKALL</title>
<updated>2014-04-02T20:10:08Z</updated>
<author>
<name>Chris Dunlap</name>
<email>cdunlap@llnl.gov</email>
</author>
<published>2014-04-01T21:21:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=518eba14928ddf2c1871d33d4b0cdff7ec45bc23'/>
<id>urn:sha1:518eba14928ddf2c1871d33d4b0cdff7ec45bc23</id>
<content type='text'>
zed supports a '-M' cmdline opt to lock all pages in memory via
mlockall().  The _POSIX_MEMLOCK define is checked to determine whether
this function is supported.  The current test assumes mlockall()
is supported if _POSIX_MEMLOCK is non-zero.  However, this test is
insufficient according to mlock(2) and sysconf(3).  If _POSIX_MEMLOCK
is -1, mlockall() is not supported; but if _POSIX_MEMLOCK is 0,
availability must be checked at runtime.

This commit adds an autoconf check for mlockall() to user.m4.  The zed
code block for mlockall() is now guarded with a test for HAVE_MLOCKALL.
If defined, mlockall() will be called and its runtime availability
checked via its return value.

Signed-off-by: Chris Dunlap &lt;cdunlap@llnl.gov&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Issue #2
</content>
</entry>
</feed>
