Thread (21 messages) 21 messages, 5 authors, 2015-12-23

Re: [PATCH v2 1/3] badblocks: Add core badblock management code

From: NeilBrown <hidden>
Date: 2015-12-08 21:03:05
Also in: linux-scsi

On Sat, Dec 05 2015, Verma, Vishal L wrote:
quoted
quoted
+int badblocks_clear(struct badblocks *bb, sector_t s, int sectors)
+{
[...]
quoted
+#define DO_DEBUG 1
Why have this at all if it's unconditionally defined and always set.
Neil - any reason or anything you had in mind for this? Or is it just an
artifact and can be removed.
Like the comment says:

	/* Allow clearing via sysfs *only* for testing/debugging.
	 * Normally only a successful write may clear a badblock
	 */

The DO_DEBUG define and ifdefs are documentation identifying bits of
code that should be removed when it all seems to be working.
Maybe now is a good time to remove that code.

NeilBrown

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help