[Unionfs] What branch is a file from?
Erez Zadok
ezk at cs.sunysb.edu
Tue Oct 16 10:35:15 EDT 2007
Robin,
Yes, this functionality exists already, as an ioctl you can call from any C
program, or as a userlevel utility you can put in, say, shell scripts. You
need to get the unionfs-utils package. In it, there's a tool called
unioctl. Here's an example of its use:
1. File 'a' comes from branch /n/lower/b1
$ ./unionctl /mnt/unionfs/a --query
/mnt/unionfs/a /n/lower/b1 (r--)
2. File 'b' comes from branch /n/lower/b2
$ ./unionctl /mnt/unionfs/b --query
/mnt/unionfs/b /n/lower/b2 (r--)
3. Directory 'D' comes from two branches: /n/lower/b0 and /n/lower/b2
$ ./unionctl /mnt/unionfs/D --query
/mnt/unionfs/D /n/lower/b0 (rw-)
/mnt/unionfs/D /n/lower/b2 (r--)
Cheers,
Erez.
More information about the unionfs
mailing list