Re: [PATCH 0/5] Remove /var/cache from volatiles directory

Richard Purdie
2013-02-04T12:07:45Z

On Mon, 2013-02-04 at 12:03 +0200, Laurentiu Palcu wrote:
>
> On 02/04/2013 11:46 AM, Mike Looijmans wrote:
> > On 02/04/2013 10:26 AM, Laurentiu Palcu wrote:
> >> > Hi,
> >> >
> >> > Re-generating applications' cache every time the system is rebooted is not a
> >> > very efficient process for an embedded device. Usually, the cache directory is
> >> > used by applications to store data resulting from time consmuming I/O or
> >> > calculation. So, this patchset will take out /var/cache from tmpfs.
> > What if you have a READONLY rootfs? This patch will "break" those
> > devices I think.
> >
> >
>
> Not necessarily. We are trying to have all postinstalls run on host, so
> we don't have to do any postinstall activity on target. Any cache
> generated during postinstall, will be generated at do_rootfs time. Then,
> we can deploy the image with the cache already in place.
>
> Also, on a RO rootfs, there is really no need to update the cache since
> the cached files do not really change. Hence, the cache created on host
> should, in theory, be valid.
>
> If the above logic is missing anything, feel free to correct me.

If this is an issue and something does need to touch the cache
directory, we can mount a unionfs over /var/cache like we're doing
for /var/lib in the readonly rootfs patch series.

Ultimately, I think we're better served with that approach all round.

Cheers,

Richard