Patchwork image-prelink.bbclass: use the pseudo env var PSEUDO_ALLOW_FSYNC for prelink

login
register
mail settings
Submitter Mark Hatle
Date Nov. 21, 2013, 7:26 p.m.
Message ID <1385061961-4697-1-git-send-email-mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/62175/
State New
Headers show

Comments

Mark Hatle - Nov. 21, 2013, 7:26 p.m.
From: Jackie Huang <jackie.huang@windriver.com>

(Note: this patch is sent for YP compliance, I don't believe it is
 applicable to general oe-core.)

This would actually emit fsync calls, which may fix the do_rootfs failure
on older systems like CentOS 5.x or SuSE 11.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/classes/image-prelink.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Otavio Salvador - Nov. 22, 2013, 1:42 p.m.
On Thu, Nov 21, 2013 at 5:26 PM, Mark Hatle <mark.hatle@windriver.com> wrote:
> From: Jackie Huang <jackie.huang@windriver.com>
>
> (Note: this patch is sent for YP compliance, I don't believe it is
>  applicable to general oe-core.)
>
> This would actually emit fsync calls, which may fix the do_rootfs failure
> on older systems like CentOS 5.x or SuSE 11.
>
> Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>

There're a Yocto bug about this issue, no?
Richard Purdie - Nov. 22, 2013, 1:47 p.m.
On Fri, 2013-11-22 at 11:42 -0200, Otavio Salvador wrote:
> On Thu, Nov 21, 2013 at 5:26 PM, Mark Hatle <mark.hatle@windriver.com> wrote:
> > From: Jackie Huang <jackie.huang@windriver.com>
> >
> > (Note: this patch is sent for YP compliance, I don't believe it is
> >  applicable to general oe-core.)
> >
> > This would actually emit fsync calls, which may fix the do_rootfs failure
> > on older systems like CentOS 5.x or SuSE 11.
> >
> > Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
> > Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> > Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
> > Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> 
> There're a Yocto bug about this issue, no?

There is and its not something we're going to fix in master since the
changes are invasive and likely pointless since its a race problem and
just moves the race. You'd probably have to run fsync after ever single
command just to be safe.

The correct fix is to use an OS with a working filesystem as far as I'm
concerned.

Cheers,

Richard

Patch

diff --git a/meta/classes/image-prelink.bbclass b/meta/classes/image-prelink.bbclass
index 53ef47e..9d7a606 100644
--- a/meta/classes/image-prelink.bbclass
+++ b/meta/classes/image-prelink.bbclass
@@ -21,7 +21,7 @@  prelink_image () {
 	fi
 
 	# prelink!
-	${STAGING_DIR_NATIVE}${sbindir_native}/prelink --root ${IMAGE_ROOTFS} -amR -N -c ${sysconfdir}/prelink.conf
+	PSEUDO_ALLOW_FSYNC=1 ${STAGING_DIR_NATIVE}${sbindir_native}/prelink --root ${IMAGE_ROOTFS} -amR -N -c ${sysconfdir}/prelink.conf
 
 	# Remove the prelink.conf if we had to add it.
 	if [ "$dummy_prelink_conf" = "true" ]; then