打开CONFIG_OVERLAY_FS_REDIRECT_DIR 打开233乐园 前言 一共五道题,最后一道题单独分了一栏没看懂…… 用的是赛码网的平台,允许跳出界面使用ide 本人是全部ac测试通过了,应该是没大问题,如果有问题可以提出,如果有优化也欢迎提出。 1-4题 1 数圈游戏:给定一个整数n,计算该整数含有的圆圈个数。 0-9对应的圈...
Looking at the OverlayFS [docs](https://docs.kernel.org/filesystems/overlayfs.html#renaming-directories) some more, specifically at the section covering `redirect_dir`, it mentions the following (emphasis mine): > return EXDEV error: this error is returned by rename(2) when trying to move ...
My understanding it that `rpm` does not handle the `EXDEV` error when `rename()` is called in an overlayfs without the `redirect_dir` option turned to `on` As a matter of fact, if I turn this on via: ``` echo "Y" > /sys/module/overlay/parameters/redirect_dir ``` the command...
data or metadata). Overlayfs has some `xattr` tricks to present to the user in the merged layer the most "transparent/consistent" things as possible. If atomicity is not a concern for the rpm database rebuild I think (if you decide to implement the feature) you maybe take the same rout...
(OverlayFS) filesystem, regardless of whether we choose to do a regular copy of the old directory (to trigger a copy-up) or use the `redirect_dir` feature. However, I believe we should do the former since that's reasonably filesystem-agnostic, unlike the latter (which is, again, Overl...
So, to me the main difference is the atomicity: when you set an `xattr` to the orignal dir then `rename()` the copied up dir, though this means 2 actions, the `rename()` is atomic since no data is actually copied. My understanding is that such actions are somehow "prepared" in th...