> 在 2017年12月12日,下午7:12,Amir Goldstein <amir73il@xxxxxxxxx> 写道: > > 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(). Your suggestion is good as a method of warning. But what overlays does is moving files from workdir to upperdir rather than doing the opposite. Additionally printing out the error message of moving files from upperdir to workdir would probably get users confused. Thanks, Chengguang. -- 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