Re: [U-Boot] [PATCH v2 0/4] Add atomic write to fw_setenv for environments on filesystems
On Fri, Mar 9, 2018 at 12:30 PM, Wolfgang Denkwrote: > Dear Alex, > > In message <1520597582-12979-1-git-send-email-alex.kier...@gmail.com> you > wrote: >> >> For environments stored on filesystems where you can't have a redundant >> configuration, rather than just over-writing the existing environment >> in fw_setenv, do the tradtional create temporary file, rename, sync, >> sync directory dance to achieve ACID semantics when writing through >> fw_setenv. > > I isagree with the statement that we _can't have_ redundant Yeah... sorry, sloppy wording on my part. > environments in a file system. It may not be supported by the > current implementation, but there is actually nothing that would > prevent us to come up with more powerful code that supports exactly > such a feature. > > [This does not mean that I disagree with your patch - on contary, I > think it's good.] > Thanks! -- Alex Kiernan ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/4] Add atomic write to fw_setenv for environments on filesystems
Dear Alex, In message <1520597582-12979-1-git-send-email-alex.kier...@gmail.com> you wrote: > > For environments stored on filesystems where you can't have a redundant > configuration, rather than just over-writing the existing environment > in fw_setenv, do the tradtional create temporary file, rename, sync, > sync directory dance to achieve ACID semantics when writing through > fw_setenv. I isagree with the statement that we _can't have_ redundant environments in a file system. It may not be supported by the current implementation, but there is actually nothing that would prevent us to come up with more powerful code that supports exactly such a feature. [This does not mean that I disagree with your patch - on contary, I think it's good.] Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de A person with one watch knows what time it is; a person with two watches is never sure. Proverb ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2 0/4] Add atomic write to fw_setenv for environments on filesystems
For environments stored on filesystems where you can't have a redundant configuration, rather than just over-writing the existing environment in fw_setenv, do the tradtional create temporary file, rename, sync, sync directory dance to achieve ACID semantics when writing through fw_setenv. fw_env.c has had whitespace modified and HaveRedundEnv renamed in order to avoid triggering large numbers of checkpatch warnings because of the existing code style: warning: space prohibited between function name and open parenthesis '(' check: Avoid CamelCase: Changes in v2: - Clean style violations in existing code - Acommodate white space changes from predecessor commit - Use mkstemp() to create temporary filename, not a fixed one Alex Kiernan (4): tools: env: Pass through indent tools: env: Fix CamelCasing style violation tools: env: Refactor write path of flash_io() tools: env: Implement atomic replace for filesystem tools/env/fw_env.c | 483 +++-- 1 file changed, 281 insertions(+), 202 deletions(-) -- 2.7.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot