-
Notifications
You must be signed in to change notification settings - Fork 7
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
f2fs:compress: fix a bug #1
Open
jluyangsonghua
wants to merge
3
commits into
jaegeuk:g-dev-test
Choose a base branch
from
jluyangsonghua:g-dev-test
base: g-dev-test
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previously, there was a bug where user could see stale buffer cache (e.g, 512B) attached in the 4KB-sized pager cache, when the block size was changed from 512B to 4KB. That was fixed by: commit 5db470e ("loop: drop caches if offset or block_size are changed") But, there were some regression reports saying the fix returns EAGAIN easily. So, this patch removes previously added EAGAIN condition, nrpages != 0. Instead, it changes the flow like this: - sync_blockdev() - blk_mq_freeze_queue() : change the loop configuration - blk_mq_unfreeze_queue() - sync_blockdev() - invalidate_bdev() After invalidating the buffer cache, we must see the full valid 4KB page. Additional concern came from Bart in which we can lose some data when changing the lo_offset. In that case, this patch adds: - sync_blockdev() - blk_set_queue_dying - blk_mq_freeze_queue() : change the loop configuration - blk_mq_unfreeze_queue() - blk_queue_flag_clear(QUEUE_FLAG_DYING); - sync_blockdev() - invalidate_bdev() Report: https://bugs.chromium.org/p/chromium/issues/detail?id=938958#c38 Cc: <[email protected]> Cc: Jens Axboe <[email protected]> Cc: [email protected] Cc: Bart Van Assche <[email protected]> Fixes: 5db470e ("loop: drop caches if offset or block_size are changed") Reported-by: Gwendal Grignou <[email protected]> Reported-by: grygorii tertychnyi <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
…writing some files would fail when cluster.idx did not add
jaegeuk
force-pushed
the
g-dev-test
branch
7 times, most recently
from
May 30, 2020 01:50
af52b58
to
b657155
Compare
jaegeuk
force-pushed
the
g-dev-test
branch
13 times, most recently
from
June 9, 2020 13:49
db2167c
to
d0adea0
Compare
jaegeuk
force-pushed
the
g-dev-test
branch
5 times, most recently
from
June 21, 2020 16:42
32a5f29
to
f13578d
Compare
jaegeuk
force-pushed
the
g-dev-test
branch
2 times, most recently
from
June 24, 2020 16:07
460a9b8
to
c20a5c8
Compare
jaegeuk
pushed a commit
that referenced
this pull request
Jan 7, 2025
1. ioctl(fd1, F2FS_IOC_DONATE_RANGE, {0,3}); 2. ioctl(fd2, F2FS_IOC_DONATE_RANGE, {1,2}); 3. ioctl(fd3, F2FS_IOC_DONATE_RANGE, {3,1}); 4. echo 3 > /sys/fs/f2fs/blk/donate_caches will reclaim 3 page cache ranges, registered by #1, #2, and #3. Signed-off-by: Jaegeuk Kim <[email protected]>
jaegeuk
pushed a commit
that referenced
this pull request
Jan 7, 2025
1. ioctl(fd1, F2FS_IOC_DONATE_RANGE, {0,3}); 2. ioctl(fd2, F2FS_IOC_DONATE_RANGE, {1,2}); 3. ioctl(fd3, F2FS_IOC_DONATE_RANGE, {3,1}); 4. echo 3 > /sys/fs/f2fs/blk/donate_caches will reclaim 3 page cache ranges, registered by #1, #2, and #3. Signed-off-by: Jaegeuk Kim <[email protected]>
jaegeuk
pushed a commit
that referenced
this pull request
Jan 8, 2025
1. ioctl(fd1, F2FS_IOC_DONATE_RANGE, {0,3}); 2. ioctl(fd2, F2FS_IOC_DONATE_RANGE, {1,2}); 3. ioctl(fd3, F2FS_IOC_DONATE_RANGE, {3,1}); 4. echo 3 > /sys/fs/f2fs/blk/donate_caches will reclaim 3 page cache ranges, registered by #1, #2, and #3. Signed-off-by: Jaegeuk Kim <[email protected]>
jaegeuk
pushed a commit
that referenced
this pull request
Jan 8, 2025
1. ioctl(fd1, F2FS_IOC_DONATE_RANGE, {0,3}); 2. ioctl(fd2, F2FS_IOC_DONATE_RANGE, {1,2}); 3. ioctl(fd3, F2FS_IOC_DONATE_RANGE, {3,1}); 4. echo 3 > /sys/fs/f2fs/blk/donate_caches will reclaim 3 page cache ranges, registered by #1, #2, and #3. Signed-off-by: Jaegeuk Kim <[email protected]>
jaegeuk
pushed a commit
that referenced
this pull request
Jan 13, 2025
1. ioctl(fd1, F2FS_IOC_DONATE_RANGE, {0,3}); 2. ioctl(fd2, F2FS_IOC_DONATE_RANGE, {1,2}); 3. ioctl(fd3, F2FS_IOC_DONATE_RANGE, {3,1}); 4. echo 3 > /sys/fs/f2fs/blk/donate_caches will reclaim 3 page cache ranges, registered by #1, #2, and #3. Signed-off-by: Jaegeuk Kim <[email protected]>
jaegeuk
force-pushed
the
g-dev-test
branch
2 times, most recently
from
January 13, 2025 20:38
9b8567b
to
ffb4361
Compare
jaegeuk
pushed a commit
that referenced
this pull request
Jan 14, 2025
1. ioctl(fd1, F2FS_IOC_DONATE_RANGE, {0,3}); 2. ioctl(fd2, F2FS_IOC_DONATE_RANGE, {1,2}); 3. ioctl(fd3, F2FS_IOC_DONATE_RANGE, {3,1}); 4. echo 3 > /sys/fs/f2fs/blk/donate_caches will reclaim 3 page cache ranges, registered by #1, #2, and #3. Signed-off-by: Jaegeuk Kim <[email protected]>
jaegeuk
pushed a commit
that referenced
this pull request
Jan 14, 2025
1. ioctl(fd1, F2FS_IOC_DONATE_RANGE, {0,3}); 2. ioctl(fd2, F2FS_IOC_DONATE_RANGE, {1,2}); 3. ioctl(fd3, F2FS_IOC_DONATE_RANGE, {3,1}); 4. echo 3 > /sys/fs/f2fs/blk/donate_caches will reclaim 3 page cache ranges, registered by #1, #2, and #3. Signed-off-by: Jaegeuk Kim <[email protected]>
jaegeuk
pushed a commit
that referenced
this pull request
Jan 14, 2025
1. ioctl(fd1, F2FS_IOC_DONATE_RANGE, {0,3}); 2. ioctl(fd2, F2FS_IOC_DONATE_RANGE, {1,2}); 3. ioctl(fd3, F2FS_IOC_DONATE_RANGE, {3,1}); 4. echo 3 > /sys/fs/f2fs/blk/donate_caches will reclaim 3 page cache ranges, registered by #1, #2, and #3. Signed-off-by: Jaegeuk Kim <[email protected]>
jaegeuk
pushed a commit
that referenced
this pull request
Jan 14, 2025
1. ioctl(fd1, F2FS_IOC_DONATE_RANGE, {0,3}); 2. ioctl(fd2, F2FS_IOC_DONATE_RANGE, {1,2}); 3. ioctl(fd3, F2FS_IOC_DONATE_RANGE, {3,1}); 4. echo 3 > /sys/fs/f2fs/blk/donate_caches will reclaim 3 page cache ranges, registered by #1, #2, and #3. Signed-off-by: Jaegeuk Kim <[email protected]>
jaegeuk
pushed a commit
that referenced
this pull request
Jan 15, 2025
1. ioctl(fd1, F2FS_IOC_DONATE_RANGE, {0,3}); 2. ioctl(fd2, F2FS_IOC_DONATE_RANGE, {1,2}); 3. ioctl(fd3, F2FS_IOC_DONATE_RANGE, {3,1}); 4. echo 3 > /sys/fs/f2fs/blk/donate_caches will reclaim 3 page cache ranges, registered by #1, #2, and #3. Signed-off-by: Jaegeuk Kim <[email protected]>
jaegeuk
pushed a commit
that referenced
this pull request
Jan 16, 2025
1. ioctl(fd1, F2FS_IOC_DONATE_RANGE, {0,3}); 2. ioctl(fd2, F2FS_IOC_DONATE_RANGE, {1,2}); 3. ioctl(fd3, F2FS_IOC_DONATE_RANGE, {3,1}); 4. echo 3 > /sys/fs/f2fs/blk/donate_caches will reclaim 3 page cache ranges, registered by #1, #2, and #3. Signed-off-by: Jaegeuk Kim <[email protected]>
jaegeuk
pushed a commit
that referenced
this pull request
Jan 16, 2025
1. ioctl(fd1, F2FS_IOC_DONATE_RANGE, {0,3}); 2. ioctl(fd2, F2FS_IOC_DONATE_RANGE, {1,2}); 3. ioctl(fd3, F2FS_IOC_DONATE_RANGE, {3,1}); 4. echo 3 > /sys/fs/f2fs/blk/donate_caches will reclaim 3 page cache ranges, registered by #1, #2, and #3. Signed-off-by: Jaegeuk Kim <[email protected]>
jaegeuk
pushed a commit
that referenced
this pull request
Jan 16, 2025
1. ioctl(fd1, F2FS_IOC_DONATE_RANGE, {0,3}); 2. ioctl(fd2, F2FS_IOC_DONATE_RANGE, {1,2}); 3. ioctl(fd3, F2FS_IOC_DONATE_RANGE, {3,1}); 4. echo 3 > /sys/fs/f2fs/blk/donate_caches will reclaim 3 page cache ranges, registered by #1, #2, and #3. Signed-off-by: Jaegeuk Kim <[email protected]>
jaegeuk
pushed a commit
that referenced
this pull request
Jan 17, 2025
1. ioctl(fd1, F2FS_IOC_DONATE_RANGE, {0,3}); 2. ioctl(fd2, F2FS_IOC_DONATE_RANGE, {1,2}); 3. ioctl(fd3, F2FS_IOC_DONATE_RANGE, {3,1}); 4. echo 3 > /sys/fs/f2fs/blk/donate_caches will reclaim 3 page cache ranges, registered by #1, #2, and #3. Signed-off-by: Jaegeuk Kim <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
f2fs:compress: Update isize after compress_write_end, otherwise apendwriting some files would fail when cluster.idx did not add