-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux /proc/spl/kstat per-dataset statistics do not account for file writes performed with mmap #12994
Labels
Type: Defect
Incorrect behavior (e.g. crash, hang)
Comments
drowfx
added a commit
to drowfx/zfs
that referenced
this issue
Jan 30, 2022
This allows reads/writes caused by accesses to mmap files to be accounted correctly in the per-dataset kstats. Signed-off-by: Matthias Blankertz <[email protected]> Issue openzfs#12994
13 tasks
drowfx
added a commit
to drowfx/zfs
that referenced
this issue
Feb 3, 2022
This allows reads/writes caused by accesses to mmap files to be accounted correctly in the per-dataset kstats for both Linux and FreeBSD. Signed-off-by: Matthias Blankertz <[email protected]> Issue openzfs#12994
tonyhutter
pushed a commit
to tonyhutter/zfs
that referenced
this issue
Feb 15, 2022
This allows reads/writes caused by accesses to mmap files to be accounted correctly in the per-dataset kstats for both Linux and FreeBSD. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Matthias Blankertz <[email protected]> Closes openzfs#12994 Closes openzfs#13044
tonyhutter
pushed a commit
to tonyhutter/zfs
that referenced
this issue
Feb 16, 2022
This allows reads/writes caused by accesses to mmap files to be accounted correctly in the per-dataset kstats for both Linux and FreeBSD. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Matthias Blankertz <[email protected]> Closes openzfs#12994 Closes openzfs#13044
tonyhutter
pushed a commit
to tonyhutter/zfs
that referenced
this issue
Feb 17, 2022
This allows reads/writes caused by accesses to mmap files to be accounted correctly in the per-dataset kstats for both Linux and FreeBSD. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Matthias Blankertz <[email protected]> Closes openzfs#12994 Closes openzfs#13044
nicman23
pushed a commit
to nicman23/zfs
that referenced
this issue
Aug 22, 2022
This allows reads/writes caused by accesses to mmap files to be accounted correctly in the per-dataset kstats for both Linux and FreeBSD. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Matthias Blankertz <[email protected]> Closes openzfs#12994 Closes openzfs#13044
nicman23
pushed a commit
to nicman23/zfs
that referenced
this issue
Aug 22, 2022
This allows reads/writes caused by accesses to mmap files to be accounted correctly in the per-dataset kstats for both Linux and FreeBSD. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Matthias Blankertz <[email protected]> Closes openzfs#12994 Closes openzfs#13044
snajpa
pushed a commit
to vpsfreecz/zfs
that referenced
this issue
Oct 22, 2022
This allows reads/writes caused by accesses to mmap files to be accounted correctly in the per-dataset kstats for both Linux and FreeBSD. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Matthias Blankertz <[email protected]> Closes openzfs#12994 Closes openzfs#13044
snajpa
pushed a commit
to vpsfreecz/zfs
that referenced
this issue
Oct 22, 2022
This allows reads/writes caused by accesses to mmap files to be accounted correctly in the per-dataset kstats for both Linux and FreeBSD. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Matthias Blankertz <[email protected]> Closes openzfs#12994 Closes openzfs#13044
snajpa
pushed a commit
to vpsfreecz/zfs
that referenced
this issue
Oct 23, 2022
This allows reads/writes caused by accesses to mmap files to be accounted correctly in the per-dataset kstats for both Linux and FreeBSD. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Matthias Blankertz <[email protected]> Closes openzfs#12994 Closes openzfs#13044
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
System information
Describe the problem you're observing
When a file on a ZFS dataset is opened for write and mmaped (with PROT_WRITE), and the file is written via the memory mapping, the writes are not accounted in the
/proc/spl/kstat/zfs/<pool>/objset-<id>
file: Neither thenwritten
nor thewrites
field increase.The data is being written to the ZFS fs, being visible in the
usedbydataset
property.Describe how to reproduce the problem
The python script here reproduces the issue.
It first writes 512 MiB to a test file using write(), checks the writes in kstat. Then it writes 512 MiB to another test file using mmap() and checks the writes in kstat again. The
usedbydataset
is also checked to verify the data is being written.Running the script with a test dataset gives the following output:
As you can see, the write using mmap is not accounted in kstat, even though the dataset size increases by roughly the expected amount.
The expected result would be that at least 1 writes and roughly 536870912 bytes are accounted for both write paths.
Include any warning/errors/backtraces from the system logs
N/A
The text was updated successfully, but these errors were encountered: