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
Kirill Smelkov
linux
Commits
4619f2ed
Commit
4619f2ed
authored
Dec 11, 2002
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] final sendfile bits
SGI Modid: 2.5.x-xfs:slinx:134450a
parent
5882eeaf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
17 deletions
+13
-17
fs/xfs/linux/xfs_lrw.c
fs/xfs/linux/xfs_lrw.c
+9
-17
fs/xfs/linux/xfs_lrw.h
fs/xfs/linux/xfs_lrw.h
+3
-0
fs/xfs/xfs_vnodeops.c
fs/xfs/xfs_vnodeops.c
+1
-0
No files found.
fs/xfs/linux/xfs_lrw.c
View file @
4619f2ed
...
...
@@ -215,54 +215,46 @@ xfs_sendfile(
void
*
target
,
cred_t
*
credp
)
{
size_t
size
=
0
;
ssize_t
ret
;
xfs_fsize_t
n
;
xfs_inode_t
*
ip
;
xfs_mount_t
*
mp
;
vnode_t
*
vp
;
int
invisible
=
(
filp
->
f_mode
&
FINVIS
);
ip
=
XFS_BHVTOI
(
bdp
);
vp
=
BHV_TO_VNODE
(
bdp
);
mp
=
ip
->
i_mount
;
vn_trace_entry
(
vp
,
"xfs_sendfile"
,
(
inst_t
*
)
__return_address
);
XFS_STATS_INC
(
xfsstats
.
xs_read_calls
);
n
=
XFS_MAX_FILE_OFFSET
-
*
offp
;
if
((
n
<=
0
)
||
(
size
==
0
))
if
((
n
<=
0
)
||
(
count
==
0
))
return
0
;
if
(
n
<
size
)
size
=
n
;
if
(
n
<
count
)
count
=
n
;
if
(
XFS_FORCED_SHUTDOWN
(
mp
))
{
if
(
XFS_FORCED_SHUTDOWN
(
ip
->
i_mount
))
return
-
EIO
;
}
xfs_ilock
(
ip
,
XFS_IOLOCK_SHARED
);
if
(
DM_EVENT_ENABLED
(
vp
->
v_vfsp
,
ip
,
DM_EVENT_READ
)
&&
!
(
filp
->
f_mode
&
FINVIS
))
{
int
error
;
if
(
DM_EVENT_ENABLED
(
vp
->
v_vfsp
,
ip
,
DM_EVENT_READ
)
&&
!
invisible
)
{
vrwlock_t
locktype
=
VRWLOCK_READ
;
int
error
;
error
=
xfs_dm_send_data_event
(
DM_EVENT_READ
,
bdp
,
*
offp
,
size
,
FILP_DELAY_FLAG
(
filp
),
&
locktype
);
count
,
FILP_DELAY_FLAG
(
filp
),
&
locktype
);
if
(
error
)
{
xfs_iunlock
(
ip
,
XFS_IOLOCK_SHARED
);
return
-
error
;
}
}
ret
=
generic_file_sendfile
(
filp
,
offp
,
count
,
actor
,
target
);
xfs_iunlock
(
ip
,
XFS_IOLOCK_SHARED
);
XFS_STATS_ADD
(
xfsstats
.
xs_read_bytes
,
ret
);
if
(
!
(
filp
->
f_mode
&
FINVIS
))
if
(
!
invisible
)
xfs_ichgtime
(
ip
,
XFS_ICHGTIME_ACC
);
return
ret
;
}
...
...
fs/xfs/linux/xfs_lrw.h
View file @
4619f2ed
...
...
@@ -58,6 +58,9 @@ extern ssize_t xfs_read (struct bhv_desc *, struct file *,
extern
ssize_t
xfs_write
(
struct
bhv_desc
*
,
struct
file
*
,
const
struct
iovec
*
,
unsigned
long
,
loff_t
*
,
struct
cred
*
);
extern
ssize_t
xfs_sendfile
(
struct
bhv_desc
*
,
struct
file
*
,
loff_t
*
,
size_t
,
read_actor_t
,
void
*
,
struct
cred
*
);
extern
int
xfs_dev_is_read_only
(
struct
xfs_mount
*
,
char
*
);
...
...
fs/xfs/xfs_vnodeops.c
View file @
4619f2ed
...
...
@@ -4870,6 +4870,7 @@ vnodeops_t xfs_vnodeops = {
BHV_IDENTITY_INIT
(
VN_BHV_XFS
,
VNODE_POSITION_XFS
),
.
vop_open
=
xfs_open
,
.
vop_read
=
xfs_read
,
.
vop_sendfile
=
xfs_sendfile
,
.
vop_write
=
xfs_write
,
.
vop_ioctl
=
xfs_ioctl
,
.
vop_getattr
=
xfs_getattr
,
...
...
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