Skip to content
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

I/O to file classified as metadata with xfs filesystem on kernel 6.9 and newer #1609

Open
katlapinka opened this issue Feb 7, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@katlapinka
Copy link
Contributor

katlapinka commented Feb 7, 2025

Description

I have IO class config with classification by file size:

IO class id,IO class name,Eviction priority,Allocation
0,unclassified,255,1.00
1,file_size:eq:1122304,1,1.00
2,file_size:lt:1122304,1,1.00
3,file_size:gt:1122304,1,1.00
4,file_size:le:561152,1,1.00
5,file_size:ge:2244608,1,1.00
6,metadata,1,0.00

Writes or reads from files created on exported object (file sizes are related to those from config file) appears to be classified as metadata writes/reads. It happens only when block size is set to file size. Tested on few different kernels:

  • kernel 5.14.0-533.el9.x86_64 -> everything is fine; I/O is classified correctly to corresponding IO classes
  • kernel 6.9.7-1.el9.elrepo.x86_64 -> I/O to files is classified as metadata
  • kernel 6.13.0-1.el8.elrepo.x86_64 -> I/O to files is classified as metadata

This bug occurs only with use of xfs filesystem. With ext3/ext4 everything worked fine.

Expected Behavior

I/O is classified by file size

Actual Behavior

I/O is classified as metadata

Steps to Reproduce

  1. Start cache in wb mode
  2. Disable udev
  3. Set seq cutoff to never and cleaning policy to nop
  4. Add core
  5. Create xfs filesystem on core
  6. Mount core
  7. Create files with sizes correlated to those from IO class config
  8. sync, drop caches, purge cache, reset counters
  9. Write to file using dd with bs=filesize and count=1 (or simply cat a file)
  10. Print io class statistics

Your Environment

  • OpenCAS version (commit hash or tag): 7ee78ac
  • Operating System: CentOS 8/9
  • Cache configuration:
    • Cache mode: wb
    • Cache line size: (default: 4)
    • Promotion policy: (default: always)
    • Cleaning policy: nop
    • Sequential cutoff policy: never
  • Other (e.g. lsblk, casadm -P, casadm -L)
@katlapinka katlapinka added the bug Something isn't working label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant