param: rename lp function and variable from "syncalways" to "sync_always"
authorGarming Sam <garming@catalyst.net.nz>
Tue, 4 Feb 2014 02:09:12 +0000 (15:09 +1300)
committerJeremy Allison <jra@samba.org>
Sat, 8 Feb 2014 00:19:16 +0000 (16:19 -0800)
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/param/param_functions.c
lib/param/param_table.c
source3/param/loadparm.c
source3/smbd/aio.c
source3/smbd/fileio.c

index ee220ddf40cc7581b698fbfbaeec304e7018b90c..005a75e2be1963d7174487ee32aa866e04e4fb10 100644 (file)
@@ -106,7 +106,7 @@ FN_LOCAL_BOOL(kernel_share_modes, kernel_share_modes)
 FN_LOCAL_BOOL(only_user, only_user)
 FN_LOCAL_PARM_BOOL(mangled_names, mangled_names)
 FN_LOCAL_BOOL(follow_symlinks, follow_symlinks)
-FN_LOCAL_BOOL(syncalways, syncalways)
+FN_LOCAL_BOOL(sync_always, sync_always)
 FN_LOCAL_BOOL(strict_allocate, strict_allocate)
 FN_LOCAL_BOOL(delete_readonly, delete_readonly)
 FN_LOCAL_BOOL(fake_oplocks, fake_oplocks)
index 5c5350258989a72ab85df28fb00b9ffdf5664913..1a02b785c3f0910efc3965c0fbb93c25615b02f5 100644 (file)
@@ -1875,7 +1875,7 @@ static struct parm_struct parm_table[] = {
                .label          = "sync always",
                .type           = P_BOOL,
                .p_class        = P_LOCAL,
-               .offset         = LOCAL_VAR(syncalways),
+               .offset         = LOCAL_VAR(sync_always),
                .special        = NULL,
                .enum_list      = NULL,
                .flags          = FLAG_ADVANCED | FLAG_SHARE,
index c924f438d62d3b344e4275ca69fa6d5cbb48b04a..8413134aaaf8287079e4cb03237e0bb75f1150e3 100644 (file)
@@ -234,7 +234,7 @@ static struct loadparm_service sDefault =
        .mangled_names = true,
        .bWidelinks = false,
        .follow_symlinks = true,
-       .syncalways = false,
+       .sync_always = false,
        .strict_allocate = false,
        .strict_sync = false,
        .mangling_char = '~',
index eec29f664f3379ed54f0144f2c041f5bc7082b1d..9c7c92c91e15b0b3e22b530f40525d80db3a4884 100644 (file)
@@ -371,7 +371,7 @@ static void pwrite_fsync_write_done(struct tevent_req *subreq)
        }
 
        do_sync = (lp_strict_sync(SNUM(conn)) &&
-                  (lp_syncalways(SNUM(conn)) || state->write_through));
+                  (lp_sync_always(SNUM(conn)) || state->write_through));
        if (!do_sync) {
                tevent_req_done(req);
                return;
@@ -512,7 +512,7 @@ NTSTATUS schedule_aio_write_and_X(connection_struct *conn,
        contend_level2_oplocks_begin(fsp, LEVEL2_CONTEND_WRITE);
        contend_level2_oplocks_end(fsp, LEVEL2_CONTEND_WRITE);
 
-       if (!aio_ex->write_through && !lp_syncalways(SNUM(fsp->conn))
+       if (!aio_ex->write_through && !lp_sync_always(SNUM(fsp->conn))
            && fsp->aio_write_behind) {
                /* Lie to the client and immediately claim we finished the
                 * write. */
index 9ac4ae41c16980d95774a31d1ec8e380b8fc86b0..b0da7a2af2f1ba10e76895b4ea320febcd55c706 100644 (file)
@@ -1026,7 +1026,7 @@ NTSTATUS sync_file(connection_struct *conn, files_struct *fsp, bool write_throug
                return NT_STATUS_INVALID_HANDLE;
 
        if (lp_strict_sync(SNUM(conn)) &&
-           (lp_syncalways(SNUM(conn)) || write_through)) {
+           (lp_sync_always(SNUM(conn)) || write_through)) {
                int ret = flush_write_cache(fsp, SAMBA_SYNC_FLUSH);
                if (ret == -1) {
                        return map_nt_error_from_unix(errno);