summaryrefslogtreecommitdiff
path: root/source3/include/smb.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-08-27 20:38:53 +0000
committerJeremy Allison <jra@samba.org>1998-08-27 20:38:53 +0000
commit5e5e320d361afcb4d9503354b3912b4c7a672197 (patch)
tree77b9557fe080a5e15d077d8e9fec3bae993356f7 /source3/include/smb.h
parent74a2764726ce1047c79c7eaa84628901462a9b10 (diff)
downloadsamba-5e5e320d361afcb4d9503354b3912b4c7a672197.tar.gz
samba-5e5e320d361afcb4d9503354b3912b4c7a672197.tar.bz2
samba-5e5e320d361afcb4d9503354b3912b4c7a672197.zip
This is the stat cache code - seems to work fine (needs heavy
NetBench testing though.... :-). Attempts to efficiently reduce the number of stat() calls Samba does. Jeremy. (This used to be commit d0e48a2d8072c3e77a57ac6a2fb5044c05f03b41)
Diffstat (limited to 'source3/include/smb.h')
-rw-r--r--source3/include/smb.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 31e3b645b1..b615d09708 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -908,6 +908,14 @@ struct bitmap {
#define IS_VETO_PATH(conn,path) ((conn) && is_in_path((path),(conn)->veto_list))
#define IS_VETO_OPLOCK_PATH(conn,path) ((conn) && is_in_path((path),(conn)->veto_oplock_list))
+/*
+ * Used by the stat cache code to check if a returned
+ * stat structure is valid.
+ */
+
+#define VALID_STAT(st) (st.st_nlink != 0)
+#define VALID_STAT_OF_DIR(st) (VALID_STAT(st) && S_ISDIR(st.st_mode))
+
#define SMBENCRYPT() (lp_encrypted_passwords())
/* the basic packet size, assuming no words or bytes */