/* get_pad_len - return the length of padding in a buffer.  */
static int get_pad_len(const struct ubifs_info *c, uint8_t *buf, int len)
/* get_pad_len - return the length of padding in a buffer.  */
static int get_pad_len(const struct ubifs_info *c, uint8_t *buf, int len)
{
	int offs, pad_len;
	if (c->min_io_size == 1)
		return 0;
	offs = c->leb_size - len;
	pad_len = ALIGN(offs, c->min_io_size) - offs;
	return pad_len;
}