Re: [PATCH V6] UBI: Extend UBI layer debug/messaging capabilities

2014-12-29 Thread Tanya Brokhman
Hi Hu, On 12/29/2014 5:14 AM, hujianyang wrote: On 2014/11/3 21:58, Tanya Brokhman wrote: If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. The R/O block driver messages

Re: [PATCH V6] UBI: Extend UBI layer debug/messaging capabilities

2014-12-29 Thread Tanya Brokhman
Hi Hu, On 12/29/2014 5:14 AM, hujianyang wrote: On 2014/11/3 21:58, Tanya Brokhman wrote: If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. The R/O block driver messages

Re: [PATCH 3/6] UBI: Fastmap: Notify user in case of an ubi_update_fastmap() failure

2014-12-08 Thread Tanya Brokhman
On 12/8/2014 11:11 AM, Richard Weinberger wrote: Hi! Am 08.12.2014 um 07:58 schrieb Tanya Brokhman: On 12/7/2014 4:22 PM, Richard Weinberger wrote: Am 07.12.2014 um 14:59 schrieb Tanya Brokhman: Hi Richard, On 11/30/2014 1:35 PM, Richard Weinberger wrote: If ubi_update_fastmap() fails

Re: [PATCH 2/6] UBI: Fastmap: Don't allocate new ubi_wl_entry objects

2014-12-08 Thread Tanya Brokhman
On 12/8/2014 11:14 AM, Richard Weinberger wrote: Am 08.12.2014 um 09:36 schrieb Tanya Brokhman: On 11/30/2014 1:35 PM, Richard Weinberger wrote: There is no need to allocate new ones every time, we can reuse the existing ones. This makes the code cleaner and more easy to follow. Signed-off

Re: [PATCH 2/6] UBI: Fastmap: Don't allocate new ubi_wl_entry objects

2014-12-08 Thread Tanya Brokhman
} - } - old_fm = ubi->fm; ubi->fm = NULL; Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe

Re: [PATCH 2/6] UBI: Fastmap: Don't allocate new ubi_wl_entry objects

2014-12-08 Thread Tanya Brokhman
= ubi-fm; ubi-fm = NULL; Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line

Re: [PATCH 2/6] UBI: Fastmap: Don't allocate new ubi_wl_entry objects

2014-12-08 Thread Tanya Brokhman
On 12/8/2014 11:14 AM, Richard Weinberger wrote: Am 08.12.2014 um 09:36 schrieb Tanya Brokhman: On 11/30/2014 1:35 PM, Richard Weinberger wrote: There is no need to allocate new ones every time, we can reuse the existing ones. This makes the code cleaner and more easy to follow. Signed-off

Re: [PATCH 3/6] UBI: Fastmap: Notify user in case of an ubi_update_fastmap() failure

2014-12-08 Thread Tanya Brokhman
On 12/8/2014 11:11 AM, Richard Weinberger wrote: Hi! Am 08.12.2014 um 07:58 schrieb Tanya Brokhman: On 12/7/2014 4:22 PM, Richard Weinberger wrote: Am 07.12.2014 um 14:59 schrieb Tanya Brokhman: Hi Richard, On 11/30/2014 1:35 PM, Richard Weinberger wrote: If ubi_update_fastmap() fails

Re: [PATCH 3/6] UBI: Fastmap: Notify user in case of an ubi_update_fastmap() failure

2014-12-07 Thread Tanya Brokhman
On 12/7/2014 4:22 PM, Richard Weinberger wrote: Am 07.12.2014 um 14:59 schrieb Tanya Brokhman: Hi Richard, On 11/30/2014 1:35 PM, Richard Weinberger wrote: If ubi_update_fastmap() fails notify the user. This is not a hard error as ubi_update_fastmap() makes sure that upon failure the current

Re: [PATCH 5/6] UBI: Fastmap: Fix fastmap usage in ubi_volume_notify()

2014-12-07 Thread Tanya Brokhman
On 11/30/2014 1:35 PM, Richard Weinberger wrote: There is no need to switch to ro mode if ubi_update_fastmap() fails. Also get rid of the ifdef. Signed-off-by: Richard Weinberger Reviewed-by: Tanya Brokhman --- drivers/mtd/ubi/build.c | 11 +-- 1 file changed, 5 insertions

Re: [PATCH 4/6] UBI: Fastmap: Wrap fastmap specific function in a ifdef

2014-12-07 Thread Tanya Brokhman
On 11/30/2014 1:35 PM, Richard Weinberger wrote: ...such that we can implement NOP variants of some functions. This will help to reduce fastmap specific ifdefs in other c files. Signed-off-by: Richard Weinberger Reviewed-by: Tanya Brokhman --- drivers/mtd/ubi/ubi.h | 4 1 file

Re: [PATCH 3/6] UBI: Fastmap: Notify user in case of an ubi_update_fastmap() failure

2014-12-07 Thread Tanya Brokhman
t against "return -ENOSPC;" + } spin_lock(>wl_lock); } Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH 2/6] UBI: Fastmap: Don't allocate new ubi_wl_entry objects

2014-12-07 Thread Tanya Brokhman
On 11/30/2014 1:35 PM, Richard Weinberger wrote: There is no need to allocate new ones every time, we can reuse the existing ones. This makes the code cleaner and more easy to follow. Signed-off-by: Richard Weinberger Reviewed-by: Tanya Brokhman --- drivers/mtd/ubi/fastmap.c | 31

Re: [PATCH 1/6] UBI: Fastmap: Fix memory leaks while closing the WL sub-system

2014-12-07 Thread Tanya Brokhman
On 12/7/2014 1:34 PM, Richard Weinberger wrote: Am 07.12.2014 um 12:32 schrieb Tanya Brokhman: On 12/7/2014 11:54 AM, Richard Weinberger wrote: Am 07.12.2014 um 09:13 schrieb Tanya Brokhman: On 11/30/2014 1:35 PM, Richard Weinberger wrote: Add a ubi_fastmap_close() to free all resources used

Re: [PATCH 1/6] UBI: Fastmap: Fix memory leaks while closing the WL sub-system

2014-12-07 Thread Tanya Brokhman
On 12/7/2014 11:54 AM, Richard Weinberger wrote: Am 07.12.2014 um 09:13 schrieb Tanya Brokhman: On 11/30/2014 1:35 PM, Richard Weinberger wrote: Add a ubi_fastmap_close() to free all resources used by fastmap at WL shutdown. Signed-off-by: Richard Weinberger --- drivers/mtd/ubi/wl.c | 21

Re: [PATCH 1/6] UBI: Fastmap: Fix memory leaks while closing the WL sub-system

2014-12-07 Thread Tanya Brokhman
i_wl_close(struct ubi_device *ubi) { dbg_wl("close the WL sub-system"); -#ifdef CONFIG_MTD_UBI_FASTMAP - flush_work(>fm_work); -#endif + ubi_fastmap_close(ubi); shutdown_work(ubi); protection_queue_destroy(ubi); tree_destroy(>used); Thanks, Tanya B

Re: [PATCH 1/6] UBI: Fastmap: Fix memory leaks while closing the WL sub-system

2014-12-07 Thread Tanya Brokhman
) { dbg_wl(close the WL sub-system); -#ifdef CONFIG_MTD_UBI_FASTMAP - flush_work(ubi-fm_work); -#endif + ubi_fastmap_close(ubi); shutdown_work(ubi); protection_queue_destroy(ubi); tree_destroy(ubi-used); Thanks, Tanya Brokhman -- Qualcomm Israel

Re: [PATCH 1/6] UBI: Fastmap: Fix memory leaks while closing the WL sub-system

2014-12-07 Thread Tanya Brokhman
On 12/7/2014 11:54 AM, Richard Weinberger wrote: Am 07.12.2014 um 09:13 schrieb Tanya Brokhman: On 11/30/2014 1:35 PM, Richard Weinberger wrote: Add a ubi_fastmap_close() to free all resources used by fastmap at WL shutdown. Signed-off-by: Richard Weinberger rich...@nod.at --- drivers/mtd

Re: [PATCH 1/6] UBI: Fastmap: Fix memory leaks while closing the WL sub-system

2014-12-07 Thread Tanya Brokhman
On 12/7/2014 1:34 PM, Richard Weinberger wrote: Am 07.12.2014 um 12:32 schrieb Tanya Brokhman: On 12/7/2014 11:54 AM, Richard Weinberger wrote: Am 07.12.2014 um 09:13 schrieb Tanya Brokhman: On 11/30/2014 1:35 PM, Richard Weinberger wrote: Add a ubi_fastmap_close() to free all resources used

Re: [PATCH 2/6] UBI: Fastmap: Don't allocate new ubi_wl_entry objects

2014-12-07 Thread Tanya Brokhman
On 11/30/2014 1:35 PM, Richard Weinberger wrote: There is no need to allocate new ones every time, we can reuse the existing ones. This makes the code cleaner and more easy to follow. Signed-off-by: Richard Weinberger rich...@nod.at Reviewed-by: Tanya Brokhman tlin...@codeaurora.org

Re: [PATCH 3/6] UBI: Fastmap: Notify user in case of an ubi_update_fastmap() failure

2014-12-07 Thread Tanya Brokhman
; + } spin_lock(ubi-wl_lock); } Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list

Re: [PATCH 4/6] UBI: Fastmap: Wrap fastmap specific function in a ifdef

2014-12-07 Thread Tanya Brokhman
On 11/30/2014 1:35 PM, Richard Weinberger wrote: ...such that we can implement NOP variants of some functions. This will help to reduce fastmap specific ifdefs in other c files. Signed-off-by: Richard Weinberger rich...@nod.at Reviewed-by: Tanya Brokhman tlin...@codeaurora.org --- drivers

Re: [PATCH 5/6] UBI: Fastmap: Fix fastmap usage in ubi_volume_notify()

2014-12-07 Thread Tanya Brokhman
On 11/30/2014 1:35 PM, Richard Weinberger wrote: There is no need to switch to ro mode if ubi_update_fastmap() fails. Also get rid of the ifdef. Signed-off-by: Richard Weinberger rich...@nod.at Reviewed-by: Tanya Brokhman tlin...@codeaurora.org --- drivers/mtd/ubi/build.c | 11

Re: [PATCH 3/6] UBI: Fastmap: Notify user in case of an ubi_update_fastmap() failure

2014-12-07 Thread Tanya Brokhman
On 12/7/2014 4:22 PM, Richard Weinberger wrote: Am 07.12.2014 um 14:59 schrieb Tanya Brokhman: Hi Richard, On 11/30/2014 1:35 PM, Richard Weinberger wrote: If ubi_update_fastmap() fails notify the user. This is not a hard error as ubi_update_fastmap() makes sure that upon failure the current

Re: [PATCH 6/6] UBI: Fastmap: Make ubi_refill_pools() fair

2014-12-06 Thread Tanya Brokhman
ot for "end users" like UBIFS. sorry, my mistake. I meant wl_get_wle() (the new function). the only diff between wl_get_wle() and the above is that you use find_wl_entry() and wl_get_wle() uses find_mean_wl_entry() and takes the anchor into consideration. So I;m trying to understand why

Re: [PATCH 4/6] UBI: Fastmap: Fix races in ubi_wl_get_peb()

2014-12-06 Thread Tanya Brokhman
it. You mean a cond_resched()? This retry-logic is common pattern in UBI. For exmaple see ubi_wl_put_peb(). you're right. didn't pay much attention to ubi_wl_put_peb() before. don't like it there either :) perhaps we can rethink this later for both cases. Thanks, //richard Thanks, T

Re: [PATCH 4/6] UBI: Fastmap: Fix races in ubi_wl_get_peb()

2014-12-06 Thread Tanya Brokhman
-logic is common pattern in UBI. For exmaple see ubi_wl_put_peb(). you're right. didn't pay much attention to ubi_wl_put_peb() before. don't like it there either :) perhaps we can rethink this later for both cases. Thanks, //richard Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf

Re: [PATCH 6/6] UBI: Fastmap: Make ubi_refill_pools() fair

2014-12-06 Thread Tanya Brokhman
). the only diff between wl_get_wle() and the above is that you use find_wl_entry() and wl_get_wle() uses find_mean_wl_entry() and takes the anchor into consideration. So I;m trying to understand why wl_get_wle() isn't good here? Thanks, //richard Thanks, Tanya Brokhman -- Qualcomm Israel

Re: [PATCH 6/6] UBI: Fastmap: Make ubi_refill_pools() fair

2014-12-05 Thread Tanya Brokhman
sed = 0; pool->used = 0; -} -/** - * ubi_refill_pools - refills all fastmap PEB pools. - * @ubi: UBI device description object - */ -void ubi_refill_pools(struct ubi_device *ubi) -{ - spin_lock(>wl_lock); - refill_wl_pool(ubi); - refill_wl_user_pool(ubi);

Re: [PATCH 5/6] UBI: Split __wl_get_peb()

2014-12-05 Thread Tanya Brokhman
int peb, err; spin_lock(>wl_lock); - peb = __wl_get_peb(ubi); + peb = wl_get_peb(ubi); spin_unlock(>wl_lock); if (peb < 0) Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a memb

Re: [PATCH 4/6] UBI: Fastmap: Fix races in ubi_wl_get_peb()

2014-12-05 Thread Tanya Brokhman
Hi Richard On 12/5/2014 3:20 PM, Richard Weinberger wrote: Tanya, Am 05.12.2014 um 14:09 schrieb Tanya Brokhman: On 11/24/2014 3:20 PM, Richard Weinberger wrote: ubi_wl_get_peb() has two problems, it reads the pool size and usage counters without any protection. While reading one value would

Re: [PATCH 4/6] UBI: Fastmap: Fix races in ubi_wl_get_peb()

2014-12-05 Thread Tanya Brokhman
ubi_device *ubi) struct ubi_fm_pool *pool = >fm_wl_pool; int pnum; - if (pool->used == pool->size || !pool->size) { + if (pool->used == pool->size) { /* We cannot update the fastmap here because this * function is called in atomic c

Re: [PATCH 4/6] UBI: Fastmap: Fix races in ubi_wl_get_peb()

2014-12-05 Thread Tanya Brokhman
update the fastmap here because this * function is called in atomic context. * Let's fail here and refill/update it as soon as possible. */ Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center

Re: [PATCH 4/6] UBI: Fastmap: Fix races in ubi_wl_get_peb()

2014-12-05 Thread Tanya Brokhman
Hi Richard On 12/5/2014 3:20 PM, Richard Weinberger wrote: Tanya, Am 05.12.2014 um 14:09 schrieb Tanya Brokhman: On 11/24/2014 3:20 PM, Richard Weinberger wrote: ubi_wl_get_peb() has two problems, it reads the pool size and usage counters without any protection. While reading one value would

Re: [PATCH 5/6] UBI: Split __wl_get_peb()

2014-12-05 Thread Tanya Brokhman
); spin_unlock(ubi-wl_lock); if (peb 0) Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list

Re: [PATCH 6/6] UBI: Fastmap: Make ubi_refill_pools() fair

2014-12-05 Thread Tanya Brokhman
(ubi-wl_lock); - refill_wl_pool(ubi); - refill_wl_user_pool(ubi); spin_unlock(ubi-wl_lock); } Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation

Re: [PATCH 3/6] UBI: Fastmap: Ensure that all fastmap work is done upon WL shutdown

2014-12-04 Thread Tanya Brokhman
_ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundatio

Re: [PATCH 2/6] UBI: Fastmap: Ensure that only one fastmap work is scheduled

2014-12-04 Thread Tanya Brokhman
if bitflips are detected. Reviewed-by: Tanya Brokhman Signed-off-by: Richard Weinberger --- drivers/mtd/ubi/ubi.h | 4 +++- drivers/mtd/ubi/wl.c | 8 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h index f80ffab..04c4c05

Re: [PATCH 02/35] UBI: Fix stale pointers in ubi->lookuptbl

2014-12-04 Thread Tanya Brokhman
On 12/4/2014 1:04 PM, Richard Weinberger wrote: Tanya, Am 04.12.2014 um 12:00 schrieb Tanya Brokhman: Hi Richard On 10/29/2014 2:45 PM, Richard Weinberger wrote: In some error paths the WL sub-system gives up on a PEB and frees it's ubi_wl_entry struct but does not set the entry in ubi

Re: [PATCH 02/35] UBI: Fix stale pointers in ubi->lookuptbl

2014-12-04 Thread Tanya Brokhman
[e2->pnum] = NULL there on purpose. Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line

Re: [PATCH 01/35] UBI: Add initial support for fastmap self checks

2014-12-04 Thread Tanya Brokhman
On 10/29/2014 2:45 PM, Richard Weinberger wrote: Using this debugfs knob fastmap self checks can be controlled. Reviewed-by: Tanya Brokhman Signed-off-by: Richard Weinberger --- drivers/mtd/ubi/debug.c | 11 +++ drivers/mtd/ubi/debug.h | 5 + drivers/mtd/ubi/ubi.h | 4

Re: [PATCH 01/35] UBI: Add initial support for fastmap self checks

2014-12-04 Thread Tanya Brokhman
On 10/29/2014 2:45 PM, Richard Weinberger wrote: Using this debugfs knob fastmap self checks can be controlled. Reviewed-by: Tanya Brokhman tlin...@codeaurora.org Signed-off-by: Richard Weinberger rich...@nod.at --- drivers/mtd/ubi/debug.c | 11 +++ drivers/mtd/ubi/debug.h | 5

Re: [PATCH 02/35] UBI: Fix stale pointers in ubi-lookuptbl

2014-12-04 Thread Tanya Brokhman
] = NULL there on purpose. Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line unsubscribe linux

Re: [PATCH 02/35] UBI: Fix stale pointers in ubi-lookuptbl

2014-12-04 Thread Tanya Brokhman
On 12/4/2014 1:04 PM, Richard Weinberger wrote: Tanya, Am 04.12.2014 um 12:00 schrieb Tanya Brokhman: Hi Richard On 10/29/2014 2:45 PM, Richard Weinberger wrote: In some error paths the WL sub-system gives up on a PEB and frees it's ubi_wl_entry struct but does not set the entry in ubi

Re: [PATCH 2/6] UBI: Fastmap: Ensure that only one fastmap work is scheduled

2014-12-04 Thread Tanya Brokhman
if bitflips are detected. Reviewed-by: Tanya Brokhman tlin...@codeaurora.org Signed-off-by: Richard Weinberger rich...@nod.at --- drivers/mtd/ubi/ubi.h | 4 +++- drivers/mtd/ubi/wl.c | 8 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd

Re: [PATCH 3/6] UBI: Fastmap: Ensure that all fastmap work is done upon WL shutdown

2014-12-04 Thread Tanya Brokhman
... __ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative

Re: [PATCH V6] UBI: Extend UBI layer debug/messaging capabilities

2014-11-11 Thread Tanya Brokhman
On 11/10/2014 7:57 PM, Joe Perches wrote: On Mon, 2014-11-10 at 18:37 +0100, Richard Weinberger wrote: Am 03.11.2014 um 14:58 schrieb Tanya Brokhman: If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number

Re: [PATCH V6] UBI: Extend UBI layer debug/messaging capabilities

2014-11-11 Thread Tanya Brokhman
On 11/10/2014 7:57 PM, Joe Perches wrote: On Mon, 2014-11-10 at 18:37 +0100, Richard Weinberger wrote: Am 03.11.2014 um 14:58 schrieb Tanya Brokhman: If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number

Re: [PATCH] UBI: Extend UBI layer debug/messaging capabilities - cosmetics

2014-11-10 Thread Tanya Brokhman
On 11/10/2014 2:18 PM, Artem Bityutskiy wrote: On Sun, 2014-11-09 at 13:06 +0200, Tanya Brokhman wrote: /* Normal UBI messages */ #define ubi_msg(ubi, fmt, ...) pr_notice("UBI-%d: %s:" fmt "\n", \ -ubi->ubi_num,

Re: [PATCH] UBI: Extend UBI layer debug/messaging capabilities - cosmetics

2014-11-10 Thread Tanya Brokhman
On 11/10/2014 2:18 PM, Artem Bityutskiy wrote: On Sun, 2014-11-09 at 13:06 +0200, Tanya Brokhman wrote: /* Normal UBI messages */ #define ubi_msg(ubi, fmt, ...) pr_notice(UBI-%d: %s: fmt \n, \ -ubi-ubi_num, __func__, ##__VA_ARGS__

[PATCH] UBI: Extend UBI layer debug/messaging capabilities - cosmetics

2014-11-09 Thread Tanya Brokhman
Some cosmetic fixes to the patch "UBI: Extend UBI layer debug/messaging capabilities". Signed-off-by: Tanya Brokhman --- Changes from original patch: - Added ptr verification @ ubi_err/ubi_msg/ubi_warn Removed extra printing of ubi number Removed new messages.

[PATCH] UBI: Extend UBI layer debug/messaging capabilities - cosmetics

2014-11-09 Thread Tanya Brokhman
Some cosmetic fixes to the patch UBI: Extend UBI layer debug/messaging capabilities. Signed-off-by: Tanya Brokhman tlin...@codeaurora.org --- Changes from original patch: - Added ptr verification @ ubi_err/ubi_msg/ubi_warn Removed extra printing of ubi number Removed new

Re: [PATCH V6] UBI: Extend UBI layer debug/messaging capabilities

2014-11-07 Thread Tanya Brokhman
On 11/7/2014 12:08 PM, hujianyang wrote: On 2014/11/5 23:35, Artem Bityutskiy wrote: On Mon, 2014-11-03 at 15:58 +0200, Tanya Brokhman wrote: If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi

Re: [PATCH V6] UBI: Extend UBI layer debug/messaging capabilities

2014-11-07 Thread Tanya Brokhman
On 11/7/2014 12:08 PM, hujianyang wrote: On 2014/11/5 23:35, Artem Bityutskiy wrote: On Mon, 2014-11-03 at 15:58 +0200, Tanya Brokhman wrote: If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi

[PATCH V6] UBI: Extend UBI layer debug/messaging capabilities

2014-11-03 Thread Tanya Brokhman
. Signed-off-by: Tanya Brokhman Signed-off-by: Artem Bityutskiy --- Changes from V1: - Compilation error fixed - macros were updated to receive the ubi structure as parameter and not just ubi_number - Places in code, where ubi-messaging macros were used

[PATCH V6] UBI: Extend UBI layer debug/messaging capabilities

2014-11-03 Thread Tanya Brokhman
. Signed-off-by: Tanya Brokhman tlin...@codeaurora.org Signed-off-by: Artem Bityutskiy artem.bityuts...@linux.intel.com --- Changes from V1: - Compilation error fixed - macros were updated to receive the ubi structure as parameter and not just ubi_number - Places

Re: [PATCH V5] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-11-02 Thread Tanya Brokhman
On 11/3/2014 5:08 AM, hujianyang wrote: Hi Tanya, On 2014/11/3 1:14, Tanya Brokhman wrote: This patch add 'struct ubi_device *' for 3 functions. We can get 'ubi_device' from 'ubi_volume'. So I think it's because when we call these functions, the '->ubi' pointer of 'ubi_vol

Re: [PATCH V5] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-11-02 Thread Tanya Brokhman
int ubi_self_check_all_ff(struct ubi_device *ubi, int pnum, int offset, int len) return 0; fail: - ubi_err("self-check failed for PEB %d", pnum); - ubi_msg("hex dump of the %d-%d region", offset, offset + len); + ubi_err(ubi, "self-check faile

Re: [PATCH V5] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-11-02 Thread Tanya Brokhman
tried to align the message code in different lines, maybe you can check if you lose this one. hmmm... not sure I understand what is wrong here Thanks~! Hu Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc

Re: [PATCH V5] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-11-02 Thread Tanya Brokhman
On 11/3/2014 5:08 AM, hujianyang wrote: Hi Tanya, On 2014/11/3 1:14, Tanya Brokhman wrote: This patch add 'struct ubi_device *' for 3 functions. We can get 'ubi_device' from 'ubi_volume'. So I think it's because when we call these functions, the '-ubi' pointer of 'ubi_volume

Re: [PATCH V5] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-30 Thread Tanya Brokhman
On 10/30/2014 10:40 AM, Artem Bityutskiy wrote: Yeah, lets' correct this too. Thanks for ferview Hujianyang! Tanya, would you send a follow-up patch these? Yes, sure. Sorry, was pulled into some urgent stuff. Will post a new patch early next week. Artem. Thanks, Tanya Brokhman

Re: [PATCH V5] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-30 Thread Tanya Brokhman
On 10/30/2014 10:40 AM, Artem Bityutskiy wrote: Yeah, lets' correct this too. Thanks for ferview Hujianyang! Tanya, would you send a follow-up patch these? Yes, sure. Sorry, was pulled into some urgent stuff. Will post a new patch early next week. Artem. Thanks, Tanya Brokhman

[RFC/PATCH/RESEND 2/5 v2] mtd: ubi: Fill read disturb statistics

2014-10-26 Thread Tanya Brokhman
. Signed-off-by: Dolev Raviv Signed-off-by: Tanya Brokhman --- drivers/mtd/ubi/attach.c | 137 +++--- drivers/mtd/ubi/debug.c | 11 drivers/mtd/ubi/fastmap.c | 118 ++- drivers/mtd/ubi/io.c | 28

[RFC/PATCH/RESEND 4/5 v2] mtd: ubi: Read threshold verification

2014-10-26 Thread Tanya Brokhman
to the ubi->scrub list. Signed-off-by: Tanya Brokhman --- drivers/mtd/ubi/eba.c | 7 ++- drivers/mtd/ubi/wl.c | 56 +-- 2 files changed, 56 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c index 0e116

[RFC/PATCH/RESEND 3/5 v2] mtd: ubi: Make in_wl_tree function public

2014-10-26 Thread Tanya Brokhman
Make the in_wl_tree function public to be used outside of wl.c. Rename it to ubi_in_wl_tree. Signed-off-by: Tanya Brokhman --- drivers/mtd/ubi/ubi.h | 1 + drivers/mtd/ubi/wl.c | 18 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/mtd/ubi/ubi.h b

[RFC/PATCH/RESEND 5/5 v2] mtd: ubi: Add sysfs entry to force all pebs' scan

2014-10-26 Thread Tanya Brokhman
Signed-off-by: Tanya Brokhman --- drivers/mtd/ubi/build.c | 32 +-- drivers/mtd/ubi/ubi.h | 3 + drivers/mtd/ubi/wl.c| 143 +++- 3 files changed, 171 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi

[RFC/PATCH 1/5 v2] mtd: ubi: Read disturb infrastructure

2014-10-26 Thread Tanya Brokhman
statistics Signed-off-by: Tanya Brokhman --- Changes from V1: - Documentation file was added Documentation/mtd/ubi/ubi-read-disturb.txt | 145 + drivers/mtd/ubi/build.c| 57 drivers/mtd/ubi/fastmap.c | 14 ++- drivers

[RFC/PATCH 1/5 v2] mtd: ubi: Read disturb infrastructure

2014-10-26 Thread Tanya Brokhman
statistics Signed-off-by: Tanya Brokhman tlin...@codeaurora.org --- Changes from V1: - Documentation file was added Documentation/mtd/ubi/ubi-read-disturb.txt | 145 + drivers/mtd/ubi/build.c| 57 drivers/mtd/ubi/fastmap.c

[RFC/PATCH/RESEND 4/5 v2] mtd: ubi: Read threshold verification

2014-10-26 Thread Tanya Brokhman
to the ubi-scrub list. Signed-off-by: Tanya Brokhman tlin...@codeaurora.org --- drivers/mtd/ubi/eba.c | 7 ++- drivers/mtd/ubi/wl.c | 56 +-- 2 files changed, 56 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c

[RFC/PATCH/RESEND 3/5 v2] mtd: ubi: Make in_wl_tree function public

2014-10-26 Thread Tanya Brokhman
Make the in_wl_tree function public to be used outside of wl.c. Rename it to ubi_in_wl_tree. Signed-off-by: Tanya Brokhman tlin...@codeaurora.org --- drivers/mtd/ubi/ubi.h | 1 + drivers/mtd/ubi/wl.c | 18 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git

[RFC/PATCH/RESEND 5/5 v2] mtd: ubi: Add sysfs entry to force all pebs' scan

2014-10-26 Thread Tanya Brokhman
...@codeaurora.org Signed-off-by: Tanya Brokhman tlin...@codeaurora.org --- drivers/mtd/ubi/build.c | 32 +-- drivers/mtd/ubi/ubi.h | 3 + drivers/mtd/ubi/wl.c| 143 +++- 3 files changed, 171 insertions(+), 7 deletions(-) diff --git

[RFC/PATCH/RESEND 2/5 v2] mtd: ubi: Fill read disturb statistics

2014-10-26 Thread Tanya Brokhman
. Signed-off-by: Dolev Raviv dra...@codeaurora.org Signed-off-by: Tanya Brokhman tlin...@codeaurora.org --- drivers/mtd/ubi/attach.c | 137 +++--- drivers/mtd/ubi/debug.c | 11 drivers/mtd/ubi/fastmap.c | 118 ++- drivers

Re: [PATCH V5] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-21 Thread Tanya Brokhman
On 10/21/2014 10:56 AM, Artem Bityutskiy wrote: On Mon, 2014-10-20 at 19:57 +0300, Tanya Brokhman wrote: If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. The R/O block

Re: [PATCH V5] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-21 Thread Tanya Brokhman
On 10/21/2014 10:56 AM, Artem Bityutskiy wrote: On Mon, 2014-10-20 at 19:57 +0300, Tanya Brokhman wrote: If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. The R/O block

[PATCH V5] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-20 Thread Tanya Brokhman
If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. The R/O block driver messages were replaced by pr_* since ubi_device structure is not used by it. Signed-off-by: Tanya

Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-20 Thread Tanya Brokhman
t. Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in t

Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-20 Thread Tanya Brokhman
. So I think if this is done, then it is done separately for both UBI and UBIFS. Artem. We have similar patch for ubifs as well, one that adds ubi number to all ubifs messages. We just didn't get to sharing it yet. I prefer not adding the \n to my patch unless Artem insists on it. Thanks, Tanya

[PATCH V5] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-20 Thread Tanya Brokhman
If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. The R/O block driver messages were replaced by pr_* since ubi_device structure is not used by it. Signed-off-by: Tanya

Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-14 Thread Tanya Brokhman
On 10/14/2014 5:13 PM, Tanya Brokhman wrote: If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. The R/O block driver messages were replaced by pr_* since ubi_device structure

[PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-14 Thread Tanya Brokhman
If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. The R/O block driver messages were replaced by pr_* since ubi_device structure is not used by it. Signed-off-by: Tanya

Re: [PATCH 3/4] UBI: Fastmap: Care about the protection queue

2014-10-14 Thread Tanya Brokhman
On 10/14/2014 4:02 PM, Artem Bityutskiy wrote: On Tue, 2014-10-14 at 15:21 +0300, Tanya Brokhman wrote: Hi Artem/Richard I think your discussion here stopped being relevant to this specific patch but went on to the fastmap feature design in general :) This patch fixes a real bug in the current

Re: [PATCH 3/4] UBI: Fastmap: Care about the protection queue

2014-10-14 Thread Tanya Brokhman
ged and will be "fixed" later on when you agree on how you would like FM to access WL data structures in general? Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Lin

Re: [PATCH v3] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-14 Thread Tanya Brokhman
On 10/13/2014 6:59 PM, Artem Bityutskiy wrote: On Mon, 2014-10-13 at 18:37 +0300, Artem Bityutskiy wrote: On Mon, 2014-10-06 at 14:01 +0300, Tanya Brokhman wrote: If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add

Re: [PATCH v3] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-14 Thread Tanya Brokhman
On 10/13/2014 6:59 PM, Artem Bityutskiy wrote: On Mon, 2014-10-13 at 18:37 +0300, Artem Bityutskiy wrote: On Mon, 2014-10-06 at 14:01 +0300, Tanya Brokhman wrote: If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add

Re: [PATCH 3/4] UBI: Fastmap: Care about the protection queue

2014-10-14 Thread Tanya Brokhman
and will be fixed later on when you agree on how you would like FM to access WL data structures in general? Thanks, Tanya Brokhman -- Qualcomm Israel, on behalf of Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative

Re: [PATCH 3/4] UBI: Fastmap: Care about the protection queue

2014-10-14 Thread Tanya Brokhman
On 10/14/2014 4:02 PM, Artem Bityutskiy wrote: On Tue, 2014-10-14 at 15:21 +0300, Tanya Brokhman wrote: Hi Artem/Richard I think your discussion here stopped being relevant to this specific patch but went on to the fastmap feature design in general :) This patch fixes a real bug in the current

[PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-14 Thread Tanya Brokhman
If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. The R/O block driver messages were replaced by pr_* since ubi_device structure is not used by it. Signed-off-by: Tanya

Re: [PATCH v4] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-14 Thread Tanya Brokhman
On 10/14/2014 5:13 PM, Tanya Brokhman wrote: If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. The R/O block driver messages were replaced by pr_* since ubi_device structure

[PATCH v3] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-06 Thread Tanya Brokhman
If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. Signed-off-by: Tanya Brokhman --- Changes from V1: - Compilation error fixed - macros were updated

[PATCH v3] mtd: ubi: Extend UBI layer debug/messaging capabilities

2014-10-06 Thread Tanya Brokhman
If there is more then one UBI device mounted, there is no way to distinguish between messages from different UBI devices. Add device number to all ubi layer message types. Signed-off-by: Tanya Brokhman tlin...@codeaurora.org --- Changes from V1: - Compilation error fixed - macros

Re: [PATCH 4/4] UBI: Fastmap: Ensure that only one fastmap work is scheduled

2014-10-02 Thread Tanya Brokhman
On 9/30/2014 10:44 AM, Richard Weinberger wrote: Am 30.09.2014 09:39, schrieb Bityutskiy, Artem: On Tue, 2014-09-30 at 08:59 +0200, Richard Weinberger wrote: Am 30.09.2014 08:45, schrieb Bityutskiy, Artem: On Tue, 2014-09-30 at 00:20 +0200, Richard Weinberger wrote: +

Re: [PATCH 3/4] UBI: Fastmap: Care about the protection queue

2014-10-02 Thread Tanya Brokhman
On 10/2/2014 4:32 PM, Richard Weinberger wrote: Am 02.10.2014 15:28, schrieb Tanya Brokhman: Hi Richard On 9/30/2014 1:20 AM, Richard Weinberger wrote: Fastmap can miss a PEB if it is in the protection queue and not jet in the used tree. Treat every protected PEB as used. Signed-off

Re: [RFC/PATCH 1/5] mtd: ubi: Read disturb infrastructure

2014-10-02 Thread Tanya Brokhman
On 10/2/2014 4:36 PM, Richard Weinberger wrote: Am 02.10.2014 14:50, schrieb Tanya Brokhman: Hi Richard, Sorry it took me some time to answer, got per-occupied with some urgent staff. On 9/28/2014 1:54 PM, Richard Weinberger wrote: Am 28.09.2014 12:46, schrieb Tanya Brokhman: On 9/28/2014

Re: [PATCH 2/4] UBI: Fastmap: Calc fastmap size correctly

2014-10-02 Thread Tanya Brokhman
) + \ sizeof(struct ubi_fm_scan_pool) + \ sizeof(struct ubi_fm_scan_pool) + \ (ubi->peb_count * sizeof(struct ubi_fm_ec)) + \ Reviewed-by: Tanya Brokhman -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aur

Re: [RFC/PATCH 1/5] mtd: ubi: Read disturb infrastructure

2014-10-02 Thread Tanya Brokhman
On 10/2/2014 4:24 PM, Richard Weinberger wrote: Am 02.10.2014 14:50, schrieb Tanya Brokhman: Consider the case where you have a board with a fastmap enabled bootloader and a Linux OS. The bootloader does a fastmap attach and boots the kernel from UBI and the kernel it self has the rootfs

Re: [PATCH 3/4] UBI: Fastmap: Care about the protection queue

2014-10-02 Thread Tanya Brokhman
tion or does it needs updating as well? + } + } fmh->used_peb_count = cpu_to_be32(used_peb_count); for (node = rb_first(>scrub); node; node = rb_next(node)) { Thanks Tanya Brokhman -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Cen

Re: [PATCH 2/4] UBI: Fastmap: Calc fastmap size correctly

2014-10-02 Thread Tanya Brokhman
ore on the commit message. Thanks, Tanya Brokhman -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body

Re: [PATCH 1/4] UBI: Ensure that all fastmap work is done upon WL shutdown

2014-10-02 Thread Tanya Brokhman
); +#ifdef CONFIG_MTD_UBI_FASTMAP + flush_work(>fm_work); flush_work returns bool. It might be useful to print that value for debugging. +#endif cancel_pending(ubi); protection_queue_destroy(ubi); tree_destroy(>used); Thanks Tanya Brokhman -- Employee of Qualcomm I

Re: [RFC/PATCH 1/5] mtd: ubi: Read disturb infrastructure

2014-10-02 Thread Tanya Brokhman
Hi Richard, Sorry it took me some time to answer, got per-occupied with some urgent staff. On 9/28/2014 1:54 PM, Richard Weinberger wrote: Am 28.09.2014 12:46, schrieb Tanya Brokhman: On 9/28/2014 11:54 AM, Richard Weinberger wrote: Am 28.09.2014 10:48, schrieb Tanya Brokhman: @@ -424,6

Re: [RFC/PATCH 1/5] mtd: ubi: Read disturb infrastructure

2014-10-02 Thread Tanya Brokhman
Hi Richard, Sorry it took me some time to answer, got per-occupied with some urgent staff. On 9/28/2014 1:54 PM, Richard Weinberger wrote: Am 28.09.2014 12:46, schrieb Tanya Brokhman: On 9/28/2014 11:54 AM, Richard Weinberger wrote: Am 28.09.2014 10:48, schrieb Tanya Brokhman: @@ -424,6

  1   2   3   >