From: Joel Becker <Joel.Becker@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 1/2] Ocfs2: Add a mount option "coherency=*" for O_DIRECT writes.
Date: Sun, 10 Oct 2010 03:51:11 -0700 [thread overview]
Message-ID: <20101010105110.GS13876@mail.oracle.com> (raw)
In-Reply-To: <1286623602-7559-1-git-send-email-tristan.ye@oracle.com>
On Sat, Oct 09, 2010 at 07:26:41PM +0800, Tristan Ye wrote:
> Currently, default behavior of O_DIRECT writes was allowing
> concurrent writing among nodes, no cluster coherency guaranteed
> (no EX locks was taken), it hurts buffered reads on other nodes
> by reading stale data from cache.
>
> The new mount option introduce a chance to choose two different
> behaviors for O_DIRECT writes:
>
> * coherency=full, as the default value, will disallow
> concurrent O_DIRECT writes by taking
> EX locks.
>
> * coherency=buffered, allow concurrent O_DIRECT writes
> without EX lock among nodes, which
> gains high performance at risk of
> getting stale data on other nodes.
>
> Signed-off-by: Tristan Ye <tristan.ye@oracle.com>
I think these two patches should be combined into one. It's not
a lot of change, and it makes sense as one unit.
> @@ -631,6 +635,14 @@ static int ocfs2_remount(struct super_block *sb, int *flags, char *data)
> goto out;
> }
>
> + if ((osb->s_mount_opt & OCFS2_MOUNT_COHERENCY_BUFFERED) !=
> + (parsed_options.mount_opt & OCFS2_MOUNT_COHERENCY_BUFFERED)) {
> + ret = -EINVAL;
> + mlog(ML_ERROR, "Cannot change cluster coherency mode on "
> + "remount\n");
> + goto out;
> + }
Don't include this. I think it's a feature to allow coherency
mode to be changed on the fly. It doesn't hurt us any; it is a safe
thing to change.
Joel
--
Life's Little Instruction Book #207
"Swing for the fence."
Joel Becker
Consulting Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
prev parent reply other threads:[~2010-10-10 10:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-09 11:26 [Ocfs2-devel] [PATCH 1/2] Ocfs2: Add a mount option "coherency=*" for O_DIRECT writes Tristan Ye
2010-10-09 11:26 ` [Ocfs2-devel] [PATCH 2/2] Ocfs2: Handle O_DIRECT writes with coherency option Tristan Ye
2010-10-10 10:59 ` Joel Becker
2010-10-10 13:43 ` Tao Ma
2010-10-10 19:47 ` Joel Becker
2010-10-10 10:51 ` Joel Becker [this message]
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=20101010105110.GS13876@mail.oracle.com \
--to=joel.becker@oracle.com \
--cc=ocfs2-devel@oss.oracle.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;
as well as URLs for NNTP newsgroup(s).