Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kirill Smelkov
linux
Commits
5221ad8c
Commit
5221ad8c
authored
21 years ago
by
Steve French
Committed by
Steve French
21 years ago
Browse files
Options
Download
Email Patches
Plain Diff
fix create/open/lookup to use namei intent flags. Enable oplock and packet signing
parent
f280895e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
22 deletions
+29
-22
fs/cifs/CHANGES
fs/cifs/CHANGES
+7
-0
fs/cifs/README
fs/cifs/README
+5
-1
fs/cifs/cifsfs.c
fs/cifs/cifsfs.c
+11
-16
fs/cifs/misc.c
fs/cifs/misc.c
+2
-2
fs/cifs/transport.c
fs/cifs/transport.c
+4
-3
No files found.
fs/cifs/CHANGES
View file @
5221ad8c
Version 0.84
------------
Finish support for Linux 2.5 open/create changes, which removes the
redundant NTCreate/QPathInfo/close that was sent during file create.
Enable oplock by default. Enable packet signing by default (needed to
access many recent Windows servers)
Version 0.83
Version 0.83
------------
------------
Fix oops when mounting to long server names caused by inverted parms to kmalloc.
Fix oops when mounting to long server names caused by inverted parms to kmalloc.
...
...
This diff is collapsed.
Click to expand it.
fs/cifs/README
View file @
5221ad8c
...
@@ -150,7 +150,10 @@ Configuration pseudo-files:
...
@@ -150,7 +150,10 @@ Configuration pseudo-files:
point and if the uids user/password mapping
point and if the uids user/password mapping
information is available. (default is 0)
information is available. (default is 0)
PacketSigningEnabled If set to one, cifs packet signing is enabled
PacketSigningEnabled If set to one, cifs packet signing is enabled
(default 0)
and will be used if the server requires
it. If set to two, cifs packet signing is
required even if the server considers packet
signing optional. (default 1)
cifsFYI If set to one, additional debug information is
cifsFYI If set to one, additional debug information is
logged to the system error log. (default 0)
logged to the system error log. (default 0)
ExtendedSecurity If set to one, SPNEGO session establishment
ExtendedSecurity If set to one, SPNEGO session establishment
...
@@ -166,6 +169,7 @@ Configuration pseudo-files:
...
@@ -166,6 +169,7 @@ Configuration pseudo-files:
for one second improving performance of lookups
for one second improving performance of lookups
(default 1)
(default 1)
OplockEnabled If set to one, safe distributed caching enabled.
OplockEnabled If set to one, safe distributed caching enabled.
(default 1)
These experimental features and tracing can be enabled by changing flags in /proc/fs/cifs
These experimental features and tracing can be enabled by changing flags in /proc/fs/cifs
(after the cifs module has been installed or built into the kernel, e.g. insmod cifs).
(after the cifs module has been installed or built into the kernel, e.g. insmod cifs).
...
...
This diff is collapsed.
Click to expand it.
fs/cifs/cifsfs.c
View file @
5221ad8c
...
@@ -47,12 +47,12 @@ extern struct file_system_type cifs_fs_type;
...
@@ -47,12 +47,12 @@ extern struct file_system_type cifs_fs_type;
int
cifsFYI
=
0
;
int
cifsFYI
=
0
;
int
cifsERROR
=
1
;
int
cifsERROR
=
1
;
int
traceSMB
=
0
;
int
traceSMB
=
0
;
unsigned
int
oplockEnabled
=
0
;
unsigned
int
oplockEnabled
=
1
;
unsigned
int
lookupCacheEnabled
=
1
;
unsigned
int
lookupCacheEnabled
=
1
;
unsigned
int
multiuser_mount
=
0
;
unsigned
int
multiuser_mount
=
0
;
unsigned
int
extended_security
=
0
;
unsigned
int
extended_security
=
0
;
unsigned
int
ntlmv2_support
=
0
;
unsigned
int
ntlmv2_support
=
0
;
unsigned
int
sign_CIFS_PDUs
=
0
;
unsigned
int
sign_CIFS_PDUs
=
1
;
unsigned
int
CIFSMaximumBufferSize
=
CIFS_MAX_MSGSIZE
;
unsigned
int
CIFSMaximumBufferSize
=
CIFS_MAX_MSGSIZE
;
struct
task_struct
*
oplockThread
=
NULL
;
struct
task_struct
*
oplockThread
=
NULL
;
...
@@ -439,7 +439,6 @@ static int cifs_oplock_thread(void * dummyarg)
...
@@ -439,7 +439,6 @@ static int cifs_oplock_thread(void * dummyarg)
struct
list_head
*
tmp
;
struct
list_head
*
tmp
;
struct
list_head
*
tmp1
;
struct
list_head
*
tmp1
;
struct
oplock_q_entry
*
oplock_item
;
struct
oplock_q_entry
*
oplock_item
;
struct
file
*
pfile
;
struct
cifsTconInfo
*
pTcon
;
struct
cifsTconInfo
*
pTcon
;
int
rc
;
int
rc
;
...
@@ -457,23 +456,19 @@ static int cifs_oplock_thread(void * dummyarg)
...
@@ -457,23 +456,19 @@ static int cifs_oplock_thread(void * dummyarg)
qhead
);
qhead
);
if
(
oplock_item
)
{
if
(
oplock_item
)
{
pTcon
=
oplock_item
->
tcon
;
pTcon
=
oplock_item
->
tcon
;
pfile
=
oplock_item
->
file_to_flush
;
cFYI
(
1
,(
"process item on queue"
));
/* BB remove */
DeleteOplockQEntry
(
oplock_item
);
DeleteOplockQEntry
(
oplock_item
);
write_unlock
(
&
GlobalMid_Lock
);
write_unlock
(
&
GlobalMid_Lock
);
rc
=
filemap_fdatawrite
(
pfile
->
f_dentry
->
d_
inode
->
i_mapping
);
rc
=
filemap_fdatawrite
(
oplock_item
->
p
inode
->
i_mapping
);
if
(
rc
)
if
(
rc
)
CIFS_I
(
pfile
->
f_dentry
->
d_
inode
)
->
write_behind_rc
CIFS_I
(
oplock_item
->
p
inode
)
->
write_behind_rc
=
rc
;
=
rc
;
cFYI
(
1
,(
"Oplock flush file %p rc %d"
,
pfile
,
rc
));
cFYI
(
1
,(
"Oplock flush inode %p rc %d"
,
oplock_item
->
pinode
,
rc
));
if
(
pfile
->
private_data
)
{
rc
=
CIFSSMBLock
(
0
,
pTcon
,
rc
=
CIFSSMBLock
(
0
,
pTcon
,
oplock_item
->
netfid
,
((
struct
cifsFileInfo
*
)
pfile
->
private_data
)
->
netfid
,
0
/* len */
,
0
/* offset */
,
0
,
0
/* len */
,
0
/* offset */
,
0
,
0
,
LOCKING_ANDX_OPLOCK_RELEASE
,
0
,
LOCKING_ANDX_OPLOCK_RELEASE
,
0
/* wait flag */
);
0
/* wait flag */
);
cFYI
(
1
,(
"Oplock release rc = %d "
,
rc
));
cFYI
(
1
,(
"Oplock release rc = %d "
,
rc
));
}
write_lock
(
&
GlobalMid_Lock
);
write_lock
(
&
GlobalMid_Lock
);
}
else
}
else
break
;
break
;
...
...
This diff is collapsed.
Click to expand it.
fs/cifs/misc.c
View file @
5221ad8c
...
@@ -390,12 +390,12 @@ is_valid_oplock_break(struct smb_hdr *buf)
...
@@ -390,12 +390,12 @@ is_valid_oplock_break(struct smb_hdr *buf)
read_unlock
(
&
GlobalSMBSeslock
);
read_unlock
(
&
GlobalSMBSeslock
);
cFYI
(
1
,(
"Matching file id, processing oplock break"
));
cFYI
(
1
,(
"Matching file id, processing oplock break"
));
pCifsInode
=
pCifsInode
=
CIFS_I
(
netfile
->
p
file
->
f_dentry
->
d_i
node
);
CIFS_I
(
netfile
->
p
I
node
);
pCifsInode
->
clientCanCacheAll
=
FALSE
;
pCifsInode
->
clientCanCacheAll
=
FALSE
;
if
(
pSMB
->
OplockLevel
==
0
)
if
(
pSMB
->
OplockLevel
==
0
)
pCifsInode
->
clientCanCacheRead
=
FALSE
;
pCifsInode
->
clientCanCacheRead
=
FALSE
;
pCifsInode
->
oplockPending
=
TRUE
;
pCifsInode
->
oplockPending
=
TRUE
;
AllocOplockQEntry
(
netfile
->
p
file
,
tcon
);
AllocOplockQEntry
(
netfile
->
p
Inode
,
netfile
->
netfid
,
tcon
);
cFYI
(
1
,(
"about to wake up oplock thd"
));
cFYI
(
1
,(
"about to wake up oplock thd"
));
wake_up_process
(
oplockThread
);
wake_up_process
(
oplockThread
);
return
TRUE
;
return
TRUE
;
...
...
This diff is collapsed.
Click to expand it.
fs/cifs/transport.c
View file @
5221ad8c
...
@@ -101,10 +101,10 @@ DeleteMidQEntry(struct mid_q_entry *midEntry)
...
@@ -101,10 +101,10 @@ DeleteMidQEntry(struct mid_q_entry *midEntry)
}
}
struct
oplock_q_entry
*
struct
oplock_q_entry
*
AllocOplockQEntry
(
struct
file
*
file
,
struct
cifsTconInfo
*
tcon
)
AllocOplockQEntry
(
struct
inode
*
pinode
,
__u16
fid
,
struct
cifsTconInfo
*
tcon
)
{
{
struct
oplock_q_entry
*
temp
;
struct
oplock_q_entry
*
temp
;
if
((
file
==
NULL
)
||
(
tcon
==
NULL
))
{
if
((
pinode
==
NULL
)
||
(
tcon
==
NULL
))
{
cERROR
(
1
,
(
"Null parms passed to AllocOplockQEntry"
));
cERROR
(
1
,
(
"Null parms passed to AllocOplockQEntry"
));
return
NULL
;
return
NULL
;
}
}
...
@@ -113,8 +113,9 @@ AllocOplockQEntry(struct file * file, struct cifsTconInfo * tcon)
...
@@ -113,8 +113,9 @@ AllocOplockQEntry(struct file * file, struct cifsTconInfo * tcon)
if
(
temp
==
NULL
)
if
(
temp
==
NULL
)
return
temp
;
return
temp
;
else
{
else
{
temp
->
file_to_flush
=
fil
e
;
temp
->
pinode
=
pinod
e
;
temp
->
tcon
=
tcon
;
temp
->
tcon
=
tcon
;
temp
->
netfid
=
fid
;
write_lock
(
&
GlobalMid_Lock
);
write_lock
(
&
GlobalMid_Lock
);
list_add_tail
(
&
temp
->
qhead
,
&
GlobalOplock_Q
);
list_add_tail
(
&
temp
->
qhead
,
&
GlobalOplock_Q
);
write_unlock
(
&
GlobalMid_Lock
);
write_unlock
(
&
GlobalMid_Lock
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment