linux - how does all the existing directories get mounted at the mount point when using FUSE? -


i'm trying build new filesystem deduplication using fuse.

i tried running fusexmp_fh.c provided in example section of fuse. after mounting filesystem @ mount point, can see existing directories inside mount point. dont need directories. i want mounted filesystem empty.

i tried searching through fusexmp_fh.c not find out existing directories added.

  • can explain me how works?

also

  • can fusexmp_fh.c taken base building filesystem?
  • does have basic functionalities?

are saying mounted file system on non-empty directory, , can see previous contents of directory? (in case, answer "don't mount non-empty mount point". throws error tell not that.)

if you're seeing directories , files in directory using base directory, that's normal behavior loopback file system, fusexmp_fh.c is. example file system takes mount point, , passes commands on mount point through backing directory. if use backing directory has files in it, see files in 2 places, original location , mounted fuse directory.

if want understand how directory filling works, start taking @ readdir, , see how stat items returns constructed. each of single directory entry.

yes, can use fusexmp_fh.c basis basic file system, it's got necessary pieces, although extended metadata isn't supported. (but adding trivial loopback.)


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -