On Mon, 2019-01-21 at 21:12 -0800, Ashlie Martinez wrote: +AD4 On Mon, Jan 21, 2019 at 9:04 PM Bart Van Assche +ADw-bvanassche+AEA-acm.org+AD4 wrote: +AD4 +AD4 +AD4 +AD4 On 1/21/19 8:45 PM, Ashlie Martinez wrote: +AD4 +AD4 +AD4 I was working on porting parts of a file system crash consistency +AD4 +AD4 +AD4 checking tool called CrashMonkey +AFs-1+AF0 to linux kernels 4.9 and 4.14 +AD4 +AD4 +AD4 when I noticed an inconsistency in how the bio-+AD4-bi+AF8-opf field is +AD4 +AD4 +AD4 treated. According to the comments in /include/linux/blk+AF8-types.h, the +AD4 +AD4 +AD4 REQ+AF8-OP should be the upper bits in bi+AF8-opf, while the request flags +AD4 +AD4 +AD4 should be in the lower bits. In kernel 4.9, the accessor and setter +AD4 +AD4 +AD4 methods for this field appear to be correct. However, kernels 4.10+- do +AD4 +AD4 +AD4 not properly shift the REQ+AF8-OP argument up for either setting it or +AD4 +AD4 +AD4 getting it from bi+AF8-opf. Is this the intended behavior or is it a +AD4 +AD4 +AD4 mistake in how the code was written? Please note that I have not +AD4 +AD4 +AD4 checked all the releases between 4.9 and 5.0-rc3, but I know 4.10, +AD4 +AD4 +AD4 4.14, 4.15, and 5.0-rc3 contain the same or similar code for setting +AD4 +AD4 +AD4 bio-+AD4-bi+AF8-opf. +AD4 +AD4 +AD4 +AD4 Hi Ashlie, +AD4 +AD4 +AD4 +AD4 Are you perhaps referring to commit ef295ecf090d (+ACI-block: better op and +AD4 +AD4 flags encoding+ACI)? Have you noticed that that commit modified the +AD4 +AD4 encoding such that the operation ends up in the lower 8 bits and the +AD4 +AD4 flags in the upper 24 bits? That patch namely includes the following change: +AD4 +AD4 +AD4 +AD4 +-enum req+AF8-flag+AF8-bits +AHs +AD4 +AD4 +- +AF8AXw-REQ+AF8-FAILFAST+AF8-DEV +AD0 /+ACo no driver retries of device errors +ACo-/ +AD4 +AD4 +- REQ+AF8-OP+AF8-BITS, +AD4 +AD4 +AD4 +AD4 Ah, I missed that assignment hiding on the next line (possibly because +AD4 I've been staring at the code for various projects for too long :) ), +AD4 thanks for pointing it out for me+ACE One (minor) nit about the current +AD4 code then: it appears that the comment on bio-+AD4-bi+AF8-opf still refers to +AD4 the old arrangement where the REQ+AF8-OP occupied the upper bits of the +AD4 field, making it hard to figure out what's happening at a glance If you would like to submit a patch that updates the header file comments, I think it would be welcome :-) Bart.