Skip to contentSkip to conversation

New: ext4 & tmpfs: Splicing to regular files doesn't trigger inotify

Bug 85381 [email protected] 1 participant 3 messages Oct 1, 2014 – Oct 11, 2018

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=85381

Bug ID: 85381
Summary: ext4 & tmpfs: Splicing to regular files doesn't
trigger inotify
Product: File System
Version: 2.5
Kernel Version: 3.14
Hardware: All
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: ext4
Assignee: [email protected]
Reporter: [email protected]
Regression: No

* How to reproduce:

/tmp % cat a.c
#define _GNU_SOURCE 1
#include <limits.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>

int main(void)

{
        int pipefd[2];
        pipe(pipefd);

        for (;;) {
                sleep(1);
                write(pipefd[1], "Hello world\n", 12);
                splice(pipefd[0], NULL, 1, NULL, INT_MAX, 0);
        }
}

/tmp % gcc a.c
/tmp % touch a.txt
/tmp % ./a.out > a.txt & tail -f a.txt

* Expected result:

tail prints "Hello world" every second.

* Actual result:

btrfs: Works as expected;
ext4/tmpfs: tail blocks on inotify forever and prints nothing.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#1 lore raw

[Bug 85381] ext4 & tmpfs: Splicing to regular files doesn't trigger inotify

https://bugzilla.kernel.org/show_bug.cgi?id=85381

Jan Kara <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |CODE_FIX

--- Comment #1 from Jan Kara <[email protected]> ---
So this isn't a problem with current kernel (I tested 3.17-rc5) anymore. I believe it got fixed by Al Viro's splice rewrite so 3.16 and newer kernels should have the problem fixed.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#2 lore raw

[Bug 85381] ext4 & tmpfs: Splicing to regular files doesn't trigger inotify

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=85381

Dario Andreani ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #2 from Dario Andreani ([email protected]) --- I still see this issue on kernel versions 4.4 and 4.9. But not on 4.15.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.