Re: Feature request: A user-space program listing versioning history of a specified file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 14 Feb 2016 01:58:01 +0800, Eric Lan <tenoreamer@xxxxxxxxx> wrote:
> I think these requests, when materialized, would be very useful and
> become attractive features for NILFS2 because the natural advantages
> (COW & preserving previous versions of files) of NILFS2 become very
> convenient for the users to access to recover old versions of or
> deleted files.
> 
> Actually, I thought it may be possible to use BASH scripting to list
> versions of files. The script may work by mounting checkpoints one by
> one retrogradely to find the specified files with different mtime
> until the absence of the file in a certain checkpoint. But the
> performance would be low. How to collect these versions for users to
> view easily(without mounting by the user again)? I don't know if it is
> possible to make a "hardlink" inode in the current "checkpoint" that
> points to an old version of file. This way, the duplication load could
> be spared. But I wondered if that would interfere with garbage
> collection.

Adding a new ioctl which stores change-point checkpoint numbers for a
specified file (in a given buffer), looks to have a possibility and is
convenient to applications since this approach doesn't require
applications to mount every checkpoint.

>From an implementation point of view, however, the following hurdles
exist:

- Disk format change is needed; the current nilfs doesn't have metadata
  that helps to track past versions of a file.

  We may be able to achieve this by storing "previous checkpoint
  number" in each version of inode, but no on-disk field is available
  unless we expand the inode size from the current one (128 bytes).

  Even though the "previous checkpoint" can be deleted by GC, we can
  track back an existent checkpoint from there by traversing btree of
  the checkpoint metadata file in reverse direction.

- How we can track the file path of moved files ?
  Looks like we need another interface to get file paths
  from a given past inode (file).

Regards,
Ryusuke Konishi

> 
> Just sharing some ideas. Anyway, thank you for taking these requests
> into consideration ^^
> 
> Anticipating,
> Eric Lan
> 
> 2016-02-13 0:58 GMT+08:00 Ryusuke Konishi <konishi.ryusuke@xxxxxxxxxxxxx>:
>> On Fri, 5 Feb 2016 00:59:17 +0800, Eric Lan <tenoreamer@xxxxxxxxx> wrote:
>>> Hello,
>>>
>>> Recently, I have installed NILFS2 and feel it quite cool. I wonder if
>>> you are insterested in developing a program that can trace back all
>>> the check points to list the revision history of a specified file.
>>> With certain argument specified, these versions of files can be
>>> collected into a directory for the user to choose a good one from.
>>>
>>> Such program may be easily extended to have the function of
>>> "undelete". That is, to collect a series of versions of or the most
>>> recent version of a specific file that exist only in the past
>>> checkpoints.
>>
>> None of your requests look easy to implement ;)
>>
>> Anyway, I added them to the todo list at
>> http://nilfs.sourceforge.net/en/current_status.html
>>
>> Thanks,
>> Ryusuke Konishi
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux BTRFS]     [Linux CIFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux