ocfs2-devel.oss.oracle.com archive mirror
 help / color / mirror / Atom feed
From: Goldwyn Rodrigues <rgoldwyn@suse.de>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] Add dlm_recover_callback_support in sysfs
Date: Wed, 26 Feb 2014 07:01:38 -0600	[thread overview]
Message-ID: <530DE5B2.1010301@suse.de> (raw)
In-Reply-To: <20140225122104.41fcc13a1debd979201c71a9@linux-foundation.org>

On 02/25/2014 02:21 PM, Andrew Morton wrote:
> On Tue, 25 Feb 2014 09:28:44 -0600 Goldwyn Rodrigues <rgoldwyn@suse.de> wrote:
>
>> This is a part of the nocontrold feature which was incorporated sometime
>> back.
>>
>> This is required for backward compatibility of the tools, specifically the
>> scenario where the tools with recovery callback is used with a kernel
>> not using the recovery callbacks (older kernel + newer tools). The tools
>> look for this file to understand if the kernel supports DLM recovery
>> callbacks.
>>
>> For kernels which support recovery callbacks but will miss this patch,
>> ocfs2 will continue to use the older API and would still be able to
>> mount the filesystem.
>>
>> ...
>>
>> +static ssize_t ocfs2_dlm_recover_show(struct kobject *kobj,
>> +					struct kobj_attribute *attr,
>> +					char *buf)
>> +{
>> +	ssize_t ret;
>> +	ret = snprintf(buf, PAGE_SIZE, "1\n");
>> +	return ret;
>> +}
>
> That's a bit long-winded.  What's wrong with
>
> static ssize_t ocfs2_dlm_recover_show(struct kobject *kobj,
> 					struct kobj_attribute *attr,
> 					char *buf)
> {
> 	return snprintf(buf, PAGE_SIZE, "1\n");
> }
>
> ?
>

Nothing. Rather, it is much better.

Thanks for the review.

-- 
Goldwyn

  reply	other threads:[~2014-02-26 13:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-25 15:28 [Ocfs2-devel] [PATCH] Add dlm_recover_callback_support in sysfs Goldwyn Rodrigues
2014-02-25 20:21 ` Andrew Morton
2014-02-26 13:01   ` Goldwyn Rodrigues [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-02-26 13:19 Goldwyn Rodrigues

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=530DE5B2.1010301@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 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).