CEPH filesystem development
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: Ilya Dryomov <idryomov@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>,
	Ceph Development <ceph-devel@vger.kernel.org>,
	Alex Elder <elder@kernel.org>, Sage Weil <sage@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org,
	Julia Lawall <julia.lawall@lip6.fr>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 03/47] block-rbd: Adjust the position of a jump label in rbd_header_from_disk()
Date: Mon, 19 Sep 2016 11:37:24 +0200	[thread overview]
Message-ID: <20160919113724.07fc3752@endymion> (raw)
In-Reply-To: <CAOi1vP8uL32MR0hMW6-=P2=R7q5HD4GoSoZk3pXQvnN+C7xNew@mail.gmail.com>

Hi Ilya,

Sorry for the late answer.

On Tue, 13 Sep 2016 20:31:57 +0200, Ilya Dryomov wrote:
> Sorry, navigating lkml.org archive is a pain, and I was expecting to
> see patch.  Your points
> 
> "The acceptance of an optional single space before labels dates back to
> at least June 2007, as supported by the very first incarnation of
> checkpatch.pl. So nothing really new here, except for a preference
> (my preference, admittedly, but I'm know I'm not alone) being expressed
> in the coding style document."
> 
> "Recommendations are not meant to document what people are currently
> doing but what we think they should be doing."
> 
> are valid, but note that there is a world of difference between an
> acceptance and a preference.  The *only* point of whitespace guidelines
> is to keep the code base consistent.

Consistency is half of the reason, the other half is readability. This
is why the CodingStyle document has a number of rationales explained.
This is also why we put whitespace in the first place, while the C
language doesn't require any ;-)

The sense of my proposal was to address a readability (or usability)
issue.

> You don't go changing whitespace
> preferences in such a huge project, not unless you have a *very* good
> rationale and existing code base is swayed (which it isn't, given the
> 9/10 ratio).

I did consider the reason to be good enough to warrant a "change",
actually. Or more exactly from "one space is allowed" to "one space is
recommended." Which is quite different from changing all the code
actively. I can understand how you don't like it, but again, this
"inconsistency" has been accepted for almost a decade now, so I find it
strange to see so much resistance when someone finally tries to sort it
out.

> >> If I wanted to clarify the
> >> situation, I'd have gone with "one space indented labels are also
> >> acceptable" or so.  The example you've re-indented dates back to 2.6.4
> >> times...
> >
> > I can't see how this is relevant.
> 
> That was a 12 year old example, codifying an existing style used in
> ~90% cases, serving as a guideline for new contributors.

OK, I get your point now. But the CodingStyle document isn't carved
into stone. I see 43 changes to that file in recent history (since
April 2005), some of which are actual changes or clarifications of our
coding style. This very section of the document was updated in December
2014, so not so long ago.

In the end I suppose it boils down to how problematic you consider the
current situation to be. Apparently you and several other maintainers
think it's just fine, while me (and a few others apparently) think it
is not.

> >> git diff also works on regular files, BTW.
> >
> > I have no idea what you mean here, sorry.
> 
> Oh, just that it works outside of git repos too, so you aren't stuck
> with diffutils if you want to diff two random .c files.

Oh, I had never thought of that. Thanks for the hint :-)

> > (...)
> > http://marc.info/?l=linux-kernel&m=147325166209844&w=2
> >
> > It uses the git diff xfuncname feature you mentioned above. To be
> > honest I'm surprised it isn't the git default, it seems odd to have so
> > many diff drivers included in git and not enable them on obvious file
> > extensions. Oh well.
> 
> This came up before: http://www.spinics.net/lists/git/msg164216.html,
> Linus didn't like it.  I suggest you add him to the CC on this patch to
> see if he changed his mind.

Thanks for the pointer. It is interesting to see many people had been
bothered by the same problem for many years and even proposed solution
for it. But also sad to see that nothing happened :-(

Well Linus suggested to improve the default, he was not opposed to the
change per se I think. But it was 5 years ago and nothing happened
since then, so I'd rather go with what is available today. Which means
either one space before labels, or drivers in .gitattributes. Choose
your poison ;-)

Thanks,
-- 
Jean Delvare
SUSE L3 Support

  reply	other threads:[~2016-09-19  9:37 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <566ABCD9.1060404@users.sourceforge.net>
2016-09-12 18:40 ` [PATCH 00/47] RADOS Block Device: Fine-tuning for several function implementations SF Markus Elfring
2016-09-12 18:42   ` [PATCH 01/47] block-rbd: Use kmalloc_array() in rbd_header_from_disk() SF Markus Elfring
2016-09-14 15:25     ` Ilya Dryomov
2016-09-12 18:43   ` [PATCH 02/47] block-rbd: Less function calls in rbd_header_from_disk() after error detection SF Markus Elfring
2016-09-13  7:58     ` Ilya Dryomov
2016-09-12 18:44   ` [PATCH 03/47] block-rbd: Adjust the position of a jump label in rbd_header_from_disk() SF Markus Elfring
2016-09-13  8:01     ` Ilya Dryomov
2016-09-13  8:12       ` SF Markus Elfring
2016-09-13  9:16         ` Ilya Dryomov
2016-09-13 14:36           ` Jean Delvare
2016-09-13 15:30             ` Ilya Dryomov
2016-09-13 16:50               ` Jean Delvare
2016-09-13 18:31                 ` Ilya Dryomov
2016-09-19  9:37                   ` Jean Delvare [this message]
2016-09-12 18:45   ` [PATCH 04/47] block-rbd: Refactor two calls for memory allocations in rbd_dev_image_id() SF Markus Elfring
2016-09-13  8:03     ` Ilya Dryomov
2016-09-13  8:36       ` SF Markus Elfring
2016-09-12 18:46   ` [PATCH 05/47] block-rbd: One function call less in rbd_dev_image_id() after error detection SF Markus Elfring
2016-09-12 18:46   ` [PATCH 00/47] RADOS Block Device: Fine-tuning for several function implementations Joe Perches
2016-09-12 18:47   ` [PATCH 06/47] block-rbd: Rename jump labels in rbd_add_parse_args() SF Markus Elfring
2016-09-13  8:05     ` Ilya Dryomov
2016-09-12 18:48   ` [PATCH 07/47] block-rbd: Rename a jump label in rbd_dev_v2_snap_name() SF Markus Elfring
2016-09-12 18:49   ` [PATCH 08/47] block-rbd: Rename jump labels in rbd_dev_v2_snap_context() SF Markus Elfring
2016-09-12 18:50   ` [PATCH 09/47] block-rbd: Rename a jump label in rbd_spec_fill_names() SF Markus Elfring
2016-09-12 18:51   ` [PATCH 10/47] block-rbd: One function call less in rbd_dev_image_name() after error detection SF Markus Elfring
2016-09-12 18:54   ` [PATCH 11/47] block-rbd: Delete three unnecessary initialisations in rbd_dev_image_name() SF Markus Elfring
2016-09-12 18:57   ` [PATCH 12/47] block-rbd: One function call less in rbd_dev_v2_parent_info() after error detection SF Markus Elfring
2016-09-12 18:58   ` [PATCH 13/47] block-rbd: Delete an unnecessary initialisation in rbd_dev_v2_parent_info() SF Markus Elfring
2016-09-12 18:59   ` [PATCH 14/47] block-rbd: Rename a jump label in rbd_dev_v2_object_prefix() SF Markus Elfring
2016-09-12 19:00   ` [PATCH 15/47] block-rbd: Rename jump labels in rbd_dev_create() SF Markus Elfring
2016-09-13  8:07     ` Ilya Dryomov
2016-09-12 19:01   ` [PATCH 16/47] block-rbd: Rename jump labels in rbd_dev_v1_header_info() SF Markus Elfring
2016-09-12 19:03   ` [PATCH 17/47] block-rbd: Rename jump labels in rbd_init_disk() SF Markus Elfring
2016-09-12 19:04   ` [PATCH 18/47] block-rbd: Fix jump targets in rbd_queue_workfn() SF Markus Elfring
2016-09-12 19:05   ` [PATCH 19/47] block-rbd: Rename a jump label in rbd_reregister_watch() SF Markus Elfring
2016-09-12 19:06   ` [PATCH 20/47] block-rbd: Rename a jump label in rbd_register_watch() SF Markus Elfring
2016-09-12 19:07   ` [PATCH 21/47] block-rbd: Rename jump labels in rbd_try_lock() SF Markus Elfring
2016-09-12 19:08   ` [PATCH 22/47] block-rbd: Rename a jump label in find_watcher() SF Markus Elfring
2016-09-12 19:09   ` [PATCH 23/47] block-rbd: Rename jump labels in get_lock_owner_info() SF Markus Elfring
2016-09-12 19:10   ` [PATCH 24/47] block-rbd: Rename jump labels in rbd_request_lock() SF Markus Elfring
2016-09-12 19:11   ` [PATCH 25/47] block-rbd: Fix jump targets in rbd_img_parent_read() SF Markus Elfring
2016-09-12 19:12   ` [PATCH 26/47] block-rbd: Rename a jump label in rbd_img_parent_read_callback() SF Markus Elfring
2016-09-12 19:13   ` [PATCH 27/47] block-rbd: Rename a jump label in rbd_img_request_submit() SF Markus Elfring
2016-09-12 19:14   ` [PATCH 28/47] block-rbd: Refactor a jump target in rbd_img_obj_exists_submit() SF Markus Elfring
2016-09-13  8:10     ` Ilya Dryomov
2016-09-12 19:15   ` [PATCH 29/47] block-rbd: Delete an unnecessary initialisation " SF Markus Elfring
2016-09-12 19:16   ` [PATCH 30/47] block-rbd: Refactor a jump target in rbd_img_obj_exists_callback() SF Markus Elfring
2016-09-12 19:18   ` [PATCH 31/47] block-rbd: Fix three jump targets in rbd_img_obj_parent_read_full() SF Markus Elfring
2016-09-12 19:20   ` [PATCH 32/47] block-rbd: Rename a jump label in rbd_img_obj_parent_read_full_callback() SF Markus Elfring
2016-09-12 19:22   ` [PATCH 33/47] block-rbd: Adjust the position of a jump label in rbd_img_request_fill() SF Markus Elfring
2016-09-12 19:23   ` [PATCH 34/47] block-rbd: Rename a jump label in rbd_img_obj_callback() SF Markus Elfring
2016-09-12 19:24   ` [PATCH 35/47] block-rbd: Rename jump labels in rbd_osd_req_create_copyup() SF Markus Elfring
2016-09-12 19:25   ` [PATCH 36/47] block-rbd: Rename jump labels in rbd_osd_req_create() SF Markus Elfring
2016-09-12 19:26   ` [PATCH 37/47] block-rbd: Rename a jump label in bio_chain_clone_range() SF Markus Elfring
2016-09-12 19:27   ` [PATCH 38/47] block-rbd: Rename jump labels in rbd_client_create() SF Markus Elfring
2016-09-12 19:28   ` [PATCH 39/47] block-rbd: Rename a jump label in rbd_ioctl_set_ro() SF Markus Elfring
2016-09-12 19:29   ` [PATCH 40/47] block-rbd: One function call less in rbd_dev_probe_parent() after error detection SF Markus Elfring
2016-09-12 19:30   ` [PATCH 41/47] block-rbd: Rename jump labels in rbd_dev_device_setup() SF Markus Elfring
2016-09-12 19:31   ` [PATCH 42/47] block-rbd: Rename jump labels in rbd_dev_image_probe() SF Markus Elfring
2016-09-12 19:32   ` [PATCH 43/47] block-rbd: Rename jump labels in do_rbd_add() SF Markus Elfring
2016-09-12 19:33   ` [PATCH 44/47] block-rbd: Delete an unnecessary initialisation " SF Markus Elfring
2016-09-12 19:34   ` [PATCH 45/47] block-rbd: Rename a jump label in rbd_slab_init() SF Markus Elfring
2016-09-12 19:35   ` [PATCH 46/47] block-rbd: Rename jump labels in rbd_init() SF Markus Elfring
2016-09-12 19:36   ` [PATCH 47/47] block-rbd: Delete unwanted spaces behind usages of the sizeof operator SF Markus Elfring
2017-08-13 19:10   ` [PATCH 00/47] RADOS Block Device: Fine-tuning for several function implementations SF Markus Elfring

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=20160919113724.07fc3752@endymion \
    --to=jdelvare@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=corbet@lwn.net \
    --cc=elder@kernel.org \
    --cc=idryomov@gmail.com \
    --cc=julia.lawall@lip6.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sage@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox