summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* s3: VFS: Complete the replacement of SMB_VFS_LINK() -> SMB_VFS_LINKAT().Jeremy Allison2019-08-208-63/+1
| | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Aug 20 22:26:17 UTC 2019 on sn-devel-184
* s3: VFS: vfs_time_audit. Remove link_fn(). No longer used.Jeremy Allison2019-08-201-22/+0
| | | | | | | | NB, this will now fail smb_vfs_assert_all_fns() until we remove the rename_fn() from the VFS definitions. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: vfs_full_audit. Remove link_fn(). No longer used.Jeremy Allison2019-08-201-15/+0
| | | | | | | | NB, this will now fail smb_vfs_assert_all_fns() until we remove the rename_fn() from the VFS definitions. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: vfs_unityed_media. Remove link_fn(). No longer used.Jeremy Allison2019-08-201-34/+0
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: vfs_syncops. Remove link_fn(). No longer used.Jeremy Allison2019-08-201-20/+0
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: vfs_snapper. Remove link_fn(). No longer used.Jeremy Allison2019-08-201-29/+0
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: vfs_shadow_copy2. Remove link_fn(). No longer used.Jeremy Allison2019-08-201-42/+0
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: vfs_media_harmony. Remove link_fn(). No longer used.Jeremy Allison2019-08-201-41/+0
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: vfs_glusterfs. Remove link_fn(). No longer used.Jeremy Allison2019-08-201-16/+0
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: vfs_ceph_snapshots. Remove link_fn(). No longer used.Jeremy Allison2019-08-201-32/+0
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: vfs_ceph. Remove link_fn(). No longer used.Jeremy Allison2019-08-201-16/+0
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: vfs_cap. Remove link_fn(). No longer used.Jeremy Allison2019-08-201-53/+0
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: smbd: Make hardlink_internals() call SMB_VFS_LINKAT() instead of ↵Jeremy Allison2019-08-201-1/+9
| | | | | | | | | | | SMB_VFS_LINK() Use conn->cwd_fsp as current src and dst fsp's. No logic change for now. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: torture: Change cmd_link to call SMB_VFS_LINKAT().Jeremy Allison2019-08-201-1/+8
| | | | | | | | | Use conn->cwd_fsp as current src and dst fsp's. No logic change for now. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: vfs_unityed_media. Implement linkat().Jeremy Allison2019-08-201-0/+47
| | | | | | | Currently identical to link(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: vfs_time_audit. Implement linkat().Jeremy Allison2019-08-201-0/+31
| | | | | | | Currently identical to link(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: vfs_syncops. Implement linkat().Jeremy Allison2019-08-201-0/+33
| | | | | | | Currently identical to link(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: vfs_snapper. Implement linkat().Jeremy Allison2019-08-201-0/+37
| | | | | | | Currently identical to link(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: vfs_shadow_copy2. Implement linkat().Jeremy Allison2019-08-201-0/+50
| | | | | | | Currently identical to link(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: vfs_media_harmony. Implement linkat().Jeremy Allison2019-08-201-0/+53
| | | | | | | Currently identical to link(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: vfs_glusterfs. Implement linkat().Jeremy Allison2019-08-201-0/+23
| | | | | | | Currently identical to link(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: vfs_full_audit. Implement linkat().Jeremy Allison2019-08-201-0/+25
| | | | | | | Currently identical to link(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: vfs_ceph_snapshots. Implement linkat().Jeremy Allison2019-08-201-0/+40
| | | | | | | Currently identical to link(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: vfs_ceph. Implement linkat().Jeremy Allison2019-08-201-0/+23
| | | | | | | Currently identical to link(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: vfs_cap. Implement linkat().Jeremy Allison2019-08-201-0/+61
| | | | | | | Currently identical to link(). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: VFS: Add SMB_VFS_LINKAT().Jeremy Allison2019-08-208-0/+106
| | | | | | | | | | Currently identical to SMB_VFS_LINK(). Next, move add to all VFS modules that implement link and eventually remove link. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* vfs_glusterfs: Enable profiling for file system operationsAnoop C S2019-08-201-49/+288
| | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14093 Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Aug 20 19:25:28 UTC 2019 on sn-devel-184
* tdb: Release tdb 1.4.2tdb-1.4.2Stefan Metzmacher2019-08-202-1/+74
| | | | | | | | | | | * Build fixes * Improve the performance by inlining the tdb_oob() checks Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Aug 20 14:45:41 UTC 2019 on sn-devel-184
* ctdb-daemon: Make node inactive in the NODE_STOP controlMartin Schwenke2019-08-201-0/+2
| | | | | | | | | | | | | | | | | | | Currently some of this is supported by a periodic check in the recovery daemon's main_loop(), which notices the flag change, sets recovery mode active and freezes databases. If STOP_NODE returns immediately then the associated recovery can complete and the node can be continued before databases are actually frozen. Instead, immediately do all of the things that make a node inactive. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14087 RN: Stop "ctdb stop" from completing before freezing databases Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Tue Aug 20 08:32:27 UTC 2019 on sn-devel-184
* ctdb-daemon: Drop unused function ctdb_local_node_got_banned()Martin Schwenke2019-08-202-25/+0
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14087 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-daemon: Switch banning code to use ctdb_node_become_inactive()Martin Schwenke2019-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | There's no reason to avoid immediately setting recovery mode to active and initiating freeze of databases. This effectively reverts the following commits: d8f3b490bbb691c9916eed0df5b980c1aef23c85 b4357a79d916b1f8ade8fa78563fbef0ce670aa9 The latter is now implemented using a control, resulting in looser coupling. See also the following commit: f8141e91a693912ea1107a49320e83702a80757a BUG: https://bugzilla.samba.org/show_bug.cgi?id=14087 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-daemon: Factor out new function ctdb_node_become_inactive()Martin Schwenke2019-08-202-0/+45
| | | | | | | | | | This is a superset of ctdb_local_node_got_banned() so will replace that function, and will also be used in the NODE_STOP control. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14087 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* build: fix mandatory typo in zlib configure checkDavid Disseldorp2019-08-201-1/+1
| | | | | | | | | | | | | This ensures that waf correctly fails during configure if zlib is missing. msg can also be dropped as it matches the waf validate_cfg() default (ignoring the quotes). Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Aug 20 06:58:12 UTC 2019 on sn-devel-184
* ldb: Free memory when repacking databaseTim Beale2019-08-201-0/+1
| | | | | | | | | | | | | | | | | The msg for each database record is allocated on the module context, but never freed. The module seems like it could be a long-running context (as the database would normally get repacked by the samba executable). Even if it's not a proper leak, it shouldn't hurt to cleanup the memory. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Tue Aug 20 04:57:10 UTC 2019 on sn-devel-184
* ldb: Log the partition we're repackingTim Beale2019-08-201-2/+4
| | | | | | | | | | | | | | | | | | | | | | | Firstly, with Samba AD this looks a little weird because we log the same message 5 times (once for every partition). If we log that we're doing this to records in different partitions, hopefully someone with a little Samba knowledge can figure out what's going on. Secondly, the info about what partitions are actually changing might be useful. E.g. if we hit a fatal error repacking the 3rd partition, and the transaction doesn't abort properly, then it would be useful to know what partitions were repacked and which ones weren't. There doesn't appear to be a useful name for the partition (ldb_kv->kv_ops->name() doesn't seem any more intelligible to a user), so just log the first record that we update. We can use that to infer the partition database). BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* ldb: Log pack format in user-friendly wayTim Beale2019-08-201-2/+15
| | | | | | | | | | | | The "format 0x26011968" log confused me (and I'm a developer). We can subtract the base offset from the pack format to get a more user-friendly number, e.g. v0 (not actually used), v1, v2, etc. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* ldb: Change pack format defines to enumTim Beale2019-08-201-5/+8
| | | | | | | | | | | The main reason is so that any future pack formats will continue incrementing this number in a sequential fashion. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* ldb: Move where we update the pack format versionTim Beale2019-08-203-2/+4
| | | | | | | | | | | | | | | | Store it on the repack context so that we can log a more informative message "Repacking from format x to format y". While this is not really a big deal currently, it could be worth recording for potential future scenarios (i.e. supporting three or more pack versions), where upgrades could potentially skip an intermediary pack format version. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* ldb: Always log when the database pack format changesTim Beale2019-08-202-1/+4
| | | | | | | | | | | | | | | LDB_DEBUG_WARNING gets logged by Samba as level 2, whereas the default log level for Samba is 0. It's not really fair to the user to change the format of their database on disk and potentially not tell them. This patch adds a log with level zero (using a alias define, as this technically isn't a fatal problem). BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* downgradedatabase: installing scriptAaron Haslett2019-08-204-3/+5
| | | | | | | | | | | | | | Installing downgrade script so people don't need the source tree for it. Exception added in usage test because running the script without arguments is valid. (This avoids the need to knownfail it). BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz> Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* downgradedatabase: Add man-page documentationAaron Haslett2019-08-202-0/+96
| | | | | | | | | | | | A man-page is needed so that we can install this tool as part of the Samba package. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz> Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* downgradedatabase: rename to samba_downgrade_dbTim Beale2019-08-203-2/+2
| | | | | | | | | | Just so that it's slightly less of a mouthful for users. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* tests: Avoid hardcoding relative filepathTim Beale2019-08-201-2/+2
| | | | | | | | | | If we move the test file, the test will break. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* downgradedatabase: comply with samba.tests.sourceAaron Haslett2019-08-201-3/+23
| | | | | | | | | | | | In next commit we'll install the script, samba.tests.source picked up the lack of a copyright message and some whitespace errors, so this patch fixes that stuff first. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14059 Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* smbd: Move lease type detection in delay_for_oplock()Volker Lendecke2019-08-201-24/+24
| | | | | | | | | | Walk the share_modes array only once. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Aug 20 00:33:12 UTC 2019 on sn-devel-184
* smbd: Merge grant_fsp_oplock_type() into delay_for_oplock()Volker Lendecke2019-08-191-26/+14
| | | | | | | | This is a preparation for the next commit: Only walk the share_modes[] array once when handling oplocks and leases. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Move delay_for_oplock() downVolker Lendecke2019-08-191-116/+116
| | | | | | | | | | We'll merge grant_fsp_oplock_type() into this function. This makes the next commit smaller, and the newly extended delay_for_oplocks will for example reference static file_has_brlocks() above. Make forward declarations unnecessary. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Make delay_for_oplock() return NTSTATUSVolker Lendecke2019-08-191-13/+15
| | | | | | | | A further commit will merge grant_fsp_oplock_type (returning NTSTATUS) into delay_for_oplock(). Make that commit smaller. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Slightly simplify grant_fsp_oplock_type()Volker Lendecke2019-08-191-7/+0
| | | | | | | This is never called with INTERNAL_OPENs anymore Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Slightly simplify delay_for_oplock()Volker Lendecke2019-08-191-2/+1
| | | | | | | | This is never called for INTERNAL_OPENs anymore, see handle_share_mode_lease() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>