Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

UBI: introduce UBI_ALL constant

Joel will use it in his 'ubi_flush()' extention to specify all eraseblocks.
Also amend the comment for UBI_UNKNOWN - it is used beyond attaching info
structure now.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>

+8 -5
+5 -5
drivers/mtd/ubi/ubi.h
··· 65 65 /* Background thread name pattern */ 66 66 #define UBI_BGT_NAME_PATTERN "ubi_bgt%dd" 67 67 68 - /* This marker in the EBA table means that the LEB is um-mapped */ 68 + /* 69 + * This marker in the EBA table means that the LEB is um-mapped. 70 + * NOTE! It has to have the same value as %UBI_ALL. 71 + */ 69 72 #define UBI_LEB_UNMAPPED -1 70 73 71 74 /* ··· 84 81 */ 85 82 #define UBI_PROT_QUEUE_LEN 10 86 83 87 - /* 88 - * When a field of the attaching information has this value - its real value is 89 - * unknown. 90 - */ 84 + /* The volume ID/LEB number/erase counter is unknown */ 91 85 #define UBI_UNKNOWN -1 92 86 93 87 /*
+3
include/linux/mtd/ubi.h
··· 25 25 #include <linux/types.h> 26 26 #include <mtd/ubi-user.h> 27 27 28 + /* All voumes/LEBs */ 29 + #define UBI_ALL -1 30 + 28 31 /* 29 32 * enum ubi_open_mode - UBI volume open mode constants. 30 33 *