mm: Fix a regression where MS_SNAP_STABLE (stable pages snapshotting) was ignored
PATCH 1/1 mm: Fix a regression where MS_SNAP_STABLE (stable pages snapshotting) was ignored
The "force" parameter in __blk_queue_bounce was being ignored, which means that stable page snapshots are not always happening (on ext3). This of course leads to DIF disks reporting checksum errors, so fix this regression.
The regression was introduced in commit 6bc454d1 (bounce: Refactor __blk_queue_bounce to not use bi_io_vec)
--- mm/bounce.c | 2 ++ 1 file changed, 2 insertions(+)
mm/bounce.c +2 -0
@@ -204,6 +204,8 @@ static void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig,struct bio_vec *to, *from;unsigned i; +if (force) + goto bounce;bio_for_each_segment (from, *bio_orig, i)if (page_to_pfn (from->bv_page) >queue_bounce_pfn (q)) goto bounce;
Quoted 6 lines · Darrick J. Wong
The "force" parameter in
__blk_queue_bouncewas being ignored, which means that stable page snapshots are not always happening (on ext3). This of course leads to DIF disks reporting checksum errors, so fix this regression.The regression was introduced in commit
6bc454d1(bounce: Refactor__blk_queue_bounceto not usebi_io_vec)
Should probably add "Cc: [email protected] # v3.10+" no?
Quoted 9 lines · Darrick J. Wong
The "force" parameter in
__blk_queue_bouncewas being ignored, which means that stable page snapshots are not always happening (on ext3). This of course leads to DIF disks reporting checksum errors, so fix this regression.The regression was introduced in commit
6bc454d1(bounce: Refactor__blk_queue_bounceto not usebi_io_vec)Reported-by Mel Gorman <[email protected]>Signed-off-by Darrick J. Wong <[email protected]>
I have no means of testing it but it looks right and thanks for checking DIF disks.
Signature · 2 lines
Mel Gorman SUSE Labs
Quoted 8 lines · Mel Gorman
Quoted 7 lines · Darrick J. Wong
The "force" parameter in
__blk_queue_bouncewas being ignored, which means that stable page snapshots are not always happening (on ext3). This of course leads to DIF disks reporting checksum errors, so fix this regression.The regression was introduced in commit
6bc454d1(bounce: Refactor__blk_queue_bounceto not usebi_io_vec)
Quoted 8 lines
Quoted 2 lines
Reported-by Mel Gorman <[email protected]>Signed-off-by Darrick J. Wong <[email protected]>I have no means of testing it but it looks right and thanks for checking DIF disks.
Acked-by Mel Gorman <[email protected]>
That said the two checks are now redundant. They could just be deleted and depend entirely on the following check within the loop
if (page_to_pfn(page) <= queue_bounce_pfn(q) && !force)
continue;with an update to the comment explaining that the check is for pages below the bounce pfn or for bios that require stable writes
Signature · 2 lines
Mel Gorman SUSE Labs
Quoted 18 lines · Mel Gorman
Quoted 8 lines · Mel Gorman
Quoted 7 lines · Darrick J. Wong
The "force" parameter in
__blk_queue_bouncewas being ignored, which means that stable page snapshots are not always happening (on ext3). This of course leads to DIF disks reporting checksum errors, so fix this regression.The regression was introduced in commit
6bc454d1(bounce: Refactor__blk_queue_bounceto not usebi_io_vec)Quoted 8 lines
Quoted 2 lines
Reported-by Mel Gorman <[email protected]>Signed-off-by Darrick J. Wong <[email protected]>I have no means of testing it but it looks right and thanks for checking DIF disks.
Acked-by Mel Gorman <[email protected]>
Quoted 8 lines
That said the two checks are now redundant. They could just be deleted and depend entirely on the following check within the loop
if (page_to_pfn(page) <= queue_bounce_pfn(q) && !force) continue;with an update to the comment explaining that the check is for pages below the bounce pfn or for bios that require stable writes
I'm under the impression that the point of the first looping-check is to avoid the bio_clone_bioset() if we're not going to bounce anything. But I could be wrong. Maybe Kent can shed some light on this?
--D
Quoted 4 lines
Signature · 3 lines
-- Mel Gorman SUSE Labs
Quoted 25 lines · Darrick J. Wong
Quoted 24 lines · Mel Gorman
Quoted 8 lines · Mel Gorman
Quoted 7 lines · Darrick J. Wong
The "force" parameter in
__blk_queue_bouncewas being ignored, which means that stable page snapshots are not always happening (on ext3). This of course leads to DIF disks reporting checksum errors, so fix this regression.The regression was introduced in commit
6bc454d1(bounce: Refactor__blk_queue_bounceto not usebi_io_vec)Quoted 8 lines
Quoted 2 lines
Reported-by Mel Gorman <[email protected]>Signed-off-by Darrick J. Wong <[email protected]>I have no means of testing it but it looks right and thanks for checking DIF disks.
Acked-by Mel Gorman <[email protected]>That said the two checks are now redundant. They could just be deleted and depend entirely on the following check within the loop
if (page_to_pfn(page) <= queue_bounce_pfn(q) && !force) continue;
Quoted 6 lines
Quoted 2 lines
with an update to the comment explaining that the check is for pages below the bounce pfn or for bios that require stable writes
I'm under the impression that the point of the first looping-check is to avoid the
bio_clone_bioset()if we're not going to bounce anything. But I could be wrong.
I doubt it, avoiding the clone makes sense and I was wrong about the check being redundant anyway. Trying to do the clone within the loop when the first bio that needs bouncing is encountered turns into a mess.
Signature · 2 lines
Mel Gorman SUSE Labs