Displaying 3 results from an estimated 3 matches for "subvol_fd".
2013 Apr 06
3
btrfs-progs: re-add send-test
...oid *process_thread(void *arg_)
+{
+ int ret;
+
+ while (1) {
+ ret = btrfs_read_and_process_send_stream(pipefd[0],
+ &send_ops_print, arg_);
+ if (ret)
+ break;
+ }
+
+ if (ret > 0)
+ ret = 0;
+
+ return ERR_PTR(ret);
+}
+
+int main(int argc, char **argv)
+{
+ int ret = 0;
+ int subvol_fd;
+ pthread_t t_read;
+ pthread_attr_t t_attr;
+ void *t_err = NULL;
+ struct recv_args r;
+
+ if (argc != 3)
+ usage(EINVAL);
+
+ root_path = realpath(argv[1], NULL);
+ if (!root_path) {
+ ret = errno;
+ usage(ret);
+ }
+
+ subvol_path = realpath(argv[2], NULL);
+ if (!subvol_path) {
+ ret = er...
2013 Apr 10
0
[PATCH] Btrfs-progs: add send option for using new end-cmd semantic
...__u64*)send->clone_sources;
io_send.clone_sources_count = send->clone_sources_count;
io_send.parent_root = parent_root_id;
+ if (!is_first_subvol)
+ io_send.flags |= BTRFS_SEND_FLAG_OMIT_STREAM_HEADER;
+ if (!is_last_subvol)
+ io_send.flags |= BTRFS_SEND_FLAG_OMIT_END_CMD;
ret = ioctl(subvol_fd, BTRFS_IOC_SEND, &io_send);
if (ret) {
ret = -errno;
fprintf(stderr, "ERROR: send ioctl failed with %d: %s\n", ret,
strerror(-ret));
+ if (ret == -EINVAL && (!is_first_subvol || !is_last_subvol))
+ fprintf(stderr,
+ "Try upgrading your kernel or don'...
2013 Apr 09
19
[PATCH 00/17] Btrfs-progs: some receive related patches
Most fixes are trivial.
The one from Alex is fixing a real bug that several users have reported.
Alex sent the patch half a year ago and it was not yet integrated.
The patch "Use /proc/mounts instead of /etc/mtab" is a repost.
The patch "btrfs-receive optionally honors the end-cmd" is a preparation
step to allow backup tools to multiplex a single communication stream
(e.g. a