This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 457884 - submit_bio() should not clear bio flags
submit_bio() should not clear bio flags
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.8
All Linux
medium Severity medium
: rc
: ---
Assigned To: Jeff Moyer
Martin Jenner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-05 03:37 EDT by sheng.yang
Modified: 2009-02-18 09:55 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-18 09:55:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description sheng.yang 2008-08-05 03:37:38 EDT
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 11:02:56 EST
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 09:29:27 EST
(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 09:55:24 EST
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.

Note You need to log in before you can comment on or make changes to this bug.