aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/fileio.c14
2 files changed, 19 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 7ec41e85fe2..e10e4e07c78 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12005-09-14 Romain Francoise <romain@orebokech.com>
2
3 * fileio.c (write_region_inhibit_fsync): New variable.
4 (Fwrite_region): Use it to skip call to fsync.
5 (syms_of_fileio): Initialize it.
6
12005-09-14 Kenichi Handa <handa@m17n.org> 72005-09-14 Kenichi Handa <handa@m17n.org>
2 8
3 * coding.c (code_convert_region_unwind): Argument format changed. 9 * coding.c (code_convert_region_unwind): Argument format changed.
diff --git a/src/fileio.c b/src/fileio.c
index cd4eaa800fd..70d89331764 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -225,6 +225,11 @@ int vms_stmlf_recfm;
225 expanding file names. This can be bound to / or \. */ 225 expanding file names. This can be bound to / or \. */
226Lisp_Object Vdirectory_sep_char; 226Lisp_Object Vdirectory_sep_char;
227 227
228#ifdef HAVE_FSYNC
229/* Nonzero means skip the call to fsync in Fwrite-region. */
230int write_region_inhibit_fsync;
231#endif
232
228extern Lisp_Object Vuser_login_name; 233extern Lisp_Object Vuser_login_name;
229 234
230#ifdef WINDOWSNT 235#ifdef WINDOWSNT
@@ -5296,7 +5301,7 @@ This does code conversion according to the value of
5296 Disk full in NFS may be reported here. */ 5301 Disk full in NFS may be reported here. */
5297 /* mib says that closing the file will try to write as fast as NFS can do 5302 /* mib says that closing the file will try to write as fast as NFS can do
5298 it, and that means the fsync here is not crucial for autosave files. */ 5303 it, and that means the fsync here is not crucial for autosave files. */
5299 if (!auto_saving && fsync (desc) < 0) 5304 if (!auto_saving && !write_region_inhibit_fsync && fsync (desc) < 0)
5300 { 5305 {
5301 /* If fsync fails with EINTR, don't treat that as serious. */ 5306 /* If fsync fails with EINTR, don't treat that as serious. */
5302 if (errno != EINTR) 5307 if (errno != EINTR)
@@ -6742,6 +6747,13 @@ shortly after Emacs reads your `.emacs' file, if you have not yet given it
6742a non-nil value. */); 6747a non-nil value. */);
6743 Vauto_save_list_file_name = Qnil; 6748 Vauto_save_list_file_name = Qnil;
6744 6749
6750#ifdef HAVE_FSYNC
6751 DEFVAR_BOOL ("write-region-inhibit-fsync", &write_region_inhibit_fsync,
6752 doc: /* *Non-nil means don't call fsync after saving files.
6753Enabling this variable may result in data loss! */);
6754 write_region_inhibit_fsync = 0;
6755#endif
6756
6745 defsubr (&Sfind_file_name_handler); 6757 defsubr (&Sfind_file_name_handler);
6746 defsubr (&Sfile_name_directory); 6758 defsubr (&Sfile_name_directory);
6747 defsubr (&Sfile_name_nondirectory); 6759 defsubr (&Sfile_name_nondirectory);