Mercurial > hg > xemacs-beta
changeset 4500:c86a3c1b7416
Merge.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Wed, 20 Aug 2008 17:36:27 +0200 |
parents | f0c81cd2a959 (current diff) eb82259f265d (diff) |
children | c4fd85dd95bd |
files | src/ChangeLog |
diffstat | 2 files changed, 24 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Sun Aug 10 23:24:15 2008 +0200 +++ b/src/ChangeLog Wed Aug 20 17:36:27 2008 +0200 @@ -1,3 +1,12 @@ +2008-08-09 Aidan Kehoe <kehoea@parhasard.net> + + Integrate Romain Francoise' 2005-09-14 (pre-GPLV3) GNU change, + which can allow much better performace with some stupid + filesystems: + * fileio.c (write_region_inhibit_fsync): New variable. + (Fwrite_region): Use it to skip call to fsync. + (syms_of_fileio): Initialize it. + 2008-08-10 Aidan Kehoe <kehoea@parhasard.net> * objects-xlike-inc.c (charset_table): Remove the entry for
--- a/src/fileio.c Sun Aug 10 23:24:15 2008 +0200 +++ b/src/fileio.c Wed Aug 20 17:36:27 2008 +0200 @@ -111,6 +111,11 @@ Lisp_Object Vdirectory_sep_char; +#ifdef HAVE_FSYNC +/* Nonzero means skip the call to fsync in Fwrite-region. */ +int write_region_inhibit_fsync; +#endif + /* These variables describe handlers that have "already" had a chance to handle the current operation. @@ -3568,7 +3573,7 @@ Disk full in NFS may be reported here. */ /* mib says that closing the file will try to write as fast as NFS can do it, and that means the fsync here is not crucial for autosave files. */ - if (!auto_saving && fsync (desc) < 0 + if (!auto_saving && !write_region_inhibit_fsync && fsync (desc) < 0 /* If fsync fails with EINTR, don't treat that as serious. */ && errno != EINTR) { @@ -4560,6 +4565,15 @@ */ ); Vauto_save_list_file_name = Qnil; +#ifdef HAVE_FSYNC + DEFVAR_BOOL ("write-region-inhibit-fsync", &write_region_inhibit_fsync /* +*Non-nil means don't call fsync in `write-region'. +This variable affects calls to `write-region' as well as save commands. +A non-nil value may result in data loss! +*/ ); + write_region_inhibit_fsync = 0; +#endif + DEFVAR_LISP ("auto-save-list-file-prefix", &Vauto_save_list_file_prefix /* Prefix for generating auto-save-list-file-name. Emacs's pid and the system name will be appended to