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
eef2c071
Commit
eef2c071
authored
Apr 22, 2004
by
Eric Sandeen
Committed by
Christoph Hellwig
Apr 22, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] Use pgoff_t for page indices, and remove other type confusion
SGI Modid: xfs-linux:xfs-kern:168484a
parent
c54e4da3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
17 deletions
+19
-17
fs/xfs/linux/xfs_aops.c
fs/xfs/linux/xfs_aops.c
+18
-16
fs/xfs/linux/xfs_buf.c
fs/xfs/linux/xfs_buf.c
+1
-1
No files found.
fs/xfs/linux/xfs_aops.c
View file @
eef2c071
...
...
@@ -265,7 +265,7 @@ xfs_map_at_offset(
STATIC
struct
page
*
xfs_probe_unwritten_page
(
struct
address_space
*
mapping
,
unsigned
long
index
,
pgoff_t
index
,
xfs_iomap_t
*
iomapp
,
xfs_buf_t
*
pb
,
unsigned
long
max_offset
,
...
...
@@ -316,7 +316,7 @@ xfs_probe_unwritten_page(
STATIC
unsigned
int
xfs_probe_unmapped_page
(
struct
address_space
*
mapping
,
unsigned
long
index
,
pgoff_t
index
,
unsigned
int
pg_offset
)
{
struct
page
*
page
;
...
...
@@ -356,8 +356,8 @@ xfs_probe_unmapped_cluster(
struct
buffer_head
*
bh
,
struct
buffer_head
*
head
)
{
unsigned
long
tindex
,
tlast
,
tloff
;
unsigned
int
len
,
total
=
0
;
pgoff_t
tindex
,
tlast
,
tloff
;
unsigned
int
pg_offset
,
len
,
total
=
0
;
struct
address_space
*
mapping
=
inode
->
i_mapping
;
/* First sum forwards in this page */
...
...
@@ -382,9 +382,9 @@ xfs_probe_unmapped_cluster(
total
+=
len
;
}
if
(
tindex
==
tlast
&&
(
tloff
=
i_size_read
(
inode
)
&
(
PAGE_CACHE_SIZE
-
1
)))
{
(
pg_offset
=
i_size_read
(
inode
)
&
(
PAGE_CACHE_SIZE
-
1
)))
{
total
+=
xfs_probe_unmapped_page
(
mapping
,
tindex
,
tloff
);
tindex
,
pg_offset
);
}
}
return
total
;
...
...
@@ -398,7 +398,7 @@ xfs_probe_unmapped_cluster(
STATIC
struct
page
*
xfs_probe_delalloc_page
(
struct
inode
*
inode
,
unsigned
long
index
)
pgoff_t
index
)
{
struct
page
*
page
;
...
...
@@ -497,8 +497,9 @@ xfs_map_unwritten(
*/
if
(
bh
==
head
)
{
struct
address_space
*
mapping
=
inode
->
i_mapping
;
unsigned
long
tindex
,
tloff
,
tlast
,
bs
;
unsigned
int
bbits
=
inode
->
i_blkbits
;
pgoff_t
tindex
,
tloff
,
tlast
;
unsigned
long
bs
;
unsigned
int
pg_offset
,
bbits
=
inode
->
i_blkbits
;
struct
page
*
page
;
tlast
=
i_size_read
(
inode
)
>>
PAGE_CACHE_SHIFT
;
...
...
@@ -522,10 +523,10 @@ xfs_map_unwritten(
}
if
(
tindex
==
tlast
&&
(
tloff
=
(
i_size_read
(
inode
)
&
(
PAGE_CACHE_SIZE
-
1
))))
{
(
pg_offset
=
(
i_size_read
(
inode
)
&
(
PAGE_CACHE_SIZE
-
1
))))
{
page
=
xfs_probe_unwritten_page
(
mapping
,
tindex
,
iomapp
,
pb
,
tloff
,
&
bs
,
bbits
);
pg_offset
,
&
bs
,
bbits
);
if
(
page
)
{
nblocks
+=
bs
;
atomic_add
(
bs
,
&
pb
->
pb_io_remaining
);
...
...
@@ -603,7 +604,8 @@ xfs_convert_page(
{
struct
buffer_head
*
bh_arr
[
MAX_BUF_PER_PAGE
],
*
bh
,
*
head
;
xfs_iomap_t
*
mp
=
iomapp
,
*
tmp
;
unsigned
long
end
,
offset
,
end_index
;
unsigned
long
end
,
offset
;
pgoff_t
end_index
;
int
i
=
0
,
index
=
0
;
int
bbits
=
inode
->
i_blkbits
;
...
...
@@ -671,12 +673,12 @@ xfs_convert_page(
STATIC
void
xfs_cluster_write
(
struct
inode
*
inode
,
unsigned
long
tindex
,
pgoff_t
tindex
,
xfs_iomap_t
*
iomapp
,
int
startio
,
int
all_bh
)
{
unsigned
long
tlast
;
pgoff_t
tlast
;
struct
page
*
page
;
tlast
=
(
iomapp
->
iomap_offset
+
iomapp
->
iomap_bsize
)
>>
PAGE_CACHE_SHIFT
;
...
...
@@ -716,9 +718,9 @@ xfs_page_state_convert(
{
struct
buffer_head
*
bh_arr
[
MAX_BUF_PER_PAGE
],
*
bh
,
*
head
;
xfs_iomap_t
*
iomp
,
iomap
;
unsigned
long
p_offset
=
0
,
end_index
;
pgoff_t
end_index
;
unsigned
long
end_index
;
loff_t
offset
;
unsigned
long
long
end_offset
;
int
len
,
err
,
i
,
cnt
=
0
,
uptodate
=
1
;
int
flags
=
startio
?
0
:
BMAPI_TRYLOCK
;
int
page_dirty
=
1
;
...
...
fs/xfs/linux/xfs_buf.c
View file @
eef2c071
...
...
@@ -368,7 +368,7 @@ _pagebuf_lookup_pages(
size_t
size
=
bp
->
pb_count_desired
,
nbytes
;
size_t
offset
=
bp
->
pb_offset
;
int
gfp_mask
=
pb_to_gfp
(
flags
);
unsigned
long
page_count
,
i
;
unsigned
short
page_count
,
i
;
pgoff_t
first
;
loff_t
end
;
int
error
;
...
...
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