Searched defs:lock (Results 1 - 21 of 21) sorted by relevance

/dovecot/src/auth/
H A Dmech-otp-skey-common.h9 bool lock; member in struct:otp_auth_request
/dovecot/src/lib/
H A Dtest-file-create-locked.c48 struct file_lock *lock; local
65 fd = file_create_locked(path, &set, &lock, &created, &error);
79 test_assert(file_create_locked(path, &set, &lock, &created, &error) == -1);
97 struct file_lock *lock; local
110 test_assert(file_create_locked(path, &set, &lock, &created, &error) == -1);
115 fd = file_create_locked(path, &set, &lock, &created, &error);
125 file_lock_free(&lock);
H A Dfile-lock.c5 #include "file-lock.h"
31 static void file_lock_log_warning_if_slow(struct file_lock *lock);
88 return t_strdup_printf(" (%s lock held by pid %ld)",
140 return " (BUG: lock is held by our own process)";
141 return t_strdup_printf(" (%s lock held by pid %ld)", lock_type, (long)pid);
186 (lock_type == F_RDLCK ? "read-lock" : "write-lock");
192 "Can't lock file %s: fcntl() locks not supported", path);
239 "Can't lock file %s: flock() not supported", path);
315 struct file_lock *lock; local
333 file_lock_try_update(struct file_lock *lock, int lock_type) argument
347 file_lock_set_unlink_on_free(struct file_lock *lock, bool set) argument
352 file_lock_set_close_on_free(struct file_lock *lock, bool set) argument
359 struct file_lock *lock; local
374 file_unlock_real(struct file_lock *lock) argument
387 struct file_lock *lock = *_lock; local
401 file_try_unlink_locked(struct file_lock *lock) argument
434 struct file_lock *lock = *_lock; local
453 file_lock_get_path(struct file_lock *lock) argument
458 file_lock_set_path(struct file_lock *lock, const char *path) argument
493 file_lock_log_warning_if_slow(struct file_lock *lock) argument
[all...]
/dovecot/src/lib-index/
H A Dmail-cache-decisions.c159 struct mail_cache_compress_lock *lock = NULL; local
173 (void)mail_cache_compress(dst, itrans, &lock);
174 if (lock != NULL)
175 mail_cache_compress_unlock(&lock);
H A Dmail-cache-compress.c445 b) Cache doesn't exist or is unusable. There's no lock.
446 Because the cache lock itself is unreliable, we'll be using a
566 struct mail_cache_compress_lock *lock = *_lock; local
570 if (lock->dotlock != NULL)
571 file_dotlock_delete(&lock->dotlock);
572 i_free(lock);
H A Dmail-cache-transaction.c175 struct mail_cache_compress_lock *lock; local
186 if (mail_cache_compress(cache, trans, &lock) < 0) {
191 if (lock != NULL)
192 mail_cache_compress_unlock(&lock);
/dovecot/src/lib-storage/index/
H A Dindex-rebuild.c238 struct mail_cache_compress_lock *lock = NULL; local
243 (void)mail_cache_compress(ctx->box->cache, ctx->trans, &lock);
244 if (lock != NULL) {
249 mail_cache_compress_unlock(&lock);
H A Dindex-mailbox-size.c22 Expunging mails: Check if syncing would expunge any mails. If so, lock the
32 which internally is the same as a sync lock. So to avoid deadlocks we always
33 need to lock vsize updates before sync.
36 #define VSIZE_LOCK_SUFFIX "dovecot-vsize.lock"
47 struct file_lock *lock; member in struct:mailbox_vsize_update
129 if (update->lock != NULL)
137 &update->lock, &error);
139 /* don't log lock timeouts, because we're somewhat expecting
226 if (update->lock != NULL || update->rebuild)
228 file_lock_free(&update->lock);
[all...]
H A Dindex-sync-pvt.c125 int index_mailbox_sync_pvt_init(struct mailbox *box, bool lock, argument
138 if (lock) {
/dovecot/src/lib-storage/
H A Dmail-autoexpunge.c11 #define AUTOEXPUNGE_LOCK_FNAME "dovecot.autoexpunge.lock"
14 mailbox_autoexpunge_lock(struct mail_user *user, struct file_lock **lock) argument
19 if (*lock != NULL)
22 /* Try to lock the autoexpunging. If the lock already exists, another
24 The easiest place where to store the lock file to is the home
26 it. The lock isn't really required; it 1) improves performance
31 0, lock, &error);
33 i_error("autoexpunge: Couldn't create %s lock: %s",
180 mail_namespace_autoexpunge(struct mail_namespace *ns, struct file_lock **lock, argument
215 struct file_lock *lock = NULL; local
[all...]
H A Dmailbox-list-private.h127 struct file_lock *lock; member in struct:mailbox_list
/dovecot/src/lib-storage/index/dbox-common/
H A Ddbox-file.h110 struct file_lock *lock; member in struct:dbox_file
112 struct dotlock *lock; member in struct:dbox_file
152 /* Try to lock the dbox file. Returns 1 if ok, 0 if already locked by someone
/dovecot/src/lib-fs/
H A Dfs-test.c200 static void fs_test_unlock(struct fs_lock *lock) argument
202 struct test_fs_file *file = (struct test_fs_file *)lock->file;
205 i_free(lock);
H A Dfs-api-private.h56 int (*lock)(struct fs_file *file, unsigned int secs, member in struct:fs_vfuncs
58 void (*unlock)(struct fs_lock *lock);
H A Dfs-posix.c12 #include "file-lock.h"
55 struct fs_lock lock; member in struct:posix_fs_lock
96 if (strcmp(arg, "lock=flock") == 0)
98 else if (strcmp(arg, "lock=dotlock") == 0)
614 fs_lock.lock.file = _file;
659 *lock_r = &ret_lock->lock;
665 struct posix_fs_lock *lock = (struct posix_fs_lock *)_lock; local
667 if (lock->file_lock != NULL)
668 file_unlock(&lock->file_lock);
669 if (lock
[all...]
H A Dfs-api.c876 ret = file->fs->v.lock(file, secs, lock_r);
883 struct fs_lock *lock = *_lock; local
887 lock->file->fs->v.unlock(lock);
/dovecot/src/lib-storage/index/mbox/
H A Dmbox-lock.c12 #include "mbox-lock.h"
98 const char *const *lock; local
101 for (lock = t_strsplit(str, " "), dest = 0; *lock != NULL; lock++) {
103 if (strcasecmp(*lock, lock_data[type].name) == 0) {
109 i_fatal("%s: Invalid value %s", env, *lock);
111 i_fatal("%s: Support for lock type %s "
112 "not compiled into binary", env, *lock);
117 i_fatal("%s: Duplicated value %s", env, *lock);
[all...]
/dovecot/src/doveadm/dsync/
H A Ddsync-brain-mailbox.c130 struct file_lock *lock,
141 brain->box_lock = lock;
476 struct file_lock *lock = NULL; local
509 file_lock_free(&lock);
528 file_lock_free(&lock);
538 if (dsync_mailbox_lock(brain, box, &lock) < 0) {
549 file_lock_free(&lock);
556 *lock_r = lock;
580 struct file_lock *lock; local
585 if (!dsync_brain_next_mailbox(brain, &box, &lock,
128 dsync_brain_sync_mailbox_init(struct dsync_brain *brain, struct mailbox *box, struct file_lock *lock, const struct dsync_mailbox *local_dsync_box, bool wait_for_remote_box) argument
774 struct file_lock *lock; local
[all...]
H A Ddsync-brain-private.h9 #define DSYNC_LOCK_FILENAME ".dovecot-sync.lock"
10 #define DSYNC_MAILBOX_LOCK_FILENAME ".dovecot-box-sync.lock"
73 struct file_lock *lock; member in struct:dsync_brain
/dovecot/src/lib-dict/
H A Ddict-file.c11 #include "file-lock.h"
75 if (strcmp(p, "lock=fcntl") == 0)
77 else if (strcmp(p, "lock=flock") == 0)
517 struct file_lock *lock = NULL; local
530 if (file_dict_lock(dict, &lock, error_r) < 0)
537 file_unlock(&lock);
566 file_unlock(&lock);
613 file_unlock(&lock);
617 file_lock_free(&lock);
/dovecot/src/doveadm/
H A Ddoveadm-dsync.c97 bool lock:1; member in struct:dsync_cmd_context
1060 ctx->lock = TRUE;

Completed in 1045 milliseconds