All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: dsterba@suse.cz, Nikolay Borisov <nborisov@suse.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 2/8] btrfs: return required error from btrfs_check_super_csum
Date: Wed, 28 Mar 2018 04:43:02 +0800	[thread overview]
Message-ID: <ac89e7e0-dd67-d606-859d-dd784157e453@oracle.com> (raw)
In-Reply-To: <20180327191636.GE30422@twin.jikos.cz>



On 03/28/2018 03:16 AM, David Sterba wrote:
> On Tue, Mar 27, 2018 at 11:05:53AM +0300, Nikolay Borisov wrote:
>>> +	if (err) {
>>> +		if (err == -EINVAL)
>>> +			pr_err("BTRFS error (device %pg): "\
>>> +				"unsupported checksum algorithm",
>>> +				fs_devices->latest_bdev);
>>
>> I don't think strings should be idented. I.e the correct thing here
>> should be to have only fs_devices->latest_bdev on a new line, even if
>> the string goes above the char limit of 80. In any case the \ is not
>> needed due to gcc's support for string literal concatenation:
>>
>> pr_err("BTRFS error (device %pg): "
>>         "unsupported checksum algorithm",
>>         fs_devices->latest_bdev)
>>
>> should work equally well. But as I said I don't think this is even
>> needed. Let's wait and see what David says.
> 
> The strings should not be split, because we want to be able to grep the
> sources for the error messages. If the string does not fit 80 chars
> per line, then it can be moved to the next line and un-indented to the
> left. Plenty of examples.

  I understand reason behind string should not be split, but I
  thought here will be an exception, as if you want to search
  for the string you will still use "unsupported checksum algorithm"
  which is still in one line.
  About the grep not able to find the string which are split,
  I look at it as fixing the wrong end of the problem. That is Grep
  end problem being fixes at the c code end. Anyway as its kind of
  linux general guidlines, I shall fix my patch.

Thanks, Anand

  reply	other threads:[~2018-03-27 20:41 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26  8:27 [PATCH 0/8] Superblock read and verify cleanups Anand Jain
2018-03-26  8:27 ` [PATCH 1/8] btrfs: cleanup btrfs_check_super_csum() for better code flow Anand Jain
2018-03-27 12:10   ` Nikolay Borisov
2018-03-26  8:27 ` [PATCH 2/8] btrfs: return required error from btrfs_check_super_csum Anand Jain
2018-03-27  8:05   ` Nikolay Borisov
2018-03-27 19:16     ` David Sterba
2018-03-27 20:43       ` Anand Jain [this message]
2018-04-05 14:48         ` David Sterba
2018-03-26  8:27 ` [PATCH 3/8] btrfs: cleanup btrfs_read_disk_super() to return std error Anand Jain
2018-03-27  8:07   ` Nikolay Borisov
2018-03-26  8:27 ` [PATCH 4/8] btrfs: make btrfs_check_super_csum() non-static Anand Jain
2018-03-27 12:10   ` Nikolay Borisov
2018-03-26  8:27 ` [PATCH 5/8] btrfs: check if the fsid in the primary sb and copy sb are same Anand Jain
2018-03-27  8:49   ` Nikolay Borisov
2018-03-27 22:06     ` Anand Jain
2018-03-28  6:08       ` Nikolay Borisov
2018-03-28  7:05         ` Anand Jain
2018-03-26  8:27 ` [PATCH 6/8] btrfs: verify checksum when superblock is read for scan Anand Jain
2018-03-27 11:30   ` Nikolay Borisov
2018-03-27 12:09     ` Nikolay Borisov
2018-03-27 23:01       ` Anand Jain
2018-03-28  6:12         ` Nikolay Borisov
2018-03-26  8:27 ` [PATCH 7/8] btrfs: verify checksum for all devices in mount context Anand Jain
2018-03-27 12:21   ` Nikolay Borisov
2018-03-27 22:48     ` Anand Jain
2018-03-26  8:27 ` [PATCH 8/8] btrfs: drop the redundant invalidate_bdev() Anand Jain

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=ac89e7e0-dd67-d606-859d-dd784157e453@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nborisov@suse.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.