diff mbox

[2/2,v3] btrfs: usage error should not be logged into system log

Message ID 1400755272-22590-2-git-send-email-anand.jain@oracle.com (mailing list archive)
State Superseded
Headers show

Commit Message

Anand Jain May 22, 2014, 10:41 a.m. UTC
From: Anand Jain <Anand.Jain@oracle.com>

I have an opinion that system logs /var/log/messages are
valuable info to investigate the real system issues at
the data center. People handling data center issues
do spend a lot time and efforts analyzing messages
files. Having usage error logged into /var/log/messages
is something we should avoid.

Signed-off-by: Anand Jain <Anand.Jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
---
 v3: rebase again
 v2: rebase
 fs/btrfs/sysfs.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

Comments

Koen Kooi May 22, 2014, 11:21 a.m. UTC | #1
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Anand Jain schreef op 22-05-14 12:41:
> From: Anand Jain <Anand.Jain@oracle.com>
> 
> I have an opinion that system logs /var/log/messages are valuable info to
> investigate the real system issues at the data center. People handling
> data center issues do spend a lot time and efforts analyzing messages 
> files. Having usage error logged into /var/log/messages is something we
> should avoid.

Do you mean 'syslog' when you say '/var/log/messages'? There's no
/var/log/messages on my machines..

regards,

Koen

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFTfd2kMkyGM64RGpERAsd6AKCZxfhjjtYWUZLJwS0NnghuCb9lBQCfYye2
L3z3JmZqj9TTb+355MMB6w8=
=SfnW
-----END PGP SIGNATURE-----

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Anand Jain May 23, 2014, 2:41 a.m. UTC | #2
On 22/05/14 19:21, Koen Kooi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Anand Jain schreef op 22-05-14 12:41:
>> From: Anand Jain <Anand.Jain@oracle.com>
>>
>> I have an opinion that system logs /var/log/messages are valuable info to
>> investigate the real system issues at the data center. People handling
>> data center issues do spend a lot time and efforts analyzing messages
>> files. Having usage error logged into /var/log/messages is something we
>> should avoid.
>
> Do you mean 'syslog' when you say '/var/log/messages'? There's no
> /var/log/messages on my machines..

yes indeed, depending on whats configured.
sorry to confuse you. Will update the commit
Thanks, Anand

> regards,
>
> Koen


--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
index 159df4f..c81b499 100644
--- a/fs/btrfs/sysfs.c
+++ b/fs/btrfs/sysfs.c
@@ -381,11 +381,8 @@  static ssize_t btrfs_label_store(struct kobject *kobj,
 	 */
 	p_len = strcspn(buf, "\n");
 
-	if (p_len >= BTRFS_LABEL_SIZE) {
-		pr_err("BTRFS: unable to set label with more than %d bytes\n",
-		       BTRFS_LABEL_SIZE - 1);
+	if (p_len >= BTRFS_LABEL_SIZE)
 		return -EINVAL;
-	}
 
 	trans = btrfs_start_transaction(root, 0);
 	if (IS_ERR(trans))