Re: [PATCH 1/2] btrfs-progs: don't report internal dev replace result if ioctl failed

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

 



On Wed, Oct 08, 2014 at 05:42:28PM +0800, Eryu Guan wrote:
> If BTRFS_IOC_DEV_REPLACE ioctl failed, there's no result returned to
> fill args.result, it doesn't make sense to report this internal result
> to user.
> 
> And the arg has been initialized with 0, the result is always 0, which
> is BTRFS_IOCTL_DEV_REPLACE_REPLACE_NO_ERROR, and the resulting error
> message looks confusing too:
> 
> ERROR: ioctl(DEV_REPLACE_START) failed on "/mnt/btrfs": No such file or directory, no error
> 
> So just skip the internal dev replace result if the whole ioctl failed.

The 'no error' is confusing there, but I'm afraid we're losing some
information if the secondary result is completely dropped. How about
intializing the replace result with, eg., -1 and then print an empty
string from replace_dev_result2string instead?
--
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