Skip to content

client: fire the finish_cap_snap() after buffer being flushed#38732

Merged
batrick merged 4 commits intoceph:masterfrom
lxbsz:client_cap_snaps
Mar 26, 2021
Merged

client: fire the finish_cap_snap() after buffer being flushed#38732
batrick merged 4 commits intoceph:masterfrom
lxbsz:client_cap_snaps

Conversation

@lxbsz
Copy link
Member

@lxbsz lxbsz commented Dec 30, 2020

When the inode has Fb cap and the used reference is none zero, the
cap snap flushing will be delayed, so we need to make sure it will
be invoked after the dirty buffer is flushed to osd.

Fixes: https://tracker.ceph.com/issues/48679
Signed-off-by: Xiubo Li xiubli@redhat.com

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@lxbsz lxbsz requested a review from a team December 30, 2020 01:46
@github-actions github-actions bot added the cephfs Ceph File System label Dec 30, 2020
@lxbsz lxbsz requested a review from batrick December 30, 2020 01:46
@lxbsz lxbsz added the bug-fix label Dec 30, 2020
@lxbsz
Copy link
Member Author

lxbsz commented Jan 4, 2021

jenkins test make check

Copy link
Member

@batrick batrick left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM. Thanks for tracking that down!

@lxbsz lxbsz requested a review from batrick January 4, 2021 23:59
@lxbsz lxbsz force-pushed the client_cap_snaps branch 2 times, most recently from a6d3d64 to 616084c Compare January 7, 2021 01:28
@lxbsz
Copy link
Member Author

lxbsz commented Jan 7, 2021

jenkins test api

@batrick
Copy link
Member

batrick commented Jan 8, 2021

https://pulpito.ceph.com/pdonnell-2021-01-08_05:07:01-fs-wip-pdonnell-testing-20210107.220115-distro-basic-smithi/

New failures are:

New failures are related to snaps. I fear this PR may be the cause.

lxbsz added 4 commits January 9, 2021 09:24
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Xiubo Li <xiubli@redhat.com>
When the inode has Fb cap and the used reference is none zero, the
cap snap flushing will be delayed, so we need to make sure it will
be invoked after the dirty buffer is flushed to osd.

Fixes: https://tracker.ceph.com/issues/48679
Signed-off-by: Xiubo Li <xiubli@redhat.com>
@lxbsz lxbsz force-pushed the client_cap_snaps branch from 616084c to a34d0c2 Compare January 9, 2021 01:50
@lxbsz
Copy link
Member Author

lxbsz commented Jan 9, 2021

https://pulpito.ceph.com/pdonnell-2021-01-08_05:07:01-fs-wip-pdonnell-testing-20210107.220115-distro-basic-smithi/

New failures are:

New failures are related to snaps. I fear this PR may be the cause.

I think I fogot to clean the writing flag and wakeup the waiters.

@lxbsz
Copy link
Member Author

lxbsz commented Jan 9, 2021

@batrick Fixed it, PTAL. Thanks.

@lxbsz lxbsz requested a review from batrick January 9, 2021 01:52
@lxbsz
Copy link
Member Author

lxbsz commented Feb 2, 2021

@lxbsz
Copy link
Member Author

lxbsz commented Mar 24, 2021

@batrick

The new issue https://tracker.ceph.com/issues/49928 is also caused by this bug.

I think the old code want to call the check_cap(), which will also trigger to flush the cap snap, in put_cap_ref() when putting the last ref for the Fb cap, but it didn't. This PR will explicitly do that.

@batrick
Copy link
Member

batrick commented Mar 24, 2021

ACK, thanks for checking htat

@batrick
Copy link
Member

batrick commented Mar 26, 2021

https://pulpito.ceph.com/pdonnell-2021-03-24_23:26:35-fs-wip-pdonnell-testing-20210324.190252-distro-basic-smithi/

@batrick batrick merged commit 8a4794c into ceph:master Mar 26, 2021
@batrick
Copy link
Member

batrick commented Mar 26, 2021

This change looks good/safe to me so I'm merging it. We did have this new failure come up but I don't think it's related, so far:

https://tracker.ceph.com/issues/50021

Please have a look though.

@lxbsz
Copy link
Member Author

lxbsz commented Mar 27, 2021

This change looks good/safe to me so I'm merging it. We did have this new failure come up but I don't think it's related, so far:

https://tracker.ceph.com/issues/50021

Please have a look though.

Sure, will check it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants