From: Lachlan McIlroy <lachlan@sgi.com>
To: David Chinner <dgc@sgi.com>
Cc: xfs-dev <xfs-dev@sgi.com>, xfs-oss <xfs@oss.sgi.com>
Subject: Re: [Patch] Per iclog callback chain lock
Date: Wed, 02 Apr 2008 16:19:03 +1000 [thread overview]
Message-ID: <47F32557.2030300@sgi.com> (raw)
In-Reply-To: <20080402043941.GC103491721@sgi.com>
David Chinner wrote:
> On Wed, Apr 02, 2008 at 03:09:31PM +1000, Lachlan McIlroy wrote:
>> Looks fine to me - just one small comment.
> .....
>>> @@ -1257,6 +1255,8 @@ xlog_alloc_log(xfs_mount_t *mp,
>>> iclog->ic_size = XFS_BUF_SIZE(bp) - log->l_iclog_hsize;
>>> iclog->ic_state = XLOG_STATE_ACTIVE;
>>> iclog->ic_log = log;
>>> + atomic_set(&iclog->ic_refcnt, 0);
>> Not related to this change but looks like we need it anyway.
>> Did you mean to include it in this change?
>
> I added it just to be explicit. It's not actually needed as we
> kmem_zalloc() the log structure....
Ahh, it is zeroed. I was wondering why it hadn't caused any problems.
>
>>> + spin_lock(&iclog->ic_callback_lock);
>>> + cb = iclog->ic_callback;
> ....
>>> + spin_lock(&log->l_icloglock);
>>> ASSERT(iclog->ic_callback == NULL);
>>> + spin_unlock(&iclog->ic_callback_lock);
>> Okay so we can acquire the l_icloglock while holding ic_callback_lock.
>
> Yup - it's a new lock, so we can make whatever rules we like ;)
>
> Cheers,
>
> Dave.
next prev parent reply other threads:[~2008-04-02 5:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-01 23:13 [Patch] Per iclog callback chain lock David Chinner
2008-04-01 23:24 ` David Chinner
2008-04-02 5:09 ` Lachlan McIlroy
2008-04-02 4:39 ` David Chinner
2008-04-02 6:19 ` Lachlan McIlroy [this message]
2008-04-07 12:51 ` Christoph Hellwig
2008-04-07 22:17 ` David Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47F32557.2030300@sgi.com \
--to=lachlan@sgi.com \
--cc=dgc@sgi.com \
--cc=xfs-dev@sgi.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox