Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symlink issue: ZPL branch, RHEL5, kernel 2.6.32 #96

Closed
fajarnugraha opened this issue Feb 14, 2011 · 5 comments
Closed

Symlink issue: ZPL branch, RHEL5, kernel 2.6.32 #96

fajarnugraha opened this issue Feb 14, 2011 · 5 comments

Comments

@fajarnugraha
Copy link
Contributor

symlink doesn't work (it works fine using kq's port). Here's an
example (I have a zpool called "vm")

# zfs create vm/test
filesystem successfully created, but not shared
# cd /vm/test/
# touch test1
# ln -s test1 test2
# ls -la
total 4
drwxr-xr-x 2 root root 4 Feb 11 16:54 .
drwxr-xr-x 7 root root 7 Feb 11 16:53 ..
-rw-r--r-- 1 root root 0 Feb 11 16:54 test1
lrwxrwxrwx 1 root root 5 Feb 11 16:54 test2 ->
# cat test1
# cat test2
cat: test2: Is a directory
@behlendorf
Copy link
Contributor

Thanks for the heads up, I hadn't gotten around to verifying symlinks yet. In fact, I've just taken a step back and will be trying to run the pjd-fstest suite. This is the functional test suite which was put together for the ZFS FreeBSD work and it's been updated to be Linux friendly. Anyway, once this full suite passes and perhaps the Sun/Oracle ZFS test suite for the tool chains we'll look at merging this development branch in to the master.

@behlendorf
Copy link
Contributor

Create minors for all zvols

It was noticed that when you have zvols in multiple datasets
not all of the zvol devices are created at module load time.
Fajarnugraha did the leg work to identify that the root cause of
this bug is a non-zero return value from zvol_create_minors_cb().

Returning a non-zero value from the dmu_objset_find_spa() callback
function results in aborting processing the remaining children in
a dataset. Since we want to ensure that the callback in run on
all children regardless of error simply unconditionally return
zero from the zvol_create_minors_cb(). This callback function
is solely used for this purpose so surpressing the error is safe.

Closed by d567444

@fajarnugraha
Copy link
Contributor Author

I believe this is the wrong issue to close with that comment, and we should leave this issue open until symlink issue is fixed.

@behlendorf
Copy link
Contributor

Your right, I mistyped the bug ID in the commit message so the wrong bug got closed. Sorry about that.

However, I did commit a fix yesterday which specifically addresses the issue above, 8b4f9a2. This issue was with readlink(2) incorrectly reading the symlink value from the ZFS SA. Links now almost work properly.

Unfortunately, there's at least one bug still remaining which causing a crash when a symlink in removed. I'm pretty sure this is caused by a missing iget() in the symlink path and my plan is to run that issue down today.

@behlendorf
Copy link
Contributor

Fix symlink(2) inode reference count

Under Linux sys_symlink(2) should result in a inode being created
with one reference for the inode itself, and a second reference on
the inode which is held by the new dentry. Under Solaris this
appears not to be the case. Their zfs_symlink() handler drops
the inode reference before returning.

The result of this under Linux is that the reference count for
symlinks is always one smaller than it should have been. This
results in a BUG() when the symlink is unlinked. To handle this
the Linux port now keeps the inode reference which differs from
the Solaris behavior. This results in correct reference counts.

Closed by efd1832

kernelOfTruth pushed a commit to kernelOfTruth/zfs that referenced this issue Mar 1, 2015
Ensure the test thread blocks until the shrinker has completed its
work.  This is done by putting the test thread to sleep and waking
it each time the shrinker callback runs.  Once the shrinker size
drops to zero or we time out the test is allowed to proceed.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#96
Closes openzfs#125
Closes openzfs#182
richardelling pushed a commit to richardelling/zfs that referenced this issue Oct 15, 2018
allanjude pushed a commit to allanjude/zfs that referenced this issue Jun 7, 2019
* fix python3 compat in zfs_clone_010

* Fix broken diff test on FreeBSD

* Fix test script setup on FreeBSD

* fix multipath disk detection in tests on FreeBSD

* Skip MMP testfail callbacks on FreeBSD, for now

* Add gpart and mdconfig commands to test sandbox

* Fix delete_partitions in libtest

* Skip ext2 test on FreeBSD and ufs test on Linux

* Just use the ksh print built-in, it works

Fixes "\n" appearing in log messages instead of newlines on FreeBSD.

* Fix erroneous assertion

* Fix zfs_diff_types test on FreeBSD

On FreeBSD, mknod can't be used to create named pipes.
Use mkfifo instead.

ZoF Issue: openzfs#46

* s/\[ is_freebsd \]/is_freebsd/ in tests

Calling a function in a test expression doesn't work like that.
This only appeared to work on FreeBSD because `[ is_freebsd ]` is
always true and `[ ! is_freebsd ]` is always false.

* Use `mount -p` to check mount options on FreeBSD

* Merge FreeBSD and Linux cases in some tests
sdimitro pushed a commit to sdimitro/zfs that referenced this issue Feb 14, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants