- Jan 09, 2014
-
-
Raphael S. Carvalho authored
This problem was found when running 'tests/tst-zfs-mount.so' multiple times. At the first time, all tests succeed, however, a subsequent run would fail at the test: 'mkdir /foo/bar', the error message reported that the target file already exists. The test basically creates a directory /foo/bar, rename it to /foo/bar2, then remove /foo/bar2. How could /foo/bar still be there? Quite simple. Our shutdown function calls unmount_rootfs() which will attempt to unmount zfs with the flag MNT_FOURCE, however, it's not being passed to zfs_unmount(), neither unmount_rootfs() tests itself the return status (which was always getting failures previously). So OSv is really being shutdown while there is remaining data waiting to be synced with the backing store. As a result, inconsitency. This problem was fixed by passing the flag to VFS_UNMOUNT which will now unmount the fs properly on sudden shutdowns. Signed-off-by:
Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Jan 03, 2014
-
-
Raphael S. Carvalho authored
Currently, vflush is used in the unmount process to release remaining dentries. vflush in turn calls vevict that is releasing dentries that it doesn't own. This behavior is not correct neither good to the future of VFS. So Avi suggested switching to a different approach. We could only release those dentries owned by the mountpoint when unmounting it as there wouldn't be anything else in the dcache (given its functionality). The problem was fixed by doing the following steps: - Drop vflush calls in sys_umount2, make vevict an empty function, and remove vevict. - Created the function release_mp_dentries to release dentries of a mount point which will be called by VFS_UNMOUNT. It cannot be called before VFS_UNMOUNT as failures must be considered, neither after as the mount point would be considered busy. Don't respect this "rule", and that previously seen ZFS replay transaction error would happen. NOTE: vflush is currently duplicated in zfs unmount cases to address the problem above. This patch fixes this duplication as well. Signed-off-by:
Raphael S. Carvalho <raphaelsc@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>
-
- 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 03, 2013
-
-
Asias He authored
Signed-off-by:
Asias He <asias@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Dec 01, 2013
-
-
Avi Kivity authored
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
Use vop_eperm instead to warn the caller about the lack of support (Glauber Costa). 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>
-
- Nov 19, 2013
-
-
Raphael S. Carvalho authored
vop_eperm allows more code reuse (suggested by Glauber Costa) Signed-off-by:
Raphael S. Carvalho <raphaelsc@cloudius-systems.com> Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Nov 15, 2013
-
-
Pekka Enberg authored
Needed by pivot_root() to unmount the initial rootfs. Signed-off-by:
Pekka Enberg <penberg@cloudius-systems.com>
-
- Oct 24, 2013
-
-
Tomasz Grabiec authored
This happens when you move a file to a different directory. Thread 2 (Thread 2): 1 0x000000000032ed3b in halt_no_interrupts () at ../../arch/x64/processor.hh:239 osv::halt () at ../../core/power.cc:28 2 0x000000000020e7fe in abort ( msg=msg@entry=0x580160 "page fault outside application") at ../../runtime.cc:109 3 0x00000000002ecfdc in page_fault (ef=0xffffc0003e362008) at ../../core/mmu.cc:981 4 <signal handler called> 5 merge (b=0xffffc0003b4e8000, a=0xfffffffffffffff8) at ../../core/mempool.cc:421 6 memory::free_page_range_locked (range=range@entry=0xffffc0003b4e8000) at ../../core/mempool.cc:436 7 0x00000000003186d7 in memory::free_page_range ( range=range@entry=0xffffc0003b4e8000) at ../../core/mempool.cc:448 8 0x0000000000319280 in free_large (obj=0xffffc0003b4e9000) at ../../core/mempool.cc:460 9 std_free (object=0xffffc0003b4e9000) at ../../core/mempool.cc:790 10 free (obj=0xffffc0003b4e9000) at ../../core/mempool.cc:892 11 0x0000000000340e52 in ramfs_free_node (np=np@entry=0xffffc0003d250d40) at ../../fs/ramfs/ramfs_vnops.c:78 12 0x0000000000340ed2 in ramfs_remove_node (dnp=0xffffc0003d250a00, np=0xffffc0003d250d40) at ../../fs/ramfs/ramfs_vnops.c:131 13 0x0000000000340ffd in ramfs_rename (dvp1=0xffffc0003fc9a180, vp1=0xffffc0003fc9a100, name1=<optimized out>, dvp2=0xffffc0003fc9a280, vp2=<optimized out>, name2=0x2000001fedf1 "prefix_suffix") at ../../fs/ramfs/ramfs_vnops.c:380 14 0x0000000000340069 in sys_rename (src=<optimized out>, dest=<optimized out>) at ../../fs/vfs/vfs_syscalls.c:671 15 0x000000000033a3b2 in rename (oldpath=<optimized out>, newpath=0xffffc0003e858cc0 "/tmp/t3-26e1b47c/prefix_suffix") at ../../fs/vfs/main.cc:634 Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com>
-
- Oct 17, 2013
-
-
Tomasz Grabiec authored
strlcpy() expects buffer length not string length. Signed-off-by:
Tomasz Grabiec <tgrabiec@cloudius-systems.com>
-
- Sep 26, 2013
-
-
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>
-
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>
-
- Aug 16, 2013
-
-
Christoph Hellwig authored
Create a new dentry structure for pathname components, following the Linux VFS model. The vnodes are left-as is for now but are always fronted by dentries for pathname lookups. In a second step they will be moved to use non-pathname indices. [penberg: fix open(O_CREAT|O_EXCL) breakage ]
-
- May 24, 2013
-
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
- Feb 12, 2013
-
-
Christoph Hellwig authored
-
- Feb 05, 2013
-
-
Christoph Hellwig authored
-
- Jan 28, 2013
-
-
Christoph Hellwig authored
I've also added an osv/ prefix to make sure we don't clash with system headers. We probably should either adopt this globally or drop it, but I fear we'll run into problems with the latter approach.
-
- Jan 19, 2013
-
-
Christoph Hellwig authored
This will allow for easy addition of the vectored and positional I/O syscalls, as well as making the structure of the I/O path more similar to *BSD and Solaris.
-
- Jan 10, 2013
-
-
Christoph Hellwig authored
-