Comments (6)
Two things, it turns out that our negative-cache seems to override the mkdir made after. We should update the cache after mkdir (presumably by removing the negative cache). For now, I have disabled negative cache entries;
openzfsonosx/spl@dc86dc2
The second thing is when vnop_lookup is called, the kernel optimises by using the full path in part lookups. With "/alpha/beta/gamma/" it would set componentname to "beta/gamma/" with namelen of 4, to look up only "beta". We need to copy the name out and null terminate. (or add namelen argument to dir_lookup).
c4ac791
from zfs.
Even though I fixed two issues, there is a third, and quite rare. Needs looking at as well.
from zfs.
Hmm, can you tell a bit more on how the third issue manifests itself?
from zfs.
It is a bit unfortunately that two unrelated problems would produce the same (or at least similar) errors in rsync.
One was that we have to pay attention to namelen in component name, so directories created 2 (or more) levels down (ie, lookup containing slashes "alpha/beta") would appear to not exist right after mkdir.
and second is negative caching. I don't fully understand why entering a negative cache for a dir, then we call mkdir, and the negative cache still exists. The comments in MacZFS implies VFS layer adds the mkdir entry to cache. But I did not look deeper into this. I do suspect that verifying the dnlc wrappers to cache_ calls might be in order.
Similarly, 3rd case do also happen, if even more infrequently, large rsync (like that of the zfs.osx zfs directory) or running bonnie will trigger it.
I have not yet run truss on it (which is how I worked out the previous cases, to see that stat("alpha"); mkdir("alpha") ; cd("alpha") would fail)
# ./bonnie++ -u root -d /BOOM/ -s 20 -n 100:1024:0:50 -r 10 -f
Using uid:0, gid:0.
Writing intelligently...done
Rewriting...done
Reading intelligently...done
start 'em...done...done...done...
Create files in sequential order...
Can't write data.
Cleaning up test directory after error.
or rsync
bash-3.2# rsync -ar ./ /BOOM/
rsync: chown "/BOOM/lib/libuutil/.uu_ident.lo.QdUfwX" failed: Cannot allocate memory (12)
from zfs.
Pretty hard to track down, but most likely this:
2994/0x28454: open_nocancel("cmd/zpool/.Makefile.in.cTEvq4\0", 0xA02, 0x180) = 1 0^M
2994/0x28454: fchmod(0x1, 0x180, 0x0) = 0 0^M
2994/0x28454: fcntl(0x1, 0x30, 0x1) = 0 0^M
2994/0x28454: fcntl(0x1, 0x2A, 0x7FFF50CD5B00) = 0 0^M
2994/0x28454: fchmod(0x1, 0x180, 0x0) = -1 Err#12^M
2994/0x28454: unlink("cmd/zdb/.zdb_il.c.3fzcFd\0", 0x1, 0x0) = 0 0^M
Which would imply we fail at chmod sometimes.
from zfs.
It turns out that returning 0 (OK) for the getxattr and setxattr isn't a good idea when we don't have the code for it yet.
5099767
Closing again as rsync runs without warnings.
Negative-caching was never a problem, handled correctly by VFS layer.
from zfs.
Related Issues (20)
- diskutil erase ZFS shows -69832: file system formatter failed HOT 1
- Error "no pools available to import" in Big Sur x86_64
- Unexpectedly low performance of VMs with openzfsonosx backing store HOT 2
- Xcode not happy with ZFS HOT 14
- Photos cannot import photos to library on zfs HOT 5
- _zfs_findernotify_callback panic HOT 1
- Kernel Panic - OpenZFS 2.1.0 on Apple Silicon HOT 11
- Kernel Panic (Time Out) - OpenZFS 2.1.0 on Apple Silicon HOT 20
- Kernal Panic - 2.1.x arm64 HOT 16
- Kernel Panic: Kernel Data Abort (OpenZFS 2.1.0, M1 Ultra) HOT 15
- how can i create block dev as on linux HOT 1
- 2.1.99: `zsysctl` sets tunable incorrectly HOT 2
- Launchd: no pools available to import HOT 3
- Kernel Panic: OpenZFS 2.1.0 Catalina HOT 1
- System freezes with command: zpool offline
- System restarts with command: zpool export
- System freezes or reboots importing a degraded mirror image HOT 52
- System freezes on import HOT 1
- Mac ZFS triggers duplicating finding programs to fail randomly HOT 9
- `cargo build` breaks with "resource temporarily unavailable (error 35)" (I'm assuming EAGAIN) on v2.2.0 and v2.2.2 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zfs.