- Dec 19, 2013
-
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Vlad Zolotarov authored
Added ifnet->if_get_if_info() method to collect the internally gathered statistics into the standard if_data struct. Signed-off-by:
Vlad Zolotarov <vladz@cloudius-systems.com> Reviewed-by:
Asias He <asias@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Vlad Zolotarov authored
Added IFCAP_HWSTATS iface capability indicating that device driver and HW are capable to handle the statistics internally. Signed-off-by:
Vlad Zolotarov <vladz@cloudius-systems.com> Reviewed-by:
Asias He <asias@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
Over the process of creating a zpool, history_str_get() will be eventually called by zfs_ioc_pool_create(). history_str_get() will not work as expected as it fully relies on the function copyinstr() which is currently unimplemented. After that, spa_create() will be called with history_str storing trash, thus making the spa_history_log filled with completely wrong entries. Let's fix this problem simply by implementing copyinstr. By the way, copystr has basically the same semantics as copyinstr, so let's implement it as well. It's not being used anywhere, but who knows? It might be needed in the future by some bsd compliant application. As far as I know, this problem didn't manifest *visibly* anywhere as the spa history log wasn't intentionally used by us yet. I found the problem while auditing code. Signed-off-by:
Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Dec 16, 2013
-
-
Avi Kivity authored
bsd defines some m_ macros, for example m_flags, to save some typing. However if you have a variable of the same name in another header, for example m_flags, have fun trying to compile your code. Expand the code in place and eliminate the macros. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
The bsd specific ones are nenumbered to avoid clashes. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Since most SOL_* macros are equivalent to the IPPROTO_* defines, only one define needs to be changed. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Move them to a common include file. Since they're defined externally, there is no real conflict. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Unused. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Dec 12, 2013
-
-
Avi Kivity authored
Fix a unicode character in the author's name. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Vlad authored
Fix some compilation errors that would arrise when NDEBUG is defined: - tests/misc-tcp.cc: missing #include<iostream> that would come from include/boost/assert.hpp: line 81 when NDEBUG is not defined. - bsd/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c: when NDEBUG is not defined assert() is defined to __assert_fail, which has "noreturn" attribute, which satisfies the compiler. When NDEBUG is defined and assert() completly compiles out, the compiler start complaining about the missing "return" statment. Signed-off-by:
Vlad Zolotarov <vladz@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Dec 10, 2013
-
-
Raphael S. Carvalho authored
Currently, namei() does vget() unconditionally if no dentry is found. This is wrong because the path can be a hard link that points to a vnode that's already in memory. To fix the problem: - Use inode number as part of the hash in vget() - Use vn_lookup() in vget() to make sure we have one vnode in memory per inode number. - Push the vget() calls down to individual filesystems and make VOP_LOOKUP return an vnode Changes since v2: - v1 dropped lock in vn_lookup, thus assert that vnode_lock is held. Changes since v3: - Fix lock ordering issue in dentry_lookup. The lock respective to the parent node must be acquired before dentry_lookup and released after the process is done. Otherwise, a second thread looking up for the same dentry may take the 'NULL' path incorrectly. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com> Signed-off-by:
Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Nadav Har'El authored
This patch fixes the error codes in four error cases: 1. unlink() of a directory used to return EPERM (as in Posix), and now returns EISDIR (as in Linux). 2. rmdir() of a non-empty directory used to return EEXIST (as in Posix) and now returns ENOTEMPTY (as in Linux). 3. rmdir() of a regular file (non-directory) used to return EBADF and now returns ENOTDIR (as in Linux). 4. readdir() of a regular file (non-directory) used to return EBADF and now returns ENOTDIR (as in Linux). This patch also adds a test, tst-remove.cc, for the various unlink() and rmdir() success and failure modes. Fixes #123. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Dec 09, 2013
-
-
Pekka Enberg authored
This reverts commit e4aad1ba. It causes tst-vfs.so to just hang. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Dec 08, 2013
-
-
Raphael S. Carvalho authored
Currently, namei() does vget() unconditionally if no dentry is found. This is wrong because the path can be a hard link that points to a vnode that's already in memory. To fix the problem: - Use inode number as part of the hash in vget() - Use vn_lookup() in vget() to make sure we have one vnode in memory per inode number. - Push the vget() calls down to individual filesystems and make VOP_LOOKUP return an vnode - Drop lock in vn_lookup() and assert that vnode_lock is held. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com> Signed-off-by:
Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
- Dec 05, 2013
-
-
Pekka Enberg authored
OSv does not support xattrs in ZFS. Fix up a build breakage reported by Glauber: /home/ubuntu/osv/bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c: In function ‘zfs_setattr’: /home/ubuntu/osv/bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c:2152:12: error: ‘xoap’ may be used uninitialized in this function [-Werror=uninitialized] Reported-by:
Glauber Costa <glommer@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Probably the worst indented file in the whole tree. Set Eclipse Ctrl-I on it. Also fix a unicode character in the author's name. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Prior to 65ccda4c (net: use a file derived class for sockets (socket_file)), ioctl()s for socket were directed to linux_ioctl_socket() and thence to soo_ioctl(). However that commit short-circuited linux_ioctl_socket() out and dipatched directly to what was previously known as soo_ioctl() (and became socket_file::ioctl()). The caused interface enumeration ioctl()s to fail, for example in Cassandra. Fix by bringing back the previous behaviour. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Dec 04, 2013
-
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
- Dec 03, 2013
-
-
Avi Kivity authored
The only caller, soo_close() can only be called from a context where no file references remain, so no further file API calls can be made. Remove it. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
falloc() is racy since it installs an uninitialized file in an accessible fd. Use falloc_noinstall() and fdalloc() instead; also fixes fd leaks on error. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
falloc() is racy since it installs an uninitialized file in an accessible fd. Use falloc_noinstall() and fdalloc() instead; also fixes an fd leak on error. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
falloc() is racy since it installs an uninitialized file in an accessible fd. Convert sys_close() to C++ and avoid the race; also fixes an fd leak in case of an error. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Asias He authored
Signed-off-by:
Asias He <asias@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Dec 02, 2013
-
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Currently sys_open() receives an uninitialized file structure from its callers, which is awkward as the callers must handle opening a file in two steps. It also doesn't fit well with C++'s notion of an object being always fully initialized and valid. Fix by making sys_open() allocate and return the file structure. This also fixes a window in open() where an fd would point to an uninitialized file (between fdalloc() and sys_open()). Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
- Dec 01, 2013
-
-
Avi Kivity authored
Needed for C++ conversion. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
socketpair() stores temporary data in the field they're going to be copied into. Use a local instead. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
We have an strange and incorrect 'struct file' definition for zfs, but a forward declaration is all that is needed. Remove the unsafe definition. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Nov 28, 2013
-
-
Raphael S. Carvalho authored
The undefined reference error only shows up when building OSv on debug mode (mode=debug): bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.o: In function `zfs_setattr': bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c:2529: undefined reference to `zfs_xvattr_set Signed-off-by:
Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Nov 27, 2013
-
-
Avi Kivity authored
As detailed in [1], SO_REUSEADDR means slightly different things on BSD and Linux. One of the differences is in the treatment of sockets that are bound to addresses already occupied by existing sockets in the TIME_WAIT state; Linux allows the new socket if SO_REUSEADDR is set on it, while BSD refuses. Adjust the code to match the Linux behaviour. This allows multiple connection tests to pass, and will likely be required by other network intensive applications. [1] http://stackoverflow.com/questions/14388706/socket-options-so-reuseaddr-and-so-reuseport-how-do-they-differ-do-they-mean-t Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Nov 26, 2013
-
-
Raphael S. Carvalho authored
Attribute flags were moved from 'bsd/sys/cddl/compat/opensolaris/sys/vnode.h' to 'include/osv/vnode_attr.h' 'bsd/sys/cddl/compat/opensolaris/sys/vnode.h' now includes 'include/osv/vnode_attr.h' exactly at the place the flags were previously located. 'fs/vfs/vfs.h' includes 'include/osv/vnode_attr.h' as functions that rely on the setattr feature must specify the flags respective to the attr fields that are going to be changed. Approach sugested by Nadav Har'El Signed-off-by:
Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Tested-by:
Tomasz Grabiec <tgrabiec@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-