From: Jens Axboe <axboe@kernel.dk>
To: Wei Fang <fangwei1@huawei.com>
Cc: linux-block@vger.kernel.org
Subject: Re: [PATCH] block: fix a type conversion error in __get_request()
Date: Tue, 5 Jul 2016 11:33:41 -0600 [thread overview]
Message-ID: <577BEF75.7010208@kernel.dk> (raw)
In-Reply-To: <1467637420-4967-1-git-send-email-fangwei1@huawei.com>
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
next prev parent reply other threads:[~2016-07-05 17:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-04 13:03 [PATCH] block: fix a type conversion error in __get_request() Wei Fang
2016-07-05 17:33 ` Jens Axboe [this message]
2016-07-06 2:05 ` Wei Fang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=577BEF75.7010208@kernel.dk \
--to=axboe@kernel.dk \
--cc=fangwei1@huawei.com \
--cc=linux-block@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.