[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOQ4uxjAZAWTy14B1HA-=RmPVsgBBXve7914g0gn7EG3xADebA@mail.gmail.com>
Date: Mon, 14 Nov 2016 18:25:39 +0200
From: Amir Goldstein <amir73il@...il.com>
To: Miklos Szeredi <miklos@...redi.hu>
Cc: Raphael Hertzog <hertzog@...ian.org>,
Konstantin Khlebnikov <koct9i@...il.com>,
Miklos Szeredi <mszeredi@...hat.com>,
"linux-unionfs@...r.kernel.org" <linux-unionfs@...r.kernel.org>,
Guillem Jover <guillem@...ian.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] ovl: redirect on rename-dir
On Sun, Nov 13, 2016 at 12:00 PM, Amir Goldstein <amir73il@...il.com> wrote:
> On Fri, Nov 11, 2016 at 12:39 AM, Miklos Szeredi <miklos@...redi.hu> wrote:
>> New version is at:
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git #redirect
>>
>> News:
>> - it actually should work in all cases
>> - when rename is not cross directory, just store the new name instead
>> of a full path, as suggested by Amir
>> - when redirect path is too long fall back to EXDEV (the max length
>> should probably be a module param)
>>
>
> Looks goods, except for the case of change from relative to absolute
> redirect of the victim dentry. IIUC, ovl_set_redirect() will return immediately
> because ovl_dentry_is_redirect() and will not get to setting the absolute
> redirect.
>
I added some more tests to catch this problem at:
https://github.com/amir73il/unionmount-testsuite.git #ovl_rename_dir
In the new version, upper recycling is optional and you can set a bound
to the number of layers. This is needed to catch the bug because the
scenario is:
- Rename populated dir in same dir
- Move the populated dir to another dir
- Re-mount
- Populated dir is empty
The following test run demonstrates it:
$ sudo ./run --ov=0 rename-move-dir
...
TEST rename-move-dir.py:37: Rename populated dir and move into another
./run --rename /mnt/a/dir102 /mnt/a/dir102x
./run --rename /mnt/a/dir102 /mnt/a/dir102x -E ENOENT
./run --rename /mnt/a/dir102x /mnt/a/empty102/dir102
./run --rename /mnt/a/dir102x /mnt/a/empty102/dir102 -E ENOENT
./run --open-file /mnt/a/dir102 -r -d -E ENOENT
./run --open-file /mnt/a/dir102x -r -d -E ENOENT
./run --open-file /mnt/a/empty102/dir102 -r -d
/mnt/a/empty102/dir102/a: File is missing
Amir.
Powered by blists - more mailing lists