u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/5] ubi: ubifs: Turn off verbose prints
Date: Wed, 20 Mar 2013 11:14:10 +0100	[thread overview]
Message-ID: <51498BF2.10601@denx.de> (raw)
In-Reply-To: <CANr=Z=bCXBUs3gt4LcukNfEbfJ-wZ5QoKWb3eu046xhm7dp4AA@mail.gmail.com>

Hi Joe,

On 20.03.2013 11:07, Joe Hershberger wrote:

<snip>

>>>  /* Normal UBI messages */
>>> -#define ubi_msg(fmt, ...) printk(KERN_NOTICE "UBI: " fmt "\n", ##__VA_ARGS__)
>>> +#define ubi_msg(fmt, ...) /*printk(KERN_NOTICE "UBI: " fmt "\n", \
>>> +                             ##__VA_ARGS__)*/
>>
>> Hmmm....
> 
> Yes... this is ugly... I'll clean it up.

Thanks.

>>>  /* UBI warning messages */
>>>  #define ubi_warn(fmt, ...) printk(KERN_WARNING "UBI warning: %s: " fmt "\n", \
>>>                                 __func__, ##__VA_ARGS__)
>>> diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h
>>> index 0af471a..4ab1cbd 100644
>>> --- a/fs/ubifs/ubifs.h
>>> +++ b/fs/ubifs/ubifs.h
>>> @@ -464,7 +464,7 @@ static inline ino_t parent_ino(struct dentry *dentry)
>>>
>>>  /* Normal UBIFS messages */
>>>  #define ubifs_msg(fmt, ...) \
>>> -             printk(KERN_NOTICE "UBIFS: " fmt "\n", ##__VA_ARGS__)
>>> +             /*printk(KERN_NOTICE "UBIFS: " fmt "\n", ##__VA_ARGS__)*/
>>
>> ... Not sure again about this silencing. And these "removed" printk's
>> are really ugly.
> 
> Agreed... I'll clean it up.
> 
>> Could you please give an example of UBI usage (message logs from "ubi
>> create ..., ubi part ..., ubi read ...") without this patch (or complete
>> patchset) and with it? So that we see the real difference?
> 
> Here is boot:
> 
> <snip>
> NAND:   1024 MiB
> MMC:   SDHCI: 0
> UBI: attaching mtd1 to ubi0
> UBI: physical eraseblock size:   131072 bytes (128 KiB)
> UBI: logical eraseblock size:    129024 bytes
> UBI: smallest flash I/O unit:    2048
> UBI: sub-page size:              512
> UBI: VID header offset:          512 (aligned 512)
> UBI: data offset:                2048
> UBI: attached mtd1 to ubi0
> UBI: MTD device name:            "mtd=2"
> UBI: MTD device size:            70 MiB
> UBI: number of good PEBs:        560
> UBI: number of bad PEBs:         0
> UBI: max. allowed volumes:       128
> UBI: wear-leveling threshold:    4096
> UBI: number of internal volumes: 1
> UBI: number of user volumes:     4
> UBI: available PEBs:             0
> UBI: total number of reserved PEBs: 560
> UBI: number of PEBs reserved for bad PEB handling: 80
> UBI: max/mean erase counter: 7/1
> In:    serial
> Out:   serial
> Err:   serial
> <snip>
> 
> 
> And here is a "env save"
> 
> 
> Saving Environment to UBI...
> UBI: mtd1 is detached from ubi0
> UBI: attaching mtd1 to ubi0
> UBI: physical eraseblock size:   131072 bytes (128 KiB)
> UBI: logical eraseblock size:    129024 bytes
> UBI: smallest flash I/O unit:    2048
> UBI: sub-page size:              512
> UBI: VID header offset:          512 (aligned 512)
> UBI: data offset:                2048
> UBI: attached mtd1 to ubi0
> UBI: MTD device name:            "mtd=2"
> UBI: MTD device size:            70 MiB
> UBI: number of good PEBs:        560
> UBI: number of bad PEBs:         0
> UBI: max. allowed volumes:       128
> UBI: wear-leveling threshold:    4096
> UBI: number of internal volumes: 1
> UBI: number of user volumes:     4
> UBI: available PEBs:             0
> UBI: total number of reserved PEBs: 560
> UBI: number of PEBs reserved for bad PEB handling: 80
> UBI: max/mean erase counter: 5/1
> Writing to UBI... done
> 
> 
> It's pretty out of control.
> 
> With this patch everything that starts with "UBI:" is gone.  Only
> errors remain (if any).

I see. This is definitely helpful for your use-case, env in UBI. But I
would like to keep the UBI printf's for all other use cases. Or at least
make it configurable.

How about adding a switch/define, to optionally disable the UBI output?
This seems to be the most flexible option to me.

Thanks,
Stefan

  reply	other threads:[~2013-03-20 10:14 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-08 20:07 [U-Boot] [PATCH 0/5] Add support for using an UBI volume for environment Joe Hershberger
2013-02-08 20:07 ` [U-Boot] [PATCH 1/5] ubi: Expose a few simple functions from the cmd_ubi Joe Hershberger
2013-02-11 10:45   ` Stefan Roese
2013-02-08 20:07 ` [U-Boot] [PATCH 2/5] ubi: ubifs: Turn off verbose prints Joe Hershberger
2013-02-11 10:52   ` Stefan Roese
2013-03-20 10:07     ` Joe Hershberger
2013-03-20 10:14       ` Stefan Roese [this message]
2013-03-20 10:19         ` Joe Hershberger
2013-03-20 13:11           ` Tom Rini
2013-02-08 20:07 ` [U-Boot] [PATCH 3/5] mtd: Make mtdparts work with pre-reloc env Joe Hershberger
2013-02-11 10:53   ` Stefan Roese
2013-02-08 20:07 ` [U-Boot] [PATCH 4/5] env: Add support for UBI environment Joe Hershberger
2013-02-11 10:54   ` Stefan Roese
2013-02-08 20:07 ` [U-Boot] [PATCH 5/5] env: Add redundant env support to UBI env Joe Hershberger
2013-02-11 11:00   ` Stefan Roese
2013-02-11 10:39 ` [U-Boot] [PATCH 0/5] Add support for using an UBI volume for environment Stefan Roese
2013-02-12  2:37 ` Scott Wood
2013-02-12 16:04   ` Tom Rini
2013-02-12 18:10     ` Scott Wood
2013-02-18 18:27 ` Tom Rini
2013-03-26 21:53 ` [U-Boot] [PATCH v2 0/6] " Joe Hershberger
2013-03-26 21:53   ` [U-Boot] [PATCH v2 1/6] ubi: Fix broken cleanup code in attach_by_scanning Joe Hershberger
2013-03-26 21:53   ` [U-Boot] [PATCH v2 2/6] ubi: Expose a few simple functions from the cmd_ubi Joe Hershberger
2013-03-26 21:53   ` [U-Boot] [PATCH v2 3/6] ubi: ubifs: Turn off verbose prints Joe Hershberger
2013-04-02 10:46     ` Stefan Roese
2013-04-02 18:25       ` Tom Rini
2013-03-26 21:53   ` [U-Boot] [PATCH v2 4/6] mtd: Make mtdparts work with pre-reloc env Joe Hershberger
2013-03-26 21:53   ` [U-Boot] [PATCH v2 5/6] env: Add support for UBI environment Joe Hershberger
2013-03-26 21:53   ` [U-Boot] [PATCH v2 6/6] env: Add redundant env support to UBI env Joe Hershberger
2013-04-08 20:32   ` [U-Boot] [PATCH v3 0/7] Add support for using an UBI volume for environment Joe Hershberger
2013-04-08 20:32     ` [U-Boot] [PATCH v3 1/7] ubi: Fix broken cleanup code in attach_by_scanning Joe Hershberger
2013-04-08 20:32     ` [U-Boot] [PATCH v3 2/7] ubi: Expose a few simple functions from the cmd_ubi Joe Hershberger
2013-04-08 20:32     ` [U-Boot] [PATCH v3 3/7] ubi: ubifs: Add documentation for README Joe Hershberger
2013-04-08 20:32     ` [U-Boot] [PATCH v3 4/7] ubi: ubifs: Turn off verbose prints Joe Hershberger
2013-04-08 20:32     ` [U-Boot] [PATCH v3 5/7] mtd: Make mtdparts work with pre-reloc env Joe Hershberger
2013-04-08 20:32     ` [U-Boot] [PATCH v3 6/7] env: Add support for UBI environment Joe Hershberger
2013-04-08 20:32     ` [U-Boot] [PATCH v3 7/7] env: Add redundant env support to UBI env Joe Hershberger
2013-04-11 22:26     ` [U-Boot] [PATCH v3 0/7] Add support for using an UBI volume for environment Tom Rini
2013-04-12  6:19       ` Stefan Roese
2013-04-12 11:30         ` Tom Rini
2013-04-12 12:52           ` Joe Hershberger
2013-04-12 14:14             ` Stefan Roese

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=51498BF2.10601@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /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;
as well as URLs for NNTP newsgroup(s).