tst-zfs-mount.so: Disable reference count check

Commit 951cca4 ("Revert "vfs/zfs: Sync vnode and znode refcounts")
forgot to disable ZFS reference count test case.

Reported-by: Avi Kivity <avi@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
zfs: Set f_fsid in zfs_statfs

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
vfs/zfs: Add st_dev field support to stat

Tomek says:

Some programs rely on the fact that the (stat.st_ino, stat.st_dev) pair
uniquely identifies the file.
In OSv only st_ino is set by vn_stat(), st_dev is zeroed. It is possible that
files on different file systems will have the same inode number and hence
appear as referring to the same file.

Spotted during code inspection of openssl and vfs, I didn't run into any issue
related to that yet.

This patch addresses the issue #216

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
tests: Check st_dev and f_fsid validity

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Fix uma_zone cache regression

In commit 08835b4e608eddcbd0ce17e3ef7a813d7b239731, we turned off uma
allocation caching when CONF_debug_memory is on because it hid bugs.
Or at least, this is what was *intended*. What the patch actually did
was the opposite - it turned off the cache in the normal compilation!

This caused a deterioration of UDP memcached performance, from 159,000
to 131,000 req/sec. This was the second half of the recent memcached
performance deterioration (see issue #227).

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
x64: Fix duplicate ex_pf() declaration

There is a duplication in OSv exceptions.

Signed-off-by: Wangbicheng <wangbicheng@huawei.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
run: reuse command line in standalone images

If the user specifies an image, take the command line from there, instead
of looking for an unrelated build/release/cmdline.

TODO: support --verbose and friends using imgedit.py.

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
dhcp.hh: Replaced const with constexpr

Replaced all const specifiers with constexpr in dhcp.hh.

Signed-off-by: Andrei Preda <andreipreda07@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
scsi: Free req and data in scsi_common::exec_inquery

It is not freed after we're done with it.

Signed-off-by: Asias He <asias@cloudius-systems.com>
scsi: Intorduce req->free_by_driver flag

This is used to tell lower-level scsi driver to free the request,
otherwise the scsi layer will free the request.

read/write/flush scsi are async request, they are freed by the
lower-level scsi driver. Other scsi request are freed by the scsi layer.

Signed-off-by: Asias He <asias@cloudius-systems.com>
scsi: Introduce req->cdb_len

Set req->cdb_len to the actual size of the scsi command and only copy
the actual size of the command.

This reduces the number of bytes we copy.

This also fixes the warning in pvscsi which complains the size of the
cdb is larger than expected.

Signed-off-by: Asias He <asias@cloudius-systems.com>
scsi: Construct cdb in-place

Instead of copying a scsi cdb, construct it in-place.
This saves 16 bytes of memory copying on every read or write.

Signed-off-by: Asias He <asias@cloudius-systems.com>
apps: update for cassandra/jenkins integration

Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
trace: do not attempt to read across the pivot page

This is an optimization. We first check if the entry is valid using
the 'tp' field and only if it is we try to read the rest.

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
trace: encode and decode strings

Python3 became more restrictive with regards to string handling than
python2. In python3 strings no longer conform to byte array interface,
they have to be encoded explicitly. The current code throws exception
when run in python3.

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
gdb: remove dead import

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
gdb: use "int" type instead of "long"

There is no difference between them in python2 and python3 no
longer has "long".

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
gdb: use print with parentheses

Needed by python3.

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
gdb: create a wrapper for getting dict values

Python3 dicts do not have itervalues() or viewvalues(), they have values().

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>
gdb: apply 2to3 fixes which work with both versions

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Avi Kivity <avi@cloudius-systems.com>