]> git.proxmox.com Git - mirror_zfs.git/commit - include/sys/zfs_ioctl.h
Replace zpool_events_next() "block" parm w/ "flags"
authorChris Dunlap <cdunlap@llnl.gov>
Wed, 12 Feb 2014 18:30:18 +0000 (10:30 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 31 Mar 2014 23:11:21 +0000 (16:11 -0700)
commit8c7aa0cfc47578d1d38f80ecb7c66eed7cde5c59
tree3f4f8ec16357c89941b544adcd7009a57d0e4893
parent07917db9908516aa3fd55d39d2c1792aca8bebcd
Replace zpool_events_next() "block" parm w/ "flags"

zpool_events_next() can be called in blocking mode by specifying a
non-zero value for the "block" parameter.  However, the design of
the ZFS Event Daemon (zed) requires additional functionality from
zpool_events_next().  Instead of adding additional arguments to the
function, it makes more sense to use flags that can be bitwise-or'd
together.

This commit replaces the zpool_events_next() int "block" parameter with
an unsigned bitwise "flags" parameter.  It also defines ZEVENT_NONE
to specify the default behavior.  Since non-blocking mode can be
specified with the existing ZEVENT_NONBLOCK flag, the default behavior
becomes blocking mode.  This, in effect, inverts the previous use
of the "block" parameter.  Existing callers of zpool_events_next()
have been modified to check for the ZEVENT_NONBLOCK flag.

Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #2
cmd/zpool/zpool_main.c
include/libzfs.h
include/sys/zfs_ioctl.h
lib/libzfs/libzfs_pool.c