Commit ba4bba6c authored by NeilBrown's avatar NeilBrown Committed by Chuck Lever

SUNRPC: change cache_head.flags bits to enum

When a sequence of numbers are needed for internal-use only, an enum is
typically best.  The sequence will inevitably need to be changed one
day, and having an enum means the developer doesn't need to think about
renumbering after insertion or deletion.  Such patches will be easier
to review.
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent c743b425
......@@ -56,10 +56,14 @@ struct cache_head {
struct kref ref;
unsigned long flags;
};
#define CACHE_VALID 0 /* Entry contains valid data */
#define CACHE_NEGATIVE 1 /* Negative entry - there is no match for the key */
#define CACHE_PENDING 2 /* An upcall has been sent but no reply received yet*/
#define CACHE_CLEANED 3 /* Entry has been cleaned from cache */
/* cache_head.flags */
enum {
CACHE_VALID, /* Entry contains valid data */
CACHE_NEGATIVE, /* Negative entry - there is no match for the key */
CACHE_PENDING, /* An upcall has been sent but no reply received yet*/
CACHE_CLEANED, /* Entry has been cleaned from cache */
};
#define CACHE_NEW_EXPIRY 120 /* keep new things pending confirmation for 120 seconds */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment