Skip to contentSkip to conversation

+ bio-modify-__bio_add_page-to-accept-pages-that-dont-start-a-new-segment-v3.patch added to -mm tree

PATCH [email protected] 1 participant 1 message May 1, 2014 VFS

lore
Share & tools
lore
#0 lore raw

Subject: + bio-modify-__bio_add_page-to-accept-pages-that-dont-start-a-new-segment-v3.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Thu, 01 May 2014 12:50:10 -0700

The patch titled
Subject: bio-modify-__bio_add_page-to-accept-pages-that-dont-start-a-new-segment-v3
has been added to the -mm tree. Its filename is
bio-modify-__bio_add_page-to-accept-pages-that-dont-start-a-new-segment-v3.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/bio-modify-__bio_add_page-to-accept-pages-that-dont-start-a-new-segment-v3.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/bio-modify-__bio_add_page-to-accept-pages-that-dont-start-a-new-segment-v3.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Maurizio Lombardi <[email protected]>
Subject: bio-modify-__bio_add_page-to-accept-pages-that-dont-start-a-new-segment-v3

Changes in V3:

In case of error, V2 restored the previous number of segments but left the BIO_SEG_FLAG set.
To avoid problems, after the page is removed from the bio vec, V3 performs a recount of the segments in the error code path.

Cc Al Viro <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Kent Overstreet <[email protected]>
Cc Jens Axboe <[email protected]>

---

 fs/bio.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
fs/bio.c renamed from fs/bio.c~bio-modify-__bio_add_page-to-accept-pages-that-dont-start-a-new-segment-v3 +0 -3
diff -puN fs/bio.c~bio-modify-__bio_add_page-to-accept-pages-that-dont-start-a-new-segment-v3 fs/bio.c
@@ -699,7 +699,6 @@ static int __bio_add_page(struct request
 			  unsigned int max_sectors)
 {
 	int retried_segments = 0;
-	unsigned int bi_phys_segments_orig;
 	struct bio_vec *bvec;
 
 	/*
@@ -759,7 +758,6 @@ static int __bio_add_page(struct request
 	bvec->bv_len = len;
 	bvec->bv_offset = offset;
 	bio->bi_vcnt++;
-	bi_phys_segments_orig = bio->bi_phys_segments;
 	bio->bi_phys_segments++;
 
 	/*
@@ -810,8 +808,7 @@ static int __bio_add_page(struct request
 	bvec->bv_len = 0;
 	bvec->bv_offset = 0;
 	bio->bi_vcnt--;
-	bio->bi_phys_segments = bi_phys_segments_orig;