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

a series of fixups for nydusd #1587

Merged
merged 3 commits into from
Jun 18, 2024
Merged

Conversation

imeoer
Copy link
Collaborator

@imeoer imeoer commented Jun 18, 2024

Relevant Issue (if applicable)

FROM #1561
Just drop the commit 8df5d7f, it's breaks block device unit test, we still need to investigate.

Details

Please describe the details of PullRequest.

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.

@imeoer imeoer requested a review from a team as a code owner June 18, 2024 01:41
@imeoer imeoer requested review from jiangliu, ccx1024cc and Desiki-high and removed request for a team June 18, 2024 01:41
@imeoer imeoer changed the title a series of fixups for nydusd [WIP] a series of fixups for nydusd Jun 18, 2024
泰友 added 3 commits June 18, 2024 02:04
    1. Case1: Fuse server exits in thread not main. There is possibility
       that process finishes before shutdown of server.
    2. Case2: Fuse server exits in thread of state machine. There is
       possibiltiy that state machine not responses to signal catch
       thread. Then dead lock happens. Process exits before shutdown of
       server.

    This pr aims to seperator shutdown actions from signal catch
    handler. It only notifies controller. Controller exits with
    shutdown of fuse server. No race. No deadlock.

Signed-off-by: 泰友 <[email protected]>
    User io may involve discontinuous segments in different chunks. Bad
    read is produced by merging them into continuous one. That is what
    Region does. This pr separate discontinuous segments into different
    regions, avoiding merging forcibly.

Signed-off-by: 泰友 <[email protected]>
    There are scenes that cache file is smaller than expect size. Such as:

    1. Nydusd 1.6 generates cache file by prefetch, which is smaller than size in boot.
    2. Nydusd 2.2 generates cache file by prefetch, when image not provide ext blob tables.
    3. Nydusd not have enough time to fill cache for blob.

    Equality check for size is too much strict for both 1.6
    compatibility and 2.2 concurrency. This pr ensures blob size smaller
    or equal than expect size. It also truncates blob cache when smaller
    than expect size.

Signed-off-by: 泰友 <[email protected]>
Copy link

codecov bot commented Jun 18, 2024

Codecov Report

Attention: Patch coverage is 52.38095% with 10 lines in your changes missing coverage. Please review.

Project coverage is 61.49%. Comparing base (de7cfc4) to head (c957c90).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1587      +/-   ##
==========================================
- Coverage   61.53%   61.49%   -0.05%     
==========================================
  Files         144      144              
  Lines       46616    46630      +14     
  Branches    44602    44616      +14     
==========================================
- Hits        28685    28673      -12     
- Misses      16452    16469      +17     
- Partials     1479     1488       +9     
Files Coverage Δ
src/bin/nydusd/main.rs 0.00% <0.00%> (ø)
storage/src/cache/filecache/mod.rs 67.14% <0.00%> (-0.36%) ⬇️
service/src/daemon.rs 11.31% <0.00%> (-0.05%) ⬇️
storage/src/cache/cachedfile.rs 37.94% <68.75%> (+<0.01%) ⬆️

... and 5 files with indirect coverage changes

@imeoer imeoer changed the title [WIP] a series of fixups for nydusd a series of fixups for nydusd Jun 18, 2024
Copy link
Member

@adamqqqplay adamqqqplay left a comment

Choose a reason for hiding this comment

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

LGTM

@imeoer imeoer merged commit 332f3dd into dragonflyoss:master Jun 18, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants