- Jul 28, 2013
-
-
Avi Kivity authored
Replace the lambda-based with_lock API with a block-based API.
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
The current with_lock() has the downside of using relatively large lambdas. Lambdas need extra syntax (and thought) to capture variables, and change the meaning of 'return', 'break', and 'continue'. The new with_lock (named WITH_LOCK, since it's a macro) accepts a statement instead of a lambda: WITH_LOCK(mtx) { do_something(); WITH_LOCK(preempt_lock) { do_something_else(); } } In a WITH_LOCK context, any return, break, continue, or exception which exits the block will cause the lock's unlock() method to be called.
-
Avi Kivity authored
sprintf(fmt, ...) - returns a std::stream fprintf(os, fmt, ...) - prints to a std::ostream& Easier than the usualy method of constructing a temporary ostringstream and formatting into that.
-
Glauber Costa authored
Some of our files include headers inside an "extern C" declaration. The problem with that eventually we will have definitions with C linkage - since they are inside extern "C" - being included in places where __cplusplus is defined. I specifically worked around this int the sx_xlock implementation, but it is starting to create bigger problems. Fix it by making all headers usable from whichever place by themselves, instead of relying in extern inclusions in the cpp files
-
Christoph Hellwig authored
Mostly to get the X bits on directories right for lookups, as well as checks for hard readonly files.
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
It may not be available yet. Change the mode checks to use zp->z_mode, and remove the devvp checks as we do not support device nodes outside of devfs.
-
Christoph Hellwig authored
We might not have a vnode assigned to a znode yet when doing access checks from lookup.
-
Christoph Hellwig authored
-
Christoph Hellwig authored
truncate() and ftruncate() aren't wired up in the VFS yet, so far this is the only way to get to vnop_truncate.
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
- Jul 27, 2013
-
-
Glauber Costa authored
Because this is arch specific, I am adding it to a newly created file in arch/x64. I am making it available to BSD through netport for the lack of a better place
-
Christoph Hellwig authored
-
Christoph Hellwig authored
ZFS expects vdev providers to work asynchronously and waits in higher level code when needed.
-
Christoph Hellwig authored
-
Christoph Hellwig authored
This is required for users that want asynchronous completions for bios. Taken from FreeBSD.
-
Glauber Costa authored
We will never implement them as is. But some code will still insist in calling them. Our best effort is to return an error, and hope the code copes well with it.
-
Glauber Costa authored
Dear BSD developers: a long is a long, not an int. Because of that define, the struct linux uses for its ifreq ioctl will be of a different size (it is fine in 32-bit machines of course), causing our network requests to get borked.
-
- Jul 25, 2013
-
-
Nadav Har'El authored
Make will not fail if zfs-fuse is missing (it will just print some strange messages), but the resulting image will fail. It would be nice if the makefile checked that our use of zfs-fuse is actually working, but let's start with instructions on the README on how to enable it in a way that survives reboot :-)
-
Nadav Har'El authored
Before waiting, condvar_wait releases two locks - the user's lock and its internal lock. If we reschedule after the first unlock, a waiting thread may start running, and hang when it also does condvar_wait. So let's use preempt_disable/enable around the two locks. This patch improves single-CPU performance of the cond-perf benchmark by about 10%, but this is an extreme case (cond-perf tries to do condvar_wait almost immediately after waking up from its previous wait).
-