Skip to content

zloop: fix write pointer calculation in zloop_forget_cache#741

Open
blktests-ci[bot] wants to merge 7 commits intolinus-master_basefrom
series/1081024=>linus-master
Open

zloop: fix write pointer calculation in zloop_forget_cache#741
blktests-ci[bot] wants to merge 7 commits intolinus-master_basefrom
series/1081024=>linus-master

Conversation

@blktests-ci
Copy link
Copy Markdown

@blktests-ci blktests-ci Bot commented Apr 14, 2026

Pull request for series with
subject: zloop: fix write pointer calculation in zloop_forget_cache
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1081024

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 14, 2026

Upstream branch: d60bc14
series: https://patchwork.kernel.org/project/linux-block/list/?series=1081024
version: 1

@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 14, 2026

Upstream branch: d60bc14
series: https://patchwork.kernel.org/project/linux-block/list/?series=1081024
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1081024=>linus-master branch from f14e180 to 3fc3f57 Compare April 14, 2026 09:39
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 6b4d829 to ceec5ed Compare April 21, 2026 06:51
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 21, 2026

Upstream branch: b4e0758
series: https://patchwork.kernel.org/project/linux-block/list/?series=1081024
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1081024=>linus-master branch from 3fc3f57 to 2648c80 Compare April 21, 2026 07:03
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from ceec5ed to 3b54e52 Compare April 22, 2026 20:20
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 22, 2026

Upstream branch: 6596a02
series: https://patchwork.kernel.org/project/linux-block/list/?series=1081024
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1081024=>linus-master branch from 2648c80 to 2ed5e8a Compare April 22, 2026 20:27
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 3b54e52 to 6a0b974 Compare April 23, 2026 16:58
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 23, 2026

Upstream branch: 507bd4b
series: https://patchwork.kernel.org/project/linux-block/list/?series=1081024
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1081024=>linus-master branch from 2ed5e8a to c6d6d79 Compare April 23, 2026 17:05
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 6a0b974 to 59ca59b Compare April 24, 2026 00:56
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 24, 2026

Upstream branch: dd6c438
series: https://patchwork.kernel.org/project/linux-block/list/?series=1081024
version: 1

@blktests-ci blktests-ci Bot force-pushed the series/1081024=>linus-master branch from c6d6d79 to dd615f1 Compare April 24, 2026 01:02
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 59ca59b to 94f0438 Compare April 24, 2026 07:53
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 94f0438 to 857ada9 Compare April 24, 2026 07:54
Christoph Hellwig added 2 commits April 24, 2026 16:57
The write pointer is absolute and in sector units, so we need to
convert it to a relative byte address first.

Fixes: c505448748f7 ("zloop: forget write cache on force removal")
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Damien Le Moal <[email protected]>
While vfs_truncate does various extra checks that we don't really need,
it is always better to use a VFS helper rather than open coding the
logic.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Damien Le Moal <[email protected]>
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 24, 2026

Upstream branch: dd6c438
series: https://patchwork.kernel.org/project/linux-block/list/?series=1081024
version: 1

Christoph Hellwig added 4 commits April 24, 2026 16:57
Use the IS_ALIGNED helper and avoid extra conversions, and tell the
user what the unaligned size is.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Damien Le Moal <[email protected]>
Reduce the dmesg spam for tests that involve device deletion.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Damien Le Moal <[email protected]>
Move a few chunks of duplicated code into helpers.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Damien Le Moal <[email protected]>
All of zloop runs in user context, so drop the irq-safe locking.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Damien Le Moal <[email protected]>
@blktests-ci blktests-ci Bot force-pushed the series/1081024=>linus-master branch from dd615f1 to 2c43412 Compare April 24, 2026 07:57
@blktests-ci blktests-ci Bot force-pushed the linus-master_base branch from 857ada9 to 482ce5b Compare April 29, 2026 02:21
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Apr 29, 2026

Upstream branch: dca922e
series: https://patchwork.kernel.org/project/linux-block/list/?series=1081024
version: 1

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/linux-block/list/?series=1081024
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Applying: zloop: fix write pointer calculation in zloop_forget_cache
Using index info to reconstruct a base tree...
M	drivers/block/zloop.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/block/zloop.c
CONFLICT (content): Merge conflict in drivers/block/zloop.c
Patch failed at 0001 zloop: fix write pointer calculation in zloop_forget_cache'
  stderr: 'error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"'

conflict:

diff --cc drivers/block/zloop.c
index 55eeb6aac0ea,672948d3653e..000000000000
--- a/drivers/block/zloop.c
+++ b/drivers/block/zloop.c
@@@ -1396,8 -1411,7 +1396,12 @@@ static void zloop_forget_cache(struct z
  		if (WARN_ON_ONCE(old_wp == ULLONG_MAX))
  			continue;
  
++<<<<<<< HEAD
 +		vfs_truncate(&file->f_path,
 +			(old_wp - zone->start) << SECTOR_SHIFT);
++=======
+ 		zloop_truncate(file, (old_wp - zone->start) << SECTOR_SHIFT);
++>>>>>>> zloop: fix write pointer calculation in zloop_forget_cache
  	}
  }
  

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.

1 participant