bug#68504: [PATCH v3] Add copy-on-write support to scm_copy_file.

Ludovic Courtès <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <[email protected]>
Hi,

Tomas Volf <[email protected]> skribis:

> Sure, I am willing to do my part.  I managed to find this blog post[0], so after
> some minor troubles I did manage to get a VM with GNU/Hurd running.  Next I will
> read up on copy_file_range and try to put together a patch.

It’s really just (service hurd-vm-service-type) on Guix System:

  https://guix.gnu.org/manual/devel/en/html_node/Virtualization-Services.html#The-Hurd-in-a-Virtual-Machine

> Just to make sure, your idea here is exactly what?  Always try to use
> copy_file_range before the regular copy?  So the flow would be
>
> For 'always case:
>
>     CoW  ---fail-->  FAIL
>
> For 'auto case:
>
>     CoW  ---fail-->  copy_file_range  ---fail-->  current copy  ---fail-->  FAIL
>
> For 'never case:
>
>     copy_file_range  ---fail-->  current copy  ---fail-->  FAIL
>
> Is that an accurate summary?

Yes, that’s exactly what I had in mind.

Actually it might be better to use sendfile(2), which is slightly less
generic but otherwise equivalent AFAICS, and which happens to have a
Hurd implementation in glibc.

Thanks for your help!

Ludo’.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.