summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-08-16 03:04:06 +0000
committerAndrew Tridgell <tridge@samba.org>1998-08-16 03:04:06 +0000
commita7acf10566af549eb71e7a421397c8073d55e0f6 (patch)
treec3f40e554251608a0e2112d790a633d641e08deb /source3/include
parent6a6e8958ad86d61395d9ad47a0c2bef732d07b13 (diff)
downloadsamba-a7acf10566af549eb71e7a421397c8073d55e0f6.tar.gz
samba-a7acf10566af549eb71e7a421397c8073d55e0f6.tar.bz2
samba-a7acf10566af549eb71e7a421397c8073d55e0f6.zip
server.c: fixed a bug in close_file() with the new files.c handling code
bitmap.c: added bitmap hanlding code in preparation for increasing the default max open files to several thousand (This used to be commit f573a65b67e7a57586fec57845598e49b157ee0a)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h2
-rw-r--r--source3/include/smb.h29
2 files changed, 19 insertions, 12 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 9587828ea9..6f2a593f92 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1943,7 +1943,7 @@ void DirCacheFlush(int snum);
/*The following definitions come from smbd/files.c */
-files_struct *find_free_file(void );
+files_struct *file_new(void );
file_fd_struct *fd_get_already_open(struct stat *sbuf);
file_fd_struct *fd_get_new(void);
void file_close_conn(connection_struct *conn);
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 801e134435..3b562b9d13 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -494,17 +494,19 @@ typedef struct
* file descriptor and process.
*/
-typedef struct
+typedef struct file_fd_struct
{
- uint16 ref_count;
- uint16 uid_cache_count;
- uid_t uid_users_cache[10];
- uint32 dev;
- uint32 inode;
- int fd;
- int fd_readonly;
- int fd_writeonly;
- int real_open_flags;
+ struct file_fd_struct *next, *prev;
+ uint16 ref_count;
+ uint16 uid_cache_count;
+ uid_t uid_users_cache[10];
+ uint32 dev;
+ uint32 inode;
+ int fd;
+ int fdnum;
+ int fd_readonly;
+ int fd_writeonly;
+ int real_open_flags;
} file_fd_struct;
/*
@@ -573,8 +575,9 @@ struct current_user
GID_T *groups;
};
-typedef struct
+typedef struct files_struct
{
+ struct files_struct *next, *prev;
int fnum;
connection_struct *conn;
file_fd_struct *fd_ptr;
@@ -852,6 +855,10 @@ struct parm_struct
} def;
};
+struct bitmap {
+ uint32 *b;
+ int n;
+};
#define FLAG_BASIC 1 /* fundamental options */
#define FLAG_HIDE 2 /* options that should be hidden in SWAT */