<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/udev, branch zfs-0.7.0-rc4</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>Fix spelling</title>
<updated>2017-01-03T17:31:18+00:00</updated>
<author>
<name>ka7</name>
<email>ka7@la-evento.com</email>
</author>
<published>2017-01-03T17:31:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=4e33ba4c389f59b74138bf7130e924a4230d64e9'/>
<id>4e33ba4c389f59b74138bf7130e924a4230d64e9</id>
<content type='text'>
Reviewed-by: Brian Behlendorf &lt;behlendorf1@llnl.gov
Reviewed-by: Giuseppe Di Natale &lt;dinatale2@llnl.gov&gt;&gt;
Reviewed-by: George Melikov &lt;mail@gmelikov.ru&gt;
Reviewed-by: Haakan T Johansson &lt;f96hajo@chalmers.se&gt;
Closes #5547 
Closes #5543 
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed-by: Brian Behlendorf &lt;behlendorf1@llnl.gov
Reviewed-by: Giuseppe Di Natale &lt;dinatale2@llnl.gov&gt;&gt;
Reviewed-by: George Melikov &lt;mail@gmelikov.ru&gt;
Reviewed-by: Haakan T Johansson &lt;f96hajo@chalmers.se&gt;
Closes #5547 
Closes #5543 
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow partition aliases in vdev_id.conf (#5266)</title>
<updated>2016-10-14T23:11:16+00:00</updated>
<author>
<name>Brian Behlendorf</name>
<email>behlendorf1@llnl.gov</email>
</author>
<published>2016-10-14T23:11:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=dabb6f4fab38f5a729e8241425a5394ae7fd96d4'/>
<id>dabb6f4fab38f5a729e8241425a5394ae7fd96d4</id>
<content type='text'>
When pools are assembled from partitions, vdev_id.conf aliases
do not work.  The directory /dev/disk/by-vdev is not created because
the associated udev rule for parsing vdev_id.conf is never called.
Extend to logic to match "disk" and "partition".

Patch-proposed-by: @sparksh
Reviewed-by: Ned Bass &lt;bass6@llnl.gov&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #3859
Closes #5266 
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When pools are assembled from partitions, vdev_id.conf aliases
do not work.  The directory /dev/disk/by-vdev is not created because
the associated udev rule for parsing vdev_id.conf is never called.
Extend to logic to match "disk" and "partition".

Patch-proposed-by: @sparksh
Reviewed-by: Ned Bass &lt;bass6@llnl.gov&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #3859
Closes #5266 
</pre>
</div>
</content>
</entry>
<entry>
<title>Set proper dependency for string replacement targets</title>
<updated>2016-08-02T17:28:29+00:00</updated>
<author>
<name>Chunwei Chen</name>
<email>david.chen@osnexus.com</email>
</author>
<published>2016-07-29T23:35:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5b1bc1a1d8ae284f834f239ab0309c6ce96ab74f'/>
<id>5b1bc1a1d8ae284f834f239ab0309c6ce96ab74f</id>
<content type='text'>
A lot of string replacement target don't have dependency or incorrect
dependency. We setup proper dependency by pattern rules.

Signed-off-by: Chunwei Chen &lt;david.chen@osnexus.com&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #4908
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A lot of string replacement target don't have dependency or incorrect
dependency. We setup proper dependency by pattern rules.

Signed-off-by: Chunwei Chen &lt;david.chen@osnexus.com&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #4908
</pre>
</div>
</content>
</entry>
<entry>
<title>Add `zfs allow` and `zfs unallow` support</title>
<updated>2016-06-07T16:16:52+00:00</updated>
<author>
<name>Brian Behlendorf</name>
<email>behlendorf1@llnl.gov</email>
</author>
<published>2016-06-07T16:16:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f74b821a6696fef9e9953aae05941e99bf83800e'/>
<id>f74b821a6696fef9e9953aae05941e99bf83800e</id>
<content type='text'>
ZFS allows for specific permissions to be delegated to normal users
with the `zfs allow` and `zfs unallow` commands.  In addition, non-
privileged users should be able to run all of the following commands:

  * zpool [list | iostat | status | get]
  * zfs [list | get]

Historically this functionality was not available on Linux.  In order
to add it the secpolicy_* functions needed to be implemented and mapped
to the equivalent Linux capability.  Only then could the permissions on
the `/dev/zfs` be relaxed and the internal ZFS permission checks used.

Even with this change some limitations remain.  Under Linux only the
root user is allowed to modify the namespace (unless it's a private
namespace).  This means the mount, mountpoint, canmount, unmount,
and remount delegations cannot be supported with the existing code.  It
may be possible to add this functionality in the future.

This functionality was validated with the cli_user and delegation test
cases from the ZFS Test Suite.  These tests exhaustively verify each
of the supported permissions which can be delegated and ensures only
an authorized user can perform it.

Two minor bug fixes were required for test-running.py.  First, the
Timer() object cannot be safely created in a `try:` block when there
is an unconditional `finally` block which references it.  Second,
when running as a normal user also check for scripts using the
both the .ksh and .sh suffixes.

Finally, existing users who are simulating delegations by setting
group permissions on the /dev/zfs device should revert that
customization when updating to a version with this change.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Signed-off-by: Tony Hutter &lt;hutter2@llnl.gov&gt;
Closes #362 
Closes #434 
Closes #4100
Closes #4394 
Closes #4410 
Closes #4487 </content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ZFS allows for specific permissions to be delegated to normal users
with the `zfs allow` and `zfs unallow` commands.  In addition, non-
privileged users should be able to run all of the following commands:

  * zpool [list | iostat | status | get]
  * zfs [list | get]

Historically this functionality was not available on Linux.  In order
to add it the secpolicy_* functions needed to be implemented and mapped
to the equivalent Linux capability.  Only then could the permissions on
the `/dev/zfs` be relaxed and the internal ZFS permission checks used.

Even with this change some limitations remain.  Under Linux only the
root user is allowed to modify the namespace (unless it's a private
namespace).  This means the mount, mountpoint, canmount, unmount,
and remount delegations cannot be supported with the existing code.  It
may be possible to add this functionality in the future.

This functionality was validated with the cli_user and delegation test
cases from the ZFS Test Suite.  These tests exhaustively verify each
of the supported permissions which can be delegated and ensures only
an authorized user can perform it.

Two minor bug fixes were required for test-running.py.  First, the
Timer() object cannot be safely created in a `try:` block when there
is an unconditional `finally` block which references it.  Second,
when running as a normal user also check for scripts using the
both the .ksh and .sh suffixes.

Finally, existing users who are simulating delegations by setting
group permissions on the /dev/zfs device should revert that
customization when updating to a version with this change.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Signed-off-by: Tony Hutter &lt;hutter2@llnl.gov&gt;
Closes #362 
Closes #434 
Closes #4100
Closes #4394 
Closes #4410 
Closes #4487 </pre>
</div>
</content>
</entry>
<entry>
<title>Support parallel build trees (VPATH builds)</title>
<updated>2015-07-17T20:42:51+00:00</updated>
<author>
<name>Turbo Fredriksson</name>
<email>turbo@bayour.com</email>
</author>
<published>2014-06-09T21:55:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=47a4a6fd5fa1f1f60bcf6af19e453ecf0292f7d1'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Open pools asynchronously after module load</title>
<updated>2013-07-03T16:24:38+00:00</updated>
<author>
<name>Brian Behlendorf</name>
<email>behlendorf1@llnl.gov</email>
</author>
<published>2013-07-02T18:59:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=91604b298c24c84fe03bc6c028abb961ca3e6fcf'/>
<id>91604b298c24c84fe03bc6c028abb961ca3e6fcf</id>
<content type='text'>
One of the side effects of calling zvol_create_minors() in
zvol_init() is that all pools listed in the cache file will
be opened.  Depending on the state and contents of your pool
this operation can take a considerable length of time.

Doing this at load time is undesirable because the kernel
is holding a global module lock.  This prevents other modules
from loading and can serialize an otherwise parallel boot
process.  Doing this after module inititialization also
reduces the chances of accidentally introducing a race
during module init.

To ensure that /dev/zvol/&lt;pool&gt;/&lt;dataset&gt; devices are
still automatically created after the module load completes
a udev rules has been added.  When udev notices that the
/dev/zfs device has been create the 'zpool list' command
will be run.  This then will cause all the pools listed
in the zpool.cache file to be opened.

Because this process in now driven asynchronously by udev
there is the risk of problems in downstream distributions.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Issue #756
Issue #1020
Issue #1234
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One of the side effects of calling zvol_create_minors() in
zvol_init() is that all pools listed in the cache file will
be opened.  Depending on the state and contents of your pool
this operation can take a considerable length of time.

Doing this at load time is undesirable because the kernel
is holding a global module lock.  This prevents other modules
from loading and can serialize an otherwise parallel boot
process.  Doing this after module inititialization also
reduces the chances of accidentally introducing a race
during module init.

To ensure that /dev/zvol/&lt;pool&gt;/&lt;dataset&gt; devices are
still automatically created after the module load completes
a udev rules has been added.  When udev notices that the
/dev/zfs device has been create the 'zpool list' command
will be run.  This then will cause all the pools listed
in the zpool.cache file to be opened.

Because this process in now driven asynchronously by udev
there is the risk of problems in downstream distributions.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Issue #756
Issue #1020
Issue #1234
</pre>
</div>
</content>
</entry>
<entry>
<title>Retire zpool_id infrastructure</title>
<updated>2013-01-29T20:23:17+00:00</updated>
<author>
<name>Brian Behlendorf</name>
<email>behlendorf1@llnl.gov</email>
</author>
<published>2013-01-29T18:53:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=dbf763b39b232996f0d6bb0022e4446643c18e05'/>
<id>dbf763b39b232996f0d6bb0022e4446643c18e05</id>
<content type='text'>
In the interest of maintaining only one udev helper to give vdevs
user friendly names, the zpool_id and zpool_layout infrastructure
is being retired.  They are superseded by vdev_id which incorporates
all the previous functionality.

Documentation for the new vdev_id(8) helper and its configuration
file, vdev_id.conf(5), can be found in their respective man pages.
Several useful example files are installed under /etc/zfs/.

  /etc/zfs/vdev_id.conf.alias.example
  /etc/zfs/vdev_id.conf.multipath.example
  /etc/zfs/vdev_id.conf.sas_direct.example
  /etc/zfs/vdev_id.conf.sas_switch.example

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #981
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the interest of maintaining only one udev helper to give vdevs
user friendly names, the zpool_id and zpool_layout infrastructure
is being retired.  They are superseded by vdev_id which incorporates
all the previous functionality.

Documentation for the new vdev_id(8) helper and its configuration
file, vdev_id.conf(5), can be found in their respective man pages.
Several useful example files are installed under /etc/zfs/.

  /etc/zfs/vdev_id.conf.alias.example
  /etc/zfs/vdev_id.conf.multipath.example
  /etc/zfs/vdev_id.conf.sas_direct.example
  /etc/zfs/vdev_id.conf.sas_switch.example

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #981
</pre>
</div>
</content>
</entry>
<entry>
<title>Update 69-vdev.rules .gitignore</title>
<updated>2012-12-14T20:16:42+00:00</updated>
<author>
<name>Brian Behlendorf</name>
<email>behlendorf1@llnl.gov</email>
</author>
<published>2012-12-14T19:45:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=bd192c4f4831fae78f9dc3264b8c1a9b6dc85307'/>
<id>bd192c4f4831fae78f9dc3264b8c1a9b6dc85307</id>
<content type='text'>
Commit 2957f38 renamed 60-vdev.rules to 69-vdev.rules but failed
to update the .gitignore file to reflect this change.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 2957f38 renamed 60-vdev.rules to 69-vdev.rules but failed
to update the .gitignore file to reflect this change.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vdev_id support for device link aliases</title>
<updated>2012-12-03T22:04:47+00:00</updated>
<author>
<name>Ned Bass</name>
<email>bass6@llnl.gov</email>
</author>
<published>2012-11-29T19:08:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2957f38d78d376431ab18d2f576099d682d7a711'/>
<id>2957f38d78d376431ab18d2f576099d682d7a711</id>
<content type='text'>
Add a vdev_id feature to map device names based on already defined
udev device links.  To increase the odds that vdev_id will run after
the rules it depends on, increase the vdev.rules rule number from 60
to 69.  With this change, vdev_id now provides functionality analogous
to zpool_id and zpool_layout, paving the way to retire those tools.

A defined alias takes precedence over a topology-derived name, but the
two naming methods can otherwise coexist. For example, one might name
drives in a JBOD with the sas_direct topology while naming an internal
L2ARC device with an alias.

For example, the following lines in vdev_id.conf will result in the
creation of links /dev/disk/by-vdev/{d1,d2}, each pointing to the same
target as the device link specified in the third field.

  #     by-vdev
  #     name     fully qualified or base name of device link
  alias d1       /dev/disk/by-id/wwn-0x5000c5002de3b9ca
  alias d2       wwn-0x5000c5002def789e

Also perform some minor vdev_id cleanup, such as removal of the unused
-s command line option.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #981
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a vdev_id feature to map device names based on already defined
udev device links.  To increase the odds that vdev_id will run after
the rules it depends on, increase the vdev.rules rule number from 60
to 69.  With this change, vdev_id now provides functionality analogous
to zpool_id and zpool_layout, paving the way to retire those tools.

A defined alias takes precedence over a topology-derived name, but the
two naming methods can otherwise coexist. For example, one might name
drives in a JBOD with the sas_direct topology while naming an internal
L2ARC device with an alias.

For example, the following lines in vdev_id.conf will result in the
creation of links /dev/disk/by-vdev/{d1,d2}, each pointing to the same
target as the device link specified in the third field.

  #     by-vdev
  #     name     fully qualified or base name of device link
  alias d1       /dev/disk/by-id/wwn-0x5000c5002de3b9ca
  alias d2       wwn-0x5000c5002def789e

Also perform some minor vdev_id cleanup, such as removal of the unused
-s command line option.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #981
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix hard coded path in 60-vdev.rules.in</title>
<updated>2012-11-13T20:04:15+00:00</updated>
<author>
<name>Richard Yao</name>
<email>ryao@cs.stonybrook.edu</email>
</author>
<published>2012-11-12T17:34:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2af96a5df53cfc281dc5c5f72eac5bb2b1739733'/>
<id>2af96a5df53cfc281dc5c5f72eac5bb2b1739733</id>
<content type='text'>
The udev data directory was hard coded in 60-vdev.rules.in. That causes
a problem when a distribution changes the location of the directory.
This was not an issue in the past because virtually all distributions
used the same path, but that is beginning to change following a decision
by the systemd developers to change the directory location to reflect
their take-over of udev maintainership. The testing branch of Gentoo
Linux adopted this change, which enabled the hardcoded directory
location to trigger a regression.

Signed-off-by: Richard Yao &lt;ryao@cs.stonybrook.edu&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #1085
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The udev data directory was hard coded in 60-vdev.rules.in. That causes
a problem when a distribution changes the location of the directory.
This was not an issue in the past because virtually all distributions
used the same path, but that is beginning to change following a decision
by the systemd developers to change the directory location to reflect
their take-over of udev maintainership. The testing branch of Gentoo
Linux adopted this change, which enabled the hardcoded directory
location to trigger a regression.

Signed-off-by: Richard Yao &lt;ryao@cs.stonybrook.edu&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #1085
</pre>
</div>
</content>
</entry>
</feed>
