lkml.org 
[lkml]   [2003]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[BIO] request->flags ambiguity
	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.

--
regards, Samium Gromoff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.033 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site