Skip to content

client: do not check file size when inode does not have Fc caps#63383

Merged
vshankar merged 2 commits intoceph:mainfrom
vshankar:wip-70726
Jun 20, 2025
Merged

client: do not check file size when inode does not have Fc caps#63383
vshankar merged 2 commits intoceph:mainfrom
vshankar:wip-70726

Conversation

@vshankar
Copy link
Contributor

Fixes: https://tracker.ceph.com/issues/70726

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

@vshankar vshankar requested a review from a team May 20, 2025 13:43
@vshankar vshankar added the cephfs Ceph File System label May 20, 2025
@github-actions github-actions bot added the tests label May 20, 2025
@anoopcs9
Copy link
Contributor

Oh..I see that this is not an issue with squid because the problematic check for in->size was only introduced as part of #59987. Please keep in mind that we should successfully get past those tests with object cacher disabled.

@vshankar
Copy link
Contributor Author

Fixed and updated.

Copy link
Contributor

@anoopcs9 anoopcs9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that the torture test case from which the regression (reported via samba-in-kubernetes/sit-test-cases#100) was detected can now successfully complete with the changes from the PR.

Copy link
Contributor

@kotreshhr kotreshhr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm otherwise

Copy link
Contributor

@anoopcs9 anoopcs9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks.

@github-actions
Copy link

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@vshankar
Copy link
Contributor Author

rebased and updated.

@vshankar
Copy link
Contributor Author

This PR is under test in https://tracker.ceph.com/issues/71496.

@vshankar
Copy link
Contributor Author

vshankar commented Jun 1, 2025

This PR is under test in https://tracker.ceph.com/issues/71496.

This is now being tested in https://tracker.ceph.com/issues/71514

@anoopcs9
Copy link
Contributor

anoopcs9 commented Jun 2, 2025

jenkins test windows

2 similar comments
@anoopcs9
Copy link
Contributor

anoopcs9 commented Jun 3, 2025

jenkins test windows

@anoopcs9
Copy link
Contributor

anoopcs9 commented Jun 4, 2025

jenkins test windows

@vshankar
Copy link
Contributor Author

vshankar commented Jun 5, 2025

fs suite is currently experiencing unrelated test failures which is being debugged. will restart testing when its resolved.

@anoopcs9
Copy link
Contributor

jenkins test windows

1 similar comment
@anoopcs9
Copy link
Contributor

jenkins test windows

@anoopcs9
Copy link
Contributor

@vshankar Is this good to be merged?

@vshankar
Copy link
Contributor Author

@vshankar Is this good to be merged?

We ran into a couple of unrelated issues from the last 2 weeks (testing kernel bug, teutholgoy slowness). Now that the tests have run, this will get merged pretty soon.

@vshankar
Copy link
Contributor Author

This change will conflict with #63636 once merged, so I'm delaying testing since it would need a rebase. But, this will get merged soon.

@vshankar
Copy link
Contributor Author

This change will conflict with #63636 once merged, so I'm delaying testing since it would need a rebase. But, this will get merged soon.

I have included this change in https://tracker.ceph.com/issues/71496 as PR #63636 has received more comments and needs windows build fix. Let's get this merged first!

@vshankar
Copy link
Contributor Author

@vshankar
Copy link
Contributor Author

jenkins test windows

@anoopcs9
Copy link
Contributor

@vshankar I see the same failure you mentioned in #63636 (comment).

@vshankar
Copy link
Contributor Author

@vshankar I see the same failure you mentioned in #63636 (comment).

oh, windows w/ O_NONBLOCK :/

@vshankar
Copy link
Contributor Author

(hang on -- let me fix this up)

@vshankar
Copy link
Contributor Author

I think its safe to not use O_NONBLOCK

@anoopcs9
Copy link
Contributor

I think its safe to not use O_NONBLOCK

At least for this particular test case O_NONBLOCK shouldn't matter I guess. Feel free to take it out.

vshankar added 2 commits June 19, 2025 08:53
Since the client is holding Fr caps, the read request can be
directly sent to the OSD. The offset/in->size comparison check
is causing the read request to return with no data since in->size
isn't yet updated when another client does an extending write.

Introduced-by: 942474c
Fixes: http://tracker.ceph.com/issues/70726
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Credit to @anoopcs9 for the reproducer.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
@vshankar
Copy link
Contributor Author

Update with O_NONBLOCK flag removed. Ran test locally

➜  build git:(wip-70726) ✗ ./bin/ceph_test_libcephfs --gtest_filter=LibCephFS.AsyncReadAndWriteMultiClient
Note: Google Test filter = LibCephFS.AsyncReadAndWriteMultiClient
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from LibCephFS
[ RUN      ] LibCephFS.AsyncReadAndWriteMultiClient
: waiting for write to finish
written=131072
: write finished
: waiting for read to finish
read=131072
: read finished
[       OK ] LibCephFS.AsyncReadAndWriteMultiClient (1362 ms)
[----------] 1 test from LibCephFS (1362 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (1362 ms total)
[  PASSED  ] 1 test.

@vshankar
Copy link
Contributor Author

@vshankar vshankar merged commit daff912 into ceph:main Jun 20, 2025
13 checks passed
vshankar added a commit to vshankar/ceph that referenced this pull request Jun 23, 2025
* refs/pull/63383/head:
	test: multi client file read/write test for extending writes
	client: do not check file size when inode does not have Fc caps

Reviewed-by: Kotresh Hiremath Ravishankar <khiremat@redhat.com>
Reviewed-by: Anoop C S <anoopcs@cryptolab.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cephfs Ceph File System tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants