From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Michael Arndt <michael@rndt.dev>,
openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] sstate: Add fallback when hardlink fails
Date: Wed, 15 Apr 2026 14:07:06 +0100 [thread overview]
Message-ID: <7ed13b9dbb647c03834694d6104be8bce6b87876.camel@linuxfoundation.org> (raw)
In-Reply-To: <bdc53821-842b-4dbc-a9d8-00270b864280@rndt.dev>
On Wed, 2026-04-15 at 13:52 +0200, Michael Arndt wrote:
> Hello Richard,
>
> > The challenge is that the sstate directory is shared, so two builds can
> > write to the same file at the same time. Our policy is "first wins" and
> > anything later is just skipped. The code also needs to make sure that
> > if the sstate file is written, the paired signature matches.
>
> Thanks for taking a look at my change. I guess then there is no simple
> fix for the problem, because checking if the file exists and replacing
> it must be a single atomic operation. Without hardlinks that is a problem.
>
> > Generic try/except cases are almost always a red flag in general.
>
> Agreed, that was also the reason why I was surprised that my sstate
> didn't work. The existing code already swallows the IOException from
> os.link so you don't see the error about the missing hardlink support.
>
> I guess I will have to use a different file system, but thanks anyway.
If you can catch a specific exception about it being not supported, we
could at least show that to the user and fail. I noticed there are
other generic try/except blocks in there which could probably be
improved.
This is pretty core/key code which we've had challenges with in the
past though and it does need to work simply/reliably!
Cheers,
Richard
next prev parent reply other threads:[~2026-04-15 13:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-15 8:58 [PATCH] sstate: Add fallback when hardlink fails Michael Arndt
2026-04-15 9:29 ` [OE-core] " Richard Purdie
2026-04-15 11:52 ` Michael Arndt
2026-04-15 13:07 ` Richard Purdie [this message]
2026-04-15 14:43 ` Michael Arndt
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=7ed13b9dbb647c03834694d6104be8bce6b87876.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=michael@rndt.dev \
--cc=openembedded-core@lists.openembedded.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox