Skip to contentSkip to conversation

mm: Fix a regression where MS_SNAP_STABLE (stable pages snapshotting) was ignored

PATCH In review Darrick J. Wong 3 participants 6 messages Sep 20, 2013 – Sep 24, 2013 Memory management

lore
Share & tools
lore
#0 lore raw

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
index c9f0a43..5a7d58f 100644
@@ -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;
#1 lore raw
Quoted 6 lines · Darrick J. Wong

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)

Should probably add "Cc: [email protected] # v3.10+" no?

Acked-by on v1 1/1
#2 lore raw
In reply to Darrick J. Wong
Quoted 9 lines · Darrick J. Wong

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)

I have no means of testing it but it looks right and thanks for checking DIF disks.

Signature · 2 lines
Mel Gorman
SUSE Labs
#3 lore raw
Quoted 8 lines · Mel Gorman
Quoted 7 lines · Darrick J. Wong

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)

Quoted 8 lines
Quoted 2 lines

I have no means of testing it but it looks right and thanks for checking DIF disks.

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
#4 lore raw
Quoted 18 lines · Mel Gorman
Quoted 8 lines · Mel Gorman
Quoted 7 lines · Darrick J. Wong

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)

Quoted 8 lines
Quoted 2 lines

I have no means of testing it but it looks right and thanks for checking DIF disks.

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
#5 lore raw
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_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)

Quoted 8 lines
Quoted 2 lines

I have no means of testing it but it looks right and thanks for checking DIF disks.

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