* [PATCH 2/2] fat: use fat_msg_ratelimit in fat__get_entry.
@ 2012-05-13 11:03 Namjae Jeon
2012-05-13 14:24 ` OGAWA Hirofumi
2012-05-13 15:46 ` Joe Perches
0 siblings, 2 replies; 9+ messages in thread
From: Namjae Jeon @ 2012-05-13 11:03 UTC (permalink / raw)
To: hirofumi; +Cc: linux-kernel, Namjae Jeon, Amit Sahrawat
When application tried to lookup(opendir/readdir/stat) 5000 files in plugging usb device formatted by FAT, If unplugging usb device while lookup files, so many message occured like the below log. and currently it make app slow.
So this patch use fat_msg_ratelimit function about this message to decrease this messages.
#> ./file_lookup_testcase ./files_directory/
[ 57.768000] usb 2-1.4: USB disconnect, device number 4
[ 57.812000] FAT-fs (sda1): FAT read failed (blocknr 2631)
stat failed
[ 57.816000] FAT-fs (sda1): Directory bread(block 396816) failed
[ 57.824000] FAT-fs (sda1): Directory bread(block 396817) failed
: No such file [ 57.832000] FAT-fs (sda1): Directory bread(block 396818) failed
or directory
[ 57.840000] FAT-fs (sda1): Directory bread(block 396819) failed
[ 57.848000] FAT-fs (sda1): Directory bread(block 396820) failed
[ 57.860000] FAT-fs (sda1): Directory bread(block 396821) failed
[ 57.876000] FAT-fs (sda1): Directory bread(block 396822) failed
[ 57.892000] FAT-fs (sda1): Directory bread(block 396823) failed
[ 57.904000] FAT-fs (sda1): Directory bread(block 406824) failed
[ 57.920000] FAT-fs (sda1): Directory bread(block 406825) failed
[ 57.932000] FAT-fs (sda1): Directory bread(block 406826) failed
[ 57.940000] FAT-fs (sda1): Directory bread(block 406827) failed
[ 57.952000] FAT-fs (sda1): Directory bread(block 406828) failed
[ 57.960000] FAT-fs (sda1): Directory bread(block 406829) failed
[ 57.964000] FAT-fs (sda1): Directory bread(block 406830) failed
[ 57.972000] FAT-fs (sda1): Directory bread(block 406831) failed
[ 57.976000] FAT-fs (sda1): Directory bread(block 417696) failed
[ 57.984000] FAT-fs (sda1): Directory bread(block 417697) failed
[ 57.988000] FAT-fs (sda1): Directory bread(block 417698) failed
[ 57.996000] FAT-fs (sda1): Directory bread(block 417699) failed
[ 58.000000] FAT-fs (sda1): Directory bread(block 417700) failed
[ 58.004000] FAT-fs (sda1): Directory bread(block 417701) failed
[ 58.012000] FAT-fs (sda1): Directory bread(block 417702) failed
[ 58.016000] FAT-fs (sda1): Directory bread(block 417703) failed
[ 58.024000] FAT-fs (sda1): FAT read failed (blocknr 2631)
stat[ 58.028000] FAT-fs (sda1): Directory bread(block 396816) failed
[ 58.036000] FAT-fs (sda1): Directory bread(block 396817) failed
[ 58.040000] FAT-fs (sda1): Directory bread(block 396818) failed
[ 58.048000] FAT-fs (sda1): Directory bread(block 396819) failed
[ 58.052000] FAT-fs (sda1): Directory bread(block 396820) failed
[ 58.060000] FAT-fs (sda1): Directory bread(block 396821) failed
....
...
.
Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Amit Sahrawat <amit.sahrawat83@gmail.com>
---
fs/fat/dir.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/fat/dir.c b/fs/fat/dir.c
index aca191b..b2cdbf4 100644
--- a/fs/fat/dir.c
+++ b/fs/fat/dir.c
@@ -98,8 +98,8 @@ next:
*bh = sb_bread(sb, phys);
if (*bh == NULL) {
- fat_msg(sb, KERN_ERR, "Directory bread(block %llu) failed",
- (llu)phys);
+ fat_msg_ratelimit(sb, KERN_ERR, "Directory bread(block %llu) "
+ "failed", (llu)phys);
/* skip this block */
*pos = (iblock + 1) << sb->s_blocksize_bits;
goto next;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] fat: use fat_msg_ratelimit in fat__get_entry.
2012-05-13 11:03 [PATCH 2/2] fat: use fat_msg_ratelimit in fat__get_entry Namjae Jeon
@ 2012-05-13 14:24 ` OGAWA Hirofumi
2012-05-13 15:46 ` Joe Perches
1 sibling, 0 replies; 9+ messages in thread
From: OGAWA Hirofumi @ 2012-05-13 14:24 UTC (permalink / raw)
To: Namjae Jeon; +Cc: linux-kernel, Amit Sahrawat, Andrew Morton
Namjae Jeon <linkinjeon@gmail.com> writes:
> [ 58.052000] FAT-fs (sda1): Directory bread(block 396820) failed
> [ 58.060000] FAT-fs (sda1): Directory bread(block 396821) failed
> ....
> ...
> .
> Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
> Signed-off-by: Amit Sahrawat <amit.sahrawat83@gmail.com>
Looks fine.
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Thanks.
> ---
> fs/fat/dir.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/fat/dir.c b/fs/fat/dir.c
> index aca191b..b2cdbf4 100644
> --- a/fs/fat/dir.c
> +++ b/fs/fat/dir.c
> @@ -98,8 +98,8 @@ next:
>
> *bh = sb_bread(sb, phys);
> if (*bh == NULL) {
> - fat_msg(sb, KERN_ERR, "Directory bread(block %llu) failed",
> - (llu)phys);
> + fat_msg_ratelimit(sb, KERN_ERR, "Directory bread(block %llu) "
> + "failed", (llu)phys);
> /* skip this block */
> *pos = (iblock + 1) << sb->s_blocksize_bits;
> goto next;
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] fat: use fat_msg_ratelimit in fat__get_entry.
2012-05-13 11:03 [PATCH 2/2] fat: use fat_msg_ratelimit in fat__get_entry Namjae Jeon
2012-05-13 14:24 ` OGAWA Hirofumi
@ 2012-05-13 15:46 ` Joe Perches
2012-05-13 16:07 ` OGAWA Hirofumi
1 sibling, 1 reply; 9+ messages in thread
From: Joe Perches @ 2012-05-13 15:46 UTC (permalink / raw)
To: Namjae Jeon; +Cc: hirofumi, linux-kernel, Amit Sahrawat
On Sun, 2012-05-13 at 07:03 -0400, Namjae Jeon wrote:
> So this patch use fat_msg_ratelimit function about this message to decrease this messages.
[]
> diff --git a/fs/fat/dir.c b/fs/fat/dir.c
> index aca191b..b2cdbf4 100644
> --- a/fs/fat/dir.c
> +++ b/fs/fat/dir.c
> @@ -98,8 +98,8 @@ next:
>
> *bh = sb_bread(sb, phys);
> if (*bh == NULL) {
> - fat_msg(sb, KERN_ERR, "Directory bread(block %llu) failed",
> - (llu)phys);
> + fat_msg_ratelimit(sb, KERN_ERR, "Directory bread(block %llu) "
> + "failed", (llu)phys);
Please don't split format strings.
It's much harder to grep.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] fat: use fat_msg_ratelimit in fat__get_entry.
2012-05-13 15:46 ` Joe Perches
@ 2012-05-13 16:07 ` OGAWA Hirofumi
2012-05-13 16:21 ` Joe Perches
0 siblings, 1 reply; 9+ messages in thread
From: OGAWA Hirofumi @ 2012-05-13 16:07 UTC (permalink / raw)
To: Joe Perches; +Cc: Namjae Jeon, linux-kernel, Amit Sahrawat
Joe Perches <joe@perches.com> writes:
> On Sun, 2012-05-13 at 07:03 -0400, Namjae Jeon wrote:
>> So this patch use fat_msg_ratelimit function about this message to decrease this messages.
> []
>> diff --git a/fs/fat/dir.c b/fs/fat/dir.c
>> index aca191b..b2cdbf4 100644
>> --- a/fs/fat/dir.c
>> +++ b/fs/fat/dir.c
>> @@ -98,8 +98,8 @@ next:
>>
>> *bh = sb_bread(sb, phys);
>> if (*bh == NULL) {
>> - fat_msg(sb, KERN_ERR, "Directory bread(block %llu) failed",
>> - (llu)phys);
>> + fat_msg_ratelimit(sb, KERN_ERR, "Directory bread(block %llu) "
>> + "failed", (llu)phys);
>
> Please don't split format strings.
> It's much harder to grep.
Please fight with 80 columns guys before requesting it.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] fat: use fat_msg_ratelimit in fat__get_entry.
2012-05-13 16:07 ` OGAWA Hirofumi
@ 2012-05-13 16:21 ` Joe Perches
2012-05-13 16:39 ` OGAWA Hirofumi
0 siblings, 1 reply; 9+ messages in thread
From: Joe Perches @ 2012-05-13 16:21 UTC (permalink / raw)
To: OGAWA Hirofumi; +Cc: Namjae Jeon, linux-kernel, Amit Sahrawat
On Mon, 2012-05-14 at 01:07 +0900, OGAWA Hirofumi wrote:
> Joe Perches <joe@perches.com> writes:
>
> > On Sun, 2012-05-13 at 07:03 -0400, Namjae Jeon wrote:
> >> So this patch use fat_msg_ratelimit function about this message to decrease this messages.
> > []
> >> diff --git a/fs/fat/dir.c b/fs/fat/dir.c
> >> index aca191b..b2cdbf4 100644
> >> --- a/fs/fat/dir.c
> >> +++ b/fs/fat/dir.c
> >> @@ -98,8 +98,8 @@ next:
> >>
> >> *bh = sb_bread(sb, phys);
> >> if (*bh == NULL) {
> >> - fat_msg(sb, KERN_ERR, "Directory bread(block %llu) failed",
> >> - (llu)phys);
> >> + fat_msg_ratelimit(sb, KERN_ERR, "Directory bread(block %llu) "
> >> + "failed", (llu)phys);
> >
> > Please don't split format strings.
> > It's much harder to grep.
>
> Please fight with 80 columns guys before requesting it.
That battle is long over.
from Documentation/CodingStyle:
Chapter 2: Breaking long lines and strings
[]
The limit on the length of lines is 80 columns and this is a strongly
preferred limit.
[]
However, never break user-visible strings such as
printk messages, because that breaks the ability to grep for them.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] fat: use fat_msg_ratelimit in fat__get_entry.
2012-05-13 16:21 ` Joe Perches
@ 2012-05-13 16:39 ` OGAWA Hirofumi
2012-05-13 23:03 ` Namjae Jeon
0 siblings, 1 reply; 9+ messages in thread
From: OGAWA Hirofumi @ 2012-05-13 16:39 UTC (permalink / raw)
To: Joe Perches; +Cc: Namjae Jeon, linux-kernel, Amit Sahrawat
Joe Perches <joe@perches.com> writes:
>> > Please don't split format strings.
>> > It's much harder to grep.
>>
>> Please fight with 80 columns guys before requesting it.
>
> That battle is long over.
>
> from Documentation/CodingStyle:
>
> Chapter 2: Breaking long lines and strings
>
> []
>
> The limit on the length of lines is 80 columns and this is a strongly
> preferred limit.
> []
> However, never break user-visible strings such as
> printk messages, because that breaks the ability to grep for them.
Oh, I see. Namjae, can you adjust the patches to adjust for this?
I don't care either one, so you can add the following if you tweaked
patches.
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Thanks.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] fat: use fat_msg_ratelimit in fat__get_entry.
2012-05-13 16:39 ` OGAWA Hirofumi
@ 2012-05-13 23:03 ` Namjae Jeon
0 siblings, 0 replies; 9+ messages in thread
From: Namjae Jeon @ 2012-05-13 23:03 UTC (permalink / raw)
To: OGAWA Hirofumi; +Cc: Joe Perches, linux-kernel, Amit Sahrawat
2012/5/14, OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>:
> Joe Perches <joe@perches.com> writes:
>
>>> > Please don't split format strings.
>>> > It's much harder to grep.
>>>
>>> Please fight with 80 columns guys before requesting it.
>>
>> That battle is long over.
>>
>> from Documentation/CodingStyle:
>>
>> Chapter 2: Breaking long lines and strings
>>
>> []
>>
>> The limit on the length of lines is 80 columns and this is a strongly
>> preferred limit.
>> []
>> However, never break user-visible strings such as
>> printk messages, because that breaks the ability to grep for them.
>
> Oh, I see. Namjae, can you adjust the patches to adjust for this?
> I don't care either one, so you can add the following if you tweaked
> patches.
Hi. Ogawa.
Okay, I will send you v2 patches for this.
Thanks for your help.
>
> Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
>
> Thanks.
> --
> OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/2] fat: use fat_msg_ratelimit in fat__get_entry.
@ 2012-05-15 14:46 Namjae Jeon
2012-05-15 15:11 ` OGAWA Hirofumi
0 siblings, 1 reply; 9+ messages in thread
From: Namjae Jeon @ 2012-05-15 14:46 UTC (permalink / raw)
To: hirofumi; +Cc: linux-kernel, joe, Namjae Jeon, Amit Sahrawat
When application tried to lookup(opendir/readdir/stat) 5000 files in plugging usb device formatted by FAT, If unplugging usb device while lookup files, so many message occured like the below log. and currently it make app slow.
So this patch use fat_msg_ratelimit function about this message to decrease this messages.
#> ./file_lookup_testcase ./files_directory/
[ 57.768000] usb 2-1.4: USB disconnect, device number 4
[ 57.812000] FAT-fs (sda1): FAT read failed (blocknr 2631)
stat failed
[ 57.816000] FAT-fs (sda1): Directory bread(block 396816) failed
[ 57.824000] FAT-fs (sda1): Directory bread(block 396817) failed
: No such file [ 57.832000] FAT-fs (sda1): Directory bread(block 396818) failed
or directory
[ 57.840000] FAT-fs (sda1): Directory bread(block 396819) failed
[ 57.848000] FAT-fs (sda1): Directory bread(block 396820) failed
[ 57.860000] FAT-fs (sda1): Directory bread(block 396821) failed
[ 57.876000] FAT-fs (sda1): Directory bread(block 396822) failed
[ 57.892000] FAT-fs (sda1): Directory bread(block 396823) failed
[ 57.904000] FAT-fs (sda1): Directory bread(block 406824) failed
[ 57.920000] FAT-fs (sda1): Directory bread(block 406825) failed
[ 57.932000] FAT-fs (sda1): Directory bread(block 406826) failed
[ 57.940000] FAT-fs (sda1): Directory bread(block 406827) failed
[ 57.952000] FAT-fs (sda1): Directory bread(block 406828) failed
[ 57.960000] FAT-fs (sda1): Directory bread(block 406829) failed
[ 57.964000] FAT-fs (sda1): Directory bread(block 406830) failed
[ 57.972000] FAT-fs (sda1): Directory bread(block 406831) failed
[ 57.976000] FAT-fs (sda1): Directory bread(block 417696) failed
[ 57.984000] FAT-fs (sda1): Directory bread(block 417697) failed
[ 57.988000] FAT-fs (sda1): Directory bread(block 417698) failed
[ 57.996000] FAT-fs (sda1): Directory bread(block 417699) failed
[ 58.000000] FAT-fs (sda1): Directory bread(block 417700) failed
[ 58.004000] FAT-fs (sda1): Directory bread(block 417701) failed
[ 58.012000] FAT-fs (sda1): Directory bread(block 417702) failed
[ 58.016000] FAT-fs (sda1): Directory bread(block 417703) failed
[ 58.024000] FAT-fs (sda1): FAT read failed (blocknr 2631)
stat[ 58.028000] FAT-fs (sda1): Directory bread(block 396816) failed
[ 58.036000] FAT-fs (sda1): Directory bread(block 396817) failed
[ 58.040000] FAT-fs (sda1): Directory bread(block 396818) failed
[ 58.048000] FAT-fs (sda1): Directory bread(block 396819) failed
[ 58.052000] FAT-fs (sda1): Directory bread(block 396820) failed
[ 58.060000] FAT-fs (sda1): Directory bread(block 396821) failed
Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Amit Sahrawat <amit.sahrawat83@gmail.com>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
---
fs/fat/dir.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/fat/dir.c b/fs/fat/dir.c
index aca191b..6eaa28c 100644
--- a/fs/fat/dir.c
+++ b/fs/fat/dir.c
@@ -98,8 +98,8 @@ next:
*bh = sb_bread(sb, phys);
if (*bh == NULL) {
- fat_msg(sb, KERN_ERR, "Directory bread(block %llu) failed",
- (llu)phys);
+ fat_msg_ratelimit(sb, KERN_ERR,
+ "Directory bread(block %llu) failed", (llu)phys);
/* skip this block */
*pos = (iblock + 1) << sb->s_blocksize_bits;
goto next;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] fat: use fat_msg_ratelimit in fat__get_entry.
2012-05-15 14:46 Namjae Jeon
@ 2012-05-15 15:11 ` OGAWA Hirofumi
0 siblings, 0 replies; 9+ messages in thread
From: OGAWA Hirofumi @ 2012-05-15 15:11 UTC (permalink / raw)
To: Andrew Morton; +Cc: Namjae Jeon, linux-kernel, joe, Amit Sahrawat
Namjae Jeon <linkinjeon@gmail.com> writes:
> When application tried to lookup(opendir/readdir/stat) 5000 files in plugging usb device formatted by FAT, If unplugging usb device while lookup files, so many message occured like the below log. and currently it make app slow.
> So this patch use fat_msg_ratelimit function about this message to decrease this messages.
>
> #> ./file_lookup_testcase ./files_directory/
> [ 57.768000] usb 2-1.4: USB disconnect, device number 4
[...]
> [ 58.040000] FAT-fs (sda1): Directory bread(block 396818) failed
> [ 58.048000] FAT-fs (sda1): Directory bread(block 396819) failed
> [ 58.052000] FAT-fs (sda1): Directory bread(block 396820) failed
> [ 58.060000] FAT-fs (sda1): Directory bread(block 396821) failed
Thanks.
Please handle those patches, Andrew.
> Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
> Signed-off-by: Amit Sahrawat <amit.sahrawat83@gmail.com>
> Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
> ---
> fs/fat/dir.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/fat/dir.c b/fs/fat/dir.c
> index aca191b..6eaa28c 100644
> --- a/fs/fat/dir.c
> +++ b/fs/fat/dir.c
> @@ -98,8 +98,8 @@ next:
>
> *bh = sb_bread(sb, phys);
> if (*bh == NULL) {
> - fat_msg(sb, KERN_ERR, "Directory bread(block %llu) failed",
> - (llu)phys);
> + fat_msg_ratelimit(sb, KERN_ERR,
> + "Directory bread(block %llu) failed", (llu)phys);
> /* skip this block */
> *pos = (iblock + 1) << sb->s_blocksize_bits;
> goto next;
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-05-15 15:11 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-13 11:03 [PATCH 2/2] fat: use fat_msg_ratelimit in fat__get_entry Namjae Jeon
2012-05-13 14:24 ` OGAWA Hirofumi
2012-05-13 15:46 ` Joe Perches
2012-05-13 16:07 ` OGAWA Hirofumi
2012-05-13 16:21 ` Joe Perches
2012-05-13 16:39 ` OGAWA Hirofumi
2012-05-13 23:03 ` Namjae Jeon
-- strict thread matches above, loose matches on Subject: below --
2012-05-15 14:46 Namjae Jeon
2012-05-15 15:11 ` OGAWA Hirofumi
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.