* [PATCH] ubifs: Change log level in ubifs_xattr_get
@ 2018-01-10 10:05 rockdotlee
2018-01-10 14:39 ` Richard Weinberger
0 siblings, 1 reply; 3+ messages in thread
From: rockdotlee @ 2018-01-10 10:05 UTC (permalink / raw)
To: linux-mtd; +Cc: richard, dedekind1, adrian.hunter, Rock Lee
From: Rock Lee <rockdotlee@gmail.com>
Just print warning message when xattr value size is bigger than the
buffer size. There is a situation that other modules, like overlayfs,
try to get xattr value with a small buffer, if they get -ERANGE, they
will try again with the proper buffer size. No need to report a error
message, warning message is enough.
Signed-off-by: Rock Lee <rockdotlee@gmail.com>
---
fs/ubifs/xattr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c
index 5ddc89d..bc20530 100644
--- a/fs/ubifs/xattr.c
+++ b/fs/ubifs/xattr.c
@@ -381,7 +381,7 @@ ssize_t ubifs_xattr_get(struct inode *host, const char *name, void *buf,
if (buf) {
/* If @buf is %NULL we are supposed to return the length */
if (ui->data_len > size) {
- ubifs_err(c, "buffer size %zd, xattr len %d",
+ ubifs_warn(c, "buffer size %zd, xattr len %d",
size, ui->data_len);
err = -ERANGE;
goto out_iput;
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ubifs: Change log level in ubifs_xattr_get
2018-01-10 10:05 [PATCH] ubifs: Change log level in ubifs_xattr_get rockdotlee
@ 2018-01-10 14:39 ` Richard Weinberger
2018-01-11 1:47 ` Rock Lee
0 siblings, 1 reply; 3+ messages in thread
From: Richard Weinberger @ 2018-01-10 14:39 UTC (permalink / raw)
To: rockdotlee; +Cc: linux-mtd, dedekind1, adrian.hunter
Rock Lee,
Am Mittwoch, 10. Januar 2018, 11:05:41 CET schrieb rockdotlee@gmail.com:
> From: Rock Lee <rockdotlee@gmail.com>
>
> Just print warning message when xattr value size is bigger than the
> buffer size. There is a situation that other modules, like overlayfs,
> try to get xattr value with a small buffer, if they get -ERANGE, they
> will try again with the proper buffer size. No need to report a error
> message, warning message is enough.
>
> Signed-off-by: Rock Lee <rockdotlee@gmail.com>
> ---
> fs/ubifs/xattr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c
> index 5ddc89d..bc20530 100644
> --- a/fs/ubifs/xattr.c
> +++ b/fs/ubifs/xattr.c
> @@ -381,7 +381,7 @@ ssize_t ubifs_xattr_get(struct inode *host, const char
> *name, void *buf, if (buf) {
> /* If @buf is %NULL we are supposed to return the length */
> if (ui->data_len > size) {
> - ubifs_err(c, "buffer size %zd, xattr len %d",
> + ubifs_warn(c, "buffer size %zd, xattr len %d",
> size, ui->data_len);
Hmm, if this can be triggered that easy I suggest getting completely rid of
this message.
Thanks,
//richard
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ubifs: Change log level in ubifs_xattr_get
2018-01-10 14:39 ` Richard Weinberger
@ 2018-01-11 1:47 ` Rock Lee
0 siblings, 0 replies; 3+ messages in thread
From: Rock Lee @ 2018-01-11 1:47 UTC (permalink / raw)
To: Richard Weinberger; +Cc: linux-mtd, Artem Bityutskiy, adrian.hunter
>> Just print warning message when xattr value size is bigger than the
>> buffer size. There is a situation that other modules, like overlayfs,
>> try to get xattr value with a small buffer, if they get -ERANGE, they
>> will try again with the proper buffer size. No need to report a error
>> message, warning message is enough.
>>
>> Signed-off-by: Rock Lee <rockdotlee@gmail.com>
>> ---
>> fs/ubifs/xattr.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c
>> index 5ddc89d..bc20530 100644
>> --- a/fs/ubifs/xattr.c
>> +++ b/fs/ubifs/xattr.c
>> @@ -381,7 +381,7 @@ ssize_t ubifs_xattr_get(struct inode *host, const char
>> *name, void *buf, if (buf) {
>> /* If @buf is %NULL we are supposed to return the length */
>> if (ui->data_len > size) {
>> - ubifs_err(c, "buffer size %zd, xattr len %d",
>> + ubifs_warn(c, "buffer size %zd, xattr len %d",
>> size, ui->data_len);
>
> Hmm, if this can be triggered that easy I suggest getting completely rid of
> this message.
>
OK, forget about this one, I am going to send you another patch to get
rid of this message
--
Cheers,
Rock
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-01-11 1:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-10 10:05 [PATCH] ubifs: Change log level in ubifs_xattr_get rockdotlee
2018-01-10 14:39 ` Richard Weinberger
2018-01-11 1:47 ` Rock Lee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox