Re: [PATCH/RFC v6 1/3] lstat_cache(): more cache effective symlink/directory detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kjetil Barvik <barvik@xxxxxxxxxxxx> writes:

> -static inline void set_pathname(int len, const char *name, struct pathname *match)
> +static inline void reset_lstat_cache(void)
>  {
> -	if (len < PATH_MAX) {
> -		match->len = len;
> -		memcpy(match->path, name, len);
> -		match->path[len] = 0;
> -	}
> +	cache.path[0] = '\0';
> +	cache.len = 0;
> +	cache.flags = 0;
>  }

I see you made this internal to the caching code, but I suspect in the
long run there needs to be a way for callers that use the caching
mechanism to check and then create new paths in the work tree to
invalidate the cached code (namely, builtin-apply.c::write_out_results()
and entry.c::checkout_entry() codepaths).

I'll queue this round to 'pu' anyway, though.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux