Re: Bug: trying to create reflink on different device results in empty file

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

 



On Tue, Dec 11, 2012 at 11:16:03PM +0100, Koen De Wit wrote:
> When trying to create a clone (reflink) of a file on a different device,
> you'll get this error:
>     Invalid cross-device link
> 
> However, an empty file is created on the target location. An invalid clone
> operation should not result in the creation of a file.

The clone operation inside btrfs needs 2 files already open (ie. it
works with file descriptors, not with filenames), the empty file exists
prior to the ioctl call.  So the file should be removed by 'cp' (or
whoever calls the clone ioctl) because they know if it makes sense to
delete the file or not.

david
--
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