From: Goldwyn Rodrigues <rgoldwyn@suse.de>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 1/6] Add dlm operations placeholders
Date: Thu, 26 Sep 2013 17:23:57 -0500 [thread overview]
Message-ID: <5244B3FD.7020309@suse.de> (raw)
In-Reply-To: <20130909213839.GC31381@wotan.suse.de>
On 09/09/2013 04:38 PM, Mark Fasheh wrote:
> This looks good, other than the backwards compatibility issue I mention
> below.
>
> I see we're goign to get some recovery calllbacks node? Any chance you can
> give a short description of what their purpose is?
> --Mark
>
> On Thu, Sep 05, 2013 at 10:27:21PM -0500, Goldwyn Rodrigues wrote:
>>
>> Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
>> ---
>> fs/ocfs2/stack_user.c | 30 ++++++++++++++++++++++++++++--
>> 1 file changed, 28 insertions(+), 2 deletions(-)
>>
>> diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c
>> index 286edf1..1b18193 100644
>> --- a/fs/ocfs2/stack_user.c
>> +++ b/fs/ocfs2/stack_user.c
>> @@ -799,11 +799,31 @@ static int fs_protocol_compare(struct ocfs2_protocol_version *existing,
>> return 0;
>> }
>>
>> +static void user_recover_prep(void *arg)
>> +{
>> +}
>> +
>> +static void user_recover_slot(void *arg, struct dlm_slot *slot)
>> +{
>> +}
>> +
>> +static void user_recover_done(void *arg, struct dlm_slot *slots,
>> + int num_slots, int our_slot,
>> + uint32_t generation)
>> +{
>> +}
>> +
>> +const struct dlm_lockspace_ops ocfs2_ls_ops = {
>> + .recover_prep = user_recover_prep,
>> + .recover_slot = user_recover_slot,
>> + .recover_done = user_recover_done,
>> +};
>> +
>> static int user_cluster_connect(struct ocfs2_cluster_connection *conn)
>> {
>> dlm_lockspace_t *fsdlm;
>> struct ocfs2_live_connection *uninitialized_var(control);
>> - int rc = 0;
>> + int rc = 0, ops_rv;
>>
>> BUG_ON(conn == NULL);
>>
>> @@ -828,12 +848,18 @@ static int user_cluster_connect(struct ocfs2_cluster_connection *conn)
>> }
>>
>> rc = dlm_new_lockspace(conn->cc_name, NULL, DLM_LSFL_FS, DLM_LVB_LEN,
>> - NULL, NULL, NULL, &fsdlm);
>> + &ocfs2_ls_ops, conn, &ops_rv, &fsdlm);
>> if (rc) {
>> ocfs2_live_connection_drop(control);
>> goto out;
>> }
>>
>> + if (ops_rv < 0) {
>> + printk(KERN_ERR "ocfs2: dlm lockspace ops could not be used. You may be using an older dlm_controld\n");
>> + rc = -EINVAL;
>> + goto out;
>> + }
>
> Presumably we're going to figure out how to support all versions of
> userspace, so this would go?
Yes, as I mentioned in the previous mail, this is feasible so we will
try to get a new lockspace twice, once with the ops. If that fails, we
try without the recovery ops.
--
Goldwyn
prev parent reply other threads:[~2013-09-26 22:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-06 3:27 [Ocfs2-devel] [PATCH 1/6] Add dlm operations placeholders Goldwyn Rodrigues
2013-09-09 21:38 ` Mark Fasheh
2013-09-26 22:23 ` Goldwyn Rodrigues [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=5244B3FD.7020309@suse.de \
--to=rgoldwyn@suse.de \
--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 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.