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

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



On 2017/12/29 17:32, Amir Goldstein Wrote:
>>>> +                       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.
> 

You are right, I miss that -n option will change the file system, thanks
for pointing this out. For simplicity now, I will flip the question as
you said(set opaque xattr in with -y option). For the first choice (run
several pass), we can realize it if necessary in the future.

Thanks,
Yi.

--
To unsubscribe from this list: send the line "unsubscribe fstests" 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 Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux