name cache: lookup returns flag is_negative
added function entry_invis() in addition to entry_has_expired(). entry_invis() returns true if entry_has_expired() or for negative entries. the is_negative flag is set for negative entries (defined as having entry->attributes == NULL), and returned by nfs41_name_cache_lookup(). when nfs41_lookup() sees this flag set, it returns the status without attempting to do any more lookups Signed-off-by: Casey Bodley <cbodley@umich.edu>
This commit is contained in:
parent
55ff9d855d
commit
112313bc45
3 changed files with 39 additions and 21 deletions
|
|
@ -427,6 +427,7 @@ int nfs41_lookup(
|
|||
nfs41_path_fh parent, target, *server_start;
|
||||
const char *path_pos, *path_end;
|
||||
struct lookup_referral referral;
|
||||
bool_t negative = 0;
|
||||
int status;
|
||||
|
||||
if (session_out) *session_out = session;
|
||||
|
|
@ -448,10 +449,9 @@ int nfs41_lookup(
|
|||
if (target_out == NULL) target_out = ⌖
|
||||
parent_out->fh.len = target_out->fh.len = 0;
|
||||
|
||||
status = nfs41_name_cache_lookup(cache,
|
||||
path_pos, path_end, &path_pos,
|
||||
&parent_out->fh, &target_out->fh, info_out);
|
||||
if (status == NO_ERROR)
|
||||
status = nfs41_name_cache_lookup(cache, path_pos, path_end, &path_pos,
|
||||
&parent_out->fh, &target_out->fh, info_out, &negative);
|
||||
if (status == NO_ERROR || negative)
|
||||
goto out;
|
||||
|
||||
if (target_out->fh.len) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue