Re: [PATCH v3 06/24] read-cache: Don't compare uid, gid and ino on cygwin

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

 



On 18/08/2013 08:41 PM, Thomas Gummerer wrote:
> Cygwin doesn't have uid, gid and ino stats fields.  Therefore we should
> never check them in the match_stat_data when working on the CYGWIN
> platform.

Hmm, this is simply not true ... ;-)

The need to omit the uid, gid and ino fields from the stat checks in
your original code was caused by the "schizophrenic stat" implementation
in cygwin. (This was also before "core.checkstat" was implemented; note
the 'check_stat' conditional below ...)

However, since commit f66450ae ("cygwin: Remove the Win32 l/stat()
implementation", 22-06-2013), this patch is no longer necessary and
can simply be dropped from this series.

[I have not had time to read your new patches yet, but I seem to remember
being concerned about those platforms which have UNRELIABLE_FSTAT set.
(ie cygwin, MinGW and Windows.)]

ATB,
Ramsay Jones

> Signed-off-by: Thomas Gummerer <t.gummerer@xxxxxxxxx>
> ---
> 
> This patch was not tested on Cygwin yet.  I think it's needed though,
> because the re-reading of the index if it changed will no longer use
> it's own index_changed function, but use the stat_validity_check
> function instead.  Would be great if someone running Cygwin could test
> this.
> 
>  read-cache.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/read-cache.c b/read-cache.c
> index 1f827de..aa17ce7 100644
> --- a/read-cache.c
> +++ b/read-cache.c
> @@ -82,6 +82,7 @@ int match_stat_data(const struct stat_data *sd, struct stat *st)
>  		changed |= CTIME_CHANGED;
>  #endif
>  
> +#if !defined (__CYGWIN__)
>  	if (check_stat) {
>  		if (sd->sd_uid != (unsigned int) st->st_uid ||
>  			sd->sd_gid != (unsigned int) st->st_gid)
> @@ -89,6 +90,7 @@ int match_stat_data(const struct stat_data *sd, struct stat *st)
>  		if (sd->sd_ino != (unsigned int) st->st_ino)
>  			changed |= INODE_CHANGED;
>  	}
> +#endif
>  
>  #ifdef USE_STDEV
>  	/*
> 

--
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]