linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: hujianyang <hujianyang@huawei.com>
To: Tanya Brokhman <tlinder@codeaurora.org>
Cc: <dedekind1@gmail.com>, <ezequiel.garcia@free-electrons.com>,
	"Richard Weinberger" <richard@nod.at>,
	open list <linux-kernel@vger.kernel.org>,
	<linux-mtd@lists.infradead.org>, <linux-arm-msm@vger.kernel.org>,
	"Brian Norris" <computersforpeace@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH V5] mtd: ubi: Extend UBI layer debug/messaging capabilities
Date: Fri, 24 Oct 2014 11:39:34 +0800	[thread overview]
Message-ID: <5449C9F6.5040903@huawei.com> (raw)
In-Reply-To: <5449C870.7060509@huawei.com>

On 2014/10/24 11:33, hujianyang wrote:
> 
>> @@ -1798,15 +1803,18 @@ int ubi_thread(void *u)
>>  	int failures = 0;
>>  	struct ubi_device *ubi = u;
>>
>> -	ubi_msg("background thread \"%s\" started, PID %d",
>> +	ubi_msg(ubi, "background thread \"%s\" started, PID %d",
>>  		ubi->bgt_name, task_pid_nr(current));
>>
>>  	set_freezable();
>>  	for (;;) {
>>  		int err;
>>
>> -		if (kthread_should_stop())
>> +		if (kthread_should_stop()) {
>> +			ubi_msg(ubi, "background thread \"%s\" should stop, PID %d",
>> +				ubi->bgt_name, task_pid_nr(current));
>>  			break;
>> +		}
>>
>>  		if (try_to_freeze())
>>  			continue;

> @@ -470,8 +470,11 @@ struct ubi_wl_entry *ubi_wl_get_fm_peb(struct ubi_device *ubi, int anchor)
>  {
>  	struct ubi_wl_entry *e = NULL;
>
> -	if (!ubi->free.rb_node || (ubi->free_count - ubi->beb_rsvd_pebs < 1))
> +	if (!ubi->free.rb_node || (ubi->free_count - ubi->beb_rsvd_pebs < 1)) {
> +		ubi_warn(ubi, "Can't get peb for fastmap:anchor=%d, free_cnt=%d, reserved=%d",
> +			 anchor, ubi->free_count, ubi->beb_rsvd_pebs);
>  		goto out;
> +	}
>
>  	if (anchor)
>  		e = find_anchor_wl_entry(&ubi->free);

Sorry, one of the adding messages should be this~!

> 
>> @@ -1798,15 +1803,18 @@ int ubi_thread(void *u)
>>  	int failures = 0;
>>  	struct ubi_device *ubi = u;
>>
>> -	ubi_msg("background thread \"%s\" started, PID %d",
>> +	ubi_msg(ubi, "background thread \"%s\" started, PID %d",
>>  		ubi->bgt_name, task_pid_nr(current));
>>
>>  	set_freezable();
>>  	for (;;) {
>>  		int err;
>>
>> -		if (kthread_should_stop())
>> +		if (kthread_should_stop()) {
>> +			ubi_msg(ubi, "background thread \"%s\" should stop, PID %d",
>> +				ubi->bgt_name, task_pid_nr(current));
>>  			break;
>> +		}
>>
>>  		if (try_to_freeze())
>>  			continue;
> 
> Here are two new adding messages. Maybe a separate patch is better? Just a
> suggestion.
> 




  reply	other threads:[~2014-10-24  3:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20 16:57 [PATCH V5] mtd: ubi: Extend UBI layer debug/messaging capabilities Tanya Brokhman
2014-10-21  7:56 ` Artem Bityutskiy
2014-10-21  8:52   ` Tanya Brokhman
2014-10-22  6:06   ` hujianyang
2014-10-24  3:33 ` hujianyang
2014-10-24  3:39   ` hujianyang [this message]
2014-10-30  8:40   ` Artem Bityutskiy
2014-10-30 12:22     ` Tanya Brokhman
2014-11-02 17:14   ` Tanya Brokhman
2014-11-03  3:08     ` hujianyang
2014-11-03  7:15       ` Tanya Brokhman
2014-11-06  8:18     ` Artem Bityutskiy

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=5449C9F6.5040903@huawei.com \
    --to=hujianyang@huawei.com \
    --cc=computersforpeace@gmail.com \
    --cc=dedekind1@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=tlinder@codeaurora.org \
    /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).