From: Wendy Cheng <wcheng@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/gfs-kernel/src/gfs inode.h ops_export.c
Date: Wed, 17 Jan 2007 18:05:05 -0500 [thread overview]
Message-ID: <45AEABA1.2010408@redhat.com> (raw)
In-Reply-To: <1169043158.11844.88.camel@quoit.chygwyn.com>
Steven Whitehouse wrote:
> Hi,
>
> Just wondering why this:
>
> On Tue, 2007-01-16 at 20:39 +0000, wcheng at sourceware.org wrote:
> [snip]
>> -
>> error = gfs_glock_nq_num(sdp,
>> - inum.no_formal_ino, &gfs_inode_glops,
>> + inum->no_formal_ino, &gfs_inode_glops,
>> LM_ST_SHARED, LM_FLAG_ANY | GL_LOCAL_EXCL,
>> &i_gh);
>>
> needs the GL_LOCAL_EXCL flag. I would have thought an ordinary shared
> lock would be enough?
>
It is required to prevent (by serializing) other process (on the same
node) to create this gfs inode at the same time (equivalence of an
semaphore or mutex). Lookup (and several other GFS1 mount/umount) code
needs this flag too. This (my guess) is to reduce the need to create
another set of semaphores/mutex. In summary, I think it has two advantages:
1. Less locks
2. Easier to track who owns what (since glock holder is easy to find
when compared with sempahore/mutex).
The down-side is that it makes glock code difficult to understand. For
GFS1, let's keep it this way. For GFS2, your call :) ...
-- Wendy
> In GFS2 I'd like to try and eliminate this flag since it would be just
> as easy to use a combination of a mutex or rwsem and a glock to achieve
> the same thing and it makes the glock code simpler. Its only used in
> about three places anyway and I'm not so sure that its required at all
> in this case,
>
> Steve.
>
>
>
next prev parent reply other threads:[~2007-01-17 23:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-16 20:39 [Cluster-devel] cluster/gfs-kernel/src/gfs inode.h ops_export.c wcheng
2007-01-17 14:12 ` Steven Whitehouse
2007-01-17 23:05 ` Wendy Cheng [this message]
2007-01-18 9:56 ` Steven Whitehouse
2007-01-18 15:17 ` Steven Whitehouse
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=45AEABA1.2010408@redhat.com \
--to=wcheng@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.