- Dec 09, 2013
-
-
Nadav Har'El authored
main.cc was still using tab characters instead of spaces as our coding conventions dictate. Reindent it, using Eclipse's ctrl-I. This patch doesn't change anything else. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
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 04, 2013
-
-
Avi Kivity authored
Everyone is now overriding file's virtual functions; we can make them pure virtual and remove fileops completely. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Unused. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Everyone switched to the nifty variadic type. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Derived file objects will be initialized by the class constructor, no need for fo_init(). Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Once file::~file() is called, virtual functions no longer dispatch to the derived type (which has since been destroyed) but to the base type, which is uninteresting. Move the call to close() from the destructor to fdrop(). Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
- Dec 03, 2013
-
-
Avi Kivity authored
The default is to dispatch directly to the corresponding member of f_ops, but that can be overridden. The fo_*() functions are redirected to dispatch via the virtual functions. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Pekka Enberg authored
Make sure ZFS intention log is flushed to disk by unmounting rootfs at poweroff. Fixes #108. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Make sure the new root vnode is not evicted in vflush() and that we don't keep reference to the old root dentry in ->m_covered. Fixes negative dentry count when pivoted root is unmounted. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Add sys_umount2() and implement support for MNT_FORCE that will be used to force rootfs unmount at poweroff. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
This paves the way for moving f_ops into the vtable. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Simpler. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
'new file' doesn't return nullptr, it throws (well except in osv where new always succeeds). Replace with new (nothrow) to get the expected behaviour. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
They are called at the same time, so make falloc_noinstall() responsible purely for allocation. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
If we're going to have a vtable in there, the memset() will kill it. Instead, add initializers for those members not already initialized by make_file(). Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
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
Subsumed by make_file(). 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
Makes it easy to avoid losing them. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
Combines falloc_noinstall() and finit(), which are always used together. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Avi Kivity authored
falloc() is inherently racy in that it installs an uninitialized file descriptor in a user accessible fd. It is also hard to use correctly when an error occurs. Luckily, we don't use it anywhere, so we can just remove it. Signed-off-by:
Avi Kivity <avi@cloudius-systems.com>
-
Avi Kivity authored
Copying filerefs is expensive since the reference count is incremented, avoid it. 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
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
-
-
Pekka Enberg authored
Enable device_destroy() API for the virtio-rng driver. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Nadav Har'El authored
Before this patch, OSv crashes or continuously reboots when given unknown command line paramters, e.g., scripts/run.py -c1 -e "--help --z a" With this patch, it says, as expected that the "--z" option is not recognized, and displays the list of known options: unrecognised option '--z' OSv options: --help show help text --trace arg tracepoints to enable --trace-backtrace log backtraces in the tracepoint log --leak start leak detector after boot --nomount don't mount the file system --noshutdown continue running after main() returns --env arg set Unix-like environment variable (putenv()) --cwd arg set current working directory Aborted The problem was that to parse the command line options, we used Boost, which throws an exception when an unrecognized option is seen. We need to catch this exception, and show a message accordingly. But before this patch, C++ exceptions did not work correctly during this stage of the boot process, because exceptions use elf::program(), and we only set it up later. So this patch moves the setup of the elf::program() object earlier in the boot, to the beginning of main_cont(). Now we'll be able to use C++ exceptions throughout main_cont(), not just in command line parsing. This patch also removes the unused "filesystem" paramter of elf::program(), rather than move the initializion of this empty object as well. Fixes #103. Signed-off-by:
Nadav Har'El <nyh@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
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
In preparation for making 'file' a C++ type. 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
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>
-
- Nov 29, 2013
-
-
Tomasz Grabiec authored
When this line is absent in usr.manifest: /tmp/index.rb: ../../mgmt/web/views/index.rb ... tst-rename.so test fails with: Assertion failed: c_str (<...>/osv/external/misc.bin/usr/ include/boost/filesystem/path_traits.hpp: dispatch: 214) The reason for failure is missing /tmp. It is supposed to be created in unpack_bootfs() but it is later masked by zfs root pivot. The line in the manifest recreated it, but since mgmt can be a separate module it may not always be there. This patch fixes that by adding an explicit entry for /tmp to usr.manifest, same as we do for /dev. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Pekka Enberg authored
Move runtime creation of '/dev' to image creation to avoid bogus "unable to create /dev directory" error messages during boot. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
Tomasz Grabiec authored
Looks like the serial console doesn't display anything until new line character is received. Looks like only when '\n' is written to the serial console QEMU displays the line. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-