/* This function pads up to the next min_io_size boundary (if there is one) and sets empty space to all 0xff. @buf, @offs and @len are updated to the next  */
static void clean_buf(const struct ubifs_info *c, void **buf, int lnum, int *offs, int *len)
/* This function pads up to the next min_io_size boundary (if there is one) and sets empty space to all 0xff. @buf, @offs and @len are updated to the next  */
static void clean_buf(const struct ubifs_info *c, void **buf, int lnum, int *offs, int *len)
{
	int empty_offs, pad_len;
	lnum = lnum;
	dbg_rcvry("cleaning corruption at %d:%d", lnum, *offs);
	ubifs_assert(!(*offs & 7));
	empty_offs = ALIGN(*offs, c->min_io_size);
	pad_len = empty_offs - *offs;
	ubifs_pad(c, *buf, pad_len);
	*offs += pad_len;
	*buf += pad_len;
	*len -= pad_len;
	memset(*buf, 0xff, c->leb_size - empty_offs);
}