linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Henrik Asp <solenskiner@gmail.com>
To: dsterba@suse.cz, Henrik Asp <solenskiner@gmail.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: restore: make btrfs restore able to read a file which lists files to restore
Date: Wed, 24 Feb 2016 14:01:46 +0100	[thread overview]
Message-ID: <42857949.PiLisvDqGC@moerta> (raw)
In-Reply-To: <20160224115137.GA23746@twin.jikos.cz>

On onsdag 24 februari 2016 kl. 12:51:37 CET David Sterba wrote:

> Is it supposed to match only full path or also substrings? The way
> it's implemented it can match just part of the path but I'm not sure
> if this is intended or not.
> 
> Paths in path-from-file:
> 
>   /a/b/c/d
> 
> In filesystem:
> 
>   /backup1/a/b/c/d
>   /backup2/a/b/c/d

neither /backup1/a/b/c/d nor /backup2/a/b/c/d are substrings of /a/b/c/
d, so they wouldn't match; /a, /a/b, /a/b/c would match, so the 
hierarchy ./a/b/c/ is already created where data is rescued to, when d 
is encountered by search_dir().

Thinking about it now, /b/c/d in the filesystem would also match, though. 
That's clearly wrong.

> I'd expect that the path would need to match absolutelly.
> Alternatively, we could do relative path matching, so:
> 
> Paths in path-from-file:
> 
>   a/b/c/d
> 
> would match both /backup[12].
> 
> Either way i find the matching rules ambiguous and not documented.
> Please clarify.

Agreed, its ambiguous. And the code unclear. I'll rethink it.

      reply	other threads:[~2016-02-24 13:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22 17:53 [PATCH] btrfs-progs: restore: make btrfs restore able to read a file which lists files to restore Henrik Asp
2016-02-22 23:32 ` Duncan
2016-02-24 11:51 ` David Sterba
2016-02-24 13:01   ` Henrik Asp [this message]

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=42857949.PiLisvDqGC@moerta \
    --to=solenskiner@gmail.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).