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
707c5db2
Commit
707c5db2
authored
Aug 10, 2003
by
Steve French
Committed by
Steve French
Aug 10, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
blocksize getting overwritten in construct dentry
parent
1b6ad772
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
75 additions
and
20 deletions
+75
-20
fs/cifs/cifs_debug.c
fs/cifs/cifs_debug.c
+48
-0
fs/cifs/cifsfs.c
fs/cifs/cifsfs.c
+26
-17
fs/cifs/cifsglob.h
fs/cifs/cifsglob.h
+1
-0
fs/cifs/file.c
fs/cifs/file.c
+0
-3
No files found.
fs/cifs/cifs_debug.c
View file @
707c5db2
...
@@ -197,6 +197,8 @@ static read_proc_t ntlmv2_enabled_read;
...
@@ -197,6 +197,8 @@ static read_proc_t ntlmv2_enabled_read;
static
write_proc_t
ntlmv2_enabled_write
;
static
write_proc_t
ntlmv2_enabled_write
;
static
read_proc_t
packet_signing_enabled_read
;
static
read_proc_t
packet_signing_enabled_read
;
static
write_proc_t
packet_signing_enabled_write
;
static
write_proc_t
packet_signing_enabled_write
;
static
read_proc_t
quotaEnabled_read
;
static
write_proc_t
quotaEnabled_write
;
void
void
cifs_proc_init
(
void
)
cifs_proc_init
(
void
)
...
@@ -233,6 +235,11 @@ cifs_proc_init(void)
...
@@ -233,6 +235,11 @@ cifs_proc_init(void)
if
(
pde
)
if
(
pde
)
pde
->
write_proc
=
oplockEnabled_write
;
pde
->
write_proc
=
oplockEnabled_write
;
pde
=
create_proc_read_entry
(
"QuotaEnabled"
,
0
,
proc_fs_cifs
,
quotaEnabled_read
,
0
);
if
(
pde
)
pde
->
write_proc
=
quotaEnabled_write
;
pde
=
pde
=
create_proc_read_entry
(
"MultiuserMount"
,
0
,
proc_fs_cifs
,
create_proc_read_entry
(
"MultiuserMount"
,
0
,
proc_fs_cifs
,
multiuser_mount_read
,
0
);
multiuser_mount_read
,
0
);
...
@@ -361,6 +368,47 @@ oplockEnabled_write(struct file *file, const char *buffer,
...
@@ -361,6 +368,47 @@ oplockEnabled_write(struct file *file, const char *buffer,
return
count
;
return
count
;
}
}
static
int
quotaEnabled_read
(
char
*
page
,
char
**
start
,
off_t
off
,
int
count
,
int
*
eof
,
void
*
data
)
{
int
len
;
len
=
sprintf
(
page
,
"%d
\n
"
,
quotaEnabled
);
/* could also check if quotas are enabled in kernel
as a whole first */
len
-=
off
;
*
start
=
page
+
off
;
if
(
len
>
count
)
len
=
count
;
else
*
eof
=
1
;
if
(
len
<
0
)
len
=
0
;
return
len
;
}
static
int
quotaEnabled_write
(
struct
file
*
file
,
const
char
*
buffer
,
unsigned
long
count
,
void
*
data
)
{
char
c
;
int
rc
;
rc
=
get_user
(
c
,
buffer
);
if
(
rc
)
return
rc
;
if
(
c
==
'0'
||
c
==
'n'
||
c
==
'N'
)
quotaEnabled
=
0
;
else
if
(
c
==
'1'
||
c
==
'y'
||
c
==
'Y'
)
quotaEnabled
=
1
;
return
count
;
}
static
int
static
int
lookupFlag_read
(
char
*
page
,
char
**
start
,
off_t
off
,
lookupFlag_read
(
char
*
page
,
char
**
start
,
off_t
off
,
int
count
,
int
*
eof
,
void
*
data
)
int
count
,
int
*
eof
,
void
*
data
)
...
...
fs/cifs/cifsfs.c
View file @
707c5db2
...
@@ -42,12 +42,17 @@
...
@@ -42,12 +42,17 @@
#include <linux/mm.h>
#include <linux/mm.h>
#define CIFS_MAGIC_NUMBER 0xFF534D42
/* the first four bytes of all SMB PDUs */
#define CIFS_MAGIC_NUMBER 0xFF534D42
/* the first four bytes of all SMB PDUs */
#ifdef CIFS_QUOTA
static
struct
quotactl_ops
cifs_quotactl_ops
;
#endif
extern
struct
file_system_type
cifs_fs_type
;
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
=
1
;
unsigned
int
oplockEnabled
=
1
;
unsigned
int
quotaEnabled
=
0
;
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
;
...
@@ -92,7 +97,9 @@ cifs_read_super(struct super_block *sb, void *data,
...
@@ -92,7 +97,9 @@ cifs_read_super(struct super_block *sb, void *data,
sb
->
s_op
=
&
cifs_super_ops
;
sb
->
s_op
=
&
cifs_super_ops
;
/* if(cifs_sb->tcon->ses->server->maxBuf > MAX_CIFS_HDR_SIZE + 512)
/* if(cifs_sb->tcon->ses->server->maxBuf > MAX_CIFS_HDR_SIZE + 512)
sb->s_blocksize = cifs_sb->tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE; */
sb->s_blocksize = cifs_sb->tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE; */
#ifdef CIFS_QUOTA
sb
->
s_qcop
=
&
cifs_quotactl_ops
;
#endif
sb
->
s_blocksize
=
CIFS_MAX_MSGSIZE
;
sb
->
s_blocksize
=
CIFS_MAX_MSGSIZE
;
sb
->
s_blocksize_bits
=
14
;
/* default 2**14 = CIFS_MAX_MSGSIZE */
sb
->
s_blocksize_bits
=
14
;
/* default 2**14 = CIFS_MAX_MSGSIZE */
inode
=
iget
(
sb
,
ROOT_I
);
inode
=
iget
(
sb
,
ROOT_I
);
...
@@ -247,6 +254,7 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
...
@@ -247,6 +254,7 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
return
0
;
return
0
;
}
}
#ifdef CIFS_QUOTA
int
cifs_xquota_set
(
struct
super_block
*
sb
,
int
quota_type
,
qid_t
qid
,
int
cifs_xquota_set
(
struct
super_block
*
sb
,
int
quota_type
,
qid_t
qid
,
struct
fs_disk_quota
*
pdquota
)
struct
fs_disk_quota
*
pdquota
)
{
{
...
@@ -262,10 +270,10 @@ int cifs_xquota_set(struct super_block * sb, int quota_type, qid_t qid,
...
@@ -262,10 +270,10 @@ int cifs_xquota_set(struct super_block * sb, int quota_type, qid_t qid,
xid
=
GetXid
();
xid
=
GetXid
();
if
(
pTcon
)
if
(
pTcon
)
{
rc
=
-
EIO
;
cFYI
(
1
,(
"set type: 0x%x id: %d"
,
quota_type
,
qid
));
else
{
}
else
{
return
-
EIO
;
}
}
FreeXid
(
xid
);
FreeXid
(
xid
);
...
@@ -286,10 +294,10 @@ int cifs_xquota_get(struct super_block * sb, int quota_type, qid_t qid,
...
@@ -286,10 +294,10 @@ int cifs_xquota_get(struct super_block * sb, int quota_type, qid_t qid,
return
-
EIO
;
return
-
EIO
;
xid
=
GetXid
();
xid
=
GetXid
();
if
(
pTcon
)
if
(
pTcon
)
{
cFYI
(
1
,(
"set type: 0x%x id: %d"
,
quota_type
,
qid
));
}
else
{
rc
=
-
EIO
;
rc
=
-
EIO
;
else
{
}
}
FreeXid
(
xid
);
FreeXid
(
xid
);
...
@@ -309,10 +317,10 @@ int cifs_xstate_set(struct super_block * sb, unsigned int flags, int operation)
...
@@ -309,10 +317,10 @@ int cifs_xstate_set(struct super_block * sb, unsigned int flags, int operation)
return
-
EIO
;
return
-
EIO
;
xid
=
GetXid
();
xid
=
GetXid
();
if
(
pTcon
)
if
(
pTcon
)
{
cFYI
(
1
,(
"flags: 0x%x operation: 0x%x"
,
flags
,
operation
));
}
else
{
rc
=
-
EIO
;
rc
=
-
EIO
;
else
{
}
}
FreeXid
(
xid
);
FreeXid
(
xid
);
...
@@ -326,16 +334,16 @@ int cifs_xstate_get(struct super_block * sb, struct fs_quota_stat *qstats)
...
@@ -326,16 +334,16 @@ int cifs_xstate_get(struct super_block * sb, struct fs_quota_stat *qstats)
struct
cifs_sb_info
*
cifs_sb
=
CIFS_SB
(
sb
);
struct
cifs_sb_info
*
cifs_sb
=
CIFS_SB
(
sb
);
struct
cifsTconInfo
*
pTcon
;
struct
cifsTconInfo
*
pTcon
;
if
(
cifs_sb
)
if
(
cifs_sb
)
{
pTcon
=
cifs_sb
->
tcon
;
pTcon
=
cifs_sb
->
tcon
;
else
}
else
{
return
-
EIO
;
return
-
EIO
;
}
xid
=
GetXid
();
xid
=
GetXid
();
if
(
pTcon
)
if
(
pTcon
)
{
cFYI
(
1
,(
"pqstats %p"
,
qstats
));
}
else
{
rc
=
-
EIO
;
rc
=
-
EIO
;
else
{
}
}
FreeXid
(
xid
);
FreeXid
(
xid
);
...
@@ -348,6 +356,7 @@ static struct quotactl_ops cifs_quotactl_ops = {
...
@@ -348,6 +356,7 @@ static struct quotactl_ops cifs_quotactl_ops = {
.
set_xstate
=
cifs_xstate_set
,
.
set_xstate
=
cifs_xstate_set
,
.
get_xstate
=
cifs_xstate_get
,
.
get_xstate
=
cifs_xstate_get
,
};
};
#endif
struct
super_operations
cifs_super_ops
=
{
struct
super_operations
cifs_super_ops
=
{
.
read_inode
=
cifs_read_inode
,
.
read_inode
=
cifs_read_inode
,
...
...
fs/cifs/cifsglob.h
View file @
707c5db2
...
@@ -347,6 +347,7 @@ GLOBAL_EXTERN unsigned int multiuser_mount; /* if enabled allows new sessions
...
@@ -347,6 +347,7 @@ GLOBAL_EXTERN unsigned int multiuser_mount; /* if enabled allows new sessions
have the uid/password or Kerberos credential
have the uid/password or Kerberos credential
or equivalent for current user */
or equivalent for current user */
GLOBAL_EXTERN
unsigned
int
oplockEnabled
;
GLOBAL_EXTERN
unsigned
int
oplockEnabled
;
GLOBAL_EXTERN
unsigned
int
quotaEnabled
;
GLOBAL_EXTERN
unsigned
int
lookupCacheEnabled
;
GLOBAL_EXTERN
unsigned
int
lookupCacheEnabled
;
GLOBAL_EXTERN
unsigned
int
extended_security
;
/* if on, session setup sent
GLOBAL_EXTERN
unsigned
int
extended_security
;
/* if on, session setup sent
with more secure ntlmssp2 challenge/resp */
with more secure ntlmssp2 challenge/resp */
...
...
fs/cifs/file.c
View file @
707c5db2
...
@@ -1114,9 +1114,6 @@ construct_dentry(struct qstr *qstring, struct file *file,
...
@@ -1114,9 +1114,6 @@ construct_dentry(struct qstr *qstring, struct file *file,
}
}
tmp_dentry
->
d_time
=
jiffies
;
tmp_dentry
->
d_time
=
jiffies
;
(
*
ptmp_inode
)
->
i_blksize
=
(
pTcon
->
ses
->
server
->
maxBuf
-
MAX_CIFS_HDR_SIZE
)
&
0xFFFFFE00
;
cFYI
(
1
,
(
"i_blksize = %ld"
,
(
*
ptmp_inode
)
->
i_blksize
));
*
pnew_dentry
=
tmp_dentry
;
*
pnew_dentry
=
tmp_dentry
;
}
}
...
...
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