[PATCH] Remove redundant stat check in vfs_default_durable_reconnect_check_stat()
Ralph Böhme
slow at samba.org
Wed Jul 4 09:23:32 UTC 2018
Hi!
The attached patch removes a check that is
a) redudant, as vfs_default_durable_reconnect() already checks that the file_id
matches, and
b) it breaks on clustered filesytems where the device id is often not the same
on different nodes.
Please review&push if happy. Thanks!
-slow
--
Ralph Boehme, Samba Team https://samba.org/
Samba Developer, SerNet GmbH https://sernet.de/en/samba/
GPG Key Fingerprint: FAE2 C608 8A24 2520 51C5
59E4 AA1E 9B71 2639 9E46
-------------- next part --------------
From 5314e94210ce1c78884f58360283a7d0ff7410a8 Mon Sep 17 00:00:00 2001
From: Ralph Boehme <slow at samba.org>
Date: Fri, 2 Mar 2018 15:50:29 +0100
Subject: [PATCH] s3: smbd/durable: remove dev and inode check from
vfs_default_durable_reconnect_check_stat()
On a cluster filesystem the device numbers may differ on the cluster
nodes. We already verify the file_id in vfs_default_durable_reconnect(),
so we can safely remove the dev/inode checks.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13318
Signed-off-by: Ralph Boehme <slow at samba.org>
---
source3/smbd/durable.c | 24 ------------------------
1 file changed, 24 deletions(-)
diff --git a/source3/smbd/durable.c b/source3/smbd/durable.c
index 7d7a1b21751..80392e2c6db 100644
--- a/source3/smbd/durable.c
+++ b/source3/smbd/durable.c
@@ -302,30 +302,6 @@ static bool vfs_default_durable_reconnect_check_stat(
{
int ret;
- if (cookie_st->st_ex_dev != fsp_st->st_ex_dev) {
- DEBUG(1, ("vfs_default_durable_reconnect (%s): "
- "stat_ex.%s differs: "
- "cookie:%llu != stat:%llu, "
- "denying durable reconnect\n",
- name,
- "st_ex_dev",
- (unsigned long long)cookie_st->st_ex_dev,
- (unsigned long long)fsp_st->st_ex_dev));
- return false;
- }
-
- if (cookie_st->st_ex_ino != fsp_st->st_ex_ino) {
- DEBUG(1, ("vfs_default_durable_reconnect (%s): "
- "stat_ex.%s differs: "
- "cookie:%llu != stat:%llu, "
- "denying durable reconnect\n",
- name,
- "st_ex_ino",
- (unsigned long long)cookie_st->st_ex_ino,
- (unsigned long long)fsp_st->st_ex_ino));
- return false;
- }
-
if (cookie_st->st_ex_mode != fsp_st->st_ex_mode) {
DEBUG(1, ("vfs_default_durable_reconnect (%s): "
"stat_ex.%s differs: "
--
2.13.6
More information about the samba-technical
mailing list