Displaying 5 results from an estimated 5 matches for "rw_enter".
2007 Nov 24
19
R/W lock portability issue
...s holding the lock, and false if there were no threads holding
the lock. This way ASSERTs never failed).
However, now there is a small bit of code that actually relies on
RW_LOCK_HELD() working correctly:
boolean_t need_lock = !RW_LOCK_HELD(&dp->dp_config_rwlock);
if (need_lock)
rw_enter(&dp->dp_config_rwlock, RW_READER);
I can''t think of a way to emulate this functionality with pthreads
without incurring a huge overhead when locking...
Any ideas?
Thanks,
Ricardo
--
<http://www.sun.com>
*Ricardo Manuel Correia*
Lustre Engineering
*Sun Microsystems, I...
2006 Jun 02
5
Read-write locks in libzpool
Hi,
I think I found a bug in the rw_enter() implementation (emulation?) in
libzpool, file /usr/src/lib/libzpool/common/kernel.c:
void
rw_enter(krwlock_t *rwlp, krw_t rw)
{
ASSERT(!RW_LOCK_HELD(rwlp));
ASSERT(rwlp->rw_owner != (void *)-1UL);
ASSERT(rwlp->rw_owner != curthread);
if (rw == RW_READER)
(void) rw_rdlock(&rwlp-...
2008 Jul 29
2
Unexpected b_hdr change.
Hi.
We''re testing the most recent ZFS version from OpenSolaris ported to
FreeBSD. Kris (CCed) observed strange situation. In function arc_read()
he had a panic on assertion that we try to unlock a lock which is not
beeing held:
rw_enter(&pbuf->b_hdr->b_datalock, RW_READER);
err = arc_read_nolock(pio, spa, bp, done, private, priority,
flags, arc_flags, zb);
rw_exit(&pbuf->b_hdr->b_datalock); <--- THIS ONE
The only possiblity was that b_hdr for pbuf was changed somewhere. We
diagnozed this further an...
2007 Mar 13
0
fasttrap_disable_callbacks()
...39;ve been reading still more code :-).
>
> I notice in fasttrap_disable_callbacks(), there is this snippet of
> code:
>
> for (cur = cpu->cpu_next_onln; cur != cpu;
> cur = cur->cpu_next_onln) {
> rw_enter(&cur->cpu_ft_lock, RW_WRITER);
> }
>
> dtrace_pid_probe_ptr = NULL;
> dtrace_return_probe_ptr = NULL;
>
> for (cur = cpu->cpu_next_onln; cur != cpu;
> cur = cur->cpu_next_o...
2007 May 09
5
Refactor zfs_zget()
Hi,
Since almost all operations in the FUSE low-level API identify files by inode
number, I''ve been using zfs_zget() to get the corresponding znode/vnode in
order to call the corresponding VFS function in zfs_vnops.c.
However, there are some cases when zfs_zget() behaves slightly different than
I need:
1) If zp->z_unlinked != 0 then zfs_zget() returns ENOENT. I need it to return