- Sep 26, 2013
-
-
Raphael S. Carvalho authored
Make vn_stat() return inode number and link count in st_ino and st_nlink, respectively. Signed-off-by:
Raphael S. Carvalho <raphael.scarv@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
This patch adds the link() system call. The system call uses the filesystem specific VOP_LINK vnode operation to do the actual work. ZFS is currently the only available file system that supports hard links and the other filesystems return EPERM. Signed-off-by:
Raphael S. Carvalho <raphael.scarv@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
Update ->va_nlink() in zfs_getattr() in preparation for sys_link(). Signed-off-by:
Raphael S. Carvalho <raphael.scarv@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
Wire up the VOP_LINK vnode operation for ZFS in preparation for sys_link(). Signed-off-by:
Raphael S. Carvalho <raphael.scarv@gmail.com> [ penberg: drop FIGNORE, cleanup, split ] Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
Wire up the VOP_LINK vnode operation for ramfs in preparation for sys_link(). Signed-off-by:
Raphael S. Carvalho <raphael.scarv@gmail.com> [ penberg: split to separate commit ] Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
Wire up the VOP_LINK vnode operation for devfs in preparation for sys_link(). Signed-off-by:
Raphael S. Carvalho <raphael.scarv@gmail.com> [ penberg: split to separate commit ] Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Raphael S. Carvalho authored
Add VOP_LINK to the VFS interface in preparation for sys_link(). Signed-off-by:
Raphael S. Carvalho <raphael.scarv@gmail.com> [ penberg: split to separate commit ] Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Use ->rn_namelen as the destination buffer size for strlcpy(). Spotted by Coverity. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
The ramfs_remove_node() will free vp->v_data so we cannot look it up in ramfs_remove(). Spotted by Coverity. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Sep 25, 2013
-
-
Nadav Har'El authored
signal() verified that its argument is not >nsigs, but it should be >=nsigs because nsigs itself is already illegal (0...nsigs-1 are valid signals). Discovered by Coverity. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Nadav Har'El authored
GCC implements static destructors in shared-objects (DSO) by registering a single finalization function, __cxa_finalize(), to run when the DSO is unloaded, and each constructor calls __cxa_atexit() to register a destructor which __cxa_finalize() should call. This patch implements the missing __cxa_finalize() and __cxa_atexit() functions. The do-nothing stubs we had never registered, and never ran, destructors. The implementation in this patch is amazingly simple to write in C++11 :-) Before this fix, we had a crash when running tst-tracepoint.so twice: The first run ran the tracepoints' constructors, which added to the global linked list of tracepoints pointers into the mapped DSO. When the DSO was later unmapped but destructors not run, the linked list of tracepoints was left with pointers to unmapped memory. When we ran the test again, and it wanted to construct more tracepoints, it accessed the broken linked list and crashed. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Nadav Har'El authored
ELF allows specifying initializers - functions to be run after loading a a shared object, in DT_INIT_ARRAY, and also finalizers - functions to be run before unloading a shared objects, in DT_FINI_ARRAY. The existing code ran the initializers, but forgot to run the finalizers, and this patch fixes this oversight. This fix is necessary for destructors of static objects defined in the shared object. But this fix is not sufficient for C++ destructors - see also the next patch. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Nadav Har'El authored
Add to libc/user.cc stub setresgid(), setresgid(), which as usual in OSv only allow user and group 0. These functions are used by Rogue ;-) Also move getuid() and friends from runtime.cc to libc/user.cc, where they feel more at home. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Nadav Har'El authored
The "cscope" make target piped a list of files into "cscope -bq", but this command doesn't read its input. The command should be "cscope -bq -i-" which reads the list of files from stdin. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Dmitry Fleytman authored
Signed-off-by:
Dmitry Fleytman <dmitry@daynix.com>
-
- Sep 24, 2013
-
-
Nadav Har'El authored
Coverity thinks we have a use-before-assigned of r2 here, despite the join(), so let's just move the test inside the thread to make this warning go away. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Nadav Har'El authored
We used to return the POLLRDHUP event when polling a write-side of a pipe whose reader is closed, but Linux returns POLLERR|POLLOUT, so let's do the same. Linux's behavior can be explained in that when the reader is closed, a write will return immediately (and hence POLLOUT) but moreover, will return with an error (EPIPE). And since a read will also cause an error (EBADF when reading on the write side of the pipe), a POLLERR makes sense and says that any operation on this fd will now result in an error. This patch also adds a test for this case. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Nadav Har'El authored
The code in pipe_buffer.cc had the meaning of POLLHUP and POLLRDHUP reversed, and as a result POLLHUP wasn't correctly returned when polling a read-end of the pipe whose write-end is closed. This fixes the mixup, and as a result the test added to tst-pipe.cc in the previous commit, and also another one added in this patch, all pass. We are still incompatible with Linux with what we do regarding POLLRDHUP. This will be a separate patch. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Nadav Har'El authored
Our poll_wake() code ignored calls with the POLLHUP event, because the user did not explicitly ask for this event. This causes a poll() waiting on read from a pipe whose write side closes not to wake up. This patch adds a test for this case in tst-pipe.cc, and fixes the bug by adding to the poll structure's _events also ~POLL_REQUESTABLE, i.e., any bits which do not have to be explicitly requested by the user (POLL_REQUESTABLE is a new macro defined in this patch). After this patch, poll() wakes as needed in the test (instead of just hang), but returns the wrong event because of another bug which will be fixed in a separate patch. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Vladimir Kirillov authored
Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
The assertion in object::relocate_pltgot uses assignment instead of comparison. Fix that up. Spotted by Coverity. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
JavaVMOption has extraInfo member that's not initialized in mkoption(). It only used by few special case options that provide a function pointer hook to the JVM so it's harmless but fix it anyway. Spotted by Coverity. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Liu Yuan authored
This will generate cscope index for the source files. Signed-off-by:
Liu Yuan <namei.unix@gmail.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Sep 23, 2013
-
-
Nadav Har'El authored
Currently, OSv's "make" builds both the kernel, using a normal Makefile, and the sample management framework, using the "Gradle" tool. We carefully hid Gradle's progress under one output line "GRADLE", but this leads to the "make" process hanging for a long time - up to several minutes, and all the puzzled user sees is the line "GRADLE". Users who didn't go for coffee will likely kill the build at this point ;-) Even worse, when Gradle fails, or just hangs (e.g., a bad or slow network connection), the user won't even know why. So let's just run Gradle normally, and let the user see its full output. This output is rather pretty and organized, so no real reason to hide it. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Nadav Har'El authored
Each of the "tags" and "TAGS" make targets was done in a different way, causing each to have a different problem: 1. "tags" (ctags) used the "-L" option which turns out is nonportable (only available in Exuberant Ctags). 2. "TAGS" (etags) ran the etags command separately for each source file, slowing it down. The best of both worlds is to use xargs to have ctags/etags operate on multiple files in each run using xargs. Because we cannot be sure xargs will run ctags/etags only once, we must delete the file first and use the "-a" (append) option. Also, this patch reduces code duplication - there is now one rule for both "tags" and "TAGS" targets that uses the correct tool (ctags or etags, respectively). Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
Nadav Har'El authored
Update devices-and-drivers.txt
-
Nadav Har'El authored
to do. However, it did several things wrong that this patch fixes. Thanks to Paolo Bonzini for finding these problems (see issue #35). 1. When poll() returned a bare POLLHUP, without POLLIN, our select() didn't return a read event. But nothing in the manpages guarantees that POLLHUP is accompanied by POLLIN, and some special file implementations might forget it. As an example, in Linux POLLHUP without POLLIN is common. But POLLHUP on its own already means that there's nothing more to read, so a read() will return immediately without blocking - and therefore select() needs to turn on the readable bit for this fd. 2. Similarly, a bare POLLRDHUP should turn on the writable bit: The reader on this file hug up, so a write will fail immediately. 3. Our poll() and select() confused what POLLERR means. POLLERR does not mean poll() found a bad file descriptor - there is POLLNVAL for that. So this patch fixes poll() to set POLLNVAL, not POLLERR, and select() to return with errno=EBADF when it sees POLLNVAL, not POLLERR. 4. Rather, POLLERR means the file descriptor is in an error state, so every read() or write() will return immediately (with an error). So when we see it, we need to turn on both read and write bits in this case. 5. The meaning of "exceptfds" isn't clear in any manual page, and it seems there're a lot of opinions on what it might mean. In this patch I did what Paolo suggested, which is to set the except bit when POLLPRI. (I don't set exceptfds on POLLERR, or any other case). Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-
- Sep 22, 2013
-
-
Joel Nider authored
Fixed some minor spelling mistakes
-
- Sep 21, 2013
-
-
Glauber Costa authored
Now that we have an efficient interrupt handler, use it.No need to delete the old bsd code, just to avoid disrupting the file too much. Make sure through an assertion that it is never used, though. Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com>
-
Glauber Costa authored
This version of the Xen interrupt handler tries to do as less work as possible in the interrupt itself. The previous version and my previous fix attempt would still clean the channels during interrupt. Because now we have pending_sel still set in the irq thread, we can ditch _irq_pending completely. There is now only one xen_irq for the entire system, and therefore I am registering one per cpu, since we will eventually have to process this in different cpus. (for different event channels). With this, in my (very course, host to guest) netperf test, I am achieving 9600 * 10^6 bps, while linux can reach ~10000 * 10^bps. So we're getting close: Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. 10^6bits/sec 65536 16384 16384 10.00 9589.32 Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com>
-
Glauber Costa authored
Some of the fields in the xen shared structure need to be accessed atomically. Move them to std::atomic so we can do that using C++11 primitives. Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com>
-
Pekka Enberg authored
Fix up the error message as suggested by Nadav. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
This adds a user-friendly error message to run.py if QEMU/KVM is not installed. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Benoît Canet authored
After 5f0e9733 htonl was called twice: once before calling dhcp_mbuf::compose_request and once more inside this function. Fix this, verified on wire packets with wireshark and audited code. Signed-off-by:
Benoit Canet <benoit@irqsave.net> Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com>
-
- Sep 20, 2013
-
-
Pekka Enberg authored
support etags
-
Benoît Canet authored
Some IP fields are stored in host order and some other in network order. It makes discovery of the code difficult. Convert all IP fields to host order and propagate to callers. Signed-off-by:
Benoit Canet <benoit@irqsave.net>
-
Glauber Costa authored
All the other fields of the pcpu structure BSD expects are initialized by the event channel. Except for the cpu id, which the code expects to be already initialized. Signed-off-by:
Glauber Costa <glommer@cloudius-systems.com>
-
Yang Bai authored
Added comments to explain the target tags and TAGS, also ignore the output file of ctags. Signed-off-by:
Yang Bai <hamo.by@gmail.com>
-
Pekka Enberg authored
Update to latest mgmt.git: * mgmt 97be48e...7a4db4e (1): > crash: Remove Rhono imports that are not used It removes the last dependency to the old Rhino-based CLI... Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Nadav Har'El authored
Some trivial comment cleanup and line-breaks in queue-mpsc.hh. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com>
-