All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@whamcloud.com>
To: lustre-devel@lists.lustre.org
Subject: [Lustre-devel] [wc-discuss] Re: Lustre and cross-platform portability
Date: Fri, 27 Apr 2012 14:23:32 -0600	[thread overview]
Message-ID: <424DA9EC-3CC6-4BD5-9A17-FECE362CE91E@whamcloud.com> (raw)
In-Reply-To: <F19688880B763E40B28B2B462677FBF805EF42BD03@MX09A.corp.emc.com>

On 2012-04-27, at 4:15 AM, <tao.peng@emc.com> <tao.peng@emc.com> wrote:
> Andreas Dilger <adilger@whamcloud.com> wrote:
>> On 2012-04-26, at 20:23, <tao.peng@emc.com> wrote:
>>> 2. Lustre has vim syntax rules in most source files, which need
>>> to be removed
>> 
>> They should be replaced with explicit vim and enacts syntax rules that have the kernel indent style instead.  If we could get syntax rules that embodied more of the coding style than just indentation, that would be even better.
>> 
> But we do need to remove them before submitting to kernel, right? And if we enforce checkpatch.pl on every patch applied, IMHO there is not much benefit to have syntax rules on every file, not to mention that it is explicitly forbidden in kernel coding style (Documentation/CodingStyle, Chapter 18:  Editor modelines and other cruft).
> 
> BTW, instead of just enabling tabs, how about changing checkpatch.pl to latest kernel version to make sure all future patches follow kernel coding styles?

The Lustre checkpatch.pl is already based on the kernel one, but with some small modifications.  It will default to checking for spaces vs. tabs, default to "--no-tree", does not require signoffs (since this is added at commit time after the patch is checked).  One other change is to allow no spaces after commas in function parameters if the line is 79 or 80 columns long.  That avoids a line wrap for just a couple of characters.

I have no objection to updating to a newer version of checkpatch.pl if it improves the checking.  Please run it against

>>> IMO, we can divide macros to three groups (or more?):
>>> 1. Old kernel support macros, kernel maintainers are clear that they won't accept it.
> 
>>> 2. For macros to mark out server code, kernel maintainers can accept it. But I think we need to make sure we don't do it too intrusive.
>> 
>> Sure, and we also need to make sure the ongoing maintenance effort to keep the code working is not too much either.
>> 
>> I'm OK with incremental patches that more cleanly split the client and server code (structures, headers, etc) if that improves the code structure and readability.
> 
> I agree that we can do some incremental patches to split client and server code. But I hope we only do it when it is trivial and simple. IMHO if we want to entirely split client/server code, it will be large code structure change. Since kernel maintainers already agreed on HAVE_SERVER_SUPPORT, how about we keep going that way at first?

By all means, we can stick with HAVE_SERVER_SUPPORT for now.  I was just commenting that I'm not against other changes if they improve the code in the long run.

Cheers, Andreas
--
Andreas Dilger                       Whamcloud, Inc.
Principal Lustre Engineer            http://www.whamcloud.com/

  parent reply	other threads:[~2012-04-27 20:23 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-15  0:31 [Lustre-devel] Lustre and cross-platform portability Andreas Dilger
2012-03-15 18:45 ` [Lustre-devel] [Twg] " Ken Hornstein
2012-03-15 19:39   ` Andreas Dilger
2012-03-15 19:51     ` Joshua Walgenbach
2012-03-16 10:11       ` [Lustre-devel] [wc-discuss] " Gregory Matthews
2012-03-16 10:35         ` Alexey Lyashkov
2012-03-16 14:46           ` Ken Hornstein
2012-03-17 10:42             ` [Lustre-devel] [wc-discuss] " Alexey Lyashkov
2012-03-16 15:06         ` [Lustre-devel] [wc-discuss] " Todd, Allen
2012-03-21 18:29           ` Nathan Rutman
2012-03-16 14:38     ` [Lustre-devel] " Ken Hornstein
2012-03-16 16:03 ` [Lustre-devel] [EXTERNAL] " Ward, Lee
     [not found] ` <5A40CBC5-F91A-4F34-8209-0C216CCE8A5D@dilger.ca>
2012-04-27  2:23   ` [Lustre-devel] [wc-discuss] " tao.peng at emc.com
2012-04-27  3:54     ` Andreas Dilger
2012-04-27 10:15       ` tao.peng at emc.com
2012-04-27 10:25         ` [Lustre-devel] [Lustre-discuss] " Roman Grigoryev
2012-04-27 12:33           ` tao.peng at emc.com
2012-05-03  9:45             ` Roman Grigoryev
2012-05-03 10:03               ` tao.peng at emc.com
2012-05-03 10:45                 ` Roman Grigoryev
2012-05-03 15:08                   ` tao.peng at emc.com
2012-04-27 20:23         ` Andreas Dilger [this message]
2012-04-29  4:33           ` [Lustre-devel] " Peng Tao
2012-04-28  8:59   ` Liang Zhen

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=424DA9EC-3CC6-4BD5-9A17-FECE362CE91E@whamcloud.com \
    --to=adilger@whamcloud.com \
    --cc=lustre-devel@lists.lustre.org \
    /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.