Re: [U-Boot] [PATCH] tools/fw_env: use fsync to ensure that data is physically stored

2017-07-14 Thread Vincent Prince
For completness, here is the original post url : https://patchwork.ozlabs.org/patch/245097/ https://lists.denx.de/pipermail/u-boot/2013-May/154752.html 2017-07-13 15:11 GMT+02:00 Vincent Prince : > Hi all, > > We had the same issue on our custom board, and this

[U-Boot] [PATCH] tools/fw_env: use fsync to ensure that data is physically stored

2017-07-13 Thread Vincent Prince
Hi all, We had the same issue on our custom board, and this patch fixed it. We use fw_setenv for updating our BSP, and before the patch, 100 boards over 170 didn't work, and after, 170/170 did get the update. This patches worked well for us, Thanks Michael

Re: [U-Boot] [PATCH] tools/fw_env: use fsync to ensure that data is physically stored

2013-05-22 Thread Mats Kärrman
Hi Michael, Michael Heimpold [m...@heimpold.de] wrote: fw_setenv state=2 dd if=... of=/dev/mmcblk0... fw_setenv state=1 How about: fw_setenv state 1 sync BR // Mats ___ U-Boot mailing list U-Boot@lists.denx.de

Re: [U-Boot] [PATCH] tools/fw_env: use fsync to ensure that data is physically stored

2013-05-22 Thread Mark Jackson
On 21/05/13 18:34, Michael Heimpold wrote: Hi Wolfgang Denx, Closing a file descriptor does not guarantee that the data has been successfully saved to disk, as the kernel might defer the write. What is the exact problem you are trying to fix? I mean, when exactly does adding the sync play

Re: [U-Boot] [PATCH] tools/fw_env: use fsync to ensure that data is physically stored

2013-05-22 Thread Michael Heimpold
Hi, ... fw_setenv state=2 dd if=... of=/dev/mmcblk0... fw_setenv state=1 ... reboot Not sure what final OS environment you're running, but I would think that reboot would sync for you ? I'm using OpenWRT and reboot links to the busybox implementation. This implemenetation calls

Re: [U-Boot] [PATCH] tools/fw_env: use fsync to ensure that data is physically stored

2013-05-21 Thread Wolfgang Denk
Dear Michael Heimpold, In message 1369078482-5863-1-git-send-email-m...@heimpold.de you wrote: Closing a file descriptor does not guarantee that the data has been successfully saved to disk, as the kernel might defer the write. What is the exact problem you are trying to fix? I mean, when

Re: [U-Boot] [PATCH] tools/fw_env: use fsync to ensure that data is physically stored

2013-05-21 Thread Michael Heimpold
Hi Wolfgang Denx, Closing a file descriptor does not guarantee that the data has been successfully saved to disk, as the kernel might defer the write. What is the exact problem you are trying to fix? I mean, when exactly does adding the sync play a role? I'm using fw_setenv during

[U-Boot] [PATCH] tools/fw_env: use fsync to ensure that data is physically stored

2013-05-20 Thread Michael Heimpold
Closing a file descriptor does not guarantee that the data has been successfully saved to disk, as the kernel might defer the write. Signed-off-by: Michael Heimpold m...@heimpold.de --- tools/env/fw_env.c | 12 1 file changed, 12 insertions(+) diff --git a/tools/env/fw_env.c