All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "René Scharfe" <l.s.r@web.de>
Cc: "Nikolay Avdeev" <avdeev@math.vsu.ru>,
	git@vger.kernel.org, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: Re: Bug report about symlinks
Date: Mon, 04 Aug 2014 09:34:49 -0700	[thread overview]
Message-ID: <xmqqbns0tdqu.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <53DEBEE7.6070009@web.de> ("René Scharfe"'s message of "Mon, 04 Aug 2014 00:59:51 +0200")

René Scharfe <l.s.r@web.de> writes:

> Am 03.08.2014 um 19:19 schrieb Junio C Hamano:
>
>>> And do we need to use the threaded_ variant of the function here?
>>
>> Hmmm, this is a tangent, but you comment made me wonder if we also
>> need to adjust preload_thread() in preload-index.c somehow, but we
>> do not touch CE_UPTODATE there, so it probably is not necessary.
>
> The function calls ce_mark_uptodate(), which does set CE_UPTODATE.  It
> calls threaded_has_symlink_leading_path() before lstat() already,
> however.  (Since f62ce3de: Make index preloading check the whole path
> to the file.)

Yeah, by "we do not touch", I meant "for paths that is beyond a
symlink, we do not touch" (i.e. we have that "continue" before
lstat-match-then-mark sequence).

>> The caller of refresh_cache_ent() is walking an array of sorted
>> pathnames aka istate->cache[] in a single-threaded fashion, possibly
>> with a pathspec to limit the scan.
>
> There are two direct callers (refresh_index(), refresh_cache_entry())
> and several indirect ones.  Do we have a way to detect unsynchronized
> parallel access to the has_symlink_leading_path()-cache?  Checking the
> full callers-of-callers tree manually looks a bit scary to me.

The threaded variant is not used anybody outside preload-index, so
currently we should be OK, I would think.

  reply	other threads:[~2014-08-04 16:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-31 19:50 Bug report about symlinks Nikolay Avdeev
2014-07-31 22:04 ` René Scharfe
2014-08-01 16:23   ` Junio C Hamano
2014-08-02 14:10     ` René Scharfe
2014-08-03 17:19       ` Junio C Hamano
2014-08-03 22:59         ` René Scharfe
2014-08-04 16:34           ` Junio C Hamano [this message]
2014-08-09 17:43             ` [PATCH] read-cache: check for leading symlinks when refreshing index René Scharfe
2014-08-04 11:03         ` Bug report about symlinks Duy Nguyen
2014-08-04 16:36           ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2014-07-30 11:30 NickKolok
2014-08-01 19:10 ` Dennis Kaarsemaker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqbns0tdqu.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=avdeev@math.vsu.ru \
    --cc=git@vger.kernel.org \
    --cc=l.s.r@web.de \
    --cc=pclouds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.