Skip to contentSkip to conversation

request->flags ambiguity

BIO Samium Gromoff 2 participants 4 messages Jun 27, 2003

lore
Share & tools
lore
#0 lore raw

I might just be completely off base, but something struck me lately as odd, and i`d like to hear what you folks think about the issue.

I`m wondering about the ambiguity of the struct request->flags field.

Is it ok to have a possibility of a request with conflicting meanings attached to it? For example REQ_CMD | REQ_PM_SHUTDOWN | REQ_SPECIAL.

It may be, depending on the implementation, that they are not completely conflicting, but its hard to believe that there is zero ambiguity at all.

If i`m not mistaken this looks as creating opportunities for various subtle bugs.

Shouldn`t it make more sense to separate request-type-indicator flags into a separate unambiguous type field, which would take one of the following values:
- read/write request
- sense query
- power control
- special request

And not a currently possible combination of all of them, which seem to be the current situation.

Signature · 1 line
regards, Samium Gromoff
#1 lore raw
Quoted 10 lines · Samium Gromoff

I might just be completely off base, but something struck me lately as odd, and i`d like to hear what you folks think about the issue.

I`m wondering about the ambiguity of the struct request->flags field.

Is it ok to have a possibility of a request with conflicting meanings attached to it? For example REQ_CMD | REQ_PM_SHUTDOWN | REQ_SPECIAL.

No of course not.

Quoted 7 lines

It may be, depending on the implementation, that they are not completely conflicting, but its hard to believe that there is zero ambiguity at all.

If i`m not mistaken this looks as creating opportunities for various subtle bugs.

Quoted 7 lines

Shouldn`t it make more sense to separate request-type-indicator flags into a separate unambiguous type field, which would take one of the following values: - read/write request - sense query
- power control - special request

And not a currently possible combination of all of them, which seem to be the current situation.

There has been talk of that before, search the archives.

Signature · 1 line
Jens Axboe
#2 lore raw

On Fri, 27 Jun 2003 12:48:22 +0200
Jens Axboe <[email protected]> wrote:
-- snip --

Quoted 5 lines
Quoted 3 lines

Is it ok to have a possibility of a request with conflicting meanings attached to it? For example REQ_CMD | REQ_PM_SHUTDOWN | REQ_SPECIAL.

No of course not.

-- snip --

Quoted 9 lines
Quoted 7 lines

Shouldn`t it make more sense to separate request-type-indicator flags into a separate unambiguous type field, which would take one of the following values: - read/write request - sense query
- power control - special request

And not a currently possible combination of all of them, which seem to be the current situation.

There has been talk of that before, search the archives.

Umm, ive tried and failed, couldnt you share some vague pointers about the topic
or something?

I`m sorry, but my curiosity prevailed over hesitation to bother you :-)

Quoted 5 lines
Signature · 2 lines
-- 
Jens Axboe

--
regards, Samium Gromoff

#3 lore raw
Quoted 14 lines · Samium Gromoff

On Fri, 27 Jun 2003 12:48:22 +0200
Jens Axboe <[email protected]> wrote:
-- snip --

Quoted 5 lines
Quoted 3 lines

Is it ok to have a possibility of a request with conflicting meanings attached to it? For example REQ_CMD | REQ_PM_SHUTDOWN | REQ_SPECIAL.

No of course not.

-- snip --

Quoted 5 lines
Quoted 5 lines

Shouldn`t it make more sense to separate request-type-indicator flags into a separate unambiguous type field, which would take one of the following values: - read/write request - sense query
- power control - special request

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

And not a currently possible combination of all of them, which seem to be the current situation.

There has been talk of that before, search the archives.

Umm, ive tried and failed, couldnt you share some vague pointers about the topic or something?

Some pointers here

http://marc.theaimsgroup.com/?l=linux-kernel&m=105482104321668&w=2

Signature · 1 line
Jens Axboe