Re: [PATCH v2 3/3] ovl: copy-up optimization for truncate

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

 



On Fri, Apr 9, 2021 at 7:50 AM Amir Goldstein <amir73il@xxxxxxxxx> wrote:

> Anyway, I hold my opinion that the optimization of skipping notify_change()
> has little benefit and is a potential for bugs, even if the specific
> bug I pointed
> out is not real.

I can agree with that.

At this point the only sane way I can see this optimization be
implemented is to split the copy-up into a preparation and a commit
phase:

1) copy to tmpfile (can optimize to truncated size)
2) call notify_change() on the tmpfile to truncate
3) if successful, link the tmpfile into upper

With that the truncate still remains a single atomic operation.
Only slight difference is that now ctime will not match mtime after a
copy-up/truncate operation, but I guess that's not something anybody
should be dependent on.

Thanks,
Miklos



[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