Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
fbcae3ea
Commit
fbcae3ea
authored
Oct 19, 2011
by
Steve French
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'cifs-3.2' of
git://git.samba.org/jlayton/linux
into temp-3.2-jeff
parents
71c424ba
f06ac72e
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
897 additions
and
368 deletions
+897
-368
fs/cifs/cifsfs.c
fs/cifs/cifsfs.c
+1
-1
fs/cifs/cifsglob.h
fs/cifs/cifsglob.h
+26
-3
fs/cifs/cifspdu.h
fs/cifs/cifspdu.h
+1
-3
fs/cifs/cifsproto.h
fs/cifs/cifsproto.h
+27
-2
fs/cifs/cifssmb.c
fs/cifs/cifssmb.c
+362
-2
fs/cifs/connect.c
fs/cifs/connect.c
+334
-181
fs/cifs/file.c
fs/cifs/file.c
+124
-171
fs/cifs/transport.c
fs/cifs/transport.c
+5
-3
include/linux/freezer.h
include/linux/freezer.h
+17
-2
No files found.
fs/cifs/cifsfs.c
View file @
fbcae3ea
...
...
@@ -74,7 +74,7 @@ module_param(cifs_min_small, int, 0);
MODULE_PARM_DESC
(
cifs_min_small
,
"Small network buffers in pool. Default: 30 "
"Range: 2 to 256"
);
unsigned
int
cifs_max_pending
=
CIFS_MAX_REQ
;
module_param
(
cifs_max_pending
,
int
,
0
);
module_param
(
cifs_max_pending
,
int
,
0
444
);
MODULE_PARM_DESC
(
cifs_max_pending
,
"Simultaneous requests to server. "
"Default: 50 Range: 2 to 256"
);
unsigned
short
echo_retries
=
5
;
...
...
fs/cifs/cifsglob.h
View file @
fbcae3ea
...
...
@@ -291,7 +291,13 @@ struct TCP_Server_Info {
bool
sec_kerberosu2u
;
/* supports U2U Kerberos */
bool
sec_kerberos
;
/* supports plain Kerberos */
bool
sec_mskerberos
;
/* supports legacy MS Kerberos */
bool
large_buf
;
/* is current buffer large? */
struct
delayed_work
echo
;
/* echo ping workqueue job */
struct
kvec
*
iov
;
/* reusable kvec array for receives */
unsigned
int
nr_iov
;
/* number of kvecs in array */
char
*
smallbuf
;
/* pointer to current "small" buffer */
char
*
bigbuf
;
/* pointer to current "big" buffer */
unsigned
int
total_read
;
/* total amount of data read in this pass */
#ifdef CONFIG_CIFS_FSCACHE
struct
fscache_cookie
*
fscache
;
/* client index cache cookie */
#endif
...
...
@@ -650,8 +656,24 @@ static inline void cifs_stats_bytes_read(struct cifs_tcon *tcon,
struct
mid_q_entry
;
/*
* This is the prototype for the mid callback function. When creating one,
* take special care to avoid deadlocks. Things to bear in mind:
* This is the prototype for the mid receive function. This function is for
* receiving the rest of the SMB frame, starting with the WordCount (which is
* just after the MID in struct smb_hdr). Note:
*
* - This will be called by cifsd, with no locks held.
* - The mid will still be on the pending_mid_q.
* - mid->resp_buf will point to the current buffer.
*
* Returns zero on a successful receive, or an error. The receive state in
* the TCP_Server_Info will also be updated.
*/
typedef
int
(
mid_receive_t
)(
struct
TCP_Server_Info
*
server
,
struct
mid_q_entry
*
mid
);
/*
* This is the prototype for the mid callback function. This is called once the
* mid has been received off of the socket. When creating one, take special
* care to avoid deadlocks. Things to bear in mind:
*
* - it will be called by cifsd, with no locks held
* - the mid will be removed from any lists
...
...
@@ -669,9 +691,10 @@ struct mid_q_entry {
unsigned
long
when_sent
;
/* time when smb send finished */
unsigned
long
when_received
;
/* when demux complete (taken off wire) */
#endif
mid_receive_t
*
receive
;
/* call receive callback */
mid_callback_t
*
callback
;
/* call completion callback */
void
*
callback_data
;
/* general purpose pointer for callback */
struct
smb_hdr
*
resp_buf
;
/*
response buff
er */
struct
smb_hdr
*
resp_buf
;
/*
pointer to received SMB head
er */
int
midState
;
/* wish this were enum but can not pass to wait_event */
__u8
command
;
/* smb command code */
bool
largeBuf
:
1
;
/* if valid response, is pointer to large buf */
...
...
fs/cifs/cifspdu.h
View file @
fbcae3ea
...
...
@@ -1089,9 +1089,7 @@ typedef struct smb_com_read_rsp {
__le16
DataLengthHigh
;
__u64
Reserved2
;
__u16
ByteCount
;
__u8
Pad
;
/* BB check for whether padded to DWORD
boundary and optimum performance here */
char
Data
[
1
];
/* read response data immediately follows */
}
__attribute__
((
packed
))
READ_RSP
;
typedef
struct
locking_andx_range
{
...
...
fs/cifs/cifsproto.h
View file @
fbcae3ea
...
...
@@ -69,8 +69,9 @@ extern struct mid_q_entry *AllocMidQEntry(const struct smb_hdr *smb_buffer,
struct
TCP_Server_Info
*
server
);
extern
void
DeleteMidQEntry
(
struct
mid_q_entry
*
midEntry
);
extern
int
cifs_call_async
(
struct
TCP_Server_Info
*
server
,
struct
kvec
*
iov
,
unsigned
int
nvec
,
mid_callback_t
*
callback
,
void
*
cbdata
,
bool
ignore_pend
);
unsigned
int
nvec
,
mid_receive_t
*
receive
,
mid_callback_t
*
callback
,
void
*
cbdata
,
bool
ignore_pend
);
extern
int
SendReceive
(
const
unsigned
int
/* xid */
,
struct
cifs_ses
*
,
struct
smb_hdr
*
/* input */
,
struct
smb_hdr
*
/* out */
,
...
...
@@ -153,6 +154,12 @@ extern struct cifs_ntsd *get_cifs_acl(struct cifs_sb_info *, struct inode *,
extern
int
set_cifs_acl
(
struct
cifs_ntsd
*
,
__u32
,
struct
inode
*
,
const
char
*
,
int
);
extern
void
dequeue_mid
(
struct
mid_q_entry
*
mid
,
bool
malformed
);
extern
int
cifs_read_from_socket
(
struct
TCP_Server_Info
*
server
,
char
*
buf
,
unsigned
int
to_read
);
extern
int
cifs_readv_from_socket
(
struct
TCP_Server_Info
*
server
,
struct
kvec
*
iov_orig
,
unsigned
int
nr_segs
,
unsigned
int
to_read
);
extern
void
cifs_setup_cifs_sb
(
struct
smb_vol
*
pvolume_info
,
struct
cifs_sb_info
*
cifs_sb
);
extern
int
cifs_match_super
(
struct
super_block
*
,
void
*
);
...
...
@@ -442,6 +449,24 @@ extern int E_md4hash(const unsigned char *passwd, unsigned char *p16);
extern
int
SMBencrypt
(
unsigned
char
*
passwd
,
const
unsigned
char
*
c8
,
unsigned
char
*
p24
);
/* asynchronous read support */
struct
cifs_readdata
{
struct
cifsFileInfo
*
cfile
;
struct
address_space
*
mapping
;
__u64
offset
;
unsigned
int
bytes
;
pid_t
pid
;
int
result
;
struct
list_head
pages
;
struct
work_struct
work
;
unsigned
int
nr_iov
;
struct
kvec
iov
[
1
];
};
struct
cifs_readdata
*
cifs_readdata_alloc
(
unsigned
int
nr_pages
);
void
cifs_readdata_free
(
struct
cifs_readdata
*
rdata
);
int
cifs_async_readv
(
struct
cifs_readdata
*
rdata
);
/* asynchronous write support */
struct
cifs_writedata
{
struct
kref
refcount
;
...
...
fs/cifs/cifssmb.c
View file @
fbcae3ea
This diff is collapsed.
Click to expand it.
fs/cifs/connect.c
View file @
fbcae3ea
This diff is collapsed.
Click to expand it.
fs/cifs/file.c
View file @
fbcae3ea
This diff is collapsed.
Click to expand it.
fs/cifs/transport.c
View file @
fbcae3ea
...
...
@@ -26,6 +26,7 @@
#include <linux/wait.h>
#include <linux/net.h>
#include <linux/delay.h>
#include <linux/freezer.h>
#include <asm/uaccess.h>
#include <asm/processor.h>
#include <linux/mempool.h>
...
...
@@ -324,7 +325,7 @@ wait_for_response(struct TCP_Server_Info *server, struct mid_q_entry *midQ)
{
int
error
;
error
=
wait_event_killable
(
server
->
response_q
,
error
=
wait_event_
freeze
killable
(
server
->
response_q
,
midQ
->
midState
!=
MID_REQUEST_SUBMITTED
);
if
(
error
<
0
)
return
-
ERESTARTSYS
;
...
...
@@ -339,8 +340,8 @@ wait_for_response(struct TCP_Server_Info *server, struct mid_q_entry *midQ)
*/
int
cifs_call_async
(
struct
TCP_Server_Info
*
server
,
struct
kvec
*
iov
,
unsigned
int
nvec
,
mid_
callback_t
*
callback
,
void
*
cbdata
,
bool
ignore_pend
)
unsigned
int
nvec
,
mid_
receive_t
*
receive
,
mid_callback_t
*
callback
,
void
*
cbdata
,
bool
ignore_pend
)
{
int
rc
;
struct
mid_q_entry
*
mid
;
...
...
@@ -374,6 +375,7 @@ cifs_call_async(struct TCP_Server_Info *server, struct kvec *iov,
goto
out_err
;
}
mid
->
receive
=
receive
;
mid
->
callback
=
callback
;
mid
->
callback_data
=
cbdata
;
mid
->
midState
=
MID_REQUEST_SUBMITTED
;
...
...
include/linux/freezer.h
View file @
fbcae3ea
...
...
@@ -134,10 +134,25 @@ static inline void set_freezable_with_signal(void)
}
/*
* Freezer-friendly wrappers around wait_event_interruptible() and
* wait_event_interruptible_timeout(), originally defined in <linux/wait.h>
* Freezer-friendly wrappers around wait_event_interruptible(),
* wait_event_killable() and wait_event_interruptible_timeout(), originally
* defined in <linux/wait.h>
*/
#define wait_event_freezekillable(wq, condition) \
({ \
int __retval; \
do { \
__retval = wait_event_killable(wq, \
(condition) || freezing(current)); \
if (__retval && !freezing(current)) \
break; \
else if (!(condition)) \
__retval = -ERESTARTSYS; \
} while (try_to_freeze()); \
__retval; \
})
#define wait_event_freezable(wq, condition) \
({ \
int __retval; \
...
...
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