Re: [PATCH v3 4/6] fsck.overlay: correct redirect xattr check

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

 



>>> +                       goto out;
>>> +               if (chk.exist && is_dir(&chk.st) &&
>>> +                   !ovl_ask_question("Is merged dir", pathname, 1))
>>> +                       ret = ovl_set_opaque(pathname);
>>
>> Same here. Better that fsck -y will set opaque right?
>> So flip the question to "Should set opaque dir"
>>
>
> Here is also not set opaque xattr in '-y' and '-p' mode.
> I guess general user may not care about "invalid/duplicate redirect xattr"
> when they modify underlying layers (eg: call "cp -a" or remove redirect origin
> directory), but they probably know directories with the same name will merge
> in overlayfs by default, and they should know the distribution of directories
> after modification. So I prefer to merge directories. Anyway, neither will
> affect consistency.  :)
>

OK, but the question is still wrong, because answering No changes the
file systems and didn't fsck -n guaranty NOT to change the file system?
I think you probably need a more error prone interface for changing fs
that guaranties you cannot change fs when -n was specified.

The way I see it, the only way to resolve this is run several "pass"
like e2fsck.
The first pass just marks duplicate redirects
The second pass (with -y) sets redirect dirs opaque and removes redirect
The third pass will ask if to set merge dir opaque in case user answered No
for any of the redirect dirs in second pass.

Probably easier for you at this point is to flip the question and not
implement the above.

Cheers,
Amir.
--
To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux