all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Jacobowitz <daniel.jacobowitz@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 66381@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: bug#66381: 29.1; Auto-revert not polling files when notifications are enabled
Date: Mon, 9 Oct 2023 14:17:17 -0400	[thread overview]
Message-ID: <CAN9gPaG0bEmZF=xjQ+BjLhtZ9GfhMxhHQvMBnjxTpouc7dA+sQ@mail.gmail.com> (raw)
In-Reply-To: <87cyxpffwh.fsf@gmx.de>

Thanks for the follow-up!

First of all, for anyone who stumbles on this, inotifywait's
documentation says it listens to all events by default. But it doesn't
request IN_UNMOUNT unless you use `-e unmount`. That confused all of
my test results - that's why I thought the event was never generated.
In possession of this new knowledge, I verified that an unmount event
is delivered to inotifywait when my filesystem daemon restarts. So
that's great progress.

I built a patched emacs and tried unmounting the filesystem. Emacs was notified:

file-notify-handle-event (file-notify ((1 . 0) (unmount isdir)
"/google/src/cloud/dmj/emacs/google3" 0)
file-notify--callback-inotify)
file-notify-handle-event (file-notify ((1 . 0) stopped
"/google/src/cloud/dmj/emacs/google3/file.txt")
auto-revert-notify-handler)
auto-revert-notify-handler ((1 . 0) stopped
"/google/src/cloud/dmj/emacs/google3/file.txt")
file-notify-handle-event (file-notify ((1 . 0) stopped
"/google/src/cloud/dmj/emacs/google3/file.txt")
auto-revert-notify-handler)
auto-revert-notify-handler ((1 . 0) stopped
"/google/src/cloud/dmj/emacs/google3/file.txt")
file-notify-handle-event (file-notify ((1 . 0) (ignored)
"/google/src/cloud/dmj/emacs/google3" 0)
file-notify--callback-inotify)

It works! Thanks!

On Sun, Oct 8, 2023 at 8:38 AM Michael Albinus <michael.albinus@gmx.de> wrote:
>
> Michael Albinus <michael.albinus@gmx.de> writes:
>
> Hi,
>
> > The problem is, that in Daniel's case we get no information that file
> > notification has ceased to work for the re-mounted file system (no
> > IN_IGNORED event from inotify). auto-revert-notify-watch-descriptor
> > still exists, and auto-revert-notify-modified-p isn't modified any
> > longer. Therefore the file is not reverted even while polling.
>
> I've debugged further, and it looks like there is a gap in forwarding
> the IN_IGNORED event from inotify.c to filenotify.el. Oops.
>
> Daniel, could you pls try the appended patch? It shall enable this to
> work, meaning auto-revert-mode is informed about the unmounted file
> system. I've tested with an NFS mount, 'tho.
>
> Best regards, Michael.
>


-- 
Thanks,
Daniel





  reply	other threads:[~2023-10-09 18:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-06 17:13 bug#66381: 29.1; Auto-revert not polling files when notifications are enabled Daniel Jacobowitz
2023-10-07  6:17 ` Eli Zaretskii
2023-10-07 15:15   ` Michael Albinus
2023-10-07 16:14     ` Daniel Jacobowitz
2023-10-07 17:02       ` Michael Albinus
     [not found]         ` <CAN9gPaEi7yPgC4cA9fR-TtSmsVg6CoTOZ=bbZFa1gjQA_B1vGA@mail.gmail.com>
2023-10-07 17:59           ` Michael Albinus
2023-10-07 18:14             ` Daniel Jacobowitz
2023-10-07 18:28               ` Eli Zaretskii
2023-10-07 18:41                 ` Daniel Jacobowitz
2023-10-07 18:48                   ` Daniel Jacobowitz
2023-10-07 19:00                   ` Eli Zaretskii
2023-10-08  8:24                     ` Michael Albinus
2023-10-08 12:38                       ` Michael Albinus
2023-10-09 18:17                         ` Daniel Jacobowitz [this message]
2023-10-10 18:03                           ` Michael Albinus
2023-10-13 12:05                             ` Eli Zaretskii
2023-10-15 13:58                               ` Michael Albinus
2023-10-16 12:38                                 ` Eli Zaretskii
2023-10-16 14:29                                   ` Michael Albinus

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='CAN9gPaG0bEmZF=xjQ+BjLhtZ9GfhMxhHQvMBnjxTpouc7dA+sQ@mail.gmail.com' \
    --to=daniel.jacobowitz@gmail.com \
    --cc=66381@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=michael.albinus@gmx.de \
    /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.