bindfs icon indicating copy to clipboard operation
bindfs copied to clipboard

Why are these operations not included in bindfs?

Open maruhan2 opened this issue 8 years ago • 2 comments

The following list,

flush, opendir, readdir, releasedir, fsyncdir, bmap, poll, write_buf, read_buf, fallocate,

are not defined. I'm sure they are omitted on purpose, but I'm not sure why.

maruhan2 avatar Jan 09 '17 05:01 maruhan2

Thanks for bringing these up. TL;DR: some of them are unnecessary but some would certainly be useful to implement. I might do so later this week, but PRs are also welcome. If you feel like adding some of these, please let me know so I won't duplicate your work.

  • flush: bindfs doesn't cache writes so there should be nothing to do here, I think. I might be wrong though.
  • readdir is implemented
  • opendir, releasedir: bindfs doesn't need to do anything in these. See readdir's implementation and see the comments on readdir in fuse.h. If we were to implement fsyncdir then these might become necessary.
  • fsyncdir could be implemented. I noticed the passthrough examples that come with fuse don't implement it for some reason.
  • bmap: The comment in fuse.h says: "This makes sense only for block device backed filesystems mounted with the 'blkdev' option" and bindfs is not backed by a block device.
  • poll could be implemented. This wasn't in fuse when bindfs was originally implemented, and it's also not in the passthrough examples, so I missed it. I wonder what the default behaviour is.
  • write_buf and read_buf: these are also fairly new. They look like optimizations of write() and read(). I'm not sure how much of a speedup they offer but I'd accept a PR for them if someone finds them useful.
  • fallocate: again a fairly new function that might be useful to someone. Probably not used very often, and not all underlying filesystems support this, but should be easy to implement.

mpartel avatar Jan 09 '17 07:01 mpartel

Ok thanks. I'm trying to build something for production based off your code base, and so I'll probably research those eventually (but probably not within at least 3 months), so I'll let you know if I get to it.

maruhan2 avatar Jan 10 '17 00:01 maruhan2