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

Optimize blobfs implementation #1295

Merged
merged 3 commits into from
May 25, 2023
Merged

Conversation

jiangliu
Copy link
Collaborator

Relevant Issue (if applicable)

If there are Issues related to this PullRequest, please list it.

Details

Optimize blobfs implementation by:

  • replace Mutex with RwLock
  • cache blob file information
  • support read() operation

Types of changes

What types of changes does your PullRequest introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

Checklist

Go over all the following points, and put an x in all the boxes that apply.

  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

Use rwlock instead of mutex for blobfs, to avoid serializaiton.

Signed-off-by: Jiang Liu <gerry@linux.alibaba.com>
Cache blobfs inode information to avoid opening file on every dax
window operations.

Signed-off-by: Jiang Liu <gerry@linux.alibaba.com>
Enhance blobfs to support read() operation, in addition to DAX.

Signed-off-by: Jiang Liu <gerry@linux.alibaba.com>
@jiangliu jiangliu requested a review from a team as a code owner May 22, 2023 03:18
@jiangliu jiangliu requested review from liubogithub, imeoer and luodw and removed request for a team May 22, 2023 03:18
@anolis-bot
Copy link
Collaborator

@jiangliu , a new test job has been submitted. Please wait in patience. The test job url: https://tone.openanolis.cn/ws/nrh4nnio/test_result/74466

@codecov
Copy link

codecov bot commented May 22, 2023

Codecov Report

Merging #1295 (f40bd01) into master (5879c91) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1295      +/-   ##
==========================================
+ Coverage   45.70%   45.71%   +0.01%     
==========================================
  Files         124      124              
  Lines       36884    36884              
  Branches    36884    36884              
==========================================
+ Hits        16857    16862       +5     
+ Misses      19138    19131       -7     
- Partials      889      891       +2     

see 7 files with indirect coverage changes

@anolis-bot
Copy link
Collaborator

@jiangliu , The CI test is completed, please check result:

Test CaseTest Result
build rust golang image✅ SUCCESS
compile nydusd✅ SUCCESS
compile ctr remote✅ SUCCESS
compile nydus snapshotter✅ SUCCESS
run container with rafs✅ SUCCESS
run container with zran✅ SUCCESS
run container with rafs and compile linux✅ SUCCESS

Congratulations, your test job passed!

Copy link
Collaborator

@liubogithub liubogithub left a comment

Choose a reason for hiding this comment

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

Looks good.

@liubogithub liubogithub merged commit 8a41334 into dragonflyoss:master May 25, 2023
24 checks passed
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.

None yet

3 participants