Bug 457884

Summary: submit_bio() should not clear bio flags
Product: Red Hat Enterprise Linux 4 Reporter: sheng.yang <sheng.yang>
Component: kernelAssignee: Jeff Moyer <jmoyer>
Status: CLOSED NOTABUG QA Contact: Martin Jenner <mjenner>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.8   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-18 14:55:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description sheng.yang 2008-08-05 07:37:38 UTC
Description of problem: In the function submit_bio(rw, bio), 
        BIO_BUG_ON(!bio->bi_size);
        BIO_BUG_ON(!bio->bi_io_vec);
        bio->bi_rw = rw; <----This line
        if (rw & WRITE) {
                mod_page_state(pgpgout, count);
        } else {
The bi_rw of bio flag be clear by rw. This will cause problem in some case.

Expected results: Fixed as upstream kernel
@@ -2680,7 +2680,7

         BIO_BUG_ON(!bio->bi_size);
         BIO_BUG_ON(!bio->bi_io_vec);
-        bio->bi_rw = rw;
+        bio->bi_rw |= rw;
         if (rw & WRITE) {
                 mod_page_state(pgpgout, count);
         } else {


Additional info:

Comment 1 Jeff Moyer 2009-02-16 16:02:56 UTC
While I agree that this is upstream and it looks correct, can you at least provide a reason for the change?  Are you running into a problem currently?

Comment 2 sheng.yang 2009-02-18 14:29:27 UTC
(In reply to comment #1)
> While I agree that this is upstream and it looks correct, can you at least
> provide a reason for the change?  Are you running into a problem currently?

After reconsider, we don't think it should be a bug. So it can be closed. 

Thanks.

Comment 3 Jeff Moyer 2009-02-18 14:55:24 UTC
Thank you for the response.  I spoke with the block layer maintainer about this, and he believes that the code change listed above was taken in as part of the move from cfq v2 to v3, which also introduced priorities.  He also said that the change was made in order to pass priorities down.  So, given that we still have the older version of cfq, I'd agree that we don't need the patch.