On 07/04/2016 07:03 AM, Wei Fang wrote:
Theoretically, request only flags in enum rq_flag_bits can bigger than 31 after we add some new flags in the future, so we can't store REQ_IO_STAT in op_flags which is a int type in __get_request(). Actually, when REQ_IO_STAT become 31, the most-significant bit of op_flags will be 1, and OR it to ->cmd_flags will cause the top 32 bits of ->cmd_flags become 1. Fix it by using a u64-type object to store flags.
Why not change op_flags to a 64-bit type, if the flags are already overflowing?
Either that, or we need a BUILD_BUG_ON() for the flags not being > 32 bit. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html