From: Jeremy Allison Date: Thu, 27 Apr 2006 13:42:18 +0000 (+0000) Subject: r15293: Don't ever set O_SYNC on open unless "strict sync = yes". X-Git-Tag: samba-4.0.0alpha6~801^2~8545 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec8b810a16e1f08ceb64486be7447e6cf703261d;p=thirdparty%2Fsamba.git r15293: Don't ever set O_SYNC on open unless "strict sync = yes". This could be the cause of the perf. problem reported between 3.0.14a and 3.0.2x. Lufthansa has *wireless* on their flights to the USA now... (I'm in heaven ! :-). Jeremy. (This used to be commit dbc03125f2643f8ecff8e901cb23fa6408cce011) --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index edc5bc98b6e..1c8716abdac 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -1308,7 +1308,7 @@ files_struct *open_file_ntcreate(connection_struct *conn, */ #if defined(O_SYNC) - if (create_options & FILE_WRITE_THROUGH) { + if (lp_strict_sync(SNUM(conn)) && (create_options & FILE_WRITE_THROUGH)) { flags2 |= O_SYNC; } #endif /* O_SYNC */