Linux NILFS development
 help / color / mirror / Atom feed
From: Taesoo Kim <taesoo-3s7WtUTddSA@public.gmane.org>
To: Ryusuke Konishi
	<konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
Cc: Vyacheslav Dubeyko
	<slava-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>,
	linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: searching checkpoints contaning an inode (or a filename)
Date: Sat, 6 Jul 2013 07:24:13 -0400	[thread overview]
Message-ID: <20130706112413.GG23851@taesoo.org> (raw)
In-Reply-To: <20130706.185038.523614087.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>

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/linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org/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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2013-07-06 11:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-05 20:17 searching checkpoints contaning an inode (or a filename) Taesoo Kim
     [not found] ` <20130705201701.GE23851-Q1ymHw66ZoYdnm+yROfE0A@public.gmane.org>
2013-07-05 21:48   ` Jérôme Poulin
     [not found]     ` <CALJXSJrLo_5=e-M41vXyuS9SbRyeZ=zjLYv2Hs3a8Dt+BwS6ig-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-06  8:03       ` Vyacheslav Dubeyko
2013-07-06  8:17       ` Vyacheslav Dubeyko
2013-07-06  7:34   ` Vyacheslav Dubeyko
     [not found]     ` <B16ADF79-9EF9-46E8-95F8-9D4815E86C64-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org>
2013-07-06  9:50       ` Ryusuke Konishi
     [not found]         ` <20130706.185038.523614087.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2013-07-06 11:24           ` Taesoo Kim [this message]
2013-07-06  7:52   ` Vyacheslav Dubeyko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130706112413.GG23851@taesoo.org \
    --to=taesoo-3s7wtutddsa@public.gmane.org \
    --cc=konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org \
    --cc=linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=slava-yeENwD64cLxBDgjK7y7TUQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox