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
48f7ee5a
Commit
48f7ee5a
authored
Jan 25, 2005
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 'f_maxcount' to allow filesystems to set a per-file maximum IO size.
parent
b0217ce8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletion
+7
-1
fs/file_table.c
fs/file_table.c
+1
-0
fs/read_write.c
fs/read_write.c
+5
-1
include/linux/fs.h
include/linux/fs.h
+1
-0
No files found.
fs/file_table.c
View file @
48f7ee5a
...
@@ -85,6 +85,7 @@ static int old_max;
...
@@ -85,6 +85,7 @@ static int old_max;
rwlock_init
(
&
f
->
f_owner
.
lock
);
rwlock_init
(
&
f
->
f_owner
.
lock
);
/* f->f_version: 0 */
/* f->f_version: 0 */
INIT_LIST_HEAD
(
&
f
->
f_list
);
INIT_LIST_HEAD
(
&
f
->
f_list
);
f
->
f_maxcount
=
INT_MAX
;
return
f
;
return
f
;
}
}
}
}
...
...
fs/read_write.c
View file @
48f7ee5a
...
@@ -185,8 +185,12 @@ asmlinkage long sys_llseek(unsigned int fd, unsigned long offset_high,
...
@@ -185,8 +185,12 @@ asmlinkage long sys_llseek(unsigned int fd, unsigned long offset_high,
int
rw_verify_area
(
int
read_write
,
struct
file
*
file
,
loff_t
*
ppos
,
size_t
count
)
int
rw_verify_area
(
int
read_write
,
struct
file
*
file
,
loff_t
*
ppos
,
size_t
count
)
{
{
struct
inode
*
inode
=
file
->
f_dentry
->
d_inode
;
struct
inode
*
inode
;
if
(
count
>
file
->
f_maxcount
)
return
-
EINVAL
;
inode
=
file
->
f_dentry
->
d_inode
;
if
(
inode
->
i_flock
&&
MANDATORY_LOCK
(
inode
))
if
(
inode
->
i_flock
&&
MANDATORY_LOCK
(
inode
))
return
locks_mandatory_area
(
read_write
==
READ
?
FLOCK_VERIFY_READ
:
FLOCK_VERIFY_WRITE
,
inode
,
file
,
*
ppos
,
count
);
return
locks_mandatory_area
(
read_write
==
READ
?
FLOCK_VERIFY_READ
:
FLOCK_VERIFY_WRITE
,
inode
,
file
,
*
ppos
,
count
);
return
0
;
return
0
;
...
...
include/linux/fs.h
View file @
48f7ee5a
...
@@ -586,6 +586,7 @@ struct file {
...
@@ -586,6 +586,7 @@ struct file {
unsigned
int
f_uid
,
f_gid
;
unsigned
int
f_uid
,
f_gid
;
struct
file_ra_state
f_ra
;
struct
file_ra_state
f_ra
;
size_t
f_maxcount
;
unsigned
long
f_version
;
unsigned
long
f_version
;
void
*
f_security
;
void
*
f_security
;
...
...
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