Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

would be great to get status of what's going on #3

Closed
csells opened this issue Jan 2, 2016 · 10 comments
Closed

would be great to get status of what's going on #3

csells opened this issue Jan 2, 2016 · 10 comments

Comments

@csells
Copy link

csells commented Jan 2, 2016

right now, mounting sample.torrent and then "cat sample.txt" just sits there w/o status of any kind, e.g. finding peers, downloading, etc.

@johang
Copy link
Owner

johang commented Jan 2, 2016

I have thought about this too. There is no obvious way to output status like that since there is no UI. You can get some status out of it if you run it in foreground with the "-f" flag, but it won't print much.

@hvenev
Copy link

hvenev commented Jan 2, 2016

ioctl?

@JDevlieghere
Copy link

How about creating a status or log file in the root of the mounted directory? I have no experience with FUSE (yet) but I'd be glad to look into this.

@vi
Copy link

vi commented Jan 4, 2016

Simplest first step: logging to stderr when -o debug.

@1ace
Copy link

1ace commented Jan 4, 2016

@JDevlieghere the problem with having a reserved file for that purpose is that you have to account for filename clashes: what do you do when there's also a file with that name in the BT package?

I like the ioctl idea though. It should be a simple case of adding:

static int btfs_ioctl(const char *path, int cmd, void *arg, struct fuse_file_info *fi, unsigned int flags, void *data)
{
  // error handling

  switch(cmd)
  {
    // …
  }
}

and

btfs_ops.ioctl = btfs_ioctl;

and then adding new options in main() to print relevant informations.

@johang
Copy link
Owner

johang commented Jan 4, 2016

@1ace is right about the name clashing problem.

Another way is to have a log file in the generated target directory (see the populate_target function.) It's not very convenient for a user since the path to that directory is random and non-obvious, but very easy to implement. It would mean save_path is changed to /home/X/btfs/btfs-XXXXXX/files (instead of /home/X/btfs/btfs-XXXXXX as of today) and log is written to /home/X/btfs/btfs-XXXXXX/status.log.

@johang johang closed this as completed in 37a6021 Jan 14, 2016
@1ace
Copy link

1ace commented Jan 14, 2016

I actually started working on an ioctl-based solution where you can simply btfs -s somefile and get the status of this file. I'll probably PR it this weekend :)

@deliciouslytyped
Copy link

@1ace did you ever get anywhere with this?

@deliciouslytyped
Copy link

Ok I finally discovered btfsstat is supposed to do this.

@1ace
Copy link

1ace commented May 24, 2023

@deliciouslytyped I guess not 😅 but also I have no memory of any of this, and I don't have a clone of this repo anymore, so I think whatever I did was lost a long time ago 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants