aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/fastmap-wl.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 286Thomas Gleixner1-10/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation version 2 this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 97 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190529141901.025053186@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-04ubi: fastmap: Don't flush fastmap work on detachRichard Weinberger1-1/+0
At this point UBI volumes have already been free()'ed and fastmap can no longer access these data structures. Reported-by: Martin Townsend <mtownsend1973@gmail.com> Fixes: 74cdaf24004a ("UBI: Fastmap: Fix memory leaks while closing the WL sub-system") Cc: stable@vger.kernel.org Signed-off-by: Richard Weinberger <richard@nod.at>
2018-01-18ubi: Fastmap: Fix typoSascha Hauer1-1/+1
Fix misspelling of 'available' in function name. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Richard Weinberger <richard@nod.at>
2016-10-02ubi: Fix races around ubi_refill_pools()Richard Weinberger1-2/+4
When writing a new Fastmap the first thing that happens is refilling the pools in memory. At this stage it is possible that new PEBs from the new pools get already claimed and written with data. If this happens before the new Fastmap data structure hits the flash and we face power cut the freshly written PEB will not scanned and unnoticed. Solve the issue by locking the pools until Fastmap is written. Cc: <stable@vger.kernel.org> Fixes: dbb7d2a88d ("UBI: Add fastmap core") Signed-off-by: Richard Weinberger <richard@nod.at>
2015-10-03ubi: fastmap: Implement produce_free_peb()Richard Weinberger1-0/+29
If fastmap requests a free PEB for a pool and UBI is busy with erasing PEBs we need to offer a function to wait for one. We can reuse produce_free_peb() from the non-fastmap WL code but with different locking semantics. Cc: stable@vger.kernel.org # 4.1.x- Reported-and-tested-by: Jörg Krause <joerg.krause@embedded.rocks> Signed-off-by: Richard Weinberger <richard@nod.at>
2015-03-26UBI: Fastmap: Remove is_fm_block()Richard Weinberger1-19/+0
This function was added to fastmap in a very early stage to have paranoid assertions. With the current fastmap implementation this assert will never trigger as fastmap PEBs are not seen by the WL sub-system. Remove it to save us some CPU cycles. Signed-off-by: Richard Weinberger <richard@nod.at>
2015-03-26UBI: Fastmap: Add blank line after declarationsRichard Weinberger1-0/+1
Another checkpatch complaint: WARNING: Missing a blank line after declarations Signed-off-by: Richard Weinberger <richard@nod.at>
2015-03-26UBI: Fastmap: Remove else after return.Richard Weinberger1-3/+3
checkpatch.pl complains: WARNING: else is not generally useful after a break or return Signed-off-by: Richard Weinberger <richard@nod.at>
2015-03-26UBI: Fastmap: Introduce may_reserve_for_fm()Richard Weinberger1-0/+19
...and kill another #ifdef. Signed-off-by: Richard Weinberger <richard@nod.at>
2015-03-26UBI: Move fastmap specific functions out of wl.cRichard Weinberger1-0/+361
Fastmap is tightly connected to the WL sub-system, many fastmap-specific functionslive in wl.c. To get rid of most #ifdefs in wl.c move this functions into a new file and include it into wl.c Signed-off-by: Richard Weinberger <richard@nod.at>