Re: [PATCH] ovl: Check project quota ids during ovl_fill_super()

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

 



On Mon, Nov 27, 2017 at 7:58 PM, Amir Goldstein <amir73il@xxxxxxxxx> wrote:
> On Mon, Nov 27, 2017 at 5:36 PM, cgxu <cgxu@xxxxxxxxxxxx> wrote:
>> Hi Miklos
>>
>> Any suggestion for the patch?
>>
>>
>> Best Regards,
>> Chengguang
>>
>>
>>
>>> 在 2017年11月13日,下午11:59,Chengguang Xu <cgxu@xxxxxxxxxxxx> 写道:
>>>
>>> When upperdir has project quota and has different project id with workdir,
>>> write may fail with error message "Invalid cross-device link" although mounted on r/w mode.
>>> This patch checks project quota information of upperdir/workdir during ovl_fill_super(),
>>> and if different mount on r/o mode. It doesn’t check detail inherit flag because
>>> the implementations are different in specific filesystems.
>>>
>
> Since overlayfs removes and re-creates 'work' directory inside workdir,
> why not set projid of 'work' directory according to upper projid instead of
> failing the mount?
> If projid cannot be set, 'work' dir creation will fail and overlayfs will
> fall back to ro mount anyway.
>

How about, instead of comparing project id, check that an O_TMPFILE
created in upperdir can be moved to workdir?
This tests exactly what overlayfs needs and not properties that lead to
what overlayfs needs.
Same as the check for setxattr and ovl_check_d_type_supported()
in ovl_make_workdir().

The only culprit is that this test won't work with fs that doesn't support
O_TMPFILE, but I don't think there are fs that support projid and not
O_TMPFILE.

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