From: Philipp Stephani <p.stephani2@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 44631@debbugs.gnu.org
Subject: bug#44631: 28.0.50; Byte compilation fails if destination file is a mount point
Date: Sat, 12 Dec 2020 16:19:27 +0100 [thread overview]
Message-ID: <CAArVCkRL3Bxim=uPiYK8VDkEcEW=Xx0VKb6+nmtU37icdg=PKA@mail.gmail.com> (raw)
In-Reply-To: <87y2irb7pj.fsf@gnus.org>
Am Di., 24. Nov. 2020 um 07:16 Uhr schrieb Lars Ingebrigtsen <larsi@gnus.org>:
> >> > Nevertheless, byte-compile-file could
> >> > fall back to a direct write-region without temporary file + rename, or
> >> > rename-file could fall back to copy + remove on EBUSY (like EXDEV).
> >>
> >> Hm... the latter sounds like an easy fix, but aren't there more commond
> >> cases where you get EBUSY where copy + remove would fail, too?
> >
> > Probably, but I guess the situation wouldn't become worse, as
> > presumably these cases already fail today.
>
> No, I can't think of any cases where this would lead to a worse result
> than the current situation, but it's somewhat scary making a low-level
> general change like this in `rename-file' -- I have no idea whether
> EBUSY is used for other oddball failure cases like this.
>
> Making the change in byte-compile-file sounds safer, but would require
> more work.
I guess it also depends on what the semantics are that
byte-compile-file guarantees. If it attempts to guarantee atomicity,
then only a intra-filesystem rename (or similar alternatives such as
O_TMPFILE + linkat) are acceptable, and technically, not even the
current fallback on EXDEV (which makes rename-file nonatomic) is OK.
If atomic writes are best-effort, then we could always fall back to
copy-file + delete-file on any file-error.
next prev parent reply other threads:[~2020-12-12 15:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-14 12:39 bug#44631: 28.0.50; Byte compilation fails if destination file is a mount point Philipp Stephani
2020-11-14 16:04 ` Lars Ingebrigtsen
2020-11-22 21:03 ` Philipp Stephani
2020-11-24 6:16 ` Lars Ingebrigtsen
2020-12-12 15:19 ` Philipp Stephani [this message]
2020-12-13 12:32 ` Lars Ingebrigtsen
2020-12-13 16:41 ` Philipp Stephani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAArVCkRL3Bxim=uPiYK8VDkEcEW=Xx0VKb6+nmtU37icdg=PKA@mail.gmail.com' \
--to=p.stephani2@gmail.com \
--cc=44631@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.