Re: [PATCH 4/5] Btrfs-progs: return error on write failure in make_btrfs()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <fdmanana@xxxxxxxxx>
[...]
>  	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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux