On Thu,  4 Jul 2013 10:48:39 +0100, Filipe David Borba Manana wrote:
> Instead of aborting with a BUG_ON() statement, return a
> negated errno code. Also updated mkfs and convert tools
> to print a nicer error message when make_btrfs() returns
> an error.
> 
> Signed-off-by: Filipe David Borba Manana <fdman...@gmail.com>
[...]
>       ret = pwrite(fd, buf->data, sectorsize, blocks[0]);
> -     BUG_ON(ret != sectorsize);
> -
> +     if (ret < 0)
> +             return -errno;
> +     else if (ret != leafsize)
> +             return -EIO;

mkfs.btrfs with leafsize != sectorsize fails. I've sent a patch for it.

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to