Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etercifs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etercifs
Commits
431f8cde
Commit
431f8cde
authored
Oct 23, 2008
by
Konstantin Baev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update sources/2.6.25
- source: cifs-2.6.git - refspec: v2.6.25-etercifs - commit: 949a8d47d38457859120a16da26a451a7b708ea0 merge with new kernel minor version (v2.6.25.19)
parent
a3c480b0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
64 deletions
+71
-64
cifsglob.h
sources/2.6.25/cifsglob.h
+1
-0
cifssmb.c
sources/2.6.25/cifssmb.c
+4
-0
inode.c
sources/2.6.25/inode.c
+1
-1
readdir.c
sources/2.6.25/readdir.c
+65
-63
No files found.
sources/2.6.25/cifsglob.h
View file @
431f8cde
...
...
@@ -315,6 +315,7 @@ struct cifs_search_info {
__u32
resume_key
;
char
*
ntwrk_buf_start
;
char
*
srch_entries_start
;
char
*
last_entry
;
char
*
presume_name
;
unsigned
int
resume_name_len
;
unsigned
endOfSearch
:
1
;
...
...
sources/2.6.25/cifssmb.c
View file @
431f8cde
...
...
@@ -3603,6 +3603,8 @@ findFirstRetry:
le16_to_cpu
(
parms
->
SearchCount
);
psrch_inf
->
index_of_last_entry
=
2
/* skip . and .. */
+
psrch_inf
->
entries_in_buffer
;
psrch_inf
->
last_entry
=
psrch_inf
->
srch_entries_start
+
le16_to_cpu
(
parms
->
LastNameOffset
);
*
pnetfid
=
parms
->
SearchHandle
;
}
else
{
cifs_buf_release
(
pSMB
);
...
...
@@ -3717,6 +3719,8 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon,
le16_to_cpu
(
parms
->
SearchCount
);
psrch_inf
->
index_of_last_entry
+=
psrch_inf
->
entries_in_buffer
;
psrch_inf
->
last_entry
=
psrch_inf
->
srch_entries_start
+
le16_to_cpu
(
parms
->
LastNameOffset
);
/* cFYI(1,("fnxt2 entries in buf %d index_of_last %d",
psrch_inf->entries_in_buffer, psrch_inf->index_of_last_entry)); */
...
...
sources/2.6.25/inode.c
View file @
431f8cde
...
...
@@ -1262,7 +1262,7 @@ int cifs_revalidate(struct dentry *direntry)
if
(
!
cifsInode
->
needForceInvalidate
&&
timespec_equal
(
&
local_mtime
,
&
direntry
->
d_inode
->
i_mtime
)
&&
(
local_size
==
direntry
->
d_inode
->
i_size
)
)
{
cFYI
(
1
,
(
"**************
***************
cifs_revalidate - inode unchanged"
));
cFYI
(
1
,
(
"************** cifs_revalidate - inode unchanged"
));
}
else
{
/* file may have changed on server */
if
(
cifsInode
->
clientCanCacheRead
)
{
...
...
sources/2.6.25/readdir.c
View file @
431f8cde
...
...
@@ -633,6 +633,70 @@ static int is_dir_changed(struct file *file)
}
static
int
cifs_save_resume_key
(
const
char
*
current_entry
,
struct
cifsFileInfo
*
cifsFile
)
{
int
rc
=
0
;
unsigned
int
len
=
0
;
__u16
level
;
char
*
filename
;
if
((
cifsFile
==
NULL
)
||
(
current_entry
==
NULL
))
return
-
EINVAL
;
level
=
cifsFile
->
srch_inf
.
info_level
;
if
(
level
==
SMB_FIND_FILE_UNIX
)
{
FILE_UNIX_INFO
*
pFindData
=
(
FILE_UNIX_INFO
*
)
current_entry
;
filename
=
&
pFindData
->
FileName
[
0
];
if
(
cifsFile
->
srch_inf
.
unicode
)
{
len
=
cifs_unicode_bytelen
(
filename
);
}
else
{
/* BB should we make this strnlen of PATH_MAX? */
len
=
strnlen
(
filename
,
PATH_MAX
);
}
cifsFile
->
srch_inf
.
resume_key
=
pFindData
->
ResumeKey
;
}
else
if
(
level
==
SMB_FIND_FILE_DIRECTORY_INFO
)
{
FILE_DIRECTORY_INFO
*
pFindData
=
(
FILE_DIRECTORY_INFO
*
)
current_entry
;
filename
=
&
pFindData
->
FileName
[
0
];
len
=
le32_to_cpu
(
pFindData
->
FileNameLength
);
cifsFile
->
srch_inf
.
resume_key
=
pFindData
->
FileIndex
;
}
else
if
(
level
==
SMB_FIND_FILE_FULL_DIRECTORY_INFO
)
{
FILE_FULL_DIRECTORY_INFO
*
pFindData
=
(
FILE_FULL_DIRECTORY_INFO
*
)
current_entry
;
filename
=
&
pFindData
->
FileName
[
0
];
len
=
le32_to_cpu
(
pFindData
->
FileNameLength
);
cifsFile
->
srch_inf
.
resume_key
=
pFindData
->
FileIndex
;
}
else
if
(
level
==
SMB_FIND_FILE_ID_FULL_DIR_INFO
)
{
SEARCH_ID_FULL_DIR_INFO
*
pFindData
=
(
SEARCH_ID_FULL_DIR_INFO
*
)
current_entry
;
filename
=
&
pFindData
->
FileName
[
0
];
len
=
le32_to_cpu
(
pFindData
->
FileNameLength
);
cifsFile
->
srch_inf
.
resume_key
=
pFindData
->
FileIndex
;
}
else
if
(
level
==
SMB_FIND_FILE_BOTH_DIRECTORY_INFO
)
{
FILE_BOTH_DIRECTORY_INFO
*
pFindData
=
(
FILE_BOTH_DIRECTORY_INFO
*
)
current_entry
;
filename
=
&
pFindData
->
FileName
[
0
];
len
=
le32_to_cpu
(
pFindData
->
FileNameLength
);
cifsFile
->
srch_inf
.
resume_key
=
pFindData
->
FileIndex
;
}
else
if
(
level
==
SMB_FIND_FILE_INFO_STANDARD
)
{
FIND_FILE_STANDARD_INFO
*
pFindData
=
(
FIND_FILE_STANDARD_INFO
*
)
current_entry
;
filename
=
&
pFindData
->
FileName
[
0
];
/* one byte length, no name conversion */
len
=
(
unsigned
int
)
pFindData
->
FileNameLength
;
cifsFile
->
srch_inf
.
resume_key
=
pFindData
->
ResumeKey
;
}
else
{
cFYI
(
1
,
(
"Unknown findfirst level %d"
,
level
));
return
-
EINVAL
;
}
cifsFile
->
srch_inf
.
resume_name_len
=
len
;
cifsFile
->
srch_inf
.
presume_name
=
filename
;
return
rc
;
}
/* find the corresponding entry in the search */
/* Note that the SMB server returns search entries for . and .. which
complicates logic here if we choose to parse for them and we do not
...
...
@@ -694,6 +758,7 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon,
while
((
index_to_find
>=
cifsFile
->
srch_inf
.
index_of_last_entry
)
&&
(
rc
==
0
)
&&
(
cifsFile
->
srch_inf
.
endOfSearch
==
FALSE
))
{
cFYI
(
1
,
(
"calling findnext2"
));
cifs_save_resume_key
(
cifsFile
->
srch_inf
.
last_entry
,
cifsFile
);
rc
=
CIFSFindNext
(
xid
,
pTcon
,
cifsFile
->
netfid
,
&
cifsFile
->
srch_inf
);
if
(
rc
)
...
...
@@ -910,69 +975,6 @@ static int cifs_filldir(char *pfindEntry, struct file *file,
return
rc
;
}
static
int
cifs_save_resume_key
(
const
char
*
current_entry
,
struct
cifsFileInfo
*
cifsFile
)
{
int
rc
=
0
;
unsigned
int
len
=
0
;
__u16
level
;
char
*
filename
;
if
((
cifsFile
==
NULL
)
||
(
current_entry
==
NULL
))
return
-
EINVAL
;
level
=
cifsFile
->
srch_inf
.
info_level
;
if
(
level
==
SMB_FIND_FILE_UNIX
)
{
FILE_UNIX_INFO
*
pFindData
=
(
FILE_UNIX_INFO
*
)
current_entry
;
filename
=
&
pFindData
->
FileName
[
0
];
if
(
cifsFile
->
srch_inf
.
unicode
)
{
len
=
cifs_unicode_bytelen
(
filename
);
}
else
{
/* BB should we make this strnlen of PATH_MAX? */
len
=
strnlen
(
filename
,
PATH_MAX
);
}
cifsFile
->
srch_inf
.
resume_key
=
pFindData
->
ResumeKey
;
}
else
if
(
level
==
SMB_FIND_FILE_DIRECTORY_INFO
)
{
FILE_DIRECTORY_INFO
*
pFindData
=
(
FILE_DIRECTORY_INFO
*
)
current_entry
;
filename
=
&
pFindData
->
FileName
[
0
];
len
=
le32_to_cpu
(
pFindData
->
FileNameLength
);
cifsFile
->
srch_inf
.
resume_key
=
pFindData
->
FileIndex
;
}
else
if
(
level
==
SMB_FIND_FILE_FULL_DIRECTORY_INFO
)
{
FILE_FULL_DIRECTORY_INFO
*
pFindData
=
(
FILE_FULL_DIRECTORY_INFO
*
)
current_entry
;
filename
=
&
pFindData
->
FileName
[
0
];
len
=
le32_to_cpu
(
pFindData
->
FileNameLength
);
cifsFile
->
srch_inf
.
resume_key
=
pFindData
->
FileIndex
;
}
else
if
(
level
==
SMB_FIND_FILE_ID_FULL_DIR_INFO
)
{
SEARCH_ID_FULL_DIR_INFO
*
pFindData
=
(
SEARCH_ID_FULL_DIR_INFO
*
)
current_entry
;
filename
=
&
pFindData
->
FileName
[
0
];
len
=
le32_to_cpu
(
pFindData
->
FileNameLength
);
cifsFile
->
srch_inf
.
resume_key
=
pFindData
->
FileIndex
;
}
else
if
(
level
==
SMB_FIND_FILE_BOTH_DIRECTORY_INFO
)
{
FILE_BOTH_DIRECTORY_INFO
*
pFindData
=
(
FILE_BOTH_DIRECTORY_INFO
*
)
current_entry
;
filename
=
&
pFindData
->
FileName
[
0
];
len
=
le32_to_cpu
(
pFindData
->
FileNameLength
);
cifsFile
->
srch_inf
.
resume_key
=
pFindData
->
FileIndex
;
}
else
if
(
level
==
SMB_FIND_FILE_INFO_STANDARD
)
{
FIND_FILE_STANDARD_INFO
*
pFindData
=
(
FIND_FILE_STANDARD_INFO
*
)
current_entry
;
filename
=
&
pFindData
->
FileName
[
0
];
/* one byte length, no name conversion */
len
=
(
unsigned
int
)
pFindData
->
FileNameLength
;
cifsFile
->
srch_inf
.
resume_key
=
pFindData
->
ResumeKey
;
}
else
{
cFYI
(
1
,
(
"Unknown findfirst level %d"
,
level
));
return
-
EINVAL
;
}
cifsFile
->
srch_inf
.
resume_name_len
=
len
;
cifsFile
->
srch_inf
.
presume_name
=
filename
;
return
rc
;
}
int
cifs_readdir
(
struct
file
*
file
,
void
*
direntry
,
filldir_t
filldir
)
{
...
...
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