Hi Ryusuke and Vyacheslav,
> >> q1. how can I enumerate a list of cps, given a filename?
> >> (I know I can mount each cp to check whether there is my file or
> >> not, as time-machine (in mac) does)
> >>
>
> I think it's hard to implement this feature efficiently because nilfs
> doesn't have an efficient lookup method of past inodes from a file
> name.
>
> > You can use dumpseg fot this goal. To be honest this way not so
> > simple. You can get inode id from ls output ("ls -i"), for example.
> > And then you need to get dumpseg for all segments and select
> > output for searching inode. Of course, it needs to implement
> > special feature for easy retrieving such data.
>
> dumpseg is a debug tool and it doesn't provide a solid way since it
> directly scans on-disk blocks from userland.
>
> We should adds an ioctl for that if there is a reasonable purpose, but
> I don't know it can be implemented nicely.
>
I don't know how difficult to embed a backward link (to previous cp)
in each inode? So given a current inode, I can walk inode-btree of cp
again to find the previous one, possibly with ioctl().
But, searching inodes of a deleted path seems still difficult and
hard to implement nicely, without walking all cps to figure out.
> >> q2. compute diff or cat against previous files in a specific cp?
> >> (instead of mounting and copying them individually to my /tmp)
> >>
> >
> > As I understand, currently, we haven't this as feature of any
> > NILFS2's tool or internal file system technique.
>
> An experimental patchset and a tool exist:
>
> http://www.mail-archive.com/[email protected]/msg00827.html
>
> nilfs-diff:
>
> git://github.com/konis/nilfs-utils.git (diff branch)
>
> diff API:
>
> git://github.com/konis/nilfs2.git (diffapi branch)
>
>
> But I have never sent this to the mainline because the patchset has
> important limitations for practical use in addition to needing a disk
> format change.
>
I will definitely check the patch set, and thank you for the design
doc as well.
Thank you!
Taesoo
>
> Regards,
> Ryusuke Konishi
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html